Example #1
0
function weaverii_add_admin()
{
    // action definition
    /* adds our admin panel  (add_action: admin_menu) */
    // 'edit_theme_options' works for both single and multisite
    $page = add_theme_page('WeaverII', apply_filters('weaver_admin_title', '<span style="color:#D6B329;">&#9839;</span>' . WEAVERII_THEMENAME . ' ' . weaverii_t_('Admin')), 'edit_theme_options', 'WeaverII', 'weaverii_admin');
    /* using registered $page handle to hook stylesheet loading for this admin page */
    add_action('admin_print_styles-' . $page, 'weaverii_admin_scripts');
    if (weaverii_init_base()) {
        $page2 = add_theme_page('WeaverII_Shortcodes', '<span style="color:#D6B329;margin-left:3px;">&#9839;</span>' . weaverii_t_('Shortcodes + Pro'), 'edit_theme_options', 'WeaverII_Shortcodes', 'weaverii_admin_sc');
        /* using registered $page handle to hook stylesheet loading for this admin page */
        add_action('admin_print_styles-' . $page2, 'weaverii_admin_scripts');
    }
}
function weaverii_ex_set_current_to_serialized_values($contents)
{
    global $weaverii_opts_cache;
    // need to mess with the cache
    if (substr($contents, 0, 10) == 'W2T-V01.00') {
        $type = 'theme';
    } else {
        if (substr($contents, 0, 10) == 'W2B-V01.00') {
            $type = 'backup';
        } else {
            return weaverii_f_fail(weaverii_t_("Wrong theme file format version"));
        }
    }
    /* simple check for one of ours */
    $restore = array();
    $restore = unserialize(substr($contents, 10));
    if (!$restore) {
        return weaverii_f_fail("Unserialize failed - file likely corrupt.");
    }
    $version = weaverii_getopt('wii_version_id');
    // get something to force load
    if ($type == 'theme') {
        // need to clear some settings
        // first, pickup the per-site settings that aren't theme related...
        $new_cache = array();
        foreach ($weaverii_opts_cache as $key => $val) {
            if ($key[0] == '_') {
                // these are non-theme specific settings
                $new_cache[$key] = $val;
            }
            // keep
        }
        $opts = $restore['weaverii_base'];
        // fetch base opts
        weaverii_delete_all_options();
        foreach ($opts as $key => $val) {
            if ($key[0] != '_') {
                weaverii_setopt($key, $val, false);
            }
            // overwrite with saved theme values
        }
        foreach ($new_cache as $key => $val) {
            // set the values we need to keep
            weaverii_setopt($key, $val, false);
        }
    } else {
        if ($type == 'backup') {
            weaverii_delete_all_options();
            $opts = $restore['weaverii_base'];
            // fetch base opts
            foreach ($opts as $key => $val) {
                weaverii_setopt($key, $val, false);
                // overwrite with saved values
            }
            global $weaverii_pro_opts;
            $weaverii_pro_opts = false;
            $weaverii_pro_opts = $restore['weaverii_pro'];
            weaverii_wpupdate_option('weaverii_pro', $weaverii_pro_opts);
        }
    }
    weaverii_setopt('wii_version_id', $version);
    // keep version, force save of db
    weaverii_save_opts('loading theme');
    // OK, now we've saved the options, update them in the DB
    return true;
}
Example #3
0
function weaverii_mainopts_layout()
{
    $opts = array(array('type' => 'submit'), array('name' => 'Layout', 'id' => 'mainopts_layout', 'type' => 'header', 'info' => 'Settings for site layout: theme width and margins, sidebar layout, bg color flow', 'help' => 'help.html#layout'), array('name' => 'Theme Width', 'id' => 'wii_theme_width_int', 'type' => 'val_px', 'info' => 'Change Theme Width. Standard size is 940px. Header Image width is automatically changed, too. Does not include wrapper padding. Widths less than 650px will give unexpected results on mobile devices. (Uses CSS "max-width" to set width, which gives "flexible width" shrinking for displays smaller than the width specified.)'), array('name' => '<small>Theme Width Fixed</small>', 'id' => 'wii_theme_width_fixed', 'type' => '=checkbox', 'info' => 'Force the theme width to be fixed (use CSS "width" instead of "max-width"). Using this option is not recommended. This setting will also "break" the Mobile View, so you should disable Mobile Support as well.'), array('name' => 'Theme Margins: Top/Bottom', 'id' => 'wii_site_margins', 'type' => 'text_tb', 'info' => 'Top and bottom margins around whole site. (Default: 20px)'), array('name' => 'Theme Margins: Left/Right', 'id' => 'wii_site_margins', 'type' => 'text_lr', 'info' => 'Left and right margins around whole site. (Default: 20px)'), array('name' => 'Wrapper Padding', 'id' => 'wii_wrapper_padding', 'type' => 'val_px', 'info' => 'Wrapper Padding - space between wrapper edges and header, content, sidebars, footer. (Default: 10px)'), array('name' => 'Sidebar Layout', 'type' => 'subheader', 'info' => 'Sidebar Layout for each type of page'), array('name' => weaverii_t_('Blog, Post, Page Default'), 'id' => 'wii_layout_default', 'type' => 'select_id', 'info' => weaverii_t_('Select the default theme layout for blog, single post, and pages.'), 'value' => array(array('val' => 'right-1-col', 'desc' => 'Single column sidebar on Right'), array('val' => 'left-1-col', 'desc' => 'Single column sidebar on Left'), array('val' => 'right-2-col', 'desc' => 'Double Cols, Right (top wide)'), array('val' => 'left-2-col', 'desc' => 'Double Cols, Left (top wide)'), array('val' => 'right-2-col-bottom', 'desc' => 'Double Cols, Right (bottom wide)'), array('val' => 'left-2-col-bottom', 'desc' => 'Double Cols, Left (bottom wide)'), array('val' => 'split', 'desc' => 'Split - sidebars on Right and Left'), array('val' => 'one-column', 'desc' => 'No sidebars, one column content'))), array('name' => weaverii_t_('Archive-like Default'), 'id' => 'wii_layout_default_archive', 'type' => 'select_id', 'info' => weaverii_t_('Select the default theme layout for all other pages - archives, search, etc.'), 'value' => array(array('val' => 'one-column', 'desc' => 'No sidebars, one column content'), array('val' => 'right-1-col', 'desc' => 'Single column sidebar on Right'), array('val' => 'left-1-col', 'desc' => 'Single column sidebar on Left'), array('val' => 'right-2-col', 'desc' => 'Double Cols, Right (top wide)'), array('val' => 'left-2-col', 'desc' => 'Double Cols, Left (top wide)'), array('val' => 'right-2-col-bottom', 'desc' => 'Double Cols, Right (bottom wide)'), array('val' => 'left-2-col-bottom', 'desc' => 'Double Cols, Left (bottom wide)'), array('val' => 'split', 'desc' => 'Split - sidebars on Right and Left'))), array('name' => weaverii_t_('<small>Page</small>'), 'id' => 'wii_layout_page', 'type' => 'select_layout', 'info' => weaverii_t_('Layout for normal Pages on your site.'), 'value' => ''), array('name' => weaverii_t_('<small>Blog</small>'), 'id' => 'wii_layout_blog', 'type' => 'select_layout', 'info' => weaverii_t_('Layout for main blog page. Includes "Page with Posts" Page templates.'), 'value' => ''), array('name' => weaverii_t_('<small>Post Single Page</small>'), 'id' => 'wii_layout_single', 'type' => 'select_layout', 'info' => weaverii_t_('Layout for Posts displayed as a single page.'), 'value' => ''), array('name' => weaverii_t_('<small>Archive</small>'), 'id' => 'wii_layout_archive', 'type' => '+select_layout', 'info' => weaverii_t_('Layout for archive pages on your site. Used for all archive-like pages unless otherwise specified. (&#9679;Pro)'), 'value' => ''), array('name' => weaverii_t_('<small>Category Archive</small>'), 'id' => 'wii_layout_category', 'type' => '+select_layout', 'info' => weaverii_t_('Layout for category archive pages. (&#9679;Pro)'), 'value' => ''), array('name' => weaverii_t_('<small>Tags Archive</small>'), 'id' => 'wii_layout_tag', 'type' => '+select_layout', 'info' => weaverii_t_('Layout for tag archive pages. (&#9679;Pro)'), 'value' => ''), array('name' => weaverii_t_('<small>Author Archive</small>'), 'id' => 'wii_layout_author', 'type' => '+select_layout', 'info' => weaverii_t_('Layout for author archive pages. (&#9679;Pro)'), 'value' => ''), array('name' => weaverii_t_('<small>Search Results, 404</small>'), 'id' => 'wii_layout_search', 'type' => '+select_layout', 'info' => weaverii_t_('Layout for search results and 404 pages. (&#9679;Pro)'), 'value' => ''), array('name' => weaverii_t_('<small>Attachments</small>'), 'id' => 'wii_layout_image', 'type' => '+select_layout', 'info' => weaverii_t_('Layout for attachment pages such as images. (&#9679;Pro)'), 'value' => ''), array('name' => weaverii_t_('Container & Sidebar Color Flow'), 'id' => 'wii_layout_image', 'type' => '=subheader', 'info' => weaverii_t_('Allow color to flow to bottom')), array('name' => 'Flow color to bottom', 'id' => 'wvr_flow_to_bottom', 'type' => '+checkbox', 'info' => 'If checked, Container and Sidebar Wrappers bg colors will flow to bottom of each area
(that is, equal heights). You must provide background colors for the Container and Sidebar Wrapper
properties below or the default bg color will be used. <strong style="color:red">IMPORTANT NOTICE!</strong>
Equal color height will not be maintained on pages with content that changes height dynamically (e.g., show/hide, widgets that resize). Flow color is not used or needed on mobile devices. (&#9679;Pro)'), array('name' => weaverii_t_('Container Wrapper Properties'), 'id' => 'wii_layout_image', 'type' => '=subheader', 'info' => weaverii_t_('Background, and Column Color Flow of Container wrapper')), array('name' => 'Background', 'id' => 'sb_container_bgcolor', 'type' => '+ctext', 'info' => 'Background color of content area wrapper - most useful when flowing color to bottom (&#9679;Pro)'), array('name' => 'Note:', 'type' => '=note', 'info' => 'Width of container automatically calculated based on sidebar widths.
CAUTION: Using CSS+ to add borders or other width changes to the container or sidebar wrappers can break sidebar layout.'), array('type' => '=submit'), array('name' => weaverii_t_('Sidebar Wrappers Properties'), 'id' => 'wii_layout_image', 'type' => '=subheader', 'info' => weaverii_t_('Widths, Background, and Column Color Flow of Sidebars')), array('name' => 'Default Width for Sidebars', 'id' => 'sb_default_width_int', 'type' => '=val_percent', 'info' => 'If specified, will override all default sidebar widths specified below. This is mostly used for compatibility with the previous version of Weaver.'), array('name' => 'Right Side, One Column', 'type' => '=subheader_alt', 'info' => 'Wrapper area for Single column sidebar on Right (Top+Upper+Lower Widget Areas)'), array('name' => 'Sidebar Width', 'id' => 'sb_right_1_col_width_int', 'type' => '+val_percent', 'info' => 'Width of sidebar (Default: 25%) (&#9679;Pro)'), array('name' => 'Background', 'id' => 'sb_right_1_col_bgcolor', 'type' => '+ctext', 'info' => 'Background color of sidebar wrapper (&#9679;Pro)'), array('name' => 'Left Side, One Column', 'type' => '=subheader_alt', 'info' => 'Wrapper area for Single column sidebar on Left (Top+Upper+Lower Widget Areas)'), array('name' => 'Sidebar Width', 'id' => 'sb_left_1_col_width_int', 'type' => '+val_percent', 'info' => 'Width of sidebar (Default: 25%) (&#9679;Pro)'), array('name' => 'Background', 'id' => 'sb_left_1_col_bgcolor', 'type' => '+ctext', 'info' => 'Background color of sidebar wrapper. (&#9679;Pro)'), array('name' => 'Right Side, Two Column', 'type' => '=subheader_alt', 'info' => 'Wrapper area for Double column sidebar on Right (Top above Left+Right Widget Areas)'), array('name' => 'Sidebar Width', 'id' => 'sb_right_2_col_width_int', 'type' => '+val_percent', 'info' => 'Width of sidebar (Primary/Top Widget Area is this width) (Default: 33%) (&#9679;Pro)'), array('name' => 'Background', 'id' => 'sb_right_2_col_bgcolor', 'type' => '+ctext', 'info' => 'Background color of sidebar wrapper (&#9679;Pro)'), array('name' => 'Left Side, Two Column', 'type' => '=subheader_alt', 'info' => 'Wrapper area for Double column sidebar on Left (Top above Left+Right Widget Areas)'), array('name' => 'Sidebar Width', 'id' => 'sb_left_2_col_width_int', 'type' => '+val_percent', 'info' => 'Width of sidebar (Primary/Top Widget Area is this width) (Default: 33%) (&#9679;Pro)'), array('name' => 'Background', 'id' => 'sb_left_2_col_bgcolor', 'type' => '+ctext', 'info' => 'Background color of sidebar wrapper (&#9679;Pro)'), array('name' => 'Two Column - Left/Right', 'type' => '=subheader_alt', 'info' => 'The Left and Right sidebars under the Primary (top) area in Double column sidebars.'), array('name' => 'Left Width', 'id' => 'sb_2_left_area_int', 'type' => '+val_percent', 'info' => 'Left Width as % of double sidebar area width (Right set automatically) (Default: 55%) (&#9679;Pro)'), array('name' => 'Split Sidebars', 'type' => '=subheader_alt', 'info' => 'Wrapper area for Split sidebars - Left side and Right side (Top above Right)'), array('name' => 'Sidebar Width - Left', 'id' => 'sb_split_left_width_int', 'type' => '+val_percent', 'info' => 'Width of Left Side sidebar (Default: 17%) (&#9679;Pro)'), array('name' => 'Sidebar Width - Right', 'id' => 'sb_split_right_width_int', 'type' => '+val_percent', 'info' => 'Width of Right Side sidebar (Default: 17%) (&#9679;Pro)'), array('name' => 'Background - Left', 'id' => 'sb_split_left_bgcolor', 'type' => '+ctext', 'info' => 'Background color of left split sidebar wrapper (&#9679;Pro)'), array('name' => 'Background - Right', 'id' => 'sb_split_right_bgcolor', 'type' => '+ctext', 'info' => 'Background color of right split sidebar wrapper (&#9679;Pro)'));
    ?>
<p>
	Settings affecting overall <strong>Site Layout</strong>. This includes <strong>Widths</strong>, <strong>Margins</strong>,
	<strong>Sidebar Layout</strong>, and <strong>Background</strong> colors of major layout regions.
</p>
<?php 
    weaverii_form_show_options($opts);
}
Example #4
0
 function Weaverii_Widget_Login()
 {
     $widget_ops = array('classname' => 'weaverii_widget_login', 'description' => __("Log in/out, admin", 'weaver-ii'));
     $this->WP_Widget('weaverii_login', weaverii_t_('Weaver II Login'), $widget_ops);
 }
function weaverii_process_options_admin_standard()
{
    if (weaverii_submitted('reset_weaverii')) {
        if (!current_user_can('edit_theme_options')) {
            return;
        }
        // delete everything!
        weaverii_save_msg(weaverii_t_('All Weaver II settings have been reset to the defaults.', 'weaver-ii'));
        delete_option(apply_filters('weaver_options', 'weaverii_settings'));
        global $weaverii_opts_cache;
        $weaverii_opts_cache = false;
        // clear the cache
        weaveriip_clear_opts();
        weaverii_init_opts('reset_weaverii');
        update_user_meta(get_current_user_id(), 'tgmpa_dismissed_notice', 0);
        // reset the dismiss on the plugin loader
    }
    if (weaverii_submitted('uploadtheme') && isset($_POST['uploadit']) && $_POST['uploadit'] == 'yes') {
        weaverii_uploadit();
    }
    if (weaverii_submitted('check_weaver')) {
        // perform weaver check
        require_once 'check-theme.php';
        // include check code now
        weaverii_perform_check();
    }
    if (weaverii_submitted('weaver_hideopts')) {
        weaverii_save_msg(weaverii_t_('Now showing more/fewer options.', 'weaver-ii'));
    }
}
Example #6
0
function weaverii_admin_help()
{
    $tdir = get_template_directory_uri();
    $readme = $tdir . "/help/help.html";
    ?>
	<span style="font-size:larger;font-weight:bold;padding-right:70px;">Weaver II Help</span>

<small><strong>Media Library Picker Tool:</strong></small>&nbsp;<input name="wii_media_url" type="text" style="width:400px;height:22px;" class="regular-text" name="wii_media_url"
				id="wii_media_url" value="Paste media URL here that you can then Copy/Paste elsewhere." />
				<?php 
    weaverii_media_lib_button('wii_media_url');
    ?>
	<p>You will notice
	<?php 
    weaverii_help_link('help.html#top', weaverii_t_('Weaver II Help'));
    ?>
	next to many options and option sections on the Weaver Admin tabs. Clicking the ? will open the Weaver Help
	file to the appropriate place.</p>

	<p>More help is available at the <?php 
    weaverii_site();
    ?>
<strong>Weaver Theme web site</strong></a>, which includes
	a support forum.</p>
<?php 
    do_action('weaverii_child_help');
    ?>
<div style="float:left;width:40%;padding-right:3%">
<?php 
    echo "<div class=\"wvr-help\"><h2><b><a href=\"{$readme}\" target=\"_blank\">Weaver II Theme Documentation</a></b></h2>\n<h3>Table of Contents</h3>\n\t  <ul>\n\t  <li><a href=\"{$readme}#get_started\" target=\"_blank\">How to get started</a></li>\n\t  <li><a href=\"{$readme}#DesignHints\" target=\"_blank\">Design Hints</a></li>\n\t  <li><a href=\"{$readme}#homepage\" target=\"_blank\">All About Your Site's Home Page</a></li>\n\t  <li><a href=\"{$readme}#PredefinedThemes\" target=\"_blank\">Weaver Predefined Subthemes</a></li>\n\t  <li><a href=\"{$readme}#MainOptions\" target=\"_blank\">Weaver Main Options</a>\n\t\t<ul>\n\t\t  <li><a href=\"{$readme}#GenApp\" target=\"_blank\">General Appearance</a></li>\n\t\t  <li><a href=\"{$readme}#layout\" target=\"_blank\">Layout</a></li>\n\t\t  <li><a href=\"{$readme}#WidgetAreas\" target=\"_blank\">Widget Areas</a></li>\n\t\t  <li><a href=\"{$readme}#HeaderOpt\" target=\"_blank\">Header Options</a></li>\n\t\t  <li><a href=\"{$readme}#HeaderWidgetArea\" target=\"_blank\">Header Horizontal Widget Area</a></li>\n\t\t  <li><a href=\"{$readme}#MenuBar\" target=\"_blank\">Menu Bar and Info Bar</a></li>\n\t\t  <li><a href=\"{$readme}#Links\" target=\"_blank\">Links</a></li>\n\t\t  <li><a href=\"{$readme}#ContentAreas\" target=\"_blank\">Content Areas</a></li>\n\t\t  <li><a href=\"{$readme}#PPSpecifics\" target=\"_blank\">Post Specifics</a></li>\n\t\t  <ul>\n\t\t\t<li><a href=\"{$readme}#FeaturedImage\" target=\"_blank\">The Featured Image</a></li>\n\t\t\t<li><a href=\"{$readme}#CustomInfo\" target=\"_blank\">Custom Post Info Lines</a></li>\n\t\t  </ul>\n\t\t  <li><a href=\"{$readme}#FooterOpt\" target=\"_blank\">Footer</a></li>\n\t\t  <li><a href=\"{$readme}#Fonts\" target=\"_blank\">Fonts</a></li>\n\t\t</ul>\n\t  </li>\n\t  <li><a href=\"{$readme}#AdvancedOptions\" target=\"_blank\">Weaver Advanced Options</a>\n\t  <ul>\n\t  <li><a href=\"{$readme}#HeadSection\" target=\"_blank\">Site\n\t\t  &lt;HEAD&gt;\nSection</a></li>\n\t  <li><a href=\"{$readme}#HTMLInsertion\" target=\"_blank\">HTML Code Insertion Areas</a></li>\n\t  <li><a href=\"{$readme}#pageTemplateOptions\" target=\"_blank\">Page Templates</a></li>\n\t  <li><a href=\"{$readme}#ArchivePages\" target=\"_blank\">Archive-type Pages</a></li>\n\t  <li><a href=\"{$readme}#BackgroundImages\" target=\"_blank\">Background images</a></li>\n\t  <li><a href=\"{$readme}#Mobile\" target=\"_blank\">Mobile</a></li>\n\t  <li><a href=\"{$readme}#SEO\" target=\"_blank\">SEO</a></li>\n\t  <li><a href=\"{$readme}#AdvSiteOptions\" target=\"_blank\">Site Options</a></li>\n\t  </ul>\n\t  </li>\n\t  <li><a href=\"{$readme}#AdminOptions\" target=\"_blank\">Admin Options</a></li>\n\t  <li><a href=\"{$readme}#WeaverIIPro\" target=\"_blank\">Weaver II Pro</a></li>\n\t  <li><a href=\"{$readme}#ProShortcodes\" target=\"_blank\">Shortcodes</a></li>\n\t  <li><a href=\"{$readme}#SaveRestore\" target=\"_blank\">Save/Restore Themes</a></li>\n\t  <li><a href=\"{$readme}#PageTemplates\" target=\"_blank\">Weaver Page Templates</a></li>\n\t  <ul>\n\t\t<li><a href=\"{$readme}#PerPostTemplate\" target=\"_blank\">Settings for \"Page with Posts\" Template</a></li>\n\t  </ul>\n\t  <li><a href=\"{$readme}#editstyling\" target=\"_blank\">Post/Page Editor Styling</a>\n\t  <li><a href=\"{$readme}#raw_html\" target=\"_blank\">Entering Raw HTML and Scripts </a>\n\t  <li><a href=\"{$readme}#post_formats\" target=\"_blank\">Post Formats </a>\n\t  <li><a href=\"{$readme}#PerPage\" target=\"_blank\">Per Page and Per Post Options</a>\n\t\t<ul>\n\t\t  <li><a href=\"{$readme}#perpoststyle\" target=\"_blank\">Per Post Style</a></li>\n\t\t  <li><a href=\"{$readme}#shortcodes\" target=\"_blank\">Weaver Shortcodes</a></li>\n\t\t  <ul>\n\t\t\t\t<li><a href=\"{$readme}#breadcrumbs\" target=\"_blank\">[weaver_breadcrumbs]</a></li>\n\t\t\t\t<li><a href=\"{$readme}#headerimage\" target=\"_blank\">[weaver_header_image]</a></li>\n\t\t\t\t<li><a href=\"{$readme}#schtml\" target=\"_blank\">[weaver_html]</a></li>\n\t\t\t\t<li><a href=\"{$readme}#scdiv\" target=\"_blank\">[div]</a></li>\n\t\t\t\t<li><a href=\"{$readme}#sciframe\" target=\"_blank\">[weaver_iframe]</a></li>\n\t\t\t\t<li><a href=\"{$readme}#pagenav\" target=\"_blank\">[weaver_pagenav]</a></li>\n\t\t\t\t<li><a href=\"{$readme}#showhidemobile\" target=\"_blank\">[weaver_show_if_mobile] / [weaver_hide_if_mobile]</a></li>\n\t\t\t\t<li><a href=\"{$readme}#showhideloggedin\" target=\"_blank\">[weaver_show_if_logged_in] / [weaver_hide_if_logged_in]</a></li>\n\t\t\t\t<li><a href=\"{$readme}#showposts\" target=\"_blank\">[weaver_show_posts]</a></li>\n\t\t\t\t<li><a href=\"{$readme}#sitetitlesc\" target=\"_blank\">[weaver_site_desc]</a></li>\n\t\t\t\t<li><a href=\"{$readme}#video\" target=\"_blank\">[weaver_vimeo], [weaver_youtube]</a></li>\n\t\t  </ul>\n\t\t</ul>\n\t  <li><a href=\"{$readme}#CustomMenus\" target=\"_blank\">Custom Menus</a></li>\n\t  <li><a href=\"{$readme}#plugins\" target=\"_blank\">Built-in Support for Other Plugins</a></li>\n\t  <li><a href=\"{$readme}#quickcache\" target=\"_blank\">Compatible Caching Plugins</a></li>\n\t  <li><a href=\"{$readme}#language_support\" target=\"_blank\">Using Weaver in your language</a></li>\n\t  <li><a href=\"{$readme}#ie\" target=\"_blank\">Internet Explorer Compatibility</a></li>\n\t  <li><a href=\"{$readme}#TechNotes\" target=\"_blank\">Technical Notes</a></li>\n\t  <li><a href=\"{$readme}#divhierarchy\" target=\"_blank\">Weaver HTML&lt;div&gt;Hierarchy</a></li>\n\t  <li><a href=\"{$readme}#Version1_0\" target=\"_blank\">Release Notes</a></li>\n\t  <li><a href=\"{$readme}#UpgradingWeaver\" target=\"_blank\">Upgrading from Weaver</a>\n\t  <ul>\n\t  <li><a href=\"{$readme}#oldnewdiff\" target=\"_blank\">Differences between Weaver and Weaver II</a></li>\n\t<li><a href=\"{$readme}#conversion\" target=\"_blank\">The Conversion Process</a></li>\n\t<li><a href=\"{$readme}#newsidebars\" target=\"_blank\">The New Sidebars</a></li>\n\t<li><a href=\"{$readme}#converttemplates\" target=\"_blank\">Converting Page Templates</a></li>\n\t  </ul>\n\t  </li>\n\t</ul></div>\n";
    ?>
</div>
<div style="float:left;width:42%;padding-right:1%">
	<h2><b><a href="<?php 
    echo $tdir . '/help/css-help.html';
    ?>
" target="blank">CSS HELP</a></b></h2>
	<p>A short CSS Tutorial</p>
	<h2><b><a href="<?php 
    echo $tdir . '/help/weaverii_snippets.html';
    ?>
" target="blank">SNIPPETS</a></b></h2>
	<p><strong>CSS Snippets for styling your Weaver II theme</strong>
	<ul>
  <li>Change Any Font Size</li>
  <li>Change the Comment Bubble</li>
  <li>Change Margins of Footer Widget Areas</li>
  <li>When you make the Footer (#colophon) Last</li>
  <li>Hide Divider Lines on Vertical Menu</li>
  <li>Post Information Line Icons</li>
  <li>Alternate Menu Bar Gradient</li>
  <li>Styling Menus</li>
</ul>
<p style="font-size:8px">Versions: Weaver II V <?php 
    echo weaverii_getopt('wii_version_id');
    ?>
 | Settings: <?php 
    echo weaverii_getopt('wii_style_version');
    ?>
 | Saved Settings: <?php 
    echo (int) weaverii_getopt('wii_saved_settings');
    ?>
</p>
</div>


<div style="clear:both;"></div>

<?php 
}
 function weaveriip_Widget_Social()
 {
     $widget_ops = array('classname' => 'weaveriip_social', 'description' => weaverii_t_('Display Social Buttons as set in Weaver II Pro Social Shortcode Settings.'));
     parent::__construct('weaveriip_social', weaverii_t_('Weaver II Pro Social Buttons'), $widget_ops);
 }
    function form($instance)
    {
        $title = isset($instance['title']) ? $instance['title'] : '';
        $nav_menu = isset($instance['nav_menu']) ? $instance['nav_menu'] : '';
        $menu_style = isset($instance['menu_style']) ? $instance['menu_style'] : '';
        // Get menus
        $menus = get_terms('nav_menu', array('hide_empty' => false));
        $styles = array('Vertical' => 'vertical', 'Pop Out to Left' => 'left', 'Pop Out to Right' => 'right', 'Horizontal' => 'horizontal');
        // If no menus exists, direct the user to go and create some.
        if (!$menus) {
            echo '<p>' . sprintf(weaverii_t_('No menus have been created yet. <a href="%s">Create some</a>.'), admin_url('nav-menus.php')) . '</p>';
            return;
        }
        ?>
		<p>
		<label for="<?php 
        echo $this->get_field_id('title');
        ?>
"><?php 
        echo 'Title:';
        ?>
</label>
		<input type="text" class="widefat" id="<?php 
        echo $this->get_field_id('title');
        ?>
" name="<?php 
        echo $this->get_field_name('title');
        ?>
" value="<?php 
        weaverii_esc_textarea($title);
        ?>
" />
		</p>
		<p>
		<label for="<?php 
        echo $this->get_field_id('nav_menu');
        ?>
"><?php 
        echo 'Select Menu:';
        ?>
</label>
		<select id="<?php 
        echo $this->get_field_id('nav_menu');
        ?>
" name="<?php 
        echo $this->get_field_name('nav_menu');
        ?>
">
<?php 
        foreach ($menus as $menu) {
            $selected = $nav_menu == $menu->term_id ? ' selected="selected"' : '';
            echo '<option' . $selected . ' value="' . $menu->term_id . '">' . $menu->name . '</option>';
        }
        ?>
		</select>
		</p>
		<p>
		<label for="<?php 
        echo $this->get_field_id('menu_style');
        ?>
"><?php 
        echo 'Select Menu Style:';
        ?>
</label>
		<select id="<?php 
        echo $this->get_field_id('menu_style');
        ?>
" name="<?php 
        echo $this->get_field_name('menu_style');
        ?>
">
<?php 
        foreach ($styles as $style => $val) {
            $selected = $menu_style == $val ? ' selected="selected"' : '';
            echo '<option' . $selected . ' value="' . $val . '">' . $style . '</option>';
        }
        ?>
		</select>
		</p>
<?php 
    }
function weaverii_admin_advancedopts()
{
    ?>
<div id="tabwrap_adv" style="padding-left:5px;">
	<div id="tab-container-adv" class='yetiisub'>
		<ul id="tab-container-adv-nav" class='yetiisub'>
<?php 
    if (weaverii_allow_multisite()) {
        ?>
			<li><a href="#adtab0" title="Insert custom HTML, scripts, and CSS into &lt;HEAD&gt; section."><?php 
        echo weaverii_t_('&lt;HEAD&gt; Section');
        ?>
</a></li>
			<li><a href="#adtab1" title="Insert custom HTML into several different page areas."><?php 
        echo weaverii_t_('HTML Insertion');
        ?>
</a></li>
<?php 
    }
    ?>
			<li><a href="#adtab2" title="Information for Weaver's Page Templates"><?php 
    echo weaverii_t_('Page Templates');
    ?>
</a></li>
			<li><a href="#adtab4" title="Options to control display properties of archive pages."><?php 
    echo weaverii_t_('Archive-type Pages');
    ?>
</a></li>
			<li><a href="#bkimg" title="Add background images to page areas."><?php 
    echo weaverii_t_('Background Images');
    ?>
</a></li>
			<li><a href="#oseo" title="Set options related to SEO"><?php 
    echo weaverii_t_('SEO');
    ?>
</a></li>
			<li><a href="#adtab3" title="Options related to this site: FavIcon, Home Page, more."><?php 
    echo weaverii_t_('Site Options');
    ?>
</a></li>

		</ul>
<h3>Advanced Options<?php 
    weaverii_help_link('help.html#AdvancedOptions', 'Help for Advanced Options');
    ?>
</h3>

<?php 
    weaverii_sapi_submit('', '<br /><br />');
    ?>

<!-- ***************************************************** -->
<?php 
    if (weaverii_allow_multisite()) {
        ?>
<div id="adtab0" class="tab_adv" >
	<?php 
        weaverii_adv_head_section();
        ?>
</div> <!-- adtab 0 -->

<!-- ***************************************************** -->

<div id="adtab1" class="tab_adv" >
	<?php 
        weaverii_adv_html_insert();
        ?>
</div> <!-- adtab1 -->
<?php 
    }
    // end of major section of not allowed on multisite
    ?>

<!-- ***************************************************** -->
<div id="adtab2" class="tab_adv" >
	<?php 
    weaverii_adv_page_template();
    ?>
</div> <!-- adtab2 -->

<!-- ***************************************************** -->
<div id="adtab4" class="tab_adv" >
	<?php 
    weaverii_adv_archive_pages();
    ?>
</div> <!-- archive pages -->

<!-- ***************************************************** -->
<div id="bgimg" class="tab_adv" >
	<?php 
    weaverii_adv_bgimages();
    ?>
</div> <!-- total css -->

<!-- ***************************************************** -->
<div id="oseo" class="tab_adv" >
	<?php 
    weaverii_adv_seo_opts();
    ?>
</div> <!-- SEO -->

<!-- ***************************************************** -->
<div id="adtab3" class="tab_adv" >
	<?php 
    weaverii_adv_site_opts();
    ?>
</div> <!-- site options -->

</div> <!-- tab-container-adv -->
<?php 
    weaverii_sapi_submit();
    ?>
</div> <!-- #tabwrap_adv-->

<script type="text/javascript">
		var tabberAdv = new Yetii({
		id: 'tab-container-adv',
		tabclass: 'tab_adv',
		persist: true
		});
</script>
<?php 
}
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 
}
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.'));
}
Example #12
0
function weaverii_process_options_themes()
{
    if (weaverii_submitted('set_subtheme')) {
        // invoked from Weaver II Subhemes tab (this file)
        if (isset($_POST['wii_theme_picked'])) {
            $theme = weaverii_filter_textarea($_POST['wii_theme_picked']);
            if (weaverii_activate_subtheme($theme)) {
                weaverii_save_msg(weaverii_t_("Subtheme Selected: ") . $theme);
            } else {
                weaverii_save_msg(weaverii_t_("Invalid Subtheme file detected. Your installation of Weaver II may be broken."));
            }
        } else {
            weaverii_save_msg(weaverii_t_("Please select a subtheme."));
        }
    }
    if (weaverii_submitted('save_mytheme')) {
        // invoked from Save/Restore tab
        weaverii_save_msg(weaverii_t_("Current settings saved in WordPress database."));
        weaverii_settings_db_backup();
        return;
    }
    if (weaverii_submitted('restore_mytheme')) {
        // invoked from Save/Restore tab
        weaverii_settings_db_restore();
        weaverii_save_msg(weaverii_t_("Current settings restored from WordPress database."));
        return;
    }
    if (weaverii_submitted('hide_thumbs')) {
        $hide = weaverii_getopt('_wii_hide_theme_thumbs');
        weaverii_setopt('_wii_hide_theme_thumbs', !$hide);
    }
    if (weaverii_submitted('save_options')) {
        echo '@@@@@@ SAVE OPTIONS @@@@@';
    }
}
Example #13
0
function weaverii_do_admin()
{
    /* theme admin page */
    /* < ?php if (weaverii_init_base()) echo " &mdash; <small style='color:red;'>Beta version expires 09/30/2013</small>"; ? > */
    /* This generates the startup script calls, etc, for the admin page */
    global $weaverii_opts_cache, $weaverii_main_options, $weaverii_main_opts_list;
    if (!current_user_can('edit_theme_options')) {
        wp_die("No permission to access that page.");
    }
    weaverii_admin_page_process_options();
    // Process non-sapi options
    if (weaverii_getopt('wii_subtheme') == 'none') {
        weaverii_activate_subtheme('antique-ivory');
    }
    // first time run, so we gotta load the theme
    echo '<div class="wrap">';
    screen_icon("themes");
    /* add a nice icon to the admin page */
    ?>
<div style="float:left;"><h2><?php 
    echo WEAVERII_THEMEVERSION;
    ?>
 Options
<?php 
    if (is_child_theme()) {
        echo " &mdash; " . wp_get_theme();
    }
    ?>
</h2>
	<a name="top_main" id="top_main"></a></div>
<?php 
    weaverii_donate_button();
    weaverii_check_theme();
    weaverii_clear_messages();
    ?>

<div style="clear:both;">

<?php 
    weaverii_check_for_old_weaver();
    weaverii_check_version();
    // check version RSS
    ?>

<div id="tabwrap">
  <div id="tab-admin" class='yetii'>
	<ul id="tab-admin-nav" class='yetii'>
	  <li><a href="#tab_themes" title="Select from pre-defined subthemes"><?php 
    echo weaverii_t_('Weaver II Subthemes');
    ?>
</a></li>
	  <li><a href="#tab_main" title="Main options for most theme elements: site appearance, layout, header, menus, content, footer, fonts, more."><?php 
    echo weaverii_t_('Main Options');
    ?>
</a></li>
	  <li><a href="#tab_mobileopts" title="Options for Mobile View display."><?php 
    echo weaverii_t_('Mobile');
    ?>
</a></li>
	  <li><a href="#tab_advanced" title="Advanced options: HTML, code, CSS insertion; page templates, background images, SEO, site options."><?php 
    echo weaverii_t_('Advanced Options');
    ?>
</a></li>
	  <li><a href="#tab_admin" title="Basic Administrative Options."><?php 
    echo weaverii_t_('Admin Options');
    ?>
</a></li>
	  <li><a href="#tab_pro" title="Settings for Weaver II Pro edition: tools, activate plugins and features."><?php 
    echo weaverii_t_('Weaver II Pro');
    ?>
</a></li>
	  <li><a href="#tab_shortcodes" title="Weaver and Weaver Pro Shortcodes."><?php 
    echo weaverii_t_('Shortcodes/Plugins');
    ?>
</a></li>
	  <li><a href="#tab_saverestore" title="Save and Restore theme settings."><?php 
    echo weaverii_t_('Save/Restore');
    ?>
</a></li>
	  <li><a href="#tab_help" title="Table of Content links to Weaver Help files"><?php 
    echo weaverii_t_('Help');
    ?>
</a></li>
	</ul>

<?php 
    //  list is order specific - above and below must match
    ?>

	  <div id="tab_themes" class="tab" >
<?php 
    weaverii_admin_subthemes();
    ?>
	  </div>
<?php 
    // ====================== Begin the big form here =====================
    weaverii_sapi_form_top('weaverii_settings_group', 'weaverii_options_form');
    ?>
	  <div id="tab_main" class="tab" >
<?php 
    weaverii_admin_mainopts();
    ?>
	  </div>

	  <div id="tab_mobileopts" class="tab" >
<?php 
    weaverii_admin_mobileopts();
    ?>
	  </div>

	  <div id="tab_advanced" class="tab" >
<?php 
    weaverii_admin_advancedopts();
    ?>
	  </div>

	  <div id="tab_admin" class="tab" >
<?php 
    weaverii_admin_admin();
    ?>
	  </div>

	  <div id="tab_pro" class="tab" >
<?php 
    weaverii_admin_pro();
    ?>
	  </div>

<?php 
    weaverii_sapi_form_bottom();
    // end of SAPI opts here. Can't cross <div>s! Non-sapi forms follow
    // ===================== end of big form  =====================
    ?>
	<div id="tab_shortcodes" class="tab" >
<?php 
    if (weaverii_init_base()) {
        ?>
<h2 style="color:blue;">Weaver II Theme Shortcodes</h2>
<br /><p><a href="<?php 
        echo site_url('/wp-admin/themes.php?page=WeaverII_Shortcodes');
        ?>
">
<span style="color:white;background:#57A;padding:4px;font-weight:bold;">Open Shortcodes Admin</span></a></p>
<br /><p>Settings and information about Weaver II  and Weaver II Pro Shortcodes are found on the
<a href="<?php 
        echo site_url('/wp-admin/themes.php?page=WeaverII_Shortcodes');
        ?>
"><em>Appearance&rarr;Shortcodes + Pro</em></a>
menu found at the left.
</p>
<?php 
    } else {
        if (function_exists('weaverii_extras_shortcodes_installed')) {
            // WEAVER II THEME EXTRAS
            do_action('weaverii_extras_info');
        } else {
            // NEED TO INSTALL EXTRAS
            ?>
<h2 style="color:blue;">Weaver II Theme Extras and Shortcodes</h2>

<h3 style="color:red;">FOR COMPLETE WEAVER II THEME FUNCTIONALITY, PLEASE INSTALL AND ACTIVATE THE <em>WEAVER II THEME EXTRAS</em> PLUGIN.</h3>

<hr />
<p style="font-weight:bold;">The <em>Weaver II Theme Extras</em> plugin provides extra theme functionality, including the capability to upload premium add-on subthemes, and the following shortcodes:</p>
<ul>
	<li><span style="color:red;font-weight:bold;">Show Posts - [weaver_show_posts]</span> - This shortcode allows you to display posts on any page or text
	area, and provides extensive fitering options. A perfect companion for the Page with Posts template.
	This shortcode is an essential part of building sites with Weaver II.</li>
	<li>Breadcrumbs - [weaver_breadcrumbs]</li>
	<li>Header Image - [weaver_header_image]</li>
	<li>HTML - [weaver_html]</li>
	<li>DIV - [div]text[/div]</li>
	<li>SPAN - [span]text[/span]</li>
	<li>iFrame - [weaver_iframe]</li>
	<li>Blog Page Navigation - [weaver_pagenav] </li>
	<li>Show If Mobile - [weaver_show_if_mobile] </li>
	<li>Hide If Mobile - [weaver_hide_if_mobile]</li>
	<li>Show If Logged In - [weaver_show_if_logged_in] </li>
	<li>Hide If Logged In - [weaver_hide_if_logged_in]</li>
	<li>Site Title - [weaver_site_title]</li>
	<li>Site Tagline - [weaver_site_desc]</li>
	<li>Vimeo - [weaver_vimeo] </li>
	<li>YouTube - [weaver_youtube] </li>
</ul>

<hr />
<h2 style="color:blue;">Weaver II Pro Shortcodes</h2>
<strong>The Weaver II Pro Version offers the following shortcodes and features as well:</strong>
<br />
<ul>
	<li>Header Gadgets - Images/Text over Header</li>
	<li>Link Buttons - shortcode & widget</li>
	<li>Social Buttons - shortcode & widget</li>
	<li>Weaver Slider Menu Shortcode</li>
	<li>Extra Menus Shortcode</li>
	<li>Widget Area Shortcode</li>
	<li>Search Form Shortcode</li>
	<li>Show Feed Shortcode</li>
	<li>Popup Link Shortcode</li>
	<li>Show/Hide Shortcode</li>
	<li>Comment Policy</li>
	<li>Shortcoder</li>
	<li>Include PHP Shortcode</li>
	<li>Total CSS</li>

</ul>
<?php 
        }
    }
    ?>
<hr/>
<h2 style="color:blue;">Recommended WordPress Plugins</h2>
<p>The following plugins are recommended to use with Weaver II. While most WordPress plugins work with Weaver, these
provide features commonly needed by Weaver users.</p>
</p>
<ul>
	<li><strong>Slide Shows and image Galleries</strong><br />
	We have developed our own Show Sliders and [gallery] slider plugin:<br />
	<ul><li><a href="http://aspenthemeworks.com/atw-show-sliders/" target="_blank">Aspen Themeworks Show Sliders</a>
	- good for header slideshows</li>
	</ul>
	</li>
	<li><strong>SEO Optimization</strong><br />
		<ul>
			<li><a href="http://wordpress.org/extend/plugins/wordpress-seo/" target="_blank">WordPress SEO by Yoast</a> -
			probably the best. Weaver II automatically supports Yoast's breadcrumbs if they are enabled.</li>
		</ul>
	</li>
	<li><strong>Server Side Caching</strong><br />
		Caching can help with site performance for busy sites on shared servers. We strongly recommend <em>Quick Cache</em>
        which is fully compatible with Weaver II. <em>These are the only 2 compatible caching plugins.</em>
		<ul>
			<li><a href="http://wordpress.org/extend/plugins/quick-cache/" target="_blank">Quick Cache</a> - Complete automatic compatibility <em>when Weaver II Theme Extras installed</em>.</li>
			<li><a href="http://wordpress.org/extend/plugins/w3-total-cache/" target="_blank">W3 Total Cache</a> - Requires custom configuration. We recommend Quick Cache over W3TC. See Help file.</li>
		</ul>
	</li><li><strong>Contact Form</strong><br />
		<ul>
			<li><a href="http://wordpress.org/extend/plugins/si-contact-form/" target="_blank">Fast Secure Contact Form</a>
			- does it all, easy to configure and style</li>
		</ul>
	</li><li><strong>Others</strong><br />
		These plugins are known to work well with Weaver II.
		<ul>

			<li><a href="http://wordpress.org/extend/plugins/ultimate-tinymce/" target="_blank">Ultimate TinyMCE</a> - extend the page/post editor</li>
					<li><a href="http://wordpress.org/extend/plugins/dynamic-widgets/" target="_blank">Dynamic Widgets</a> - an additional way to control when widgets are displayed, automatic compatibility</li>

			<li><a href="http://wordpress.org/extend/plugins/wp-pagenavi/" target="_blank">WP-PageNavi</a> - if installed, will be used instead of Weaver II's Page Navigation</li>
			<li><a href="http://wordpress.org/extend/plugins/wp-paginate/" target="_blank">WP-Paginate</a> - if installed, will be used instead of Weaver II's Page Navigation</li>
		</ul>
	</li>
</ul>
	</div>
	<div id="tab_saverestore" class="tab" >
<?php 
    weaverii_admin_saverestore();
    ?>
	</div>
	<div id="tab_help" class="tab" >
<?php 
    weaverii_admin_help();
    ?>
	</div>
   </div> <!-- #tab-saverestore -->
</div> <!-- #tabwrap -->

<?php 
    weaverii_end_of_section('Options');
    ?>

<script type="text/javascript">
		var tabberAdmin = new Yetii({
		id: 'tab-admin',
		tabclass: 'tab',
		persist: true
		});
</script>

<?php 
}
function weaverii_process_options_admin_pro()
{
    if (weaverii_submitted('backup_settings')) {
        $name = weaverii_savebackup();
        if ($name !== false) {
            weaverii_save_msg(weaverii_t_('All current main and advanced options backed up in:') . ' "' . $name . '.w2b"');
        } else {
            weaverii_save_msg(weaverii_t_('ERROR: Saving backup failed.'));
        }
    }
    if (weaverii_submitted('filesavetheme')) {
        $base = sanitize_file_name($_POST['savethemename']);
        if (weaverii_dev_mode()) {
            weaverii_setopt('wii_hide_old_weaver', 0);
        }
        $temp_url = weaverii_write_current_theme($base);
        if ($temp_url == '') {
            weaverii_save_msg(weaverii_t_('Invalid name supplied to save theme to file.'));
        } else {
            weaverii_save_msg(weaverii_t_("All current main and advanced options saved in ") . $temp_url);
        }
    }
    if (weaverii_submitted('restoretheme')) {
        $base = $_POST['wii_restorename'];
        $valid = validate_file($base);
        // make sure an ok file name
        $fn = weaverii_f_uploads_base_dir() . 'weaverii-subthemes/' . $base;
        if ($valid < 1 && weaverii_upload_theme($fn)) {
            $t = weaverii_getopt('wii_themename');
            if ($t == '') {
                $t = weaverii_getopt('wii_subtheme');
            }
            if ($t == '') {
                $t = 'Antique Ivory';
            }
            /* did we save a theme? */
            weaverii_setopt('wii_theme_filename', 'custom');
            // we have a custom theme now...
            weaverii_save_msg(weaverii_t_("Weaver II theme restored from file: ") . $t);
        } else {
            weaverii_save_msg('<em style="color:red;">' . weaverii_t_('INVALID FILE NAME PROVIDED - Try Again') . "({$fn})" . '</em>');
        }
    }
    if (weaverii_submitted('save_mobiletheme')) {
        weaverii_save_msg(weaverii_t_("Current settings saved in alternate Mobile View database entry."));
        $weaverii_opts = get_option(apply_filters('weaver_options', 'weaverii_settings'), array());
        $weaverii_opts['_wii_mobile_alt_theme'] = 'saved_mobile';
        // force  these two
        $weaverii_opts['_wii_sim_mobile'] = false;
        $weaverii_opts['_wii_inline_style'] = 'on';
        weaverii_wpupdate_option('weaverii_settings_mobile', $weaverii_opts, 'save_mobiletheme');
        $weaverii_pro_opts = get_option(apply_filters('weaver_options', 'weaverii_pro'), array());
        weaverii_wpupdate_option('weaverii_pro_mobile', $weaverii_pro_opts, 'save_mobile_theme');
    }
    if (weaverii_submitted('renametheme')) {
        $name = isset($_POST['wii_themename']) ? $_POST['wii_themename'] : '';
        $desc = isset($_POST['wii_theme_description']) ? $_POST['wii_theme_description'] : '';
        if ($name) {
            weaverii_setopt('wii_themename', $name);
        }
        if ($desc) {
            weaverii_setopt('wii_theme_description', $desc);
        }
    }
    if (weaverii_submitted('deletetheme')) {
        $myFile = isset($_POST['selectName']) ? $_POST['selectName'] : '';
        $valid = validate_file($myFile);
        if ($valid < 1 && $myFile != "None") {
            weaverii_f_delete(weaverii_f_uploads_base_dir() . 'weaverii-subthemes/' . $myFile);
            echo '<div style="background-color: rgb(255, 251, 204);" id="message" class="updated fade"><p>File: <strong>' . $myFile . '</strong> has been deleted.</p></div>';
        } else {
            echo '<div style="background-color: rgb(255, 251, 204);" id="message" class="updated fade"><p>File: <strong>' . $myFile . '</strong> invalid file name, not deleted.</p></div>';
        }
    }
}
 function weaveriip_Widget_Buttons()
 {
     $widget_ops = array('classname' => 'weaveriip_buttons', 'description' => weaverii_t_('Display Link Buttons as set in Weaver II Pro Link Buttons Shortcode Settings.'));
     parent::__construct('weaveriip_buttons', weaverii_t_('Weaver II Pro Link Buttons'), $widget_ops);
 }