Example #1
1
function thb_import_theme_options()
{
    $file = get_template_directory_uri() . "/inc/democontent/theme-options.txt";
    $theme_options_txt = wp_remote_get($file);
    $options = unserialize(ot_decode($theme_options_txt['body']));
    /* get settings array */
    $settings = get_option(ot_settings_id());
    /* validate options */
    foreach ($settings['settings'] as $setting) {
        if (isset($options[$setting['id']])) {
            $content = ot_stripslashes($options[$setting['id']]);
            $options[$setting['id']] = ot_validate_setting($content, $setting['type'], $setting['id']);
        }
    }
    /* update the option tree array */
    update_option(ot_options_id(), $options);
    $message = 'success';
}
/**
 * Build the custom settings & update OptionTree.
 *
 * @return    void
 * @since     2.0
 */
function custom_theme_options()
{
    /* OptionTree is not loaded yet, or this is not an admin request */
    if (!function_exists('ot_settings_id') || !is_admin()) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('content' => array(array('id' => 'option_types_help', 'title' => __('Option Types', 'theme-text-domain'), 'content' => '<p>' . __('Help content goes here!', 'theme-text-domain') . '</p>')), 'sidebar' => '<p>' . __('Sidebar content goes here!', 'theme-text-domain') . '</p>'), 'sections' => array(array('id' => 'option_types', 'title' => __('Option Types', 'theme-text-domain'))), 'settings' => array(array('id' => 'demo_background', 'label' => __('Background', 'theme-text-domain'), 'desc' => sprintf(__('The Background option type is for adding background styles to your theme either dynamically via the CSS option type below or manually with %s. The Background option type has filters that allow you to remove fields or change the defaults. For example, you can filter %s to remove unwanted fields from all Background options or an individual one. You can also filter %s. These filters allow you to fine tune the select lists for your specific needs.', 'theme-text-domain'), '<code>ot_get_option()</code>', '<code>ot_recognized_background_fields</code>', '<code>ot_recognized_background_repeat</code>, <code>ot_recognized_background_attachment</code>, <code>ot_recognized_background_position</code>, ' . __('and', 'theme-text-domain') . ' <code>ot_type_background_size_choices</code>'), 'std' => '', 'type' => 'background', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_border', 'label' => __('Border', 'theme-text-domain'), 'desc' => __('The Border option type is used to set width, unit, style, and color values.', 'theme-text-domain'), 'std' => '', 'type' => 'border', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_box_shadow', 'label' => __('Box Shadow', 'theme-text-domain'), 'desc' => sprintf(__('The Box Shadow option type is used to set %s, %s, %s, %s, %s, and %s values.', 'theme-text-domain'), '<code>inset</code>', '<code>offset-x</code>', '<code>offset-y</code>', '<code>blur-radius</code>', '<code>spread-radius</code>', '<code>color</code>'), 'std' => '', 'type' => 'box-shadow', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_category_checkbox', 'label' => __('Category Checkbox', 'theme-text-domain'), 'desc' => __('The Category Checkbox option type displays a list of category IDs. It allows the user to check multiple category IDs and will return that value as an array for use in a custom function or loop.', 'theme-text-domain'), 'std' => '', 'type' => 'category-checkbox', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_category_select', 'label' => __('Category Select', 'theme-text-domain'), 'desc' => __('The Category Select option type displays a list of category IDs. It allows the user to select only one category ID and will return that value for use in a custom function or loop.', 'theme-text-domain'), 'std' => '', 'type' => 'category-select', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_checkbox', 'label' => __('Checkbox', 'theme-text-domain'), 'desc' => __('The Checkbox option type displays a group of choices. It allows the user to check multiple choices and will return that value as an array for use in a custom function or loop.', 'theme-text-domain'), 'std' => '', 'type' => 'checkbox', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'no', 'label' => __('No', 'theme-text-domain'), 'src' => ''), array('value' => 'Yes', 'label' => __('Yes', 'theme-text-domain'), 'src' => ''))), array('id' => 'demo_colorpicker', 'label' => __('Colorpicker', 'theme-text-domain'), 'desc' => __('The Colorpicker option type saves a hexadecimal color code for use in CSS. Use it to modify the color of something in your theme.', 'theme-text-domain'), 'std' => '', 'type' => 'colorpicker', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_colorpicker_opacity', 'label' => __('Colorpicker Opacity', 'theme-text-domain'), 'desc' => __('Colorpicker Opacity', 'option-tree-theme'), 'desc' => sprintf(__('The Colorpicker Opacity option type saves an rgba color value for use in CSS. To add opacity to other colorpickers add the %s class to the %s array.', 'option-tree'), '<code>ot-colorpicker-opacity</code>', '<code>$args</code>'), 'std' => '', 'type' => 'colorpicker-opacity', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_css', 'label' => __('CSS', 'theme-text-domain'), 'desc' => '<p>' . sprintf(__('The CSS option type is a textarea that when used properly can add dynamic CSS to your theme from within OptionTree. Unfortunately, due server limitations you will need to create a file named %s at the root level of your theme and change permissions using %s so the server can write to the file. I have had the most success setting this single file to %s but feel free to play around with permissions until everything is working. A good starting point is %s. When the server can save to the file, CSS will automatically be updated when you save your Opções do Tema.', 'theme-text-domain'), '<code>dynamic.css</code>', '<code>chmod</code>', '<code>0777</code>', '<code>0666</code>') . '</p><p>' . sprintf(__('This example assumes you have an option with the ID of %1$s. Which means this option will automatically insert the value of %1$s into the %2$s when the Opções do Tema are saved.', 'theme-text-domain'), '<code>demo_background</code>', '<code>dynamic.css</code>') . '</p>', 'std' => '#custom {
  {{demo_background}}
}', 'type' => 'css', 'section' => 'option_types', 'rows' => '20', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_custom_post_type_checkbox', 'label' => __('Custom Post Type Checkbox', 'theme-text-domain'), 'desc' => sprintf(__('The Custom Post Type Select option type displays a list of IDs from any available WordPress post type or custom post type. It allows the user to check multiple post IDs for use in a custom function or loop. Requires at least one valid %1$s in the %1$s field.', 'theme-text-domain'), '<code>post_type</code>'), 'std' => '', 'type' => 'custom-post-type-checkbox', 'section' => 'option_types', 'rows' => '', 'post_type' => 'post', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_custom_post_type_select', 'label' => __('Custom Post Type Select', 'theme-text-domain'), 'desc' => sprintf(__('The Custom Post Type Select option type displays a list of IDs from any available WordPress post type or custom post type. It will return a single post ID for use in a custom function or loop. Requires at least one valid %1$s in the %1$s field.', 'theme-text-domain'), '<code>post_type</code>'), 'std' => '', 'type' => 'custom-post-type-select', 'section' => 'option_types', 'rows' => '', 'post_type' => 'post', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_date_picker', 'label' => __('Date Picker', 'theme-text-domain'), 'desc' => __('The Date Picker option type is tied to a standard form input field which displays a calendar pop-up that allow the user to pick any date when focus is given to the input field. The returned value is a date formatted string.', 'theme-text-domain'), 'std' => '', 'type' => 'date-picker', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_date_time_picker', 'label' => __('Date Time Picker', 'theme-text-domain'), 'desc' => __('The Date Time Picker option type is tied to a standard form input field which displays a calendar pop-up that allow the user to pick any date and time when focus is given to the input field. The returned value is a date and time formatted string.', 'theme-text-domain'), 'std' => '', 'type' => 'date-time-picker', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_dimension', 'label' => __('Dimension', 'theme-text-domain'), 'desc' => __('The Dimension option type is used to set width and height values.', 'theme-text-domain'), 'std' => '', 'type' => 'dimension', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_gallery', 'label' => __('Gallery', 'theme-text-domain'), 'desc' => __('The Gallery option type saves a comma separated list of image attachment IDs. You will need to create a front-end function to display the images in your theme.', 'theme-text-domain'), 'std' => '', 'type' => 'gallery', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_gallery_shortcode', 'label' => __('Gallery Shortcode', 'theme-text-domain'), 'desc' => sprintf(__('The Gallery option type can also be saved as a shortcode by adding %s to the class attribute. Using the Gallery option type in this manner will result in a better user experience as you\'re able to save the link, column, and order settings.', 'theme-text-domain'), '<code>ot-gallery-shortcode</code>'), 'std' => '', 'type' => 'gallery', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'ot-gallery-shortcode', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_google_fonts', 'label' => __('Google Fonts', 'theme-text-domain'), 'desc' => sprintf(__('The Google Fonts option type will dynamically enqueue any number of Google Web Fonts into the document %1$s. As well, once the option has been saved each font family will automatically be inserted into the %2$s array for the Typography option type. You can further modify the font stack by using the %3$s filter, which is passed the %4$s, %5$s, and %6$s parameters. The %6$s parameter is being passed from %7$s, so it will be the ID of a Typography option type. This will allow you to add additional web safe fonts to individual font families on an as-need basis.', 'theme-text-domain'), '<code>HEAD</code>', '<code>font-family</code>', '<code>ot_google_font_stack</code>', '<code>$font_stack</code>', '<code>$family</code>', '<code>$field_id</code>', '<code>ot_recognized_font_families</code>'), 'std' => array(array('family' => 'opensans', 'variants' => array('300', '300italic', 'regular', 'italic', '600', '600italic'), 'subsets' => array('latin'))), 'type' => 'google-fonts', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_javascript', 'label' => __('JavaScript', 'theme-text-domain'), 'desc' => '<p>' . sprintf(__('The JavaScript option type is a textarea that uses the %s code editor to highlight your JavaScript and display errors as you type.', 'theme-text-domain'), '<code>ace.js</code>') . '</p>', 'std' => '', 'type' => 'javascript', 'section' => 'option_types', 'rows' => '20', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_link_color', 'label' => __('Link Color', 'theme-text-domain'), 'desc' => __('The Link Color option type is used to set all link color states.', 'theme-text-domain'), 'std' => '', 'type' => 'link-color', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_list_item', 'label' => __('List Item', 'theme-text-domain'), 'desc' => __('The List Item option type allows for a great deal of customization. You can add settings to the List Item and those settings will be displayed to the user when they add a new List Item. Typical use is for creating sliding content or blocks of code for custom layouts.', 'theme-text-domain'), 'std' => '', 'type' => 'list-item', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'settings' => array(array('id' => 'demo_list_item_content', 'label' => __('Content', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'textarea-simple', 'rows' => '10', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'))), array('id' => 'demo_measurement', 'label' => __('Measurement', 'theme-text-domain'), 'desc' => sprintf(__('The Measurement option type is a mix of input and select fields. The text input excepts a value and the select lets you choose the unit of measurement to add to that value. Currently the default units are %s, %s, %s, and %s. However, you can change them with the %s filter.', 'theme-text-domain'), '<code>px</code>', '<code>%</code>', '<code>em</code>', '<code>pt</code>', '<code>ot_measurement_unit_types</code>'), 'std' => '', 'type' => 'measurement', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_numeric_slider', 'label' => __('Numeric Slider', 'theme-text-domain'), 'desc' => __('The Numeric Slider option type displays a jQuery UI slider. It will return a single numerical value for use in a custom function or loop.', 'theme-text-domain'), 'std' => '', 'type' => 'numeric-slider', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '-500,5000,100', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_on_off', 'label' => __('On/Off', 'theme-text-domain'), 'desc' => sprintf(__('The On/Off option type displays a simple switch that can be used to turn things on or off. The saved return value is either %s or %s.', 'theme-text-domain'), '<code>on</code>', '<code>off</code>'), 'std' => '', 'type' => 'on-off', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_page_checkbox', 'label' => __('Page Checkbox', 'theme-text-domain'), 'desc' => __('The Page Checkbox option type displays a list of page IDs. It allows the user to check multiple page IDs for use in a custom function or loop.', 'theme-text-domain'), 'std' => '', 'type' => 'page-checkbox', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_page_select', 'label' => __('Page Select', 'theme-text-domain'), 'desc' => __('The Page Select option type displays a list of page IDs. It will return a single page ID for use in a custom function or loop.', 'theme-text-domain'), 'std' => '', 'type' => 'page-select', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_post_checkbox', 'label' => __('Post Checkbox', 'theme-text-domain'), 'desc' => __('The Post Checkbox option type displays a list of post IDs. It allows the user to check multiple post IDs for use in a custom function or loop.', 'theme-text-domain'), 'std' => '', 'type' => 'post-checkbox', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_post_select', 'label' => __('Post Select', 'theme-text-domain'), 'desc' => __('The Post Select option type displays a list of post IDs. It will return a single post ID for use in a custom function or loop.', 'theme-text-domain'), 'std' => '', 'type' => 'post-select', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_radio', 'label' => __('Radio', 'theme-text-domain'), 'desc' => __('The Radio option type displays a group of choices. It allows the user to choose one and will return that value as a string for use in a custom function or loop.', 'theme-text-domain'), 'std' => '', 'type' => 'radio', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'yes', 'label' => __('Yes', 'theme-text-domain'), 'src' => ''), array('value' => 'no', 'label' => __('No', 'theme-text-domain'), 'src' => ''), array('value' => 'maybe', 'label' => __('Maybe', 'theme-text-domain'), 'src' => ''))), array('id' => 'demo_radio_image', 'label' => __('Radio Image', 'theme-text-domain'), 'desc' => sprintf(__('the Radio Images option type is primarily used for layouts. However, you can filter the image list using %s. As well, you can add your own custom images using the choices array.', 'theme-text-domain'), '<code>ot_radio_images</code>'), 'std' => 'right-sidebar', 'type' => 'radio-image', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_select', 'label' => __('Select', 'theme-text-domain'), 'desc' => __('The Select option type is used to list anything you want that would be chosen from a select list.', 'theme-text-domain'), 'std' => '', 'type' => 'select', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => '', 'label' => __('-- Choose One --', 'theme-text-domain'), 'src' => ''), array('value' => 'yes', 'label' => __('Yes', 'theme-text-domain'), 'src' => ''), array('value' => 'no', 'label' => __('No', 'theme-text-domain'), 'src' => ''), array('value' => 'maybe', 'label' => __('Maybe', 'theme-text-domain'), 'src' => ''))), array('id' => 'demo_sidebar_select', 'label' => __('Sidebar Select', 'theme-text-domain'), 'desc' => '<p>' . sprintf(__('This option type makes it possible for users to select a WordPress registered sidebar to use on a specific area. By using the two provided filters, %s, and %s we can be selective about which sidebars are available on a specific content area.', 'theme-text-domain'), '<code>ot_recognized_sidebars</code>', '<code>ot_recognized_sidebars_{$field_id}</code>') . '</p><p>' . sprintf(__('For example, if we create a WordPress theme that provides the ability to change the Blog Sidebar and we don\'t want to have the footer sidebars available on this area, we can unset those sidebars either manually or by using a regular expression if we have a common name like %s.', 'theme-text-domain'), '<code>footer-sidebar-$i</code>') . '</p>', 'std' => '', 'type' => 'sidebar-select', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_social_links', 'label' => __('Social Links', 'theme-text-domain'), 'desc' => '<p>' . sprintf(__('The Social Links option type utilizes a drag & drop interface to create a list of social links. There are a few filters that make extending this option type easy. You can set the %s filter to %s and turn off loading default values. Use the %s filter to change the default values that are loaded. To filter the settings array use the %s filter.', 'theme-text-domain'), '<code>ot_type_social_links_load_defaults</code>', '<code>false</code>', '<code>ot_type_social_links_defaults</code>', '<code>ot_social_links_settings</code>') . '</p>', 'std' => '', 'type' => 'social-links', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_spacing', 'label' => __('Spacing', 'theme-text-domain'), 'desc' => __('The Spacing option type is used to set spacing values such as padding or margin in the form of top, right, bottom, and left.', 'theme-text-domain'), 'std' => '', 'type' => 'spacing', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_tag_checkbox', 'label' => __('Tag Checkbox', 'theme-text-domain'), 'desc' => __('The Tag Checkbox option type displays a list of tag IDs. It allows the user to check multiple tag IDs and will return that value as an array for use in a custom function or loop.', 'theme-text-domain'), 'std' => '', 'type' => 'tag-checkbox', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_tag_select', 'label' => __('Tag Select', 'theme-text-domain'), 'desc' => __('The Tag Select option type displays a list of tag IDs. It allows the user to select only one tag ID and will return that value for use in a custom function or loop.', 'theme-text-domain'), 'std' => '', 'type' => 'tag-select', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_taxonomy_checkbox', 'label' => __('Taxonomy Checkbox', 'theme-text-domain'), 'desc' => __('The Taxonomy Checkbox option type displays a list of taxonomy IDs. It allows the user to check multiple taxonomy IDs and will return that value as an array for use in a custom function or loop.', 'theme-text-domain'), 'std' => '', 'type' => 'taxonomy-checkbox', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => 'category,post_tag', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_taxonomy_select', 'label' => __('Taxonomy Select', 'theme-text-domain'), 'desc' => __('The Taxonomy Select option type displays a list of taxonomy IDs. It allows the user to select only one taxonomy ID and will return that value for use in a custom function or loop.', 'theme-text-domain'), 'std' => '', 'type' => 'taxonomy-select', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => 'category,post_tag', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_text', 'label' => __('Text', 'theme-text-domain'), 'desc' => __('The Text option type is used to save string values. For example, any optional or required text that is of reasonably short character length.', 'theme-text-domain'), 'std' => '', 'type' => 'text', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_textarea', 'label' => __('Textarea', 'theme-text-domain'), 'desc' => sprintf(__('The Textarea option type is a large string value used for custom code or text in the theme and has a WYSIWYG editor that can be filtered to change the how it is displayed. For example, you can filter %s, %s, %s, and %s.', 'theme-text-domain'), '<code>wpautop</code>', '<code>media_buttons</code>', '<code>tinymce</code>', '<code>quicktags</code>'), 'std' => '', 'type' => 'textarea', 'section' => 'option_types', 'rows' => '15', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_textarea_simple', 'label' => __('Textarea Simple', 'theme-text-domain'), 'desc' => __('The Textarea Simple option type is a large string value used for custom code or text in the theme. The Textarea Simple does not have a WYSIWYG editor.', 'theme-text-domain'), 'std' => '', 'type' => 'textarea-simple', 'section' => 'option_types', 'rows' => '10', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_textblock', 'label' => __('Textblock', 'theme-text-domain'), 'desc' => __('The Textblock option type is used only on the Theme Option page. It will allow you to create & display HTML, but has no title above the text block. You can then use the Textblock to add a more detailed set of instruction on how the options are used in your theme. You would never use this in your themes template files as it does not save a value.', 'theme-text-domain'), 'std' => '', 'type' => 'textblock', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_textblock_titled', 'label' => __('Textblock Titled', 'theme-text-domain'), 'desc' => __('The Textblock Titled option type is used only on the Theme Option page. It will allow you to create & display HTML, and has a title above the text block. You can then use the Textblock Titled to add a more detailed set of instruction on how the options are used in your theme. You would never use this in your themes template files as it does not save a value.', 'theme-text-domain'), 'std' => '', 'type' => 'textblock-titled', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_typography', 'label' => __('Typography', 'theme-text-domain'), 'desc' => sprintf(__('The Typography option type is for adding typography styles to your theme either dynamically via the CSS option type above or manually with %s. The Typography option type has filters that allow you to remove fields or change the defaults. For example, you can filter %s to remove unwanted fields from all Background options or an individual one. You can also filter %s. These filters allow you to fine tune the select lists for your specific needs.', 'theme-text-domain'), '<code>ot_get_option()</code>', '<code>ot_recognized_typography_fields</code>', '<code>ot_recognized_font_families</code>, <code>ot_recognized_font_sizes</code>, <code>ot_recognized_font_styles</code>, <code>ot_recognized_font_variants</code>, <code>ot_recognized_font_weights</code>, <code>ot_recognized_letter_spacing</code>, <code>ot_recognized_line_heights</code>, <code>ot_recognized_text_decorations</code> ' . __('and', 'theme-text-domain') . ' <code>ot_recognized_text_transformations</code>'), 'std' => '', 'type' => 'typography', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_upload', 'label' => __('Upload', 'theme-text-domain'), 'desc' => sprintf(__('The Upload option type is used to upload any WordPress supported media. After uploading, users are required to press the "%s" button in order to populate the input with the URI of that media. There is one caveat of this feature. If you import the Opções do Tema and have uploaded media on one site the old URI will not reflect the URI of your new site. You will have to re-upload or %s any media to your new server and change the URIs if necessary.', 'theme-text-domain'), apply_filters('ot_upload_text', __('Send to OptionTree', 'theme-text-domain')), 'FTP'), 'std' => '', 'type' => 'upload', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'demo_upload_attachment_id', 'label' => __('Upload Attachment ID', 'theme-text-domain'), 'desc' => sprintf(__('The Upload option type can also be saved as an attachment ID by adding %s to the class attribute.', 'theme-text-domain'), '<code>ot-upload-attachment-id</code>'), 'std' => '', 'type' => 'upload', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'ot-upload-attachment-id', 'condition' => '', 'operator' => 'and')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
}
Example #3
0
/**
 * Build the custom settings & update OptionTree.
 *
 * @return    void
 * @since     2.3.0
 */
function custom_theme_options()
{
    /* OptionTree is not loaded yet */
    if (!function_exists('ot_settings_id')) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('content' => array(array('id' => 'option_types_help', 'title' => __('Option Types', 'themecountry'), 'content' => '<p>' . __('Help content goes here!', 'themecountry') . '</p>')), 'sidebar' => '<p>' . __('Sidebar content goes here!', 'themecountry') . '</p>'), 'sections' => array(array('id' => 'option_general', 'title' => __('General', 'themecountry')), array('id' => 'option_style', 'title' => __('Styles', 'themecountry')), array('id' => 'option_header', 'title' => __('Header', 'themecountry')), array('id' => 'option_footer', 'title' => __('Footer', 'themecountry')), array('id' => 'option_blog', 'title' => __('Home Page', 'themecountry')), array('id' => 'option_home_slider', 'title' => __('Feature Slider', 'themecountry')), array('id' => 'option_single', 'title' => __('Single Post', 'themecountry')), array('id' => 'option_sidebar', 'title' => __('Sidebar', 'themecountry')), array('id' => 'option_social_button', 'title' => __('Social Buttons', 'themecountry')), array('id' => 'option_typography', 'title' => __('Typography', 'themecountry')), array('id' => 'option_ad_mangment', 'title' => __('Ad Managment', 'themecountry')), array('id' => 'option_import_export', 'title' => __('Import/Export', 'themecountry'))), 'settings' => array(array('id' => 'responsive', 'label' => __('Responsiveness', 'themecountry'), 'desc' => __('Wimple pro is responsive witch mean that the layout is adapt to Mobile and table screen. Using This option to enable or disable responsiveness.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_general'), array('id' => 'header-code', 'label' => __('Header Code', 'themecountry'), 'desc' => __('If you have any code you want to appear between and , Pastes it here. For example: Google Web Master Cool Code or Pinterest Verify Code.', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_general', 'rows' => '3'), array('id' => 'tracking-code', 'label' => __('Footer Code (Tracing, JavaScript Code)', 'themecountry'), 'desc' => __('If you have tracking code (Google Analytic or other ), Pastes Your Code here which be inserted before the closing body tag of your theme.', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_general', 'rows' => '3'), array('id' => 'page-comments', 'label' => __('Comment on Page', 'themecountry'), 'desc' => __('Use this option to to enable or completely Hide Comment and Comment form on Page', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_general'), array('id' => 'back_to_top', 'label' => __('Back To Top Button', 'themecountry'), 'desc' => __('Use this option to hide or show "Back To Top" button.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_general'), array('id' => 'logo', 'label' => __('Custom Logo Image', 'themecountry'), 'desc' => __('Upload your custom logo image here.', 'themecountry'), 'type' => 'upload', 'section' => 'option_header'), array('id' => 'header_layout', 'label' => __('Header Layout', 'themecountry'), 'desc' => __('Use this option to Choose Header Design Style for your website.', 'themecountry'), 'std' => 'left', 'type' => 'radio-image', 'section' => 'option_header', 'class' => '', 'choices' => array(array('value' => 'left', 'label' => __('Header Content With Navigation', 'themecountry'), 'src' => get_template_directory_uri() . '/images/header-layout/header-menu.png'), array('value' => 'right', 'label' => __('Header Suppurate From Navigation', 'themecountry'), 'src' => get_template_directory_uri() . '/images/header-layout/menu-out-of-header.png'))), array('id' => 'fixed_menu', 'label' => __('Floating Navigation Menu', 'themecountry'), 'desc' => __('Use this option to enable Floating Navigation Menu.', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_header'), array('id' => 'footer-widgets', 'label' => __('Footer Widget Columns', 'themecountry'), 'desc' => __('Select Number of Columns for your Footer area or Disable it.', 'themecountry'), 'std' => '3', 'type' => 'radio-image', 'section' => 'option_footer', 'class' => '', 'choices' => array(array('value' => '0', 'label' => __('Disable', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/layout-off.png'), array('value' => '1', 'label' => __('1 Column', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/footer-widgets-1.png'), array('value' => '2', 'label' => __('2 Columns', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/footer-widgets-2.png'), array('value' => '3', 'label' => __('3 Columns', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/footer-widgets-3.png'))), array('id' => 'copyright', 'label' => __('Footer Copyright Text', 'themecountry'), 'desc' => __('Add Text you want to show in "Copyright Sction" at Bottom Left of your Website.', 'themecountry'), 'type' => 'textarea-simple', 'rows' => '3', 'section' => 'option_footer'), array('id' => 'post-text', 'label' => __('Home Page Entry Text', 'themecountry'), 'desc' => __('Use this option to show Expert or Full Content from your each post show on Homepage and Archive Page.', 'themecountry'), 'std' => 'excerpt', 'type' => 'radio', 'section' => 'option_blog', 'choices' => array(array('value' => 'excerpt', 'label' => __('Show Excerpt', 'themecountry')), array('value' => 'content', 'label' => __('Show Content', 'themecountry')))), array('id' => 'home-post-read-more', 'label' => __('Read More Button', 'themecountry'), 'desc' => __('Enable or Disable Read More Button on Homepage for Each Post.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_blog'), array('id' => 'excerpt-length', 'label' => 'Excerpt Length', 'desc' => __('Number of word as Expert Length To be Shown in Homepage when you choose to show entry text as Excerpt.', 'themecountry'), 'std' => '34', 'type' => 'numeric-slider', 'section' => 'option_blog', 'min_max_step' => '0,100,1'), array('id' => 'home-post-meta', 'label' => __('HomePage & Single Post Meta Info', 'themecountry'), 'desc' => __('Use this button to Show or Hide Post Meta Info on HomePage. (Author name, Date etc.).', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_blog'), array('id' => 'home-post-meta-show', 'label' => __('What To Hide in Meta Info', 'themecountry'), 'desc' => __('Choose What Meta Info to Hide.', 'themecountry'), 'type' => 'checkbox', 'section' => 'option_blog', 'choices' => array(array('value' => 'autho_name', 'label' => __('Author Name', 'themecountry')), array('value' => 'date', 'label' => __('Date', 'themecountry')), array('value' => 'category', 'label' => __('Category', 'themecountry')), array('value' => 'tag', 'label' => __('Tag', 'themecountry')), array('value' => 'comment_count', 'label' => __('Comment Count', 'themecountry')))), array('id' => 'pagination', 'label' => __('Pagination', 'themecountry', 'themecountry'), 'desc' => __('Choose your Preferred Pagination Style.', 'themecountry'), 'std' => 'default', 'type' => 'radio', 'section' => 'option_blog', 'choices' => array(array('value' => 'default', 'label' => __('Default (Older Posts/Newer Posts)', 'themecountry')), array('value' => 'numberal', 'label' => __('Numberal (1 2 3 ...)', 'themecountry')), array('value' => 'loading', 'label' => __('Load More...', 'themecountry')), array('value' => 'infinite', 'label' => __('Auto Infinite Scroll', 'themecountry')))), array('id' => 'enable-home-slider', 'label' => __('Featured Content Slider', 'themecountry'), 'desc' => __('use this option to enable or Disable Featured Content Slider.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_home_slider'), array('id' => 'number-of-post', 'label' => __('Number of Slides', 'themecountry'), 'desc' => __('Enter the number of Slides', 'themecountry'), 'std' => '5', 'type' => 'text', 'section' => 'option_home_slider'), array('id' => 'type-of-slider', 'label' => __('Use Categories Slider', 'themecountry'), 'desc' => __('Use Post from Category As Featured Content Sliders', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_home_slider'), array('id' => 'category-slide-option', 'label' => __('Choose Categories', 'themecountry'), 'desc' => '', 'std' => '', 'type' => 'category-checkbox', 'section' => 'option_home_slider', 'operator' => 'and'), array('id' => 'customize_slider_option', 'label' => __('Custom Sliders', 'themecountry'), 'desc' => __('With this option you can set up a Sliders with custom image and text instead of the default slidshow automatically generated from your posts.', 'themecountry'), 'std' => '', 'type' => 'list-item', 'section' => 'option_home_slider', 'operator' => 'and', 'settings' => array(array('id' => 'slide_image', 'label' => __('Image', 'themecountry'), 'desc' => __('Upload or select an image for this slide', 'themecountry'), 'type' => 'upload'), array('id' => 'slide_url', 'label' => __('Link', 'themecountry'), 'desc' => __('URL of the slide', 'themecountry'), 'std' => '#', 'type' => 'text', 'operator' => 'and'))), array('id' => 'author-bio', 'label' => __('Author Bio', 'themecountry'), 'desc' => __('Display Author Bio below each Post.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'author-highlight', 'label' => __('Highlight Author Comment', 'themecountry'), 'desc' => __('Use this Option to highlight author comments.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'breadcrumb', 'label' => __('Breadcrumbs', 'themecountry'), 'desc' => __('Use This Option to enable or Disable breadcrumbs.', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'yoast_breadcrumb', 'desc' => __('Check it if you install WordPress SEO by Yoast', 'themecountry'), 'type' => 'checkbox', 'section' => 'option_single', 'choices' => array(array('value' => 'yoast_breadcrumb_yes', 'label' => __('Use Yoast Breadcrumb', 'option-tree-theme')))), array('id' => 'post-nav', 'label' => __('Post Navigation', 'themecountry'), 'desc' => __('Shows links to the next and previous post', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'post-related', 'label' => __('Related Posts', 'themecountry'), 'desc' => __('Use This Option to enable or Disable related Posts below your Post.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'related-posts-taxonomy', 'label' => __('Related Posts Taxonomy', 'themecountry'), 'desc' => __('Choose the Way Related Post Work.', 'themecountry'), 'std' => 'tag', 'type' => 'radio', 'section' => 'option_single', 'choices' => array(array('value' => 'tag', 'label' => 'Tags'), array('value' => 'category', 'label' => 'Categories'))), array('id' => 'number-related', 'std' => '3', 'label' => __('Number Related Posts', 'themecountry'), 'desc' => __('Enter the number of posts to show in the related posts section.', 'themecountry'), 'type' => 'text', 'section' => 'option_single'), array('id' => 'display-related-posts', 'label' => __('Display Related Posts', 'themecountry'), 'desc' => __('Related Posts type to display.'), 'std' => 'thumbnail', 'type' => 'radio', 'section' => 'option_single', 'choices' => array(array('value' => 'thumbnail', 'label' => __('Thumbnail and Title', 'themecountry')), array('value' => 'list', 'label' => __('Only Tittle, In List style.', 'themecountry')))), array('id' => 'pinterest', 'label' => __('Pinterest Pin In Button', 'themecountry'), 'desc' => __('Use This Option to enable or Disable Pinterest "Pin In" button which will be shown when visitor add mouse hover images in your post.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'sidebar-areas', 'label' => __('Create Sidebars', 'themecountry'), 'desc' => __('Create Custom Sidebars Here if you want to Have Different Sidebar for Homepage and Single Post and So on.', 'themecountry'), 'type' => 'list-item', 'section' => 'option_sidebar', 'choices' => array(), 'settings' => array(array('id' => 'id', 'label' => __('Sidebar ID', 'themecountry'), 'desc' => __('This ID must be unique, for example "sidebar-about"', 'themecountry'), 'std' => 'sidebar-select', 'type' => 'text', 'choices' => array()))), array('id' => 's1-home', 'label' => __('Home', 'themecountry'), 'desc' => __('Choose Sidebar to Show On Hompage.', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-single', 'label' => __('Single', 'themecountry'), 'desc' => __('Choose Sidebar to Show On Single Post.', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-archive', 'label' => __('Archive (Date Based)', 'themecountry'), 'desc' => __('Choose Sidebar to Show On Archive Page (Date Based Archive)', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-archive-category', 'label' => __('Archive Category', 'themecountry'), 'desc' => __('Choose Sidebar to Show On Category Page.', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-search', 'label' => __('Search', 'themecountry'), 'desc' => __('Choose Sidebar to Show On Search Page', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-404', 'label' => __('Error 404', 'themecountry'), 'desc' => __('Choose Sidebar to Show On "Error 404, Page Not Found" Page.', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-page', 'label' => __('Page', 'themecountry'), 'desc' => __('Choose Sidebar to Show On "Page".', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 'tc-google-typography', 'label' => '', 'desc' => '', 'type' => 'typography-google', 'section' => 'option_typography'), array('id' => 'social-button-enable', 'label' => __('Social Sharing Button', 'themecountry'), 'desc' => __('Use This Option to Show Social Sharing Button.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'twitter-username', 'label' => __('Twitter Username', 'themecountry'), 'desc' => __('Your @username will be added to share-tweets of your posts (optional)', 'themecountry'), 'type' => 'text', 'section' => 'option_social_button'), array('id' => 'social-sharing-pos', 'label' => __('Social Sharing Buttons Position', 'themecountry'), 'desc' => __('Choose position for Social Sharing Buttons.', 'themecountry'), 'type' => 'checkbox', 'section' => 'option_social_button', 'std' => 'top', 'choices' => array(array('value' => 'top', 'label' => __('After Title', 'themecountry')), array('value' => 'bottom', 'label' => __('After Post', 'themecountry')), array('value' => 'float', 'label' => __('Float Social To Left', 'themecountry')))), array('id' => 'social-twitter', 'label' => __('Twitter', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'social-facebook', 'label' => __('Facebook', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'social-google-plus', 'label' => __('Google Plus', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'social-linkedin', 'label' => __('Linkedin', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'social-pinterest', 'label' => __('Pinterest', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'ad-header-banner', 'label' => __('Header Banner Ads', 'themecountry'), 'desc' => __('Paste Your Ads Code Here ( Adsense, Buy Sell Ads ). It will be shown on the top of Header ( Note: This Ads won`t be shown If you choose the 1st design in Header Option )', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_ad_mangment', 'rows' => '3'), array('id' => 'ad-after-post-title', 'label' => __('Below Post Title', 'themecountry'), 'desc' => __('Paste Your Ads Code Here ( Adsense, Buy Sell Ads ). It will be shown Below Each Post title.', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_ad_mangment', 'rows' => '3'), array('id' => 'top-ads-position', 'label' => '', 'desc' => __('Choose Alignment Of your Ads.', 'themecountry'), 'type' => 'select', 'section' => 'option_ad_mangment', 'choices' => array(array('value' => 'ad-none', 'label' => __('None', 'themecountry')), array('value' => 'ad-left', 'label' => __('Left', 'themecountry')), array('value' => 'ad-center', 'label' => __('Center', 'themecountry')), array('value' => 'ad-right', 'label' => __('Right', 'themecountry')))), array('id' => 'ad-middle-post', 'label' => __('Middle Post Content', 'themecountry'), 'desc' => __('Paste Your Ads Code Here ( Adsense, Buy Sell Ads ). It will be shown right middle of your post.', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_ad_mangment', 'rows' => '3'), array('id' => 'middle-ads-position', 'label' => '', 'desc' => __('Choose Alignment Of your Ads.', 'themecountry'), 'type' => 'select', 'section' => 'option_ad_mangment', 'choices' => array(array('value' => 'ad-none', 'label' => __('None', 'themecountry')), array('value' => 'ad-left', 'label' => __('Left', 'themecountry')), array('value' => 'ad-center', 'label' => __('Center', 'themecountry')), array('value' => 'ad-right', 'label' => __('Right', 'themecountry')))), array('id' => 'ad-below-post', 'label' => __('Below Post content', 'themecountry'), 'desc' => __('Paste Your Ads Code Here ( Adsense, Buy Sell Ads ). It will be shown Below Each Post.', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_ad_mangment', 'rows' => '3'), array('id' => 'below-ads-position', 'label' => '', 'desc' => __('Choose Alignment Of your Ads.', 'themecountry'), 'type' => 'select', 'section' => 'option_ad_mangment', 'choices' => array(array('value' => 'ad-none', 'label' => __('None', 'themecountry')), array('value' => 'ad-left', 'label' => __('Left', 'themecountry')), array('value' => 'ad-center', 'label' => __('Center', 'themecountry')), array('value' => 'ad-right', 'label' => __('Right', 'themecountry')))), array('id' => 'duration-ads-top', 'label' => __('Ads and Post Age', 'themecountry'), 'desc' => __('Only Show Ads on Post Which is Older than number of days you choose.', 'themecountry'), 'type' => 'numeric-slider', 'std' => '100', 'section' => 'option_ad_mangment'), array('id' => 'layout-width-sidebar', 'label' => __('Layout', 'themecountry'), 'desc' => __('Choose To Show Sidebar On Left Or Right or No-Sidebar', 'themecountry'), 'std' => 'right', 'type' => 'radio-image', 'section' => 'option_style', 'class' => '', 'choices' => array(array('value' => 'left', 'label' => __('Sidebare Left', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/col-2cr.png'), array('value' => 'right', 'label' => __('Sidebar Right', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/col-2cl.png'), array('value' => 'no-sidebar', 'label' => __('No Sidebar', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/col-1cl.png'))), array('id' => 'on-off-option-style', 'label' => __('Custom Header Color', 'themecountry'), 'desc' => __('Enable Custom Header Color Setting Or Use Our Ready Made Color Scheme.', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_style'), array('id' => 'header_style', 'label' => __('Ready Made Header Color Scheme', 'themecountry'), 'desc' => __('Choose Color You Like.', 'themecountry'), 'std' => 'default', 'type' => 'radio-image', 'section' => 'option_style', 'class' => '', 'choices' => array(array('value' => 'default', 'label' => '', 'src' => get_template_directory_uri() . '/images/default.jpg'), array('value' => 'green-sea', 'label' => '', 'src' => get_template_directory_uri() . '/images/green-sea.jpg'), array('value' => 'belize-hole', 'label' => '', 'src' => get_template_directory_uri() . '/images/belize-hole.jpg'), array('value' => 'wisteria', 'label' => '', 'src' => get_template_directory_uri() . '/images/wisteria.jpg'), array('value' => 'midnight-blue', 'label' => '', 'src' => get_template_directory_uri() . '/images/midnight-blue.jpg'), array('value' => 'orange', 'label' => '', 'src' => get_template_directory_uri() . '/images/orange.jpg'), array('value' => 'pumkin', 'label' => '', 'src' => get_template_directory_uri() . '/images/pumkin.jpg'), array('value' => 'asbestos', 'label' => '', 'src' => get_template_directory_uri() . '/images/asbestos.jpg'), array('value' => 'pomegranate', 'label' => '', 'src' => get_template_directory_uri() . '/images/pomegranate.jpg'))), array('id' => 'primary_header_color', 'label' => __('Custom Primary Header Color', 'themecountry'), 'desc' => __('Pick the primary header color.', 'themecountry'), 'type' => 'colorpicker', 'std' => '', 'section' => 'option_style', 'operator' => 'and'), array('id' => 'secondary_header_color', 'label' => __('Custom Secondary Header Color', 'themecountry'), 'desc' => __('Pick the secondary header color.', 'themecountry'), 'type' => 'colorpicker', 'std' => '', 'section' => 'option_style', 'operator' => 'and'), array('id' => 'custom_style', 'label' => __('Custom CSS', 'themecountry'), 'desc' => __('Add you CSS Custom Code here. (Only For Advance User)', 'themecountry'), 'type' => 'css', 'section' => 'option_style', 'rows' => '3'), array('id' => 'text_desscription_import_export', 'desc' => sprintf(__('<b>Click link to <a href="%s">Import/Export</a></b>', 'themecountry'), admin_url('themes.php?page=tc-theme-backup')), 'std' => '', 'type' => 'textblock', 'section' => 'option_import_export')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
}
Example #4
0
/**
 * Build the custom settings & update OptionTree.
 *
 * @return    void
 * @since     2.0
 */
function custom_theme_options()
{
    /* OptionTree is not loaded yet, or this is not an admin request */
    if (!function_exists('ot_settings_id') || !is_admin()) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('content' => array(array('id' => 'general_help', 'title' => __('Author Homepage', 'ubpress'), 'content' => '<p>' . __('Please visit: <a href="http://www.uyenbac.net" target="_blank">UBTeam Homepage</a>', 'ubpress') . '</p>'), array('id' => 'about_help', 'title' => __('About UBTeam', 'ubpress'), 'content' => '<p>' . __('With UBTeam, We are one! This is our slogan. UBTeam was established in 2014 with many large and small projects to date. We hope to contribute to the development community growing internet Vietnam. Thank you!', 'ubpress') . '</p>')), 'sidebar' => '<p>' . __('You are welcome :)', 'ubpress') . '</p>'), 'sections' => array(array('id' => 'general', 'title' => __('Generelt', 'ubpress')), array('id' => 'footer', 'title' => __('Fødder', 'ubpress'))), 'settings' => array(array('id' => 'about-us', 'label' => __('Om os', 'ubpress'), 'desc' => __('Mere introducere os her', 'ubpress'), 'std' => '', 'type' => 'textarea', 'section' => 'general', 'rows' => '15', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'slider-list', 'label' => __('Slider liste', 'ubpress'), 'desc' => __('Lav en liste over skyderen til hjemmesiden her.', 'ubpress'), 'std' => '', 'type' => 'list-item', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'settings' => array(array('id' => 'slider-image', 'label' => __('Billede Upload', 'ubpress'), 'desc' => __('Billede Upload til skyderen på her.', 'ubpress'), 'std' => '', 'type' => 'upload', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'))), array('id' => 'copyright-footer', 'label' => __('Ophavsret', 'ubpress'), 'desc' => __('Skrevet under webstedet ophavsret her', 'ubpress'), 'std' => '', 'type' => 'textarea', 'section' => 'footer', 'rows' => '15', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'resume', 'label' => __('Resumé', 'ubpress'), 'desc' => __('Skrivning resuméer fødder hjemmeside her', 'ubpress'), 'std' => '', 'type' => 'textarea-simple', 'section' => 'footer', 'rows' => '10', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
}
Example #5
0
/**
 * Build the custom settings & update OptionTree.
 */
function custom_theme_options()
{
    /* OptionTree is not loaded yet, or this is not an admin request */
    if (!function_exists('ot_settings_id') || !is_admin()) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('sidebar' => ''), 'sections' => array(array('id' => 'general', 'title' => __('General', 'mega')), array('id' => 'typography', 'title' => __('Typography', 'mega')), array('id' => 'header', 'title' => __('Header', 'mega')), array('id' => 'footer', 'title' => __('Footer', 'mega')), array('id' => 'blog_settings', 'title' => __('Blog Settings', 'mega')), array('id' => 'portfolio_settings', 'title' => __('Portfolio Settings', 'mega')), array('id' => 'social', 'title' => __('Social Accounts', 'mega')), array('id' => 'woocommerce', 'title' => __('WooCommerce', 'mega'))), 'settings' => array(array('id' => 'logo', 'label' => __('Logo', 'mega'), 'desc' => __('Upload a logo for your site.', 'mega'), 'std' => '', 'type' => 'upload', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'logo_light', 'label' => __('Logo Light', 'mega'), 'desc' => __('Upload a light logo for your site.', 'mega'), 'std' => '', 'type' => 'upload', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'logo_retina', 'label' => __('Logo (Retina Version @2x)', 'mega'), 'desc' => __('Upload Retina-Ready (HiDPI) logo for your site.', 'mega'), 'std' => '', 'type' => 'upload', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'logo_retina_light', 'label' => __('Logo Light (Retina Version @2x)', 'mega'), 'desc' => __('Upload Retina-Ready (HiDPI) light logo for your site.', 'mega'), 'std' => '', 'type' => 'upload', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'logo_retina_width', 'label' => __('Width for Retina-Ready (HiDPI) Logo', 'mega'), 'desc' => __('Enter the standard logo (1x) version width, do not enter the Retina-Ready (HiDPI) logo width.', 'mega'), 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'logo_retina_height', 'label' => __('Height for Retina-Ready (HiDPI) Logo', 'mega'), 'desc' => __('Enter the standard logo (1x) version height, do not enter the Retina-Ready (HiDPI) logo height.', 'mega'), 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'favicon', 'label' => __('Favicon', 'mega'), 'desc' => __('Upload a favicon for your site.', 'mega'), 'std' => '', 'type' => 'upload', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'primary_color', 'label' => __('Primary Color', 'mega'), 'desc' => __('Choose a primary color for your site. Default value is #f39c12.', 'mega'), 'std' => '#f39c12', 'type' => 'colorpicker', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'background_overlay_color_for_heading', 'label' => __('Background Overlay Color for Heading', 'mega'), 'desc' => __('Choose a background overlay color for heading for your site. Default value is #ffffff.', 'mega'), 'std' => '#ffffff', 'type' => 'colorpicker', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'background_overlay_opacity_for_heading', 'label' => __('Background Overlay Opacity for Heading', 'mega'), 'desc' => __('Enter a value from .1 to 1 for background overlay opacity for heading. Default value is .1.', 'mega'), 'std' => '.1', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'color_for_heading', 'label' => __('Color for Heading', 'mega'), 'desc' => __('Choose a color for heading for your site. Default value is #444444.', 'mega'), 'std' => '#444444', 'type' => 'colorpicker', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'enable_full_width_for_header_and_footer', 'label' => __('Enable Full Width for Header and Footer?', 'mega'), 'desc' => __('Enable full width for header and footer?', 'mega'), 'std' => '', 'type' => 'checkbox', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'yes', 'label' => __('Enable Full Width for Header and Footer?', 'mega'), 'src' => ''))), array('id' => 'disable_right_click', 'label' => __('Disable Right Click for images?', 'mega'), 'desc' => __('Disables right click for images', 'mega'), 'std' => '', 'type' => 'checkbox', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'yes', 'label' => __('Disable Right Click?', 'mega'), 'src' => ''))), array('id' => 'page_load_progress_bar', 'label' => __('Use Page Load Progress Bar', 'mega'), 'desc' => __('Use page load progress bar?', 'mega'), 'std' => '', 'type' => 'checkbox', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'yes', 'label' => __('Use page load progress bar?', 'mega'), 'src' => ''))), array('id' => 'primary_typography', 'label' => __('Primary Typography', 'mega'), 'desc' => __('The Primary Typography option type is for adding typographic styles to your site. The most important one though is Google Fonts to create custom font stacks.', 'mega'), 'std' => '', 'type' => 'typography', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'google_font_family', 'label' => __('Google Web Font Code for Primary Typography', 'mega'), 'desc' => __('<p class="warning">Paste Google Web Font link to your website.</p><p><b>Read more:</b> <a href="http://www.google.com/webfonts" target="_blank"><code>http://www.google.com/webfonts</code></a></p> </b><p><b>Example:</b> <code>http://fonts.googleapis.com/css?family=Ubuntu:300,400,700</code></p>', 'mega'), 'std' => 'http://fonts.googleapis.com/css?family=Ubuntu:300,400,700', 'type' => 'text', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'google_font_name', 'label' => __('Google Web Font Name for Primary Typography', 'mega'), 'desc' => __('<p>Enter the Google Web Font name for primary typography.</p>
<p><b>Example:</b> <code>Ubuntu</code></p>', 'mega'), 'std' => 'Ubuntu', 'type' => 'text', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'menu_typography', 'label' => __('Menu Typography', 'mega'), 'desc' => __('The Menu Typography option type is for adding typographic styles for menu to your site. The most important one though is Google Fonts to create custom font stacks.', 'mega'), 'std' => 'Lato', 'type' => 'typography', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'menu_google_font_family', 'label' => __('Google Web Font Code for Menu Typography', 'mega'), 'desc' => __('<p class="warning">Paste Google Web Font link for menu to your website.</p><p><b>Read more:</b> <a href="http://www.google.com/webfonts" target="_blank"><code>http://www.google.com/webfonts</code></a></p> </b><p><b>Example:</b> <code>http://fonts.googleapis.com/css?family=Ubuntu:300,400,700</code></p>', 'mega'), 'std' => '', 'type' => 'text', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'menu_google_font_name', 'label' => __('Google Web Font Name for Menu Typography', 'mega'), 'desc' => __('<p>Enter the Google Web Font name for menu typography.</p>
<p><b>Example:</b> <code>Montserrat</code></p>', 'mega'), 'std' => 'Montserrat', 'type' => 'text', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'menu_font_size', 'label' => __('Menu Font Size', 'mega'), 'desc' => __('Choose a value for menu font size in pixels. Default value is 16.', 'mega'), 'std' => '16', 'type' => 'numeric-slider', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'header_typography', 'label' => __('Header Typography', 'mega'), 'desc' => __('The Header Typography option type is for adding typographic styles for headers to your site. The most important one though is Google Fonts to create custom font stacks.', 'mega'), 'std' => '', 'type' => 'typography', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'header_google_font_family', 'label' => __('Google Web Font Code for Header Typography', 'mega'), 'desc' => __('<p class="warning">Paste Google Web Font link for headings to your website.</p><p><b>Read more:</b> <a href="http://www.google.com/webfonts" target="_blank"><code>http://www.google.com/webfonts</code></a></p> </b><p><b>Example:</b> <code>http://fonts.googleapis.com/css?family=Montserrat:400,700</code></p>', 'mega'), 'std' => 'http://fonts.googleapis.com/css?family=Montserrat:400,700', 'type' => 'text', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'header_google_font_name', 'label' => __('Google Web Font Name for Header Typography', 'mega'), 'desc' => __('<p>Enter the Google Web Font name for header typography.</p>
<p><b>Example:</b> <code>Montserrat</code></p>', 'mega'), 'std' => 'Montserrat', 'type' => 'text', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'left_menu', 'label' => __('Enable Left Menu?', 'mega'), 'desc' => __('Enable Left Menu?', 'mega'), 'std' => '', 'type' => 'checkbox', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'yes', 'label' => __('Enable Left Menu?', 'mega'), 'src' => ''))), array('id' => 'header_style', 'label' => __('Header Style', 'mega'), 'desc' => __('Choose a style for header of your site.', 'mega'), 'std' => '', 'type' => 'select', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'fixed', 'label' => __('Fixed', 'mega'), 'src' => ''), array('value' => 'non_fixed', 'label' => __('Non-Fixed', 'mega'), 'src' => ''))), array('id' => 'remove_header_height_reduction', 'label' => __('Remove header height reduction on scrolling?', 'mega'), 'desc' => __('Remove header height reduction on scrolling? Note: Fixed Header Style must be enabled.', 'mega'), 'std' => '', 'type' => 'checkbox', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'yes', 'label' => __('Remove header height reduction on scrolling?', 'mega'), 'src' => ''))), array('id' => 'enable_full_width_menu', 'label' => __('Enable Full Width Menu?', 'mega'), 'desc' => __('Enable Full Width Menu?', 'mega'), 'std' => '', 'type' => 'checkbox', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'yes', 'label' => __('Enable Full Width Menu?', 'mega'), 'src' => ''))), array('id' => 'social_icons_position', 'label' => __('Social Icons Position', 'mega'), 'desc' => __('Choose a social icons position for header of your site.', 'mega'), 'std' => '', 'type' => 'select', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'none', 'label' => __('None', 'mega'), 'src' => ''), array('value' => 'top_bar', 'label' => __('Top Bar', 'mega'), 'src' => ''), array('value' => 'header', 'label' => __('Header', 'mega'), 'src' => ''))), array('id' => 'search_icon_margin', 'label' => __('Search Icon, Social Icons and  Header Info Margin for Header', 'mega'), 'desc' => __('Choose a value for search icon, social icons and header info margin for header in pixels. Default margin is 48.', 'mega'), 'std' => '48', 'type' => 'numeric-slider', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'logo_margin', 'label' => __('Logo Margin', 'mega'), 'desc' => __('Choose a value for logo margin in pixels. Default width is 46.', 'mega'), 'std' => '46', 'type' => 'numeric-slider', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'search_header_position', 'label' => __('Search Position', 'mega'), 'desc' => __('Choose a search position for header of your site.', 'mega'), 'std' => '', 'type' => 'select', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'none', 'label' => __('None', 'mega'), 'src' => ''), array('value' => 'top_bar', 'label' => __('Top Bar', 'mega'), 'src' => ''), array('value' => 'header', 'label' => __('Header', 'mega'), 'src' => ''))), array('id' => 'header_info', 'label' => __('Header Info', 'mega'), 'desc' => __('Enter the info you would like to display in header of your site.', 'mega'), 'std' => '', 'type' => 'textarea', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'woocommerce_cart_position', 'label' => __('WooCommerce Cart Position', 'mega'), 'desc' => __('Choose a WooCommerce cart position for header of your site.', 'mega'), 'std' => '', 'type' => 'select', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'none', 'label' => __('None', 'mega'), 'src' => ''), array('value' => 'top_bar', 'label' => __('Top Bar', 'mega'), 'src' => ''), array('value' => 'header', 'label' => __('Header', 'mega'), 'src' => ''))), array('id' => 'enable_wpml_language_switcher', 'label' => __('Enable WPML Language switcher', 'mega'), 'desc' => __('Enable WPML Language switcher. Note: WPML (<a href="http://wpml.org/" target="_blank">http://wpml.org/</a>) plugin must be installed.', 'mega'), 'std' => '', 'type' => 'checkbox', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'yes', 'label' => __('Enable WPML Language switcher', 'mega'), 'src' => ''))), array('id' => 'header_background_color', 'label' => __('Header Background Color', 'mega'), 'desc' => __('Choose a value for header background color. Default value is #ffffff.', 'mega'), 'std' => '#ffffff', 'type' => 'colorpicker', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'navigation_link_color', 'label' => __('Navigation Link Color', 'mega'), 'desc' => __('Choose a value for navigation link color. Default value is #444444.', 'mega'), 'std' => '#444444', 'type' => 'colorpicker', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'navigation_link_color_hover', 'label' => __('Navigation Link Color - Hover/Active', 'mega'), 'desc' => __('Choose a value for navigation link color - hover/active. Default value is #444444.', 'mega'), 'std' => '#444444', 'type' => 'colorpicker', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'header_text_color', 'label' => __('Header Text Color', 'mega'), 'desc' => __('Choose a value for header text color. Default value is #444444.', 'mega'), 'std' => '#444444', 'type' => 'colorpicker', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'header_link_color_hover', 'label' => __('Header Link Color - Hover/Active', 'mega'), 'desc' => __('Choose a value for header link color - hover/active. Default value is #444444.', 'mega'), 'std' => '#444444', 'type' => 'colorpicker', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'border_between_top_bar_and_header_color', 'label' => __('Border Between Top Bar and Header Color', 'mega'), 'desc' => __('Choose a value for border between Top Bar and header color. Default value is #ffffff.', 'mega'), 'std' => '#ffffff', 'type' => 'colorpicker', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'header_top_border_width', 'label' => __('Header Top Border Width', 'mega'), 'desc' => __('Choose a value for header top border width in pixels. Default width is 1.', 'mega'), 'std' => '1', 'type' => 'numeric-slider', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'header_bottom_border_color', 'label' => __('Header Bottom Border Color', 'mega'), 'desc' => __('Choose a value for header bottom border color. Default value is #ffffff.', 'mega'), 'std' => '#ffffff', 'type' => 'colorpicker', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'menu_position', 'label' => __('Menu Position', 'mega'), 'desc' => __('Choose a menu position for header of your site.', 'mega'), 'std' => '', 'type' => 'select', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'left', 'label' => __('Left', 'mega'), 'src' => ''), array('value' => 'right', 'label' => __('Right', 'mega'), 'src' => ''), array('value' => 'center', 'label' => __('Center', 'mega'), 'src' => ''))), array('id' => 'menu_text_transform', 'label' => __('Menu Text Transform', 'mega'), 'desc' => __('Choose a menu text transform for header of your site.', 'mega'), 'std' => '', 'type' => 'select', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'none', 'label' => __('None', 'mega'), 'src' => ''), array('value' => 'uppercase', 'label' => __('Uppercase', 'mega'), 'src' => ''))), array('id' => 'center_logo_and_menu', 'label' => __('Center Logo and Menu?', 'mega'), 'desc' => __('Center logo and menu?', 'mega'), 'std' => '', 'type' => 'checkbox', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'yes', 'label' => __('Center Logo and Menu?', 'mega'), 'src' => ''))), array('id' => 'enable_borders_top_and_bottom_for_menu', 'label' => __('Enable Borders Top and Bottom for Menu?', 'mega'), 'desc' => __('Enable borders top and bottom for menu?', 'mega'), 'std' => '', 'type' => 'checkbox', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'yes', 'label' => __('Enable Borders Top and Bottom for Menu?', 'mega'), 'src' => ''))), array('id' => 'borders_top_and_bottom_for_menu_color', 'label' => __('Borders Top and Bottom for Menu Color', 'mega'), 'desc' => __('Choose a value for borders top and bottom for menu color. Default value is #f5f5f5.', 'mega'), 'std' => '#f5f5f5', 'type' => 'colorpicker', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'enable_top_bar', 'label' => __('Enable Top Bar', 'mega'), 'desc' => __('Enable top bar or not?', 'mega'), 'std' => '', 'type' => 'checkbox', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'yes', 'label' => __('Enable Top Bar', 'mega'), 'src' => ''))), array('id' => 'top_bar_info', 'label' => __('Top Bar Info', 'mega'), 'desc' => __('Enter the info you would like to display in top bar of your site.', 'mega'), 'std' => '', 'type' => 'textarea', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'top_bar_background_color', 'label' => __('Top Bar Background Color', 'mega'), 'desc' => __('Choose a value for top bar background color. Default value is #444444.', 'mega'), 'std' => '#444444', 'type' => 'colorpicker', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'top_bar_text_color', 'label' => __('Top Bar Text Color', 'mega'), 'desc' => __('Choose a value for top bar text color. Default value is #ffffff.', 'mega'), 'std' => '#ffffff', 'type' => 'colorpicker', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'top_bar_link_color', 'label' => __('Top Bar Link Color', 'mega'), 'desc' => __('Choose a value for top bar link color. Default value is #f39c12.', 'mega'), 'std' => '#f39c12', 'type' => 'colorpicker', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'top_bar_link_color_hover', 'label' => __('Top Bar Link Color - Hover/Active', 'mega'), 'desc' => __('Choose a value for top bar link color - hover/active. Default value is #ffffff.', 'mega'), 'std' => '#ffffff', 'type' => 'colorpicker', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'top_bar_social_icons_color', 'label' => __('Top Bar Social Icons Color', 'mega'), 'desc' => __('Choose a value for social icons color. Default value is #ffffff.', 'mega'), 'std' => '#ffffff', 'type' => 'colorpicker', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'enable_social_icons', 'label' => __('Enable Social Icons?', 'mega'), 'desc' => __('Enable social icons?', 'mega'), 'std' => '', 'type' => 'checkbox', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'yes', 'label' => __('Enable social icons?', 'mega'), 'src' => ''))), array('id' => 'footer_social_icons_position', 'label' => __('Footer Social Icons Position', 'mega'), 'desc' => __('Choose a social icons position for footer of your site.', 'mega'), 'std' => '', 'type' => 'select', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'right', 'label' => __('Right', 'mega'), 'src' => ''), array('value' => 'left', 'label' => __('Left', 'mega'), 'src' => ''), array('value' => 'center', 'label' => __('Center', 'mega'), 'src' => ''))), array('id' => 'footer_info', 'label' => __('Footer Info', 'mega'), 'desc' => __('Enter the info you would like to display in the footer of your site.', 'mega'), 'std' => '© Basis Construction Business WordPress Theme', 'type' => 'textarea', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_info_and_footer_social_icons_level', 'label' => __('Footer Info and Footer Social Icons Level', 'mega'), 'desc' => __('Choose a footer info and footer social icons level.', 'mega'), 'std' => '', 'type' => 'select', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'different_levels', 'label' => __('Different levels', 'mega'), 'src' => ''), array('value' => 'single_level', 'label' => __('Single level', 'mega'), 'src' => ''))), array('id' => 'back_to_top_button', 'label' => __('Disable Back To Top Button?', 'mega'), 'desc' => __('Disable Back To Top Button?', 'mega'), 'std' => '', 'type' => 'select', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'enable', 'label' => __('Enable', 'mega'), 'src' => ''), array('value' => 'disable', 'label' => __('Disable', 'mega'), 'src' => ''))), array('id' => 'back_to_top_button_color', 'label' => __('Back To Top Button Color', 'mega'), 'desc' => __('Choose a value for back to top button color. Default value is #ffffff.', 'mega'), 'std' => '#ffffff', 'type' => 'colorpicker', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'back_to_top_button_color_hover', 'label' => __('Back To Top Button Color - Hover/Active', 'mega'), 'desc' => __('Choose a value for back to top button color - hover/active. Default value is #f39c12.', 'mega'), 'std' => '#f39c12', 'type' => 'colorpicker', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_background_color', 'label' => __('Footer Background Color', 'mega'), 'desc' => __('Choose a value for footer background color. Default value is #444444.', 'mega'), 'std' => '#444444', 'type' => 'colorpicker', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_top_border_color', 'label' => __('Footer Top Border Color', 'mega'), 'desc' => __('Choose a value for footer top border color. Default value is #444444.', 'mega'), 'std' => '#444444', 'type' => 'colorpicker', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_widget_title_color', 'label' => __('Footer Widget Title Color', 'mega'), 'desc' => __('Choose a value for footer widget title color in pixels. Default value is #ffffff.', 'mega'), 'std' => '#ffffff', 'type' => 'colorpicker', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_text_color', 'label' => __('Footer Text Color', 'mega'), 'desc' => __('Choose a value for footer text color. Default value is #ffffff.', 'mega'), 'std' => '#ffffff', 'type' => 'colorpicker', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_link_color', 'label' => __('Footer Link Color', 'mega'), 'desc' => __('Choose a value for footer link color. Default value is #ffffff.', 'mega'), 'std' => '#ffffff', 'type' => 'colorpicker', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_link_color_hover', 'label' => __('Footer Link Color - Hover/Active', 'mega'), 'desc' => __('Choose a value for footer link color - hover/active. Default value is #f39c12.', 'mega'), 'std' => '#f39c12', 'type' => 'colorpicker', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'border_between_footer_and_footer_bottom_area_color', 'label' => __('Border Between Footer and Footer Bottom Area Color', 'mega'), 'desc' => __('Choose a value for border between footer and footer bottom area color. Default value is #222222.', 'mega'), 'std' => '#222222', 'type' => 'colorpicker', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_bottom_area_background_color', 'label' => __('Footer Bottom Area Background Color', 'mega'), 'desc' => __('Choose a value for footer bottom area background color. Default value is #222222.', 'mega'), 'std' => '#222222', 'type' => 'colorpicker', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_bottom_area_link_color', 'label' => __('Footer Bottom Area Link Color', 'mega'), 'desc' => __('Choose a value for footer bottom area link color. Default value is #cccccc.', 'mega'), 'std' => '#cccccc', 'type' => 'colorpicker', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_bottom_area_link_color_hover', 'label' => __('Footer Bottom Area Link Color - Hover/Active', 'mega'), 'desc' => __('Choose a value for footer bottom area link color - hover/active. Default value is #f39c12.', 'mega'), 'std' => '#f39c12', 'type' => 'colorpicker', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_bottom_area_text_color', 'label' => __('Footer Bottom Area Text Color', 'mega'), 'desc' => __('Choose a value for footer bottom area text color. Default value is #cccccc.', 'mega'), 'std' => '#cccccc', 'type' => 'colorpicker', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'blog_heading', 'label' => __('Blog Heading', 'mega'), 'desc' => __('Enable or disable blog heading?', 'mega'), 'std' => '', 'type' => 'select', 'section' => 'blog_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'enable', 'label' => __('Enable', 'mega'), 'src' => ''), array('value' => 'disable', 'label' => __('Disable', 'mega'), 'src' => ''))), array('id' => 'header_background_for_blog', 'label' => __('Header Background for Blog', 'mega'), 'desc' => __('Upload header background for blog.', 'mega'), 'std' => '', 'type' => 'upload', 'section' => 'blog_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'parallax_header_background_for_blog', 'label' => __('Enable Parallax for Blog Header Background?', 'mega'), 'desc' => __('Enable Parallax for Blog Header Background?', 'mega'), 'std' => '', 'type' => 'checkbox', 'section' => 'blog_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'yes', 'label' => __('Enable Parallax for Blog Header Background?', 'mega'), 'src' => ''))), array('id' => 'enable_transparent_header_background_for_blog', 'label' => __('Enable Transparent Header Background for Blog?', 'mega'), 'desc' => __('Enable transparent header background for blog?', 'mega'), 'std' => '', 'type' => 'checkbox', 'section' => 'blog_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'yes', 'label' => __('Enable Transparent Header Background for Blog?', 'mega'), 'src' => ''))), array('id' => 'blog_header_margin', 'label' => __('Blog Header Margin', 'mega'), 'desc' => __('Choose a value for blog header margin in pixels. Default margin is 130.', 'mega'), 'std' => '130', 'type' => 'numeric-slider', 'section' => 'blog_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '0,500,1', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'blog_title_on_single_blog_post_pages', 'label' => __('Enter Blog Title on Single Blog Post Pages', 'mega'), 'desc' => __('Enter Blog Title on Single Blog Post Pages', 'mega'), 'std' => 'Blog', 'type' => 'text', 'section' => 'blog_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'remove_sidebar_and_center_posts', 'label' => __('Remove Sidebar and Center Posts? W.P.L.O.C.K.E.R..C.O.M', 'mega'), 'desc' => __('Remove sidebar and center posts?', 'mega'), 'std' => '', 'type' => 'checkbox', 'section' => 'blog_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'yes', 'label' => __('Remove Sidebar and Center Posts?', 'mega'), 'src' => ''))), array('id' => 'portfolio_page', 'label' => __('Portfolio Page', 'mega'), 'desc' => __('Select the portfolio page. Used for the "Back to the Projects" link.', 'mega'), 'std' => '', 'type' => 'page-select', 'section' => 'portfolio_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'remove_single_portfolio_heading', 'label' => __('Remove Single Portfolio Heading', 'mega'), 'desc' => __('Remove single portfolio heading?', 'mega'), 'std' => '', 'type' => 'select', 'section' => 'portfolio_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'disable', 'label' => __('Remove', 'mega'), 'src' => ''), array('value' => 'enable', 'label' => __('Enable', 'mega'), 'src' => ''))), array('id' => 'enable_transparent_header_background_for_single_portfolio_pages', 'label' => __('Enable Transparent Header Background for Single Portfolio Pages?', 'mega'), 'desc' => __('Enable transparent header background for single portfolio pages?', 'mega'), 'std' => '', 'type' => 'checkbox', 'section' => 'portfolio_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'yes', 'label' => __('Enable transparent header background for single portfolio pages?', 'mega'), 'src' => ''))), array('id' => 'social_accounts', 'label' => __('Social Accounts', 'mega'), 'desc' => __('<p>Which links would you like to display?</p>', 'mega'), 'std' => '', 'type' => 'checkbox', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'facebook', 'label' => __('Facebook', 'mega'), 'src' => ''), array('value' => 'twitter', 'label' => __('Twitter', 'mega'), 'src' => ''), array('value' => 'gplus', 'label' => __('Google Plus', 'mega'), 'src' => ''), array('value' => 'linkedin', 'label' => __('LinkedIn', 'mega'), 'src' => ''), array('value' => 'pinterest', 'label' => __('Pinterest', 'mega'), 'src' => ''), array('value' => 'instagram', 'label' => __('Instagram', 'mega'), 'src' => ''), array('value' => 'vimeo', 'label' => __('Vimeo', 'mega'), 'src' => ''), array('value' => 'flickr', 'label' => __('Flickr', 'mega'), 'src' => ''), array('value' => 'tumblr', 'label' => __('Tumblr', 'mega'), 'src' => ''), array('value' => 'youtube', 'label' => __('YouTube', 'mega'), 'src' => ''), array('value' => 'behance', 'label' => __('Behance', 'mega'), 'src' => ''), array('value' => 'dribbble', 'label' => __('Dribbble', 'mega'), 'src' => ''), array('value' => 'px', 'label' => __('500px', 'mega'), 'src' => ''), array('value' => 'vk', 'label' => __('VK', 'mega'), 'src' => ''))), array('id' => 'facebook_url', 'label' => __('Facebook Address (URL)', 'mega'), 'desc' => '', 'std' => 'http://www.facebook.com/', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'twitter_url', 'label' => __('Twitter Address (URL)', 'mega'), 'desc' => '', 'std' => 'https://twitter.com/', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'gplus_url', 'label' => __('Google Plus Address (URL)', 'mega'), 'desc' => '', 'std' => 'https://plus.google.com/', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'linkedin_url', 'label' => __('LinkedIn Address (URL)', 'mega'), 'desc' => '', 'std' => 'http://www.linkedin.com/', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'pinterest_url', 'label' => __('Pinterest Address (URL)', 'mega'), 'desc' => '', 'std' => 'http://pinterest.com/', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'instagram_url', 'label' => __('Instagram Address (URL)', 'mega'), 'desc' => '', 'std' => 'http://instagram.com/', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'vimeo_url', 'label' => __('Vimeo Address (URL)', 'mega'), 'desc' => '', 'std' => 'http://vimeo.com/', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'flickr_url', 'label' => __('Flickr Address (URL)', 'mega'), 'desc' => '', 'std' => 'http://www.flickr.com/', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'tumblr_url', 'label' => __('Tumblr Address (URL)', 'mega'), 'desc' => '', 'std' => 'https://www.tumblr.com/', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'youtube_url', 'label' => __('YouTube Address (URL)', 'mega'), 'desc' => '', 'std' => 'http://www.youtube.com/', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'behance_url', 'label' => __('Behance Address (URL)', 'mega'), 'desc' => '', 'std' => 'http://www.behance.net/', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'dribbble_url', 'label' => __('Dribbble Address (URL)', 'mega'), 'desc' => '', 'std' => 'http://dribbble.com/', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'px_url', 'label' => __('500px Address (URL)', 'mega'), 'desc' => '', 'std' => 'https://500px.com/', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'vk_url', 'label' => __('VK Address (URL)', 'mega'), 'desc' => '', 'std' => 'http://vk.com/', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'shop_layout', 'label' => __('Shop Layout', 'mega'), 'desc' => __('Choose a layout for shop page.', 'mega'), 'std' => 'left-sidebar', 'type' => 'radio-image', 'section' => 'woocommerce', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'header_background_for_shop', 'label' => __('Hader Background for Shop', 'mega'), 'desc' => __('Upload header background for shop.', 'mega'), 'std' => '', 'type' => 'upload', 'section' => 'woocommerce', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'parallax_header_background_for_shop', 'label' => __('Enable Parallax for Shop Header Background?', 'mega'), 'desc' => __('Enable Parallax for Shop Header Background?', 'mega'), 'std' => '', 'type' => 'checkbox', 'section' => 'woocommerce', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'yes', 'label' => __('Enable Parallax for Shop Header Background?', 'mega'), 'src' => ''))), array('id' => 'enable_transparent_header_background_for_shop', 'label' => __('Enable Transparent Header Background for Shop?', 'mega'), 'desc' => __('Enable transparent header background for shop?', 'mega'), 'std' => '', 'type' => 'checkbox', 'section' => 'woocommerce', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'yes', 'label' => __('Enable Transparent Header Background for Shop?', 'mega'), 'src' => ''))), array('id' => 'shop_header_margin', 'label' => __('Shop Header Margin', 'mega'), 'desc' => __('Choose a value for shop header margin in pixels. Default margin is 130.', 'mega'), 'std' => '130', 'type' => 'numeric-slider', 'section' => 'woocommerce', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '0,500,1', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'enable_shopping_cart_on_woocommerce_pages_only', 'label' => __('Enable Shopping Cart on WooCommerce Pages Only?', 'mega'), 'desc' => __('Enable shopping cart on WooCommerce pages only?', 'mega'), 'std' => '', 'type' => 'checkbox', 'section' => 'woocommerce', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'yes', 'label' => __('Enable shopping cart on WooCommerce pages only?', 'mega'), 'src' => '')))));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
}
Example #6
0
/**
 * Build the custom settings & update OptionTree.
 *
 * @return void
 * @since 2.3.0
 */
function m_wedding_options()
{
    /* OptionTree is not loaded yet, or this is not an admin request */
    if (!function_exists('ot_settings_id') || !is_admin()) {
        return false;
    }
    /**
     * Get a copy of the saved settings array.
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('sections' => array(array('id' => 'general', 'title' => __('General', 'mTheme')), array('id' => 'header', 'title' => __('Header', 'mTheme')), array('id' => 'shop', 'title' => __('Shop', 'mTheme')), array('id' => 'blog', 'title' => __('Blog', 'mTheme')), array('id' => 'footer', 'title' => __('Footer', 'mTheme')), array('id' => 'typography', 'title' => __('Typography', 'mTheme'))), 'settings' => array(array('id' => 'logo', 'label' => __('Logo', 'mTheme'), 'desc' => __('Select an image file for your logo.', 'mTheme'), 'std' => trailingslashit(get_template_directory_uri()) . 'assets/imgs/logo.png', 'type' => 'upload', 'section' => 'general'), array('id' => 'main_layout', 'label' => 'Layout', 'desc' => __('Select a layout for your theme', 'mTheme'), 'type' => 'radio-image', 'std' => 'full-width', 'choices' => array(array('value' => 'full-width', 'label' => 'Full Width (no sidebar)', 'src' => trailingslashit(get_template_directory_uri()) . 'assets/imgs/layout/full-width.png'), array('value' => 'left-sidebar', 'label' => 'Left Sidebar', 'src' => trailingslashit(get_template_directory_uri()) . 'assets/imgs/layout/left-sidebar.png'), array('value' => 'right-sidebar', 'label' => 'Right Sidebar', 'src' => trailingslashit(get_template_directory_uri()) . 'assets/imgs/layout/right-sidebar.png')), 'section' => 'general'), array('id' => 'main_sidebar', 'label' => 'Sidebar Select', 'type' => 'sidebar-select', 'section' => 'general', 'condition' => 'main_layout:not(full-width)'), array('id' => 'main_width', 'label' => __('Sidebar Width', 'mTheme'), 'desc' => __('The width of the sidebar determined by <code>%</code> of <code>12</code>.', 'mTheme'), 'type' => 'numeric-slider', 'min_max_step' => '1,12,1', 'section' => 'general', 'condition' => 'main_layout:not(full-width)'), array('id' => 'main_el_class', 'label' => __('Extra class name for Sidebar', 'mTheme'), 'desc' => __('Style particular content element differently - add a class name and refer to it in custom CSS.', 'mTheme'), 'type' => 'text', 'section' => 'general', 'condition' => 'main_layout:not(full-width)'), array('id' => 'main_boxed', 'label' => 'Boxed', 'desc' => __('Check this box to use Boxed. If left unchecked then full width is used.', 'mTheme'), 'type' => 'on-off', 'std' => 'off', 'section' => 'general'), array('id' => 'background_body', 'label' => __('Background for Body', 'mTheme'), 'desc' => __('Background used for the Body', 'mTheme'), 'std' => '', 'type' => 'background', 'section' => 'general'), array('id' => 'background_boxed', 'label' => __('Background for Boxed', 'mTheme'), 'desc' => __('Background used for the Boxed', 'mTheme'), 'std' => '', 'type' => 'background', 'section' => 'general', 'condition' => 'main_boxed:is(on)'), array('id' => 'background_main', 'label' => __('Background for Main Content', 'mTheme'), 'desc' => __('Background used for the Main Content', 'mTheme'), 'std' => '', 'type' => 'background', 'section' => 'general'), array('id' => 'main_container', 'label' => 'Containers', 'desc' => __('Use <code>.container-fluid</code> for a full width container, spanning the entire width of your viewport. If left unchecked then use <code>.container</code> for a responsive fixed width container.', 'mTheme'), 'type' => 'on-off', 'std' => 'off', 'section' => 'general'), array('label' => __('Add Sidebar', 'mTheme'), 'id' => 'sidebar', 'type' => 'list-item', 'desc' => '', 'settings' => array(array('label' => 'Sidebar Name', 'id' => 'name', 'type' => 'text', 'desc' => '')), 'std' => '', 'section' => 'general'), array('id' => 'custom_css', 'label' => __('Custom CSS', 'mTheme'), 'desc' => __('Paste your CSS code, do not include any tags or HTML in the field. Any custom CSS entered here will override the theme CSS. In some cases, the !important tag may be needed.', 'mTheme'), 'std' => '', 'type' => 'css', 'rows' => '20', 'section' => 'general'), array('id' => 'background_header', 'label' => __('Background for Header', 'mTheme'), 'desc' => __('Background used for Page Header', 'mTheme'), 'std' => '', 'type' => 'background', 'section' => 'header'), array('id' => 'header_styles', 'label' => __('Select a style for Header', 'mTheme'), 'desc' => __('', 'mTheme'), 'std' => 'style-v1', 'type' => 'select', 'section' => 'header', 'choices' => array(array('value' => '', 'label' => __('-- Choose One --', 'mTheme')), array('value' => 'style-v1', 'label' => __('Style v1', 'mTheme')), array('value' => 'style-v2', 'label' => __('Style v2', 'mTheme')), array('value' => 'style-v3', 'label' => __('Style v3', 'mTheme')), array('value' => 'style-v4', 'label' => __('Style v4', 'mTheme')), array('value' => 'style-v5', 'label' => __('Style v5', 'mTheme')), array('value' => 'style-v6', 'label' => __('Style v6', 'mTheme')), array('value' => 'style-v7', 'label' => __('Style v7', 'mTheme')))), array('id' => 'background_header_top', 'label' => __('Background for Header Top', 'mTheme'), 'std' => '', 'type' => 'background', 'section' => 'header'), array('id' => 'header_top_sidebar', 'label' => __('Add Sidebar for Header Top', 'mTheme'), 'std' => '', 'type' => 'list-item', 'section' => 'header', 'settings' => array(array('id' => 'sidebar', 'label' => __('Sidebar Select', 'mTheme'), 'std' => '', 'type' => 'sidebar-select'), array('id' => 'width', 'label' => __('Sidebar Width', 'mTheme'), 'desc' => __('The width of the sidebar determined by <code>%</code> of <code>12</code>.', 'mTheme'), 'type' => 'numeric-slider', 'min_max_step' => '1,12,1'), array('id' => 'el_class', 'label' => __('Extra class name', 'mTheme'), 'desc' => __('Style particular content element differently - add a class name and refer to it in custom CSS..', 'mTheme'), 'type' => 'text'))), array('id' => 'background_header_middle', 'label' => __('Background for Header Middle', 'mTheme'), 'std' => '', 'type' => 'background', 'section' => 'header'), array('id' => 'header_middle_sidebar', 'label' => __('Add Sidebar for Header Middle', 'mTheme'), 'desc' => __('', 'mTheme'), 'std' => '', 'type' => 'list-item', 'section' => 'header', 'settings' => array(array('id' => 'sidebar', 'label' => __('Sidebar Select', 'mTheme'), 'std' => '', 'type' => 'sidebar-select'), array('id' => 'width', 'label' => __('Sidebar Width', 'mTheme'), 'desc' => __('The width of the sidebar determined by <code>%</code> of <code>12</code>.', 'mTheme'), 'type' => 'numeric-slider', 'min_max_step' => '1,12,1'), array('id' => 'el_class', 'label' => __('Extra class name', 'mTheme'), 'desc' => __('Style particular content element differently - add a class name and refer to it in custom CSS..', 'mTheme'), 'type' => 'text'))), array('id' => 'background_header_bottom', 'label' => __('Background for Header Bottom', 'mTheme'), 'std' => '', 'type' => 'background', 'section' => 'header'), array('id' => 'header_bottom_sidebar', 'label' => __('Add Sidebar for Header Bottom', 'mTheme'), 'desc' => __('', 'mTheme'), 'std' => '', 'type' => 'list-item', 'section' => 'header', 'settings' => array(array('id' => 'sidebar', 'label' => __('Sidebar Select', 'mTheme'), 'std' => '', 'type' => 'sidebar-select'), array('id' => 'width', 'label' => __('Sidebar Width', 'mTheme'), 'desc' => __('The width of the sidebar determined by <code>%</code> of <code>12</code>.', 'mTheme'), 'type' => 'numeric-slider', 'min_max_step' => '1,12,1'), array('id' => 'el_class', 'label' => __('Extra class name', 'mTheme'), 'desc' => __('Style particular content element differently - add a class name and refer to it in custom CSS..', 'mTheme'), 'type' => 'text'))), array('id' => 'shop_background_title', 'label' => __('Background for Title', 'mTheme'), 'desc' => __('Background used for Title', 'mTheme'), 'std' => '', 'type' => 'background', 'section' => 'shop'), array('id' => 'shop_layout', 'label' => 'Shop Layout', 'desc' => __('', 'mTheme'), 'type' => 'radio-image', 'std' => 'full-width', 'choices' => array(array('value' => 'left-sidebar', 'label' => 'Left Sidebar', 'src' => OT_URL . '/assets/images/layout/left-sidebar.png'), array('value' => 'right-sidebar', 'label' => 'Right Sidebar', 'src' => OT_URL . '/assets/images/layout/right-sidebar.png'), array('value' => 'full-width', 'label' => 'Full Width (no sidebar)', 'src' => OT_URL . '/assets/images/layout/full-width.png')), 'section' => 'shop'), array('id' => 'shop_sidebar', 'label' => __('Sidebar Select', 'mTheme'), 'std' => '', 'type' => 'sidebar-select', 'condition' => 'shop_layout:not(full-width)', 'section' => 'shop'), array('id' => 'shop_sidebar_width', 'label' => __('Sidebar Width', 'mTheme'), 'desc' => __('The width of the sidebar determined by <code>%</code> of <code>12</code>.', 'mTheme'), 'type' => 'numeric-slider', 'min_max_step' => '1,12,1', 'condition' => 'shop_layout:not(full-width)', 'section' => 'shop'), array('id' => 'shop_sidebar_el_class', 'label' => __('Extra class name for Sidebar', 'mTheme'), 'desc' => __('Style particular content element differently - add a class name and refer to it in custom CSS..', 'mTheme'), 'type' => 'text', 'condition' => 'shop_layout:not(full-width)', 'section' => 'shop'), array('id' => 'shop_items', 'label' => __('Per page', 'mTheme'), 'desc' => __('The "per_page" shortcode determines how many products to show on the page.', 'mTheme'), 'std' => '12', 'type' => 'text', 'section' => 'shop'), array('id' => 'shop_single_layout', 'label' => 'Single Layout', 'desc' => __('', 'mTheme'), 'type' => 'radio-image', 'std' => 'full-width', 'choices' => array(array('value' => 'left-sidebar', 'label' => 'Left Sidebar', 'src' => OT_URL . '/assets/images/layout/left-sidebar.png'), array('value' => 'right-sidebar', 'label' => 'Right Sidebar', 'src' => OT_URL . '/assets/images/layout/right-sidebar.png'), array('value' => 'full-width', 'label' => 'Full Width (no sidebar)', 'src' => OT_URL . '/assets/images/layout/full-width.png')), 'section' => 'shop'), array('id' => 'shop_single_sidebar', 'label' => __('Single Sidebar Select', 'mTheme'), 'std' => '', 'type' => 'sidebar-select', 'condition' => 'shop_single_layout:not(full-width)', 'section' => 'shop'), array('id' => 'shop_single_sidebar_width', 'label' => __('Single Sidebar Width', 'mTheme'), 'desc' => __('The width of the sidebar determined by <code>%</code> of <code>12</code>.', 'mTheme'), 'type' => 'numeric-slider', 'min_max_step' => '1,12,1', 'condition' => 'shop_single_layout:not(full-width)', 'section' => 'shop'), array('id' => 'shop_single_sidebar_el_class', 'label' => __('Single Extra class name for Sidebar', 'mTheme'), 'desc' => __('Style particular content element differently - add a class name and refer to it in custom CSS..', 'mTheme'), 'type' => 'text', 'condition' => 'shop_single_layout:not(full-width)', 'section' => 'shop'), array('id' => 'blog_background_title', 'label' => __('Background for Title', 'mTheme'), 'desc' => __('Background used for Title', 'mTheme'), 'std' => '', 'type' => 'background', 'section' => 'blog'), array('id' => 'blog_layout', 'label' => 'Blog Layout', 'desc' => __('', 'mTheme'), 'type' => 'radio-image', 'std' => 'full-width', 'choices' => array(array('value' => 'left-sidebar', 'label' => 'Left Sidebar', 'src' => OT_URL . '/assets/images/layout/left-sidebar.png'), array('value' => 'right-sidebar', 'label' => 'Right Sidebar', 'src' => OT_URL . '/assets/images/layout/right-sidebar.png'), array('value' => 'full-width', 'label' => 'Full Width (no sidebar)', 'src' => OT_URL . '/assets/images/layout/full-width.png')), 'section' => 'blog'), array('id' => 'blog_sidebar', 'label' => __('Sidebar Select', 'mTheme'), 'std' => '', 'type' => 'sidebar-select', 'condition' => 'blog_layout:not(full-width)', 'section' => 'blog'), array('id' => 'blog_sidebar_width', 'label' => __('Sidebar Width', 'mTheme'), 'desc' => __('The width of the sidebar determined by <code>%</code> of <code>12</code>.', 'mTheme'), 'type' => 'numeric-slider', 'min_max_step' => '1,12,1', 'condition' => 'blog_layout:not(full-width)', 'section' => 'blog'), array('id' => 'blog_sidebar_el_class', 'label' => __('Extra class name for Sidebar', 'mTheme'), 'desc' => __('Style particular content element differently - add a class name and refer to it in custom CSS..', 'mTheme'), 'type' => 'text', 'condition' => 'blog_layout:not(full-width)', 'section' => 'blog'), array('id' => 'background_footer', 'label' => __('Background for Footer', 'mTheme'), 'type' => 'background', 'section' => 'footer'), array('id' => 'background_footer_top', 'label' => __('Background for Footer Top', 'mTheme'), 'type' => 'background', 'section' => 'footer'), array('id' => 'sidebar_footer_top', 'label' => __('Add Sidebar for Footer Top', 'mTheme'), 'desc' => __('', 'mTheme'), 'type' => 'list-item', 'section' => 'footer', 'settings' => array(array('id' => 'sidebar', 'label' => __('Sidebar Select', 'mTheme'), 'std' => '', 'type' => 'sidebar-select'), array('id' => 'width', 'label' => __('Sidebar Width', 'mTheme'), 'desc' => __('The width of the sidebar determined by <code>%</code> of <code>12</code>.', 'mTheme'), 'type' => 'numeric-slider', 'min_max_step' => '1,12,1'), array('id' => 'el_class', 'label' => __('Extra class name', 'mTheme'), 'desc' => __('Style particular content element differently - add a class name and refer to it in custom CSS..', 'mTheme'), 'type' => 'text'))), array('id' => 'background_footer_middle', 'label' => __('Background for Footer Middle', 'mTheme'), 'type' => 'background', 'section' => 'footer'), array('id' => 'sidebar_footer', 'label' => __('Add Sidebar for Footer Middle', 'mTheme'), 'desc' => __('', 'mTheme'), 'type' => 'list-item', 'section' => 'footer', 'settings' => array(array('id' => 'sidebar', 'label' => __('Sidebar Select', 'mTheme'), 'std' => '', 'type' => 'sidebar-select'), array('id' => 'width', 'label' => __('Sidebar Width', 'mTheme'), 'desc' => __('The width of the sidebar determined by <code>%</code> of <code>12</code>.', 'mTheme'), 'type' => 'numeric-slider', 'min_max_step' => '1,12,1'), array('id' => 'el_class', 'label' => __('Extra class name', 'mTheme'), 'desc' => __('Style particular content element differently - add a class name and refer to it in custom CSS..', 'mTheme'), 'type' => 'text'))), array('id' => 'copyright', 'label' => __('Copyright', 'mTheme'), 'desc' => __('Enter the text that displays in the copyright bar. HTML markup can be used.', 'mTheme'), 'type' => 'textarea', 'section' => 'footer', 'rows' => '10'), array('id' => 'google_fonts', 'label' => __('Google Fonts', 'mTheme'), 'desc' => sprintf(__('The Google Fonts option type will dynamically enqueue any number of Google Web Fonts into the document %1$s. As well, once the option has been saved each font family will automatically be inserted into the %2$s array for the Typography option type. You can further modify the font stack by using the %3$s filter, which is passed the %4$s, %5$s, and %6$s parameters. The %6$s parameter is being passed from %7$s, so it will be the ID of a Typography option type. This will allow you to add additional web safe fonts to individual font families on an as-need basis.', 'mTheme'), '<code>HEAD</code>', '<code>font-family</code>', '<code>ot_google_font_stack</code>', '<code>$font_stack</code>', '<code>$family</code>', '<code>$field_id</code>', '<code>ot_recognized_font_families</code>'), 'std' => '', 'type' => 'google-fonts', 'section' => 'typography', 'operator' => 'and'), array('id' => 'typography_body', 'label' => __('Typography Body', 'mTheme'), 'desc' => __('These options will be added to <code>body</code>', 'mTheme'), 'std' => '', 'type' => 'typography', 'section' => 'typography', 'operator' => 'and'), array('id' => 'typography_heading', 'label' => __('Typography Heading', 'mTheme'), 'desc' => __('These options will be added to <code>H1, H2, H3, H4, H5, H6</code>', 'mTheme'), 'std' => '', 'type' => 'typography', 'section' => 'typography', 'operator' => 'and'), array('id' => 'featured_color', 'label' => __('Featured Color', 'mTheme'), 'desc' => __('Choose featured color for the theme.', 'mTheme'), 'std' => '', 'type' => 'colorpicker', 'section' => 'typography', 'operator' => 'and')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_customTheme_options;
    $ot_has_customTheme_options = true;
}
Example #7
0
/**
 * Build the custom settings & update OptionTree.
 */
function custom_theme_options()
{
    /* OptionTree is not loaded yet */
    if (!function_exists('ot_settings_id')) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('sidebar' => ''), 'sections' => array(array('id' => 'general_default', 'title' => '基本设置'), array('id' => 'advanced_settings', 'title' => '高级设置'), array('id' => 'appearance', 'title' => '外观样式'), array('id' => 'social_icons', 'title' => '社交网络'), array('id' => 'analytics_seo', 'title' => '统计代码&amp;SEO')), 'settings' => array(array('id' => 'owner_photo', 'label' => '首页头像', 'desc' => '请填写图片网址或者上传图片,建议尺寸:100x100', 'std' => '', 'type' => 'upload', 'section' => 'general_default', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'owner_first_name', 'label' => '姓氏', 'desc' => '将显示在头像的左侧。建议1-4个字,或者留空', 'std' => '', 'type' => 'text', 'section' => 'general_default', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'owner_last_name', 'label' => '名字', 'desc' => '将显示在头像的右侧。建议1-4个字,或者留空', 'std' => '', 'type' => 'text', 'section' => 'general_default', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'contact_info', 'label' => '欢迎辞/网站公告', 'desc' => '填写后将出现在首页右上角、社交图标的上方', 'std' => '', 'type' => 'textarea', 'section' => 'general_default', 'rows' => '5', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'copyright_text', 'label' => '页脚文字', 'desc' => '显示于每个页面的最下方,可以是版权信息、站点地图链接等,支持HTML代码', 'std' => '', 'type' => 'textarea', 'section' => 'general_default', 'rows' => '5', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'profile_page', 'label' => '指定首页页面', 'desc' => '首页内容一般为简要的自我介绍。新建相应页面后,在这里选中,网站首页显示的即为该页面的内容', 'std' => '', 'type' => 'page-select', 'section' => 'general_default', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'resume_page', 'label' => '指定简历页面', 'desc' => '新建相应页面后,在这里选中,“简历”显示的即为该页面的内容', 'std' => '', 'type' => 'page-select', 'section' => 'general_default', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'portfolio_page', 'label' => '指定作品页面', 'desc' => '新建相应页面(页面的模板必须为“Portofolio 模版”)后,在这里选中,新建的“作品”将显示在该页面内', 'std' => '', 'type' => 'page-select', 'section' => 'general_default', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'blog_page', 'label' => '指定博客页面', 'desc' => '新建相应页面(页面的模板必须为“Blog 模版”)后,在这里选中,新建的“文章”将显示在该页面内', 'std' => '', 'type' => 'page-select', 'section' => 'general_default', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'contact_page', 'label' => '指定留言页面', 'desc' => '新建相应页面(页面的模板为“Contact 模版”)后,在这里选中,将其指定为“留言”页面', 'std' => '', 'type' => 'page-select', 'section' => 'general_default', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'if_ajaxify', 'label' => '是否开启全站Ajax', 'desc' => '如果希望全站播放背景音乐,请务必开启此项', 'std' => '', 'type' => 'on-off', 'section' => 'advanced_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'custom_reloadjs', 'label' => '重载JS', 'desc' => '开启全站Ajax后可能导致某些document.ready触发的功能失效(比如百度推荐),请在此处粘贴相应JS代码', 'std' => '', 'type' => 'textarea-simple', 'section' => 'advanced_settings', 'rows' => '6', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'bgm', 'label' => '背景音乐列表', 'desc' => '请填写js列表网址或直接上传文件,此处留空则不播放背景音乐。js列表格式请参照“无需上传文件”文件夹中的 radio_content_example.js', 'std' => '', 'type' => 'upload', 'section' => 'advanced_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'work_items_link_status', 'label' => '作品链接至详情页面', 'desc' => '勾选后点击作品的名字可以进入该作品页面。适用于每个作品都有详细介绍的情况', 'std' => '', 'type' => 'on-off', 'section' => 'advanced_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'blog_sidebar', 'label' => '博客侧边栏小工具', 'desc' => '是否启用博客页面的侧边栏小工具', 'std' => '', 'type' => 'on-off', 'section' => 'advanced_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'duoshuo_domain', 'label' => '多说域名(×××.duoshuo.com)', 'desc' => '填写后多说“最近访客”小工具才能正常使用。已经注册过多说的用户直接填写×××处内容,未注册的请先到 <a href="http://duoshuo.com/create-site/" title="创建多说站点" target="_blank">这里</a> 创建站点,然后填写', 'std' => '', 'type' => 'text', 'section' => 'advanced_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'background_pattern', 'label' => '背景图片', 'desc' => '请填写图片网址或者上传图片', 'std' => '', 'type' => 'upload', 'section' => 'appearance', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'background_grid', 'label' => '背景网点', 'desc' => '背景图上是否加一层网点', 'std' => '', 'type' => 'radio', 'section' => 'appearance', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'bright', 'label' => '灰色网点(偏亮)', 'src' => ''), array('value' => 'dark', 'label' => '黑色网点(偏暗)', 'src' => ''), array('value' => 'no', 'label' => '不使用', 'src' => ''))), array('id' => 'custom_css', 'label' => '自定义CSS', 'desc' => '请直接粘贴你的CSS源代码', 'std' => '', 'type' => 'textarea-simple', 'section' => 'appearance', 'rows' => '8', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'fav_icon', 'label' => 'Favicon图标', 'desc' => '请填写图标网址或者上传图标,建议尺寸:16x16', 'std' => '', 'type' => 'upload', 'section' => 'appearance', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'apple_touch_icon', 'label' => 'Favicon图标(57x57)', 'desc' => '请填写图标网址或者上传图标,建议尺寸:57x57', 'std' => '', 'type' => 'upload', 'section' => 'appearance', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'apple_touch_icon_72', 'label' => 'Favicon图标(72x72)', 'desc' => '请填写图标网址或者上传图标,建议尺寸:72x72', 'std' => '', 'type' => 'upload', 'section' => 'appearance', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'apple_touch_icon_114', 'label' => 'Favicon图标(114x114)', 'desc' => '请填写图标网址或者上传图标,建议尺寸:114x114', 'std' => '', 'type' => 'upload', 'section' => 'appearance', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'sina_id', 'label' => '新浪微博(http://weibo.com/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'tencent_id', 'label' => '腾讯微博(http://t.qq.com/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'baidu_id', 'label' => '百度贴吧(http://www.baidu.com/p/×××?from=tieba 或者 http://tieba.baidu.com/home/main?id=×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'renren_id', 'label' => '人人(http://www.renren.com/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'kaixin_id', 'label' => '开心网(http://www.kaixin001.com/home/?uid=×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'qq_id', 'label' => 'QQ', 'desc' => '请填写数字QQ号。如果不想在网址中暴露QQ号,请到 <a href="http://shang.qq.com/v3/widget.html" target="_blank">这里</a> ——设置——安全级别设置,选择“安全加密”,保存后刷新网页,到“QQ通讯组件”获取代码,并在此处填入您的IDKEY(代码中IDKEY=后面的48位字符串)', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'qq_qr', 'label' => '手机QQ二维码', 'desc' => '请填写您的QQ二维码网址,在此处上传,或者直接使用媒体库中的图片', 'std' => '', 'type' => 'upload', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'twitter_id', 'label' => 'Twitter(https://twitter.com/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'facebook_id', 'label' => 'Facebook(https://www.facebook.com/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'gplus_id', 'label' => 'Google Plus(https://plus.google.com/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'skype_id', 'label' => 'Skype', 'desc' => '请填写您的Skype帐号。访客点击后默认会启动Skype打开和您的文字聊天窗口。', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'youku_id', 'label' => '优酷(http://i.youku.com/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'tudou_id', 'label' => '土豆(http://www.tudou.com/home/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'bilibili_id', 'label' => '哔哩哔哩(http://space.bilibili.tv/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'xiami_id', 'label' => '虾米(http://www.xiami.com/u/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'songtaste_id', 'label' => 'SongTaste(http://www.songtaste.com/user/×××/)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'huaban_id', 'label' => '花瓣(http://huaban.com/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'youtube_id', 'label' => 'Youtube(https://www.youtube.com/user/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'vimeo_id', 'label' => 'Vimeo(http://vimeo.com/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'soundcloud_id', 'label' => 'SoundCloud(https://soundcloud.com/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'flickr_id', 'label' => 'Flickr(https://www.flickr.com/photos/×××/)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'instagram_id', 'label' => 'Instagram(http://instagram.com/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'f500px_id', 'label' => '500px(http://500px.com/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'pinterest_id', 'label' => 'Pinterest(http://www.pinterest.com/×××/)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'zhihu_id', 'label' => '知乎(http://www.zhihu.com/people/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'guokr_id', 'label' => '果壳(http://www.guokr.com/i/×××/)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'douban_id', 'label' => '豆瓣(http://www.douban.com/people/×××/)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'zcool_id', 'label' => '站酷(http://www.zcool.com.cn/u/××× 或 http://×××.zcool.com.cn/)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'yiyan_id', 'label' => '译言(http://user.yeeyan.org/u/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'segmentfault_id', 'label' => 'SegmentFault(http://segmentfault.com/u/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'quora_id', 'label' => 'Quora(https://www.quora.com/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'dropbox_id', 'label' => 'Dropbox 邀请链接(https://db.tt/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'linkedin_id', 'label' => 'Linkedin(http://www.linkedin.com/pub/×××/×××/×××/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'dribbble_id', 'label' => 'Dribbble(http://dribbble.com/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'github_id', 'label' => 'Github(https://github.com/×××)', 'desc' => '请填写完整URL,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'stackexchange_id', 'label' => 'StackExchange(http://stackexchange.com/users/×××)', 'desc' => '请填写完整URL,包含http(s)://。注意这里是总站StackExchange的,不要填成了StackOverflow的', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'wechat_qr', 'label' => '微信', 'desc' => '请填写您的微信二维码网址,在此处上传,或者直接使用媒体库中的图片', 'std' => '', 'type' => 'upload', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'yixin_qr', 'label' => '易信', 'desc' => '请填写您的易信二维码网址,在此处上传,或者直接使用媒体库中的图片', 'std' => '', 'type' => 'upload', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'line_qr', 'label' => 'Line', 'desc' => '请填写您的Line二维码网址,在此处上传,或者直接使用媒体库中的图片', 'std' => '', 'type' => 'upload', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'whatsapp_qr', 'label' => 'Whatsapp', 'desc' => '请填写您的Whatsapp二维码网址,在此处上传,或者直接使用媒体库中的图片', 'std' => '', 'type' => 'upload', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'mail_address', 'label' => 'E-mail', 'desc' => '请填写邮箱地址(如a@b.com)或者在线写信类网址(如QQ邮箱“邮我”,在设置——账户的最下方开启该功能并获取代码后,在此处填入href=之后,双引号之间的那个网址)', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'rss_feed', 'label' => 'RSS Feed', 'desc' => '请填写完整网址,包含http(s)://。一般为“您的博客网址/feed/”', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'any_url', 'label' => '自定义链接', 'desc' => '请填写完整网址,包含http(s)://', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'header_analytics_code', 'label' => '页头统计代码', 'desc' => '适用于任何要求在页头(head)部分加载的统计代码,如谷歌统计,百度统计异步代码。请直接粘贴您的代码(包含script标签),支持多个统计代码,但建议只用一个', 'std' => '', 'type' => 'textarea-simple', 'section' => 'analytics_seo', 'rows' => '4', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_analytics', 'label' => '页尾统计代码', 'desc' => '适用于任何要求在页尾(footer)部分加载的统计代码,如腾讯统计,百度统计普通代码。请直接粘贴您的代码(包含script标签),支持多个统计代码,但建议只用一个', 'std' => '', 'type' => 'textarea-simple', 'section' => 'analytics_seo', 'rows' => '4', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'baidu_tuijian', 'label' => '百度推荐', 'desc' => '在<a href="http://tuijian.baidu.com" target="_blank">百度推荐</a>获取异步代码后,填写id="hm_t_×××"引号中的内容', 'std' => '', 'type' => 'text', 'section' => 'analytics_seo', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'site_description', 'label' => '站点描述', 'desc' => '适当、准确地描述你的网站。如果不想出现 Description 标签用于SEO,此处请留空', 'std' => '', 'type' => 'textarea-simple', 'section' => 'analytics_seo', 'rows' => '4', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'site_keywords', 'label' => '关键词', 'desc' => '网站关键词,关键词之间用半角英文逗号隔开。如果不想出现 Keywords 标签用于SEO,此处请留空', 'std' => '', 'type' => 'text', 'section' => 'analytics_seo', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'site_author', 'label' => '作者', 'desc' => '网站作者或者所有者的名字。如果不想出现 Author 标签用于SEO,此处请留空', 'std' => '', 'type' => 'text', 'section' => 'analytics_seo', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
}
Example #8
0
/**
 * Build the custom settings & update OptionTree.
 */
function custom_theme_options()
{
    /* OptionTree is not loaded yet, or this is not an admin request */
    if (!function_exists('ot_settings_id') || !is_admin()) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('sidebar' => ''), 'sections' => array(array('id' => 'general', 'title' => __('General', 'single-page-corp')), array('id' => 'home', 'title' => __('Home', 'single-page-corp')), array('id' => 'social', 'title' => __('Social', 'single-page-corp'))), 'settings' => array(array('id' => 'logo', 'label' => __('Logo', 'single-page-corp'), 'desc' => __('Upload your website Logo', 'single-page-corp'), 'std' => '', 'type' => 'upload', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'background', 'label' => __('Background', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'background', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'font', 'label' => __('Font', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'google-fonts', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'google_analytics', 'label' => __('Google Analytics', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'textarea-simple', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'css_setting', 'label' => __('css setting', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'css', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'copy', 'label' => __('copy', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'header_image', 'label' => __('Header Image', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'upload', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'show_about_us', 'label' => __('Show About Us', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'radio', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'show', 'label' => __('Show', 'single-page-corp'), 'src' => ''), array('value' => 'hide', 'label' => __('Hide', 'single-page-corp'), 'src' => ''))), array('id' => 'about_us_heading', 'label' => __('About Us Heading', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'about_us_content', 'label' => __('About Us Content', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'textarea', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'show_porfolio', 'label' => __('Show Porfolio', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'radio', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'show', 'label' => __('Show', 'single-page-corp'), 'src' => ''), array('value' => 'hide', 'label' => __('Hide', 'single-page-corp'), 'src' => ''))), array('id' => 'portfolio_heading', 'label' => __('Portfolio Heading', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'show_clients', 'label' => __('Show Clients', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'on-off', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'show_google_map', 'label' => __('Show Google Map', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'radio', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'show', 'label' => __('Show', 'single-page-corp'), 'src' => ''), array('value' => 'hide', 'label' => __('Hide', 'single-page-corp'), 'src' => ''))), array('id' => 'google_map_code', 'label' => __('Google Map Code', 'single-page-corp'), 'desc' => __('Enter Your code for Google map', 'single-page-corp'), 'std' => '', 'type' => 'textarea-simple', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'social', 'label' => __('Social', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'social-links', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
}
Example #9
0
/**
 * Build the custom settings & update OptionTree.
 */
function custom_theme_options()
{
    /* OptionTree is not loaded yet */
    if (!function_exists('ot_settings_id')) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('sidebar' => ''), 'sections' => array(array('id' => 'general', 'title' => 'General'), array('id' => 'contact_page_section', 'title' => 'Contact page'), array('id' => 'layout_section', 'title' => 'Layout'), array('id' => 'social_icons', 'title' => 'Social icons'), array('id' => 'section_auto_updates', 'title' => 'Automatic Updates')), 'settings' => array(array('id' => 'appointment_button', 'label' => 'Featured page in the main menu', 'desc' => 'The selected page will be displayed next to the main menu at the top of the page in the button', 'std' => '', 'type' => 'page-select', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'lighten_titles', 'label' => 'Add the lighten effect to all titles', 'desc' => 'If you enable this option, the first word of every title will be in normal font weight while the rest of the title will be bold.', 'std' => 'yes', 'type' => 'select', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'yes', 'label' => 'Yes', 'src' => ''), array('value' => 'no', 'label' => 'No', 'src' => ''))), array('id' => 'open_social_icons_in_new_tab', 'label' => 'Open social icons in new tab', 'desc' => '', 'std' => '_self', 'type' => 'select', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => '_self', 'label' => 'No', 'src' => ''), array('value' => '_blank', 'label' => 'Yes', 'src' => ''))), array('id' => 'h2_blog', 'label' => 'H2: Blog', 'desc' => '<h2>Blog</h2>', 'std' => '', 'type' => 'textblock', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'blog_page_title', 'label' => 'Title of the blog page', 'desc' => 'Select the name of the title for page where the blog posts will be displayed. If left empty, the blog title will be used', 'std' => 'Latest News', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'h2_services', 'label' => 'H2: Services', 'desc' => '<h2>Services</h2>', 'std' => '', 'type' => 'textblock', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'services_page_title', 'label' => 'Title of the services page', 'desc' => 'The title for the page where services are displayed', 'std' => 'Our Services', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'services_url_slug', 'label' => 'URL of The Services page', 'desc' => 'Only lowercase letters, numbers and dash (-) allowed! This will be the URL of the page where all the services will appear, for example <code>http://www.yoursite.com/<b>our-services</b></code>. Add only what comes after your WP installation URL, for example <b>\'our-services\'</b>.', 'std' => 'services', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'h2_gallery', 'label' => 'H2: Gallery', 'desc' => '<h2>Gallery</h2>', 'std' => '', 'type' => 'textblock', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'gallery_page_title', 'label' => 'Title of the gallery page', 'desc' => 'The title for the page where galleries are displayed', 'std' => 'Gallery', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'gallery_url_slug', 'label' => 'URL of the Gallery page', 'desc' => 'Only lowercase letters, numbers and dash (-) allowed! This will be the URL of the page where all the galleries will appear, for example <code>http://www.yoursite.com/<b>our-fine-galleries</b></code>. Add only what comes after your WP installation URL, for example <b>\'our-fine-galleries\'</b>.', 'std' => 'gallery', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'h2_team', 'label' => 'H2: The Team', 'desc' => '<h2>The Team</h2>', 'std' => '', 'type' => 'textblock', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'team_page_title', 'label' => 'Title of the team page', 'desc' => 'The title for the page where team members are displayed', 'std' => 'Meet the team', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'the_team_url_slug', 'label' => 'URL of the Meet the Team page', 'desc' => 'Only lowercase letters, numbers and dash (-) allowed! This will be the URL of the page where all the team members will appear, for example <code>http://www.yoursite.com/<b>our-team-and-more</b></code>. Add only what comes after your WP installation URL, for example <b>\'our-team-and-more\'</b>.', 'std' => 'the-team', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'user_custom_css', 'label' => 'Custom CSS', 'desc' => 'Custom CSS styles to change the layout and appearance of your website', 'std' => '', 'type' => 'css', 'section' => 'general', 'rows' => '10', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_scripts', 'label' => 'Footer Scripts', 'desc' => 'Custom scripts for the footer, like Google Analytics tracking script', 'std' => '', 'type' => 'textarea-simple', 'section' => 'general', 'rows' => '10', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'js_date_format', 'label' => 'Date Format for Date&amp;Time picker', 'desc' => 'This is used for the jQuery UI datetime picker, for the appointment page.', 'std' => '', 'type' => 'select', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'mm/dd/yy', 'label' => '01/31/2013', 'src' => ''), array('value' => 'dd/mm/yy', 'label' => '31/01/2013', 'src' => ''), array('value' => 'yy-mm-dd', 'label' => '2013-01-31', 'src' => ''), array('value' => 'dd. mm. yy', 'label' => '31. 01. 2013', 'src' => ''), array('value' => 'd MM, yy', 'label' => '31 January, 2013', 'src' => ''))), array('id' => 'gm_lat_lng', 'label' => 'Longitude and latitude of the map center', 'desc' => 'Get this from <a href="https://maps.google.com/">Google Maps</a>, longitude and latitude separated by comma, like <code>40.724885,-74.00264</code> for the New York.', 'std' => '46.051322,14.506189', 'type' => 'text', 'section' => 'contact_page_section', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'gmap_locations', 'label' => 'Google Map Locations', 'desc' => 'Title and description are used for the popup window, the <b>Link</b> field is used for the latitude and longitude (as above for the map center) and optionally you can attach the image to the popup window as well.', 'std' => 'My business name', 'type' => 'list-item', 'section' => 'contact_page_section', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'content_divider', 'label' => 'Default content divider', 'desc' => '', 'std' => '', 'type' => 'radio-image', 'section' => 'layout_section', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'mechanic', 'label' => 'mechanic', 'src' => 'http://i159.photobucket.com/albums/t159/Prelc/mechanic_zps8aabea3f.png'), array('value' => 'divider-1', 'label' => 'Divider 1', 'src' => 'http://i1198.photobucket.com/albums/aa449/rob153dave/dividers_02.jpg'), array('value' => 'divider-2', 'label' => 'Divider 2', 'src' => 'http://i1198.photobucket.com/albums/aa449/rob153dave/dividers_03.jpg'), array('value' => 'divider-3', 'label' => 'Divider 3', 'src' => 'http://i1198.photobucket.com/albums/aa449/rob153dave/dividers_04.jpg'), array('value' => 'divider-4', 'label' => 'Divider 4', 'src' => 'http://i1198.photobucket.com/albums/aa449/rob153dave/dividers_05.jpg'), array('value' => 'divider-5', 'label' => 'Divider 5', 'src' => 'http://i1198.photobucket.com/albums/aa449/rob153dave/dividers_06.jpg'), array('value' => 'divider-6', 'label' => 'Divider 6', 'src' => 'http://i1198.photobucket.com/albums/aa449/rob153dave/dividers_07.jpg'), array('value' => 'divider-7', 'label' => 'Divider 7', 'src' => 'http://i1198.photobucket.com/albums/aa449/rob153dave/dividers_08.jpg'), array('value' => 'divider-8', 'label' => 'Divider 8', 'src' => 'http://i1198.photobucket.com/albums/aa449/rob153dave/dividers_09.jpg'), array('value' => 'divider-9', 'label' => 'Divider 9', 'src' => 'http://i1198.photobucket.com/albums/aa449/rob153dave/dividers_10.jpg'))), array('id' => 'services_layout', 'label' => 'Services Layout', 'desc' => '', 'std' => '', 'type' => 'select', 'section' => 'layout_section', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'no', 'label' => 'No sidebar', 'src' => ''), array('value' => 'left', 'label' => 'Left sidebar', 'src' => ''), array('value' => 'right', 'label' => 'Right sidebar', 'src' => ''))), array('id' => 'services_bg', 'label' => 'Services Title Background', 'desc' => 'The background setting for the list of the services.', 'std' => '', 'type' => 'background', 'section' => 'layout_section', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'blog_layout', 'label' => 'Blog Layout', 'desc' => '', 'std' => '', 'type' => 'select', 'section' => 'layout_section', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'no', 'label' => 'No sidebar', 'src' => ''), array('value' => 'left', 'label' => 'Left sidebar', 'src' => ''), array('value' => 'right', 'label' => 'Right sidebar', 'src' => ''))), array('id' => 'gallery_layout', 'label' => 'Gallery Layout', 'desc' => '', 'std' => '', 'type' => 'select', 'section' => 'layout_section', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'no', 'label' => 'No sidebar', 'src' => ''), array('value' => 'left', 'label' => 'Left sidebar', 'src' => ''), array('value' => 'right', 'label' => 'Right sidebar', 'src' => ''))), array('id' => 'gallery_bg', 'label' => 'Gallery Title Background', 'desc' => 'The background setting for the list of the galleries.', 'std' => '', 'type' => 'background', 'section' => 'layout_section', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_left', 'label' => 'Footer left', 'desc' => 'Text for the footer on the left', 'std' => '© Copyright 2013', 'type' => 'text', 'section' => 'layout_section', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_right', 'label' => 'Footer right', 'desc' => 'Text for the footer on the right', 'std' => 'Carpress Theme by <a href="http://www.proteusthemes.com">ProteusThemes</a>', 'type' => 'text', 'section' => 'layout_section', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'soc_icons_infotext', 'label' => 'Social Icons', 'desc' => 'Delete the contents and save if you don\'t want the icons to show up.', 'std' => '', 'type' => 'textblock', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'rss_icon', 'label' => 'RSS feed link', 'desc' => 'Usually you get the RSS feed of your site by adding the /feed to the end of your URL, for example: http://www.your-domain.com/feed/', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'mail_icon', 'label' => 'Contact page icon', 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'twitter_icon', 'label' => 'Twitter', 'desc' => 'Link to your Twitter profile. This is used for social icons in the header of the template', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'facebook_icon', 'label' => 'Facebook', 'desc' => 'Link to your Facebook page/profile. This is used for social icons in the header of the template', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'youtube_icon', 'label' => 'Youtube', 'desc' => 'Link to your YouTube profile. This is used for social icons in the header of the template', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'google_icon', 'label' => 'Google+', 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'pinterest_icon', 'label' => 'Pinterest', 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'skype_icon', 'label' => 'Skype call', 'desc' => 'Type here in just your Skype username and the users will be able to call you if they click the Skype icon.', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'thumblr_icon', 'label' => 'Tumblr', 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'linkedin_icon', 'label' => 'LinkedIn', 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'flickr_icon', 'label' => 'Flickr', 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'instagram_icon', 'label' => 'Instagram', 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'foursquare_icon', 'label' => 'Foursquare', 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social_icons', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'auto_update_instructions', 'label' => 'Auto-update instructions', 'desc' => 'If you fill out the two fields below, you will be notified when the theme update is available and you will be able to update with just one click.

Please note, that all the changes you will make in the code directly will be overwritten with the updates. Use the <a href="http://codex.wordpress.org/Child_Themes">Child Themes</a> to alter the code, <a href="https://github.com/primozcigler/Hairpress-Child-Theme">here is the scaffold for the Hairpress</a>.', 'std' => '', 'type' => 'textblock', 'section' => 'section_auto_updates', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'tf_username', 'label' => 'Your username', 'desc' => 'Your Envato marketplace (ThemeForest) username.', 'std' => '', 'type' => 'text', 'section' => 'section_auto_updates', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'tf_api_key', 'label' => 'API key', 'desc' => 'Your API key (NOT a password). See <a href="https://www.diigo.com/item/p/pdbsqoszbspabboqezbcoserod" target="_blank">here</a> where you can generate your new API key on ThemeForest site.', 'std' => '', 'type' => 'text', 'section' => 'section_auto_updates', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
}
Example #10
0
/**
 * Build the custom settings & update OptionTree.
 *
 * @return    void
 * @since     2.0
 */
function custom_theme_options()
{
    /* OptionTree is not loaded yet, or this is not an admin request */
    if (!function_exists('ot_settings_id') || !is_admin()) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('content' => array(array('id' => 'option_types_help', 'title' => __('Option Types', 'theme-text-domain'), 'content' => '<p>' . __('Help content goes here!', 'theme-text-domain') . '</p>')), 'sidebar' => '<p>' . __('Sidebar content goes here!', 'theme-text-domain') . '</p>'), 'sections' => array(array('id' => 'header', 'title' => __('Header', 'theme-text-domain')), array('id' => 'content', 'title' => __('Content', 'theme-text-domain')), array('id' => 'footer', 'title' => __('Footer', 'theme-text-domain'))), 'settings' => array(array('id' => 'header_text', 'label' => __('Header Text', 'theme-text-domain'), 'desc' => 'Header Text Here', 'std' => '', 'type' => 'text', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'change_logo', 'label' => __('Logo Upload', 'theme-text-domain'), 'desc' => 'Upload your logo', 'std' => '', 'type' => 'upload', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'white_text_title', 'label' => __('White Text Title', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'content', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'white_text_left', 'label' => __('White Text Left', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'textarea', 'section' => 'content', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'white_text_right', 'label' => __('White Text Right', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'textarea', 'section' => 'content', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'green_box', 'label' => __('Green Box (Max 3)', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'list-item', 'section' => 'content', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'settings' => array(array('id' => 'green_box_image', 'label' => __('Image', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'upload', 'section' => 'content', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'green_box_link', 'label' => __('Link', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'content', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'green_box_desc', 'label' => __('Description', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'textarea_simple', 'section' => 'content', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'))), array('id' => 'new_post_title', 'label' => __('New Post Title', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'textarea', 'section' => 'content', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_middle_title', 'label' => __('Footer Middle Title', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_middle', 'label' => __('Footer Middle', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'textarea', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_right_title', 'label' => __('Footer Right Title', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_right_info', 'label' => __('Footer Right Info', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'list-item', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'settings' => array(array('id' => 'footer_right_icon', 'label' => __('Font Awesome Icon', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_right_content', 'label' => __('Content', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'))), array('id' => 'copyright_text', 'label' => __('Copyright Text', 'theme-text-domain'), 'desc' => 'Copyright Text Here', 'std' => '', 'type' => 'text', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
}
Example #11
0
/**
 * Build the custom settings & update OptionTree.
 */
function custom_theme_options()
{
    /* OptionTree is not loaded yet, or this is not an admin request */
    if (!function_exists('ot_settings_id') || !is_admin()) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('sidebar' => ''), 'sections' => array(array('id' => 'addthis', 'title' => __('AddThis', 'helium')), array('id' => 'ajax_navigation', 'title' => __('AJAX Navigation', 'helium')), array('id' => 'typekit', 'title' => __('Typekit', 'helium')), array('id' => 'api_keys', 'title' => __('API Keys', 'helium')), array('id' => 'post_type_slugs', 'title' => __('Post Type Slugs', 'helium')), array('id' => 'envato_credentials', 'title' => __('Envato Credentials', 'helium')), array('id' => 'miscellaneous', 'title' => __('Miscellaneous', 'helium'))), 'settings' => array(array('id' => 'addthis_sharing_buttons', 'label' => __('Sharing Buttons', 'helium'), 'desc' => __('Enter a comma separated list of AddThis social media sharing buttons to show at the end of each item page.
See this for available buttons: <a href="http://www.addthis.com/services/list">www.addthis.com/services/list</a>', 'helium'), 'std' => 'facebook, twitter, email, compact', 'type' => 'text', 'section' => 'addthis', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'addthis_profile_id', 'label' => __('Profile ID', 'helium'), 'desc' => __('Specify here your AddThis profile ID if you want to track your AddThis sharing data.', 'helium'), 'std' => '', 'type' => 'text', 'section' => 'addthis', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'ajax_navigation', 'label' => __('Enabled', 'helium'), 'desc' => __('Specify whether to enable sitewide AJAX navigation to enhance the user experience. Turn this off if you\'re experiencing problems while viewing your site.', 'helium'), 'std' => 'on', 'type' => 'on-off', 'section' => 'ajax_navigation', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'ajax_navigation_scroll_top', 'label' => __('Scroll to Top Before Navigation', 'helium'), 'desc' => __('Specify whether to scroll to top of the page before navigating away from a page.', 'helium'), 'std' => 'on', 'type' => 'on-off', 'section' => 'ajax_navigation', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => 'ajax_navigation:is(on)', 'operator' => 'and'), array('id' => 'ajax_navigation_loading_text', 'label' => __('Loading Text', 'helium'), 'desc' => __('Specify the text to show while a page is being loaded.', 'helium'), 'std' => 'Loading', 'type' => 'text', 'section' => 'ajax_navigation', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => 'ajax_navigation:is(on)', 'operator' => 'and'), array('id' => 'ajax_exclude_urls', 'label' => __('Exclude URLs', 'helium'), 'desc' => __('Specify here a list of URLs on each line where AJAX navigation should be disabled.', 'helium'), 'std' => '', 'type' => 'textarea-simple', 'section' => 'ajax_navigation', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'typekit_kit_id', 'label' => __('Typekit Kit ID', 'helium'), 'desc' => __('Enter here your Typekit Kit ID.', 'helium'), 'std' => '', 'type' => 'text', 'section' => 'typekit', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'typekit_cache', 'label' => __('Cache', 'helium'), 'desc' => __('Turn off Typekit data cache to always update your kit data. It\'s useful when developing the site but make sure to turn it back on in production mode.', 'helium'), 'std' => 'on', 'type' => 'on-off', 'section' => 'typekit', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'twitter_api_keys', 'label' => __('Twitter API Keys', 'helium'), 'desc' => __('Before using Twitter widgets throughout the site, you need to register your API keys by following the instructions below.
<ol>
  <li>Go to <a>http://dev.twitter.com/apps</a> and sign in with your Twitter account.</li>
  <li>Create a new application by clicking the button on the right hand side.</li>
  <li>Once you\'ve created the app, scroll down the application\'s details page to find the OAuth section.</li>
  <li>Copy the consumer secret and consumer key into the fields below.</li>
  <li>Then click the Create Access Token button at the bottom of the page.</li>
  <li>Copy the Access token and Access token secret and paste it into the fields below.</li>
</ol>', 'helium'), 'std' => '', 'type' => 'textblock-titled', 'section' => 'api_keys', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'twitter_consumer_key', 'label' => __('Twitter API Consumer Key', 'helium'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'api_keys', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'twitter_consumer_secret', 'label' => __('Twitter API Consumer Secret', 'helium'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'api_keys', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'twitter_access_token', 'label' => __('Twitter API Access Token', 'helium'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'api_keys', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'twitter_access_token_secret', 'label' => __('Twitter API Access Token Secret', 'helium'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'api_keys', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'portfolio_slug', 'label' => __('Portfolio Slug', 'helium'), 'desc' => __('Specify here the portfolio post type slug. Default is <strong>portfolio</strong>.', 'helium'), 'std' => 'portfolio', 'type' => 'text', 'section' => 'post_type_slugs', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'envato_credentials', 'label' => __('Envato Credentials', 'helium'), 'desc' => __('Enter your Envato Market credentials below to access the demo content importer and get automatic theme update notifications directly from WordPress admin.', 'helium'), 'std' => '', 'type' => 'textblock-titled', 'section' => 'envato_credentials', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'envato_username', 'label' => __('Envato Username', 'helium'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'envato_credentials', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'envato_api_key', 'label' => __('Envato API Key', 'helium'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'envato_credentials', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'custom_css', 'label' => __('Custom CSS', 'helium'), 'desc' => __('Enter here your custom CSS code to be applied to the whole site.', 'helium'), 'std' => '', 'type' => 'css', 'section' => 'miscellaneous', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
}
Example #12
0
function custom_theme_options()
{
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    $blogname = get_bloginfo('name');
    $blogurl = get_bloginfo('url');
    //$categories = get_categories(); $cats_output='';foreach ($categories as $cat) {$cats_output .= $cat->cat_ID.' => '.$cat->cat_name.';<br>';}
    //$posts = get_posts('numberposts=500&post_type=post&orderby=ID&order=DESC'); $posts_output='';foreach($posts as $post) {$posts_output .= $post->ID.' => '.$post->post_title.'&nbsp;&nbsp;(<span style="color:#1cbdc5">'.$post->post_date.'</span>);<br>';}
    //$pages = get_posts('numberposts=50&post_type=page&orderby=ID&order=DESC'); $pages_output='';foreach($pages as $page) {$pages_output .= $page->ID.' => '.$page->post_title.'&nbsp;&nbsp;(<span style="color:#1cbdc5">'.$page->post_date.'</span>);<br>';}
    //$products = get_posts('numberposts=100&post_type=store&orderby=ID&order=DESC'); $products_output='';foreach($products as $product) {$products_output .= $product->ID.' => '.$product->post_title.'&nbsp;&nbsp;(<span style="color:#1cbdc5">'.$product->post_date.'</span>);<br>';}
    $theme = wp_get_theme();
    $version = $theme->get('Version');
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('sections' => array(array('id' => 'tinection', 'title' => 'Tinection'), array('id' => 'general', 'title' => __('通用', 'tinection')), array('id' => 'blog', 'title' => __('阅读', 'tinection')), array('id' => 'header', 'title' => __('头部', 'tinection')), array('id' => 'footer', 'title' => __('底部', 'tinection')), array('id' => 'sidebars', 'title' => __('边栏', 'tinection')), array('id' => 'style', 'title' => __('样式', 'tinection')), array('id' => 'color', 'title' => __('配色字号', 'tinection')), array('id' => 'open', 'title' => __('社会化登录', 'tinection')), array('id' => 'ads', 'title' => __('广告', 'tinection')), array('id' => 'credit', 'title' => __('积分', 'tinection')), array('id' => 'links', 'title' => __('短链接', 'tinection')), array('id' => 'pages', 'title' => __('功能页面', 'tinection')), array('id' => 'membership', 'title' => __('会员系统', 'tinection')), array('id' => 'shop', 'title' => __('商品系统', 'tinection')), array('id' => 'admin', 'title' => __('管理员', 'tinection')), array('id' => 'smtp', 'title' => __('SMTP', 'tinection'))), 'settings' => array(array('id' => 'intro', 'label' => 'Tinection' . $version, 'type' => 'textblock-titled', 'desc' => '<p>' . __('感谢你使用该主题! Enjoy.', 'tinection') . '</p><ul><li>' . __('访问主题专页', 'tinection') . ' <a target="_blank" href="http://www.zhiyanblog.com/tinection.html">Tinection Theme</a></li><li>' . __('获取主题最新版本', 'tinection') . ' <a href="http://www.zhiyanblog.com/tinection-theme-download.html">Download</a></li><!--li>' . __('Tinection github专页', 'tinection') . '<a target="_blank" href="https://github.com/Zhiyanblog/Tinection">GitHub</a></li--><li>' . __('主题功能已制作并强化成插件', 'tinection') . ' <a href="http://www.zhiyanblog.com/store/goods/wordpress-plugin-ucenter-and-market.html">Ucenter & Market</a></li></ul><hr /><p>' . __('如果你觉得主题不错,可以支付宝扫描下方二维码赞助 – 不论数量多少,我都非常感激.', 'tinection') . '</p><p><img src="http://pic.zhiyanblog.com//image.php?di=USU8" title="' . __('赞助我', 'tinection') . '" style="width:160px;height:160px;"></p><div></div>', 'section' => 'tinection'), array('id' => 'tin_description', 'label' => __('页面描述', 'tinection'), 'desc' => __('网站首页描述(非必须,但对SEO有影响)', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'section' => 'general'), array('id' => 'tin_keywords', 'label' => __('页面关键词', 'tinection'), 'desc' => __('网站首页、分类页关键词(非必须,但对SEO有影响,不同关键词用英文逗号隔开)', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'section' => 'general'), array('id' => 'favicon', 'label' => 'Favicon', 'desc' => __('上传一个16x16像素大小的 Png/Gif 图像作为网站的图标', 'tinection'), 'type' => 'upload', 'section' => 'general'), array('id' => 'logo-status', 'label' => __('Logo图像', 'tinection'), 'desc' => __('使用图像替代文本作为网站的Logo', 'tinection'), 'type' => 'on-off', 'section' => 'general', 'std' => 'off'), array('id' => 'logo-img', 'label' => __('自定义Logo图像', 'tinection'), 'desc' => __('上传一个图像作为网站的Logo,推荐大小60x120(max)像素', 'tinection'), 'type' => 'upload', 'section' => 'general'), array('id' => 'gravatar_source', 'label' => __('Gravatar头像源修改', 'tinection'), 'desc' => __('采用多说的Gravatar头像服务器或者SSL链接,解决被墙问题', 'tinection'), 'type' => 'select', 'choices' => array(array('value' => 'duoshuo', 'label' => __('多说', 'tinection')), array('value' => 'ssl', 'label' => __('SSL', 'tinection'))), 'std' => 'ssl', 'section' => 'general'), array('id' => 'enable-gravatar', 'label' => __('是否开启Gravatar头像', 'tinection'), 'desc' => __('如果遭遇加载gravatar头像缓慢拖累网站速度,建议关闭此选项,使用用户上传头像或默认头像代替', 'tinection'), 'type' => 'on-off', 'section' => 'general', 'std' => 'off'), array('id' => 'jquery_source', 'label' => __('jQuery源修改', 'tinection'), 'desc' => __('jQuery源修改,采用本地jQuery或新浪CDN jQuery', 'tinection'), 'type' => 'select', 'choices' => array(array('value' => 'local_jq', 'label' => __('本地jQuery', 'tinection')), array('value' => 'cdn_jq', 'label' => __('新浪CDN jQuery', 'tinection'))), 'std' => 'local_jq', 'section' => 'general'), array('id' => 'catgorydefaultimg', 'label' => __('分类默认特色图片', 'tinection'), 'desc' => __('文章无特色图及内容图片时,根据分类选择默认图片,请填入要开启该选项的分类id,以英文逗号分隔,并将名为cat-分类号.jpg的图片存入主题images目录下', 'tinection'), 'type' => 'text', 'section' => 'general'), array('id' => 'remove_category_links_letters', 'label' => __('分类链接category字符移除', 'tinection'), 'desc' => __('移除分类链接category字符,缩短分类链接,例如原分类链接http://www.zhiyanblog.com/category/wordpress,开启该选项后为http://www.zhiyanblog.com/wordpress', 'tinection'), 'type' => 'on-off', 'std' => 'off', 'section' => 'general'), array('id' => 'sitebuild_date', 'label' => __('建站日期', 'tinection'), 'desc' => __('格式 2014-11-05', 'tinection'), 'type' => 'date_picker', 'section' => 'general'), array('id' => 'wp_auto_save', 'label' => __('取消WP自动保存', 'tinection'), 'desc' => __('在WP后台编辑文章过程,会不断自动保存,导致多个版本占用ID,开启此项以取消自动保存', 'tinection'), 'type' => 'on-off', 'section' => 'general', 'std' => 'off'), array('id' => 'auto_save_image', 'label' => __('编辑文章自动保存远程图片', 'tinection'), 'desc' => __('编辑文章自动保存远程图片,图片过多可能较大几率失败', 'tinection'), 'type' => 'on-off', 'section' => 'general', 'std' => 'off'), array('id' => 'auto_save_image_thumb', 'label' => __('自动保存的远程图片设置特色图', 'tinection'), 'desc' => __('编辑文章自动保存远程图片后设置第一张为特色图', 'tinection'), 'type' => 'on-off', 'section' => 'general', 'std' => 'off'), array('id' => 'headercode', 'label' => __('Header中加载自定义代码', 'tinection'), 'desc' => __('在网页头部Header中加载用户自定义代码,可以是javascript或者css,包含完整代码外标签', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'header'), array('id' => 'footercode', 'label' => __('Footer中加载自定义代码', 'tinection'), 'desc' => __('在网页底部Footer中加载用户自定义代码,可以是javascript或者css,包含完整代码外标签', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'footer'), array('id' => 'beian', 'label' => __('Footer中显示备案号', 'tinection'), 'desc' => __('在网页底部Footer中显示备案号', 'tinection'), 'type' => 'text', 'rows' => '1', 'std' => '', 'section' => 'footer'), array('id' => 'statisticcode', 'label' => __('Footer中加载统计代码', 'tinection'), 'desc' => __('在网页底部Footer中加载统计代码,推荐百度统计', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'footer'), array('id' => 'copyright', 'label' => __('Copyright信息', 'tinection'), 'desc' => __('网站底部版权文字描述', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'std' => 'All Rights Reserved', 'section' => 'footer'), array('id' => 'footer-widgets-singlerow', 'label' => __('底部通栏Widget', 'tinection'), 'desc' => __('网站底部单栏边栏工具,仅允许放置一个小工具,主要用于通栏友情链接小工具', 'tinection'), 'type' => 'on-off', 'std' => 'off', 'section' => 'footer'), array('id' => 'footer-widgets', 'label' => __('Footer边栏小工具列数', 'tinection'), 'desc' => __('请选择合适列数开启底部边栏<br /><i>推荐数量:3</i>', 'tinection'), 'std' => '3', 'type' => 'radio-image', 'section' => 'footer', 'class' => '', 'choices' => array(array('value' => '0', 'label' => 'Disable', 'src' => THEME_URI . '/images/widgets/layout-off.png'), array('value' => '1', 'label' => '1 Column', 'src' => THEME_URI . '/images/widgets/footer-widgets-1.png'), array('value' => '2', 'label' => '2 Columns', 'src' => THEME_URI . '/images/widgets/footer-widgets-2.png'), array('value' => '3', 'label' => '3 Columns', 'src' => THEME_URI . '/images/widgets/footer-widgets-3.png'), array('value' => '4', 'label' => '4 Columns', 'src' => THEME_URI . '/images/widgets/footer-widgets-4.png'))), array('id' => 'double_lan_menu', 'label' => __('中英文菜单', 'tinection'), 'desc' => __('中英文菜单,开启此选项后请至后台菜单编辑界面,在各菜单导航标签属性内加入[span]菜单英文[/span],例如>>首页<<菜单项,包含小图标和英文的导航标签内容应该为[i class="fa fa-home"]&nbsp;[/i]首页[span]Home[/span],请更改[ ]为< >', 'tinection'), 'type' => 'on-off', 'std' => 'off', 'section' => 'blog'), array('id' => 'cmsundisplaycats', 'label' => __('首页排除分类', 'tinection'), 'desc' => __('首页排除的分类', 'tinection'), 'type' => 'category_checkbox', 'std' => '', 'section' => 'blog'), array('id' => 'cmsdisplaycats', 'label' => __('CMS首页自定义分类排序', 'tinection'), 'desc' => __('CMS首页自定义分类排序,请按要求的顺序填写分类ID,以英文逗号隔开', 'tinection'), 'type' => 'text', 'std' => '', 'section' => 'blog'), array('id' => 'latest_period', 'label' => __('CMS首页置顶区最新文章来源时间段', 'tinection'), 'desc' => __('CMS首页置顶区最新文章来源时间段,仅适用于全宽幻灯模式下置顶区最新发布选项卡', 'tinection'), 'type' => 'select', 'choices' => array(array('value' => '1 day ago', 'label' => __('过去24小时', 'tinection')), array('value' => '1 week ago', 'label' => __('过去一周', 'tinection')), array('value' => '1 month ago', 'label' => __('过去一个月', 'tinection'))), 'std' => '1 week ago', 'section' => 'blog'), array('id' => 'content_or_excerpt', 'label' => __('显示摘要或全文', 'tinection'), 'desc' => __('文章列表页面显示摘要或全文', 'tinection'), 'type' => 'select', 'section' => 'blog', 'std' => 'excerpt', 'choices' => array(array('value' => 'content', 'label' => __('全文', 'tinection')), array('value' => 'excerpt', 'label' => __('摘要', 'tinection')))), array('id' => 'excerpt-length', 'label' => __('自动摘要截取字数', 'tinection'), 'desc' => __('如果开启文章列表页显示摘要,请设置自动截取的字数,默认200', 'tinection'), 'type' => 'numeric-slider', 'std' => '200', 'min_max_step' => '0,300,10', 'section' => 'blog'), array('id' => 'readmore', 'label' => __('Read More样式', 'tinection'), 'desc' => __('摘要模式下read more形式', 'tinection'), 'type' => 'text', 'section' => 'blog'), array('id' => 'timthumb', 'label' => __('Timthumb.php缩略图裁剪', 'tinection'), 'desc' => __('采用Timthumb.php缩略图裁剪,使用教程见<a href="http://www.zhiyanblog.com/timthumb-php-wordpress-thumbnail.html" target="_blank">Timthumb.php教程</a>;', 'tinection'), 'type' => 'on-off', 'std' => 'off', 'section' => 'blog'), array('id' => 'cloudimgsuffix', 'label' => __('CDN云存储缩略图后缀参数', 'tinection'), 'desc' => __('如果你使用了CDN图片云存储并关闭Timthumb.php缩略图裁剪,那么推荐你填写该云存储图片裁剪参数,能够有效防止图片大小不均一导致排版错误,建议保持默认即可并推荐使用水煮鱼的七牛插件自动上传网站图片至云空间', 'tinection'), 'type' => 'text', 'std' => '?imageView2/1/w/375/h/250/q/100', 'section' => 'blog'), array('id' => 'lazy_load_img', 'label' => __('图片延迟加载', 'tinection'), 'desc' => __('图片延迟加载,如果出现图片无法加载,请关闭此选项,此外延迟加载对SEO不利', 'tinection'), 'type' => 'on-off', 'std' => 'off', 'section' => 'blog'), array('id' => 'show-single-thumb', 'label' => __('文章页特色图', 'tinection'), 'desc' => __('文章页上方是否显示特色图,若开启请保证添加独一无二的特色图片,以免与文章图片重复', 'tinection'), 'type' => 'on-off', 'std' => 'on', 'section' => 'blog'), array('id' => 'tin_copyright_content_default', 'label' => __('文章页版权信息', 'tinection'), 'desc' => __('文章页版权信息,为默认值,如果作者投稿添加了版权信息,将会覆盖此默认值', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'section' => 'blog', 'std' => __('<p>除特别注明外,本站所有文章均为<a href="{url}" title="{name}" target="_blank">{name}</a>原创,转载请注明出处来自<a href="{link}" title="{title}">{link}</a></p>', 'tinection')), array('id' => 'comment_vip', 'label' => __('评论者VIP等级显示', 'tinection'), 'desc' => __('评论列表添加用户VIP等级认证,评论越多,等级越高', 'tinection'), 'type' => 'on-off', 'std' => 'on', 'section' => 'blog'), array('id' => 'comment_ua', 'label' => __('评论者浏览器信息显示', 'tinection'), 'desc' => '', 'type' => 'on-off', 'std' => 'on', 'section' => 'blog'), array('id' => 'comment_ip', 'label' => __('评论者IP真实地址信息显示', 'tinection'), 'desc' => '', 'type' => 'on-off', 'std' => 'on', 'section' => 'blog'), array('id' => 'local_ip_datebase', 'label' => __('是否采用本地IP真实地址数据库', 'tinection'), 'desc' => __('若开启,请至http://pan.baidu.com/s/1c0pNoWC下载QQWry.dat文件放至主题includes文件夹下,其数据比在线API转换的真实地址更详细,但是会占用一定网站空间', 'tinection'), 'type' => 'on-off', 'std' => 'off', 'section' => 'blog'), array('id' => 'sidebar-areas', 'label' => __('建立边栏区', 'tinection'), 'desc' => __('新建边栏后必须保存设置. <br /><i>注意: 保证每个边栏区有一个独一无二的ID.</i>', 'tinection'), 'type' => 'list-item', 'section' => 'sidebars', 'choices' => array(), 'settings' => array(array('id' => 'id', 'label' => 'Sidebar ID', 'desc' => __('边栏ID必须是独一无二的,例如sidebar-about', 'tinection'), 'std' => 'sidebar-', 'type' => 'text', 'choices' => array()))), array('id' => 's1-home', 'label' => __('首页', 'tinection'), 'desc' => __('[ <strong>is_home</strong> ] 网站首页的边栏.', 'tinection'), 'type' => 'sidebar-select', 'section' => 'sidebars'), array('id' => 's1-single', 'label' => __('文章页', 'tinection'), 'desc' => __('[ <strong>is_single</strong> ] 文章页的边栏.', 'tinection'), 'type' => 'sidebar-select', 'section' => 'sidebars'), array('id' => 's1-archive', 'label' => __('归档页', 'tinection'), 'desc' => __('[ <strong>is_archive</strong> ] 包括标签页和分类页等,如果该页面有一个独特的边栏,将覆盖默认边栏.', 'tinection'), 'type' => 'sidebar-select', 'section' => 'sidebars'), array('id' => 's1-archive-category', 'label' => __('分类页', 'tinection'), 'desc' => __('[ <strong>is_category</strong> ] 分类页的边栏,优先级高于归档页边栏.', 'tinection'), 'type' => 'sidebar-select', 'section' => 'sidebars'), array('id' => 's1-search', 'label' => __('搜索页', 'tinection'), 'desc' => __('[ <strong>is_search</strong> ] 搜索结果页的边栏.', 'tinection'), 'type' => 'sidebar-select', 'section' => 'sidebars'), array('id' => 's1-download', 'label' => __('下载页', 'tinection'), 'desc' => __('[ <strong>is_download</strong> ] 下载页的边栏.', 'tinection'), 'type' => 'sidebar-select', 'section' => 'sidebars'), array('id' => 's1-page', 'label' => __('页面', 'tinection'), 'desc' => __('[ <strong>is_page</strong> ] 页面边栏,如果该页面有一个独特的边栏,将覆盖默认边栏.', 'tinection'), 'type' => 'sidebar-select', 'section' => 'sidebars'), array('id' => 'bkgdcolor', 'label' => __('网页背景颜色', 'tinection'), 'desc' => __('网页背景颜色', 'tinection'), 'type' => 'colorpicker', 'std' => '#fff', 'section' => 'style'), array('id' => 'bkgdimg', 'label' => __('网页背景图像', 'tinection'), 'desc' => __('网页背景图像,会覆盖背景色', 'tinection'), 'type' => 'upload', 'section' => 'style'), array('id' => 'bkgdimg_style', 'label' => __('背景图片样式', 'tinection'), 'desc' => __('背景图片样式,对小图片选择重复,对大图片请选择平铺覆盖背景', 'tinection'), 'type' => 'select', 'std' => 'cover', 'section' => 'style', 'choices' => array(array('value' => 'cover', 'label' => '覆盖'), array('value' => 'repeat', 'label' => '重复'))), array('id' => 'bkgdimgeffect', 'label' => __('网页背景图像效果', 'tinection'), 'desc' => __('是否开启网页背景图像像素化效果', 'tinection'), 'type' => 'on-off', 'std' => 'off', 'section' => 'style'), array('id' => 'custom-login-logo', 'label' => __('登录页logo', 'tinection'), 'desc' => __('留空则使用默认wordpress图标', 'tinection'), 'type' => 'upload', 'section' => 'style'), array('id' => 'openslider', 'label' => __('首页幻灯片', 'tinection'), 'desc' => __('是否开启首页幻灯轮播', 'tinection'), 'type' => 'on-off', 'std' => 'off', 'section' => 'style'), array('id' => 'slider_style', 'label' => __('幻灯样式', 'tinection'), 'desc' => __('幻灯样式,非全宽模式下幻灯右侧加载最新文章动态', 'tinection'), 'type' => 'select', 'std' => 'no_full', 'section' => 'style', 'choices' => array(array('value' => 'full', 'label' => '全宽'), array('value' => 'no_full', 'label' => '非全宽'))), array('id' => 'homeslider', 'label' => __('首页幻灯片列表', 'tinection'), 'desc' => __('首页幻灯片文章及图像来源,请输入需要呈现的文章ID,以英文逗号隔开并为每篇文章设置特色图片', 'tinection'), 'type' => 'text', 'section' => 'style'), array('id' => 'slider_recommend_order', 'label' => __('首页幻灯片右侧文章来源', 'tinection'), 'desc' => __('首页非全宽幻灯片右侧文章排序', 'tinection'), 'type' => 'radio', 'std' => 'latest_reviewed', 'section' => 'style', 'choices' => array(array('value' => 'latest_reviewed', 'label' => __('最新评论排序', 'tinection')), array('value' => 'most_viewed', 'label' => __('最多浏览排序', 'tinection')), array('value' => 'most_reviewed', 'label' => __('最多评论排序', 'tinection')))), array('id' => 'layout', 'label' => __('首页布局', 'tinection'), 'desc' => __('首页CMS布局或Blog布局或Blocks块状布局', 'tinection'), 'type' => 'radio', 'std' => 'cms', 'section' => 'style', 'choices' => array(array('value' => 'cms', 'label' => 'CMS'), array('value' => 'blog', 'label' => 'BLOG'), array('value' => 'blocks', 'label' => 'BLOCKS'))), array('id' => 'blocks_style', 'label' => __('Blocks布局样式', 'tinection'), 'desc' => __('Blocks布局样式,等高块或不等高瀑布流,等高模式推荐timthumb裁剪缩略图以保证图片尺寸一致', 'tinection'), 'type' => 'select', 'std' => 'normal_blocks', 'section' => 'style', 'choices' => array(array('value' => 'normal_blocks', 'label' => '等高块'), array('value' => 'fluid_blocks', 'label' => '瀑布流'))), array('id' => 'cat_blocks_ids', 'label' => __('分类页模板-采用等高块布局的分类', 'tinection'), 'desc' => __('分类页-采用等高块布局的分类', 'tinection'), 'type' => 'category_checkbox', 'std' => '', 'section' => 'style'), array('id' => 'cat_fluid_ids', 'label' => __('分类页模板-采用瀑布流布局的分类', 'tinection'), 'desc' => __('分类页-采用瀑布流布局的分类', 'tinection'), 'type' => 'category_checkbox', 'std' => '', 'section' => 'style'), array('id' => 'cms_catlist_template_bar_0', 'label' => __('首页CMS布局分类并列双栏模板-使用该模板的分类', 'tinection'), 'desc' => __('要使用该模板,请勾选对应分类,该模板为分类并列模板,推荐偶数个分类勾选该模板,并在分类输出排序中使其相邻,同一分类不要勾选多个模板,此外,当首页分类输出超过6个后将强制使用该模板。本模板样式见', 'tinection') . '(<a href="http://pic.zhiyanblog.com//image.php?di=DBJ4" target="_blank">http://pic.zhiyanblog.com//image.php?di=DBJ4</a>)', 'type' => 'category_checkbox', 'std' => '', 'section' => 'style'), array('id' => 'cms_catlist_template_bar_1', 'label' => __('首页CMS布局分类模板1-使用该模板的分类', 'tinection'), 'desc' => __('要使用该模板,请勾选对应分类,同一分类不要勾选多个模板,本模板样式见', 'tinection') . '(<a href="http://pic.zhiyanblog.com//image.php?di=PQ5B" target="_blank">http://pic.zhiyanblog.com//image.php?di=PQ5B</a>)', 'type' => 'category_checkbox', 'std' => '', 'section' => 'style'), array('id' => 'cms_catlist_template_bar_2', 'label' => __('首页CMS布局分类模板2-使用该模板的分类', 'tinection'), 'desc' => __('要使用该模板,请勾选对应分类,同一分类不要勾选多个模板,本模板样式见', 'tinection') . '(<a href="http://pic.zhiyanblog.com//image.php?di=KZS3" target="_blank">http://pic.zhiyanblog.com//image.php?di=KZS3</a>)', 'type' => 'category_checkbox', 'std' => '', 'section' => 'style'), array('id' => 'cms_catlist_template_bar_3', 'label' => __('首页CMS布局分类模板3-使用该模板的分类', 'tinection'), 'desc' => __('要使用该模板,请勾选对应分类,同一分类不要勾选多个模板,本模板样式见', 'tinection') . '(<a href="http://pic.zhiyanblog.com//image.php?di=CRWH" target="_blank">http://pic.zhiyanblog.com//image.php?di=CRWH</a>)', 'type' => 'category_checkbox', 'std' => '', 'section' => 'style'), array('id' => 'cms_catlist_template_bar_4', 'label' => __('首页CMS布局分类模板4-使用该模板的分类', 'tinection'), 'desc' => __('要使用该模板,请勾选对应分类,同一分类不要勾选多个模板,本模板样式见', 'tinection') . '(<a href="http://pic.zhiyanblog.com//image.php?di=IAA4" target="_blank">http://pic.zhiyanblog.com//image.php?di=IAA4</a>)', 'type' => 'category_checkbox', 'std' => '', 'section' => 'style'), array('id' => 'cms_catlist_template_bar_5', 'label' => __('首页CMS布局分类模板5-使用该模板的分类', 'tinection'), 'desc' => __('要使用该模板,请勾选对应分类,同一分类不要勾选多个模板,本模板样式见', 'tinection') . '(<a href="http://pic.zhiyanblog.com//image.php?di=BXI5" target="_blank">http://pic.zhiyanblog.com//image.php?di=BXI5</a>)', 'type' => 'category_checkbox', 'std' => '', 'section' => 'style'), array('id' => 'cms_catlist_template_bar_6', 'label' => __('首页CMS布局分类模板6-使用该模板的分类', 'tinection'), 'desc' => __('要使用该模板,请勾选对应分类,同一分类不要勾选多个模板,本模板样式见', 'tinection') . '(<a href="http://pic.zhiyanblog.com//image.php?di=47YW" target="_blank">http://pic.zhiyanblog.com//image.php?di=47YW</a>)', 'type' => 'category_checkbox', 'std' => '', 'section' => 'style'), array('id' => 'browser_scroll_color', 'label' => __('浏览器滚动条颜色', 'tinection'), 'desc' => __('浏览器滚动条颜色', 'tinection'), 'type' => 'colorpicker', 'std' => '#00d6ac', 'section' => 'color'), array('id' => 'main_body_color', 'label' => __('Body主字体颜色', 'tinection'), 'desc' => __('Body主字体颜色', 'tinection'), 'type' => 'colorpicker', 'std' => '#666', 'section' => 'color'), array('id' => 'main_body_a_color', 'label' => __('Body主字体超链接颜色', 'tinection'), 'desc' => __('Body主字体超链接颜色', 'tinection'), 'type' => 'colorpicker', 'std' => '#428bca', 'section' => 'color'), array('id' => 'main_body_a_hover_color', 'label' => __('Body主字体超链接鼠标悬停颜色', 'tinection'), 'desc' => __('Body主字体超链接鼠标悬停颜色', 'tinection'), 'type' => 'colorpicker', 'std' => '#51ADED', 'section' => 'color'), array('id' => 'block_border_color', 'label' => __('块标题底边色', 'tinection'), 'desc' => __('块标题底边色', 'tinection'), 'type' => 'colorpicker', 'std' => '#f98181', 'section' => 'color'), array('id' => 'title_a_color', 'label' => __('文章标题颜色', 'tinection'), 'desc' => __('文章标题颜色', 'tinection'), 'type' => 'colorpicker', 'std' => '#000', 'section' => 'color'), array('id' => 'title_a_hover_color', 'label' => __('文章标题鼠标悬停颜色', 'tinection'), 'desc' => __('文章标题鼠标悬停颜色', 'tinection'), 'type' => 'colorpicker', 'std' => '#51ADED', 'section' => 'color'), array('id' => 'selection_bg_color', 'label' => __('Selection选取背景色', 'tinection'), 'desc' => __('Selection选取背景色', 'tinection'), 'type' => 'colorpicker', 'std' => '#51aded', 'section' => 'color'), array('id' => 'selection_color', 'label' => __('Selection选取文字颜色', 'tinection'), 'desc' => __('Selection选取文字颜色', 'tinection'), 'type' => 'colorpicker', 'std' => '#fff', 'section' => 'color'), array('id' => 'nav_bg_color', 'label' => __('导航条背景色', 'tinection'), 'desc' => __('导航条背景色', 'tinection'), 'type' => 'colorpicker', 'std' => '#fff', 'section' => 'color'), array('id' => 'menu_color', 'label' => __('菜单文字颜色', 'tinection'), 'desc' => __('菜单文字颜色', 'tinection'), 'type' => 'colorpicker', 'std' => '#333', 'section' => 'color'), array('id' => 'menu_hover_bg_color', 'label' => __('菜单悬停背景色', 'tinection'), 'desc' => __('菜单悬停背景色', 'tinection'), 'type' => 'colorpicker', 'std' => '#f5f5f5', 'section' => 'color'), array('id' => 'menu_hover_color', 'label' => __('菜单悬停文字颜色', 'tinection'), 'desc' => __('菜单悬停文字颜色', 'tinection'), 'type' => 'colorpicker', 'std' => '#51ADED', 'section' => 'color'), array('id' => 'logo_color', 'label' => __('Logo字体颜色', 'tinection'), 'desc' => __('Logo字体颜色', 'tinection'), 'type' => 'colorpicker', 'std' => '#888', 'section' => 'color'), array('id' => 'mobile_title_font_size', 'label' => __('移动端标题字体大小', 'tinection'), 'desc' => __('移动端标题字体大小', 'tinection'), 'type' => 'select', 'choices' => array(array('value' => '12px', 'label' => __('12像素', 'tinection')), array('value' => '13px', 'label' => __('13像素', 'tinection')), array('value' => '14px', 'label' => __('14像素', 'tinection')), array('value' => '15px', 'label' => __('15像素', 'tinection'))), 'std' => '12px', 'section' => 'color'), array('id' => 'mobile_content_font_size', 'label' => __('移动端内容字体大小', 'tinection'), 'desc' => __('移动端内容字体大小', 'tinection'), 'type' => 'select', 'choices' => array(array('value' => '10px', 'label' => __('10像素', 'tinection')), array('value' => '11px', 'label' => __('11像素', 'tinection')), array('value' => '12px', 'label' => __('12像素', 'tinection')), array('value' => '13px', 'label' => __('13像素', 'tinection'))), 'std' => '10px', 'section' => 'color'), array('id' => 'tin_open_qq', 'label' => __('QQ快速登录', 'tinection'), 'desc' => __('在登录弹窗以及评论区域显示QQ快速登录按钮,需要自行申请APP KEY', 'tinection'), 'type' => 'on-off', 'std' => 'off', 'section' => 'open'), array('id' => 'tin_open_qq_id', 'label' => __('QQ开放平台ID', 'tinection'), 'desc' => '', 'type' => 'text', 'std' => '', 'section' => 'open'), array('id' => 'tin_open_qq_key', 'label' => __('QQ开放平台KEY', 'tinection'), 'desc' => '', 'type' => 'text', 'std' => '', 'section' => 'open'), array('id' => 'tin_open_weibo', 'label' => __('微博快速登录', 'tinection'), 'desc' => __('在登录弹窗以及评论区域显示新浪微博快速登录按钮,需要自行申请APP KEY', 'tinection'), 'type' => 'on-off', 'std' => 'off', 'section' => 'open'), array('id' => 'tin_open_weibo_key', 'label' => __('微博开放平台KEY', 'tinection'), 'desc' => '', 'type' => 'text', 'std' => '', 'section' => 'open'), array('id' => 'tin_open_weibo_secret', 'label' => __('微博开放平台SECRET', 'tinection'), 'desc' => '', 'type' => 'text', 'std' => '', 'section' => 'open'), array('id' => 'tin_open_weixin', 'label' => __('微信快速登录', 'tinection'), 'desc' => __('在登录弹窗以及评论区域显示微信快速登录按钮,需要自行申请APP KEY', 'tinection'), 'type' => 'on-off', 'std' => 'off', 'section' => 'open'), array('id' => 'tin_open_weixin_id', 'label' => __('微信开放平台ID', 'tinection'), 'desc' => '', 'type' => 'text', 'std' => '', 'section' => 'open'), array('id' => 'tin_open_weixin_key', 'label' => __('微信开放平台SECRET', 'tinection'), 'desc' => '', 'type' => 'text', 'std' => '', 'section' => 'open'), array('id' => 'tin_open_role', 'label' => __('新登录用户角色', 'tinection'), 'desc' => '', 'type' => 'select', 'choices' => array(array('value' => 'subscriber', 'label' => __('订阅者', 'tinection')), array('value' => 'contributor', 'label' => __('投稿者', 'tinection')), array('value' => 'author', 'label' => __('作者', 'tinection')), array('value' => 'editor', 'label' => __('编辑', 'tinection')), array('value' => 'administrator', 'label' => __('管理员', 'tinection'))), 'std' => 'contributor', 'section' => 'open'), array('id' => 'headerad', 'label' => __('顶部自定义广告', 'tinection'), 'desc' => __('在网页顶部加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,最大宽度1120px', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'ads'), array('id' => 'bottomad', 'label' => __('底部自定义广告', 'tinection'), 'desc' => __('在网页底部加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,最大宽度1120px', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'ads'), array('id' => 'cmswithsidebar_loop_ad', 'label' => __('首页文章循环内部广告', 'tinection'), 'desc' => __('带边栏首页文章循环内部加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,最大宽度800px', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'ads'), array('id' => 'singletopad', 'label' => __('文章页上部广告', 'tinection'), 'desc' => __('在文章顶部加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,最大宽度800px', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'ads'), array('id' => 'singlethumbad', 'label' => __('文章页缩略图下方广告', 'tinection'), 'desc' => __('在文章页缩略图下方加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,最大宽度800px,如果没有缩略图将不显示', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'ads'), array('id' => 'singlebottomad', 'label' => __('文章页下部广告', 'tinection'), 'desc' => __('在文章底部加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,最大宽度800px', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'ads'), array('id' => 'cmntad1', 'label' => __('评论区顶部广告', 'tinection'), 'desc' => __('在文章评论顶部加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,最大宽度800px', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'ads'), array('id' => 'cmntad2', 'label' => __('评论区内部广告', 'tinection'), 'desc' => __('在文章评论内部加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,最大宽度800px', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'ads'), array('id' => 'singlead1_mobile', 'label' => __('文章页上部移动广告', 'tinection'), 'desc' => __('在移动设备文章上部加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,推荐宽度320px', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'ads'), array('id' => 'singlead2_mobile', 'label' => __('文章页底部移动广告', 'tinection'), 'desc' => __('在移动设备文章底部加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,推荐宽度320px', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'ads'), array('id' => 'dlad1', 'label' => __('下载页广告1', 'tinection'), 'desc' => __('在下载页加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,推荐尺寸336*300以内', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'ads'), array('id' => 'dlad2', 'label' => __('下载页广告2', 'tinection'), 'desc' => __('在下载页加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,推荐尺寸760*90以内', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'ads'), array('id' => 'dlad3', 'label' => __('下载页广告3', 'tinection'), 'desc' => __('在下载页加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,推荐尺寸336*300以内', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'ads'), array('id' => 'dlad4', 'label' => __('下载页广告4', 'tinection'), 'desc' => __('在下载页加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,推荐尺寸336*300以内', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'ads'), array('id' => 'floatad', 'label' => __('演示页广告', 'tinection'), 'desc' => __('在演示页加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,推荐浮动对联广告', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'ads'), array('id' => 'tin_cash_credit_ratio', 'label' => __('现金积分兑换比率', 'tinection'), 'desc' => __('1元所能兑换的积分数,用于计算积分充值', 'tinection'), 'type' => 'text', 'std' => '50', 'section' => 'credit'), array('id' => 'tin_daily_sign_credits', 'label' => __('每日签到积分奖励', 'tinection'), 'desc' => __('每日签到积分奖励', 'tinection'), 'type' => 'text', 'std' => '10', 'section' => 'credit'), array('id' => 'tin_reg_credit', 'label' => __('新用户注册奖励', 'tinection'), 'desc' => __('新用户首次注册奖励积分', 'tinection'), 'type' => 'text', 'std' => '50', 'section' => 'credit'), array('id' => 'tin_rec_post_credit', 'label' => __('投稿一次奖励积分', 'tinection'), 'desc' => __('投稿者投稿通过后奖励积分', 'tinection'), 'type' => 'text', 'std' => '50', 'section' => 'credit'), array('id' => 'tin_rec_post_num', 'label' => __('每日投稿获得积分次数', 'tinection'), 'desc' => __('每天通过投稿获得积分的最大次数,超出后将不再获得积分', 'tinection'), 'type' => 'text', 'std' => '5', 'section' => 'credit'), array('id' => 'tin_rec_comment_credit', 'label' => __('评论一次奖励积分', 'tinection'), 'desc' => __('评论一次奖励积分', 'tinection'), 'type' => 'text', 'std' => '5', 'section' => 'credit'), array('id' => 'tin_rec_comment_num', 'label' => __('每日评论获得积分次数', 'tinection'), 'desc' => __('每天通过评论获得积分的最大次数,超出后将不再获得积分', 'tinection'), 'type' => 'text', 'std' => '20', 'section' => 'credit'), array('id' => 'tin_rec_reg_credit', 'label' => __('注册推广一次奖励积分', 'tinection'), 'desc' => __('通过专属推广链接推广新用户注册一次所奖励积分', 'tinection'), 'type' => 'text', 'std' => '50', 'section' => 'credit'), array('id' => 'tin_rec_reg_num', 'label' => __('每日注册推广奖励积分次数', 'tinection'), 'desc' => __('每天通过注册推广获得积分的最大次数,超出后将不再获得积分', 'tinection'), 'type' => 'text', 'std' => '5', 'section' => 'credit'), array('id' => 'tin_rec_view_credit', 'label' => __('访问推广一次奖励积分', 'tinection'), 'desc' => __('通过专属推广链接推广用户访问一次奖励积分', 'tinection'), 'type' => 'text', 'std' => '5', 'section' => 'credit'), array('id' => 'tin_rec_view_num', 'label' => __('每日访问推广奖励积分次数', 'tinection'), 'desc' => __('每天通过访问推广获得积分的最大次数,超出后将不再获得积分', 'tinection'), 'type' => 'text', 'std' => '50', 'section' => 'credit'), array('id' => 'tin_rec_resource_dl_credit', 'label' => __('作者发布的资源被下载一次可得积分', 'tinection'), 'desc' => __('作者发布的资源被用户下载后获得积分奖励,不限次数', 'tinection'), 'type' => 'text', 'std' => '5', 'section' => 'credit'), array('id' => 'tin_like_article_credit', 'label' => __('文章互动可得积分', 'tinection'), 'desc' => __('文章互动可得积分,点击喜欢文章可获得积分', 'tinection'), 'type' => 'text', 'std' => '5', 'section' => 'credit'), array('id' => 'tin_like_article_credit_times', 'label' => __('文章互动可得积分每日次数', 'tinection'), 'desc' => __('文章互动可得积分每日次数,点击喜欢文章可获得积分的每日次数限制', 'tinection'), 'type' => 'text', 'std' => '5', 'section' => 'credit'), array('id' => 'hop_links_baseurl', 'label' => __('短链接前缀符', 'tinection'), 'desc' => __('短链接前缀符,即www.zhiyanblog.com/go/aliyun中的go', 'tinection'), 'type' => 'text', 'std' => 'go', 'section' => 'links'), array('id' => 'hop_links', 'label' => __('短链接记录', 'tinection'), 'desc' => __('短链接记录,一行一个,格式为短链接缩写名|真实链接地址,真实链接地址必须带http或https', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'std' => 'baidu|http://www.baidu.com', 'section' => 'links'), array('id' => 'page_dl', 'label' => __('下载页面链接后缀', 'tinection'), 'desc' => __('下载页面的后缀设置,例如www.zhiyanblog.com/dl为我以download page为模板建立的下载页面,那么填写dl即可', 'tinection'), 'type' => 'text', 'std' => 'dl', 'section' => 'pages'), array('id' => 'page_demo', 'label' => __('演示页面链接后缀', 'tinection'), 'desc' => __('演示页面的后缀设置,例如www.zhiyanblog.com/demo为我以demo page为模板建立的下载页面,那么填写demo即可', 'tinection'), 'type' => 'text', 'std' => 'demo', 'section' => 'pages'), array('id' => 'page_newsletter', 'label' => __('邮件订阅及在线阅读页面链接后缀', 'tinection'), 'desc' => __('邮件订阅及在线阅读页面的后缀设置,例如www.zhiyanblog.com/newsletter为我以newsletter为模板建立的邮件订阅页面,那么填写newsletter即可', 'tinection'), 'type' => 'text', 'std' => 'newsletter', 'section' => 'pages'), array('id' => 'member_system', 'label' => __('开启会员系统', 'tinection'), 'desc' => __('开启会员系统,会创建相关数据库', 'tinection'), 'type' => 'on-off', 'std' => 'off', 'section' => 'membership'), array('id' => 'vip_monthly_price', 'label' => __('月费会员价格', 'tinection'), 'desc' => __('月费会员价格,单位:元', 'tinection'), 'type' => 'text', 'std' => '10', 'section' => 'membership'), array('id' => 'vip_quarterly_price', 'label' => __('季费会员价格', 'tinection'), 'desc' => __('季费会员价格,单位:元', 'tinection'), 'type' => 'text', 'std' => '25', 'section' => 'membership'), array('id' => 'vip_annual_price', 'label' => __('年费会员价格', 'tinection'), 'desc' => __('年费会员价格,单位:元', 'tinection'), 'type' => 'text', 'std' => '90', 'section' => 'membership'), array('id' => 'shop_system', 'label' => __('开启商品系统', 'tinection'), 'desc' => __('开启商品系统,必须同时开启会员系统以计算优惠等内容', 'tinection'), 'type' => 'on-off', 'std' => 'off', 'section' => 'shop'), array('id' => 'alipay_email', 'label' => __('支付宝收款帐户邮箱', 'tinection'), 'desc' => __('支付宝收款帐户邮箱,要收款必填并务必保持正确', 'tinection'), 'type' => 'text', 'std' => '', 'section' => 'shop'), array('id' => 'alipay_partner', 'label' => __('支付宝商家身份ID', 'tinection'), 'desc' => __('合作身份者id,以2088开头的16位纯数字', 'tinection'), 'type' => 'text', 'std' => '', 'section' => 'shop'), array('id' => 'alipay_key', 'label' => __('支付宝商家身份Key', 'tinection'), 'desc' => __('支付宝商家身份安全检验码,以数字和字母组成的32位字符', 'tinection'), 'type' => 'text', 'std' => '', 'section' => 'shop'), array('id' => 'alipay_service', 'label' => __('支付宝商家收款类型', 'tinection'), 'desc' => __('支付宝商家收款类型,只支持双功能和担保交易,注意:切换类型后必须对应修改商家身份key', 'tinection'), 'type' => 'select', 'choices' => array(array('value' => 'create_direct_pay_by_user', 'label' => __('即时到账', 'tinection')), array('value' => 'trade_create_by_buyer', 'label' => __('双功能收款', 'tinection')), array('value' => 'create_partner_trade_by_buyer', 'label' => __('担保交易', 'tinection'))), 'std' => 'create_partner_trade_by_buyer', 'section' => 'shop'), array('id' => 'shop_archives_slug', 'label' => __('商品归档页链接后缀', 'tinection'), 'desc' => __('商品归档页链接后缀,默认为store,即默认可以通过<a href="' . $blogurl . '/store" target="_blank">' . $blogurl . '/store</a>访问商品归档页', 'tinection'), 'type' => 'text', 'std' => 'store', 'section' => 'shop'), array('id' => 'product_link_mode', 'label' => __('商品展示页固定链接模式', 'tinection'), 'desc' => __('商品展示页固定链接模式,请根据普通文章的固定链接模式选择', 'tinection'), 'type' => 'select', 'choices' => array(array('value' => 'post_id', 'label' => __('POST ID', 'tinection')), array('value' => 'post_name', 'label' => __('POST NAME', 'tinection'))), 'std' => 'post_id', 'section' => 'shop'), array('id' => 'shop_archives_title', 'label' => __('商品归档页大标题', 'tinection'), 'desc' => __('商品归档页大标题', 'tinection'), 'type' => 'text', 'std' => 'WordPress商店', 'section' => 'shop'), array('id' => 'shop_archives_sub_title', 'label' => __('商品归档页副标题', 'tinection'), 'desc' => __('商品归档页副标题', 'tinection'), 'type' => 'text', 'std' => 'Theme - Service - Resource', 'section' => 'shop'), array('id' => 'sitenews', 'label' => __('站点消息', 'tinection'), 'desc' => __('网站顶部显示站点自定义消息,一行一条消息', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'admin'), array('id' => 'newsletter', 'label' => __('邮件周刊', 'tinection'), 'desc' => __('每周向订阅用户发送上周内发布的新文章', 'tinection'), 'type' => 'on-off', 'std' => 'off', 'section' => 'admin'), array('id' => 'login_failed_notify', 'label' => __('登陆错误提醒', 'tinection'), 'desc' => __('登陆错误时邮件提醒', 'tinection'), 'type' => 'on-off', 'std' => 'off', 'section' => 'admin'), array('id' => 'login_success_notify', 'label' => __('登录成功提醒', 'tinection'), 'desc' => __('登录成功时邮件提醒', 'tinection'), 'type' => 'on-off', 'std' => 'off', 'section' => 'admin'), array('id' => 'email_verifylist', 'label' => __('注册邮箱黑/白名单', 'tinection'), 'desc' => __('注册邮箱黑/白名单,多个以回车换行分隔', 'tinection'), 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'admin'), array('id' => 'email_verifymode', 'label' => __('注册邮箱黑/白名单模式', 'tinection'), 'desc' => __('注册邮箱黑/白名单模式,白名单模式即符合设置内域名的邮箱可以注册,黑名单模式即匹配设置内域名的邮箱不可以注册', 'tinection'), 'type' => 'radio', 'choices' => array(array('value' => 'whitelist', 'label' => __('白名单模式', 'tinection')), array('value' => 'blacklist', 'label' => __('黑名单模式', 'tinection'))), 'std' => 'blacklist', 'section' => 'admin'), array('id' => 'bad_domain_message', 'label' => __('注册邮箱名单错误提醒', 'tinection'), 'desc' => __('当注册邮箱域不符合白名单或位于黑名单时的错误提醒消息', 'tinection'), 'type' => 'textarea_simple', 'rows' => '2', 'std' => '不允许此类型邮箱注册', 'section' => 'admin'), array('id' => 'disable_reset_pwd', 'label' => __('禁用密码找回', 'tinection'), 'desc' => __('禁用密码找回,防止通过此接口无限找回密码请求并发送邮件卡死主机', 'tinection'), 'type' => 'on-off', 'std' => 'off', 'section' => 'admin'), array('id' => 'span_comments', 'label' => __('评论过滤', 'tinection'), 'desc' => __('纯英文或日文评论过滤', 'tinection'), 'type' => 'on-off', 'std' => 'off', 'section' => 'admin'), array('id' => 'tin_can_post_cat', 'label' => __('允许投稿分类', 'tinection'), 'desc' => __('允许投稿的分类,不勾选则不开放投稿', 'tinection'), 'type' => 'category_checkbox', 'std' => '', 'section' => 'admin'), array('id' => 'tin_sinaweibo', 'label' => __('新浪微博', 'tinection'), 'desc' => __('新浪微博,例如我的新浪微博主页http://weibo.com/touchumind/,则填写touchumind即可', 'tinection'), 'type' => 'text', 'std' => 'touchumind', 'section' => 'admin'), array('id' => 'tin_qqweibo', 'label' => __('腾讯微博', 'tinection'), 'desc' => __('腾讯微博,例如我的腾讯微博主页http://t.qq.com/touchumind,则填写touchumind即可', 'tinection'), 'type' => 'text', 'std' => 'touchumind', 'section' => 'admin'), array('id' => 'tin_qq', 'label' => __('QQ/QQ空间', 'tinection'), 'desc' => __('QQ/QQ空间,例如我的QQ空间主页http://user.qzone.qq.com/813920477/,则填写813920477即可', 'tinection'), 'type' => 'text', 'std' => '813920477', 'section' => 'admin'), array('id' => 'tin_weixin', 'label' => __('微信', 'tinection'), 'desc' => __('微信二维码图片', 'tinection'), 'type' => 'upload', 'std' => 'http://pic.zhiyanblog.com/?di=Z4EI', 'section' => 'admin'), array('id' => 'tin_qqgroup', 'label' => 'QQ群链接', 'desc' => __('加入QQ群链接,用于QQ群推广,请至http://qun.qq.com/join.html获取你的网站QQ群的推广链接', 'tinection'), 'type' => 'text', 'std' => '', 'section' => 'admin'), array('id' => 'tin_qq_mail', 'label' => 'QQ邮我按钮', 'desc' => __('QQ邮我按钮,用于快速邮件联系,请至http://open.mail.qq.com获取代码', 'tinection'), 'type' => 'text', 'std' => 'http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=cBMYGR4RAxhCQEFAMAYZAF4BAV4THx0', 'section' => 'admin'), array('id' => 'tin_qqlist', 'label' => __('QQ邮件列表', 'tinection'), 'desc' => __('QQ邮件列表订阅链接中ID值,例如订阅链接为http://list.qq.com/cgi-bin/qf_invite?id=38c32a0083496c8c74265b09a0a7e2af923171f3704f4a7b,仅需填写38c32a0083496c8c74265b09a0a7e2af923171f3704f4a7b即可,详见http://list.qq.com', 'tinection'), 'type' => 'text', 'std' => '38c32a0083496c8c74265b09a0a7e2af923171f3704f4a7b', 'section' => 'admin'), array('id' => 'tin_aboutsite', 'label' => __('关于本站小工具内容', 'tinection'), 'desc' => __('关于本站小工具内容', 'tinection'), 'type' => 'textarea_simple', 'std' => '知言博客是由WordPress爱好者Zhiyan建立的一个WordPress以及WEB资源站,集WordPress教程、主题、插件以及众多前端素材、代码等其他内容于一体,本站汇集为WordPress以及前端开发提供帮助的前端网页特效、建站PSD模板、网页模板、开发教程等素材,相关内容均保证绿色安全、优质实用,是您建站学习好帮手。Zhiyan欢迎大家多多交流,期待共同学习进步。', 'section' => 'admin'), array('id' => 'alipay_qr', 'label' => __('支付宝收款二维码', 'tinection'), 'desc' => __('支付宝收款二维码,请至支付宝获取二维码并填写二维码图片链接', 'tinection'), 'type' => 'text', 'std' => '', 'section' => 'admin'), array('id' => 'alipay_donate_num', 'label' => __('支付宝赞助默认金额设置', 'tinection'), 'desc' => __('支付宝赞助默认金额设置,仅限网页方式的赞助打款,按钮出现在文章页作者信息栏', 'tinection'), 'type' => 'text', 'std' => '10', 'section' => 'admin'), array('id' => 'smtp_switch', 'label' => __('SMTP发信开关', 'tinection'), 'desc' => __('使用SMTP替代默认PHP mail()函数发信', 'tinection'), 'type' => 'on-off', 'section' => 'smtp', 'std' => 'off'), array('id' => 'smtp_host', 'label' => __('SMTP发信服务器', 'tinection'), 'desc' => __('SMTP发信服务器,例如smtp.163.com', 'tinection'), 'type' => 'text', 'section' => 'smtp', 'std' => ''), array('id' => 'smtp_port', 'label' => __('SMTP发信服务器端口', 'tinection'), 'desc' => __('SMTP发信服务器端口,不开启SSL时一般默认25,开启SSL一般为465', 'tinection'), 'type' => 'text', 'section' => 'smtp', 'std' => '25'), array('id' => 'smtp_ssl', 'label' => __('SMTP发信服务器SSL连接', 'tinection'), 'desc' => __('SMTP发信服务器SSL连接,请相应修改端口', 'tinection'), 'type' => 'on-off', 'section' => 'smtp', 'std' => 'off'), array('id' => 'smtp_user', 'label' => __('SMTP发信用户名', 'tinection'), 'desc' => __('SMTP发信用户名,一般为完整邮箱号', 'tinection'), 'type' => 'text', 'section' => 'smtp', 'std' => ''), array('id' => 'smtp_pass', 'label' => __('SMTP帐号密码', 'tinection'), 'desc' => __('SMTP帐号密码', 'tinection'), 'type' => 'text', 'section' => 'smtp', 'std' => ''), array('id' => 'smtp_name', 'label' => __('SMTP发信人昵称', 'tinection'), 'desc' => __('SMTP发信人昵称', 'tinection'), 'type' => 'text', 'section' => 'smtp', 'std' => $blogname)));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
}
/**
 * Build the custom settings & update OptionTree.
 */
function custom_theme_options()
{
    /* OptionTree is not loaded yet, or this is not an admin request */
    if (!function_exists('ot_settings_id') || !is_admin()) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('sidebar' => ''), 'sections' => array(array('id' => 'general', 'title' => __('General', 'wordpress-template')), array('id' => 'footer', 'title' => __('Footer', 'wordpress-template')), array('id' => 'social', 'title' => __('Social', 'wordpress-template')), array('id' => 'social-api', 'title' => __('API Keys', 'wordpress-template'))), 'settings' => array(array('id' => 'brick', 'label' => __('Brick', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'radio-image', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => '2x1', 'label' => __('2x1', 'wordpress-template'), 'src' => get_stylesheet_directory_uri() . '/img/ncstate-brick-2x1-red.png'), array('value' => '2x2', 'label' => __('2x2', 'wordpress-template'), 'src' => get_stylesheet_directory_uri() . '/img/ncstate-brick-2x2-red.png'))), array('id' => 'ga_id', 'label' => __('Google Analytics ID', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cse_id', 'label' => __('Google Custom Search Engine ID', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'address', 'label' => __('Address', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'textarea', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'resource_links', 'label' => __('Resource Links', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'list-item', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'settings' => array(array('id' => 'url', 'label' => __('URL', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'))), array('id' => 'facebook', 'label' => __('Facebook Username', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'twitter', 'label' => __('Twitter Username', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'instagram', 'label' => __('Instagram Username', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'youtube', 'label' => __('YouTube Username', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'rss', 'label' => __('RSS', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'FACEBOOK_APP_ID', 'label' => __('Facebook App ID', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social-api', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'FACEBOOK_SECRET', 'label' => __('Facebook Secret', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social-api', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'INSTAGRAM_APP_KEY', 'label' => __('Instagram App Key', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social-api', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'TWITTER_CONSUMER_KEY', 'label' => __('Twitter Consumer Key', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social-api', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'TWITTER_CONSUMER_SECRET', 'label' => __('Twitter Consumer Secret', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social-api', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'OAUTH_TOKEN', 'label' => __('Twitter oAuth Token', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social-api', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'OAUTH_TOKEN_SECRET', 'label' => __('Twitter oAuth Token Secret', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social-api', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
}
Example #14
0
/**
 * Build the custom settings & update OptionTree.
 */
function custom_theme_options()
{
    /* OptionTree is not loaded yet */
    if (!function_exists('ot_settings_id')) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    $cb_docs_url = 'http://docs.cubellthemes.com/ness/';
    $cb_support_url = 'http://cubell.ticksy.com';
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('sidebar' => ''), 'sections' => array(array('id' => 'ot_general', 'title' => 'General'), array('id' => 'cb_homepage', 'title' => 'Homepage'), array('id' => 'cb_menus', 'title' => 'Menu'), array('id' => 'cb_post_settings', 'title' => 'Posts'), array('id' => 'ot_typography', 'title' => 'Typography'), array('id' => 'ot_footer', 'title' => 'Footer'), array('id' => 'ot_custom_code', 'title' => 'Custom Code'), array('id' => 'cb_misc', 'title' => 'Misc.'), array('id' => 'cb_help', 'title' => 'Theme Help')), 'settings' => array(array('id' => 'cb_logo_url', 'label' => 'Logo', 'desc' => 'Upload your logo. This logo appears on top of homepage slider, category/archive/author/etc cover images and post featured images. Logo that appears in sticky menu is set in "Theme Options -> Menus" section. (Recommended size: 130px x 30px).', 'std' => '', 'type' => 'upload', 'section' => 'ot_general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_logo_url_retina', 'label' => 'Retina Logo', 'desc' => 'If you have created one, upload the Retina version of your logo (double size of normal logo).', 'std' => '', 'type' => 'upload', 'section' => 'ot_general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_favicon_url', 'label' => 'Favicon', 'desc' => 'Upload your favicon.', 'std' => '', 'type' => 'upload', 'section' => 'ot_general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_lightbox_onoff', 'label' => 'Lightbox', 'desc' => '', 'std' => '', 'type' => 'on-off', 'section' => 'ot_general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_responsive_onoff', 'label' => 'Responsive Theme', 'desc' => '', 'std' => '', 'type' => 'on-off', 'section' => 'ot_general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_blog_style', 'label' => 'Homepage Post Layout', 'desc' => '', 'std' => 'excerpt1', 'type' => 'radio-image', 'section' => 'cb_homepage', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => '1', 'label' => 'One Post Per Line', 'src' => '/blog_style_a.png'), array('value' => 'excerpt1', 'label' => 'One Post Per Line With Excerpt', 'src' => '/blog_style_excerpt_a.png'), array('value' => '2', 'label' => 'Two Posts Per Line', 'src' => '/blog_style_b.png'), array('value' => '3', 'label' => 'Three Posts Per Line', 'src' => '/blog_style_c.png'))), array('id' => 'cb_hp_infinite', 'label' => 'Pagination Style', 'desc' => '', 'std' => '', 'type' => 'select', 'section' => 'cb_homepage', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'choices' => array(array('value' => 'infinite-load', 'label' => 'Infinite Scroll With Load More Button', 'src' => ''), array('value' => 'infinite-scroll', 'label' => 'Infinite Scroll', 'src' => ''), array('value' => 'off', 'label' => 'Number Pagination', 'src' => ''))), array('id' => 'cb_hp_slider', 'label' => 'Homepage Full-Screen Slider', 'desc' => 'Show a full-screen slider on the homepage', 'std' => 'off', 'type' => 'on-off', 'section' => 'cb_homepage', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_hp_slider_count', 'label' => 'Number of posts', 'desc' => 'Number of posts to appear in the slider', 'std' => '6', 'type' => 'numeric-slider', 'section' => 'cb_homepage', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '2,20,1', 'class' => 'cb-sub', 'condition' => 'cb_hp_slider:is(on)', 'operator' => 'and'), array('id' => 'cb_hp_slider_filter', 'label' => 'Posts in slider', 'desc' => 'What posts to show in the slider', 'std' => '', 'type' => 'select', 'section' => 'cb_homepage', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'cb-sub', 'condition' => 'cb_hp_slider:is(on)', 'operator' => 'and', 'choices' => array(array('value' => 'latest', 'label' => 'Latest published', 'src' => ''), array('value' => 'cat', 'label' => 'By Categories', 'src' => ''), array('value' => 'tags', 'label' => 'By Tags', 'src' => ''))), array('id' => 'cb_hp_slider_offset', 'label' => 'Homepage Slider Offset', 'desc' => 'If enabled, the slider will show posts 1-6, and the posts below the slider will show from post 7-end, this way no duplicates.', 'std' => '', 'type' => 'on-off', 'section' => 'cb_homepage', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'cb-sub-sub', 'condition' => 'cb_hp_slider_filter:is(latest),cb_hp_slider:is(on)', 'operator' => 'and'), array('id' => 'cb_hp_slider_cat', 'label' => 'Homepage Slider Category', 'desc' => '', 'std' => '', 'type' => 'category-checkbox', 'section' => 'cb_homepage', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'cb-sub-sub', 'condition' => 'cb_hp_slider_filter:is(cat),cb_hp_slider:is(on)', 'operator' => 'and'), array('id' => 'tags_cb', 'label' => 'Tag Filter', 'desc' => 'Type the name of the tag to search for it and then click it in the list to add it to the module.', 'std' => '', 'type' => 'text', 'section' => 'cb_homepage', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'cb-sub-sub', 'condition' => 'cb_hp_slider_filter:is(tags),cb_hp_slider:is(on)', 'operator' => 'and'), array('id' => 'cb_menu_type', 'label' => 'Type of Menu', 'desc' => '', 'std' => 'cb-slide', 'type' => 'radio-image', 'section' => 'cb_menus', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'cb-slide', 'label' => 'Slide-In', 'src' => '/cb-slide.png'), array('value' => 'cb-standard', 'label' => 'Regular', 'src' => '/cb-regular.png'))), array('id' => 'cb_search_in_menu', 'label' => 'Show Search In Menu', 'desc' => '', 'std' => 'on', 'type' => 'on-off', 'section' => 'cb_menus', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_sticky_nav', 'label' => 'Sticky Main Menu', 'desc' => '', 'std' => 'off', 'type' => 'on-off', 'section' => 'cb_menus', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_menu_style', 'label' => 'Sticky Navigation Bar Style', 'desc' => '', 'std' => '', 'type' => 'select', 'section' => 'cb_menus', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'cb-sub', 'condition' => 'cb_sticky_nav:is(on)', 'operator' => 'and', 'choices' => array(array('value' => 'cb-light', 'label' => 'Light', 'src' => ''), array('value' => 'cb-dark', 'label' => 'Dark', 'src' => ''))), array('id' => 'cb_sticky_menu_logo', 'label' => 'Sticky Menu Logo', 'desc' => 'Logo to be used in sticky menu (Recommended size: 100px x 20px)', 'std' => '', 'type' => 'upload', 'section' => 'cb_menus', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'cb-sub', 'condition' => 'cb_sticky_nav:is(on)', 'operator' => 'and'), array('id' => 'cb_sticky_menu_logo_retina', 'label' => 'Sticky Menu Logo Retina', 'desc' => 'If you have created one, upload the Retina version of your logo (double size of normal logo).', 'std' => '', 'type' => 'upload', 'section' => 'cb_menus', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'cb-sub', 'condition' => 'cb_sticky_nav:is(on)', 'operator' => 'and'), array('id' => 'cb_previous_next_onoff', 'label' => 'Show Next/Previous in sticky menu after scrolling', 'desc' => '', 'std' => '', 'type' => 'on-off', 'section' => 'cb_menus', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'cb-sub', 'condition' => 'cb_sticky_nav:is(on),cb_menu_type:is(cb-slide)', 'operator' => 'and'), array('id' => 'cb_progress_bar_onoff', 'label' => 'Show percentage of progress when reading a post', 'desc' => '', 'std' => '', 'type' => 'on-off', 'section' => 'cb_menus', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'cb-sub', 'condition' => 'cb_sticky_nav:is(on),cb_menu_type:is(cb-slide)', 'operator' => 'and'), array('id' => 'cb_sidebar_posts', 'label' => 'Show posts in sidebar menu', 'desc' => 'If using the regular menu, this only applies to mobile devices', 'std' => 'on', 'type' => 'on-off', 'section' => 'cb_menus', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_sidebar_posts_title', 'label' => 'Title above posts', 'desc' => 'The title to appear above the posts in the slide-in menu', 'std' => '', 'type' => 'textarea-simple', 'section' => 'cb_menus', 'rows' => '1', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'cb-sub', 'condition' => 'cb_sidebar_posts:is(on)', 'operator' => 'and'), array('id' => 'cb_sidebar_posts_filter', 'label' => 'What posts to show', 'desc' => '', 'std' => '', 'type' => 'select', 'section' => 'cb_menus', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'cb-sub', 'condition' => 'cb_sidebar_posts:is(on)', 'operator' => 'and', 'choices' => array(array('value' => 'rand', 'label' => 'Random'), array('value' => 'meta_value_num', 'label' => 'Most Popular'), array('value' => 'date', 'label' => 'Latest Published'))), array('id' => 'cb_sidebar_posts_number', 'label' => 'Number Of Posts To Show', 'desc' => 'How many posts to show in slide-in menu', 'std' => '2', 'type' => 'numeric-slider', 'rows' => '', 'section' => 'cb_menus', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '1,3,1', 'condition' => 'cb_sidebar_posts:is(on)', 'class' => 'cb-sub'), array('id' => 'cb_sidebar_posts_likes', 'label' => 'Overlay Like Count', 'desc' => '', 'std' => '', 'type' => 'on-off', 'section' => 'cb_menus', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'cb-sub', 'condition' => 'cb_sidebar_posts:is(on)', 'operator' => 'and'), array('id' => 'cb_like_article', 'label' => 'Post Like System', 'desc' => '', 'std' => 'on', 'type' => 'on-off', 'section' => 'cb_post_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_like_symbol', 'label' => 'Like Symbol', 'desc' => '', 'std' => 'cb-heart', 'type' => 'radio-image', 'section' => 'cb_post_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'cb-sub', 'condition' => 'cb_like_article:is(on)', 'operator' => 'and', 'choices' => array(array('value' => 'cb-heart', 'label' => 'Heart', 'src' => '/cb-heart.png'), array('value' => 'cb-bolt', 'label' => 'Bolt', 'src' => '/cb-bolt.png'), array('value' => 'cb-star', 'label' => 'Star', 'src' => '/cb-star.png'))), array('id' => 'cb_meta_onoff', 'label' => 'By Line', 'desc' => 'Show "Written by Author - Date - Category"', 'std' => 'on', 'type' => 'on-off', 'section' => 'cb_post_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => ''), array('id' => 'cb_byline_author', 'label' => 'By Line: Show Author', 'desc' => 'Show "Written by Author" text', 'std' => 'on', 'type' => 'on-off', 'section' => 'cb_post_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'cb-sub', 'condition' => 'cb_meta_onoff:not(off)'), array('id' => 'cb_byline_author_prefix', 'label' => 'By Line: Author Prefix', 'desc' => 'Text to appear before author name', 'std' => 'Written by', 'type' => 'text', 'section' => 'cb_post_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'cb-sub-sub', 'condition' => 'cb_meta_onoff:not(off),cb_byline_author:not(off)'), array('id' => 'cb_byline_date', 'label' => 'By Line: Show Date', 'desc' => 'Show date', 'std' => 'on', 'type' => 'on-off', 'section' => 'cb_post_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'cb-sub', 'condition' => 'cb_meta_onoff:not(off)'), array('id' => 'cb_byline_category', 'label' => 'By Line: Show Categories', 'desc' => 'Show category(s)', 'std' => 'on', 'type' => 'on-off', 'section' => 'cb_post_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'condition' => 'cb_meta_onoff:not(off)', 'min_max_step' => '', 'class' => 'cb-sub'), array('id' => 'cb_post_style_override_onoff', 'label' => 'Global Featured Image Style Override', 'desc' => 'Make all posts use a specific featured image stlye, however, each post has an option to ignore this override if desired.', 'std' => 'off', 'type' => 'on-off', 'section' => 'cb_post_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_post_style_override', 'label' => 'Global Featured Image Style', 'desc' => '', 'std' => 'full-background', 'type' => 'radio-image', 'section' => 'cb_post_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'cb-sub', 'condition' => 'cb_post_style_override_onoff:is(on)', 'operator' => 'and', 'choices' => array(array('value' => 'full-background', 'label' => 'Full-Background', 'src' => '/img_fs.png'), array('value' => 'parallax', 'label' => 'Parallax', 'src' => '/img_pa.png'), array('value' => 'off', 'label' => 'Off', 'src' => '/img_off.png'))), array('id' => 'cb_social_sharing', 'label' => 'Social Sharing', 'desc' => '', 'std' => '', 'type' => 'on-off', 'section' => 'cb_post_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_comments_onoff', 'label' => 'Comments', 'desc' => '', 'std' => '', 'type' => 'on-off', 'section' => 'cb_post_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_related_onoff', 'label' => 'Show related posts', 'desc' => '', 'std' => 'on', 'type' => 'on-off', 'section' => 'cb_post_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => ''), array('id' => 'cb_related_posts_amount', 'label' => 'Number Of Related Posts To Show', 'desc' => 'How many related posts to show at the end of a post', 'std' => '2', 'type' => 'numeric-slider', 'rows' => '', 'section' => 'cb_post_settings', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '1,9,1', 'condition' => 'cb_related_onoff:not(off)', 'class' => 'cb-sub'), array('id' => 'cb_related_posts_style', 'label' => 'Related Post Layout', 'desc' => '', 'std' => '2', 'type' => 'radio-image', 'section' => 'cb_post_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'cb-sub', 'condition' => 'cb_related_onoff:not(off)', 'operator' => 'and', 'choices' => array(array('value' => '1', 'label' => 'One Post Per Line', 'src' => '/blog_style_a.png'), array('value' => 'excerpt1', 'label' => 'One Post Per Line With Excerpt', 'src' => '/blog_style_excerpt_a.png'), array('value' => '2', 'label' => 'Two Posts Per Line', 'src' => '/blog_style_b.png'), array('value' => '3', 'label' => 'Three Posts Per Line', 'src' => '/blog_style_c.png'))), array('id' => 'cb_related_posts_show', 'label' => 'Where to look for related posts', 'desc' => '', 'std' => '', 'type' => 'select', 'section' => 'cb_post_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'cb-sub', 'condition' => 'cb_related_onoff:not(off)', 'choices' => array(array('value' => 'both', 'label' => 'Related by tags and if no posts found, show related by category', 'src' => ''), array('value' => 'tags', 'label' => 'Only related by tags', 'src' => ''), array('value' => 'cats', 'label' => 'Only related by category', 'src' => ''))), array('id' => 'cb_related_posts_order', 'label' => 'Related Posts Order', 'desc' => '', 'std' => '', 'type' => 'select', 'section' => 'cb_post_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'cb-sub', 'condition' => 'cb_related_onoff:not(off)', 'choices' => array(array('value' => 'rand', 'label' => 'Random', 'src' => ''), array('value' => 'date', 'label' => 'Date (Latest Published)', 'src' => ''))), array('id' => 'cb_posts_ad_below', 'label' => 'Advertisment after post content', 'desc' => 'Show an 768x90 advertising block after post content.', 'std' => '', 'type' => 'textarea-simple', 'section' => 'cb_post_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_links_color', 'label' => 'Links Color', 'desc' => 'Set a color for text links inside the post content area, text widgets, etc', 'std' => '', 'type' => 'colorpicker', 'section' => 'ot_typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_body_font', 'label' => 'General body text font', 'desc' => 'Select the font to be used for general body text. Demo uses Raleway.', 'std' => '', 'type' => 'select', 'section' => 'ot_typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => '\'Raleway\', sans-serif;', 'label' => 'Raleway', 'src' => ''), array('value' => '\'Open Sans\', sans-serif;', 'label' => 'Open Sans', 'src' => ''), array('value' => '\'Montserrat\', sans-serif;', 'label' => 'Montserrat', 'src' => ''), array('value' => '\'Droid Sans\', sans-serif;', 'label' => 'Droid Sans', 'src' => ''), array('value' => '\'PT Serif\', serif;', 'label' => 'PT Serif', 'src' => ''), array('value' => '\'PT Sans\', sans-serif;', 'label' => 'PT Sans', 'src' => ''), array('value' => '\'Vollkorn\', serif;', 'label' => 'Vollkorn', 'src' => ''), array('value' => 'other', 'label' => 'Other Google Font', 'src' => ''))), array('id' => 'cb_user_body_font', 'label' => 'Other Google Font', 'desc' => 'Enter any Google Font Code from http://www.google.com/fonts. Example of code that should be entered: \'Noto Sans\', sans-serif;', 'std' => '', 'type' => 'text', 'section' => 'ot_typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'cb-sub', 'condition' => 'cb_body_font:is(other)', 'operator' => 'and'), array('id' => 'cb_body_text_style', 'label' => 'Post Body Text Style', 'desc' => 'Set a specific color/font/style/etc for the post content text (the actual article). All options are optional. Demo uses Merriweather font-family, 0.05em letter-spacing and Justify text-align.', 'std' => '', 'type' => 'typography', 'section' => 'ot_typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => ''), array('id' => 'cb_user_post_font', 'label' => 'Other Google Font', 'desc' => 'Enter any Google Font Code from http://www.google.com/fonts. Example of code that should be entered: \'Noto Sans\', sans-serif;', 'std' => '', 'type' => 'text', 'section' => 'ot_typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'cb-sub', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_header_font', 'label' => 'Font for Headings', 'desc' => 'Select the font of Headings (h1, h2, h3, h4, h5) and other important titles. Demo uses Raleway.', 'std' => '', 'type' => 'select', 'section' => 'ot_typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => '\'Raleway\', sans-serif;', 'label' => 'Raleway', 'src' => ''), array('value' => '\'Josefin Slab\', serif;', 'label' => 'Josefin Slab', 'src' => ''), array('value' => '\'Lato\', sans-serif;', 'label' => 'Lato', 'src' => ''), array('value' => '\'Arvo\', serif;', 'label' => 'Arvo', 'src' => ''), array('value' => '\'Open Sans\', sans-serif;', 'label' => 'Open Sans', 'src' => ''), array('value' => '\'Oswald\', sans-serif;', 'label' => 'Oswald', 'src' => ''), array('value' => '\'Montserrat\', sans-serif;', 'label' => 'Montserrat', 'src' => ''), array('value' => 'other', 'label' => 'Other Google Font', 'src' => ''))), array('id' => 'cb_user_header_font', 'label' => 'Other Google Font', 'desc' => 'Enter any Google Font Code from http://www.google.com/fonts for Headings. Example of code that should be entered: \'Noto Sans\', sans-serif;', 'std' => '', 'type' => 'text', 'section' => 'ot_typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'cb-sub', 'condition' => 'cb_header_font:is(other)', 'operator' => 'and'), array('id' => 'cb_font_ext_lat', 'label' => 'Load Latin Extended Charset', 'desc' => 'Some languages use special characters that require extra charsets of the font to be loaded. Enable this to also load the Latin Extended character font set.', 'std' => 'off', 'type' => 'on-off', 'section' => 'ot_typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_font_cyr', 'label' => 'Load Cyrillic Extended Charset', 'desc' => 'Some languages use special characters that require extra charsets of the font to be loaded. Enable this to also load the Cyrillic Extended character font set.', 'std' => 'off', 'type' => 'on-off', 'section' => 'ot_typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_footer_layout', 'label' => 'Footer Layout', 'desc' => '', 'std' => 'cb-footer-2', 'type' => 'radio-image', 'section' => 'ot_footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'cb-footer-1', 'label' => 'Layout 1', 'src' => '/footer_style_a.png'), array('value' => 'cb-footer-2', 'label' => 'Layout 2', 'src' => '/footer_style_b.png'), array('value' => 'cb-footer-3', 'label' => 'Layout 3', 'src' => '/footer_style_c.png'))), array('id' => 'cb_footer_lower_bg', 'label' => 'Footer Background Image/Color', 'desc' => 'Set a background image and/or color. If there is an image and color set, then the color will overlay the image and be semi-transparent.', 'std' => '', 'type' => 'background', 'section' => 'ot_footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_to_top', 'label' => 'To Top Button', 'desc' => 'The top button appears just above the copyright line', 'std' => '', 'type' => 'on-off', 'section' => 'ot_footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_footer_copyright', 'label' => 'Footer Copyright Text', 'desc' => 'Appears at the end of the footer<br><img src="http://www.ten28.com/qa.jpg">', 'std' => '', 'type' => 'textarea-simple', 'section' => 'ot_footer', 'rows' => '1', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_custom_css', 'label' => 'Custom CSS', 'desc' => 'No need to hard-edit style.css anymore. All your CSS modifications can be done here so you do not lose them in future theme updates. (It is still recommended to save a backup of this custom CSS to a separate .txt file)', 'std' => '', 'type' => 'css', 'section' => 'ot_custom_code', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_custom_head', 'label' => 'Code For  Head section', 'desc' => 'No need to hard-edit files anymore to add custom Javascript/code to your head. Code in this box will appear before the closing head tag.', 'std' => '', 'type' => 'textarea-simple', 'section' => 'ot_custom_code', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_custom_footer', 'label' => 'Code For Footer section', 'desc' => 'No need to hard-edit files anymore to add custom Javascript/code to your footer. Code in this box will appear right before the closing body tag.', 'std' => '', 'type' => 'textarea-simple', 'section' => 'ot_custom_code', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cb_cpt', 'label' => 'Custom Post Types', 'desc' => 'If you have "custom post types" and want to have Ness Post Options metabox appear in them, enter the names here (Separated by comma, example: books, movies)', 'std' => '', 'type' => 'textarea-simple', 'section' => 'cb_misc', 'rows' => '1', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => ''), array('id' => 'cb_misc_tag_pl', 'label' => 'Tags Pages Post Layout', 'desc' => '', 'std' => '2', 'type' => 'radio-image', 'section' => 'cb_misc', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => '1', 'label' => 'One Post Per Line', 'src' => '/blog_style_a.png'), array('value' => 'excerpt1', 'label' => 'One Post Per Line With Excerpt', 'src' => '/blog_style_excerpt_a.png'), array('value' => '2', 'label' => 'Two Posts Per Line', 'src' => '/blog_style_b.png'), array('value' => '3', 'label' => 'Three Posts Per Line', 'src' => '/blog_style_c.png'))), array('id' => 'cb_misc_search_pl', 'label' => 'Search Results Pages Post Layout', 'desc' => '', 'std' => 'excerpt1', 'type' => 'radio-image', 'section' => 'cb_misc', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => '1', 'label' => 'One Post Per Line', 'src' => '/blog_style_a.png'), array('value' => 'excerpt1', 'label' => 'One Post Per Line With Excerpt', 'src' => '/blog_style_excerpt_a.png'), array('value' => '2', 'label' => 'Two Posts Per Line', 'src' => '/blog_style_b.png'), array('value' => '3', 'label' => 'Three Posts Per Line', 'src' => '/blog_style_c.png'))), array('id' => 'cb_misc_archives_pl', 'label' => 'Archives Post Layout', 'desc' => '', 'std' => 'excerpt1', 'type' => 'radio-image', 'section' => 'cb_misc', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => '1', 'label' => 'One Post Per Line', 'src' => '/blog_style_a.png'), array('value' => 'excerpt1', 'label' => 'One Post Per Line With Excerpt', 'src' => '/blog_style_excerpt_a.png'), array('value' => '2', 'label' => 'Two Posts Per Line', 'src' => '/blog_style_b.png'), array('value' => '3', 'label' => 'Three Posts Per Line', 'src' => '/blog_style_c.png'))), array('id' => 'cb_misc_author_pl', 'label' => 'Author Archives Post Layout', 'desc' => '', 'std' => '2', 'type' => 'radio-image', 'section' => 'cb_misc', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => '1', 'label' => 'One Post Per Line', 'src' => '/blog_style_a.png'), array('value' => 'excerpt1', 'label' => 'One Post Per Line With Excerpt', 'src' => '/blog_style_excerpt_a.png'), array('value' => '2', 'label' => 'Two Posts Per Line', 'src' => '/blog_style_b.png'), array('value' => '3', 'label' => 'Three Posts Per Line', 'src' => '/blog_style_c.png'))), array('id' => 'cb_help_title', 'label' => 'Having trouble setting up Ness?', 'desc' => 'Ness comes with extensive documentation that covers almost every aspect of the theme, therefore, most answers can be found there. The documentation can also be read online, <a href="' . esc_url($cb_docs_url) . '" target="_new">click here to see it</a>. If an answer for your issue is not there try these steps:<ol><li>Disable all your plugins to see if the issues persists.</li><li>Check if you are using the latest version of the theme (Documentation has instructions on how to update theme)</li><li>Check the comments section of the theme in Themeforest, other users may have asked the same question already</li></ol> If none of that helps, you can submit a ticket in the support system for quickest response. Make your ticket as short as possible and include screenshots/urls if possible to make it easy to understand and get a fast response. <a href="' . esc_url($cb_support_url) . '" target="_new">Click here</a> to visit the support system', 'std' => '', 'type' => 'textblock-titled', 'section' => 'cb_help', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
}
Example #15
0
/**
 * Build the custom settings & update OptionTree.
 */
function custom_theme_options()
{
    /* OptionTree is not loaded yet, or this is not an admin request */
    if (!function_exists('ot_settings_id') || !is_admin()) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('content' => array(array('id' => 'general_help', 'title' => 'General', 'content' => '<p>Help content goes here!</p>')), 'sidebar' => '<p>Sidebar content goes here!</p>'), 'sections' => array(array('id' => 'general', 'title' => 'General')), 'settings' => array(array('id' => '', 'label' => '', 'desc' => '', 'std' => '', 'type' => 'heading', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_logo', 'label' => '', 'desc' => 'You can use your own logo. Click to \'Upload\' button and upload your own logo.', 'std' => 'http://lawnew.dev/static/evo/admin/images/loginlogo.png', 'type' => 'upload', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_logo_text', 'label' => '', 'desc' => 'If you don\'t upload your own company logo, this text will show up in it\'s place.', 'std' => 'Fizz', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_favicon', 'label' => '', 'desc' => 'You can use your own custom favicon. Click to \'Upload Image\' button and upload your own favicon.', 'std' => '', 'type' => 'upload', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_cta_display', 'label' => '', 'desc' => 'Display call-to-action section, above the footer', 'std' => '', 'type' => 'checkbox', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'tiny', 'condition' => '', 'operator' => ''), array('id' => 's5s_cta_text', 'label' => '', 'desc' => '', 'std' => 'A call-to-action text', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_cta_button_text', 'label' => '', 'desc' => '', 'std' => 'Contact us', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_cta_button_link', 'label' => '', 'desc' => '', 'std' => '/contact/', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => '', 'label' => '', 'desc' => '', 'std' => '', 'type' => 'heading', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_customfontsinfo', 'label' => '', 'desc' => 'This theme uses Google Web Font for headings. You can change it by entering the font details in the fields below.', 'std' => '', 'type' => 'info', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_customtypography', 'label' => '', 'desc' => 'By unchecking this the theme will use default font for headings, Arial.', 'std' => '0', 'type' => 'checkbox', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_headingfontlink', 'label' => '', 'desc' => 'Ex: &lt;link href=\'http://fonts.googleapis.com/css?family=Sanchez\' rel=\'stylesheet\' type=\'text/css\'&gt;', 'std' => '', 'type' => 'textarea', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_headingfontface', 'label' => '', 'desc' => 'Ex: font-family: \'Sanchez\', serif', 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_bodyfontlink', 'label' => '', 'desc' => 'Ex: &lt;link href=\'http://fonts.googleapis.com/css?family=Sanchez\' rel=\'stylesheet\' type=\'text/css\'&gt;', 'std' => '', 'type' => 'textarea', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_bodyfontface', 'label' => '', 'desc' => 'Ex: font-family: \'Sanchez\', serif', 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => '', 'label' => '', 'desc' => '', 'std' => '', 'type' => 'heading', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_displayslider', 'label' => '', 'desc' => 'Display slider on homepage', 'std' => '', 'type' => 'checkbox', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'tiny', 'condition' => '', 'operator' => ''), array('id' => 's5s_slidertag', 'label' => '', 'desc' => 'Choose your slider. If none selected, it will display all slides', 'std' => '', 'type' => 'select', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'tiny', 'condition' => '', 'operator' => ''), array('id' => 's5s_slidertype', 'label' => '', 'desc' => 'Choose slider type for homepage', 'std' => 'flex', 'type' => 'select', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'tiny', 'condition' => '', 'operator' => ''), array('id' => 's5s_slidereffect', 'label' => '', 'desc' => 'Default is \'slide\'', 'std' => 'slide', 'type' => 'select', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => 'tiny', 'condition' => '', 'operator' => ''), array('id' => 's5s_slideranimationspeed', 'label' => '', 'desc' => 'Default is 500', 'std' => '500', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_sliderpausetime', 'label' => '', 'desc' => 'Default is 3000', 'std' => '3000', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => '', 'label' => '', 'desc' => '', 'std' => '', 'type' => 'heading', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_portfoliodesc', 'label' => '', 'desc' => 'The portfolio item page will use the same title description, if defined, as the selected page.', 'std' => '', 'type' => 'select', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_portfolioitemsperpage', 'label' => '', 'desc' => 'Set the number of items that appear on the Portfolio page.', 'std' => '8', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => '', 'label' => '', 'desc' => '', 'std' => '', 'type' => 'heading', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_singledesc', 'label' => '', 'desc' => 'The blog item page will use the same title description, if defined, as the selected page.', 'std' => '', 'type' => 'select', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => '', 'label' => '', 'desc' => '', 'std' => '', 'type' => 'heading', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_contact_email', 'label' => '', 'desc' => '', 'std' => '*****@*****.**', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_contact_phone', 'label' => '', 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_contact_fax', 'label' => '', 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_contact_address', 'label' => '', 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_contact_map', 'label' => '', 'desc' => '', 'std' => '', 'type' => 'textarea', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => '', 'label' => '', 'desc' => '', 'std' => '', 'type' => 'heading', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_display_social', 'label' => '', 'desc' => '', 'std' => '1', 'type' => 'checkbox', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_facebook', 'label' => '', 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_twitter', 'label' => '', 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_dribble', 'label' => '', 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_linkedin', 'label' => '', 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_pinterest', 'label' => '', 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_rss', 'label' => '', 'desc' => 'Display RSS link', 'std' => '1', 'type' => 'checkbox', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_extrss', 'label' => '', 'desc' => 'Add external RSS URL, like Feedburner, etc. This will overwrite the regular blog RSS, if enabled.', 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => '', 'label' => '', 'desc' => '', 'std' => '', 'type' => 'heading', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_metadescription', 'label' => '', 'desc' => '', 'std' => 'full functionable, premium resume wordpress theme solution for your website.', 'type' => 'textarea', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_metakeywords', 'label' => '', 'desc' => '', 'std' => 'proffesional wordpress theme, flexible wordpress theme, wordpress all in one theme, premium wordpress theme ', 'type' => 'textarea', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => '', 'label' => '', 'desc' => '', 'std' => '', 'type' => 'heading', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_footer_copyright', 'label' => '', 'desc' => 'You can change the footer copyright area.', 'std' => 'You can edit this copyright text from Theme Options > Footer', 'type' => 'textarea', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => '', 'label' => '', 'desc' => '', 'std' => '', 'type' => 'heading', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => 's5s_stats', 'label' => '', 'desc' => 'You can use google analytics or other stats code in this area it will appear in the source.', 'std' => '', 'type' => 'textarea', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => '', 'label' => '', 'desc' => '', 'std' => '', 'type' => 'heading', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => ''), array('id' => '', 'label' => '', 'desc' => 'Click on <a href=\'http://lawnew.dev/home/wp-admin/admin.php?page=ajax-thumbnail-rebuild\'>this link</a> to regenerate your existing thumbnails to fit the theme.', 'std' => '', 'type' => 'info', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => '')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
}
Example #16
0
function ph_theme_options()
{
    $saved_settings = get_option(ot_settings_id(), array());
    $settings = array('contextual_help' => array('content' => array(array('id' => 'option_types_help', 'title' => 'Help', 'content' => '')), 'sidebar' => ''), 'sections' => gp_load_yaml('/etc/sections.yaml'), 'settings' => gp_load_yaml('/etc/settings.yaml'));
    //end of $settings
    $settings = apply_filters(ot_settings_id() . '_args', $settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $settings) {
        update_option(ot_settings_id(), $settings);
    }
}
/**
 * Theme Mode demo code of all the available option types.
 *
 * @return    void
 *
 * @access    private
 * @since     2.0
 */
function custom_theme_options()
{
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Create a custom settings array that we pass to 
     * the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('content' => array(array('id' => 'general_help', 'title' => 'General', 'content' => '<p><a href="http://support.bliccaThemes.com">http://support.bliccaThemes.com</a></p>')), 'sidebar' => '<p><a href="http://support.bliccaThemes.com">http://support.bliccaThemes.com</a></p>'), 'sections' => array(array('title' => 'General Settings', 'id' => 'general_default'), array('title' => 'Header Settings', 'id' => 'header_default'), array('title' => 'Blog Settings', 'id' => 'blog_default'), array('title' => 'Social Options', 'id' => 'social'), array('title' => 'Footer Settings', 'id' => 'footer_default'), array('title' => 'Font Settings', 'id' => 'font_settings'), array('title' => 'Shop Settings', 'id' => 'woocommerce_default')), 'settings' => array(array('label' => 'Favicon Upload', 'id' => 'favicon_upload', 'type' => 'upload', 'desc' => 'Upload a 16px x 16px .png or .gif image that will be your favicon.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'general_default'), array('label' => 'Custom Asset Color', 'id' => 'custom_asset_color', 'type' => 'colorpicker', 'desc' => 'If you dont like our asset color, you can create your own color.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'general_default'), array('label' => 'Enable Smooth Scroll', 'id' => 'disable_smooth_scroll', 'type' => 'checkbox', 'desc' => 'Check if you want to disable smooth scroll', 'choices' => array(array('label' => 'Yes', 'value' => 'Yes')), 'std' => 'No', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'general_default'), array('label' => 'Enable Boxed Design', 'id' => 'boxed', 'type' => 'checkbox', 'desc' => 'Check if you want to use boxed design', 'choices' => array(array('label' => 'Yes', 'value' => 'Yes')), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'general_default'), array('label' => 'Background of body', 'id' => 'boxed_back', 'desc' => 'Background of body', 'std' => '', 'type' => 'background', 'section' => 'general_default', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => ''), array('label' => 'Home Page Slider ID', 'id' => 'home_slider_id', 'type' => 'text', 'desc' => 'Write your revolution slider name that want to show on homepage, example: homepage1', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'general_default'), array('label' => 'SubPage Leaf Changing', 'id' => 'subpage_leaf', 'type' => 'upload', 'desc' => 'You can change the leaf image in caption area between lines. Leave it blank if you want to use our image', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'general_default'), array('label' => 'Custom CSS', 'id' => 'custom_css', 'type' => 'textarea-simple', 'desc' => 'If you want to customize main.css, paste your css code here. When you update the medicom, your custom css code does not disappear.', 'std' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'general_default'), array('label' => 'Header Style', 'id' => 'header_style', 'type' => 'select', 'desc' => 'Select your header style from different options.', 'choices' => array(array('label' => 'Classic Header', 'value' => 'header-classic'), array('label' => 'Fixed Header', 'value' => 'header-fixed')), 'std' => 'header-classic', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header_default'), array('label' => 'Enable Fixed Header', 'id' => 'enable_fixed_header', 'type' => 'checkbox', 'desc' => 'Check if you want to disable smooth scroll', 'choices' => array(array('label' => 'Yes', 'value' => 'Yes')), 'std' => 'No', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header_default'), array('label' => 'Logo Upload', 'id' => 'logo_upload', 'type' => 'upload', 'desc' => 'Upload your logo image.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header_default'), array('label' => 'Logo Upload for Sticky', 'id' => 'logo_upload_sticky', 'type' => 'upload', 'desc' => 'Upload your logo image for your sticky menu. If you want to use image for your logo area You have to upload an image in here too. You can upload same image or different image for sticky.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header_default'), array('label' => 'Text Logo', 'id' => 'text_logo', 'type' => 'text', 'desc' => 'If you dont want to use Logo image, you can write a title to your web site', 'std' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header_default'), array('label' => 'Phone number on Header', 'id' => 'phone_number', 'type' => 'text', 'desc' => 'Phone number on Header', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header_default'), array('label' => 'Email on Header', 'id' => 'email_post', 'type' => 'text', 'desc' => 'Email on Header', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header_default'), array('label' => 'Top Section Background Color', 'id' => 'top_section_bg', 'type' => 'colorpicker', 'desc' => 'If you dont like our asset color, you can create your own color.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header_default'), array('label' => 'Top Section Font Color', 'id' => 'top_section_fc', 'type' => 'colorpicker', 'desc' => 'If you dont like our asset color, you can create your own color.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header_default'), array('label' => 'Top Section Border Color', 'id' => 'top_section_border', 'type' => 'colorpicker', 'desc' => 'If you dont like our asset color, you can create your own color.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header_default'), array('label' => 'Header Background Color', 'id' => 'header_background_color', 'type' => 'colorpicker', 'desc' => 'If you dont like our asset color, you can create your own color.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header_default'), array('label' => 'Header Text Color', 'id' => 'header_text_color', 'type' => 'colorpicker', 'desc' => 'If you use header text (in general settings), you can change color with this option', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header_default'), array('label' => 'Menu Link Color', 'id' => 'menu_link_color', 'type' => 'colorpicker', 'desc' => 'If you dont like our asset color, you can create your own color.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header_default'), array('label' => 'Menu Link Active and Hover Color', 'id' => 'menu_link_active_hover_color', 'type' => 'colorpicker', 'desc' => 'If you dont like our asset color, you can create your own color.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header_default'), array('label' => 'Dropdown Menu Background', 'id' => 'dropdown_menu_color', 'type' => 'colorpicker', 'desc' => 'If you dont like our asset color, you can create your own color.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header_default'), array('label' => 'Dropdown Menu Title', 'id' => 'dropdown_menu_title', 'type' => 'colorpicker', 'desc' => 'If you dont like our asset color, you can create your own color.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header_default'), array('label' => 'Dropdown Menu Title Hover', 'id' => 'dropdown_menu_title_hover', 'type' => 'colorpicker', 'desc' => 'If you dont like our asset color, you can create your own color.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header_default'), array('label' => 'Dropdown Menu Border Color', 'id' => 'dropdown_menu_border_color', 'type' => 'colorpicker', 'desc' => 'If you dont like our asset color, you can create your own color.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header_default'), array('label' => 'Blog Header', 'id' => 'blog_header', 'type' => 'text', 'desc' => 'Write a title for your blog header', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog_default'), array('label' => 'Blog Caption', 'id' => 'blog_caption', 'type' => 'text', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog_default'), array('label' => 'Caption Image', 'id' => 'blog_caption_image', 'type' => 'upload', 'desc' => 'Upload image for caption background.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog_default'), array('label' => 'Caption Text Color', 'id' => 'caption_text_color', 'type' => 'colorpicker', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog_default'), array('label' => 'Blog Style', 'id' => 'blog_style', 'type' => 'select', 'desc' => 'We have 1 option for now', 'choices' => array(array('label' => 'Classic', 'value' => 'standard-right-sidebar')), 'std' => 'standard-right-sidebar', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog_default'), array('label' => 'Sidebar Position', 'id' => 'sidebar_position', 'type' => 'select', 'desc' => 'Select your sidebar position.', 'choices' => array(array('label' => 'Right Sidebar', 'value' => 'sidebar_on_right'), array('label' => 'Left Sidebar', 'value' => 'sidebar_on_left'), array('label' => 'No Sidebar', 'value' => 'no_sidebar')), 'std' => 'sidebar_on_right', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog_default'), array('label' => 'Enable Featured Slider', 'id' => 'featured_slider', 'type' => 'checkbox', 'desc' => 'Check if you want to show slider', 'choices' => array(array('label' => 'Yes', 'value' => 'Yes')), 'std' => 'No', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog_default'), array('label' => 'Activate Pagination', 'id' => 'activate_pagination', 'type' => 'checkbox', 'desc' => 'Check if you want to use pagination instead of prev-next', 'choices' => array(array('label' => 'Yes', 'value' => 'Yes')), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog_default'), array('label' => 'Read More Text', 'id' => 'read_more', 'type' => 'text', 'desc' => '', 'std' => 'Continue Reading...', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog_default'), array('label' => 'Comment Title', 'id' => 'comment_title', 'type' => 'text', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog_default'), array('label' => 'Twitter User Name', 'id' => 'twitter_user_name', 'type' => 'text', 'desc' => 'Twitter User Name that you want show latest tweet', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'Twitter Consumer Key', 'id' => 'consumer_key', 'type' => 'text', 'desc' => 'Your Twitter Consumer Key', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'Twitter Consumer Secret', 'id' => 'consumer_secret', 'type' => 'text', 'desc' => 'Your Twitter Consumer Secret', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'Twitter Access Token', 'id' => 'access_token', 'type' => 'text', 'desc' => 'Your Twitter Access Token', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'Twitter Access Token Secret', 'id' => 'access_token_secret', 'type' => 'text', 'desc' => 'Your Twitter Access Token Secret', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'Your Social Network', 'id' => 'your_social_network', 'type' => 'textblock-titled', 'desc' => '<p>Paste the full url you\'d like the image to link</p>', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'Facebook', 'id' => 'social_facebook', 'type' => 'text', 'desc' => 'Full Url', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'Flickr', 'id' => 'social_flickr', 'type' => 'text', 'desc' => 'Full Url', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'Dribbble', 'id' => 'social_dribbble', 'type' => 'text', 'desc' => 'Full Url', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'Yelp', 'id' => 'social_yelp', 'type' => 'text', 'desc' => 'Full Url', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'Instagram', 'id' => 'social_instagram', 'type' => 'text', 'desc' => 'Full Url', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'Google+', 'id' => 'social_google', 'type' => 'text', 'desc' => 'Full Url', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'LinkedIn', 'id' => 'social_linkedin', 'type' => 'text', 'desc' => 'Full Url', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'Pinterest', 'id' => 'social_pinterest', 'type' => 'text', 'desc' => 'Full Url', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'Digg', 'id' => 'social_digg', 'type' => 'text', 'desc' => 'Full Url', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'Skype', 'id' => 'social_skype', 'type' => 'text', 'desc' => 'You should write as skype:username', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'Twitter', 'id' => 'social_twitter', 'type' => 'text', 'desc' => 'Full Url', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'Vimeo', 'id' => 'social_vimeo', 'type' => 'text', 'desc' => 'Full Url', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'YouTube', 'id' => 'social_youtube', 'type' => 'text', 'desc' => 'Full Url', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'RSS', 'id' => 'social_rss', 'type' => 'text', 'desc' => 'Full Url', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'Stumbleupon', 'id' => 'social_stumbleupon', 'type' => 'text', 'desc' => 'Full Url', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'Yahoo', 'id' => 'social_yahoo', 'type' => 'text', 'desc' => 'Full Url', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'Foursquare', 'id' => 'social_foursquare', 'type' => 'text', 'desc' => 'Full Url', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'VK', 'id' => 'social_vk', 'type' => 'text', 'desc' => 'Full Url', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'Tripadvisor', 'id' => 'social_ta', 'type' => 'text', 'desc' => 'Full Url', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'social'), array('label' => 'Hide Widget Section', 'id' => 'show_widget', 'type' => 'checkbox', 'desc' => 'Check if you dont want to show widget section', 'choices' => array(array('label' => 'Yes', 'value' => 'Yes')), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'footer_default'), array('label' => 'Show Social Section', 'id' => 'show_social_on_footer', 'type' => 'checkbox', 'desc' => 'Check if you dont want to show Social Section', 'choices' => array(array('label' => 'Yes', 'value' => 'Yes')), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'footer_default'), array('label' => 'Logo Upload for Footer Copyright Section', 'id' => 'logo_upload_footer', 'type' => 'upload', 'desc' => 'Upload your logo image.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'footer_default'), array('label' => 'Show Copyright Section', 'id' => 'show_copyright', 'type' => 'checkbox', 'desc' => 'Check if you want to show copyright section', 'choices' => array(array('label' => 'Yes', 'value' => 'Yes')), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'footer_default'), array('label' => 'Footer Background Color', 'id' => 'footer_bg_color', 'type' => 'colorpicker', 'desc' => 'Pick your color for footer background.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'footer_default'), array('label' => 'Footer Title Color', 'id' => 'footer_title_color', 'type' => 'colorpicker', 'desc' => 'Pick your color for footer widget titles.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'footer_default'), array('label' => 'Footer Content Color', 'id' => 'footer_p_color', 'type' => 'colorpicker', 'desc' => 'Pick your color for footer content.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'footer_default'), array('label' => 'Footer Link Color', 'id' => 'footer_a_color', 'type' => 'colorpicker', 'desc' => 'Pick your color for footer links.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'footer_default'), array('label' => 'Copyright Text', 'id' => 'copyright_text', 'type' => 'textarea-simple', 'desc' => '', 'std' => 'Copyright © 2014 bliccaThemes. All rights reserved.', 'rows' => '10', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'footer_default'), array('label' => 'Copyright Background Color', 'id' => 'copy_bg_color', 'type' => 'colorpicker', 'desc' => 'Pick your color for copyright background section.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'footer_default'), array('label' => 'Copyright Text Color', 'id' => 'copy_p_color', 'type' => 'colorpicker', 'desc' => 'Pick your color for copyright texts.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'footer_default'), array('label' => 'Character Sets', 'id' => 'character_sets', 'desc' => __('Click the checkbox that you want to load for your website.', 'bliccaThemes'), 'std' => '', 'type' => 'checkbox', 'section' => 'font_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('label' => 'Latin Extended', 'value' => 'latin-ext'), array('label' => 'Cyrillic', 'value' => 'cyrillic'), array('label' => 'Cyrillic Extended', 'value' => 'cyrillic-ext'), array('label' => 'Greek', 'value' => 'greek'), array('label' => 'Greek Extended', 'value' => 'greek-ext'), array('label' => 'Vietnamese', 'value' => 'vietnamese'))), array('label' => 'Body Typography', 'id' => 'body_font', 'type' => 'typography', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'font_settings'), array('label' => 'H1 Typography', 'id' => 'h1_font', 'type' => 'typography', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'font_settings'), array('label' => 'H2 Typography', 'id' => 'h2_font', 'type' => 'typography', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'font_settings'), array('label' => 'H3 Typography', 'id' => 'h3_font', 'type' => 'typography', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'font_settings'), array('label' => 'H4 Typography', 'id' => 'h4_font', 'type' => 'typography', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'font_settings'), array('label' => 'H5 Typography', 'id' => 'h5_font', 'type' => 'typography', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'font_settings'), array('label' => 'H6 Typography', 'id' => 'h6_font', 'type' => 'typography', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'font_settings'), array('label' => 'Header Logo Text', 'id' => 'header_logo_font', 'type' => 'typography', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'font_settings'), array('label' => 'Header Link', 'id' => 'header_link_font', 'type' => 'typography', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'font_settings'), array('label' => 'Footer Title', 'id' => 'footer_title_font', 'type' => 'typography', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'font_settings'), array('label' => 'Footer Content', 'id' => 'footer_p_font', 'type' => 'typography', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'font_settings'), array('label' => 'Footer Copyright', 'id' => 'footer_copyright_font', 'type' => 'typography', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'font_settings'), array('label' => 'Caption Title', 'id' => 'caption_defaults', 'type' => 'typography', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'font_settings'), array('label' => 'Sidebar Title', 'id' => 'sidebar_title_font', 'type' => 'typography', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'font_settings'), array('label' => 'Section Title ', 'id' => 'section_title_font', 'type' => 'typography', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'font_settings'), array('label' => 'Restaurant Menu Category Font', 'id' => 'restaurant_menu_category', 'type' => 'typography', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'font_settings'), array('label' => 'Restaurant Menu Item Font', 'id' => 'restaurant_menu_item', 'type' => 'typography', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'font_settings'), array('label' => 'WooCommerce Layout', 'id' => 'woocommerce_style', 'type' => 'select', 'desc' => 'Select your woocommerce style from different options.', 'choices' => array(array('label' => 'Shop with Sidebar', 'value' => 'col-md-8'), array('label' => 'Shop without Sidebar', 'value' => 'col-md-12')), 'std' => 'col-md-8', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'woocommerce_default'), array('label' => 'Items per Page on Shop Page', 'id' => 'shop_paged', 'type' => 'numeric-slider', 'desc' => 'Choose how many items that you want to show on your shop page', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'min_max_step' => '-1,30,1', 'section' => 'woocommerce_default'), array('label' => 'Items per Row on Shop Page', 'id' => 'shop_item', 'type' => 'numeric-slider', 'desc' => 'Choose how many items that you want to show on each row', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'min_max_step' => '2,4,1', 'section' => 'woocommerce_default'), array('label' => 'Shop Header', 'id' => 'shop_header', 'type' => 'text', 'desc' => 'Write a title for your shop header', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'woocommerce_default'), array('label' => 'Shop Caption', 'id' => 'shop_caption', 'type' => 'text', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'woocommerce_default'), array('label' => 'Caption Image', 'id' => 'shop_caption_image', 'type' => 'upload', 'desc' => 'Upload image for caption background.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'woocommerce_default'), array('label' => 'Caption Text Color', 'id' => 'shop_text_color', 'type' => 'colorpicker', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'woocommerce_default')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
}
Example #18
0
/**
 * Build the custom settings & update OptionTree.
 *
 * @return    void
 * @since     2.0
 */
function custom_theme_options()
{
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('content' => array(array('id' => 'home_page_help', 'title' => __('Option Types', HB_DOMAIN_TXT), 'content' => '<p>' . __('Help content goes here!', HB_DOMAIN_TXT) . '</p>')), 'sidebar' => '<p>' . __('Sidebar content goes here!', HB_DOMAIN_TXT) . '</p>'), 'sections' => array(array('id' => 'logo_section', 'title' => '<i class="dashicons-before dashicons-awards"></i>&nbsp; &nbsp; ' . __('Site Logo', HB_DOMAIN_TXT)), array('id' => 'typo_section', 'title' => '<i class="dashicons-before dashicons-editor-spellcheck"></i>&nbsp; &nbsp; ' . __('Typography', HB_DOMAIN_TXT)), array('id' => 'shop_section', 'title' => '<i class="dashicons-before dashicons-store"></i>&nbsp; &nbsp; ' . __('Shop', HB_DOMAIN_TXT)), array('id' => 'socials', 'title' => '<i class="dashicons-before dashicons-universal-access-alt"></i>&nbsp; &nbsp; ' . __('Socials', HB_DOMAIN_TXT)), array('id' => 'mobile', 'title' => '<i class="dashicons-before dashicons-smartphone"></i>&nbsp; &nbsp; ' . __('Mobile & Tablet', HB_DOMAIN_TXT)), array('id' => 'footer', 'title' => '<i class="dashicons-before dashicons-carrot"></i>&nbsp; &nbsp; ' . __('Footer', HB_DOMAIN_TXT))), 'settings' => array(array('id' => 'logo', 'label' => __('Logo', HB_DOMAIN_TXT), 'type' => 'upload', 'section' => 'logo_section'), array('id' => 'alt_logo', 'label' => __('Alternative Logo', HB_DOMAIN_TXT), 'type' => 'upload', 'section' => 'logo_section'), array('id' => 'site_fonts_type', 'label' => __('Fonts Type', HB_DOMAIN_TXT), 'type' => 'select', 'section' => 'typo_section', 'choices' => array(array('value' => 'google-fonts', 'label' => __('Google Fonts', HB_DOMAIN_TXT), 'src' => ''), array('value' => 'typekit', 'label' => __('Typekit', HB_DOMAIN_TXT), 'src' => ''), array('value' => 'default', 'label' => __('Default', HB_DOMAIN_TXT), 'src' => ''))), array('id' => 'typekit', 'label' => __('Embed Code', HB_DOMAIN_TXT), 'type' => 'textarea-simple', 'section' => 'typo_section', 'condition' => 'site_fonts_type:is(typekit)', 'operator' => 'and'), array('id' => 'body_typo', 'label' => __('Body', HB_DOMAIN_TXT), 'type' => 'googlefont', 'section' => 'typo_section', 'condition' => 'site_fonts_type:is(google-fonts)', 'operator' => 'and'), array('id' => 'headlines_typo', 'label' => __('Headlines', HB_DOMAIN_TXT), 'type' => 'googlefont', 'section' => 'typo_section', 'condition' => 'site_fonts_type:is(google-fonts)', 'operator' => 'and'), array('id' => 'class_per_page', 'label' => __('Display class per page', HB_DOMAIN_TXT), 'type' => 'numeric-slider', 'section' => 'shop_section', 'std' => '12', 'min_max_step' => '3,99,3'), array('id' => 'start_displaying_stock_qty', 'label' => __('Display class QTY when stock # is', HB_DOMAIN_TXT), 'type' => 'numeric-slider', 'section' => 'shop_section', 'std' => '10', 'min_max_step' => '1,500,1'), array('id' => 'brand_new_copy', 'label' => __('Class&apos;s Brand New Copy', HB_DOMAIN_TXT), 'type' => 'text', 'section' => 'shop_section', 'std' => __('Brand New', HB_DOMAIN_TXT)), array('id' => 'site_socials', 'label' => __('', HB_DOMAIN_TXT), 'type' => 'social-links', 'section' => 'socials'), array('id' => 'mobile_menu', 'label' => __('Show Mobile Menu For', HB_DOMAIN_TXT), 'std' => 'md', 'type' => 'select', 'section' => 'mobile', 'choices' => array(array('value' => 'xs', 'label' => __('Extra small devices (≤768px)', HB_DOMAIN_TXT), 'src' => ''), array('value' => 'sm', 'label' => __('Small devices (≤992px)', HB_DOMAIN_TXT), 'src' => ''), array('value' => 'md', 'label' => __('Medium devices (≤1200px)', HB_DOMAIN_TXT), 'src' => ''))), array('id' => 'footer_content', 'label' => __('Content', HB_DOMAIN_TXT), 'type' => 'textarea', 'section' => 'footer')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
}
Example #19
0
/**
 * Build the custom settings & update OptionTree.
 */
function custom_theme_options()
{
    /* OptionTree is not loaded yet */
    if (!function_exists('ot_settings_id')) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('sidebar' => ''), 'sections' => array(array('id' => 'general', 'title' => 'General'), array('id' => 'header', 'title' => 'Header'), array('id' => 'style', 'title' => 'Style'), array('id' => 'social', 'title' => 'Social'), array('id' => 'fonts', 'title' => 'Fonts'), array('id' => 'articles', 'title' => 'Articles'), array('id' => 'page', 'title' => 'Page'), array('id' => 'other', 'title' => 'Other'), array('id' => 'updates', 'title' => 'Updates')), 'settings' => array(array('id' => 'demo_import', 'label' => 'Demo content import', 'desc' => '', 'std' => '', 'type' => 'bw-import-data', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'logo', 'label' => 'Logo', 'desc' => '', 'std' => '', 'type' => 'upload', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'logo_mobile', 'label' => 'Logo mobile version', 'desc' => '', 'std' => '', 'type' => 'upload', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'fav_icon', 'label' => 'Fav icon', 'desc' => 'Icon must be: 16px X 16px or 32px X 32px', 'std' => '', 'type' => 'upload', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_copy', 'label' => 'Footer copy', 'desc' => 'Short text for the copyright area in the footer', 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'boxed_layout', 'label' => 'Boxed header &amp; footer', 'desc' => '', 'std' => '', 'type' => 'bw-on-off', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'header_type', 'label' => 'Header type', 'desc' => '', 'std' => '', 'type' => 'radio-image', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => '1', 'label' => 'Default', 'src' => 'OT_THEME_URL/bw/assets/img/admin/layout_header/1.png'), array('value' => '2', 'label' => 'Type 2', 'src' => 'OT_THEME_URL/bw/assets/img/admin/layout_header/2.png'), array('value' => '3', 'label' => 'Type 3', 'src' => 'OT_THEME_URL/bw/assets/img/admin/layout_header/3.png'))), array('id' => 'header_html', 'label' => 'Header html content', 'desc' => 'Please add content for the right part of the header version 2. You can add Images, simple text, html code, ads ..', 'std' => '', 'type' => 'textarea', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'sticky_header', 'label' => 'Sticky header on scroll', 'desc' => 'Check this to make header stick to top on scroll', 'std' => '', 'type' => 'bw-on-off', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'hide_wp_bar', 'label' => 'Hide Wordpress top bar when logged in', 'desc' => '', 'std' => '', 'type' => 'bw-on-off', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'add_navigation_home_icon', 'label' => 'Add main navigation home icon', 'desc' => 'Check this options if you want to add the home icon to the main navigation on top of the page', 'std' => '', 'type' => 'bw-on-off', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'mobile_nav_search', 'label' => 'Mobile navigation search', 'desc' => 'Enable this options if you want to add search input into the mobile navigation sidebar.', 'std' => '', 'type' => 'bw-on-off', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'main_color', 'label' => 'Main color', 'desc' => '', 'std' => '', 'type' => 'colorpicker', 'section' => 'style', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'header_white', 'label' => 'Invert header color', 'desc' => '', 'std' => '', 'type' => 'bw-on-off', 'section' => 'style', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'header_color', 'label' => 'Header color', 'desc' => '', 'std' => '', 'type' => 'colorpicker', 'section' => 'style', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'invert_header_nav_color', 'label' => 'Invert navigation color', 'desc' => '', 'std' => '', 'type' => 'bw-on-off', 'section' => 'style', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'header_nav_color', 'label' => 'Header navigation color', 'desc' => '', 'std' => '', 'type' => 'colorpicker', 'section' => 'style', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'background_color', 'label' => 'Background color', 'desc' => '', 'std' => '', 'type' => 'colorpicker', 'section' => 'style', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'background_image', 'label' => 'Background image', 'desc' => '', 'std' => '', 'type' => 'upload', 'section' => 'style', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'container_shadow', 'label' => 'Add container shadow', 'desc' => '', 'std' => '', 'type' => 'select', 'section' => 'style', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'none', 'label' => 'None', 'src' => ''), array('value' => 'light', 'label' => 'Light', 'src' => ''), array('value' => 'medium', 'label' => 'Medium', 'src' => ''), array('value' => 'dark', 'label' => 'Dark', 'src' => ''))), array('id' => 'enable_image_effect', 'label' => 'Enable image hover effect', 'desc' => 'Turn off this option if you want to disable the effect when hover over the images', 'std' => '', 'type' => 'bw-on-off', 'section' => 'style', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'enable_smooth_scroll', 'label' => 'Enable Smooth Scroll', 'desc' => '', 'std' => '', 'type' => 'bw-on-off', 'section' => 'style', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'enable_lazy_image', 'label' => 'Enable image lazy load', 'desc' => 'Load specified images after the page load itself and speed up your loading time through this. Images outside of the visible area will only get loaded when the user scrolls to them. This will not only increase the page loading speed, it will even decrease your traffic.', 'std' => '', 'type' => 'bw-on-off', 'section' => 'style', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'custom_css', 'label' => 'Custom CSS', 'desc' => 'Add custom styles to theme. Example: body {color:red;}', 'std' => '', 'type' => 'textarea-simple', 'section' => 'style', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'custom_js', 'label' => 'Custom Javascript', 'desc' => 'Add custom Javascript. Example: alert(1);', 'std' => '', 'type' => 'textarea-simple', 'section' => 'style', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'share_buttons_description', 'label' => 'Share services', 'desc' => 'Add here the share services you want to use, single comma delimited (no spaces). You can find the full list of services <a href="http://www.addthis.com/services/list" target="_blank">here</a> Also you can use the more tag to show the plus sign and the counter tag to show a global share counter.

<strong>Important</strong>: If you want to allow AddThis to show your visitors personalized lists of share buttons you can use the preferred tag. More about this <a href="http://bit.ly/1fLP69i" target="_blank">here</a>', 'std' => '', 'type' => 'bw-text-content', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'share_buttons_settings', 'label' => 'Add share services', 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'social_icons', 'label' => 'Social icons', 'desc' => 'Click the "Add New" button, choose the social media and add the url, example: http://www.facebook.com/envato', 'std' => '', 'type' => 'list-item', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'settings' => array(array('id' => 'social_media', 'label' => 'Social media', 'desc' => '', 'std' => '', 'type' => 'select', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'aboutme', 'label' => 'Aboutme', 'src' => ''), array('value' => 'aol', 'label' => 'Aol', 'src' => ''), array('value' => 'amazon', 'label' => 'Amazon', 'src' => ''), array('value' => 'apple', 'label' => 'Apple', 'src' => ''), array('value' => 'appstore', 'label' => 'Appstore', 'src' => ''), array('value' => 'bebo', 'label' => 'Bebo', 'src' => ''), array('value' => 'behance', 'label' => 'Behance', 'src' => ''), array('value' => 'bing', 'label' => 'Bing', 'src' => ''), array('value' => 'blogger', 'label' => 'Blogger', 'src' => ''), array('value' => 'dribble', 'label' => 'Dribble', 'src' => ''), array('value' => 'delicious', 'label' => 'Delicious', 'src' => ''), array('value' => 'diggalt', 'label' => 'Diggalt', 'src' => ''), array('value' => 'ebay', 'label' => 'Ebay', 'src' => ''), array('value' => 'email', 'label' => 'Email', 'src' => ''), array('value' => 'facebook', 'label' => 'Facebook', 'src' => ''), array('value' => 'googleplus', 'label' => 'Google plus', 'src' => ''), array('value' => 'pinterest', 'label' => 'Pinterest', 'src' => ''), array('value' => 'instagram', 'label' => 'Instagram', 'src' => ''), array('value' => 'linkedin', 'label' => 'Linkedin', 'src' => ''), array('value' => 'skype', 'label' => 'Skype', 'src' => ''), array('value' => 'tumblr', 'label' => 'Tumblr', 'src' => ''), array('value' => 'githubalt', 'label' => 'Github', 'src' => ''), array('value' => 'flickr', 'label' => 'Flickr', 'src' => ''), array('value' => 'foodspotting', 'label' => 'Foodspotting', 'src' => ''), array('value' => 'googlebuzz', 'label' => 'Googlebuzz', 'src' => ''), array('value' => 'gowallapin', 'label' => 'Gowallapin', 'src' => ''), array('value' => 'grooveshark', 'label' => 'Grooveshark', 'src' => ''), array('value' => 'heart', 'label' => 'Heart', 'src' => ''), array('value' => 'icq', 'label' => 'Icq', 'src' => ''), array('value' => 'imessage', 'label' => 'Imessage', 'src' => ''), array('value' => 'itunes', 'label' => 'Itunes', 'src' => ''), array('value' => 'lastfm', 'label' => 'Lastfm', 'src' => ''), array('value' => 'mobileme', 'label' => 'Mobileme', 'src' => ''), array('value' => 'myspace', 'label' => 'Myspace', 'src' => ''), array('value' => 'picasa', 'label' => 'Picasa', 'src' => ''), array('value' => 'soundcloud', 'label' => 'Soundcloud', 'src' => ''), array('value' => 'star', 'label' => 'Star', 'src' => ''), array('value' => 'twitter', 'label' => 'Twitter', 'src' => ''), array('value' => 'vimeo', 'label' => 'Vimeo', 'src' => ''), array('value' => 'wordpress', 'label' => 'Wordpress', 'src' => ''), array('value' => 'yahoo', 'label' => 'Yahoo', 'src' => ''), array('value' => 'youtube', 'label' => 'Youtube', 'src' => ''), array('value' => 'fivehundredpx', 'label' => '500px', 'src' => ''))), array('id' => 'social_url', 'label' => 'Url', 'desc' => '', 'std' => '', 'type' => 'text', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'))), array('id' => 'custom_fonts_desc', 'label' => 'Custom fonts', 'desc' => 'In this page you can set the typefaces to be used throughout the theme. For each elements listed below you can choose any front from the Google Web Font library. Once you have chosen a font from the list, you will see a preview of this font immediately beneath the list box. The icons on the bottom of the font preview, indicate what weights are available for that typeface.

R -- Regular,
B -- Bold,
I -- Italics,
BI -- Bold Italics

When deciding what font to use, ensure that the chosen font contains the font weight required by the element. For example, main headings are bold, so you need to select a new font for these elements which supports a bold font weight. If you select a font which does not have a bold icon, the font will not be applied.

Browse the online Google Font Library

Custom fonts (Advanced Users):
Other then those available from Google fonts, custom fonts may also be applied to the elements listed below. To do this an additional field is provided below the google fonts list. Here you may enter the details of a font family, size, line-height etc. for a custom font. This information is entered in the form of the shorthand \'font:\' CSS declaration, for example:

bold italic small-caps 1em/1.5em arial,sans-serif

If a font is specified in this field then the font listed in the Google font drop menu above will not be applied to the element in question. If you wish to use the Google font specified in the drop down list and just specify a new font size or line height, you can do so in this field also, however the name of the Google font MUST also be entered into this field. You may need to visit the Google fonts web page to find the exact CSS name for the font you have chosen.', 'std' => '', 'type' => 'bw-text-content', 'section' => 'fonts', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'body_font', 'label' => 'Body font', 'desc' => '', 'std' => '', 'type' => 'bw-select-font', 'section' => 'fonts', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'body_font_declaration', 'label' => 'Body font declaration', 'desc' => 'Here you can add a custom font declaration, useful when you want to change size or  use a common (not google) font.Example: <b>15px arial,sans-serif</b>', 'std' => '', 'type' => 'text', 'section' => 'fonts', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'heading_font', 'label' => 'Heading font', 'desc' => '', 'std' => '', 'type' => 'bw-select-font', 'section' => 'fonts', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'heading_font_declaration', 'label' => 'Heading font declaration', 'desc' => 'Here you can add a custom font declaration, useful when you want to change size or  use a common (not google) font.Example: <b>15px arial,sans-serif</b>', 'std' => '', 'type' => 'text', 'section' => 'fonts', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'blog_layout', 'label' => 'Blog layout', 'desc' => 'Choose the layout for blog areas ( e.g. blog archive page, categories, search results )', 'std' => '', 'type' => 'radio-image', 'section' => 'articles', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'grid', 'label' => 'Grid', 'src' => 'OT_THEME_URL/bw/assets/img/admin/layout_blog/grid.png'), array('value' => 'list', 'label' => 'List', 'src' => 'OT_THEME_URL/bw/assets/img/admin/layout_blog/list.png'))), array('id' => 'comment_type_blog', 'label' => 'Comment type', 'desc' => '', 'std' => '', 'type' => 'select', 'section' => 'articles', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'default', 'label' => 'Default wordpress comments', 'src' => ''), array('value' => 'facebook', 'label' => 'Facebook comment box', 'src' => ''), array('value' => 'none', 'label' => 'None', 'src' => ''))), array('id' => 'display_blog_author', 'label' => 'Display blog author', 'desc' => 'Check this options in order to hide the author in the blog posts.', 'std' => '', 'type' => 'bw-on-off', 'section' => 'articles', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'display_also_like', 'label' => 'Display "Related articles" section in blog posts', 'desc' => '', 'std' => '', 'type' => 'bw-on-off', 'section' => 'articles', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'display_blog_categories', 'label' => 'Display categories', 'desc' => '', 'std' => '', 'type' => 'bw-on-off', 'section' => 'articles', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'display_blog_tags', 'label' => 'Display tags', 'desc' => '', 'std' => '', 'type' => 'bw-on-off', 'section' => 'articles', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'share_links_post', 'label' => 'Show share links', 'desc' => 'Do you want to show the share links bellow the blog posts?', 'std' => '', 'type' => 'bw-on-off', 'section' => 'articles', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'show_slider_categories', 'label' => 'Show slider on category pages?', 'desc' => 'Check this if you want to display at the top of your category archives a slider with the posts marked as making part of the category slider.', 'std' => '', 'type' => 'bw-on-off', 'section' => 'articles', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'category_slider_effect', 'label' => 'Category slider effect', 'desc' => '', 'std' => '', 'type' => 'select', 'section' => 'articles', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'slide', 'label' => 'Slide', 'src' => ''), array('value' => 'fade', 'label' => 'Fade', 'src' => ''))), array('id' => 'category_slider_autoplay', 'label' => 'Category slider autoplay', 'desc' => '', 'std' => '', 'type' => 'bw-on-off', 'section' => 'articles', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'comment_type_page', 'label' => 'Comment type', 'desc' => '', 'std' => '', 'type' => 'select', 'section' => 'page', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'none', 'label' => 'None', 'src' => ''), array('value' => 'wp_comments', 'label' => 'Wordpress comments', 'src' => ''), array('value' => 'facebook', 'label' => 'Facebook comment box', 'src' => ''))), array('id' => 'share_links_page', 'label' => 'Show share links', 'desc' => 'Do you want to show the share links in the custom pages?', 'std' => '', 'type' => 'bw-on-off', 'section' => 'page', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'analytics_id', 'label' => 'Google Analytics Id', 'desc' => 'Please insert only the Google Analytic ID. The tracking ID is a string like UA-000000-01', 'std' => '', 'type' => 'text', 'section' => 'other', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'updates_description', 'label' => 'Theme one-click update', 'desc' => 'Let us notify you when new versions of this theme are live on ThemeForest! Update with just one button click using the Envato WordPress Toolkit. Forget about manual updates!
<strong>IMPORTANT</strong>: Please make sure that you have installed and activated the Envato Wordpress Toolkit plugin, included in the required plugins of the theme.', 'std' => '', 'type' => 'bw-text-content', 'section' => 'updates', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'enable_updates', 'label' => 'Enable update notifications', 'desc' => 'Check this options if you want to check if there is an update available for the current theme.', 'std' => '', 'type' => 'bw-on-off', 'section' => 'updates', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
}
Example #20
0
function custom_theme_options()
{
    /**
     * Get a copy of the saved settings array.
     * ot_settings_id() --> option_tree_settings
     */
    $saved_settings = get_option(ot_settings_id(), array());
    $blogname = get_bloginfo('name');
    $blogurl = get_bloginfo('url');
    $categories = get_categories();
    $cats_output = '';
    foreach ($categories as $cat) {
        $cats_output .= $cat->cat_ID . ' => ' . $cat->cat_name . ';<br>';
    }
    $posts = get_posts('numberposts=500&post_type=post&orderby=ID&order=DESC');
    $posts_output = '';
    foreach ($posts as $post) {
        $posts_output .= $post->ID . ' => ' . $post->post_title . '&nbsp;&nbsp;(<span style="color:#1cbdc5">' . $post->post_date . '</span>);<br>';
    }
    $pages = get_posts('numberposts=50&post_type=page&orderby=ID&order=DESC');
    $pages_output = '';
    foreach ($pages as $page) {
        $pages_output .= $page->ID . ' => ' . $page->post_title . '&nbsp;&nbsp;(<span style="color:#1cbdc5">' . $page->post_date . '</span>);<br>';
    }
    $products = get_posts('numberposts=100&post_type=store&orderby=ID&order=DESC');
    $products_output = '';
    foreach ($products as $product) {
        $products_output .= $product->ID . ' => ' . $product->post_title . '&nbsp;&nbsp;(<span style="color:#1cbdc5">' . $product->post_date . '</span>);<br>';
    }
    $theme = wp_get_theme();
    $version = $theme->get('Version');
    //Admin Panel Sections
    $sections = array(array('id' => 'bases', 'title' => '基本设置'), array('id' => 'layout', 'title' => '页面布局'), array('id' => 'blogform', 'title' => '文章形式'), array('id' => 'webstyle', 'title' => '网站样式'), array('id' => 'advanced', 'title' => '高级设置'));
    //Admin Panel Settings
    $settings = array(array('id' => 'opt_description', 'label' => '页面描述', 'desc' => '网站首页描述(非必须,但对SEO有影响)', 'type' => 'textarea_simple', 'rows' => '5', 'section' => 'bases'), array('id' => 'opt_keywords', 'label' => '页面关键词', 'desc' => '网站首页、分类页关键词(非必须,但对SEO有影响,不同关键词用英文逗号隔开)', 'type' => 'textarea_simple', 'rows' => '5', 'section' => 'bases'), array('id' => 'opt_favicon', 'label' => 'Favicon图标', 'desc' => '上传一个16x16像素大小的 Png/Gif 图像作为网站的图标', 'type' => 'upload', 'section' => 'bases'), array('id' => 'opt_logo', 'label' => '网站Logo图像开关', 'desc' => '使用图像替代文本作为网站的Logo', 'type' => 'on-off', 'section' => 'bases', 'std' => 'off'), array('id' => 'opt_logo_img', 'label' => '网站Logo图像设置', 'desc' => '上传一个图像作为网站的Logo,推荐大小60x120(max)像素', 'type' => 'upload', 'section' => 'bases'), array('id' => 'opt_beian', 'label' => 'Footer中显示备案号', 'desc' => '在网页底部Footer中显示备案号', 'type' => 'text', 'rows' => '1', 'std' => '', 'section' => 'layout'), array('id' => 'opt_show_thumb', 'label' => '文章页特色图', 'desc' => '文章页上方是否显示特色图', 'type' => 'on-off', 'std' => 'on', 'section' => 'blogform'), array('id' => 'opt_share', 'label' => '文章分享开关', 'desc' => '文章页下方是否显示分享', 'type' => 'on-off', 'std' => 'on', 'section' => 'blogform'), array('id' => 'opt_copyright', 'label' => __('文章页版权信息', 'xiapistudio'), 'desc' => __('文章页版权信息,为默认值,如果作者投稿添加了版权信息,将会覆盖此默认值', 'xiapistudio'), 'type' => 'textarea_simple', 'rows' => '5', 'section' => 'blogform', 'std' => __('<p>除特别注明外,本站所有文章均为<a href="{url}" title="{name}" target="_blank">{name}</a>原创,转载请注明出处来自<a href="{link}" title="{title}">{link}</a></p>', 'xiapistudio')), array('id' => 'opt_slider', 'label' => '首页幻灯片', 'desc' => '是否开启首页幻灯轮播', 'type' => 'on-off', 'std' => 'off', 'section' => 'webstyle'), array('id' => 'opt_alipay_email', 'label' => '支付宝收款帐户邮箱', 'desc' => '支付宝收款帐户邮箱,要收款必填并务必保持正确', 'type' => 'text', 'std' => '', 'section' => 'advanced'), array('id' => 'opt_alipay_qr', 'label' => '支付宝收款二维码', 'desc' => '支付宝收款二维码,请至支付宝获取二维码并填写二维码图片链接', 'type' => 'text', 'std' => '', 'section' => 'advanced'));
    //Admin Custom settings
    $custom_settings = array('sections' => $sections, 'settings' => $settings);
    //allow settings to be filtered before saving
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    //settings are not the same update the DB
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
}
function custom_theme_options()
{
    /**
     * Get a copy of the saved settings array.
     * ot_settings_id() --> option_tree_settings
     */
    $saved_settings = get_option(ot_settings_id(), array());
    $blogname = get_bloginfo('name');
    $blogurl = get_bloginfo('url');
    $categories = get_categories();
    $cats_output = '';
    foreach ($categories as $cat) {
        $cats_output .= $cat->cat_ID . ' => ' . $cat->cat_name . ';<br>';
    }
    $posts = get_posts('numberposts=500&post_type=post&orderby=ID&order=DESC');
    $posts_output = '';
    foreach ($posts as $post) {
        $posts_output .= $post->ID . ' => ' . $post->post_title . '&nbsp;&nbsp;(<span style="color:#1cbdc5">' . $post->post_date . '</span>);<br>';
    }
    $pages = get_posts('numberposts=50&post_type=page&orderby=ID&order=DESC');
    $pages_output = '';
    foreach ($pages as $page) {
        $pages_output .= $page->ID . ' => ' . $page->post_title . '&nbsp;&nbsp;(<span style="color:#1cbdc5">' . $page->post_date . '</span>);<br>';
    }
    $products = get_posts('numberposts=100&post_type=store&orderby=ID&order=DESC');
    $products_output = '';
    foreach ($products as $product) {
        $products_output .= $product->ID . ' => ' . $product->post_title . '&nbsp;&nbsp;(<span style="color:#1cbdc5">' . $product->post_date . '</span>);<br>';
    }
    $theme = wp_get_theme();
    $version = $theme->get('Version');
    //Admin Panel Sections
    $sections = array(array('id' => 'bases', 'title' => '基本设置'), array('id' => 'layout', 'title' => '页面布局'), array('id' => 'blogform', 'title' => '文章形式'), array('id' => 'webstyle', 'title' => '网站样式'), array('id' => 'adsposit', 'title' => '广告投放'), array('id' => 'advanced', 'title' => '高级设置'));
    //Admin Panel Settings
    $settings = array(array('id' => 'favicon', 'label' => 'Favicon图标', 'desc' => '上传一个16x16像素大小的 Png/Gif 图像作为网站的图标', 'type' => 'upload', 'section' => 'bases'), array('id' => 'logo-status', 'label' => '网站Logo图像开关', 'desc' => '使用图像替代文本作为网站的Logo', 'type' => 'on-off', 'section' => 'bases', 'std' => 'off'), array('id' => 'logo', 'label' => '网站Logo图像设置', 'desc' => '上传一个图像作为网站的Logo,推荐大小60x120(max)像素', 'type' => 'upload', 'section' => 'bases'), array('id' => 'custom-login-logo', 'label' => '登录页Logo图像设置', 'desc' => '留空则使用默认wordpress图标', 'type' => 'upload', 'section' => 'bases'), array('id' => 'layout', 'label' => '首页布局选择', 'desc' => '首页CMS布局或Blog布局或Blocks块状布局', 'type' => 'radio', 'std' => 'cms', 'section' => 'bases', 'choices' => array(array('value' => 'cms', 'label' => 'CMS'), array('value' => 'blog', 'label' => 'BLOG'), array('value' => 'blocks', 'label' => 'BLOCKS'))), array('id' => 'bkgdcolor', 'label' => '网页背景颜色设置', 'desc' => '网页背景颜色', 'type' => 'colorpicker', 'std' => '#fff', 'section' => 'bases'), array('id' => 'bkgdimgeffect', 'label' => '网页背景图像开关', 'desc' => '是否开启网页背景图像像素化效果', 'type' => 'on-off', 'std' => 'off', 'section' => 'bases'), array('id' => 'bkgdimg', 'label' => '网页背景图像设置', 'desc' => '网页背景图像,会覆盖背景色', 'type' => 'upload', 'section' => 'bases'), array('id' => 'bkgdimg_style', 'label' => '背景图片样式选择', 'desc' => '背景图片样式,对小图片选择重复,对大图片请选择平铺覆盖背景', 'type' => 'select', 'std' => 'cover', 'section' => 'bases', 'choices' => array(array('value' => 'cover', 'label' => '覆盖'), array('value' => 'repeat', 'label' => '重复'))), array('id' => 'sitenews', 'label' => '站点消息', 'desc' => '网站顶部显示站点自定义消息,一行一条消息', 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'bases'), array('id' => 'headercode', 'label' => 'Header中加载自定义代码', 'desc' => '在网页头部Header中加载用户自定义代码,可以是javascript或者css,包含完整代码外标签', 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'layout'), array('id' => 'footercode', 'label' => 'Footer中加载自定义代码', 'desc' => '在网页底部Footer中加载用户自定义代码,可以是javascript或者css,包含完整代码外标签', 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'layout'), array('id' => 'beian', 'label' => 'Footer中显示备案号', 'desc' => '在网页底部Footer中显示备案号', 'type' => 'text', 'rows' => '1', 'std' => '', 'section' => 'layout'), array('id' => 'statisticcode', 'label' => 'Footer中加载统计代码', 'desc' => '在网页底部Footer中加载统计代码,推荐百度统计', 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'layout'), array('id' => 'copyright', 'label' => 'Copyright信息', 'desc' => '网站底部版权文字描述', 'type' => 'textarea_simple', 'rows' => '5', 'std' => 'All Rights Reserved', 'section' => 'layout'), array('id' => 'footer-widgets-singlerow', 'label' => '底部通栏Widget', 'desc' => '网站底部单栏边栏工具,仅允许放置一个小工具,主要用于通栏友情链接小工具', 'type' => 'on-off', 'std' => 'off', 'section' => 'layout'), array('id' => 'footer-widgets', 'label' => 'Footer边栏小工具列数', 'desc' => '请选择合适列数开启底部边栏<br /><i>推荐数量:3</i>', 'std' => '3', 'type' => 'radio-image', 'section' => 'layout', 'class' => '', 'choices' => array(array('value' => '0', 'label' => 'Disable', 'src' => THEME_FRA_URL . '/admin/images/layout-off.png'), array('value' => '1', 'label' => '1 Column', 'src' => THEME_FRA_URL . '/admin/images/footer-widgets-1.png'), array('value' => '2', 'label' => '2 Columns', 'src' => THEME_FRA_URL . '/admin/images/footer-widgets-2.png'), array('value' => '3', 'label' => '3 Columns', 'src' => THEME_FRA_URL . '/admin/images/footer-widgets-3.png'), array('value' => '4', 'label' => '4 Columns', 'src' => THEME_FRA_URL . '/admin/images/footer-widgets-4.png'))), array('id' => 'tin_aboutsite', 'label' => '关于本站小工具内容', 'desc' => '关于本站小工具内容', 'type' => 'textarea_simple', 'std' => '知言博客是由WordPress爱好者Zhiyan建立的一个WordPress以及WEB资源站,集WordPress教程、主题、插件以及众多前端素材、代码等其他内容于一体,本站汇集为WordPress以及前端开发提供帮助的前端网页特效、建站PSD模板、网页模板、开发教程等素材,相关内容均保证绿色安全、优质实用,是您建站学习好帮手。Zhiyan欢迎大家多多交流,期待共同学习进步。', 'section' => 'layout'), array('id' => 'double_lan_menu', 'label' => '中英文菜单', 'desc' => '中英文菜单,开启此选项后请至后台菜单编辑界面,在各菜单导航标签属性内加入[span]菜单英文[/span],例如>>首页<<菜单项,包含小图标和英文的导航标签内容应该为[i class="fa fa-home"]&nbsp;[/i]首页[span]Home[/span],请更改[ ]为< >', 'type' => 'on-off', 'std' => 'off', 'section' => 'blogform'), array('id' => 'timthumb', 'label' => 'Timthumb.php缩略图裁剪', 'desc' => '采用Timthumb.php缩略图裁剪,使用教程见<a href="http://www.zhiyanblog.com/timthumb-php-wordpress-thumbnail.html" target="_blank">Timthumb.php教程</a>;', 'type' => 'on-off', 'std' => 'off', 'section' => 'blogform'), array('id' => 'cloudimgsuffix', 'label' => 'CDN云存储缩略图后缀参数', 'desc' => '如果你使用了CDN图片云存储并关闭Timthumb.php缩略图裁剪,那么推荐你填写该云存储图片裁剪参数,能够有效防止图片大小不均一导致排版错误,建议保持默认即可并推荐使用水煮鱼的七牛插件自动上传网站图片至云空间', 'type' => 'text', 'std' => '?imageView2/1/w/375/h/250/q/100', 'section' => 'blogform'), array('id' => 'lazy_load_img', 'label' => '图片延迟加载', 'desc' => '图片延迟加载,如果出现图片无法加载,请关闭此选项,此外延迟加载对SEO不利', 'type' => 'on-off', 'std' => 'off', 'section' => 'blogform'), array('id' => 'show-single-thumb', 'label' => '文章页特色图', 'desc' => '文章页上方是否显示特色图,若开启请保证添加独一无二的特色图片,以免与文章图片重复', 'type' => 'on-off', 'std' => 'on', 'section' => 'blogform'), array('id' => 'tin_copyright_content_default', 'label' => '文章页版权信息', 'desc' => '文章页版权信息,为默认值,如果作者投稿添加了版权信息,将会覆盖此默认值', 'type' => 'textarea_simple', 'rows' => '5', 'section' => 'blogform', 'std' => '<p>除特别注明外,本站所有文章均为<a href="{url}" title="{name}" target="_blank">{name}</a>原创,转载请注明出处来自<a href="{link}" title="{title}">{link}</a></p>'), array('id' => 'openslider', 'label' => '首页幻灯片', 'desc' => '是否开启首页幻灯轮播', 'type' => 'on-off', 'std' => 'off', 'section' => 'webstyle'), array('id' => 'slider_style', 'label' => '幻灯样式', 'desc' => '幻灯样式,非全宽模式下幻灯右侧加载最新文章动态', 'type' => 'select', 'std' => 'no_full', 'section' => 'webstyle', 'choices' => array(array('value' => 'full', 'label' => '全宽'), array('value' => 'no_full', 'label' => '非全宽'))), array('id' => 'homeslider', 'label' => '首页幻灯片列表', 'desc' => '首页幻灯片文章及图像来源,请输入需要呈现的文章ID,以英文逗号隔开并为每篇文章设置特色图片', 'type' => 'text', 'section' => 'webstyle'), array('id' => 'slider_recommend_order', 'label' => '首页幻灯片右侧文章来源', 'desc' => '首页非全宽幻灯片右侧文章排序', 'type' => 'radio', 'std' => 'latest_reviewed', 'section' => 'webstyle', 'choices' => array(array('value' => 'latest_reviewed', 'label' => '最新评论排序'), array('value' => 'most_viewed', 'label' => '最多浏览排序'), array('value' => 'most_reviewed', 'label' => '最多评论排序'))), array('id' => 'blocks_style', 'label' => 'Blocks布局样式', 'desc' => 'Blocks布局样式,等高块或不等高瀑布流,等高模式推荐timthumb裁剪缩略图以保证图片尺寸一致', 'type' => 'select', 'std' => 'normal_blocks', 'section' => 'webstyle', 'choices' => array(array('value' => 'normal_blocks', 'label' => '等高块'), array('value' => 'fluid_blocks', 'label' => '瀑布流'))), array('id' => 'browser_scroll_color', 'label' => '浏览器滚动条颜色', 'desc' => '浏览器滚动条颜色', 'type' => 'colorpicker', 'std' => '#00d6ac', 'section' => 'webstyle'), array('id' => 'main_body_color', 'label' => 'Body主字体颜色', 'desc' => 'Body主字体颜色', 'type' => 'colorpicker', 'std' => '#666', 'section' => 'webstyle'), array('id' => 'main_body_a_color', 'label' => 'Body主字体超链接颜色', 'desc' => 'Body主字体超链接颜色', 'type' => 'colorpicker', 'std' => '#428bca', 'section' => 'webstyle'), array('id' => 'main_body_a_hover_color', 'label' => 'Body主字体超链接鼠标悬停颜色', 'desc' => 'Body主字体超链接鼠标悬停颜色', 'type' => 'colorpicker', 'std' => '#51ADED', 'section' => 'webstyle'), array('id' => 'block_border_color', 'label' => '块标题底边色', 'desc' => '块标题底边色', 'type' => 'colorpicker', 'std' => '#f98181', 'section' => 'webstyle'), array('id' => 'title_a_color', 'label' => '文章标题颜色', 'desc' => '文章标题颜色', 'type' => 'colorpicker', 'std' => '#000', 'section' => 'webstyle'), array('id' => 'title_a_hover_color', 'label' => '文章标题鼠标悬停颜色', 'desc' => '文章标题鼠标悬停颜色', 'type' => 'colorpicker', 'std' => '#51ADED', 'section' => 'webstyle'), array('id' => 'selection_bg_color', 'label' => 'Selection选取背景色', 'desc' => 'Selection选取背景色', 'type' => 'colorpicker', 'std' => '#51aded', 'section' => 'webstyle'), array('id' => 'selection_color', 'label' => 'Selection选取文字颜色', 'desc' => 'Selection选取文字颜色', 'type' => 'colorpicker', 'std' => '#fff', 'section' => 'webstyle'), array('id' => 'nav_bg_color', 'label' => '导航条背景色', 'desc' => '导航条背景色', 'type' => 'colorpicker', 'std' => '#fff', 'section' => 'webstyle'), array('id' => 'menu_color', 'label' => '菜单文字颜色', 'desc' => '菜单文字颜色', 'type' => 'colorpicker', 'std' => '#333', 'section' => 'webstyle'), array('id' => 'menu_hover_bg_color', 'label' => '菜单悬停背景色', 'desc' => '菜单悬停背景色', 'type' => 'colorpicker', 'std' => '#f5f5f5', 'section' => 'webstyle'), array('id' => 'menu_hover_color', 'label' => '菜单悬停文字颜色', 'desc' => '菜单悬停文字颜色', 'type' => 'colorpicker', 'std' => '#51ADED', 'section' => 'webstyle'), array('id' => 'logo_color', 'label' => 'Logo字体颜色', 'desc' => 'Logo字体颜色', 'type' => 'colorpicker', 'std' => '#888', 'section' => 'webstyle'), array('id' => 'mobile_title_font_size', 'label' => '移动端标题字体大小', 'desc' => '移动端标题字体大小', 'type' => 'select', 'choices' => array(array('value' => '12px', 'label' => '12像素'), array('value' => '13px', 'label' => '13像素'), array('value' => '14px', 'label' => '14像素'), array('value' => '15px', 'label' => '15像素')), 'std' => '12px', 'section' => 'webstyle'), array('id' => 'mobile_content_font_size', 'label' => '移动端内容字体大小', 'desc' => '移动端内容字体大小', 'type' => 'select', 'choices' => array(array('value' => '10px', 'label' => '10像素'), array('value' => '11px', 'label' => '11像素'), array('value' => '12px', 'label' => '12像素'), array('value' => '13px', 'label' => '13像素')), 'std' => '10px', 'section' => 'webstyle'), array('id' => 'headerad', 'label' => '顶部自定义广告', 'desc' => '在网页顶部加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,最大宽度1120px', 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'adsposit'), array('id' => 'bottomad', 'label' => '底部自定义广告', 'desc' => '在网页底部加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,最大宽度1120px', 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'adsposit'), array('id' => 'cmswithsidebar_loop_ad', 'label' => '首页文章循环内部广告', 'desc' => '带边栏首页文章循环内部加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,最大宽度800px', 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'adsposit'), array('id' => 'singletopad', 'label' => '文章页上部广告', 'desc' => '在文章顶部加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,最大宽度800px', 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'adsposit'), array('id' => 'singlethumbad', 'label' => '文章页缩略图下方广告', 'desc' => '在文章页缩略图下方加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,最大宽度800px,如果没有缩略图将不显示', 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'adsposit'), array('id' => 'singlebottomad', 'label' => '文章页下部广告', 'desc' => '在文章底部加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,最大宽度800px', 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'adsposit'), array('id' => 'cmntad1', 'label' => '评论区顶部广告', 'desc' => '在文章评论顶部加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,最大宽度800px', 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'adsposit'), array('id' => 'cmntad2', 'label' => '评论区内部广告', 'desc' => '在文章评论内部加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,最大宽度800px', 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'adsposit'), array('id' => 'singlead1_mobile', 'label' => '文章页上部移动广告', 'desc' => '在移动设备文章上部加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,推荐宽度320px', 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'adsposit'), array('id' => 'singlead2_mobile', 'label' => '文章页底部移动广告', 'desc' => '在移动设备文章底部加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,推荐宽度320px', 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'adsposit'), array('id' => 'dlad1', 'label' => '下载页广告1', 'desc' => '在下载页加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,推荐尺寸336*300以内', 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'adsposit'), array('id' => 'dlad2', 'label' => '下载页广告2', 'desc' => '在下载页加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,推荐尺寸760*90以内', 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'adsposit'), array('id' => 'dlad3', 'label' => '下载页广告3', 'desc' => '在下载页加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,推荐尺寸336*300以内', 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'adsposit'), array('id' => 'dlad4', 'label' => '下载页广告4', 'desc' => '在下载页加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,推荐尺寸336*300以内', 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'adsposit'), array('id' => 'floatad', 'label' => '演示页广告', 'desc' => '在演示页加载用户自定义广告代码,可以是javascript或者css,包含完整代码外标签,推荐浮动对联广告', 'type' => 'textarea_simple', 'rows' => '5', 'std' => '', 'section' => 'adsposit'), array('id' => 'newsletter', 'label' => '邮件周刊', 'desc' => '每周向订阅用户发送上周内发布的新文章', 'type' => 'on-off', 'std' => 'off', 'section' => 'advanced'), array('id' => 'login_failed_notify', 'label' => '登陆错误提醒', 'desc' => '登陆错误时邮件提醒', 'type' => 'on-off', 'std' => 'off', 'section' => 'advanced'), array('id' => 'login_success_notify', 'label' => '登录成功提醒', 'desc' => '登录成功时邮件提醒', 'type' => 'on-off', 'std' => 'off', 'section' => 'advanced'), array('id' => 'span_comments', 'label' => '评论过滤', 'desc' => '纯英文或日文评论过滤', 'type' => 'on-off', 'std' => 'off', 'section' => 'advanced'), array('id' => 'tin_sinaweibo', 'label' => '新浪微博', 'desc' => '新浪微博,例如我的新浪微博主页http://weibo.com/touchumind/,则填写touchumind即可', 'type' => 'text', 'std' => 'touchumind', 'section' => 'advanced'), array('id' => 'tin_qqweibo', 'label' => '腾讯微博', 'desc' => '腾讯微博,例如我的腾讯微博主页http://t.qq.com/touchumind,则填写touchumind即可', 'type' => 'text', 'std' => 'touchumind', 'section' => 'advanced'), array('id' => 'tin_qq', 'label' => 'QQ/QQ空间', 'desc' => 'QQ/QQ空间,例如我的QQ空间主页http://user.qzone.qq.com/813920477/,则填写813920477即可', 'type' => 'text', 'std' => '813920477', 'section' => 'advanced'), array('id' => 'tin_weixin', 'label' => '微信', 'desc' => '微信二维码图片', 'type' => 'upload', 'std' => 'http://pic.zhiyanblog.com/?di=Z4EI', 'section' => 'advanced'), array('id' => 'tin_qqgroup', 'label' => 'QQ群链接', 'desc' => '加入QQ群链接,用于QQ群推广,请至http://qun.qq.com/join.html获取你的网站QQ群的推广链接', 'type' => 'text', 'std' => '', 'section' => 'advanced'), array('id' => 'tin_qq_mail', 'label' => 'QQ邮我按钮', 'desc' => 'QQ邮我按钮,用于快速邮件联系,请至http://open.mail.qq.com获取代码', 'type' => 'text', 'std' => 'http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=cBMYGR4RAxhCQEFAMAYZAF4BAV4THx0', 'section' => 'advanced'), array('id' => 'tin_qqlist', 'label' => 'QQ邮件列表', 'desc' => 'QQ邮件列表订阅链接中ID值,例如订阅链接为http://list.qq.com/cgi-bin/qf_invite?id=38c32a0083496c8c74265b09a0a7e2af923171f3704f4a7b,仅需填写38c32a0083496c8c74265b09a0a7e2af923171f3704f4a7b即可,详见http://list.qq.com', 'type' => 'text', 'std' => '38c32a0083496c8c74265b09a0a7e2af923171f3704f4a7b', 'section' => 'advanced'), array('id' => 'alipay_email', 'label' => '支付宝收款帐户邮箱', 'desc' => '支付宝收款帐户邮箱,要收款必填并务必保持正确', 'type' => 'text', 'std' => '', 'section' => 'advanced'), array('id' => 'alipay_qr', 'label' => '支付宝收款二维码', 'desc' => '支付宝收款二维码,请至支付宝获取二维码并填写二维码图片链接', 'type' => 'text', 'std' => '', 'section' => 'advanced'), array('id' => 'alipay_donate_num', 'label' => '支付宝赞助默认金额设置', 'desc' => '支付宝赞助默认金额设置,仅限网页方式的赞助打款,按钮出现在文章页作者信息栏', 'type' => 'text', 'std' => '10', 'section' => 'advanced'));
    //Admin Custom settings
    $custom_settings = array('sections' => $sections, 'settings' => $settings);
    //allow settings to be filtered before saving
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    //settings are not the same update the DB
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
}
Example #22
0
/**
 * Build the custom settings & update OptionTree.
 *
 * @return    void
 * @since     2.0
 */
function custom_theme_options()
{
    global $wpdb;
    $revsliders = array();
    /**
     * Get a copy of the saved settings array.
     */
    $saved_settings = get_option(ot_settings_id(), array());
    $current_sliders = get_option('cp_sliders');
    // Iterate over the sliders
    if ($current_sliders) {
        foreach ($current_sliders as $key => $item) {
            $cpsliders[] = array('label' => $item->name, 'value' => $item->slug);
        }
    } else {
        $cpsliders[] = array('label' => 'No Sliders Found', 'value' => '');
    }
    $table_name = $wpdb->prefix . "revslider_sliders";
    // Get sliders
    if ($wpdb->get_var("SHOW TABLES LIKE '{$table_name}'") == $table_name) {
        $sliders = $wpdb->get_results("SELECT alias, title FROM {$table_name}");
    } else {
        $sliders = '';
    }
    if ($sliders) {
        foreach ($sliders as $key => $item) {
            $revsliders[] = array('label' => $item->title, 'value' => $item->alias);
        }
    } else {
        $revsliders[] = array('label' => 'No Sliders Found', 'value' => '');
    }
    /**
     * Custom settings array that will eventually be
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('content' => array(array('id' => 'option_types_help', 'title' => __('Option Types', 'chow'), 'content' => '<p>' . __('Help content goes here!', 'chow') . '</p>')), 'sidebar' => '<p>' . __('Sidebar content goes here!', 'chow') . '</p>'), 'sections' => array(array('id' => 'slider', 'title' => __('Slider', 'chow')), array('title' => 'General', 'id' => 'general_default'), array('title' => 'Typography', 'id' => 'typography'), array('id' => 'header', 'title' => __('Header', 'chow')), array('id' => 'blog', 'title' => __('Blog', 'chow')), array('id' => 'footer', 'title' => __('Footer', 'chow')), array('id' => 'shop', 'title' => __('Shop', 'chow')), array('id' => 'sidebars', 'title' => __('Sidebars', 'chow'))), 'settings' => array(array('label' => 'Enable Chow Slider on homepage', 'id' => 'pp_slider_on', 'type' => 'on_off', 'desc' => 'Show slider on homepage', 'std' => 'off', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'slider'), array('label' => 'Use RevolutionSlider as homepage slider', 'id' => 'pp_revslider_on', 'type' => 'on_off', 'desc' => 'Available only if you have <a href="http://codecanyon.net/item/slider-revolution-responsive-wordpress-plugin/2751380?ref=purethemes">RevolutionSlider</a> installed ', 'std' => 'off', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'slider'), array('label' => 'Choose Revolution Slider for homepage', 'id' => 'pp_revo_slider', 'type' => 'select', 'desc' => '', 'choices' => $revsliders, 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'condition' => 'pp_revslider_on:is(on)', 'section' => 'slider'), array('label' => 'Select slider', 'id' => 'pp_slider_select', 'type' => 'select', 'desc' => 'Select slider', 'choices' => $cpsliders, 'std' => 'true', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'slider'), array('label' => 'Upload logo', 'id' => 'pp_logo_upload', 'type' => 'upload', 'desc' => 'The logo will be used as it is so please resize it before uploading ', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header'), array('label' => 'Upload Retina logo', 'id' => 'pp_logo_retina_upload', 'type' => 'upload', 'desc' => 'Double sized logo version. You can either double the amount of pixels, or the dpi, it’s the same thing. So if your logo.png file is 200×100, make the @2x file 400×200, or just double the dpi (from 72 to 144 for example.)', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header'), array('label' => 'Logo top margin', 'id' => 'pp_logo_top_margin', 'type' => 'measurement', 'desc' => 'Set top margin for logo image', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header'), array('label' => 'Logo bottom margin', 'id' => 'pp_logo_bottom_margin', 'type' => 'measurement', 'desc' => 'Set bottom margin for logo image', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header'), array('label' => 'Tagline top margin', 'id' => 'pp_tagline_margin', 'type' => 'measurement', 'desc' => 'Set bottom margin for tagline (blog description)', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header'), array('label' => 'Favicon ', 'id' => 'pp_favicon_upload', 'type' => 'upload', 'desc' => 'Upload favicon here (16x16)', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header'), array('label' => 'Logo area width', 'id' => 'pp_logo_area_width', 'type' => 'select', 'desc' => 'Full width of top area is 16 columns. Logo area by default is 13 columns, while icons and contact details area is 3 columns wide. If you want to have bigger logo, please change here number of columns for logo. ', 'choices' => array(array('label' => '1 column', 'value' => '1'), array('label' => '2 columns', 'value' => '2'), array('label' => '3 columns', 'value' => '3'), array('label' => '4 columns', 'value' => '4'), array('label' => '5 columns', 'value' => '5'), array('label' => '6 columns', 'value' => '6'), array('label' => '7 columns', 'value' => '7'), array('label' => '8 columns', 'value' => '8'), array('label' => '9 columns', 'value' => '9'), array('label' => '10 columns', 'value' => '10'), array('label' => '11 columns', 'value' => '11'), array('label' => '12 columns', 'value' => '12')), 'std' => '3', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'header'), array('label' => 'Enable "Add to Favourites" under posts', 'id' => 'pp_add_to_fav_status', 'type' => 'on_off', 'desc' => '', 'std' => 'on', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'general_default'), array('label' => 'Choose "Edit Page" - the page needs to use template named "Edit Recipe Template"', 'id' => 'pp_edit_page', 'type' => 'page_select', 'desc' => 'This is page to which contributors will be redirected', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'general_default'), array('label' => 'Choose "My Account Page" - the page needs to use template named "Chow User Account Template"', 'id' => 'pp_account_page', 'type' => 'page_select', 'desc' => 'This is page which acts as a dashboard for users', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'general_default'), array('label' => 'Comments on pages', 'id' => 'pp_pagecomments', 'type' => 'on_off', 'desc' => 'You can disable globaly comments on all pages with this option, or you can do it per page in Page editor', 'std' => 'off', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'general_default'), array('id' => 'pp_custom_css', 'label' => 'Custom CSS', 'desc' => 'To prevent problems with theme update, write here any custom css (or use child themes)', 'std' => '', 'type' => 'textarea-simple', 'section' => 'general_default', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'pp-fonts', 'label' => __('Google Fonts', 'chow'), 'desc' => '', 'std' => array(array('family' => 'opensans', 'variants' => array('300', '400', '600', '700', '800'), 'subsets' => array('latin')), array('family' => 'Arvo', 'variants' => array('regular', '700'), 'subsets' => array('latin'))), 'type' => 'google-fonts', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('label' => 'Body Font', 'id' => 'chow_body_font', 'type' => 'typography', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'typography'), array('label' => 'Menu Font', 'id' => 'chow_menu_font', 'type' => 'typography', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'typography'), array('label' => 'Logo Font', 'id' => 'chow_logo_font', 'type' => 'typography', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'typography'), array('label' => 'Headers (h1..h6) Font', 'id' => 'chow_headers_font', 'type' => 'typography', 'desc' => 'Size and related to it settings will be ignored here.', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'typography'), array('label' => 'Slider Headers Font', 'id' => 'chow_slider_font', 'type' => 'typography', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'typography'), array('label' => 'Blog layout', 'id' => 'pp_blog_layout', 'type' => 'radio-image', 'desc' => 'Choose sidebar side on blog.', 'std' => 'right-sidebar', 'rows' => '', 'post_type' => '', 'choices' => array(array('value' => 'left-sidebar', 'label' => 'Left Sidebar', 'src' => OT_URL . '/assets/images/layout/left-sidebar.png'), array('value' => 'right-sidebar', 'label' => 'Right Sidebar', 'src' => OT_URL . '/assets/images/layout/right-sidebar.png'), array('value' => 'left-sidebar-grid', 'label' => 'left Sidebar Grid', 'src' => OT_URL . '/assets/images/layout/left-sidebar-grid.png'), array('value' => 'right-sidebar-grid', 'label' => 'right Sidebar Grid', 'src' => OT_URL . '/assets/images/layout/right-sidebar-grid.png'), array('value' => 'masonry', 'label' => 'Masonry', 'src' => OT_URL . '/assets/images/layout/masonry.png')), 'taxonomy' => '', 'class' => '', 'section' => 'blog'), array('label' => 'Post meta informations on single post', 'id' => 'pp_meta_single', 'type' => 'checkbox', 'desc' => 'Set which elements of posts meta data you want to display.', 'choices' => array(array('label' => 'Author', 'value' => 'author'), array('label' => 'Date', 'value' => 'date'), array('label' => 'Tags', 'value' => 'tags'), array('label' => 'Categories', 'value' => 'cat'), array('label' => 'Comments', 'value' => 'com')), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog'), array('label' => 'Global background header on post', 'id' => 'pp_header_bg_status', 'type' => 'on_off', 'desc' => 'Enable global background header on single post displayed in case the post doesn\'t have individual background set', 'std' => 'off', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog'), array('label' => 'Global background header image', 'id' => 'pp_header_bg', 'type' => 'upload', 'desc' => 'Displayed if post doesn\'t have individual background image', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'condition' => 'pp_header_bg_status:is(on)', 'section' => 'blog'), array('label' => 'Select which \'social share\' icons to display on post', 'id' => 'pp_post_share', 'type' => 'checkbox', 'desc' => '', 'choices' => array(array('label' => 'Facebook', 'value' => 'facebook'), array('label' => 'Twitter', 'value' => 'twitter'), array('label' => 'Google Plus', 'value' => 'google-plus'), array('label' => 'Pinterest', 'value' => 'pinterest')), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog'), array('label' => 'Select which \'post meta\' elements to display on blog page with <strong>List layout</strong>', 'id' => 'pp_list_meta', 'type' => 'checkbox', 'desc' => '', 'choices' => array(array('label' => 'Author', 'value' => 'author'), array('label' => 'Date', 'value' => 'date'), array('label' => 'Comments', 'value' => 'comments'), array('label' => 'Categories', 'value' => 'categories'), array('label' => 'Tags', 'value' => 'tags'), array('label' => 'Servings (recipe)', 'value' => 'servings'), array('label' => 'Preperation Time (recipe)', 'value' => 'recipe_time'), array('label' => 'Level (recipe)', 'value' => 'level'), array('label' => 'Allergens (recipe)', 'value' => 'allergens')), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog'), array('label' => 'On "List View" display Summary of Recipe (if available) instead of post excerpt', 'id' => 'pp_list_view_summary', 'type' => 'on_off', 'desc' => 'On "List View" display Summary of Recipe instead of post excerpt', 'std' => 'off', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog'), array('label' => 'Select which \'post meta\' elements to display on blog page with <strong>Grid layout</strong>', 'id' => 'pp_grid_meta', 'type' => 'checkbox', 'desc' => '', 'choices' => array(array('label' => 'Author', 'value' => 'author'), array('label' => 'Date', 'value' => 'date'), array('label' => 'Comments', 'value' => 'comments'), array('label' => 'Categories', 'value' => 'categories'), array('label' => 'Tags', 'value' => 'tags'), array('label' => 'Servings (recipe)', 'value' => 'servings'), array('label' => 'Preperation Time (recipe)', 'value' => 'recipe_time'), array('label' => 'Level (recipe)', 'value' => 'level'), array('label' => 'Allergens (recipe)', 'value' => 'allergens')), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog'), array('label' => 'Select which \'post meta\' elements to display on blog page for post that are <strong>not recipe</strong>', 'id' => 'pp_meta_no_recipe', 'type' => 'checkbox', 'desc' => '', 'choices' => array(array('label' => 'Author', 'value' => 'author'), array('label' => 'Date', 'value' => 'date'), array('label' => 'Comments', 'value' => 'comments'), array('label' => 'Categories', 'value' => 'categories'), array('label' => 'Tags', 'value' => 'tags')), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog'), array('label' => 'Add blog post content to print view?', 'id' => 'pp_print_content', 'type' => 'on_off', 'desc' => 'By defautl (if OFF) only recipe content is getting printed', 'std' => 'off', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog'), array('label' => 'Copyrights text', 'id' => 'pp_copyrights', 'type' => 'text', 'desc' => 'Text in footer', 'std' => '&copy; Theme by <a href="http://themeforest.net/user/purethemes/portfolio?ref=purethemes">Purethemes.net</a>. All Rights Reserved.', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'footer'), array('label' => 'Footer widgets layout', 'id' => 'pp_footer_widgets', 'type' => 'select', 'desc' => 'Total width of footer is 16 columns, here you can decide layout based on columns number for each widget area in footer', 'choices' => array(array('label' => '5 | 3 | 3 | 5', 'value' => '5,3,3,5'), array('label' => '4 | 4 | 4 | 4', 'value' => '4,4,4,4'), array('label' => '8 | 8', 'value' => '8,8'), array('label' => '1/3 | 2/3', 'value' => '1/3,2/3'), array('label' => '2/3 | 1/3', 'value' => '2/3,1/3'), array('label' => '1/3 | 1/3 | 1/3', 'value' => '1/3,1/3,1/3')), 'std' => '5,3,3,5', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'footer'), array('label' => 'Shop sidebar side', 'id' => 'pp_shop_layout', 'type' => 'radio-image', 'desc' => 'Choose sidebar side on blog page.', 'std' => 'full-width', 'rows' => '', 'post_type' => '', 'choices' => array(array('value' => 'left-sidebar', 'label' => 'Left Sidebar', 'src' => OT_URL . '/assets/images/layout/left-sidebar.png'), array('value' => 'right-sidebar', 'label' => 'Right Sidebar', 'src' => OT_URL . '/assets/images/layout/right-sidebar.png'), array('value' => 'full-width', 'label' => 'Full Width (no sidebar)', 'src' => OT_URL . '/assets/images/layout/full-width.png')), 'taxonomy' => '', 'class' => '', 'section' => 'shop'), array('label' => 'WooCommerce number of items per page', 'id' => 'pp_wooitems', 'type' => 'select', 'desc' => 'Select how many products you want to display on shop page', 'std' => '9', 'rows' => '', 'choices' => array(array('label' => '3', 'value' => '3'), array('label' => '4', 'value' => '4'), array('label' => '5', 'value' => '5'), array('label' => '6', 'value' => '6'), array('label' => '7', 'value' => '7'), array('label' => '8', 'value' => '8'), array('label' => '9', 'value' => '9'), array('label' => '10', 'value' => '10'), array('label' => '11', 'value' => '11'), array('label' => '12', 'value' => '12'), array('label' => '13', 'value' => '13'), array('label' => '14', 'value' => '14'), array('label' => '15', 'value' => '15'), array('label' => '16', 'value' => '16'), array('label' => '20', 'value' => '20'), array('label' => '32', 'value' => '32'), array('label' => '40', 'value' => '40'), array('label' => '99', 'value' => '99')), 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'shop'), array('label' => 'Revert Product Gallery to original WooCommerce gallery', 'id' => 'pp_product_default_gallery', 'type' => 'on_off', 'desc' => 'This will remove Royal Slider and show original gallery for WooCommerce - makes it compatible with some 3rd party plugins', 'std' => 'off', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'shop'), array('id' => 'sidebars_text', 'label' => 'About sidebars', 'desc' => 'All sidebars that you create here will appear both in the Appearance > Widgets, and then you can choose them for specific pages or posts.', 'std' => '', 'type' => 'textblock', 'section' => 'sidebars', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('label' => 'Create Sidebars', 'id' => 'incr_sidebars', 'type' => 'list-item', 'desc' => 'Choose a unique title for each sidebar', 'section' => 'sidebars', 'settings' => array(array('label' => 'ID', 'id' => 'id', 'type' => 'text', 'desc' => 'Write a lowercase single world as ID (it can\'t start with a number!), without any spaces', 'std' => 'my_new_sidebar', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '')))));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
}
Example #23
0
/**
 * Build the custom settings & update OptionTree.
 */
function custom_theme_options()
{
    /* OptionTree is not loaded yet, or this is not an admin request */
    if (!function_exists('ot_settings_id') || !is_admin()) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('sidebar' => ''), 'sections' => array(array('id' => 'general', 'title' => __('General', 'jinda')), array('id' => 'advertisements', 'title' => __('Advertisements', 'jinda')), array('id' => 'footer', 'title' => __('Footer', 'jinda'))), 'settings' => array(array('id' => 'website_logo', 'label' => __('Website logo', 'jinda'), 'desc' => __('recommended size: 200x80px', 'jinda'), 'std' => '', 'type' => 'upload', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'description', 'label' => __('Description', 'jinda'), 'desc' => __('this field for website meta description tag.', 'jinda'), 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'keywords', 'label' => __('Keywords', 'jinda'), 'desc' => __('this field for website meta keywords tag.', 'jinda'), 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'custom_html', 'label' => __('Custom HTML', 'jinda'), 'desc' => __('place your custom HTML tag here<br />
like a popup window from external service.', 'jinda'), 'std' => '', 'type' => 'textarea-simple', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'custom_css', 'label' => __('Custom CSS', 'jinda'), 'desc' => __('place your custom CSS here.<br /><br />
** place without <u>style</u> tag **', 'jinda'), 'std' => '', 'type' => 'css', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'custom_scripts', 'label' => __('Custom Javascripts', 'jinda'), 'desc' => __('Place your external javascript here<br />
like Google Analytics, Facebook Javascript or sth..<br /><br />

** place without <u>script</u> tag **', 'jinda'), 'std' => '', 'type' => 'javascript', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'banner_top', 'label' => __('Banner Top', 'jinda'), 'desc' => __('Place your banner script here <br />
<strong>Recommended size: 468x60px</strong><br /><br />

<small>ไม่ต้องสนใจว่ามันจะฟ้อง error อะไร<br /> ถ้าวางแล้วโฆษณาขึ้นก็โอเค</small>', 'jinda'), 'std' => '', 'type' => 'javascript', 'section' => 'advertisements', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'banner_single', 'label' => __('Banner Single', 'jinda'), 'desc' => __('Place your banner script here <br />
<strong>Recommended size: 300x250</strong><br /><br />

<small>ไม่ต้องสนใจว่ามันจะฟ้อง error อะไร<br /> ถ้าวางแล้วโฆษณาขึ้นก็โอเค</small>', 'jinda'), 'std' => '', 'type' => 'javascript', 'section' => 'advertisements', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'banner_loop', 'label' => __('Banner Loop', 'jinda'), 'desc' => __('เมื่อครบ 3 posts จะแสดง advertise banner 1 ครั้ง<br />
<strong>recommended size: 468x60px</strong><br /><br />

<small>
ไม่ต้องสนใจว่ามัน error อะไร<br />
ถ้า banner ขึ้นถือว่าโอเค
</small>', 'jinda'), 'std' => '', 'type' => 'javascript', 'section' => 'advertisements', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_copyright', 'label' => __('Footer Copyright', 'jinda'), 'desc' => __('Your copyright goes here.', 'jinda'), 'std' => '', 'type' => 'textarea-simple', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'facebook_link', 'label' => __('Facebook Link', 'jinda'), 'desc' => '', 'std' => 'https://www.facebook.com/pages/Techr', 'type' => 'text', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'twitter_link', 'label' => __('Twitter Link', 'jinda'), 'desc' => '', 'std' => 'https://twitter.com/TechrThailand', 'type' => 'text', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'google_plus_link', 'label' => __('Google Plus Link', 'jinda'), 'desc' => '', 'std' => 'https://plus.google.com/105874781308314969682', 'type' => 'text', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'youtube_link', 'label' => __('Youtube Link', 'jinda'), 'desc' => '', 'std' => 'https://www.youtube.com/channel/UCijPSEL2EQa-KZBOtSwE0MQ', 'type' => 'text', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_credit', 'label' => __('Footer Credit', 'jinda'), 'desc' => __('Credit ของผู้พัฒนา', 'jinda'), 'std' => '', 'type' => 'textarea', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
}
 static function _get_custom_css()
 {
     $html = false;
     /* grab a copy of the settings */
     $settings = get_option(ot_settings_id());
     $options = get_option(ot_options_id());
     /* has settings */
     if (isset($settings['settings'])) {
         /* loop through sections and insert CSS when needed */
         foreach ($settings['settings'] as $k => $setting) {
             $allows = self::_options_allow_output();
             if (!empty($allows) and in_array($setting['type'], $allows) and isset($setting['output']) and $setting['output']) {
                 if (isset($options[$setting['id']])) {
                     $html .= self::_get_output_item_css($setting, $options[$setting['id']]);
                 }
             }
         }
     }
     return $html;
 }
/**
 * Build the custom settings & update OptionTree.
 */
function landx_theme_options()
{
    /* OptionTree is not loaded yet */
    if (!function_exists('ot_settings_id')) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    //available option functions - return type array()
    $general_options = landx_general_options();
    $background_options = landx_background_options();
    $header_options = landx_header_options();
    $sidebar_options = landx_sidebar_options();
    $footer_options = landx_footer_options();
    $page_options = landx_page_options();
    $blog_options = landx_blog_options();
    $typography_options = landx_typography_options();
    $styling_options = landx_styling_options();
    $theme_text = landx_theme_text();
    $custom_css = landx_custom_css();
    //merge all available options
    $settings = array_merge($general_options, $background_options, $header_options, $sidebar_options, $footer_options, $page_options, $blog_options, $typography_options, $styling_options, $theme_text, $custom_css);
    $custom_settings = array('contextual_help' => array('sidebar' => ''), 'sections' => array(array('id' => 'general_options', 'title' => __('General options', THEMENAME)), array('id' => 'background_options', 'title' => __('Background Options', THEMENAME)), array('id' => 'footer_options', 'title' => __('Footer options', THEMENAME)), array('id' => 'sidebar_option', 'title' => __('Sidebar options', THEMENAME)), array('id' => 'blog_options', 'title' => __('Blog options', THEMENAME)), array('id' => 'fonts', 'title' => __('Typography options', THEMENAME)), array('id' => 'styling_options', 'title' => __('Styling options', THEMENAME)), array('id' => 'custom_css', 'title' => __('Custom css', THEMENAME))), 'settings' => $settings);
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
    return $custom_settings['settings'];
}
Example #26
0
/**
 * Build the custom settings & update OptionTree.
 *
 * @return    void
 * @since     2.0
 */
function custom_theme_options()
{
    global $wpdb;
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('sections' => array(array('id' => 'general_options', 'title' => '<i class="ot-icon-dashboard"></i>' . __('General', 'magee')), array('id' => 'header', 'title' => '<i class="ot-icon-h-sign"></i>' . __('Header', 'magee')), array('id' => 'logo', 'title' => '<i class="ot-icon-star"></i>' . __('Logo', 'magee')), array('id' => 'menu', 'title' => '<i class="ot-icon-sitemap"></i>' . __('Menu Options', 'magee')), array('id' => 'typography', 'title' => '<i class="ot-icon-font"></i>' . __('Typography', 'magee')), array('id' => 'blog', 'title' => '<i class="ot-icon-bold"></i>' . __('Blog', 'magee')), array('id' => 'portfolio', 'title' => '<i class="ot-icon-briefcase"></i>' . __('Portfolio', 'magee')), array('id' => 'footer', 'title' => '<i class="ot-icon-hand-down"></i>' . __('Footer', 'magee')), array('id' => 'not_found', 'title' => '<i class="ot-icon-frown"></i>' . __('404 Page', 'magee')), array('id' => 'page_layout', 'title' => '<i class="ot-icon-columns"></i>' . __('Page Layout', 'magee'))), 'settings' => array(array('id' => 'existing_prefix', 'label' => __('Existing Prefix', 'magee'), 'std' => '', 'desc' => '<div class="button-primary magee-data-restore ">Import Demo Data</div><p style="padding:20px 0;">WARNING: Clicking this button will replace your current theme options, sliders and widgets.  It can also take a minute to complete. Importing data is recommended on fresh installs only once. Importing on sites with content or importing twice will duplicate menus, pages and all posts.</p>', 'type' => 'textblock', 'section' => 'general_options', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'global_color', 'label' => __('Theme Primary Color', 'magee'), 'std' => '#00b7ee', 'desc' => __('Select the primary color, it defines serveral items like link hovers, highlights, and more.', 'magee'), 'type' => 'colorpicker', 'section' => 'general_options', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'page_background', 'label' => __('Page Background', 'magee'), 'desc' => __('Select color or an image to use for the backgroud.', 'magee'), 'type' => 'background', 'section' => 'general_options', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'main_content_area_background', 'label' => __('Background For Main Content Area In Boxed Mode', 'magee'), 'desc' => __('Select color or an image to use for the main content area backgroud in boxed mode.', 'magee'), 'type' => 'background', 'section' => 'general_options', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('label' => __('Breadcrumb Styles', 'magee'), 'id' => 'breadcrumb_style', 'type' => 'select', 'desc' => __('Select the style to show the breadcrumb. This is a global option for every page or post.', 'magee'), 'choices' => array(array('label' => 'No Breadcrumb', 'value' => '0'), array('label' => 'Breadcrumb without background', 'value' => '1'), array('label' => 'Breadcrumb with background', 'value' => '2')), 'std' => '1', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'general_options'), array('label' => __('Breadcrumb Styles', 'magee'), 'id' => 'breadcrumb_style', 'type' => 'select', 'desc' => '', 'choices' => array(array('label' => 'No Breadcrumb', 'value' => '0'), array('label' => 'Breadcrumb without background', 'value' => '1'), array('label' => 'Breadcrumb with background', 'value' => '2')), 'std' => '1', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'general_options'), array('id' => 'breadcrumb_background', 'label' => __('Breadcrumb Background', 'magee'), 'desc' => __('Select color or an image to use for the breadcrumb background.', 'magee'), 'type' => 'background', 'section' => 'general_options', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('label' => __('Layout', 'magee'), 'id' => 'site_layout', 'type' => 'select', 'desc' => __('Select boxed or wide layout.', 'magee'), 'choices' => array(array('label' => 'Wide', 'value' => 'wide'), array('label' => 'Boxed', 'value' => 'boxed')), 'std' => 'wide', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'general_options'), array('id' => 'tracking_code', 'label' => __('Tracking Code', 'magee'), 'type' => 'textarea-simple', 'section' => 'general_options', 'desc' => 'The Tracking Code initiates the recording process for every page on your site on which it is placed, although not every visitor will actually be recorded. That is determined by your recording ration, quota, visitor type, browser and other parameters. (e.g. google analytics tracking code)', 'rows' => '5', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'space_head', 'label' => __('Space before &lt;/head&gt;', 'magee'), 'type' => 'textarea-simple', 'section' => 'general_options', 'desc' => 'Add code before the &lt;/head&gt; tag.', 'rows' => '5', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'space_body', 'label' => __('Space before &lt;/body&gt;', 'magee'), 'type' => 'textarea-simple', 'section' => 'general_options', 'desc' => 'Add code before the &lt;/body&gt; tag.', 'rows' => '5', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'custom_css', 'label' => __('Custom CSS', 'magee'), 'desc' => __('Paste your CSS code here, do not include any script or HTML in thie field. What you enter here will override the theme CSS. ', 'magee'), 'std' => '#custom {
  margin:0;
}', 'type' => 'css', 'section' => 'general_options', 'rows' => '20', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'header_template', 'label' => __('Header Styles', 'magee'), 'desc' => '', 'std' => '3', 'type' => 'radio-image', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'header_transparent', 'label' => __('Transparent Header', 'magee'), 'desc' => __('Enable/Disable a transparent header that will display your slider behind it.', 'magee'), 'std' => 'off', 'type' => 'on-off', 'section' => 'header'), array('id' => 'header_text', 'label' => __('Header Text', 'magee'), 'std' => '<span><i class="fa fa-phone"></i>01-23456789</span>
<span><i class="fa fa-envelope-o"></i>info@example.com</span>', 'type' => 'textarea-simple', 'section' => 'header', 'rows' => '4', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'sns_list_item', 'label' => __('Header SNS Icon', 'magee'), 'desc' => '', 'std' => array(array('title' => 'Facebook', 'sns' => 'facebook', 'link' => '#'), array('title' => 'Twitter', 'sns' => 'twitter', 'link' => '#'), array('title' => 'LinkedIn', 'sns' => 'linkedin', 'link' => '#'), array('title' => 'YouTube', 'sns' => 'youtube', 'link' => '#'), array('title' => 'Skype', 'sns' => 'skype', 'link' => '#'), array('title' => 'Pinterest', 'sns' => 'pinterest', 'link' => '#'), array('title' => 'Google+', 'sns' => 'google-plus', 'link' => '#'), array('title' => 'Email', 'sns' => 'envelope', 'link' => '#'), array('title' => 'RSS', 'sns' => 'rss', 'link' => '#')), 'type' => 'list-item', 'section' => 'header', 'rows' => '', 'post_type' => '', 'desc' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'settings' => array(array('id' => 'sns', 'label' => __('SNS', 'magee'), 'std' => '', 'type' => 'select', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => '', 'label' => __('-- Choose One --', 'magee'), 'src' => ''), array('value' => 'facebook', 'label' => __('facebook', 'magee'), 'src' => ''), array('value' => 'twitter', 'label' => __('twitter', 'magee'), 'src' => ''), array('value' => 'linkedin', 'label' => __('linkedin', 'magee'), 'src' => ''), array('value' => 'youtube', 'label' => __('youtube', 'magee'), 'src' => ''), array('value' => 'skype', 'label' => __('skype', 'magee'), 'src' => ''), array('value' => 'pinterest', 'label' => __('pinterest', 'magee'), 'src' => ''), array('value' => 'google-plus', 'label' => __('google plus', 'magee'), 'src' => ''), array('value' => 'envelope', 'label' => __('email', 'magee'), 'src' => ''), array('value' => 'rss', 'label' => __('rss', 'magee'), 'src' => ''))), array('id' => 'link', 'label' => __('SNS Link', 'magee'), 'std' => '', 'type' => 'text', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'))), array('id' => 'header_background', 'label' => __('Header Background', 'magee'), 'desc' => __('Select color or an image to use for the header background.', 'magee'), 'type' => 'background', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'header_bg_full', 'label' => __('100% Background Image', 'magee'), 'desc' => __('Check this box to have the header background image display at 100% in width and height and scale according to the browser size.', 'magee'), 'std' => 'off', 'type' => 'on-off', 'section' => 'header'), array('id' => 'margin_header_top', 'label' => __('Header Top Padding', 'magee'), 'desc' => __('In pixels.', 'magee'), 'std' => '0', 'type' => 'numeric-slider', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '0,100,1', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'margin_header_bottom', 'label' => __('Header Bottom Padding', 'magee'), 'desc' => __('In pixels.', 'magee'), 'std' => '0', 'type' => 'numeric-slider', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '0,100,1', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'logo', 'label' => __('Upload Logo', 'magee'), 'desc' => __('Select an image file for your logo.', 'magee'), 'std' => '', 'type' => 'upload', 'section' => 'logo', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'favicon', 'label' => __('Upload Favicon', 'magee'), 'desc' => __('An icon associated with a URL that is variously displayed, as in a browser\'s address bar or next to the site name in a bookmark list. Learn more about <a href="' . esc_url("http://en.wikipedia.org/wiki/Favicon") . '" target="_blank">Favicon</a>', 'magee'), 'std' => '', 'type' => 'upload', 'section' => 'logo', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'dropdown_menu_width', 'label' => __('Main Menu Dropdown Width', 'magee'), 'desc' => __('In pixels.', 'magee'), 'std' => '180', 'type' => 'numeric-slider', 'section' => 'menu', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '180,350,1', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'body_font_family', 'label' => __('Body Font Family', 'magee'), 'desc' => __('Select the font style for body text.', 'magee'), 'std' => '', 'type' => 'typography', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'tagline_typography', 'label' => __('Tagline Typography', 'magee'), 'desc' => __('Select the font style for tagline.', 'magee'), 'std' => '', 'type' => 'typography', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'main_menu_font', 'label' => __('Main Menu Font', 'magee'), 'desc' => __('Select the font style for main menu.', 'magee'), 'std' => '', 'type' => 'typography', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'main_menu_dropdown_font', 'label' => __('Main Menu Dropdown Font', 'magee'), 'desc' => __('Select the font style for main menu dropdown.', 'magee'), 'std' => '', 'type' => 'typography', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'headings_font', 'label' => __('Headings Font', 'magee'), 'desc' => __('Select the font style for content headings.', 'magee'), 'std' => '', 'type' => 'typography', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'content_typography', 'label' => __('Post Content Typography', 'magee'), 'desc' => __('Select the font style for post content.', 'magee'), 'std' => '', 'type' => 'typography', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_headings_font', 'label' => __('Footer Headings Font', 'magee'), 'desc' => __('Select the font style for footer headings.', 'magee'), 'std' => '', 'type' => 'typography', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'copyright_font', 'label' => __('Copyright Font', 'magee'), 'desc' => __('Select the font style for copyright.', 'magee'), 'std' => '', 'type' => 'typography', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'h1_font', 'label' => __('H1 Font', 'magee'), 'desc' => __('Select the font style for &lt;h1&gt; tag.', 'magee'), 'std' => '', 'type' => 'typography', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'h2_font', 'label' => __('H2 Font', 'magee'), 'desc' => __('Select the font style for &lt;h2&gt; tag.', 'magee'), 'std' => '', 'type' => 'typography', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'h3_font', 'label' => __('H3 Font', 'magee'), 'desc' => __('Select the font style for &lt;h3&gt; tag.', 'magee'), 'std' => '', 'type' => 'typography', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'h4_font', 'label' => __('H4 Font', 'magee'), 'desc' => __('Select the font style for &lt;h4&gt; tag.', 'magee'), 'std' => '', 'type' => 'typography', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'h5_font', 'label' => __('H5 Font', 'magee'), 'desc' => __('Select the font style for &lt;h5&gt; tag.', 'magee'), 'std' => '', 'type' => 'typography', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'h6_font', 'label' => __('H6 Font', 'magee'), 'desc' => __('Select the font style for &lt;h6&gt; tag.', 'magee'), 'std' => '', 'type' => 'typography', 'section' => 'typography', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'general_blog_options', 'label' => __('General Blog Options', 'magee'), 'std' => '', 'desc' => '<h2 style="background-color: #999;padding:5px">' . __('General Blog Options', 'magee') . '</h2>', 'type' => 'textblock', 'section' => 'blog', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('label' => __('Excerpt or Full Blog Content', 'magee'), 'id' => 'content_length', 'type' => 'select', 'desc' => __('Choose to display an excerpt or full content on blog pages.', 'magee'), 'choices' => array(array('label' => 'Excerpt', 'value' => 'excerpt'), array('label' => 'Full Content', 'value' => 'full_content')), 'std' => 'excerpt', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog'), array('id' => 'blog_excerpt_length', 'label' => __('Excerpt Length', 'magee'), 'desc' => __('The number of words you want to show in the post excerpts.', 'magee'), 'std' => '55', 'type' => 'numeric-slider', 'section' => 'blog', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '5,200,1', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'strip_html_excerpt', 'label' => __('Strip HTML from Excerpt', 'magee'), 'desc' => __('Choose to display footer widgets or not.', 'magee'), 'std' => 'on', 'type' => 'on-off', 'section' => 'blog'), array('id' => 'single_post_full_width', 'label' => __('Set All Post Items Full Width', 'magee'), 'desc' => __('Turn all single post items to full width with no sidebar.', 'magee'), 'std' => 'off', 'type' => 'on-off', 'section' => 'blog'), array('id' => 'featured_images', 'label' => __('Featured Image on Blog Archive Page', 'magee'), 'desc' => __('Ddisplay featured images on blog archive page or not.', 'magee'), 'std' => 'on', 'type' => 'on-off', 'section' => 'blog'), array('id' => 'blog_single', 'label' => __('Blog Single', 'magee'), 'std' => '', 'desc' => '<h2 style="background-color: #999;padding:5px">' . __('Blog Single Post Page Options', 'magee') . '</h2>', 'type' => 'textblock', 'section' => 'blog', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'featured_images_single', 'label' => __('Featured Image on Single Post Page', 'magee'), 'desc' => __('Display featured images on single post page.', 'magee'), 'std' => 'off', 'type' => 'on-off', 'section' => 'blog'), array('id' => 'social_sharing_box', 'label' => __('Social Sharing Box', 'magee'), 'desc' => __('Display the social sharing box.', 'magee'), 'std' => 'on', 'type' => 'on-off', 'section' => 'blog'), array('id' => 'related_posts', 'label' => __('Related Posts', 'magee'), 'desc' => __('Display related posts.', 'magee'), 'std' => 'on', 'type' => 'on-off', 'section' => 'blog'), array('id' => 'blog_meta_options', 'label' => __('blog meta options', 'magee'), 'std' => '', 'desc' => '<h2 style="background-color: #999;padding:5px">' . __('Blog Meta Options', 'magee') . '</h2>', 'type' => 'textblock', 'section' => 'blog', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'post_meta_author', 'label' => __('Display Post Meta Author', 'magee'), 'desc' => __('Display the author name from post meta.', 'magee'), 'std' => 'on', 'type' => 'on-off', 'section' => 'blog'), array('id' => 'post_meta_date', 'label' => __('Display Post Meta Date', 'magee'), 'desc' => __('Display the date from post meta.', 'magee'), 'std' => 'on', 'type' => 'on-off', 'section' => 'blog'), array('id' => 'post_meta_cats', 'label' => __('Display Post Meta Categories', 'magee'), 'desc' => __('Display the categories from post meta.', 'magee'), 'std' => 'on', 'type' => 'on-off', 'section' => 'blog'), array('id' => 'post_meta_comments', 'label' => __('Display Post Meta Comments', 'magee'), 'desc' => __('Display the comments from post meta.', 'magee'), 'std' => 'on', 'type' => 'on-off', 'section' => 'blog'), array('id' => 'post_meta_read', 'label' => __('Display Post Meta Read More Link', 'magee'), 'desc' => __('Display the read more link from post meta.', 'magee'), 'std' => 'on', 'type' => 'on-off', 'section' => 'blog'), array('id' => 'date_format', 'label' => __('Date Format', 'magee'), 'desc' => __('<a target="_blank" href="http://codex.wordpress.org/Formatting_Date_and_Time">Formatting Date and Time</a>', 'magee'), 'std' => 'M d, Y', 'type' => 'text', 'section' => 'blog'), array('id' => 'general_portfolio_options', 'label' => __('Blog Single', 'magee'), 'std' => '', 'desc' => '<h2 style="background-color: #999;padding:5px">' . __('General Portfolio Options', 'magee') . '</h2>', 'type' => 'textblock', 'section' => 'portfolio', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'portfolio_items', 'label' => __('Number of Portfolio Items Per Page', 'magee'), 'desc' => __('The number of posts to display per page for portfolio category.', 'magee'), 'std' => '10', 'type' => 'numeric-slider', 'section' => 'portfolio', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '2,40,1', 'class' => '', 'condition' => '', 'operator' => 'and'), array('label' => __('Portfolio Category Columns', 'magee'), 'id' => 'portfolio_category_columns', 'type' => 'select', 'desc' => __('Select the number of columns for portfolio category.', 'magee'), 'choices' => array(array('label' => '2', 'value' => '2'), array('label' => '3', 'value' => '3'), array('label' => '4', 'value' => '4')), 'std' => '3', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'portfolio'), array('id' => 'portfolio_slug', 'label' => __('Portfolio Slug', 'magee'), 'desc' => __('Change/Rewrite the permalink when you use the permalink type as %postname%. Make sure to regenerate permalinks.', 'magee'), 'std' => 'portfolio', 'type' => 'text', 'section' => 'portfolio'), array('id' => 'portfolio_social_sharing_box', 'label' => __('Social Sharing Box', 'magee'), 'desc' => __('Choose to display the social sharing box.', 'magee'), 'std' => 'on', 'type' => 'on-off', 'section' => 'footer'), array('id' => 'footer_area_active', 'label' => __('Footer Widget Area On/Off', 'magee'), 'desc' => __('Choose to display footer widgets or not.', 'magee'), 'std' => 'on', 'type' => 'on-off', 'section' => 'footer'), array('label' => __('Number of Footer Columns', 'magee'), 'id' => 'footer_widgets_columns', 'type' => 'select', 'desc' => __('Select the number of columns to display in the footer.', 'magee'), 'choices' => array(array('label' => '1', 'value' => '1'), array('label' => '2', 'value' => '2'), array('label' => '3', 'value' => '3'), array('label' => '4', 'value' => '4')), 'std' => '4', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'footer_widget_area'), array('id' => 'footer_area_background', 'label' => __('Footer Widget Area Background', 'magee'), 'desc' => __('Select color or an image to use for the footer widget area backgroud.', 'magee'), 'type' => 'background', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footerw_bg_full', 'label' => __('100% Background Image', 'magee'), 'desc' => __('Check this box to have the footer widgets area background image display at 100% in width and height and scale according to the browser size.', 'magee'), 'std' => 'off', 'type' => 'on-off', 'section' => 'footer'), array('id' => 'footer_area_top_padding', 'label' => __('Footer Top Padding', 'magee'), 'desc' => __('In pixels.', 'magee'), 'std' => '40', 'type' => 'numeric-slider', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '0,100,1', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_area_bottom_padding', 'label' => __('Footer Bottom Padding', 'magee'), 'desc' => __('In pixels.', 'magee'), 'std' => '0', 'type' => 'numeric-slider', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '0,100,1', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_copyright_active', 'label' => __('Copyright Bar On/Off', 'magee'), 'desc' => __('Choose to display footer copyright bar or not.', 'magee'), 'std' => 'on', 'type' => 'on-off', 'section' => 'footer'), array('id' => 'copyright', 'label' => __('Copyright Text', 'magee'), 'std' => 'Copyright &copy; ' . date("Y"), 'desc' => __('Enter the text that displays in the copyright bar. HTML markup can be used.', 'magee'), 'type' => 'textarea-simple', 'section' => 'footer', 'rows' => '5', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'copyright_top_padding', 'label' => __('Copyright Top Padding', 'magee'), 'desc' => __('In pixels.', 'magee'), 'std' => '0', 'type' => 'numeric-slider', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '0,100,1', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'copyright_bottom_padding', 'label' => __('Copyright Bottom Padding', 'magee'), 'desc' => __('In pixels.', 'magee'), 'std' => '0', 'type' => 'numeric-slider', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '0,100,1', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'display_footer_social_icons', 'label' => __('Display Social Icons on Footer of the Page', 'magee'), 'desc' => __('Choose to display footer social icons or not.', 'magee'), 'std' => 'on', 'type' => 'on-off', 'section' => 'footer'), array('id' => 'footer_social_icon_color', 'label' => __('Footer Social Icons Custom Color', 'magee'), 'desc' => __('Select the color of the social icons in the footer.', 'magee'), 'std' => '#aaaaaa', 'type' => 'colorpicker', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_sns_list', 'label' => __('Footer SNS', 'magee'), 'desc' => '', 'std' => array(array('title' => 'Facebook', 'sns' => 'facebook', 'link' => '#'), array('title' => 'Twitter', 'sns' => 'twitter', 'link' => '#'), array('title' => 'LinkedIn', 'sns' => 'linkedin', 'link' => '#'), array('title' => 'YouTube', 'sns' => 'youtube', 'link' => '#'), array('title' => 'Skype', 'sns' => 'skype', 'link' => '#'), array('title' => 'Pinterest', 'sns' => 'pinterest', 'link' => '#'), array('title' => 'Google+', 'sns' => 'google-plus', 'link' => '#'), array('title' => 'Email', 'sns' => 'envelope', 'link' => '#'), array('title' => 'RSS', 'sns' => 'rss', 'link' => '#')), 'type' => 'list-item', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'desc' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'settings' => array(array('id' => 'sns', 'label' => __('SNS', 'magee'), 'std' => '', 'type' => 'select', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => '', 'label' => __('-- Choose One --', 'magee'), 'src' => ''), array('value' => 'facebook', 'label' => __('facebook', 'magee'), 'src' => ''), array('value' => 'twitter', 'label' => __('twitter', 'magee'), 'src' => ''), array('value' => 'linkedin', 'label' => __('linkedin', 'magee'), 'src' => ''), array('value' => 'youtube', 'label' => __('youtube', 'magee'), 'src' => ''), array('value' => 'skype', 'label' => __('skype', 'magee'), 'src' => ''), array('value' => 'pinterest', 'label' => __('pinterest', 'magee'), 'src' => ''), array('value' => 'google-plus', 'label' => __('google plus', 'magee'), 'src' => ''), array('value' => 'envelope', 'label' => __('email', 'magee'), 'src' => ''), array('value' => 'rss', 'label' => __('rss', 'magee'), 'src' => ''))), array('id' => 'link', 'label' => __('SNS Link', 'magee'), 'std' => '', 'type' => 'text', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'))), array('id' => 'not_found_title', 'label' => __('Title', 'magee'), 'std' => 'WHOOPS!', 'type' => 'text', 'section' => 'not_found', 'rows' => '10', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'not_found_content', 'label' => __('Content', 'magee'), 'std' => 'THERE IS NOTHING HERE.<br />PERHAPS YOU WERE GIVEN THE WRONG URL?', 'type' => 'textarea', 'section' => 'not_found', 'rows' => '5', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'default_layout', 'label' => __('Default Layout', 'magee'), 'desc' => '', 'std' => 'left-sidebar', 'type' => 'radio-image', 'section' => 'page_layout', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'default_page_layout', 'label' => __('Default Page Layout', 'magee'), 'desc' => '', 'std' => '', 'type' => 'radio-image', 'section' => 'page_layout', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'default_post_layout', 'label' => __('Default Single Post Layout', 'magee'), 'desc' => '', 'std' => 'left-sidebar', 'type' => 'radio-image', 'section' => 'page_layout', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'default_portfolio_layout', 'label' => __('Default Single Portfolio Layout', 'magee'), 'desc' => '', 'std' => '', 'type' => 'radio-image', 'section' => 'page_layout', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
}
Example #27
0
 function charitas_theme_options()
 {
     /*-----------------------------------------------------------
     			OptionTree is not loaded yet, or this is not an admin request
     		-----------------------------------------------------------*/
     if (!function_exists('ot_settings_id') || !is_admin()) {
         return false;
     }
     /*-----------------------------------------------------------
     			Get a copy of the saved settings array.
     		-----------------------------------------------------------*/
     $saved_settings = get_option(ot_settings_id(), array());
     /*-----------------------------------------------------------
     			Custom settings array that will eventually be  passes 
     			to the OptionTree Settings API Class.
     		-----------------------------------------------------------*/
     $custom_settings = array('sections' => array(array('title' => __('Welcome', 'charitas'), 'id' => 'welcome_settings'), array('title' => __('General Setting', 'charitas'), 'id' => 'general_settings'), array('title' => __('Toolbar settings', 'charitas'), 'id' => 'toolbar'), array('title' => __('Slider settings', 'charitas'), 'id' => 'slider_settings'), array('title' => __('Home page settings', 'charitas'), 'id' => 'home_page_settings'), array('title' => __('Blog settings', 'charitas'), 'id' => 'blog_settings')), 'settings' => array(array('label' => __('Welcome!', 'charitas'), 'id' => 'welcome-message', 'type' => 'textblock-titled', 'desc' => __('First of all thank you for choosing one of WPlook Themes namely <strong>Charitas Lite</strong>, your choice is greatly appreciated! This is a very good start for your organization.<br /> <br /> Don\'t limit your Organization - Go with <a target="_blank" href="https://wplook.com/theme/charitas-charity-nonprofit-wordpress-theme/?utm_source=Buy-Full&utm_medium=link&utm_campaign=Charitas-Lite">Full Version</a>', 'charitas'), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'welcome_settings'), array('label' => __('Charitas - Full Version', 'charitas'), 'id' => 'welcome-message-2', 'type' => 'textblock-titled', 'desc' => __('Charitas is a unique Premium Charity WordPress Theme built for Charity Organizations, Non Profit Associations, Foundations, Political Organizations or Churches.', 'charitas'), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'welcome_settings'), array('label' => __('Used by over 2,200 Non Profit Organizations', 'charitas'), 'id' => 'welcome-message-3', 'type' => 'textblock-titled', 'desc' => __('Charitas will help you to Grow your Organization, to Fundraise money for any cause, to Build trust and credibility, to Bring your organization to the next level.', 'charitas'), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'welcome_settings'), array('label' => __('Upgrade Nowto full version and get 10% off!', 'charitas'), 'id' => 'welcome-message-4', 'type' => 'textblock-titled', 'desc' => __('Use the coupon code "charitas-lite". <br /> <br /><a target="_blank" href="https://wplook.com/theme/charitas-charity-nonprofit-wordpress-theme/?utm_source=Buy-Full&utm_medium=link&utm_campaign=Charitas-Lite">Start Now!</a>', 'charitas'), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'welcome_settings'), array('label' => __('Logo Image', 'charitas'), 'id' => 'charitas_logo', 'type' => 'upload', 'desc' => __('Upload your logo.', 'charitas'), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'general_settings'), array('label' => __('Copyright', 'charitas'), 'id' => 'charitas_copyright', 'type' => 'text', 'desc' => __('Enter your Copyright notice displayed in the footer of the website.', 'charitas'), 'std' => 'Copyright &copy; 2015. All Rights reserved.', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'general_settings'), array('label' => __('Custom Cascading Style Sheets', 'charitas'), 'id' => 'charitas_css', 'type' => 'css', 'desc' => __('Add custom CSS to your theme.', 'charitas'), 'std' => '', 'rows' => '10', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'general_settings'), array('label' => __('Breadcrumb', 'charitas'), 'id' => 'charitas_breadcrumbs', 'type' => 'on-off', 'desc' => __('Activate or deactivate the breadcrumbs.', 'charitas'), 'std' => 'on', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'general_settings'), array('label' => __('Contact Form Email', 'charitas'), 'id' => 'charitas_contact_form_email', 'type' => 'text', 'desc' => __('Add the default emaild address for contact form.', 'charitas'), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'general_settings'), array('label' => __('Phone Number', 'charitas'), 'id' => 'charitas_phone_number', 'type' => 'text', 'desc' => __('Add the phone number.', 'charitas'), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'toolbar'), array('label' => __('RSS Link', 'charitas'), 'id' => 'charitas_rss_link', 'type' => 'text', 'desc' => __('Add the RSS link or Feedburner RSS Link', 'charitas'), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'toolbar'), array('label' => __('Contact page Link', 'charitas'), 'id' => 'charitas_contact_page_link', 'type' => 'custom-post-type-select', 'desc' => __('Select the contact page', 'charitas'), 'std' => '', 'rows' => '', 'post_type' => 'page', 'taxonomy' => '', 'class' => '', 'section' => 'toolbar'), array('label' => __('Contact Email', 'charitas'), 'id' => 'charitas_contact_email', 'type' => 'text', 'desc' => __('Add an email address. <strong>NOTE*</strong> Keep this field blank if you selected the contact page.', 'charitas'), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'toolbar'), array('label' => __('Social Network Navigation', 'charitas'), 'id' => 'charitas_toolbar_share', 'type' => 'list-item', 'desc' => __('Press the <strong>Add New</strong> button in order to add social media links.', 'charitas'), 'settings' => array(array('label' => __('Service Name', 'charitas'), 'id' => 'charitas_share_item_name', 'type' => 'text', 'desc' => __('The name of the social network site, for example: "Facebook"', 'charitas'), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => ''), array('label' => __('URL', 'charitas'), 'id' => 'charitas_share_item_url', 'type' => 'text', 'desc' => __('Enter the URL of the social network site, for example: http://www.facebook.com/wplookthemes', 'charitas'), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => ''), array('label' => __('Icon', 'charitas'), 'id' => 'charitas_share_item_icon', 'type' => 'text', 'desc' => __('<strong>NOTICE</strong>: Choose one item from tne next list: <br />icon-facebook, <br />icon-github, <br />icon-twitter, <br />icon-pinterest, <br />icon-linkedin, <br />icon-google-plus, <br />icon-youtube, <br />icon-skype, <br />icon-vk, <br />icon-vimeo', 'charitas'), 'std' => 'icon-', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => '')), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'toolbar'), array('label' => __('Group Social buttons', 'charitas'), 'id' => 'charitas_group_icons', 'type' => 'on-off', 'desc' => __('Group/Ungroup Social buttons.', 'charitas'), 'std' => 'on', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'toolbar'), array('label' => __('Search form', 'charitas'), 'id' => 'charitas_search_form', 'type' => 'on-off', 'desc' => __('Activate or deactivate the search form.', 'charitas'), 'std' => 'on', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'toolbar'), array('label' => __('Donate Link', 'charitas'), 'id' => 'charitas_donete_link', 'type' => 'text', 'desc' => __('Add the donate link', 'charitas'), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'toolbar'), array('label' => __('Slides', 'charitas'), 'id' => 'wpl_sliders', 'type' => 'list-item', 'desc' => __('Press the <strong>Add New</strong> button in order to add a new slider.', 'charitas'), 'settings' => array(array('label' => __('Slider Image', 'charitas'), 'id' => 'charitas_slider_item_image', 'type' => 'upload', 'desc' => __('<strong>Recommended image size:</strong> 1920x714px.', 'charitas'), 'std' => '', 'rows' => '', 'post_type' => '', 'class' => '', 'taxonomy' => '', 'class' => '', 'section' => ''), array('label' => __('Slider Thumbnail', 'charitas'), 'id' => 'charitas_slider_item_thumbnail', 'type' => 'upload', 'desc' => __('<strong>Recommended image size:</strong> 272x150px', 'charitas'), 'std' => '', 'rows' => '', 'post_type' => '', 'class' => '', 'taxonomy' => '', 'section' => ''), array('label' => __('Slide Title', 'charitas'), 'id' => 'charitas_slider_item_title', 'type' => 'text', 'desc' => __('Enter a slide Title.', 'charitas'), 'std' => '', 'rows' => '', 'post_type' => '', 'class' => '', 'taxonomy' => '', 'section' => ''), array('label' => __('Slide Title color', 'charitas'), 'id' => 'charitas_slider_item_title_color', 'type' => 'colorpicker', 'desc' => __('Select a color for slider title.', 'charitas'), 'std' => '#FFFFFF', 'rows' => '', 'post_type' => '', 'class' => '', 'taxonomy' => '', 'section' => ''), array('label' => __('Slide Description', 'charitas'), 'id' => 'charitas_slider_item_description', 'type' => 'textarea', 'desc' => __('Enter a slide Title.', 'charitas'), 'std' => '', 'rows' => '', 'post_type' => '', 'class' => '', 'taxonomy' => '', 'section' => ''), array('label' => __('Slide Description color', 'charitas'), 'id' => 'charitas_slider_item_description_color', 'type' => 'colorpicker', 'desc' => __('Select a color for slider description.', 'charitas'), 'std' => '#FFFFFF', 'rows' => '', 'post_type' => '', 'class' => '', 'taxonomy' => '', 'section' => ''), array('label' => __('Slide Buton Text', 'charitas'), 'id' => 'charitas_slider_item_button_text', 'type' => 'text', 'desc' => __('Enter the text you want to display on button, for examle: read more', 'charitas'), 'std' => 'Read more', 'rows' => '', 'post_type' => '', 'class' => '', 'taxonomy' => '', 'section' => ''), array('label' => __('Slide URL', 'charitas'), 'id' => 'charitas_slider_item_url', 'type' => 'text', 'desc' => __('Enter the slider URL', 'charitas'), 'std' => '', 'rows' => '', 'post_type' => '', 'class' => '', 'taxonomy' => '', 'section' => ''), array('label' => __('Slide Button color', 'charitas'), 'id' => 'charitas_slider_item_button_color', 'type' => 'colorpicker', 'desc' => __('Select a color for the button.', 'charitas'), 'std' => '#FFFFFF', 'rows' => '', 'post_type' => '', 'class' => '', 'taxonomy' => '', 'section' => '')), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'slider_settings'), array('label' => __('Revolution Slider Alias', 'charitas'), 'id' => 'charitas_slider_revolution', 'type' => 'text', 'desc' => __('<strong>Use Revolution Slider instead of displaing the base slider (FlexSlider).</strong> If you have installed the revolution slider Plugin, add the Slider Alias here. From this example [rev_slider test1] you need to add only the test1. If you do not have the plugin you can buy it from here: http://bit.ly/1eD7aE1', 'charitas'), 'std' => '', 'rows' => '', 'post_type' => '', 'class' => '', 'taxonomy' => '', 'section' => 'slider_settings'), array('label' => __('First home page widget area', 'charitas'), 'id' => 'charitas_first_front_widget_size', 'type' => 'select', 'desc' => __('Set the size for first home page widget area', 'charitas'), 'choices' => array(array('label' => '25%', 'value' => 'grid_4'), array('label' => '50%', 'value' => 'grid_8'), array('label' => '75%', 'value' => 'grid_12'), array('label' => '100%', 'value' => 'grid_16')), 'std' => 'grid_12', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'home_page_settings'), array('label' => __('Second home page widget area', 'charitas'), 'id' => 'charitas_second_front_widget_size', 'type' => 'select', 'desc' => __('Set the size for second home page widget area', 'charitas'), 'choices' => array(array('label' => '25%', 'value' => 'grid_4'), array('label' => '50%', 'value' => 'grid_8'), array('label' => '75%', 'value' => 'grid_12'), array('label' => '100%', 'value' => 'grid_16')), 'std' => 'grid_4', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'home_page_settings'), array('label' => __('Third home page widget area', 'charitas'), 'id' => 'charitas_third_front_widget_size', 'type' => 'select', 'desc' => __('Set the size for third home page widget area', 'charitas'), 'choices' => array(array('label' => '25%', 'value' => 'grid_4'), array('label' => '50%', 'value' => 'grid_8'), array('label' => '75%', 'value' => 'grid_12'), array('label' => '100%', 'value' => 'grid_16')), 'std' => 'grid_16', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'home_page_settings'), array('label' => __('Forth home page widget area', 'charitas'), 'id' => 'charitas_forth_front_widget_size', 'type' => 'select', 'desc' => __('Set the size for forth home page widget area', 'charitas'), 'choices' => array(array('label' => '25%', 'value' => 'grid_4'), array('label' => '50%', 'value' => 'grid_8'), array('label' => '75%', 'value' => 'grid_12'), array('label' => '100%', 'value' => 'grid_16')), 'std' => 'grid_16', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'home_page_settings'), array('label' => __('Date on Blog/Archive template', 'charitas'), 'id' => 'charitas_date_blog_post', 'type' => 'on-off', 'desc' => __('Activate/Deactivated the date on Blog/Archive template.', 'charitas'), 'std' => 'on', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog_settings'), array('label' => __('Author on Blog/Archive template', 'charitas'), 'id' => 'charitas_author_blog_post', 'type' => 'on-off', 'desc' => __('Activate/Deactivated the author on Blog/Archive template.', 'charitas'), 'std' => 'on', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog_settings'), array('label' => __('Date on single post', 'charitas'), 'id' => 'charitas_date_single_post', 'type' => 'on-off', 'desc' => __('Activate/Deactivated the date on single post.', 'charitas'), 'std' => 'on', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog_settings'), array('label' => __('Author on single post', 'charitas'), 'id' => 'charitas_author_single_post', 'type' => 'on-off', 'desc' => __('Activate/Deactivated the author on single post.', 'charitas'), 'std' => 'on', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog_settings'), array('label' => __('Category on single post', 'charitas'), 'id' => 'charitas_category_single_post', 'type' => 'on-off', 'desc' => __('Activate/Deactivated the category on single post.', 'charitas'), 'std' => 'on', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'blog_settings')));
     /* allow settings to be filtered before saving */
     $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
     if ($saved_settings !== $custom_settings) {
         update_option(ot_settings_id(), $custom_settings);
     }
 }
Example #28
0
 /**
  * AJAX utility function for adding a new section.
  */
 public function add_section()
 {
     echo ot_sections_view(ot_settings_id() . '[sections]', $_REQUEST['count']);
     die;
 }
 function ot_maybe_migrate_settings()
 {
     // Filter the ID to migrate from
     $settings_id = apply_filters('ot_migrate_settings_id', '');
     // Attempt to migrate Settings
     if (!empty($settings_id) && get_option(ot_settings_id()) === false && ot_settings_id() !== $settings_id) {
         // Old settings
         $settings = get_option($settings_id);
         // Check for array keys
         if (isset($settings['sections']) && isset($settings['settings'])) {
             update_option(ot_settings_id(), $settings);
         }
     }
 }
Example #30
0
 function ot_wpml_filter($options, $option_id)
 {
     // Return translated strings using WMPL
     if (function_exists('icl_t')) {
         $settings = get_option(ot_settings_id());
         if (isset($settings['settings'])) {
             foreach ($settings['settings'] as $setting) {
                 // List Item & Slider
                 if ($option_id == $setting['id'] && in_array($setting['type'], array('list-item', 'slider'))) {
                     foreach ($options[$option_id] as $key => $value) {
                         foreach ($value as $ckey => $cvalue) {
                             $id = $option_id . '_' . $ckey . '_' . $key;
                             $_string = icl_t('Theme Options', $id, $cvalue);
                             if (!empty($_string)) {
                                 $options[$option_id][$key][$ckey] = $_string;
                             }
                         }
                     }
                     // List Item & Slider
                 } else {
                     if ($option_id == $setting['id'] && $setting['type'] == 'social-links') {
                         foreach ($options[$option_id] as $key => $value) {
                             foreach ($value as $ckey => $cvalue) {
                                 $id = $option_id . '_' . $ckey . '_' . $key;
                                 $_string = icl_t('Theme Options', $id, $cvalue);
                                 if (!empty($_string)) {
                                     $options[$option_id][$key][$ckey] = $_string;
                                 }
                             }
                         }
                         // All other acceptable option types
                     } else {
                         if ($option_id == $setting['id'] && in_array($setting['type'], apply_filters('ot_wpml_option_types', array('text', 'textarea', 'textarea-simple')))) {
                             $_string = icl_t('Theme Options', $option_id, $options[$option_id]);
                             if (!empty($_string)) {
                                 $options[$option_id] = $_string;
                             }
                         }
                     }
                 }
             }
         }
     }
     return $options[$option_id];
 }