function wvrx_ts_xp_perpage_style_action($raw_template)
    {
        global $post;
        weaverx_help_link('help.html#perpoststyle', __('Help for Per Page Style', 'weaver-xtreme-plus'));
        if (!$raw_template) {
            echo '<p><br /><small>' . __('Enter optional per page CSS style rules. <strong>Do not</strong> include the &lt;style> and &lt;/style> tags.
Include the complete "selector {}" for each rule you define.
Custom styles will not be displayed by the Page Editor.
Example - full width page with centered, indented header, container, and footer:<br />
<code>#wrapper{max-width:100%;}
#header{width:80%;margin-left:auto;margin-right:auto;}
#container{width:80%;margin-left:auto;margin-right:auto;}
#colophon{width:80%;margin-left:auto;margin-right:auto;}</code>', 'weaver-xtreme-plus');
        } else {
            echo '<p><br /><small>' . __('Enter optional per page CSS style rules. <strong>Do not</strong> include the &lt;style> and &lt;/style> tags.
Include the complete "selector {}" for each rule you define. Rules with no selector apply to entire page.
Custom styles will not be displayed by the Page Editor.', 'weaver-xtreme-plus');
        }
        ?>
<br /><br />
	<textarea class="wvrx-edit" placeholder=" " name="_pp_post_styles" rows=2 style="width: 95%"><?php 
        echo get_post_meta($post->ID, "_pp_post_styles", true);
        ?>
</textarea>
</small><br />
	<?php 
        if (!$raw_template) {
            _e('<em>Per Page Area Added Classes</em><br />Add classes to selected wrapping areas for this page only. Useful for full width layouts - e.g. Parallax.', 'weaver-xtreme-plus');
            // 'footer', 'container', 'content', 'post', 'infobar', 'wrapper', 'header' as "_pp_{$area}_add_class"
            $areas = array('wrapper', 'header', 'infobar', 'container', 'content', 'post', 'footer');
            $afters = array('<br />', '<span style="margin-left:4em;"></span>');
            $count = 0;
            weaverx_html_br();
            foreach ($areas as $area) {
                if ($count++ % 2 == 0) {
                    $after = $afters[1];
                } else {
                    $after = $afters[0];
                }
                wvrx_ts_xp_text_option($post->ID, "_pp_{$area}_add_class", " <strong>{$area}</strong>", '', $after);
            }
            weaverx_html_br();
            // Weaver X Plus options for making horizontal bar layouts
            wvrx_ts_page_color('_pp_bgcolor', __('Page BG Color', 'weaver-xtreme-plus'));
            echo '<hr /><br style="clear:both;"/><strong>' . __('Header Image Replacement HTML', 'weaver-xtreme-plus') . '</strong> (&starf;Plus)';
            ?>
	</p><p>
<?php 
            if (version_compare(WEAVER_XPLUS_VERSION, '2.90', '>=')) {
                _e('Replace Header image with arbitrary HTML for this page only. Useful for slider shortcodes in place of image. FI as Header Image has priority over HTML replacement. This will work with [show_slider] or almost any other slider that supports a shortcode.', 'weaver-xtreme');
                ?>
	<textarea class="wvrx-edit" placeholder=" " name="_pp_header_image_html_text" rows=1 style="width: 95%"><?php 
                echo get_post_meta($post->ID, '_pp_header_image_html_text', true);
                ?>
</textarea>
<?php 
            }
            // new version
            ?>
</p>
<hr />

<div style="clear:both"></div>
<hr />
<p style="line-height:1.3em;">
<?php 
            echo '<strong>Per Page Code Insertion</strong>';
            weaverx_help_link('help.html#ExtraPP', 'Help for Extra Per Page Options');
            ?>
Weaver Xtreme Plus supports code and HTML insertion for some areas. To add code, manually define the specified
<em>Custom Field Name</em> and <em>Value</em>. Click the help ? for more details.
</p>

<?php 
        }
    }
    function wvrx_ts_post_extras()
    {
        global $post;
        $opts = get_option(apply_filters('weaverx_options', 'weaverx_settings'), array());
        // need to fetch Weaver Xtreme options
        if (!(current_user_can('edit_themes') || current_user_can('edit_theme_options') && !isset($opts['_hide_mu_admin_per']) || current_user_can('edit_pages') && !isset($opts['_hide_editor_per']) || current_user_can('edit_posts') && !isset($opts['_hide_author_per']))) {
            echo '<p>' . __('Weaver Xtreme Per Post Options not available for your User Role.', 'weaverx-theme-support') . '</p>';
            return;
            // don't show per post panel
        }
        ?>
<div style="line-height:150%;">
<p>
	<?php 
        echo '<strong>' . __('Per Post Options', 'weaverx-theme-support') . '</strong>';
        weaverx_help_link('help.html#PerPage', __('Help for Per Post Options', 'weaverx-theme-support'));
        echo '<span style="float:right;">(' . __('This Post\'s ID: ', 'weaverx-theme-support');
        the_ID();
        echo ')</span>';
        weaverx_html_br();
        _e('These settings let you control display of this individual post. Many of these options override global options set on the Weaver Xtreme admin tabs.', 'weaverx-theme-support');
        weaverx_html_br();
        wvrx_ts_page_checkbox('_pp_force_post_excerpt', __('Display post as excerpt', 'weaverx-theme-support'), 40);
        wvrx_ts_page_checkbox('_pp_force_post_full', __('Display as full post where normally excerpted', 'weaverx-theme-support'), 55, 1);
        wvrx_ts_page_checkbox('_pp_show_post_avatar', __('Show author avatar with post', 'weaverx-theme-support'), 40);
        wvrx_ts_page_checkbox('_show_post_bubble', __('Show the comment bubble', 'weaverx-theme-support'), 40, 1);
        wvrx_ts_page_checkbox('_pp_hide_post_format_label', __('Hide <em>Post Format</em> label', 'weaverx-theme-support'), 40);
        wvrx_ts_page_checkbox('_pp_hide_post_title', __('Hide post title', 'weaverx-theme-support'), 40, 1);
        wvrx_ts_page_checkbox('_pp_hide_top_post_meta', __('Hide top post info line', 'weaverx-theme-support'), 40);
        wvrx_ts_page_checkbox('_pp_hide_bottom_post_meta', __('Hide bottom post info line', 'weaverx-theme-support'), 40, 1);
        wvrx_ts_page_checkbox('_pp_masonry_span2', __('For <em>Masonry</em> multi-columns: make this post span two columns.', 'weaverx-theme-support'), 90, 1);
        wvrx_ts_page_checkbox('_pp_post_add_link', __('Show a "link to single page" icon at bottom of post - useful with compact posts', 'weaverx-theme-support'), 90);
        echo '<br style="clear:both;"/><br /><strong>Per Post Style</strong> (&starf;Plus)';
        weaverx_help_link('help.html#perpoststyle', __('Help for Per Post Style', 'weaverx-theme-support'));
        echo '<br />' . __('Weaver Xtreme Plus supports optional per post CSS style rules.', 'weaverx-theme-support');
        ?>
<br />
<br />
<p><strong><?php 
        _e('<em>Single Page View:</em> Sidebars', 'weaverx-theme-support');
        ?>
</strong></p>

<?php 
        wvrx_ts_page_layout('post');
        ?>
<br />
	<input type="text" size="4" id="_pp_category" name="_pp_sidebar_width"
	value="<?php 
        echo esc_textarea(get_post_meta($post->ID, "_pp_sidebar_width", true));
        ?>
" />
	<?php 
        _e("% &nbsp;- <em>Sidebar Width</em> - Post Single View Sidebar width (applies to all layouts)", 'weaverx-theme-support');
        ?>
 <br /><br />
<?php 
        wvrx_ts_page_checkbox('_pp_primary-widget-area', __('Hide Primary Sidebar, Single View', 'weaverx-theme-support'), 40);
        wvrx_ts_page_checkbox('_pp_secondary-widget-area', __('Hide Secondary Sidebar, Single View', 'weaverx-theme-support'), 40, 1);
        wvrx_ts_page_checkbox('_pp_sitewide-top-widget-area', __('Hide Sitewide Top Area, Single View', 'weaverx-theme-support'), 40);
        wvrx_ts_page_checkbox('_pp_sitewide-bottom-widget-area', __('Hide Sitewide Bottom Area, Single View', 'weaverx-theme-support'), 40, 1);
        wvrx_ts_page_checkbox('_pp_top-widget-area', __('Hide Blog Top Area, Single View', 'weaverx-theme-support'), 40);
        wvrx_ts_page_checkbox('_pp_bottom-widget-area', __('Hide Blog Bottom Area, Single View', 'weaverx-theme-support'), 40, 1);
        wvrx_ts_page_checkbox('_pp_header-widget-area', __('Hide Header Area, Single View', 'weaverx-theme-support'), 40);
        wvrx_ts_page_checkbox('_pp_footer-widget-area', __('Hide Footer Area, Single View', 'weaverx-theme-support'), 40, 1);
        ?>
</p>
<p><strong><?php 
        _e('<em>Single Page View:</em> Widget Area Replacements', 'weaverx-theme-support');
        ?>
</strong></p>
<p>
<?php 
        _e('Select extra widget areas to replace the default widget areas for <em>Single Page</em> view of this post.
To add areas to the widget area lists below, you <strong>must</strong> first define extra widget areas on the bottom of the <em>Main Options &rarr; Sidebars &amp; Layout</em> tab.', 'weaverx-theme-support');
        ?>
</p>
<?php 
        wvrx_ts_pp_replacement(__('Primary Sidebar', 'weaverx-theme-support'), 'primary-widget-area');
        wvrx_ts_pp_replacement(__('Secondary Sidebar', 'weaverx-theme-support'), 'secondary-widget-area');
        wvrx_ts_pp_replacement(__('Header Widget Area', 'weaverx-theme-support'), 'header-widget-area');
        wvrx_ts_pp_replacement(__('Footer Widget Area', 'weaverx-theme-support'), 'footer-widget-area');
        wvrx_ts_pp_replacement('Sitewide Top Widget Area', 'sitewide-top-widget-area');
        wvrx_ts_pp_replacement('Sitewide Bottom Widget Area', 'sitewide-bottom-widget-area');
        ?>
<br style="clear:both;" /><p><strong><?php 
        _e('<em>Single Page View:</em> Featured Image', 'weaverx-theme-support');
        ?>
</strong></p>
<?php 
        $opts3 = array('id' => '_pp_fi_location', 'info' => __('Override <em>Single Page</em> setting for where to display FI', 'weaverx-theme-support'), 'value' => array(array('val' => '', 'desc' => __('Default Single Page FI', 'weaverx-theme-support')), array('val' => 'content-top', 'desc' => __('With Content - top', 'weaverx-theme-support')), array('val' => 'content-bottom', 'desc' => __('With Content - bottom', 'weaverx-theme-support')), array('val' => 'title-before', 'desc' => __('Before Title', 'weaverx-theme-support')), array('val' => 'header-image', 'desc' => __('Header Image Replacement', 'weaverx-theme-support')), array('val' => 'post-before', 'desc' => __('Outside of Post', 'weaverx-theme-support')), array('val' => 'hide', 'desc' => __('Hide FI on Single Page', 'weaverx-theme-support'))));
        wvrx_ts_pp_select_id($opts3);
        ?>
<br />
<input type="text" size="30" id='_pp_fi_link' name='_pp_fi_link'
	value="<?php 
        echo esc_textarea(get_post_meta($post->ID, '_pp_fi_link', true));
        ?>
" />
	<?php 
        _e("<em>Featured Image Link</em> - Full URL for link from FI", 'weaverx-theme-support');
        ?>
	<br style="clear:both;" />
	</p><p>
	<strong><?php 
        _e('Post Editor Options', 'weaverx-theme-support');
        ?>
</strong>

<?php 
        wvrx_ts_page_checkbox('_pp_hide_visual_editor', __('Disable Visual Editor for this page. Useful if you enter simple HTML or other code.', 'weaverx-theme-support'), 90, 1);
        if (weaverx_allow_multisite()) {
            wvrx_ts_page_checkbox('_pp_raw_html', __('Allow Raw HTML and scripts. Disables auto paragraph, texturize, and other processing.', 'weaverx-theme-support'), 90, 1);
        }
        ?>
</p>
<p>
	<?php 
        echo '<strong>Post Format</strong>';
        weaverx_help_link('help.html#gallerypost', __('Help for Per Post Format', 'weaverx-theme-support'));
        weaverx_html_br();
        _e('Weaver Xtreme supports Post Formats. Click the ? for more info.', 'weaverx-theme-support');
        weaverx_html_br();
        weaverx_html_br();
        do_action('weaverxplus_add_per_post');
        ?>
</p>
	<input type='hidden' id='post_meta' name='post_meta' value='post_meta'/>
</div>
<?php 
    }