section
if ( weaverx_options_level() == WEAVERX_LEVEL_ADVANCED ) { // show if advanced
$content_sections['content-head'] = array(
'panel' => $panel,
'title' => __( 'Site <HEAD> Section', 'weaver-xtreme' ),
'options' => array(
'content-headsec-heading' => weaverx_cz_heading( __( 'Introductory Help for <HEAD> Section', 'weaver-xtreme' ),
__( 'This panel allows you to add HTML to the <HEAD> Section of every page on your site.
PLEASE NOTE: Only minimal validation is made on the field values, so be careful not to use invalid code. Invalid code is usually harmless, but it can make your site display incorrectly. If your site looks broken after make changes here, please double check that what you entered uses valid HTML or CSS rules.', 'weaver-xtreme' )),
'head_opts' => weaverx_cz_textarea(__( '<HEAD> Section Content', 'weaver-xtreme' ),
/* $description = */ __(
'This input area allows you to enter allowed HTML head elements to the <head> section, including <title>, <base>, <link>, <meta>, <script>, and <style>.
Code entered into this box is included right before the </head> HTML tag on each page of your site.
We recommend using dedicated WordPress plugins to add things like ad tracking, SEO tags, Facebook code, and so on.
Note: You can add CSS Rules using the "Custom CSS Rules" option on the Main Options tab.', 'weaver-xtreme' ),
/* $rows = */ '4', /* $placeholder = */ __('Any HTML allowed in .', 'weaver-xtreme'),
/*$refresh = */ 'refresh', /*$plus = */false),
'_althead_opts' => weaverx_cz_textarea(__( '<HEAD> Section (Advanced Alternative - ♦)', 'weaver-xtreme' ),
__(
'Same as normal <HEAD> box above, but works like other ♦ options - it survives changing
the subtheme from the Weaver Xtreme Subthemes tab, and is saved only on a full backup Save.
This option is not commonly used, and is intended for more advanced Weaver Xtreme users.', 'weaver-xtreme' ),
'4', __('Any HTML allowed in .', 'weaver-xtreme'),
'refresh', false),
'content-headsec-line1' => array(
'control' => array(
'control_type' => 'WeaverX_Misc_Control', 'type' => 'line',
),
),
'_phpactions' => weaverx_cz_textarea(
__( 'Actions and Filters (♦)', 'weaver-xtreme' ),
__(
'This Option for Advanced Users! You can add arbitrary PHP code here. This option is intended to allow
you to add WordPress Actions and Filters that can affect the Visitor View of your site. This PHP code is executed at the very
beginning of the theme\'s header.php template file before any HTML is emitted, but after much of WordPress is loaded, so you
can\'t create filters or actions for all WordPress functions.
Do NOT bracket the code with <?php and ?> at the beginning and end.
If your code doesn\'t seem to do anything, you probably have a PHP error. See the Help file for more technical details.', 'weaver-xtreme' ),
'4', __('/* PHP code - typically to define WP actions or filters */', 'weaver-xtreme'),
'refresh', true, 'weaverx_cz_sanitize_code'),
),
);
/**
* Site Header
*/
$content_sections['content-header'] = array(
'panel' => $panel,
'title' => __( 'Site Header Area', 'weaver-xtreme' ),
'options' => array(
'header_html_text' => weaverx_cz_html_textarea(__( 'Header HTML Content', 'weaver-xtreme' ),
__( 'Add arbitrary HTML to Header Area (in <div id="header-html">)', 'weaver-xtreme' ),
'4'),
),
);
/**
* Main Menu
*/
$logo_html = weaverx_get_logo_html();
$content_sections['content-menus'] = array(
'panel' => $panel,
'title' => __( 'Menus', 'weaver-xtreme' ),
'description' => __( 'Set added content for Menus.', 'weaver-xtreme' ),
'options' => array(
'content-mm-heading' => weaverx_cz_group_title( __( 'Primary Menu', 'weaver-xtreme' )),
'm_primary_html_left' => weaverx_cz_textarea(__( 'Left HTML', 'weaver-xtreme' ),
__( 'Add HTML to menu bar. Works best with Centered Menu. You can adjust color and top/bottom spacing on the respective panels.', 'weaver-xtreme' ),
'1', __('Any HTML, including shortcodes.', 'weaver-xtreme'),
'postMessage', true),
'm_primary_html_right' => weaverx_cz_textarea(__( 'Right HTML', 'weaver-xtreme' ),
'',
'1', __('Any HTML, including shortcodes.', 'weaver-xtreme'),
'postMessage', false), // only primary right is in free version
'm_primary_logo_left' => weaverx_cz_checkbox_refresh(
__( 'Add Site Logo to Left', 'weaver-xtreme' ),
__('Add the Site Logo to the primary menu. Add custom CSS for .custom-logo-on-menu to style. (Use Customize : Site Identity to set Site Logo.)', 'weaver-xtreme') . $logo_html
),
'm_primary_logo_height_dec' => array(
'setting' => array( 'sanitize_callback' => 'weaverx_cz_sanitize_float', 'transport' => 'refresh', 'default' => 0
),
'control' => array(
'control_type' => 'WeaverX_Range_Control',
'label' => __( 'Logo on Menu Bar Height (em)', 'weaver-xtreme' ) . WEAVERX_REFRESH_ICON,
'description' => __( 'Set height of Logo on Menu. Will interact with padding. Default 0 uses current line height.', 'weaver-xtreme' ) ,
'type' => 'range',
'input_attrs' => array(
'min' => 0,
'max' => 10,
'step' => .1,
),
),
),
'content-sm-heading' => weaverx_cz_group_title( __( 'Secondary Menu', 'weaver-xtreme' ),
__('You must define a Secondary Menu from the Custom Menus Content menu.', 'weaver-xtreme')),
'm_secondary_html_left' => weaverx_cz_textarea(__( 'Left HTML', 'weaver-xtreme' ),
__( 'Add HTML to menu bar. Works best with Centered Menu. You can adjust color and top/bottom spacing on the respective panels.', 'weaver-xtreme' ),
'1', __('Any HTML, including shortcodes.', 'weaver-xtreme'),
'postMessage', true),
'm_secondary_html_right' => weaverx_cz_textarea(__( 'Right HTML', 'weaver-xtreme' ),
'',
'1', __('Any HTML, including shortcodes.', 'weaver-xtreme'),
'postMessage', true),
'content-xm-heading' => weaverx_cz_group_title( __( 'Extra Menu', 'weaver-xtreme' )),
'm_extra_html_left' => weaverx_cz_textarea(__( 'Left HTML', 'weaver-xtreme' ),
__( 'Add HTML to menu bar. Works best with Centered Menu. You can adjust color and top/bottom spacing on the respective panels.', 'weaver-xtreme' ),
'1', __('Any HTML, including shortcodes.', 'weaver-xtreme'),
'postMessage', true),
'm_extra_html_right' => weaverx_cz_textarea(__( 'Right HTML', 'weaver-xtreme' ),
'',
'1', __('Any HTML, including shortcodes.', 'weaver-xtreme'),
'postMessage', true),
),
);
/**
* Post Specific
*/
$content_sections['content-post-specific'] = array(
'panel' => $panel,
'title' => __( 'Post Specific', 'weaver-xtreme' ),
'description' => __('Post Specific Content - override Content Content.', 'weaver-xtreme'),
'options' => array(
'excerpt_more_msg' => weaverx_cz_html_textarea(__( '"Continue reading" Message', 'weaver-xtreme' ),
__( 'Change default Continue reading → message for excerpts. You can include HTML (e.g., <img>).', 'weaver-xtreme' ),
'1'),
'content-post-meta' => weaverx_cz_group_title( __( 'Custom Post Info Lines', 'weaver-xtreme' ) . WEAVERX_PLUS_ICON,
__( 'Replace Info Lines with custom info line templates. Advanced options: see help file.', 'weaver-xtreme' )),
'custom_posted_on' => array(
'setting' => array( 'sanitize_callback' => 'weaverx_cz_sanitize_html', 'transport' => 'refresh', 'default' => ''
),
'control' => array(
'control_type' => WEAVERX_PLUS_TEXTAREA_CONTROL,
'label' => __( 'Top Post Info Line', 'weaver-xtreme' ) . WEAVERX_PLUS_ICON . WEAVERX_REFRESH_ICON,
'description' => __( 'Custom template for top post info line.(☆Plus)', 'weaver-xtreme' ),
'type' => 'textarea',
'input_attrs' => array(
'rows' => '1',
'placeholder' => __('Please see help file for info line template info.', 'weaver-xtreme'),
),
),
),
'custom_posted_in' => array(
'setting' => array( 'sanitize_callback' => 'weaverx_cz_sanitize_html', 'transport' => 'refresh', 'default' => ''
),
'control' => array(
'control_type' => WEAVERX_PLUS_TEXTAREA_CONTROL,
'label' => __( 'Bottom Post Info Line', 'weaver-xtreme' ) . WEAVERX_PLUS_ICON . WEAVERX_REFRESH_ICON,
'description' => __( 'Custom template for bottom post info line.(☆Plus)', 'weaver-xtreme' ),
'type' => 'textarea',
'input_attrs' => array(
'rows' => '1',
'placeholder' => __('Please see help file for info line template info.', 'weaver-xtreme'),
),
),
),
'custom_posted_on_single' => array(
'setting' => array( 'sanitize_callback' => 'weaverx_cz_sanitize_html', 'transport' => 'refresh', 'default' => ''
),
'control' => array(
'control_type' => WEAVERX_PLUS_TEXTAREA_CONTROL,
'label' => __( 'Top Post Info Line (Single)', 'weaver-xtreme' ) . WEAVERX_PLUS_ICON . WEAVERX_REFRESH_ICON,
'description' => __( 'Custom template for top post info line on single pages.(☆Plus)', 'weaver-xtreme' ),
'type' => 'textarea',
'input_attrs' => array(
'rows' => '1',
'placeholder' => __('Please see help file for info line template info.', 'weaver-xtreme'),
),
),
),
'custom_posted_in_single' => array(
'setting' => array( 'sanitize_callback' => 'weaverx_cz_sanitize_html', 'transport' => 'refresh', 'default' => ''
),
'control' => array(
'control_type' => WEAVERX_PLUS_TEXTAREA_CONTROL,
'label' => __( 'Bottom Post Info Line (Single)', 'weaver-xtreme' ) . WEAVERX_PLUS_ICON . WEAVERX_REFRESH_ICON,
'description' => __( 'Custom template for bottom post info line on single pages.(☆Plus)', 'weaver-xtreme' ),
'type' => 'textarea',
'input_attrs' => array(
'rows' => '1',
'placeholder' => __('Please see help file for info line template info.', 'weaver-xtreme'),
),
),
),
),
);
/**
* Sidebars
*/
$content_sections['content-sidebars'] = array(
'panel' => $panel,
'title' => __( 'Sidebars & Widget Areas', 'weaver-xtreme' ),
'options' => array(
'content-widgetarea-heading' => array(
'setting' => array( 'sanitize_callback' => 'weaverx_cz_sanitize_html', 'transport' => 'refresh',
'default' => ''
),
'control' => array(
//'control_type' => 'WeaverX_Misc_Control',
'label' => __( 'Define Per Page Extra Widget Areas', 'weaver-xtreme' ) . WEAVERX_REFRESH_ICON,
'description' => __( 'You may define extra widget areas that can then be used in the Per Page settings, or in the Weaver Xtreme Plus [widget_area] shortcode.
Enter a list of one or more widget area names separated by commas.
Your names should include only letters, numbers, or underscores - no spaces or other special characters.
The widgets areas will then appear on the Appearance->Widgets menus.
They can be included on individual pages by adding the name you define here to the "Weaver Xtreme Options For This Page" box on the Edit Page screen. (♦)', 'weaver-xtreme' ),
'type' => 'text',
),
),
),
);
/**
* Footer
*/
$content_sections['content-footer'] = array(
'panel' => $panel,
'title' => __( 'Footer Area', 'weaver-xtreme' ),
'options' => array(
'footer_html_text' => array(
'setting' => array( 'sanitize_callback' => 'weaverx_filter_code', 'transport' => 'postMessage',
'default' => ''
),
'control' => array(
'control_type' => 'WeaverX_Textarea_Control',
'label' => __( 'Footer HTML Content', 'weaver-xtreme' ),
'description' => __( 'Add arbitrary HTML to Footer Area (in <div id="footer-html">)', 'weaver-xtreme' ),
'type' => 'textarea',
'input_attrs' => array(
'rows' => '3',
'placeholder' => __('', 'weaver-xtreme'),
),
),
),
'copyright' => array(
'setting' => array( 'sanitize_callback' => 'weaverx_filter_code', 'transport' => 'postMessage',
'default' => ''
),
'control' => array(
'control_type' => 'WeaverX_Textarea_Control',
'label' => __( '© Site Copyright', 'weaver-xtreme' ) ,
'description' => __( 'If you fill this in, the default copyright notice in the footer will be replaced with the text here. It will not automatically update from year to year. Use © to display ©. You can use other HTML and shortcodes as well.
Use to hide the copyright notice. ♦', 'weaver-xtreme' ),
'type' => 'textarea',
'input_attrs' => array(
'rows' => '2',
'placeholder' => __('', 'weaver-xtreme'),
),
),
),
),
);
/**
* Injection areas
*/
$content_sections['content-injection'] = array(
'panel' => $panel,
'title' => __( 'HTML Injection Areas', 'weaver-xtreme' ),
'description' => __( 'HTML Injection Areas. The injection areas include Prewrapper and Postfooter for all versions of the theme. Weaver Xtreme Plus also includes Preheader, Header Top, Container Top, Content Top, Page Content Bottom, Post-Post Content, Pre-Comments, Post-Comments, Pre-Footer, Primary Sidebar Top, Fixed Browser Top, and Fixed Browser Bottom. Note: unlike most other options, the HTML Injections area options provide all relevant associated options: content, color, custom CSS, and visibility.', 'weaver-xtreme' ),
'options' => array(
),
);
$new_opts = weaverx_cz_add_injection('prewrapper', __('Prewrapper Injection Area', 'weaver-xtreme'),
__('This code will be inserted just before the #wrapper and #branding <div>s, before any other site content.(Area ID: #inject_prewrapper) ', 'weaver-xtreme'), 'standard');
$content_sections['content-injection']['options'] = array_merge( $content_sections['content-injection']['options'], $new_opts);
$new_opts = weaverx_cz_add_injection('postfooter', __('Post Footer Injection Area', 'weaver-xtreme'),
__('This code will be inserted just after the footer #colophon <div>, outside the #wrapper div.(Area ID: #inject_postfooter)', 'weaver-xtreme'), 'standard');
$content_sections['content-injection']['options'] = array_merge( $content_sections['content-injection']['options'], $new_opts);
// X Plus Injection
$new_opts = weaverx_cz_add_injection('preheader', __('Preheader Injection Area', 'weaver-xtreme'),
__('This code will be inserted just before the #header <div>. It will have the same width as the #wrapper area. This area may require extra styling to eliminate unwanted margins. (Area ID: #inject_preheader) (☆Plus)', 'weaver-xtreme'));
$content_sections['content-injection']['options'] = array_merge( $content_sections['content-injection']['options'], $new_opts);
$new_opts = weaverx_cz_add_injection('header', __('Header Top Injection Area', 'weaver-xtreme'),
__('This code will be inserted at the top of the #header <div>, before the top menu. It will have the same width as the header area. (Area ID: #inject_header) (☆Plus)', 'weaver-xtreme'));
$content_sections['content-injection']['options'] = array_merge( $content_sections['content-injection']['options'], $new_opts);
$new_opts = weaverx_cz_add_injection('postheader', __('Post Header', 'weaver-xtreme'),
__('This code will be inserted between the #header <div> and the #container <div>. It will have the same width as the #wrapper area. (Area ID: #inject_postheader) (☆Plus)', 'weaver-xtreme'));
$content_sections['content-injection']['options'] = array_merge( $content_sections['content-injection']['options'], $new_opts);
$new_opts = weaverx_cz_add_injection('container_top', __('Container Top', 'weaver-xtreme'),
__('This code will be inserted inside the #container <div> that wraps content, including before the top widget areas. It will have the same width as the container area. (Area ID: #inject_container_top) (☆Plus)', 'weaver-xtreme'));
$content_sections['content-injection']['options'] = array_merge( $content_sections['content-injection']['options'], $new_opts);
$new_opts = weaverx_cz_add_injection('postinfobar', __('Pre Content', 'weaver-xtreme'),
__('This code will be inserted inside the #content div that wraps content. It will have the same width as the container area. (Area ID: #inject_postinfobar) (☆Plus)', 'weaver-xtreme'));
$content_sections['content-injection']['options'] = array_merge( $content_sections['content-injection']['options'], $new_opts);
$new_opts = weaverx_cz_add_injection('precontent', __('Content Top', 'weaver-xtreme'),
__('This code will be inserted inside the #content div that wraps content. It will have the same width as the container area. (Area ID: #inject_precontent) (☆Plus)', 'weaver-xtreme'));
$content_sections['content-injection']['options'] = array_merge( $content_sections['content-injection']['options'], $new_opts);
$new_opts = weaverx_cz_add_injection('pagecontentbottom', __('Page Content Bottom', 'weaver-xtreme'),
__('This code will be at the bottom of page (including post single page view and page with posts) content. It will have the same width as the content area. (Area ID: #inject_pagecontentbottom) (☆Plus)', 'weaver-xtreme'));
$content_sections['content-injection']['options'] = array_merge( $content_sections['content-injection']['options'], $new_opts);
$new_opts = weaverx_cz_add_injection('postpostcontent', __('Post-Post Content', 'weaver-xtreme'),
__('This code will be inserted after the content area of each post (not page). (Area class: .inject_postpostcontent) (☆Plus)', 'weaver-xtreme'));
$content_sections['content-injection']['options'] = array_merge( $content_sections['content-injection']['options'], $new_opts);
$new_opts = weaverx_cz_add_injection('precomments', __('Pre-Comments', 'weaver-xtreme'),
__('This code will be inserted just before the #comments div where comments are displayed. If comments
are open for the page, this area will include the class .precomments-comments, if closed .precomments-nocomments. (Area ID: #inject_precomments) (☆Plus)', 'weaver-xtreme'));
$content_sections['content-injection']['options'] = array_merge( $content_sections['content-injection']['options'], $new_opts);
$new_opts = weaverx_cz_add_injection('postcomments', __('Post-Comments', 'weaver-xtreme'),
__('This code will be inserted right after the #comments div where comments are displayed. If comments
are open for the page, this area will include the class .postcomments-comments, if closed .postcomments-nocomments. (Area ID: #inject_postcomments) (☆Plus)', 'weaver-xtreme'));
$content_sections['content-injection']['options'] = array_merge( $content_sections['content-injection']['options'], $new_opts);
$new_opts = weaverx_cz_add_injection('prefooter', __('Pre-Footer', 'weaver-xtreme'),
__('This code will be inserted just before the footer #colophon div. (Area ID: #inject_prefooter) (☆Plus)', 'weaver-xtreme'));
$content_sections['content-injection']['options'] = array_merge( $content_sections['content-injection']['options'], $new_opts);
$new_opts = weaverx_cz_add_injection('presidebar', __('Primary Sidebar Top', 'weaver-xtreme'),
__('This code will be inserted inside the primary sidebar area at the top. Not shown if no primary sidebar defined. (Area ID: #inject_presidebar) (☆Plus)', 'weaver-xtreme'));
$content_sections['content-injection']['options'] = array_merge( $content_sections['content-injection']['options'], $new_opts);
$new_opts = weaverx_cz_add_injection('fixedtop', __('Fixed Browser Top', 'weaver-xtreme'),
__('This code will be inserted in a fixed location at the top of the (non-IE8) desktop browser window. It will have the same width as the Wrapper Area. You will need to add a Top Margin to the Wrapper Area. Do not make this area too tall! (Area ID: #inject_fixedtop) (☆Plus)', 'weaver-xtreme'));
$content_sections['content-injection']['options'] = array_merge( $content_sections['content-injection']['options'], $new_opts);
$new_opts = weaverx_cz_add_injection('fixedbottom', __('Fixed Browser Bottom', 'weaver-xtreme'),
__('This code will be inserted in a fixed location at the bottom of the (non-IE8) desktop browser window. It will have the same width as the Wrapper Area. You will need to add a Bottom Margin to the Wrapper Area. Do not make this area too tall! (Area ID: #inject_fixedbottom) (☆Plus)', 'weaver-xtreme'));
$content_sections['content-injection']['options'] = array_merge( $content_sections['content-injection']['options'], $new_opts);
} else {
$content_sections['content-head'] = array(
'panel' => $panel,
'title' => __( 'Add Content', 'weaver-xtreme' ),
'options' => array(
'content-headsec-heading' => weaverx_cz_heading( __( 'Full Level Add Content', 'weaver-xtreme' ),
__( 'With the Full Level Interface, you can define HTML content for various areas, including the <HEAD>, Header, Menus, Posts, Sidebars, Footer, and other general HTML areas.', 'weaver-xtreme' )),
)
);
}
return $content_sections;
}
endif;
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' ), // . WEAVERX_REFRESH_ICON,
'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 (Advanced option) (★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;
}
?>