/** * Define the sections and settings for the Visibility panel */ function weaverx_customizer_define_visibility_sections($sections) { $panel = 'weaverx_visibility'; $visibility_sections = array(); /** * General */ $visibility_sections['visibility-global-vis'] = array('panel' => $panel, 'title' => __('Global Visibility', 'weaver-xtreme'), 'description' => 'Set global visibility attributes.', 'options' => array('hide_tooltip' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'refresh'), 'control' => array('control_type' => WEAVERX_PLUS_CHECKBOX_CONTROL, 'label' => __('Hide Menu/Link Tool Tips', 'weaver-xtreme') . WEAVERX_REFRESH_ICON, 'description' => __('Hide the tool tip pop up over all menus and links.)', 'weaver-xtreme'), 'type' => 'checkbox')))); /** * Site Header */ $visibility_sections['visibility-header'] = array('panel' => $panel, 'title' => __('Header Area', 'weaver-xtreme'), 'options' => array('header_hide' => weaverx_cz_select(__('Hide Header Area', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'hide_site_title' => weaverx_cz_select(__('Hide Site Title', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'hide_site_tagline' => weaverx_cz_select(__('Hide Tagline', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'hide_header_image' => weaverx_cz_select(__('Hide Header Image', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'hide_header_image_front' => weaverx_cz_checkbox_refresh(__('Hide Header Image on Front Page', 'weaver-xtreme')), 'header_sb_hide' => weaverx_cz_select(__('Hide Header Widget Area', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'header_html_hide' => weaverx_cz_select(__('Hide Header HTML Area', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'header_search_hide' => weaverx_cz_select(__('Hide Search box on Header', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'))); /** * Main Menu */ $visibility_sections['visibility-menus'] = array('panel' => $panel, 'title' => __('Menus', 'weaver-xtreme'), 'description' => __('Set visibility for Menus.', 'weaver-xtreme'), 'options' => array('visibility-mm-heading' => weaverx_cz_group_title(__('Primary Menu', 'weaver-xtreme')), 'm_primary_hide' => weaverx_cz_select(__('Hide Primary Menu', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'm_primary_hide_arrows' => weaverx_cz_checkbox_refresh(__('Hide Primary Menu Arrows', 'weaver-xtreme'), ''), 'm_primary_hide_left' => weaverx_cz_select_plus(__('Hide Primary Menu Left HTML', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'm_primary_hide_right' => weaverx_cz_select_plus(__('Hide Primary Menu Right HTML', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'menu_nohome' => weaverx_cz_checkbox_refresh(__('No Home Menu Item', 'weaver-xtreme'), __("Don't automatically add Home menu item for home page (as defined in Settings->Reading)", 'weaver-xtreme')), 'visibility-pm-line1' => weaverx_cz_line(), 'visibility-sm-heading' => weaverx_cz_group_title(__('Secondary Menu', 'weaver-xtreme')), 'm_secondary_hide' => weaverx_cz_select(__('Hide Secondary Menu', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'm_secondary_hide_arrows' => weaverx_cz_checkbox_refresh(__('Hide Secondary Menu Arrows', 'weaver-xtreme')), 'm_secondary_hide_left' => weaverx_cz_select_plus(__('Hide Secondary Menu Left HTML', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'm_secondary_hide_right' => weaverx_cz_select_plus(__('Hide Secondary Menu Right HTML', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'viz-pm-line2' => weaverx_cz_line(), 'visibility-minim-heading' => weaverx_cz_group_title(__('Header Mini Menu', 'weaver-xtreme'), __('You must define a Header Menu from the Custom Menus Content menu.', 'weaver-xtreme')), 'm_header_mini_hide' => weaverx_cz_select(__('Hide Header Mini Menu', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'))); if (weaverx_cz_is_plus()) { $new_opts = array('spacing-xm-line1' => weaverx_cz_line(), 'visibility-xm-heading' => weaverx_cz_group_title(__('Extra Menu', 'weaver-xtreme')), 'm_extra_hide' => weaverx_cz_select(__('Hide Extra Menu', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'm_extra_hide_arrows' => weaverx_cz_checkbox_refresh(__('Hide Extra Menu Arrows', 'weaver-xtreme')), 'm_extra_hide_left' => weaverx_cz_select_plus(__('Hide Extra Menu Left HTML', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'm_extra_hide_right' => weaverx_cz_select_plus(__('Hide Extra Menu Right HTML', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh')); } else { $new_opts = weaverx_cz_add_plus_message('spacing_menus', __('Extra Menu', 'weaver-xtreme'), __('Add extra menus with <strong>Weaver Xtreme Plus</strong>.', 'weaver-xtreme')); } // add stub or extra menu options $visibility_sections['visibility-menus']['options'] = array_merge($visibility_sections['visibility-menus']['options'], $new_opts); /** * Info Bar */ $visibility_sections['visibility-info-bar'] = array('panel' => $panel, 'title' => __('Info Bar', 'weaver-xtreme'), 'description' => __('Info Bar with breadcrumbs and paged navigation displayed under Primary Menu.', 'weaver-xtreme'), 'options' => array('infobar_hide' => weaverx_cz_select(__('Hide Info Bar', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'info_hide_breadcrumbs' => weaverx_cz_checkbox_refresh(__('Hide Breadcrumbs', 'weaver-xtreme'), __('Do not display the Breadcrumbs on the Infobar', 'weaver-xtreme')), 'info_hide_pagenav' => weaverx_cz_checkbox_refresh(__('Hide Page Navigation', 'weaver-xtreme'), __('Do not display the numbered Page navigation on the Infobar', 'weaver-xtreme')), 'info_search' => array('setting' => array('sanitize_callback' => 'absint'), 'control' => array('label' => __('Show Search Box', 'weaver-xtreme') . WEAVERX_REFRESH_ICON, 'description' => __('Include a Search box on the right.', 'weaver-xtreme') . WEAVERX_REFRESH_ICON, 'type' => 'checkbox')), 'info_addlogin' => array('setting' => array('sanitize_callback' => 'absint'), 'control' => array('label' => __('Show Log In', 'weaver-xtreme') . WEAVERX_REFRESH_ICON, 'description' => __('Include a simple Log In link on the right.', 'weaver-xtreme') . WEAVERX_REFRESH_ICON, 'type' => 'checkbox')))); /** * Content */ $visibility_sections['visibility-content'] = array('panel' => $panel, 'title' => __('Content', 'weaver-xtreme'), 'description' => __('visibility for general page and post content.', 'weaver-xtreme'), 'options' => array('visibility-content-comments-heading' => weaverx_cz_group_title(__('Comments', 'weaver-xtreme'), __('Visibility settings for Comments area.', 'weaver-xtreme')), 'hide_old_comments' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'refresh'), 'control' => array('control_type' => WEAVERX_PLUS_CHECKBOX_CONTROL, 'label' => __('Hide Old Comments When Closed', 'weaver-xtreme') . WEAVERX_REFRESH_ICON, 'description' => __('Hide previous comments after closing comments for page or post. (Default: show old comments after closing.)', 'weaver-xtreme'), 'type' => 'checkbox')), 'form_allowed_tags' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'refresh'), 'control' => array('control_type' => WEAVERX_PLUS_CHECKBOX_CONTROL, 'label' => __('Show Allowed HTML', 'weaver-xtreme') . WEAVERX_REFRESH_ICON, 'description' => __('Show the allowed HTML tags below comment input box.', 'weaver-xtreme'), 'type' => 'checkbox')), 'hide_comment_bubble' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'refresh'), 'control' => array('control_type' => WEAVERX_PLUS_CHECKBOX_CONTROL, 'label' => __('Hide Comment Title Icon', 'weaver-xtreme') . WEAVERX_REFRESH_ICON, 'description' => __('Hide the comment icon (bubble) before the Comments title.', 'weaver-xtreme'), 'type' => 'checkbox')), 'hide_comment_hr' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'refresh'), 'control' => array('control_type' => WEAVERX_PLUS_CHECKBOX_CONTROL, 'label' => __('Hide Separator Above Comments', 'weaver-xtreme') . WEAVERX_REFRESH_ICON, 'description' => __('Hide the (<hr>) separator line above the Comments area.', 'weaver-xtreme'), 'type' => 'checkbox')), 'visibility-content-comments-note' => weaverx_cz_heading(__('Hiding/Enabling Page and Post Comments', 'weaver-xtreme'), __('Controlling "Reply/Leave a Comment" visibility for pages and posts is <strong>not</strong> a theme function. It is controlled by WordPress on the <em>Settings → Discussion</em> menu.', 'weaver-xtreme')))); /** * Post Specific */ $visibility_sections['visibility-post-specific'] = array('panel' => $panel, 'title' => __('Post Specific', 'weaver-xtreme'), 'description' => __('Post Specific visibility - override Content visibility.', 'weaver-xtreme'), 'options' => array('visibility-posts-metax-heading' => weaverx_cz_group_title(__('Post Meta Info Lines', 'weaver-xtreme')), 'post_info_hide_top' => weaverx_cz_checkbox_refresh(__('Hide top post meta info line', 'weaver-xtreme'), __('Hide entire top info line (posted on, by) of post.', 'weaver-xtreme')), 'post_info_hide_bottom' => weaverx_cz_checkbox_refresh(__('Hide bottom post meta info line', 'weaver-xtreme'), __('Hide entire bottom info line (posted in, comments) of post.', 'weaver-xtreme')), 'show_post_bubble' => weaverx_cz_checkbox_refresh(__('Show Comment Bubble', 'weaver-xtreme'), __('Show comment bubble with link to comments on the post info line.', 'weaver-xtreme')), 'show_post_avatar' => weaverx_cz_select(__('Show Author Avatar', 'weaver-xtreme'), __('Show author avatar on the post info line (also can be set per post with post editor).', 'weaver-xtreme'), 'weaverx_cz_choices_hide', 'hide', 'refresh'), 'visibility-posts-note-meta-heading' => weaverx_cz_heading(__('NOTE:', 'weaver-xtreme'), __('Hiding any meta info item will force using Icons instead of text descriptions.', 'weaver-xtreme')), 'post_hide_date' => weaverx_cz_checkbox_refresh(__('Hide Post Date', 'weaver-xtreme')), 'post_hide_author' => weaverx_cz_checkbox_refresh(__('Hide Post Author', 'weaver-xtreme')), 'post_hide_categories' => weaverx_cz_checkbox_refresh(__('Hide Post Categories', 'weaver-xtreme')), 'post_hide_tags' => weaverx_cz_checkbox_refresh(__('Hide Post Tags', 'weaver-xtreme')), 'hide_permalink' => weaverx_cz_checkbox_refresh(__('Hide Permalink', 'weaver-xtreme')), 'hide_singleton_category' => weaverx_cz_checkbox_refresh(__('Hide Category if Only One', 'weaver-xtreme'), __("If there is only one overall category defined (Uncategorized), don't show Category of post.", 'weaver-xtreme')), 'post_hide_single_author' => weaverx_cz_checkbox_refresh(__('Hide Author for Single Author Site', 'weaver-xtreme'), __("Hide author information if site has only a single author.", 'weaver-xtreme')), 'visibility-posts-nav-heading' => weaverx_cz_group_title(__('Post Navigation', 'weaver-xtreme')), 'visibility-posts-misc-heading' => weaverx_cz_group_title(__('Other Post Visibility Options', 'weaver-xtreme')), 'hide_post_format_icon' => array('setting' => array('sanitize_callback' => 'absint'), 'control' => array('control_type' => WEAVERX_PLUS_CHECKBOX_CONTROL, 'label' => __('Hide Post Format Icons', 'weaver-xtreme') . WEAVERX_PLUS_ICON . WEAVERX_REFRESH_ICON, 'description' => __('Hide the icons for posts with Post Format specified.', 'weaver-xtreme'), 'type' => 'checkbox')), 'show_comments_closed' => weaverx_cz_checkbox_refresh(__('Show "Comments are closed"', 'weaver-xtreme'), __('If comments are off, and no comments have been made, show the <em>Comments are closed.</em> message.', 'weaver-xtreme')), 'hide_author_bio' => weaverx_cz_checkbox_refresh(__('Hide Author Bio', 'weaver-xtreme'), __('Hide display of author bio box on Author Archive and Single Post page views.', 'weaver-xtreme')))); /** * Sidebars */ $visibility_sections['visibility-sidebars'] = array('panel' => $panel, 'title' => __('Sidebars & Widget Areas', 'weaver-xtreme'), 'description' => __('Main Sidebars and Widget areas. Header and Footer areas options under Header and Footer panels.', 'weaver-xtreme'), 'options' => array('visibility-primary-widget-heading' => weaverx_cz_group_title(__('Primary Widget Area', 'weaver-xtreme')), 'primary_hide' => weaverx_cz_select(__('Hide Primary Widget Area', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'visibility-secondary-widget-heading' => weaverx_cz_group_title(__('Secondary Widget Area', 'weaver-xtreme')), 'secondary_hide' => weaverx_cz_select(__('Hide Secondary Widget Area', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'visibility-top-widget-heading' => weaverx_cz_group_title(__('Top Widget Areas', 'weaver-xtreme'), __('Properties for all Top Widget areas (Sitewide, Pages, Blog, Archive).', 'weaver-xtreme')), 'top_hide' => weaverx_cz_select(__('Hide Top Widget Areas', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'visibility-bottom-widget-heading' => weaverx_cz_group_title(__('Bottom Widget Areas', 'weaver-xtreme'), __('Properties for all Bottom Widget areas (Sitewide, Pages, Blog, Archive).', 'weaver-xtreme')), 'bottom_hide' => weaverx_cz_select(__('Hide Bottom Widget Areas', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'))); /** * Widgets */ $visibility_sections['visibility-widgets'] = array('panel' => $panel, 'title' => __('Individual Widgets', 'weaver-xtreme'), 'options' => array()); /** * Footer */ $visibility_sections['visibility-footer'] = array('panel' => $panel, 'title' => __('Footer Area', 'weaver-xtreme'), 'options' => array('footer_hide' => weaverx_cz_select(__('Hide Footer Area', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'footer_sb_hide' => weaverx_cz_select(__('Hide Footer Widget Area', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'footer_html_hide' => weaverx_cz_select(__('Hide Footer HTML Area', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), '_hide_poweredby' => weaverx_cz_checkbox_refresh(__('Hide Powered By tag', 'weaver-xtreme'), __('Hide the "Proudly powered by" notice in the footer. ♦', 'weaver-xtreme')))); /** * Filter the definitions for the controls in the Color Scheme panel of the Customizer. * * @since 1.3.0. * * @param array $visibility_sections The array of definitions. */ $visibility_sections = apply_filters('weaverx_customizer_visibility_sections', $visibility_sections); // Merge with master array return array_merge($sections, $visibility_sections); }
/** * Define the sections and settings for the General panel */ function weaverx_customizer_define_typography_sections($sections) { $panel = 'weaverx_typography'; $typography_sections = array(); /** * Global */ $typography_sections['typo-global'] = array('panel' => $panel, 'title' => __('Global Typography Options', 'weaver-xtreme'), 'description' => __('Set base font values: Base font size, base line height, and more. The Font Size options for other areas are all derived from these base sizes.', 'weaver-xtreme'), 'options' => array('site_fontsize_int' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage', 'default' => 16), 'control' => array('control_type' => 'WeaverX_Range_Control', 'label' => __('Site Base Font Size (px)', 'weaver-xtreme'), 'description' => __("Base font size of standard text. This value determines the default medium font size. Note that visitors can change their browser's font size, so final font size can vary, as expected. Default is 16px.", 'weaver-xtreme'), 'type' => 'range', 'input_attrs' => array('min' => 2, 'max' => 50, 'step' => 1))), 'site_line_height_dec' => array('setting' => array('sanitize_callback' => 'weaverx_cz_sanitize_float', 'transport' => 'postMessage', 'default' => 1.5), 'control' => array('control_type' => WEAVERX_PLUS_RANGE_CONTROL, 'label' => __('Site Base Line Height', 'weaver-xtreme') . WEAVERX_PLUS_ICON, 'description' => __('Set the Base line-height. Line heights for various font sizes based on this multiplier. (Default: 1.5 - no units)', 'weaver-xtreme'), 'type' => 'range', 'input_attrs' => array('min' => 0.1, 'max' => 10.0, 'step' => 0.1))), 'site_fontsize_tablet_int' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'refresh', 'default' => 16), 'control' => array('control_type' => WEAVERX_PLUS_RANGE_CONTROL, 'label' => __('Site Base Font Size - Small Tablets (px)', 'weaver-xtreme') . WEAVERX_PLUS_ICON . WEAVERX_REFRESH_ICON, 'description' => __('Small Tablet base font size of standard text. (Default medium font size: 16px)', 'weaver-xtreme'), 'type' => 'range', 'input_attrs' => array('min' => 2, 'max' => 50, 'step' => 1))), 'site_fontsize_phone_int' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'refresh', 'default' => 16), 'control' => array('control_type' => WEAVERX_PLUS_RANGE_CONTROL, 'label' => __('Site Base Font Size - Phones (px)', 'weaver-xtreme') . WEAVERX_PLUS_ICON . WEAVERX_REFRESH_ICON, 'description' => __('Phone base font size of standard text. (Default medium font size: 16px)', 'weaver-xtreme'), 'type' => 'range', 'input_attrs' => array('min' => 2, 'max' => 50, 'step' => 1))), 'custom_fontsize_a' => array('setting' => array('sanitize_callback' => 'weaverx_cz_sanitize_float', 'transport' => 'refresh', 'default' => 1.0), 'control' => array('control_type' => WEAVERX_PLUS_RANGE_CONTROL, 'label' => __('Custom Font Size A (em)', 'weaver-xtreme') . WEAVERX_PLUS_ICON . WEAVERX_REFRESH_ICON, 'description' => __('Font Size for Custom Font Size A on the Font Size selection options.', 'weaver-xtreme'), 'type' => 'range', 'input_attrs' => array('min' => 0.5, 'max' => 20, 'step' => 0.5))), 'custom_fontsize_b' => array('setting' => array('sanitize_callback' => 'weaverx_cz_sanitize_float', 'transport' => 'refresh', 'default' => 1.0), 'control' => array('control_type' => WEAVERX_PLUS_RANGE_CONTROL, 'label' => __('Custom Font Size B (em)', 'weaver-xtreme') . WEAVERX_PLUS_ICON . WEAVERX_REFRESH_ICON, 'description' => __('Font Size for Custom Font Size B on the Font Size selection options.', 'weaver-xtreme'), 'type' => 'range', 'input_attrs' => array('min' => 0.5, 'max' => 20, 'step' => 0.5))), 'font_letter_spacing_global_dec' => array('setting' => array('sanitize_callback' => 'weaverx_cz_sanitize_float', 'transport' => 'postMessage', 'default' => 0.0), 'control' => array('control_type' => WEAVERX_PLUS_RANGE_CONTROL, 'label' => __('Character Spacing (em)', 'weaver-xtreme') . WEAVERX_PLUS_ICON, 'description' => __('Add extra spacing between characters. (Default: 0)', 'weaver-xtreme'), 'type' => 'range', 'input_attrs' => array('min' => -0.1, 'max' => 0.25, 'step' => 0.0025))), 'font_word_spacing_global_dec' => array('setting' => array('sanitize_callback' => 'weaverx_cz_sanitize_float', 'transport' => 'postMessage', 'default' => 0.0), 'control' => array('control_type' => WEAVERX_PLUS_RANGE_CONTROL, 'label' => __('Word Spacing (em)', 'weaver-xtreme') . WEAVERX_PLUS_ICON, 'description' => __('Add extra spacing between words. (Default: 0)', 'weaver-xtreme'), 'type' => 'range', 'input_attrs' => array('min' => -0.5, 'max' => 1.0, 'step' => 0.05))), 'typo-google-font-opts' => weaverx_cz_group_title(__('Integrated Google Fonts', 'weaver-xtreme'), __('Weaver Xtreme integrates a selected set of Google Font families. You can disable them, or add differenet language support in this section.', 'weaver-xtreme')), 'disable_google_fonts' => weaverx_cz_checkbox_refresh(__('Disable Google Font Integration', 'weaver-xtreme'), __('<strong>ADVANCED OPTION!</strong> <em>Be sure you understand the consequences of this option.</em> By disabling Google Font Integration, the Google Fonts definitions will <strong>not</strong> be loaded for your site, and the options will not be displayed on Font Family options subsequently. <strong style="color:red;font-weight:bold;">Please note:</strong> Any previously selected Google Font Families will revert to generic serif, sans, mono, and script fonts. Google Font Families WILL be displayed in the Customizer options until you manually refresh the Customizer page.', 'weaver-xtreme')), 'typo-lang-intro' => weaverx_cz_heading(__('Google Font Language Character Sets', 'weaver-xtreme'), __('By default, integrated Google Fonts will include the <em>Latin Extended</em> character set. If you need a Crylic, Greek, Hebrew, or Vietnamese character set, these are currently supported by Google Fonts for <em>some</em> font families. Google Fonts not supported for these character sets, and character sets for most other world languages will be displayed using the default browser serif and sans fonts.', 'weaver-xtreme')), 'font_set_cryllic' => weaverx_cz_checkbox_refresh(__('Cryllic', 'weaver-xtreme'), __('Add Cryllic character set to Open Sans, Open Sans Condensed, Roboto (all), Arimo, and Tinos font families.', 'weaver-xtreme')), 'font_set_greek' => weaverx_cz_checkbox_refresh(__('Greek', 'weaver-xtreme'), __('Add Greek character set to Open Sans, Open Sans Condensed, Roboto (all), Arimo, and Tinos font families.', 'weaver-xtreme')), 'font_set_hebrew' => weaverx_cz_checkbox_refresh(__('Hebrew', 'weaver-xtreme'), __('Add Hebrew character set to Arimo and Tinos font families.', 'weaver-xtreme')), 'font_set_vietnamese' => weaverx_cz_checkbox_refresh(__('Greek', 'weaver-xtreme'), __('Add Greek character set to Open Sans, Open Sans Condensed, Roboto (all), Source Sans Pro, Alegreya Sans, Arimo, and Tinos font families.', 'weaver-xtreme')), 'typo-intro' => weaverx_cz_group_title(__('Using Font Families', 'weaver-xtreme'), __('<em>Weaver Xtreme</em> includes support for over 30 font family choices: 16 <strong>Web Safe</strong> fonts, and the remaining from a carefully selected set of <strong>Google Fonts</strong>. The <strong>Google Fonts</strong> will be displayed the same on every browser, <em>including</em> Android and iOS devices. The <strong>Web Safe</strong> will be displayed as specified for most modern browsers, but will likely revert to one of the three basic fonts supported by Android devices, or a limited set for iOS devices. <em>We highly recommend selecting <strong>Google Fonts</strong> for your site.</em><br/> You can also add more Google Fonts, other free fonts, and even premium fonts using <em>Weaver Xtreme Plus</em>.<br /> You can see a demonstration of <em>Weaver Xtreme\'s</em> fonts here: ', 'weaver-xtreme') . weaverx_help_link('font-demo.html', __('Examples of supported fonts', 'weaver-xtreme'), __('Font Examples', 'weaver-xtreme'), false)), 'typo-font-family-note' => array('control' => array('control_type' => 'WeaverX_Misc_Control', 'label' => __('Add Font Families', 'weaver-xtreme') . WEAVERX_PLUS_ICON, 'description' => sprintf(__('<p>The <strong>%s</strong> allows you add additional free fonts from <a href="//www.google.com/webfonts" target="_blank" title="Google Web Fonts"><strong>Google Web Fonts</strong></a>, <a href="//www.fontsquirrel.com" target="_blank" title="Font Squirrel"><strong>Font Squirrel</strong></a>, or virtually any other free or commercial font source directly to all the <em>Font Family</em> selectors found in various text options.</p> <p>To define Font Families, please "Save & Publish" options you may have set on this Optimizer, then click to open the <strong>%s</strong>, and open the <em>Fonts & Custom</em> tab. Be sure to <em>Save Settings</em> before leaving the Legacy Weaver Xtreme Admin panel.</p>', 'weaver-xtreme'), weaverx_cz_get_admin_page(__('Weaver Xtreme Plus Font Control Panel', 'weaver-xtreme')), weaverx_cz_get_admin_page(__('Weaver Xtreme Plus Font Control Panel', 'weaver-xtreme'))), 'type' => 'HTML')))); /** * General */ $typography_sections['typo-wrapping'] = array('panel' => $panel, 'title' => __('Wrapping Areas', 'weaver-xtreme'), 'description' => __('Set font and other typography attributes. Add new fonts from the <em>Appearance → Weaver Xtreme Admin → Main Options → Fonts & Custom</em> panel. Use Site Colors to set colors.', 'weaver-xtreme'), 'options' => array('typo-heading-global' => array())); $new_opts = weaverx_cz_add_fonts('wrapper', __('Site Wrapper & Container Fonts', 'weaver-xtreme'), __('Default (wrapper) typography for site. Set font attributes here that will apply to the entire site. To override other items, set typography for individual items on other panels. (The inherited default Font Family is Open Sans.)', 'weaver-xtreme'), 'postMessage'); $typography_sections['typo-wrapping']['options'] = array_merge($typography_sections['typo-wrapping']['options'], $new_opts); $new_opts = weaverx_cz_add_fonts('container', __('Container Fonts', 'weaver-xtreme'), __('Container typography for site. Wraps content and sidebars.', 'weaver-xtreme'), 'postMessage'); $typography_sections['typo-wrapping']['options'] = array_merge($typography_sections['typo-wrapping']['options'], $new_opts); /** * Links */ $typography_sections['typo-links'] = array('panel' => $panel, 'title' => __('Links', 'weaver-xtreme'), 'options' => array()); $new_opts = weaverx_cz_add_link_fonts('link', __('Global Links', 'weaver-xtreme'), __('Global default for link typography (not including menus and titles). Set Bold, Italic, and Underline by setting those options for specific areas rather than globally to have more control.', 'weaver-xtreme')); $typography_sections['typo-links']['options'] = array_merge($typography_sections['typo-links']['options'], $new_opts); $new_opts = weaverx_cz_add_link_fonts('ibarlink', __('Info Bar Links', 'weaver-xtreme'), __('<small>Typography for links in Info Bar (uses Standard Link colors if left inherit).', 'weaver-xtreme')); $typography_sections['typo-links']['options'] = array_merge($typography_sections['typo-links']['options'], $new_opts); $new_opts = weaverx_cz_add_link_fonts('contentlink', __('Content Links', 'weaver-xtreme'), __('<small>Typography for links in Content (uses Standard Link colors if left inherit).', 'weaver-xtreme')); $typography_sections['typo-links']['options'] = array_merge($typography_sections['typo-links']['options'], $new_opts); $new_opts = weaverx_cz_add_link_fonts('ilink', __('Post Meta Info Links', 'weaver-xtreme'), __('<small>Typography for links in post meta information top and bottom lines. (uses Standard Link colors if left inherit).', 'weaver-xtreme')); $typography_sections['typo-links']['options'] = array_merge($typography_sections['typo-links']['options'], $new_opts); $new_opts = weaverx_cz_add_link_fonts('wlink', __('Individual Widget Links', 'weaver-xtreme'), __('Typography for links in widgets (uses Standard Link colors if inherit).', 'weaver-xtreme')); $typography_sections['typo-links']['options'] = array_merge($typography_sections['typo-links']['options'], $new_opts); $new_opts = weaverx_cz_add_link_fonts('footerlink', __('Footer Area Links', 'weaver-xtreme'), __('Typography for links in Footer (Uses Standard Link colors if left inherit).', 'weaver-xtreme')); $typography_sections['typo-links']['options'] = array_merge($typography_sections['typo-links']['options'], $new_opts); /** * Site Header */ $typography_sections['typo-header'] = array('panel' => $panel, 'title' => __('Header Area', 'weaver-xtreme'), 'options' => array()); $new_opts = weaverx_cz_add_fonts('header', __('Header Area', 'weaver-xtreme'), '', 'postMessage'); $typography_sections['typo-header']['options'] = array_merge($typography_sections['typo-header']['options'], $new_opts); $new_opts = weaverx_cz_add_fonts('site_title', __('Site Title', 'weaver-xtreme'), '', 'postMessage'); $typography_sections['typo-header']['options'] = array_merge($typography_sections['typo-header']['options'], $new_opts); $new_opts = weaverx_cz_add_fonts('tagline', __('Site Tagline', 'weaver-xtreme'), '', 'postMessage'); $typography_sections['typo-header']['options'] = array_merge($typography_sections['typo-header']['options'], $new_opts); $new_opts = weaverx_cz_add_fonts('header_sb', __('Header Widget Area', 'weaver-xtreme'), '', 'postMessage'); $typography_sections['typo-header']['options'] = array_merge($typography_sections['typo-header']['options'], $new_opts); $new_opts = weaverx_cz_add_fonts('header_html', __('Header HTML', 'weaver-xtreme'), '', 'postMessage'); $typography_sections['typo-header']['options'] = array_merge($typography_sections['typo-header']['options'], $new_opts); /** * Main Menu */ $typography_sections['typo-menus'] = array('panel' => $panel, 'title' => __('Menus', 'weaver-xtreme'), 'description' => __('Set typography for Menus.', 'weaver-xtreme'), 'options' => array()); $new_opts = weaverx_cz_add_fonts('m_primary', __('Primary Menu', 'weaver-xtreme'), '', 'postMessage'); $typography_sections['typo-menus']['options'] = array_merge($typography_sections['typo-menus']['options'], $new_opts); $new_opts = weaverx_cz_add_fonts('m_secondary', __('Secondary Menu', 'weaver-xtreme'), '', 'postMessage'); $typography_sections['typo-menus']['options'] = array_merge($typography_sections['typo-menus']['options'], $new_opts); $new_opts = weaverx_cz_add_fonts('m_header_mini', __('Header Mini Menu', 'weaver-xtreme'), '', 'postMessage'); $typography_sections['typo-menus']['options'] = array_merge($typography_sections['typo-menus']['options'], $new_opts); // current page $cur_page = array('typo-am-line1' => weaverx_cz_line(), 'typo-allmenus-heading' => weaverx_cz_group_title(__('Typography For All Menus', 'weaver-xtreme'), __('These options specify current page attributes for all menus.', 'weaver-xtreme')), 'menubar_curpage_bold' => array('setting' => array(), 'control' => array('label' => __('Bold Current Page', 'weaver-xtreme') . WEAVERX_REFRESH_ICON, 'description' => __('Bold Face Current Page and ancestors.', 'weaver-xtreme'), 'type' => 'checkbox')), 'menubar_curpage_em' => array('setting' => array(), 'control' => array('label' => __('Italic Current Page', 'weaver-xtreme') . WEAVERX_REFRESH_ICON, 'description' => __('Italic Current Page and ancestors.', 'weaver-xtreme'), 'type' => 'checkbox')), 'menubar_curpage_noancestors' => array('setting' => array(), 'control' => array('label' => __('Do Not Highlight Ancestors', 'weaver-xtreme') . WEAVERX_REFRESH_ICON, 'description' => __('Highlight Current Page only - do not also highlight ancestor items.', 'weaver-xtreme'), 'type' => 'checkbox'))); $typography_sections['typo-menus']['options'] = array_merge($typography_sections['typo-menus']['options'], $cur_page); if (weaverx_cz_is_plus()) { $new_opts = weaverx_cz_add_fonts('m_extra', __('Extra Menu', 'weaver-xtreme'), '', 'postMessage'); } else { $new_opts = weaverx_cz_add_plus_message('typo_menus', __('Extra Menu', 'weaver-xtreme'), __('Add extra menus with <strong>Weaver Xtreme Plus</strong>.', 'weaver-xtreme')); } $typography_sections['typo-menus']['options'] = array_merge($typography_sections['typo-menus']['options'], $new_opts); /** * Info Bar */ $typography_sections['typo-info-bar'] = array('panel' => $panel, 'title' => __('Info Bar', 'weaver-xtreme'), 'description' => __('Info Bar with breadcrumbs and paged navigation displayed under Primary Menu.', 'weaver-xtreme'), 'options' => array()); $new_opts = weaverx_cz_add_fonts('info_bar', __('Info Bar', 'weaver-xtreme'), '', 'postMessage'); $typography_sections['typo-info-bar']['options'] = array_merge($typography_sections['typo-info-bar']['options'], $new_opts); /** * Content */ $typography_sections['typo-content'] = array('panel' => $panel, 'title' => __('Content', 'weaver-xtreme'), 'description' => __('Typography for general page and post content.', 'weaver-xtreme'), 'options' => array()); $new_opts = weaverx_cz_add_fonts('content', __('Content Area', 'weaver-xtreme'), '', 'postMessage'); $typography_sections['typo-content']['options'] = array_merge($typography_sections['typo-content']['options'], $new_opts); $new_opts = weaverx_cz_add_fonts('page_title', __('Page Title', 'weaver-xtreme'), '', 'postMessage'); $typography_sections['typo-content']['options'] = array_merge($typography_sections['typo-content']['options'], $new_opts); $new_opts = weaverx_cz_add_fonts('archive_title', __('Archive Pages Title', 'weaver-xtreme'), '', 'postMessage'); $typography_sections['typo-content']['options'] = array_merge($typography_sections['typo-content']['options'], $new_opts); $new_opts = weaverx_cz_add_fonts('content_h', __('Content Headings', 'weaver-xtreme'), __('Headings (<h1>-<h6>) in page and post content.', 'weaver-xtreme'), 'refresh', 'normal'); $typography_sections['typo-content']['options'] = array_merge($typography_sections['typo-content']['options'], $new_opts); /** * Post Specific */ $typography_sections['typo-post-specific'] = array('panel' => $panel, 'title' => __('Post Specific', 'weaver-xtreme'), 'description' => __('Post Specific Typography - override Content Typography.', 'weaver-xtreme'), 'options' => array()); $new_opts = weaverx_cz_add_fonts('post', __('Post Area', 'weaver-xtreme'), '', 'postMessage'); $typography_sections['typo-post-specific']['options'] = array_merge($typography_sections['typo-post-specific']['options'], $new_opts); $new_opts = weaverx_cz_add_fonts('post_title', __('Post Title', 'weaver-xtreme'), '', 'postMessage'); $typography_sections['typo-post-specific']['options'] = array_merge($typography_sections['typo-post-specific']['options'], $new_opts); $new_opts = weaverx_cz_add_fonts('post_info_top', __('Top Post Info Line', 'weaver-xtreme'), '', 'postMessage'); $typography_sections['typo-post-specific']['options'] = array_merge($typography_sections['typo-post-specific']['options'], $new_opts); $new_opts = weaverx_cz_add_fonts('post_info_bottom', __('Bottom Post Info Line', 'weaver-xtreme'), '', 'postMessage'); $typography_sections['typo-post-specific']['options'] = array_merge($typography_sections['typo-post-specific']['options'], $new_opts); /** * Sidebars */ $typography_sections['typo-sidebars'] = array('panel' => $panel, 'title' => __('Sidebars & Widget Areas', 'weaver-xtreme'), 'description' => __('Main Sidebars and Widget areas. Header and Footer areas options under Header and Footer panels.', 'weaver-xtreme'), 'options' => array()); $new_opts = weaverx_cz_add_fonts('primary', __('Primary Area', 'weaver-xtreme'), '', 'postMessage'); $typography_sections['typo-sidebars']['options'] = array_merge($typography_sections['typo-sidebars']['options'], $new_opts); $new_opts = weaverx_cz_add_fonts('secondary', __('Secondary Area', 'weaver-xtreme'), '', 'postMessage'); $typography_sections['typo-sidebars']['options'] = array_merge($typography_sections['typo-sidebars']['options'], $new_opts); $new_opts = weaverx_cz_add_fonts('top', __('Top Widget Areas', 'weaver-xtreme'), __('Properties for all Top Widget areas (Sitewide, Pages, Blog, Archive).', 'weaver-xtreme'), 'postMessage'); $typography_sections['typo-sidebars']['options'] = array_merge($typography_sections['typo-sidebars']['options'], $new_opts); $new_opts = weaverx_cz_add_fonts('bottom', __('Bottom Widget Areas', 'weaver-xtreme'), __('Typography for all Bottom Widget areas (Sitewide, Pages, Blog, Archive).', 'weaver-xtreme'), 'postMessage'); $typography_sections['typo-sidebars']['options'] = array_merge($typography_sections['typo-sidebars']['options'], $new_opts); /** * Widgets */ $typography_sections['typo-widgets'] = array('panel' => $panel, 'title' => __('Individual Widgets', 'weaver-xtreme'), 'options' => array()); $new_opts = weaverx_cz_add_fonts('widget', __('Individual Widgets', 'weaver-xtreme'), '', 'postMessage'); $typography_sections['typo-widgets']['options'] = array_merge($typography_sections['typo-widgets']['options'], $new_opts); $new_opts = weaverx_cz_add_fonts('widget_title', __('Individual Widgets Title', 'weaver-xtreme'), '', 'postMessage'); $typography_sections['typo-widgets']['options'] = array_merge($typography_sections['typo-widgets']['options'], $new_opts); /** * Footer */ $typography_sections['typo-footer'] = array('panel' => $panel, 'title' => __('Footer Area', 'weaver-xtreme'), 'options' => array()); $new_opts = weaverx_cz_add_fonts('footer', __('Footer Area', 'weaver-xtreme'), '', 'postMessage'); $typography_sections['typo-footer']['options'] = array_merge($typography_sections['typo-footer']['options'], $new_opts); $new_opts = weaverx_cz_add_fonts('footer_sb', __('Footer Widget Area', 'weaver-xtreme'), '', 'postMessage'); $typography_sections['typo-footer']['options'] = array_merge($typography_sections['typo-footer']['options'], $new_opts); $new_opts = weaverx_cz_add_fonts('footer_html', __('Footer HTML', 'weaver-xtreme'), '', 'postMessage'); $typography_sections['typo-footer']['options'] = array_merge($typography_sections['typo-footer']['options'], $new_opts); /** * Filter the definitions for the controls in the Color Scheme panel of the Customizer. * * @since 1.3.0. * * @param array $typography_sections The array of definitions. */ $typography_sections = apply_filters('weaverx_customizer_typography_sections', $typography_sections); // Merge with master array return array_merge($sections, $typography_sections); }
function weaverx_cz_add_injection($root, $label = '', $description = '', $version = 'XPlus') { $opt = array(); if ($version == 'XPlus') { $label .= WEAVERX_PLUS_ICON; } $opt[$root . '-heading'] = weaverx_cz_group_title($label); if ($description) { $opt[$root . '-desc'] = array('control' => array('control_type' => 'WeaverX_Misc_Control', 'description' => $description, 'type' => 'text')); } if ($version != 'XPlus' || weaverx_cz_is_plus()) { $opt["{$root}_insert"] = array('setting' => array('sanitize_callback' => 'weaverx_cz_sanitize_html', 'transport' => 'postMessage', 'default' => ''), 'control' => array('control_type' => 'WeaverX_Textarea_Control', 'label' => __('HTML', 'weaver-xtreme'), 'type' => 'textarea', 'input_attrs' => array('rows' => '3', 'placeholder' => __('Any HTML, including shortcodes.', 'weaver-xtreme')))); $opt["inject_{$root}_bgcolor"] = array('setting' => array('sanitize_callback' => WEAVERX_CZ_SANITIZE_COLOR, 'transport' => 'postMessage', 'default' => weaverx_cz_getopt("inject_{$root}_bgcolor")), 'control' => array('control_type' => WEAVERX_COLOR_CONTROL, 'label' => __('BG Color', 'weaver-xtreme'), 'description' => '')); $opt["inject_{$root}_bgcolor_css"] = weaverx_cz_css(__('Custom CSS', 'weaver-xtreme')); $opt["inject_add_class_{$root}"] = array('setting' => array('sanitize_callback' => 'weaverx_cz_sanitize_html', 'transport' => 'refresh', 'default' => ''), 'control' => array('control_type' => WEAVERX_PLUS_TEXT_CONTROL, 'label' => __('Add Classes', 'weaver-xtreme') . WEAVERX_PLUS_ICON . WEAVERX_REFRESH_ICON, 'description' => __('Space separated class names to add to this area (<em>Advanced option</em>) (★Plus)', 'weaver-xtreme'), 'type' => 'text', 'input_attrs' => array())); $opt["hide_front_{$root}"] = weaverx_cz_checkbox_refresh(__('Hide on front page', 'weaver-xtreme'), __('If you check this box, then the code from this area will not be displayed on the front (home) page.', 'weaver-xtreme')); $opt["hide_rest_{$root}"] = weaverx_cz_checkbox_refresh(__('Hide on non-front pages', 'weaver-xtreme'), __('If you check this box, then the code from this area will not be displayed on non-front pages.', 'weaver-xtreme')); } // is plus $opt[$root . '-line-break'] = array('control' => array('control_type' => 'WeaverX_Misc_Control', 'label' => '', 'type' => 'line')); return $opt; }
/** * Define the sections and settings for the Images panel */ function weaverx_customizer_define_image_sections($sections) { global $wp_customize; $panel = 'weaverx_images'; $image_sections = array(); $wp_customize->get_section('header_image')->priority = 20000; $wp_customize->get_section('header_image')->title = __('Header Banner Images (WP Settings)', 'weaver-xtreme'); $wp_customize->get_section('header_image')->panel = $panel; $wp_customize->get_section('background_image')->priority = 20100; $wp_customize->get_section('background_image')->title = __('Site BG Image (WP Settings)', 'weaver-xtreme'); $wp_customize->get_section('background_image')->panel = $panel; /** * General */ $image_sections['images-global'] = array('panel' => $panel, 'title' => __('Global Image Settings', 'weaver-xtreme'), 'description' => 'Set Image options for Site Wrapper & Container. Use Colors to set colors.', 'options' => array('images-heading-global' => weaverx_cz_group_title(__('Global Image Settings', 'weaver-xtreme'), __('These settings control images in both the Container (including content and sidebars) and Footer Areas. They do not include the Header Area.', 'weaver-xtreme')), 'media_lib_border_color' => weaverx_cz_coloropt('media_lib_border_color', __('Image Border Color', 'weaver-xtreme'), __('Border color for images in Container and Footer.', 'weaver-xtreme')), 'media_lib_border_int' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage', 'default' => 0), 'control' => array('control_type' => 'WeaverX_Range_Control', 'label' => __('Image Border Width (px)', 'weaver-xtreme'), 'description' => __('Border width for images in Container and Footer. There will be <strong>no</strong> borders unless you set this value above 0px.', 'weaver-xtreme'), 'type' => 'range', 'input_attrs' => array('min' => 0, 'max' => 50, 'step' => 1))), 'show_img_shadows' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage'), 'control' => array('label' => __('Add Image Shadow', 'weaver-xtreme'), 'description' => __('Add a shadow to images in Container and Footer. Add custom CSS for custom shadow.', 'weaver-xtreme'), 'type' => 'checkbox')), 'restrict_img_border' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'refresh'), 'control' => array('label' => __('Restrict Borders to Media Library', 'weaver-xtreme') . WEAVERX_REFRESH_ICON, 'description' => __('For Container and Footer, restrict border and shadows to images from Media Library. Manually entered <img> HTML without Media Library classes will not have borders.', 'weaver-xtreme'), 'type' => 'checkbox')), 'media_lib_border_color_css' => weaverx_cz_css(__('Custom CSS for Images.', 'weaver-xtreme'), __('Note: this custom CSS will live-update for ALL images, even if the above Restrict Borders is checked. The normal site view will respect the Restrict Borders setting.', 'weaver-xtreme')), 'caption_color' => weaverx_cz_coloropt('caption_color', __('Caption Text Color', 'weaver-xtreme'), __('Color of captions - e.g., below media images.', 'weaver-xtreme')), 'caption_color_css' => weaverx_cz_css(__('Custom CSS for Captions.', 'weaver-xtreme')))); /** * Site Header */ $image_sections['images-header'] = array('panel' => $panel, 'title' => __('Header Area', 'weaver-xtreme'), 'options' => array('images-heading-header' => weaverx_cz_heading(__('Site Header', 'weaver-xtreme')), 'header_image_max_width_dec' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage', 'default' => 100.0), 'control' => array('control_type' => WEAVERX_PLUS_RANGE_CONTROL, 'label' => __('Maximum Image Width (%)', 'weaver-xtreme') . WEAVERX_PLUS_ICON, 'description' => __('Maximum width of Header Image. Can be useful to change Header Image alignment.', 'weaver-xtreme'), 'type' => 'range', 'input_attrs' => array('min' => 10, 'max' => 100, 'step' => 0.5))), 'header_actual_size' => weaverx_cz_checkbox(__('Use Actual Image Size', 'weaver-xtreme'), __('Check to use actual header image size. (Default: theme width)', 'weaver-xtreme'), 'plus'), 'header_image_align' => weaverx_cz_select_plus(__('Align Header Image', 'weaver-xtreme'), __('How to align header image - meaningful only when Max Width or Actual Size set.', 'weaver-xtreme'), 'weaverx_cz_choices_align', 'float-left', 'postMessage'), 'link_site_image' => weaverx_cz_checkbox_refresh(__('Header Image Links to Site', 'weaver-xtreme'), __('Check to add a link to site home page for Header Image. Note: If used with <em>Move Title/Tagline over Image</em>, parts of the header image will not be clickable.', 'weaver-xtreme')), 'header_image_height_int' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'refresh', 'default' => 188), 'control' => array('control_type' => 'WeaverX_Range_Control', 'label' => __('Suggested Header Image Height (px)', 'weaver-xtreme') . WEAVERX_REFRESH_ICON, 'description' => __('Change the suggested height of the Header Image. Standard size is 188. This height is only a suggestion, and only affects the clipping window on the Customizer <em>Images → Header Banner Images<em> panel after you refresh the whole Customize interface. Header images will always be responsively sized. (Default header image width: theme width)', 'weaver-xtreme'), 'type' => 'range', 'input_attrs' => array('min' => 10, 'max' => 600, 'step' => 1))), 'images-heading-srch' => weaverx_cz_heading(__('Search Box Icon', 'weaver-xtreme'), __('The icon used in search boxes can be changed in the <em>Colors → Content</em> section.', 'weaver-xtreme')), 'images-heading-altimg' => weaverx_cz_heading(__('Alternate Header Images', 'weaver-xtreme'), __('You can specify alternate header images using the <em>Featured Image Location</em> option on the <em>Images</em> panel, as well as Per Page and Per Post options.', 'weaver-xtreme')), 'images-heading-logo-html' => weaverx_cz_heading(__('Site Logo/HTML', 'weaver-xtreme') . WEAVERX_PLUS_ICON, __('The site Logo/HTML is being deprecated. It is still accessible from the traditional Appearance settings interface.', 'weaver-xtreme')))); /** * Content */ $image_sections['images-content'] = array('panel' => $panel, 'title' => __('Content', 'weaver-xtreme'), 'description' => __('Images on page and post content.', 'weaver-xtreme'), 'options' => array('images-content-heading' => weaverx_cz_heading(__('General Image Settings', 'weaver-xtreme'), __('General image settings found on the <em>Global Image Settings</em> panel.', 'weaver-xtreme')), 'images-content-FI' => weaverx_cz_group_title(__('Featured Image - Pages', 'weaver-xtreme'), __('Display of Page Featured Images', 'weaver-xtreme')), 'page_fi_location' => weaverx_cz_select(__('Featured Image Location', 'weaver-xtreme'), __('Where to display Featured Image for Pages', 'weaver-xtreme'), 'weaverx_cz_choices_fi_location', 'content-top', 'refresh'), 'page_fi_align' => weaverx_cz_select(__('Align Featured Image', 'weaver-xtreme'), '', 'weaverx_cz_choices_fi_align', 'fi-alignleft', 'refresh'), 'page_fi_hide' => weaverx_cz_select(__('Hide Featured Image', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'page_fi_size' => weaverx_cz_select(__('Page Featured Image Size', 'weaver-xtreme'), __('Media Library Image Size for Featured Image on pages. (Header uses full size).', 'weaver-xtreme'), 'weaverx_cz_choices_fi_size', 'thumbnail', 'refresh'), 'page_fi_width' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'refresh', 'default' => 0), 'control' => array('control_type' => WEAVERX_PLUS_RANGE_CONTROL, 'label' => __('Featured Image Width (%)', 'weaver-xtreme') . WEAVERX_PLUS_ICON, 'description' => __('Width of Featured Image on Pages. Max Width in %, overrides FI Size selection. Set to 0 to avoid overriding above Featured Image Size setting.', 'weaver-xtreme'), 'type' => 'range', 'input_attrs' => array('min' => 0, 'max' => 100, 'step' => 0.5))))); /** * Post Specific */ $image_sections['images-post-specific'] = array('panel' => $panel, 'title' => __('Post Specific', 'weaver-xtreme'), 'description' => __('Post Specific Images - override Content Images.', 'weaver-xtreme'), 'options' => array('images-postspecific-heading' => weaverx_cz_heading(__('General Image Settings', 'weaver-xtreme'), __('General image settings found on the <em>Site Wrapper & Container</em> panel.', 'weaver-xtreme')), 'post_avatar_int' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage', 'default' => 28), 'control' => array('control_type' => WEAVERX_PLUS_RANGE_CONTROL, 'label' => __('Author Avatar Size (px)', 'weaver-xtreme'), 'description' => __('Size of Author Avatar in px - only for Post Info line. (Default: 28px)', 'weaver-xtreme'), 'type' => 'range', 'input_attrs' => array('min' => 10, 'max' => 60, 'step' => 1))), 'images-content-FI-full' => weaverx_cz_group_title(__('Featured Image - Full Blog Posts', 'weaver-xtreme'), __('Display of Post Featured Images when Post is displayed as a Full Post.', 'weaver-xtreme')), 'post_full_fi_location' => weaverx_cz_select(__('Featured Image Location - Full Post', 'weaver-xtreme'), __('Where to display Featured Image.', 'weaver-xtreme'), 'weaverx_cz_choices_fi_location', 'content-top', 'refresh'), 'post_full_fi_align' => weaverx_cz_select(__('Align Featured Image - Full Post', 'weaver-xtreme'), '', 'weaverx_cz_choices_fi_align', 'fi-alignleft', 'refresh'), 'post_full_fi_hide' => weaverx_cz_select(__('Hide Featured Image - Full Post', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'post_full_fi_size' => weaverx_cz_select(__('Page Featured Image Size - Full Post', 'weaver-xtreme'), __('Media Library Image Size for Featured Image. (Header uses full size).', 'weaver-xtreme'), 'weaverx_cz_choices_fi_size', 'thumbnail', 'refresh'), 'post_full_fi_width' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'refresh', 'default' => 0), 'control' => array('control_type' => WEAVERX_PLUS_RANGE_CONTROL, 'label' => __('Featured Image Width (%) - Full Post', 'weaver-xtreme') . WEAVERX_PLUS_ICON, 'description' => __('Width of Featured Image. Max Width in %, overrides FI Size selection. Set to 0 to avoid overriding above Featured Image Size setting.', 'weaver-xtreme'), 'type' => 'range', 'input_attrs' => array('min' => 0, 'max' => 100, 'step' => 0.5))), 'images-content-FI-excerpt' => weaverx_cz_group_title(__('Featured Image - Excerpt Posts', 'weaver-xtreme'), __('Display of Post Featured Images when Post is displayed as an Excerpt.', 'weaver-xtreme')), 'post_excerpt_fi_location' => weaverx_cz_select(__('Featured Image Location - Excerpt', 'weaver-xtreme'), __('Where to display Featured Image.', 'weaver-xtreme'), 'weaverx_cz_choices_fi_location', 'content-top', 'refresh'), 'post_excerpt_fi_align' => weaverx_cz_select(__('Align Featured Image - Excerpt', 'weaver-xtreme'), '', 'weaverx_cz_choices_fi_align', 'fi-alignleft', 'refresh'), 'post_excerpt_fi_hide' => weaverx_cz_select(__('Hide Featured Image - Excerpt', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'post_excerpt_fi_size' => weaverx_cz_select(__('Page Featured Image Size - Excerpt', 'weaver-xtreme'), __('Media Library Image Size for Featured Image. (Header uses full size).', 'weaver-xtreme'), 'weaverx_cz_choices_fi_size', 'thumbnail', 'refresh'), 'post_excerpt_fi_width' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'refresh', 'default' => 0), 'control' => array('control_type' => WEAVERX_PLUS_RANGE_CONTROL, 'label' => __('Featured Image Width (%) - Excerpt', 'weaver-xtreme') . WEAVERX_PLUS_ICON, 'description' => __('Width of Featured Image. Max Width in %, overrides FI Size selection. Set to 0 to avoid overriding above Featured Image Size setting.', 'weaver-xtreme'), 'type' => 'range', 'input_attrs' => array('min' => 0, 'max' => 100, 'step' => 0.5))), 'images-content-FI-single' => weaverx_cz_group_title(__('Featured Image - Single Page', 'weaver-xtreme'), __('Display of Post Featured Images when Post is displayed on the Single Page.', 'weaver-xtreme')), 'post_fi_location' => weaverx_cz_select(__('Featured Image Location - Single Page', 'weaver-xtreme'), __('Where to display Featured Image.', 'weaver-xtreme'), 'weaverx_cz_choices_fi_location', 'content-top', 'refresh'), 'post_fi_align' => weaverx_cz_select(__('Align Featured Image - Single Page', 'weaver-xtreme'), '', 'weaverx_cz_choices_fi_align', 'fi-alignleft', 'refresh'), 'post_fi_hide' => weaverx_cz_select(__('Hide Featured Image - Single Page', 'weaver-xtreme'), '', 'weaverx_cz_choices_hide', 'hide-none', 'refresh'), 'post_fi_size' => weaverx_cz_select(__('Page Featured Image Size - Single Page', 'weaver-xtreme'), __('Media Library Image Size for Featured Image. (Header uses full size).', 'weaver-xtreme'), 'weaverx_cz_choices_fi_size', 'thumbnail', 'refresh'), 'post_fi_width' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'refresh', 'default' => 0), 'control' => array('control_type' => WEAVERX_PLUS_RANGE_CONTROL, 'label' => __('Featured Image Width (%) - Single Page', 'weaver-xtreme') . WEAVERX_PLUS_ICON . WEAVERX_REFRESH_ICON, 'description' => __('Width of Featured Image. Max Width in %, overrides FI Size selection. Set to 0 to avoid overriding above Featured Image Size setting.', 'weaver-xtreme'), 'type' => 'range', 'input_attrs' => array('min' => 0, 'max' => 100, 'step' => 0.5))))); /** * Footer */ $image_sections['images-footer'] = array('panel' => $panel, 'title' => __('Footer Area', 'weaver-xtreme'), 'options' => array()); /** * Background Images */ $image_sections['images-background'] = array('panel' => $panel, 'title' => __('Background', 'weaver-xtreme'), 'options' => array('_bg_fullsite_url' => array('setting' => array('transport' => 'postMessage', 'sanitize_callback' => 'esc_url_raw'), 'control' => array('control_type' => WEAVERX_PLUS_IMAGE_CONTROL, 'label' => __('Full Screen Site BG Image', 'weaver-xtreme') . WEAVERX_PLUS_ICON, 'description' => __('Full screen centered auto-sized BG image. ♦', 'weaver-xtreme'))), 'images-background-css-help' => array('setting' => array(), 'control' => array('control_type' => WEAVERX_PLUS_MISC_CONTROL, 'label' => __('Additional CSS for BG Images', 'weaver-xtreme') . WEAVERX_PLUS_ICON, 'type' => 'HTML', 'description' => '<small>' . __('Use the <em>Additional CSS</em> option to specify additional background CSS options, each ending with a semi-colon (;). Valid options include: background-position, background-size, background-origin, background-clip, and background-attachment. Useful example: <code>background-size: 100% auto;</code> - makes bg image full width of container, height depends on container. See this <a href="http://www.w3schools.com/cssref/css3_pr_background.asp" title="background CSS" target="_blank">W3 Schools page</a> for more information about background styling.', 'weaver-xtreme') . '</small>')))); if (true) { $new_opts = weaverx_cz_add_image('body', __('Site BG Image', 'weaver-xtreme'), __('Background image for entire site (body)', 'weaver-xtreme')); $image_sections['images-background']['options'] = array_merge($image_sections['images-background']['options'], $new_opts); $new_opts = weaverx_cz_add_image('wrapper', __('Wrapper BG Image', 'weaver-xtreme'), __('Background image for outer wrapper (#wrapper)', 'weaver-xtreme')); $image_sections['images-background']['options'] = array_merge($image_sections['images-background']['options'], $new_opts); $new_opts = weaverx_cz_add_image('header', __('Header BG Image', 'weaver-xtreme'), __('Background image for header (#header)', 'weaver-xtreme')); $image_sections['images-background']['options'] = array_merge($image_sections['images-background']['options'], $new_opts); $new_opts = weaverx_cz_add_image('container', __('Container BG Image', 'weaver-xtreme'), __('Background image for Container - (#container)', 'weaver-xtreme')); $image_sections['images-background']['options'] = array_merge($image_sections['images-background']['options'], $new_opts); $new_opts = weaverx_cz_add_image('content', __('Content BG Image', 'weaver-xtreme'), __('Background image for Content - wraps page/post area (#content)', 'weaver-xtreme')); $image_sections['images-background']['options'] = array_merge($image_sections['images-background']['options'], $new_opts); $new_opts = weaverx_cz_add_image('page', __('Page content BG Image', 'weaver-xtreme'), __('Background image for Page content area (#content .page)', 'weaver-xtreme')); $image_sections['images-background']['options'] = array_merge($image_sections['images-background']['options'], $new_opts); $new_opts = weaverx_cz_add_image('post', __('Post BG Image', 'weaver-xtreme'), __('Background image for Post content area (#content .post)', 'weaver-xtreme')); $image_sections['images-background']['options'] = array_merge($image_sections['images-background']['options'], $new_opts); $new_opts = weaverx_cz_add_image('widgets_primary', __('Primary Sidebar Area BG Image', 'weaver-xtreme'), __('Background image for primary widget area (#primary-widget-area)', 'weaver-xtreme')); $image_sections['images-background']['options'] = array_merge($image_sections['images-background']['options'], $new_opts); $new_opts = weaverx_cz_add_image('widgets_secondary', __('Secondary Sidebar Areas BG Image', 'weaver-xtreme'), __('Background image for secondary widget areas (#secondary-widget-area)', 'weaver-xtreme')); $image_sections['images-background']['options'] = array_merge($image_sections['images-background']['options'], $new_opts); $new_opts = weaverx_cz_add_image('footer', __('Footer BG Image', 'weaver-xtreme'), __('Background image for Footer area (#colophon)', 'weaver-xtreme')); $image_sections['images-background']['options'] = array_merge($image_sections['images-background']['options'], $new_opts); } /** * Filter the definitions for the controls in the Color Scheme panel of the Customizer. * * @since 1.3.0. * * @param array $image_sections The array of definitions. */ $image_sections = apply_filters('weaverx_customizer_image_sections', $image_sections); // Merge with master array return array_merge($sections, $image_sections); }
function weaverx_cz_add_fonts($root, $label = '', $description = '', $transport = 'refresh', $bold = 'bold') { $opt = array(); if ($root != 'm_primary') { // add a line except top $opt[$root . '-headingline'] = weaverx_cz_line(); } $glabel = $label; if ($transport == 'refresh') { $glabel .= WEAVERX_REFRESH_ICON; } $opt[$root . '-font-hdrm'] = weaverx_cz_group_title($glabel, $description); // Font Size $opt[$root . '_font_size'] = weaverx_cz_select('', '<strong>' . __('Select Font Size for ', 'weaver-xtreme') . $label . '</strong>', 'weaverx_cz_choices_font_size', '', $transport); // Font Family /* for future - add more fonts... *$opt[$root . '_font_family'] = array( 'setting' => array( 'transport' => 'refresh', 'default' => 'sans-serif' ), 'control' => array( 'control_type' => 'WeaverX_Misc_Control', 'label' => __( 'Font Family', 'weaver-xtreme' ) . WEAVERX_REFRESH_ICON, 'description' => '', 'type' => 'select-fontfamily', 'choices' => weaverx_cz_choices_font_family() ), ); */ $opt[$root . '_font_family'] = weaverx_cz_select('', '<strong>' . __('Select Font Family for ', 'weaver-xtreme') . $label . '</strong>', 'weaverx_cz_choices_font_family', '', $transport); // Bold / Normal if ($root == 'tagline' || $root == 'content_h' || strpos($root, '_title') > 0) { if ($transport == 'refresh') { $opt[$root . '_normal'] = weaverx_cz_checkbox_refresh(__('Normal Weight for ', 'weaver-xtreme') . $label, ''); } else { $opt[$root . '_normal'] = weaverx_cz_checkbox(__('Normal Weight for ', 'weaver-xtreme') . $label, ''); } } else { $opt[$root . '_bold'] = weaverx_cz_select('', '<strong>' . __('Use Bold for ', 'weaver-xtreme') . $label . '</strong>', 'weaverx_cz_choices_bold_italic', '', $transport); } // Italic $opt[$root . '_italic'] = weaverx_cz_select('', '<strong>' . __('Use <em>Italic</em> for ', 'weaver-xtreme') . $label . '</strong>', 'weaverx_cz_choices_bold_italic', '', $transport); return $opt; }
/** * Define the sections and settings for the style panel * */ function weaverx_customizer_define_style_sections($sections) { $panel = 'weaverx_style'; $style_sections = array(); define('WEAVERX_ROUNDED_TRANSPORT', 'postMessage'); // global settings $style_sections['style-global'] = array('panel' => $panel, 'title' => __('Global Style Options', 'weaver-xtreme'), 'description' => 'Set some global settings that affect style.', 'options' => array('border_color' => array('setting' => array('sanitize_callback' => WEAVERX_CZ_SANITIZE_COLOR, 'transport' => WEAVERX_COLOR_TRANSPORT, 'default' => '#222222'), 'control' => array('control_type' => WEAVERX_COLOR_CONTROL, 'label' => __('Border Color...', 'weaver-xtreme'), 'description' => __('Color for all borders.', 'weaver-xtreme'))), 'border_width_int' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage', 'default' => 1), 'control' => array('control_type' => 'WeaverX_Range_Control', 'label' => __('Border Width (px)', 'weaver-xtreme'), 'type' => 'range', 'input_attrs' => array('min' => 1, 'max' => 20, 'step' => 1))), 'border_style' => weaverx_cz_select_plus(__('Border Style', 'weaver-xtreme'), __('Style of borders - width needs to be > 1 and color other than black for some styles to work correctly.', 'weaver-xtreme'), 'weaverx_cz_choices_border_style', 'solid', 'refresh'), 'rounded_corners_radius' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'refresh', 'default' => 8), 'control' => array('control_type' => WEAVERX_PLUS_RANGE_CONTROL, 'label' => __('Corner Radius (px)', 'weaver-xtreme') . WEAVERX_PLUS_ICON . WEAVERX_REFRESH_ICON, 'description' => __('Controls how "round" corners are. Specify a value (5 to 15 look best) for corner radius.', 'weaver-xtreme'), 'type' => 'range', 'input_attrs' => array('min' => 1, 'max' => 20, 'step' => 1))), 'custom_shadow' => array('setting' => array('sanitize_callback' => 'weaverx_cz_sanitize_css', 'transport' => 'refresh', 'default' => ''), 'control' => array('control_type' => WEAVERX_PLUS_TEXTAREA_CONTROL, 'label' => __('Custom Shadow', 'weaver-xtreme') . WEAVERX_PLUS_ICON . WEAVERX_REFRESH_ICON, 'description' => __('This defines the "Custom Shadow" shown on the <em>Add shadow</em> options. You will have to select "Custom Shadow" to use the shadow style you define here. Specify full <em>box-shadow</em> CSS rule.', 'weaver-xtreme'), 'type' => 'textarea', 'input_attrs' => array('rows' => '1', 'placeholder' => __('{box-shadow: 0 0 3px 1px rgba(0,0,0,0.25);} /* for example */', 'weaver-xtreme')))))); /** * General */ $style_sections['style-wrapping'] = array('panel' => $panel, 'title' => __('Wrapping Areas', 'weaver-xtreme'), 'description' => 'Set borders, shadows, and rounded corners for main Wrapper and Container wrapping areas.', 'options' => array('wrapper-style-genopts' => weaverx_cz_group_title(__('General Style Global Options', 'weaver-xtreme'), __('These settings control global attributes of borders, etc.', 'weaver-xtreme')), 'wrapper-style-heading' => weaverx_cz_group_title(__('Wrapper Area', 'weaver-xtreme'), __('The Wrapper is the <div> that wraps entire site.', 'weaver-xtreme')), 'wrapper_border' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage'), 'control' => array('label' => __('Add border', 'weaver-xtreme'), 'type' => 'checkbox')), 'wrapper_shadow' => weaverx_cz_select(__('Add shadow', 'weaver-xtreme'), '', 'weaverx_cz_choices_shadow', '-0', 'postMessage'), 'wrapper_rounded' => weaverx_cz_select(__('Rounded corners', 'weaver-xtreme'), '', 'weaverx_cz_choices_rounded', 'none', WEAVERX_ROUNDED_TRANSPORT), 'container-style-heading' => weaverx_cz_group_title(__('Container Area', 'weaver-xtreme'), __('The Container is the <div> that wraps site content areas, including sidebars. Does not include Header and Footer.', 'weaver-xtreme')), 'container_border' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage'), 'control' => array('label' => __('Add border', 'weaver-xtreme'), 'type' => 'checkbox')), 'container_shadow' => weaverx_cz_select(__('Add shadow', 'weaver-xtreme'), '', 'weaverx_cz_choices_shadow', '-0', 'postMessage'), 'container_rounded' => weaverx_cz_select(__('Rounded corners', 'weaver-xtreme'), '', 'weaverx_cz_choices_rounded', 'none', WEAVERX_ROUNDED_TRANSPORT))); /** * Site Header */ $style_sections['style-header'] = array('panel' => $panel, 'title' => __('Header Area', 'weaver-xtreme'), 'options' => array('style-heading-header' => weaverx_cz_group_title(__('Site Header Area Borders', 'weaver-xtreme')), 'header_border' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage'), 'control' => array('label' => __('Add border to entire Header Area', 'weaver-xtreme'), 'type' => 'checkbox')), 'header_sb_border' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage'), 'control' => array('label' => __('Add border to Header Widget Area', 'weaver-xtreme'), 'type' => 'checkbox')), 'header_html_border' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage'), 'control' => array('label' => __('Add border to Header HTML Area', 'weaver-xtreme'), 'type' => 'checkbox')), 'style-shadow-header' => weaverx_cz_group_title(__('Site Header Area Shadows', 'weaver-xtreme')), 'header_shadow' => weaverx_cz_select(__('Add shadow to header', 'weaver-xtreme'), '', 'weaverx_cz_choices_shadow', '-0', 'postMessage'), 'header_sb_shadow' => weaverx_cz_select(__('Add shadow to Header Widget Area', 'weaver-xtreme'), '', 'weaverx_cz_choices_shadow', '-0', 'postMessage'), 'header_html_shadow' => weaverx_cz_select(__('Add shadow to Header HTML Area', 'weaver-xtreme'), '', 'weaverx_cz_choices_shadow', '-0', 'postMessage'), 'style-rounded-header' => weaverx_cz_group_title(__('Site Header Rounded Corners', 'weaver-xtreme'), __('Note that rounded corners require borders or bg color to show, and interact with surrounding areas. You may have to set several options to get rounded corners to display.', 'weaver-xtreme')), 'header_rounded' => weaverx_cz_select(__('Add rounded corners to Header Area', 'weaver-xtreme'), '', 'weaverx_cz_choices_rounded', 'none', WEAVERX_ROUNDED_TRANSPORT), 'header_sb_rounded' => weaverx_cz_select(__('Add rounded corners to Header Widget Area', 'weaver-xtreme'), '', 'weaverx_cz_choices_rounded', 'none', WEAVERX_ROUNDED_TRANSPORT), 'header_html_rounded' => weaverx_cz_select(__('Add rounded corners to Header HTML Area', 'weaver-xtreme'), '', 'weaverx_cz_choices_rounded', 'none', WEAVERX_ROUNDED_TRANSPORT))); /** * Main Menu */ $style_sections['style-menus'] = array('panel' => $panel, 'title' => __('Menus', 'weaver-xtreme'), 'description' => __('Set style for Menus.', 'weaver-xtreme'), 'options' => array('style-mm-heading' => weaverx_cz_group_title(__('Primary Menu', 'weaver-xtreme')), 'm_primary_sub_border' => weaverx_cz_checkbox(__('Add border to Primary Menu bar', 'weaver-xtreme')), 'm_primary_sub_border' => weaverx_cz_checkbox(__('Add border to Sub-Menus', 'weaver-xtreme')), 'm_primary_shadow' => weaverx_cz_select(__('Add shadow to menu bar', 'weaver-xtreme'), '', 'weaverx_cz_choices_shadow', '-0', 'postMessage'), 'm_primary_sub_noshadow' => weaverx_cz_heading(__('Add Shadow to Sub-Menus', 'weaver-xtreme'), __('Sub-Menus do <em>not</em> support shadows.', 'weaver-xtreme')), 'm_primary_rounded' => weaverx_cz_select(__('Add rounded corners to menu bar', 'weaver-xtreme'), '', 'weaverx_cz_choices_rounded', 'none', WEAVERX_ROUNDED_TRANSPORT), 'm_primary_sub_rounded' => weaverx_cz_checkbox_refresh(__('Rounded Primary Sub-Menu corners', 'weaver-xtreme')), 'style-sm-line1' => weaverx_cz_line(), 'style-sm-heading' => weaverx_cz_group_title(__('Secondary Menu', 'weaver-xtreme')), 'm_secondary_sub_border' => weaverx_cz_checkbox(__('Add border to Secondary Menu bar', 'weaver-xtreme')), 'm_secondary_sub_border' => weaverx_cz_checkbox(__('Add border to Sub-Menus', 'weaver-xtreme')), 'm_secondary_shadow' => weaverx_cz_select(__('Add shadow to menu bar', 'weaver-xtreme'), '', 'weaverx_cz_choices_shadow', '-0', 'postMessage'), 'm_secondary_sub_noshadow' => weaverx_cz_heading(__('Add Shadow to Sub-Menus', 'weaver-xtreme'), __('Sub-Menus do <em>not</em> support shadows.', 'weaver-xtreme')), 'm_secondary_rounded' => weaverx_cz_select(__('Add rounded corners to menu bar', 'weaver-xtreme'), '', 'weaverx_cz_choices_rounded', 'none', WEAVERX_ROUNDED_TRANSPORT), 'm_secondary_sub_rounded' => weaverx_cz_checkbox_refresh(__('Rounded Secondary Sub-Menu corners', 'weaver-xtreme')), 'style-sm-line2' => weaverx_cz_line(), 'style-allmenus-heading' => weaverx_cz_group_title(__('Style For All Menus', 'weaver-xtreme'), __('These options specify current page attributes for all menus.', 'weaver-xtreme')), 'placeholder_cursor' => weaverx_cz_select(__('Placeholder Menu Hover Cursor', 'weaver-xtreme'), __('Cursor :hover attribute for placeholder menu items (only with Custom Menu Items with URL==#).', 'weaver-xtreme'), 'weaverx_cz_choices_pointer', 'pointer', 'refresh'))); if (weaverx_cz_is_plus()) { $new_opts = array('style-xm-line1' => weaverx_cz_line(), 'style-xm-heading' => weaverx_cz_group_title(__('Extra Menu', 'weaver-xtreme')), 'm_extra_sub_border' => weaverx_cz_checkbox(__('Add border to Extra Menu bar', 'weaver-xtreme')), 'm_extra_sub_border' => weaverx_cz_checkbox(__('Add border to Sub-Menus', 'weaver-xtreme')), 'm_extra_shadow' => weaverx_cz_select(__('Add shadow to menu bar', 'weaver-xtreme'), '', 'weaverx_cz_choices_shadow', '-0', 'postMessage'), 'm_extra_sub_noshadow' => weaverx_cz_heading(__('Add Shadow to Sub-Menus', 'weaver-xtreme'), __('Sub-Menus do <em>not</em> support shadows.', 'weaver-xtreme')), 'm_extra_rounded' => weaverx_cz_select(__('Add rounded corners to menu bar', 'weaver-xtreme'), '', 'weaverx_cz_choices_rounded', 'none', WEAVERX_ROUNDED_TRANSPORT), 'm_extra_sub_rounded' => weaverx_cz_checkbox_refresh(__('Rounded Extra Sub-Menu corners', 'weaver-xtreme'))); } else { $new_opts = weaverx_cz_add_plus_message('spacing_menus', __('Extra Menu', 'weaver-xtreme'), __('Add extra menus with <strong>Weaver Xtreme Plus</strong>.', 'weaver-xtreme')); } // add stub or extra menu options $style_sections['style-menus']['options'] = array_merge($style_sections['style-menus']['options'], $new_opts); /** * Info Bar */ $style_sections['style-info-bar'] = array('panel' => $panel, 'title' => __('Info Bar', 'weaver-xtreme'), 'description' => __('Info Bar with breadcrumb and paged navigation displayed under Primary Menu.', 'weaver-xtreme'), 'options' => array('infobar_border' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage'), 'control' => array('label' => __('Add border to Info Bar', 'weaver-xtreme'), 'type' => 'checkbox')), 'infobar_shadow' => weaverx_cz_select(__('Add shadow to Info Bar', 'weaver-xtreme'), '', 'weaverx_cz_choices_shadow', '-0', 'postMessage'), 'infobar_rounded' => weaverx_cz_select(__('Add rounded corners to Info Bar', 'weaver-xtreme'), '', 'weaverx_cz_choices_rounded', 'none', WEAVERX_ROUNDED_TRANSPORT))); /** * Content */ $style_sections['style-content'] = array('panel' => $panel, 'title' => __('Content', 'weaver-xtreme'), 'description' => __('style for general page and post content.', 'weaver-xtreme'), 'options' => array('content_border' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage'), 'control' => array('label' => __('Add border to Content Area', 'weaver-xtreme'), 'type' => 'checkbox')), 'content_shadow' => weaverx_cz_select(__('Add shadow to Content Area', 'weaver-xtreme'), '', 'weaverx_cz_choices_shadow', '-0', 'postMessage'), 'content_rounded' => weaverx_cz_select(__('Add rounded corners to Content Area', 'weaver-xtreme'), '', 'weaverx_cz_choices_rounded', 'none', WEAVERX_ROUNDED_TRANSPORT), 'page_title_underline_int' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage', 'default' => 0), 'control' => array('control_type' => 'WeaverX_Range_Control', 'label' => __('Bar under Page Title (px)', 'weaver-xtreme'), 'description' => __('Enter size in px if you want a bar under Page Titles. Leave 0 for no bar. Color matches title.', 'weaver-xtreme'), 'type' => 'range', 'input_attrs' => array('min' => 0, 'max' => 20, 'step' => 1))), 'contentlist_bullet' => weaverx_cz_select(__('Content List Bullet Style', 'weaver-xtreme'), __('Bullet used for Unordered Lists in Content.', 'weaver-xtreme'), 'weaverx_cz_choices_list_bullets', 'disc', 'postMessage'), 'weaverx_tables' => weaverx_cz_select(__('Table Style', 'weaver-xtreme'), __('Style used for tables in content. <span style="font-weigiht:bold;color:red;">WARNING!</span> Tables are inherently non-responsive, and <em>do not</em> work well for mobile devices. We advise you to avoid using tables.', 'weaver-xtreme'), 'weaverx_cz_choices_tables', 'default', 'refresh'), 'show_comment_borders' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'refresh'), 'control' => array('label' => __('Show Borders on Comments', 'weaver-xtreme') . WEAVERX_REFRESH_ICON, 'description' => __('Show Borders around comment sections - improves visual look of comments.', 'weaver-xtreme'), 'type' => 'checkbox')))); /** * Post Specific */ $style_sections['style-post-specific'] = array('panel' => $panel, 'title' => __('Post Specific', 'weaver-xtreme'), 'description' => __('Post Specific style - override Content style.', 'weaver-xtreme'), 'options' => array('post_border' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage'), 'control' => array('label' => __('Add border to Posts', 'weaver-xtreme'), 'type' => 'checkbox')), 'post_shadow' => weaverx_cz_select(__('Add shadow to posts', 'weaver-xtreme'), '', 'weaverx_cz_choices_shadow', '-0', 'postMessage'), 'post_rounded' => weaverx_cz_select(__('Add rounded corners to posts', 'weaver-xtreme'), '', 'weaverx_cz_choices_rounded', 'none', WEAVERX_ROUNDED_TRANSPORT), 'post_icons' => weaverx_cz_select(__('Text or Icons for Post Info', 'weaver-xtreme'), __('Use Icons instead of Text descriptions in Post Meta Info. You can specify a color for the Font Icons on the <em>Color → Post Specific</em> panel.', 'weaver-xtreme'), 'weaverx_cz_choices_post_icons', 'text', 'refresh'), 'post_title_underline_int' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage', 'default' => 0), 'control' => array('control_type' => 'WeaverX_Range_Control', 'label' => __('Bar under Post Titles (px)', 'weaver-xtreme'), 'description' => __('Enter size in px if you want a bar under Post Titles. Leave 0 for no bar. Color matches title.', 'weaver-xtreme'), 'type' => 'range', 'input_attrs' => array('min' => 0, 'max' => 20, 'step' => 1))))); /** * Sidebars */ $style_sections['style-sidebars'] = array('panel' => $panel, 'title' => __('Sidebars & Widget Areas', 'weaver-xtreme'), 'description' => __('Style for Main Sidebars and Widget areas.', 'weaver-xtreme'), 'options' => array('style-primary-widget-heading' => weaverx_cz_group_title(__('Primary Widget Area', 'weaver-xtreme')), 'primary_border' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage'), 'control' => array('label' => __('Add border', 'weaver-xtreme'), 'type' => 'checkbox')), 'primary_shadow' => weaverx_cz_select(__('Add shadow', 'weaver-xtreme'), '', 'weaverx_cz_choices_shadow', '-0', 'postMessage'), 'primary_rounded' => weaverx_cz_select(__('Add rounded corners', 'weaver-xtreme'), '', 'weaverx_cz_choices_rounded', 'none', WEAVERX_ROUNDED_TRANSPORT), 'style-secondary-widget-heading' => weaverx_cz_group_title(__('Secondary Widget Area', 'weaver-xtreme')), 'secondary_border' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage'), 'control' => array('label' => __('Add border', 'weaver-xtreme'), 'type' => 'checkbox')), 'secondary_shadow' => weaverx_cz_select(__('Add shadow', 'weaver-xtreme'), '', 'weaverx_cz_choices_shadow', '-0', 'postMessage'), 'secondary_rounded' => weaverx_cz_select(__('Add rounded corners', 'weaver-xtreme'), '', 'weaverx_cz_choices_rounded', 'none', WEAVERX_ROUNDED_TRANSPORT), 'style-top-widget-heading' => weaverx_cz_group_title(__('Top Widget Areas', 'weaver-xtreme'), __('Properties for all Top Widget areas (Sitewide, Pages, Blog, Archive).', 'weaver-xtreme')), 'top_border' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage'), 'control' => array('label' => __('Add border', 'weaver-xtreme'), 'type' => 'checkbox')), 'top_shadow' => weaverx_cz_select(__('Add shadow', 'weaver-xtreme'), '', 'weaverx_cz_choices_shadow', '-0', 'postMessage'), 'top_rounded' => weaverx_cz_select(__('Add rounded corners', 'weaver-xtreme'), '', 'weaverx_cz_choices_rounded', 'none', WEAVERX_ROUNDED_TRANSPORT), 'style-bottom-widget-heading' => weaverx_cz_group_title(__('Bottom Widget Areas', 'weaver-xtreme'), __('Properties for all Bottom Widget areas (Sitewide, Pages, Blog, Archive).', 'weaver-xtreme')), 'bottom_border' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage'), 'control' => array('label' => __('Add border', 'weaver-xtreme'), 'type' => 'checkbox')), 'bottom_shadow' => weaverx_cz_select(__('Add shadow', 'weaver-xtreme'), '', 'weaverx_cz_choices_shadow', '-0', 'postMessage'), 'bottom_rounded' => weaverx_cz_select(__('Add rounded corners', 'weaver-xtreme'), '', 'weaverx_cz_choices_rounded', 'none', WEAVERX_ROUNDED_TRANSPORT))); /** * Widgets */ $style_sections['style-widgets'] = array('panel' => $panel, 'title' => __('Individual Widgets', 'weaver-xtreme'), 'description' => __('Styling for individual widgets.', 'weaver-xtreme'), 'options' => array('widget_border' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage'), 'control' => array('label' => __('Add border', 'weaver-xtreme'), 'type' => 'checkbox')), 'widget_shadow' => weaverx_cz_select(__('Add shadow to Individual Widgets', 'weaver-xtreme'), '', 'weaverx_cz_choices_shadow', '-0', 'postMessage'), 'widget_rounded' => weaverx_cz_select(__('Rounded corners', 'weaver-xtreme'), '', 'weaverx_cz_choices_rounded', 'none', WEAVERX_ROUNDED_TRANSPORT), 'widget_title_underline_int' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage', 'default' => 0), 'control' => array('control_type' => 'WeaverX_Range_Control', 'label' => __('Bar under Widget Titles (px)', 'weaver-xtreme'), 'description' => __('Enter size in px if you want a bar under Widget Titles. Leave 0 for no bar. Color matches title.', 'weaver-xtreme'), 'type' => 'range', 'input_attrs' => array('min' => 0, 'max' => 20, 'step' => 1))), 'widgetlist_bullet' => weaverx_cz_select(__('Widget List Bullet', 'weaver-xtreme'), __('Bullet used for Unordered Lists in Widget areas.', 'weaver-xtreme'), 'weaverx_cz_choices_list_bullets', 'disc', 'postMessage'))); /** * Footer */ $style_sections['style-footer'] = array('panel' => $panel, 'title' => __('Footer Area', 'weaver-xtreme'), 'options' => array('style-footer-heading' => weaverx_cz_group_title(__('Footer Borders', 'weaver-xtreme')), 'footer_border' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage'), 'control' => array('label' => __('Add border to Footer Area', 'weaver-xtreme'), 'type' => 'checkbox')), 'footer_sb_border' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage'), 'control' => array('label' => __('Add border to Footer Widget Area', 'weaver-xtreme'), 'type' => 'checkbox')), 'footer_html_border' => array('setting' => array('sanitize_callback' => 'absint', 'transport' => 'postMessage'), 'control' => array('label' => __('Add border to Footer HTML Area', 'weaver-xtreme'), 'type' => 'checkbox')), 'style-footer-shadow-heading' => weaverx_cz_group_title(__('Footer Shadows', 'weaver-xtreme')), 'footer_shadow' => weaverx_cz_select(__('Add shadow to Footer Area', 'weaver-xtreme'), '', 'weaverx_cz_choices_shadow', '-0', 'postMessage'), 'footer_sb_shadow' => weaverx_cz_select(__('Add shadow to Footer Widget Area', 'weaver-xtreme'), '', 'weaverx_cz_choices_shadow', '-0', 'postMessage'), 'footer_html_shadow' => weaverx_cz_select(__('Add shadow to HTML Area', 'weaver-xtreme'), '', 'weaverx_cz_choices_shadow', '-0', 'postMessage'), 'style-footer-rounded-heading' => weaverx_cz_group_title(__('Footer Rounded Corners', 'weaver-xtreme')), 'footer_rounded' => weaverx_cz_select(__('Add rounded corners to Footer Area', 'weaver-xtreme'), '', 'weaverx_cz_choices_rounded', 'none', WEAVERX_ROUNDED_TRANSPORT), 'footer_sb_rounded' => weaverx_cz_select(__('Add rounded corners to Footer Widget Area', 'weaver-xtreme'), '', 'weaverx_cz_choices_rounded', 'none', WEAVERX_ROUNDED_TRANSPORT), 'footer_html_rounded' => weaverx_cz_select(__('Add rounded corners to Footer HTML Area', 'weaver-xtreme'), '', 'weaverx_cz_choices_rounded', 'none', WEAVERX_ROUNDED_TRANSPORT))); /** * Filter the definitions for the controls in the Color Scheme panel of the Customizer. * * @since 1.3.0. * * @param array $style_sections The array of definitions. */ $style_sections = apply_filters('weaverx_customizer_style_sections', $style_sections); // Merge with master array return array_merge($sections, $style_sections); }