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 @@@@@'; } }
function weaverii_do_admin() { /* theme admin page */ /* < ?php if (weaverii_init_base()) echo " — <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 " — " . 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→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 }