Exemplo n.º 1
0
function weaverii_post_extras()
{
    global $post;
    $opts = get_option(apply_filters('weaver_options', 'weaverii_settings'), array());
    // need to fetch weaver options
    if (!(current_user_can('edit_themes') || current_user_can('edit_theme_options') && !isset($opts['_wii_hide_mu_admin_per']) || current_user_can('edit_pages') && !isset($opts['_wii_hide_editor_per']) || current_user_can('edit_posts') && !isset($opts['_wii_hide_author_per']))) {
        echo '<p>Weaver II Per Post Options not available for your User Role.</p>';
        return;
        // don't show per post panel
    }
    ?>
<div style="line-height:150%;">
<p>
		<?php 
    echo "<strong>Per Post Options</strong>";
    weaverii_help_link('help.html#PerPage', weaverii_t_('Help for Per Post Options'));
    echo '<span style="float:right;">(This Post\'s ID: ';
    the_ID();
    echo ')</span>';
    weaverii_html_br();
    echo "These settings let you control display of this individual post. Many of these options override global options set on the Weaver II admin tabs.";
    weaverii_html_br();
    weaverii_page_checkbox('ttw-force-post-full', weaverii_t_('Display as full post where normally excerpted.'));
    weaverii_page_checkbox('ttw-force-post-excerpt', weaverii_t_('Display post as excerpt'), 1);
    weaverii_page_checkbox('ttw-show-featured', weaverii_t_('Show Featured Image with post'));
    // Can't add an option to hide featured in header per post because we don't know the post at header time.
    weaverii_page_checkbox('ttw-show-post-avatar', weaverii_t_('Show author avatar with post'));
    weaverii_page_checkbox('ttw-favorite-post', weaverii_t_('Mark as a favorite post (adds star to title)'), 1);
    weaverii_page_checkbox('hide_post_format_label', weaverii_t_('Hide <em>Post Format</em> label'));
    weaverii_page_checkbox('hide_post_title', weaverii_t_('Hide post title'));
    weaverii_page_checkbox('post_add_link', weaverii_t_('Show link to single page icon at bottom of post'), 1);
    weaverii_page_checkbox('hide_top_post_meta', weaverii_t_('Hide top post info line'));
    weaverii_page_checkbox('hide_bottom_post_meta', weaverii_t_('Hide bottom post info line'));
    weaverii_page_checkbox('hide_post_bubble', weaverii_t_('Hide the comment bubble'), 1);
    weaverii_page_checkbox('ttw_hide_sidebars', weaverii_t_('Hide Sidebars when this post displayed on Single Post page.'), 1);
    weaverii_page_checkbox('wvr_masonry_span2', weaverii_t_('For <em>Masonry</em> multi-columns: make this post span two columns. (&#9679;Pro only)'), 1);
    weaverii_page_checkbox('hide_visual_editor', weaverii_t_('Disable Visual Editor for this page. Useful if you enter simple HTML or other code.'), 1);
    if (weaverii_allow_multisite()) {
        weaverii_page_checkbox('wvr_raw_html', weaverii_t_('Allow Raw HTML and scripts. Disables auto paragraph, texturize, and other processing.'), 1);
    }
    ?>
</p>
<p>
		<?php 
    echo 'The above settings are not used by the [weaver_show_posts] shortcode.';
    ?>
<br />
		<?php 
    echo '<strong>Per Post Style</strong>';
    weaverii_help_link('help.html#perpoststyle', weaverii_t_('Help for Per Post Style'));
    ?>
 <br />
		<?php 
    echo "Enter optional per post CSS style rules. <strong>Do not</strong> include the &lt;style> and &lt;/style> tags.\n\t\t\tInclude the {}'s. Don't use class names if rules apply to whole post, but do include class names\n\t\t\t(e.g., <em>.entry-title a</em>) for specific elements. Custom styles will not be displayed by the Post Editor.";
    ?>
 <br />
		<textarea name="ttw_per_post_style" rows=2 style="width: 95%"><?php 
    echo get_post_meta($post->ID, "ttw_per_post_style", true);
    ?>
</textarea>
		<br>
Define a Custom Field called <em>postclass</em> to add a custom class name to the &lt;article&gt; section that wraps this post.
<br />
		<?php 
    echo '<strong>Post Format</strong>';
    weaverii_help_link('help.html#gallerypost', weaverii_t_('Help for Per Post Format'));
    weaverii_html_br();
    echo 'Weaver II supports Post Formats as shown in the "Format" option box to the right. Click the ? for more info.';
    weaverii_html_br();
    weaverii_html_br();
    echo '<em>Note:</em> when you add settings for the post here, values will be created and displayed in the "Custom Fields" box.';
    ?>
</p>
		<input type='hidden' id='wii_post_meta' name='wii_post_meta' value='wii_post_meta'/>
</div>
<?php 
}
Exemplo n.º 2
0
function weaveriip_per_post_opts()
{
    weaverii_html_br();
    weaverii_html_br();
    echo "<strong>Weaver II Pro Per Post Options</strong>";
    weaverii_html_br();
    weaverii_page_checkbox('wvpp_post_no_titlelink', weaverii_t_('Don\'t make this post\'s title a link.'));
}