Пример #1
0
 /**
  * Adds additional fields to the settings pages
  * 
  * @return UF_Field[]
  */
 public static function additional_settings()
 {
     $parent_fields = parent::additional_settings();
     # Disable the jQuery thingy
     unset($parent_fields['jquery_plugin']);
     unset($parent_fields['output_data_separator']);
     unset($parent_fields['output_data_type']);
     return array_merge($parent_fields, array(UF_Field::factory('checkbox', 'sortable', __('Sortable', 'uf'))->set_description(__('If checked, the user will be able to change the order of the options.', 'uf')), UF_Field::factory('separator', 'output_data_separator', __('Output Settings', 'uf'))->set_description(__('The following settings will affect the output of this field when using the "uf" function or shortcode.', 'uf')), UF_Field::factory('select', 'output_type', __('Output Type', 'uf'))->add_options(array('unordered_list' => __('Unordered List', 'uf'), 'join' => __('A single line, joined with commas.', 'uf'))), UF_Field::factory('select', 'output_item', __('Output Item', 'uf'))->add_options(array('value' => __('Output the value of the select, the way it is saved', 'uf'), 'text' => __('Output the label of the selected value', 'uf')))));
 }
Пример #2
0
 /**
  * Adds additional fields to the settings pages
  * 
  * @return UF_Field[]
  */
 public static function additional_settings()
 {
     $fields = UF_Field_Select::additional_settings();
     unset($fields['jquery_plugin']);
     return $fields;
 }