Example #1
0
function weaverii_admin_pro()
{
    $opts = array(array('name' => 'Administrative Opts', 'id' => 'maintab3', 'type' => 'header0', 'info' => 'Weaver II Pro Administrative Options', 'help' => 'help.html#ProAdminOpts'), array('name' => 'Use Inline CSS', 'id' => '_wii_inline_style', 'type' => '+checkbox', 'info' => 'Generate in-line CSS code rather than using style-weaverii.css file. ♦'), array('name' => 'Development Mode', 'id' => '_wii_development_mode', 'type' => '+checkbox', 'info' => 'Run in development mode. Uses in-line CSS and displays the diagnostic information enabled below when developing
		  a new custom theme. TURN OFF FOR PRODUCTION SITES! &diams;'), array('name' => '<small>Trace Page Templates</small>', 'id' => '_wii_diag_trace_templates', 'type' => '+checkbox', 'info' => 'Displays a label for each page template called (e.g., index, category, page, etc.). &diams;'), array('name' => '<small>Trace Sidebars</small>', 'id' => '_wii_diag_trace_sidebars', 'type' => '+checkbox', 'info' => 'Displays a label for sidebar displayed. &diams;'), array('name' => '<small>Show Area Borders</small>', 'id' => '_wii_diag_borders', 'type' => '+checkbox', 'info' => 'Show a 1px red border around most major &lt;div&gt;s. Overrides other borders. &diams;'), array('name' => '<small>Show Page Generation Time</small>', 'id' => '_weaverii_diag_timer', 'type' => '+checkbox', 'info' => 'Show page generation time at bottom of page. &diams;'), array('name' => '#070<small>Show Mobile Device Info</small>', 'id' => '_wii_diag_trace_mobile', 'type' => '+checkbox', 'info' => 'Shows info about display device at top of page. &diams;'), array('name' => 'Shortcodes & Features', 'id' => 'maintab2', 'type' => 'header0', 'info' => 'Selectively Enable/Disable Weaver II Pro Shortcodes and Features', 'help' => 'help.html#ProShortcodes'), array('name' => 'Note:', 'id' => 'wii_pshc', 'type' => 'note', 'info' => 'These enable/disabe Weaver Pro Shortcodes. See the Dashboard Appearance->Shortcodes + Pro panel.'), array('name' => 'Disable Header Gadgets', 'id' => '_wii_hide_headergadgets', 'type' => '+checkbox', 'info' => 'Header Gadgets - Place links, images, and text over the header; directly or with [weaver_gadget] &diams;'), array('name' => 'Disable Link Buttons', 'id' => '_wii_hide_linkbuttons', 'type' => '+checkbox', 'info' => 'Link Buttons - [weaver_buttons] + Widget to display link image buttons you define &diams;'), array('name' => 'Disable Social Buttons', 'id' => '_wii_hide_socialbuttons', 'type' => '+checkbox', 'info' => 'Social Buttons - [weaver_social] + Widget to display icon links to most current social sites &diams;'), array('name' => 'Disable Slider', 'id' => '_wii_hide_slider', 'type' => '+checkbox', 'info' => 'Slider - [weaver_slider] - place sliding image menus in header, sidebar, or content area &diams;'), array('name' => 'Disable Extra Menus', 'id' => '_wii_hide_extramenus', 'type' => '+checkbox', 'info' => 'Extra Menu [weaver_extra_menu] + Vertical Menu Widget - add new menus almost anywhere &diams;'), array('name' => 'Disable Widget Area', 'id' => '_wii_hide_widgetarea', 'type' => '+checkbox', 'info' => 'Widget Area - [weaver_widget_area] - add new widget area almost anywhere, including in pages and posts &diams;'), array('name' => 'Disable Search Form', 'id' => '_wii_hide_searchbox', 'type' => '+checkbox', 'info' => 'Search Form - [weaver_search] - add a search form wherever you want &diams;'), array('name' => 'Disable Show Feed', 'id' => '_wii_hide_showfeed', 'type' => '+checkbox', 'info' => 'Show Feed - [weaver_show_feed] - show an external RSS feed styled to match your own posts &diams;'), array('name' => 'Disable Popup Link', 'id' => '_wii_hide_popuplink', 'type' => '+checkbox', 'info' => 'Popup Link - [weaver_popup_link] - Define a link to a popup window &diams;'), array('name' => 'Disable Show/Hide Text', 'id' => '_wii_hide_showhide', 'type' => '+checkbox', 'info' => 'Show/Hide - [weaver_showhide] - adds button to show/hide text such as lyrics or spoilers &diams;'), array('name' => 'Disable Comment Policy', 'id' => '_wii_hide_commentpolicy', 'type' => '+checkbox', 'info' => 'Comment Policy - add comment policy or terms right before the submit comment button &diams;'), array('name' => 'Disable Shortcoder', 'id' => '_wii_hide_shortcoder', 'type' => '+checkbox', 'info' => 'Shortcoder - [weaver_sc] - define your own short code: add standard text or other content using a shortcode &diams;'), array('name' => 'Enable PHP', 'id' => '_wii_show_php', 'type' => '+checkbox', 'info' => 'PHP - [weaver_php] - add PHP whereever you need it &diams;'), array('name' => 'Enable Total CSS Options', 'id' => '_wii_show_totalcss', 'type' => '+checkbox', 'info' => 'Total CSS - define custom CSS for virtually every important element of your theme &diams;'));
    ?>
<h3>Weaver II Pro Features <?php 
    weaverii_help_link('help.html#WeaverIIPro', 'Help for Admin Options');
    ?>
</h3>
<?php 
    if (!weaverii_init_base()) {
        ?>
<p>Weaver II Pro adds features to Weaver II, but is now being retired. Rather than designing new sites using
<em>Weaver II</em>, [lease switch to our new theme: <strong>Weaver Xtreme.</strong></p>
<h3>Visit <?php 
        weaverii_site('', 'http://weavertheme.com', 'Weaver Theme');
        ?>
WeaverTheme.com</a>
now to learn all about <em>Weaver Xtreme</em>.</strong>
</h3>
	<p>After over 5 years as one of the best WordPress themes available, <em>Weaver II</em> is being phased out.
	We will continue to provide critical updates for the foreseeable future, but we <strong>highly</strong> recommend
	switching to our latest, improved theme - <em>Weaver Xtreme</em>.
	</p>
<?php 
        weaverii_form_show_options($opts);
        return;
    }
    // to here, have pro features
    ?>
<h3>Weaver II Pro Features - You are using Weaver II Pro. Thank you.</h3>
<p>After over 5 years as one of the best WordPress themes available, <em>Weaver II Pro</em> is being phased out.
	We will continue to provide critical updates for the foreseeable future, but we <strong>highly</strong> recommend
	switching to our latest, improved theme - <em>Weaver Xtreme</em>, and its premium version, <em>Weaver Xtreme Plus</em>.
</p>
<?php 
    weaverii_sapi_submit();
    weaverii_hide_advanced('begin');
    weaverii_form_show_options($opts);
    ?>

 <p><strong><a href="<?php 
    echo site_url('/wp-admin/themes.php?page=WeaverII_Shortcodes');
    ?>
"><em>More Weaver II Pro Options and Shortcodes</em></a></strong></p>

<p style="max-width:700px;"><small>Note: The above options allow you to selectively enable and disable the listed Weaver II Pro shortcodes and
features. Disabling a feature will optomize the speed of your site. Any difference will be very small, but might
give a slight improvment for heavily loaded sites.</small>
	<br /><br />
	<?php 
    echo 'Memory: ' . round(memory_get_usage() / 1024 / 1024, 2) . ' of ' . (int) ini_get('memory_limit') . 'M ';
    ?>
</p>
<?php 
    weaverii_sapi_submit();
    (int) ini_get('memory_limit');
    weaverii_hide_advanced('end');
}
Example #2
0
function weaverii_form_row_submit($value)
{
    weaverii_sapi_submit('</table>', '<table style="margin-top:10px;">');
}
Example #3
0
function weaverii_admin_mainopts()
{
    ?>
<div id="tabwrap_main" style="padding-left:4px;">

<div id="tab-container-main" class='yetiisub'>
	<ul id="tab-container-main-nav" class='yetiisub'>
		<li><a href="#ogenappear" title="Wrapping background colors, rounded corners, borders, fade, shadow, search form"><?php 
    echo weaverii_t_('General Appearance');
    ?>
</a></li>
		<li><a href="#olayout" title="Theme width, margins; Sidebar Layouts"><?php 
    echo weaverii_t_('Layout');
    ?>
</a></li>
		<li><a href="#ofonts" title="Set fonts for various page elements."><?php 
    echo weaverii_t_('Fonts');
    ?>
</a></li>
		<li><a href="#owidgets" title="Backgrounds, margins, borders, text colors of widgets and widget areas"><?php 
    echo weaverii_t_('Widget Areas');
    ?>
</a></li>
		<li><a href="#oheaderopts" title="Site Title/Tagline properties, Header Image"><?php 
    echo weaverii_t_('Header');
    ?>
</a></li>
		<li><a href="#omenus" title="Menu text and bg colors and other properties; Info Bar properties"><?php 
    echo weaverii_t_('Menus');
    ?>
</a></li>
		<li><a href="#olinks" title="Colors and properties of links"><?php 
    echo weaverii_t_('Links');
    ?>
</a></li>
		<li><a href="#ocontent" title="Text colors and bg, image borders, featured image, other properties related to all content"><?php 
    echo weaverii_t_('Content Areas');
    ?>
</a></li>
		<li><a href="#opostspecific" title="Properties related to posts: titles, meta info, navigation, excerpts, featured images, and more."><?php 
    echo weaverii_t_('Post Specifics');
    ?>
</a></li>
		<li><a href="#ofooter" title="Footer options: bg color, borders, more. Site Copyright."><?php 
    echo weaverii_t_('Footer');
    ?>
</a></li>
	</ul>

<h3>Main Options<?php 
    weaverii_help_link('help.html#MainOptions', 'Help for Main Options');
    ?>
</h3>

	<div id="ogenappear" class="tab_mainopt" >
		<?php 
    weaverii_mainopts_general();
    ?>
	</div>

	<div id="olayout" class="tab_mainopt" >
		<?php 
    weaverii_mainopts_layout();
    ?>
	</div>

	<div id="ofonts" class="tab_mainopt" >
		<?php 
    weaverii_mainopts_fonts();
    ?>
	</div>

	<div id="owidgets" class="tab_mainopt" >
		<?php 
    weaverii_mainopts_widgets();
    ?>
	</div>

	<div id="oheaderopts" class="tab_mainopt" >
		<?php 
    weaverii_mainopts_header();
    ?>
	</div>

	<div id="omenus" class="tab_mainopt" >
		<?php 
    weaverii_mainopts_menus();
    ?>
	</div>

	<div id="olinks" class="tab_mainopt" >
		<?php 
    weaverii_mainopts_links();
    ?>
	</div>
	<div id="ocontent" class="tab_mainopt" >
		<?php 
    weaverii_mainopts_content();
    ?>
	</div>

	<div id="opostspecific" class="tab_mainopt" >
		<?php 
    weaverii_mainopts_posts();
    ?>
	</div>

	<div id="ofooter" class="tab_mainopt" >
		<?php 
    weaverii_mainopts_footer();
    ?>
	</div>

</div> <!-- #tab-container-main -->
<?php 
    weaverii_sapi_submit();
    ?>
</div>  <!-- #tabwrap_main -->
   <script type="text/javascript">
		var tabberMainOpts = new Yetii({
		id: 'tab-container-main',
		tabclass: 'tab_mainopt',
		persist: true
		});
</script>
<?php 
}
function weaverii_fonts_row($row)
{
    // echo a Fonts row
    if ($row['id'][0] == '_') {
        // row title  - needs name linke, not sapi id
        ?>
    <tr><th scope="row" align="left" style="color:blue"><br /><a name="<?php 
        echo $row['id'];
        ?>
"></a><?php 
        weaverii_esc_textarea($row['label']);
        ?>
&nbsp;&nbsp;</th>
	<td><br /><?php 
        weaverii_esc_textarea($row['info']);
        ?>
&nbsp;&nbsp;&nbsp;<a href="#total_fonts_top"><strong>Top</strong></a>
	<td><span style="float:none;"><?php 
        weaverii_sapi_submit('', '', false);
        ?>
</span>
	</td>
    </tr>
<?php 
    } else {
        $rows = weaverii_getopt('fonts_edit_lines');
        if (!$rows) {
            $rows = 2;
        }
        ?>
    <tr><th scope="row" align="right" style="width:220px"><?php 
        weaverii_esc_textarea($row['label']);
        ?>
:&nbsp;</th>
	<td ><textarea name="<?php 
        weaverii_sapi_main_name($row['id']);
        ?>
" id=<?php 
        echo $row['id'];
        ?>
 rows=<?php 
        echo $rows;
        ?>
 style="width: 300px"><?php 
        weaverii_esc_textarea(weaverii_getopt($row['id']));
        ?>
</textarea></td><td>
	      <input id="paste_css" class= "js_button" type="button" value="&larr;Paste CSS&nbsp;" onclick="weaverii_copy_font_css('<?php 
        echo $row['id'];
        ?>
')" />
	      <small>Click button to paste current Font CSS Definition defined above to this element.</small>
	      <br><small><?php 
        weaverii_esc_textarea($row['info']);
        ?>
</small></td>
    </tr>
<?php 
    }
}
function weaverii_admin_mobileopts()
{
    $opts = array(array('name' => '#070Mobile Support Mode', 'id' => '_wii_mode_mobile', 'type' => 'select_id', 'info' => 'Select how Weaver II generates mobile views. (Default: Smart, hide sidebars) Important: see the help file!. &diams;', 'value' => array(array('val' => 'weaver-mobile-smart-nostack', 'desc' => 'Smart, hide sidebars'), array('val' => 'weaver-mobile-smart-stacked', 'desc' => 'Smart, stacked sidebars'), array('val' => 'weaver-mobile-resp-nostack', 'desc' => 'Responsive, hide sidebars'), array('val' => 'weaver-mobile-responsive', 'desc' => 'Responsive, stacked sidebars'))), array('name' => '#070<small>Disable Mobile Support</small>', 'id' => '_wii_mobile_disable', 'type' => '=checkbox', 'info' => 'Disable support for mobile devices. Your site will shrink the sizes of the sidebars and content
areas, but will otherwise not be responsive or stack sidebars. &diams;'), array('name' => '<small>Alternative Mobile Plugins:</small>', 'type' => '=note', 'info' => 'If you need to use an alternative Mobile Theme plugin, you <strong>must</strong> set one of the
responsive <em>Mobile Support Modes</em> above, in which case your site will continue to display responsively on desktop browsers and unrecognized mobile devices, while using the alternative plugin for recognized mobile devices.
You can also <em>Disable Mobile Support</em>, in which case you will not get fully responsive desktop support.'), array('name' => 'Mobile Simulator Options', 'type' => 'subheader', 'info' => 'Settings for the Mobile simulator. Available only when using "Smart" Mobile Modes.'), array('name' => '#070Simulate Mobile Device', 'id' => '_wii_sim_mobile', 'type' => 'select_id', 'info' => 'Simulate Mobile Device (&#9688;Smart Modes Only): Select type to see what your site will look like on mobile devices. The simulator works only when using a "Smart" mobile support mode. Otherwise, just shrink your browser for the Responsive modes (IE7/IE8 don\'t work to shrink). &diams;', 'value' => array(array('val' => 'none', 'desc' => 'Simulation Off'), array('val' => 'WeaverMobile', 'desc' => 'Smart Phone'), array('val' => 'WeaverMobileSmallTablet', 'desc' => 'Small Tablet (Fire)'), array('val' => 'WeaverMobileTablet', 'desc' => 'Large Tablet (iPad)'))), array('name' => '#070<small>... even if not admin</small>', 'id' => '_wii_sim_mobile_always', 'type' => '=checkbox', 'info' => 'Normally, the mobile simulation will be displayed only for admins. Checking this allows visitors to view the simulated mobile view. IMPORTANT! Be careful using this option - it is intended for development and demos only and normally should be disabled for productions sites. &diams;'), array('name' => 'Small Screen Devices', 'type' => '=subheader', 'info' => 'Settings for smartphones, other small screen devices, and small tablets.'), array('name' => '#070Show Full Blog Posts', 'id' => 'wii_mobile_full_posts', 'type' => '+checkbox', 'info' => 'Show full post text on blog pages - posts are excerpted by default on mobile devices (&#9688;Smart Modes only). (&#9679;Pro)'), array('name' => '#070Show Footer Widgets', 'id' => 'wii_mobile_show_footerwidgets', 'type' => '+checkbox', 'info' => 'Will show footer widget area on non-stacked Mobile Modes for mobile devices. (Footer widget is always displayed on stacked Mobile Modes.) (&#9679;Pro)'), array('name' => '#070Hide Top/Bottom Widget Areas', 'id' => 'wii_mobile_hide_topbottom_widgets', 'type' => '+checkbox', 'info' => 'Hide Top and Bottom Widget Areas in addition to Sidebars. (&#9679;Pro)'), array('name' => '#070No Auto-Underline Links', 'id' => 'wii_mobile_nounderline', 'type' => '+checkbox', 'info' => 'Underlined links are easier to use on most mobile devices. This will disable auto-underlined links. (&#9679;Pro)'), array('name' => '#070View Toggle', 'id' => 'wii_layout_view_toggle', 'type' => '+select_id', 'info' => 'How to display the Full View/Mobile View toggle button on mobile devices (&#9688;Smart Modes only). (&#9679;Pro)', 'value' => array(array('val' => 'both', 'desc' => 'Both top &amp; bottom'), array('val' => 'top', 'desc' => 'Top only'), array('val' => 'bottom', 'desc' => 'Bottom only'), array('val' => 'hide', 'desc' => 'Hide view toggle'))), array('name' => '#070<small>Alternate Full View HTML</small>', 'id' => '_wvr_mobile_fullmsg', 'type' => '+textarea', 'info' => 'HTML to replace standard Full View icon (include style if needed). (&#9679;Pro) &diams;'), array('name' => '#070<small>Alternate Mobile View HTML</small>', 'id' => '_wvr_mobile_mobilemsg', 'type' => '+textarea', 'info' => 'HTML to replace standard Mobile View icon. (&#9679;Pro) &diams;'), array('name' => '#070Mobile Home Page', 'id' => 'wii_mobile_home_int', 'type' => '+text', 'info' => 'Specify page ID for alternate Home page when site viewed from mobile device (&#9688;Smart Modes only). Recommended: check "Hide Page on the default Primary Menu" Per Page option for the page. (&#9679;Pro)'), array('name' => '#070Mobile Site Title', 'id' => '_wii_mobile_site_title', 'type' => '+textarea', 'info' => 'Specify alternate Site Title if needed (&#9688;Smart Modes only) (Use &amp;nbsp; to hide Site Title on mobile). (&#9679;Pro) &diams;'), array('name' => '#070<small>Mobile Site Title Color</small>', 'id' => 'wii_mobile_title_color', 'type' => '+color', 'info' => 'Alternate Color for Mobile Site Title (includes Responsive Modes). (&#9679;Pro)'), array('name' => '#070Mobile Header Image', 'id' => '_wii_mobile_header_url', 'type' => '+textmedia', 'info' => 'Specify alternate header image for phone/small tablet mobile view (&#9688;Smart Modes only). (&#9679;Pro) &diams;'), array('name' => '#070<small>Mobile Header Image - Tablet</small>', 'id' => '_wii_mobile_tablet_header_url', 'type' => '+textmedia', 'info' => 'Specify alternate header image for tablet mobile view (will usually not be necessary, &#9688;Smart Modes only). (&#9679;Pro) &diams;'), array('name' => '#070Custom CSS', 'id' => '_wii_mobile_css', 'type' => '+textarea', 'info' => 'Custom site wide CSS included only when viewed on Mobile Device. Note that ".weaver-mobile" wrapping class can also be used for this purpose in the &lt;HEAD&gt; Section Custom CSS option (&#9688;Smart Modes only). (&#9679;Pro) &diams;'), array('name' => '<span style="color:green;">More Mobile Options:</span>', 'type' => 'note', 'info' => 'More mobile options are available for specific areas: Header, Menus, Post Specifics, Shortcodes.'), array('type' => 'submit'), array('name' => 'Tablets', 'type' => '=subheader', 'info' => 'Settings for iPad and other tablets'), array('name' => '#070Keep Site Margins', 'id' => 'wii_mobile_keep_site_margins', 'type' => '+checkbox', 'info' => 'Retain standard site margins on tablets (&#9688;Smart Modes only) - will normally reduce outer margins by default. (&#9679;Pro)'), array('name' => '#070No Auto-Underline Links', 'id' => 'wii_mobile_tablet_nounderline', 'type' => '+checkbox', 'info' => 'Underlined links are easier to use on most tablet devices. This will disable auto-underlined links. (&#9688;Smart Modes only - Responsive Modes never auto-underline links on tablets.) (&#9679;Pro)'), array('name' => 'Alternate Mobile Theme', 'type' => '=subheader', 'info' => 'Use Alternate Mobile Theme when site viewed by Mobile Device.'), array('name' => '#070Use Alternate Mobile Theme', 'id' => '_wii_mobile_alt_theme', 'type' => '+checkbox', 'info' => 'Mobile Devices will use the Mobile Theme Settings saved in the "Save Settings to Mobile Settings"
option on the "Save/Restore" tab (&#9688;Smart Modes only). (The Alternate Mobile Theme can not be displayed with the Mobile Simulator.) (&#9679;Pro) &diams;'));
    ?>
<h3>Mobile Device Options <?php 
    weaverii_help_link('help.html#MobileHelp', 'Help for Mobile Options');
    ?>
</h3>
<p style="font-size:small">
	These are the main options that control how Weaver II displays your site on Mobile devices. Please note that there are
	other options that affect the mobile view located on other tabs (e.g., the Main Options : Header tab). Options that affect
	the mobile view are displayed with a <span style="color:#080;font-weight:bold;">Green Label</span>.
</p>
<?php 
    weaverii_sapi_submit();
    weaverii_check_cache_plugins();
    weaverii_form_show_options($opts);
    if (weaverii_getopt_checked('_wii_mobile_alt_theme')) {
        $temp = get_option(apply_filters('weaver_options', 'weaverii_settings_mobile'));
        if ($temp === false) {
            echo '<strong style="color:red;">Warning: No Mobile Theme Settings have been saved. You <strong>must</strong> use the "Save Settings to Mobile Settings" from the Save/Restore tab first!</strong><br />';
        }
    }
    ?>
<br />
<?php 
    if (!weaverii_hide_advanced_optval('_wii_apple_touch_icon_url')) {
        ?>
   <span style="color:blue;"><b>Apple Touch Icon for iOS</b></span><br />
	<p>When this site is viewed on an Apple iOS device such as an iPhone or iPad (&#9688;Smart Modes only), Apple iOS recognizes a special icon
	that can be displayed on the device's home screen. The recommend size for this icon is a <code>.png</code> file 57x57 px for basic display,
	or 114x114 px for enhanced display. &diams;</p>
	<p>
<?php 
        $icon = weaverii_getopt('_wii_apple_touch_icon_url');
        if ($icon != '') {
            echo '<img src="' . $icon . '" alt="apple touch" />&nbsp;';
        }
        ?>
<strong style="color:#070">Apple Touch Icon URL: </strong>
	<textarea name="<?php 
        weaverii_sapi_main_name('_wii_apple_touch_icon_url');
        ?>
" id="_wii_apple_touch_icon_url" rows=1 style="width: 350px"><?php 
        echo esc_textarea(weaverii_getopt('_wii_apple_touch_icon_url'));
        ?>
</textarea><?php 
        weaverii_media_lib_button('_wii_apple_touch_icon_url');
        ?>
&nbsp;&nbsp;Full path to Apple Touch Icon</p>
	<br />
<?php 
    }
    ?>

   <span style="color:blue;"><b>Caching Plugins for Weaver II</b></span><br />
	<p>Because of the advanced Smart Mobile View capabilities provided by Weaver II, many existing WordPress Caching plugins
	will <strong>not</strong> work correctly with Weaver II <em>when it is displayed in Smart Mobile Device mode</em>.
	(Using one of the Responsive mobile display modes will allow Weaver II to work correctly with any cache plugin.)
	For using the &#9688;Smart Modes mobile support, we have found that the <strong>Quick Cache</strong> and
	<strong>W3 Total Cache</strong> plugins do work with Weaver Smart Mobile mode when
	properly configured. Please see the Weaver II help file for instructions on
	using compatible cache plugin &rarr;. <?php 
    weaverii_help_link('help.html#quickcache', 'Cache Setting for Weaver II');
    ?>
	<p>

<?php 
    weaverii_sapi_submit();
}
Example #6
0
function weaverii_admin_pro()
{
    $opts = array(array('name' => 'Administrative Opts', 'id' => 'maintab3', 'type' => 'header0', 'info' => 'Weaver II Pro Administrative Options', 'help' => 'help.html#ProAdminOpts'), array('name' => 'Use Inline CSS', 'id' => '_wii_inline_style', 'type' => '+checkbox', 'info' => 'Generate in-line CSS code rather than using style-weaverii.css file. &diams;'), array('name' => 'Development Mode', 'id' => '_wii_development_mode', 'type' => '+checkbox', 'info' => 'Run in development mode. Uses in-line CSS and displays the diagnostic information enabled below when developing
		  a new custom theme. TURN OFF FOR PRODUCTION SITES! &diams;'), array('name' => '<small>Trace Page Templates</small>', 'id' => '_wii_diag_trace_templates', 'type' => '+checkbox', 'info' => 'Displays a label for each page template called (e.g., index, category, page, etc.). &diams;'), array('name' => '<small>Trace Sidebars</small>', 'id' => '_wii_diag_trace_sidebars', 'type' => '+checkbox', 'info' => 'Displays a label for sidebar displayed. &diams;'), array('name' => '<small>Show Area Borders</small>', 'id' => '_wii_diag_borders', 'type' => '+checkbox', 'info' => 'Show a 1px red border around most major &lt;div&gt;s. Overrides other borders. &diams;'), array('name' => '<small>Show Page Generation Time</small>', 'id' => '_weaverii_diag_timer', 'type' => '+checkbox', 'info' => 'Show page generation time at bottom of page. &diams;'), array('name' => '#070<small>Show Mobile Device Info</small>', 'id' => '_wii_diag_trace_mobile', 'type' => '+checkbox', 'info' => 'Shows info about display device at top of page. &diams;'), array('name' => 'Shortcodes & Features', 'id' => 'maintab2', 'type' => 'header0', 'info' => 'Selectively Enable/Disable Weaver II Pro Shortcodes and Features', 'help' => 'help.html#ProShortcodes'), array('name' => 'Note:', 'id' => 'wii_pshc', 'type' => 'note', 'info' => 'These enable/disabe Weaver Pro Shortcodes. See the Dashboard Appearance->Shortcodes + Pro panel.'), array('name' => 'Disable Header Gadgets', 'id' => '_wii_hide_headergadgets', 'type' => '+checkbox', 'info' => 'Header Gadgets - Place links, images, and text over the header; directly or with [weaver_gadget] &diams;'), array('name' => 'Disable Link Buttons', 'id' => '_wii_hide_linkbuttons', 'type' => '+checkbox', 'info' => 'Link Buttons - [weaver_buttons] + Widget to display link image buttons you define &diams;'), array('name' => 'Disable Social Buttons', 'id' => '_wii_hide_socialbuttons', 'type' => '+checkbox', 'info' => 'Social Buttons - [weaver_social] + Widget to display icon links to most current social sites &diams;'), array('name' => 'Disable Slider', 'id' => '_wii_hide_slider', 'type' => '+checkbox', 'info' => 'Slider - [weaver_slider] - place sliding image menus in header, sidebar, or content area &diams;'), array('name' => 'Disable Extra Menus', 'id' => '_wii_hide_extramenus', 'type' => '+checkbox', 'info' => 'Extra Menu [weaver_extra_menu] + Vertical Menu Widget - add new menus almost anywhere &diams;'), array('name' => 'Disable Widget Area', 'id' => '_wii_hide_widgetarea', 'type' => '+checkbox', 'info' => 'Widget Area - [weaver_widget_area] - add new widget area almost anywhere, including in pages and posts &diams;'), array('name' => 'Disable Search Form', 'id' => '_wii_hide_searchbox', 'type' => '+checkbox', 'info' => 'Search Form - [weaver_search] - add a search form wherever you want &diams;'), array('name' => 'Disable Show Feed', 'id' => '_wii_hide_showfeed', 'type' => '+checkbox', 'info' => 'Show Feed - [weaver_show_feed] - show an external RSS feed styled to match your own posts &diams;'), array('name' => 'Disable Popup Link', 'id' => '_wii_hide_popuplink', 'type' => '+checkbox', 'info' => 'Popup Link - [weaver_popup_link] - Define a link to a popup window &diams;'), array('name' => 'Disable Show/Hide Text', 'id' => '_wii_hide_showhide', 'type' => '+checkbox', 'info' => 'Show/Hide - [weaver_showhide] - adds button to show/hide text such as lyrics or spoilers &diams;'), array('name' => 'Disable Comment Policy', 'id' => '_wii_hide_commentpolicy', 'type' => '+checkbox', 'info' => 'Comment Policy - add comment policy or terms right before the submit comment button &diams;'), array('name' => 'Disable Shortcoder', 'id' => '_wii_hide_shortcoder', 'type' => '+checkbox', 'info' => 'Shortcoder - [weaver_sc] - define your own short code: add standard text or other content using a shortcode &diams;'), array('name' => 'Enable PHP', 'id' => '_wii_show_php', 'type' => '+checkbox', 'info' => 'PHP - [weaver_php] - add PHP whereever you need it &diams;'), array('name' => 'Enable Total CSS Options', 'id' => '_wii_show_totalcss', 'type' => '+checkbox', 'info' => 'Total CSS - define custom CSS for virtually every important element of your theme &diams;'));
    ?>
<h3>Weaver II Pro Features <?php 
    weaverii_help_link('help.html#WeaverIIPro', 'Help for Admin Options');
    ?>
</h3>
<?php 
    if (!weaverii_init_base()) {
        ?>
<h3>Get <em style="color:blue;">Weaver II Pro</em> to add powerful new features to Weaver II</h3>
<p>
<?php 
        weaverii_site('', 'http://pro.weavertheme.com', 'Weaver II Pro');
        ?>
<img class="alignleft" style="padding-right:20px;" title="Weaver II Pro" src="<?php 
        echo weaverii_relative_url('images/wiipro.jpg');
        ?>
" alt="Weaver II Pro" width="200" height="62" /></a>
<span style="color:blue; font-weight:bold;">Get Weaver II Pro Now!</span>
<br /></br />
<strong>Visit <?php 
        weaverii_site('', 'http://pro.weavertheme.com', 'Weaver II Pro');
        ?>
pro.WeaverTheme.com</a>
now to get your copy of <em>Weaver II Pro</em>.</strong>
</p>
<br />

	<p>You can extend Weaver II's features by upgrading to the Weaver II Pro Version. In addition to activating
	all the grayed out options you've probably noticed on the various options tabs, you will get the following
	new shortcodes, plus other features to fine tune your site. And Weaver II Pro offers the
	ultimate in mobile theme customization, allowing a completely different look for mobile devices.
	</p>
<?php 
        weaverii_form_show_options($opts);
        return;
    }
    // to here, have pro features
    echo '<h3>Weaver II Pro Features - You are using Weaver II Pro. Thank you.</h3>' . "\n";
    weaverii_sapi_submit();
    weaverii_hide_advanced('begin');
    weaverii_form_show_options($opts);
    ?>

 <p><strong><a href="<?php 
    echo site_url('/wp-admin/themes.php?page=WeaverII_Shortcodes');
    ?>
"><em>More Weaver II Pro Options and Shortcodes</em></a></strong></p>

<p style="max-width:700px;"><small>Note: The above options allow you to selectively enable and disable the listed Weaver II Pro shortcodes and
features. Disabling a feature will optomize the speed of your site. Any difference will be very small, but might
give a slight improvment for heavily loaded sites.</small>
	<br /><br />
	<?php 
    echo 'Memory: ' . round(memory_get_usage() / 1024 / 1024, 2) . ' of ' . (int) ini_get('memory_limit') . 'M ';
    ?>
</p>
<?php 
    weaverii_sapi_submit();
    (int) ini_get('memory_limit');
    weaverii_hide_advanced('end');
}
Example #7
0
function weaverii_admin_admin()
{
    ?>
<h3>Basic Administrative Options <?php 
    weaverii_help_link('help.html#AdminOptions', 'Help for Admin Options');
    ?>
</h3>
<?php 
    weaverii_sapi_submit('', '<br /><br />');
    ?>
	These options control some administrative options and appearance features.

<br /><br />

	<label><input type="checkbox" name="<?php 
    weaverii_sapi_main_name('_wii_hide_donate');
    ?>
" id="wii_hide_donate" <?php 
    checked(weaverii_getopt_checked('_wii_hide_donate'));
    ?>
 />
		I've Donated - </label><small>Thank you for donating to the Weaver II theme.
This will hide the Donate button. Purchasing Weaver II Pro also hides the Donate button.</small> &diams;<br />

<label><input type="checkbox" name="<?php 
    weaverii_sapi_main_name('_wii_hide_subtheme_link');
    ?>
" id="wii_hide_subtheme_link" <?php 
    checked(weaverii_getopt_checked('_wii_hide_subtheme_link'));
    ?>
 />
		Hide Subthemes Banner - </label><small>This will hide the Premium Subthemes Banner.</small> &diams;<br />
<br />

<?php 
    weaverii_hide_advanced('begin');
    ?>
	<label><input type="checkbox" name="<?php 
    weaverii_sapi_main_name('_wii_hide_editor_style');
    ?>
" id="_wii_hide_editor_style" <?php 
    checked(weaverii_getopt_checked('_wii_hide_editor_style'));
    ?>
 />
		Disable Page/Post Editor Styling - </label><small>Checking this box will disable the Weaver subtheme based styling in the Page/Post editor.
		If you have a theme using transparent backgrounds, this option will likely improve the Post/Page editor visibility.</small> &diams;<br />

		<label><input type="checkbox" name="<?php 
    weaverii_sapi_main_name('_wii_disable_shortcodes');
    ?>
" id="_wii_disable_shortcodes" <?php 
    checked(weaverii_getopt_checked('_wii_disable_shortcodes'));
    ?>
 />
		Disable <em>all</em> theme shortcode support</label> - <small>Disables all shortcodes provide by the theme ([weaver_show_posts], etc.).
		Useful to check how your site would look without Weaver II options.</small> &diams;<br />

	<label><input type="checkbox" name="<?php 
    weaverii_sapi_main_name('_wii_hide_updatemsg');
    ?>
" id="wii_hide_updatemsg" <?php 
    checked(weaverii_getopt_checked('_wii_hide_updatemsg'));
    ?>
 />
		Hide Update Messages - </label><small>Checking this box will hide the Weaver version update announcements on the Weaver Admin page.</small> &diams;<br />



	<label><input type="checkbox" name="<?php 
    weaverii_sapi_main_name('_wii_hide_auto_css_rules');
    ?>
" id="wii_hide_auto_css_rules" <?php 
    checked(weaverii_getopt_checked('_wii_hide_auto_css_rules'));
    ?>
 />
		Don't auto-display CSS rules - </label><small>Checking this box will disable the auto-display of Main Option elements that have CSS settings.</small> &diams;<br />

	<label><input name="<?php 
    weaverii_sapi_main_name('_wii_css_rows');
    ?>
" id="wii_css_rows" type="text" style="width:30px;height:20px;" class="regular-text" value="<?php 
    weaverii_esc_textarea(weaverii_getopt('_wii_css_rows'));
    ?>
" />
	lines - Set CSS+ text box height - </label><small>You can increase the default height of the CSS+ input area to a value between 1 and 25 lines.</small> &diams;
<br />
<br />
<strong>Compatibility Settings</strong> - settings that may cause compatibility issues with other plugins
<br />
<br /> <small><span style="color:red;"><b>NOTE:</b></span> Weaver II includes support for Rounded Corners and
Shadows for Internet Explorer 7/8 via an add-on script called PIE. The script has been <strong>enabled</strong> by default.
Note while PIE supports most rounded areas, it doesn't support the menu bars.
If you have difficulties or don't like the way your site renders in IE 7/8, you can disable the support.</small>
<br />
<label><input type="checkbox" name="<?php 
    weaverii_sapi_main_name('_wii_hide_PIE');
    ?>
" id="wii_hide_PIE" <?php 
    checked(weaverii_getopt_checked('_wii_hide_PIE'));
    ?>
 />
	Disable IE rounded corners support - </label><small>If you are having issues with IE and rounded corners, please disable this option.</small> &diams;<br />
 <br />
 <input type="checkbox" name="<?php 
    weaverii_sapi_main_name('_wii_no_final_div');
    ?>
" id="wii_no_final_div" <?php 
    checked(weaverii_getopt_checked('_wii_no_final_div'));
    ?>
 />
		Don't add #weaver-final at end - </label><small>Checking this box will prevent Weaver II from wrapping the
		very end of site pages with the #weaver-final div. This may prevent some conflicts with some plugins.</small> &diams;<br />

 <h3 class="wvr-option-subheader">Per Page and Per Post Option Panels by Roles</h3>
 <p>Single site Administrator and Multi-Site Super Administrator will always have the Per Page and Per Post options panel displayed.
 You may selectively disable these options for other User Roles using the check boxes below. (&#9679;Pro)</p>

 <?php 
    if (!weaverii_init_base()) {
        echo '<p>&nbsp;&nbsp;<em>Weaver II Pro Option</em></p>';
    } else {
        ?>

	<label><input type="checkbox" name="<?php 
        weaverii_sapi_main_name('_wii_hide_mu_admin_per');
        ?>
" id="_wii_hide_mu_admin_per" <?php 
        checked(weaverii_getopt_checked('_wii_hide_mu_admin_per'));
        ?>
 />
		Hide Per Page/Post Options for MultiSite Admins</label> &diams;<br />
		   <label><input type="checkbox" name="<?php 
        weaverii_sapi_main_name('_wii_hide_editor_per');
        ?>
" id="_wii_hide_editor_per" <?php 
        checked(weaverii_getopt_checked('_wii_hide_editor_per'));
        ?>
 />
		Hide Per Page/Post Options for Editors</label> &diams;<br />
		   <label><input type="checkbox" name="<?php 
        weaverii_sapi_main_name('_wii_hide_author_per');
        ?>
" id="_wii_hide_author_per" <?php 
        checked(weaverii_getopt_checked('_wii_hide_author_per'));
        ?>
 />
		Hide Per Page/Post Options for Authors and Contributors</label> &diams;<br />

<?php 
    }
    ?>
<br />
 <h3 class="wvr-option-subheader">Subtheme Notes</h3>
 <p>This box may be used to keep notes and instructions about settings made for a custom subtheme. It
 will be saved in the both .w2t and .w2b settings files.</p>
 <textarea name="<?php 
    weaverii_sapi_main_name('wii_subtheme_notes');
    ?>
" rows=8 style="width: 95%"><?php 
    weaverii_esc_textarea(weaverii_getopt('wii_subtheme_notes'));
    ?>
</textarea>
<?php 
    weaverii_hide_advanced();
}