Options array

一些备份,没什么意义。。。。。。

$options[] = array(
'name' => __( 'Basic Settings', 'theme-textdomain' ),
'type' => 'heading'
);

$options[] = array(
‘name’ => __( ‘Input Text Mini’, ‘theme-textdomain’ ),
‘desc’ => __( ‘A mini text input field.’, ‘theme-textdomain’ ),
‘id’ => ‘example_text_mini’,
‘std’ => ‘Default’,
‘class’ => ‘mini’,
‘type’ => ‘text’
);

$options[] = array(
‘name’ => __( ‘Input Text’, ‘theme-textdomain’ ),
‘desc’ => __( ‘A text input field.’, ‘theme-textdomain’ ),
‘id’ => ‘example_text’,
‘std’ => ‘Default Value’,
‘type’ => ‘text’
);

$options[] = array(
‘name’ => __( ‘Input with Placeholder’, ‘theme-textdomain’ ),
‘desc’ => __( ‘A text input field with an HTML5 placeholder.’, ‘theme-textdomain’ ),
‘id’ => ‘example_placeholder’,
‘placeholder’ => ‘Placeholder’,
‘type’ => ‘text’
);

$options[] = array(
‘name’ => __( ‘Textarea’, ‘theme-textdomain’ ),
‘desc’ => __( ‘Textarea description.’, ‘theme-textdomain’ ),
‘id’ => ‘example_textarea’,
‘std’ => ‘Default Text’,
‘type’ => ‘textarea’
);

$options[] = array(
‘name’ => __( ‘Input Select Small’, ‘theme-textdomain’ ),
‘desc’ => __( ‘Small Select Box.’, ‘theme-textdomain’ ),
‘id’ => ‘example_select’,
‘std’ => ‘three’,
‘type’ => ‘select’,
‘class’ => ‘mini’, //mini, tiny, small
‘options’ => $test_array
);

$options[] = array(
‘name’ => __( ‘Input Select Wide’, ‘theme-textdomain’ ),
‘desc’ => __( ‘A wider select box.’, ‘theme-textdomain’ ),
‘id’ => ‘example_select_wide’,
‘std’ => ‘two’,
‘type’ => ‘select’,
‘options’ => $test_array
);

if ( $options_categories ) {
$options[] = array(
‘name’ => __( ‘Select a Category’, ‘theme-textdomain’ ),
‘desc’ => __( ‘Passed an array of categories with cat_ID and cat_name’, ‘theme-textdomain’ ),
‘id’ => ‘example_select_categories’,
‘type’ => ‘select’,
‘options’ => $options_categories
);
}

if ( $options_tags ) {
$options[] = array(
‘name’ => __( ‘Select a Tag’, ‘options_check’ ),
‘desc’ => __( ‘Passed an array of tags with term_id and term_name’, ‘options_check’ ),
‘id’ => ‘example_select_tags’,
‘type’ => ‘select’,
‘options’ => $options_tags
);
}

$options[] = array(
‘name’ => __( ‘Select a Page’, ‘theme-textdomain’ ),
‘desc’ => __( ‘Passed an pages with ID and post_title’, ‘theme-textdomain’ ),
‘id’ => ‘example_select_pages’,
‘type’ => ‘select’,
‘options’ => $options_pages
);

$options[] = array(
‘name’ => __( ‘Input Radio (one)’, ‘theme-textdomain’ ),
‘desc’ => __( ‘Radio select with default options “one”.’, ‘theme-textdomain’ ),
‘id’ => ‘example_radio’,
‘std’ => ‘one’,
‘type’ => ‘radio’,
‘options’ => $test_array
);

$options[] = array(
‘name’ => __( ‘Example Info’, ‘theme-textdomain’ ),
‘desc’ => __( ‘This is just some example information you can put in the panel.’, ‘theme-textdomain’ ),
‘type’ => ‘info’
);

$options[] = array(
‘name’ => __( ‘Input Checkbox’, ‘theme-textdomain’ ),
‘desc’ => __( ‘Example checkbox, defaults to true.’, ‘theme-textdomain’ ),
‘id’ => ‘example_checkbox’,
‘std’ => ‘1’,
‘type’ => ‘checkbox’
);

$options[] = array(
‘name’ => __( ‘Advanced Settings’, ‘theme-textdomain’ ),
‘type’ => ‘heading’
);

