芝麻web文件管理V1.00
编辑当前文件:/home/prismawe/www/itrema/wp-content/plugins/advanced-custom-fields/core/fields/true_false.php
name = 'true_false'; $this->label = __("True / False",'acf'); $this->category = __("Choice",'acf'); $this->defaults = array( 'default_value' => 0, 'message' => '', ); // do not delete! parent::__construct(); } /* * create_field() * * Create the HTML interface for your field * * @param $field - an array holding all the field's data * * @type action * @since 3.6 * @date 23/01/13 */ function create_field( $field ) { // html echo '
'; echo '
'; $selected = ($field['value'] == 1) ? 'checked="yes"' : ''; echo '
' . $field['message'] . '
'; echo '
'; } /* * create_options() * * Create extra options for your field. This is rendered when editing a field. * The value of $field['name'] can be used (like bellow) to save extra data to the $field * * @type action * @since 3.6 * @date 23/01/13 * * @param $field - an array holding all the field's data */ function create_options( $field ) { // vars $key = $field['name']; ?>
'text', 'name' => 'fields['.$key.'][message]', 'value' => $field['message'], )); ?>
'true_false', 'name' => 'fields['.$key.'][default_value]', 'value' => $field['default_value'], )); ?>