$options[] = array(
‘name’ => __( ‘Check to Show a Hidden Text Input’, ‘theme-textdomain’ ),
‘desc’ => __( ‘Click here and see what happens.’, ‘theme-textdomain’ ),
‘id’ => ‘example_showhidden’,
‘type’ => ‘checkbox’
);

$options[] = array(
‘name’ => __( ‘Hidden Text Input’, ‘theme-textdomain’ ),
‘desc’ => __( ‘This option is hidden unless activated by a checkbox click.’, ‘theme-textdomain’ ),
‘id’ => ‘example_text_hidden’,
‘std’ => ‘Hello’,
‘class’ => ‘hidden’,
‘type’ => ‘text’
);

$options[] = array(
‘name’ => __( ‘Uploader Test’, ‘theme-textdomain’ ),
‘desc’ => __( ‘This creates a full size uploader that previews the image.’, ‘theme-textdomain’ ),
‘id’ => ‘example_uploader’,
‘type’ => ‘upload’
);

$options[] = array(
‘name’ => “Example Image Selector”,
‘desc’ => “Images for layout.”,
‘id’ => “example_images”,
‘std’ => “2c-l-fixed”,
‘type’ => “images”,
‘options’ => array(
‘1col-fixed’ => $imagepath . ‘1col.png’,
‘2c-l-fixed’ => $imagepath . ‘2cl.png’,
‘2c-r-fixed’ => $imagepath . ‘2cr.png’
)
);

$options[] = array(
‘name’ => __( ‘Example Background’, ‘theme-textdomain’ ),
‘desc’ => __( ‘Change the background CSS.’, ‘theme-textdomain’ ),
‘id’ => ‘example_background’,
‘std’ => $background_defaults,
‘type’ => ‘background’
);

$options[] = array(
‘name’ => __( ‘Multicheck’, ‘theme-textdomain’ ),
‘desc’ => __( ‘Multicheck description.’, ‘theme-textdomain’ ),
‘id’ => ‘example_multicheck’,
‘std’ => $multicheck_defaults, // These items get checked by default
‘type’ => ‘multicheck’,
‘options’ => $multicheck_array
);

$options[] = array(
‘name’ => __( ‘Colorpicker’, ‘theme-textdomain’ ),
‘desc’ => __( ‘No color selected by default.’, ‘theme-textdomain’ ),
‘id’ => ‘example_colorpicker’,
‘std’ => ”,
‘type’ => ‘color’
);

$options[] = array( ‘name’ => __( ‘Typography’, ‘theme-textdomain’ ),
‘desc’ => __( ‘Example typography.’, ‘theme-textdomain’ ),
‘id’ => “example_typography”,
‘std’ => $typography_defaults,
‘type’ => ‘typography’
);

$options[] = array(
‘name’ => __( ‘Custom Typography’, ‘theme-textdomain’ ),
‘desc’ => __( ‘Custom typography options.’, ‘theme-textdomain’ ),
‘id’ => “custom_typography”,
‘std’ => $typography_defaults,
‘type’ => ‘typography’,
‘options’ => $typography_options
);

$options[] = array(
‘name’ => __( ‘Text Editor’, ‘theme-textdomain’ ),
‘type’ => ‘heading’
);

/**
* For $settings options see:
* http://codex.wordpress.org/Function_Reference/wp_editor
*
* ‘media_buttons’ are not supported as there is no post to attach items to
* ‘textarea_name’ is set by the ‘id’ you choose
*/

$wp_editor_settings = array(
‘wpautop’ => true, // Default
‘textarea_rows’ => 5,
‘tinymce’ => array( ‘plugins’ => ‘wordpress,wplink’ )
);

$options[] = array(
‘name’ => __( ‘Default Text Editor’, ‘theme-textdomain’ ),
‘desc’ => sprintf( __( ‘You can also pass settings to the editor. Read more about wp_editor in the WordPress codex‘, ‘theme-textdomain’ ), ‘http://codex.wordpress.org/Function_Reference/wp_editor’ ),
‘id’ => ‘example_editor’,
‘type’ => ‘editor’,
‘settings’ => $wp_editor_settings
);

未经允许不得转载:美国主机评论博客 » Options array

赞 (0)

评论 0

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址