Ejemplo n.º 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');
}
Ejemplo n.º 2
0
function weaverii_admin_subthemes()
{
    ?>

<h3>Predefined Weaver II Subthemes
<?php 
    weaverii_help_link('help.html#PredefinedThemes', 'Help for Weaver II Predefined Themes');
    ?>
<small style="font-weight:normal;font-size:10px;">&nbsp;&larr; You can click the ?'s found throughout Weaver II admin pages for context specific help.</small></h3>
<b>Welcome to Weaver II</b>

<p>For nearly five years, Weaver II has been one of the best WordPress themes available. But Weaver II is
showing its age, and we've developed <a href="//weavertheme.com/weaver-xtreme/" target="_blank">Weaver Xtreme</a>. It is
state of the art, and has many features expected in modern themes: better mobile support, full width support,
easier to use options, and support for the newest WordPress theme requirements. If you are just trying Weaver II
for the first time, we highly recommend that you use Weaver Xtreme instead!</p>


<?php 
    if (!has_action('weaverii_child_show_extrathemes')) {
        echo '<p>We suggest that you download the Weaver II Theme Extras Plugin for easy access to new subthemes.</p>';
    }
    do_action('weaverii_child_show_extrathemes');
    ?>

<h3 class="wvr-option-subheader">Get started by trying one of the predefined subthemes!</h3>
<?php 
    $theme_dir = trailingslashit(WP_CONTENT_DIR) . 'themes/' . get_template() . '/subthemes/';
    $theme_list = array();
    if ($media_dir = opendir($theme_dir)) {
        // build the list of themes from directory
        while ($m_file = readdir($media_dir)) {
            $len = strlen($m_file);
            $base = substr($m_file, 0, $len - 4);
            $ext = $len > 4 ? substr($m_file, $len - 4, 4) : '';
            if ($ext == '.w2t') {
                $theme_list[] = $base;
            }
        }
    }
    if (!empty($theme_list)) {
        weaverii_st_pick_theme($theme_list);
        // show the theme picker
    } else {
        echo "<h3>WARNING: Your version of Weaver II is likely installed incorrectly. Unable to find subtheme defiitions.</h3>\n";
    }
}
Ejemplo n.º 3
0
function weaverii_adv_bgimages()
{
    weaverii_hide_advanced('begin');
    ?>
	<div class="wvr-option-header">
	Background Images
	<?php 
    weaverii_help_link('help.html#BackgroundImages', 'Help on Background Images');
    ?>
</div><br />
	<br />

		<table class="optiontable">
<?php 
    weaverii_bgimg_widerow('Full Screen Site BG Image', '_wii_bg_fullsite_url', 'Full screen centered auto-sized BG image.  (&#9679;Pro)', '250px');
    weaverii_bgimg_widerow('Wrapper BG Image', '_wii_bg_wrapper_url', 'Background image for outer wrapper (#wrapper) (&#9679;Pro)');
    weaverii_repeat_row('_wii_bg_wrapper_rpt');
    weaverii_bgimg_widerow('Header BG Image', '_wii_bg_header_url', 'Background image for header (#branding) (&#9679;Pro)');
    weaverii_repeat_row('_wii_bg_header_rpt');
    weaverii_bgimg_widerow('Main BG Image', '_wii_bg_main_url', 'Background image for main area - wraps everything after header (#main) (&#9679;Pro)');
    weaverii_repeat_row('_wii_bg_main_rpt');
    weaverii_bgimg_widerow('Container BG Image', '_wii_bg_container_url', 'Background image for Container - (#container_wrap) (&#9679;Pro)');
    weaverii_repeat_row('_wii_bg_container_rpt');
    weaverii_bgimg_widerow('Content BG Image', '_wii_bg_content_url', 'Background image for Content - wraps page/post area (#content) (&#9679;Pro)');
    weaverii_repeat_row('_wii_bg_content_rpt');
    weaverii_bgimg_widerow('Page content BG Image', '_wii_bg_page_url', 'Background image for Page content area (#container .page) (&#9679;Pro)');
    weaverii_repeat_row('_wii_bg_page_rpt');
    weaverii_bgimg_widerow('Post BG Image', '_wii_bg_post_url', 'Background image for Post content area (#container .post) (&#9679;Pro)');
    weaverii_repeat_row('_wii_bg_post_rpt');
    weaverii_bgimg_widerow('Left Sidebar Areas BG Image', '_wii_bg_widgets_left_url', 'Background image for widget areas on left (#sidber_wrap_left) (&#9679;Pro)');
    weaverii_repeat_row('_wii_bg_widgets_left_rpt');
    weaverii_bgimg_widerow('Right Sidebar Areas BG Image', '_wii_bg_widgets_right_url', 'Background image for widget areas on right (#sidber_wrap_right) (&#9679;Pro)');
    weaverii_repeat_row('_wii_bg_widgets_right_rpt');
    weaverii_bgimg_widerow('Footer BG Image', '_wii_bg_footer_url', 'Background image for Footer area (#colophon) (&#9679;Pro)');
    weaverii_repeat_row('_wii_bg_footer_rpt');
    ?>
	</table>
<?php 
    weaverii_hide_advanced('end');
}
Ejemplo n.º 4
0
function weaverii_form_row_note($value)
{
    ?>
	<tr>
		<th scope="row" align="right">&nbsp;</th>
			<td style="float:right;font-weight:bold;"><?php 
    weaverii_echo_name($value);
    ?>
&nbsp;
<?php 
    if (!empty($value['help'])) {
        weaverii_help_link($value['help'], 'Help for ' . $value['name']);
    }
    ?>
			</td>
<?php 
    weaverii_form_row_info($value);
    ?>
	</tr>
<?php 
}
function weaverii_convert_old_weaver()
{
    /* convert existing Weaver 2.2 options from DB to current settings */
    if (true) {
        // no leading char means exact direct conversoin
        // leading ! means n/a
        // leading * means extra conversion processing required
        // leading ^ means widget area conversion - give only one notice
        // leading # means manual conversion required
        // leading - means internal value - no report required
        $convert_list = array('ttw_after_header' => 'wii_after_header_int|Space After Header', 'ttw_allow_attachment_comments' => 'wii_after_header_int|Allow comments for attachments', 'ttw_always_excerpt' => 'wii_excerpt_blog|Display posts as excerpts', 'ttw_always_fullpost' => 'wii_fullpost_archive|Display full posts', 'ttw_body_bgcolor' => 'wii_body_bgcolor|Outside BG', 'ttw_body_bgcolor_css' => 'wii_body_bgcolor_css|Outside BG', 'ttw_bold_menu' => 'wii_bold_menu|Bold Menu Text', 'ttw_border_adjust_sidebar' => '!No_longer_needed_by_Weaver_II|Sidebar Border Adjust', 'ttw_caption_color' => 'wii_caption_color|Caption text color', 'ttw_caption_color_css' => 'wii_caption_color_css|Caption text color', 'ttw_container_bgcolor' => 'wii_container_bgcolor|Container Area BG', 'ttw_container_bgcolor_css' => 'wii_container_bgcolor_css|Container Area BG', 'ttw_content_bgcolor' => 'wii_content_bgcolor|Content BG', 'ttw_content_bgcolor_css' => 'wii_content_bgcolor_css|Content BG', 'ttw_content_color' => '*wii_content_color|Content text', 'ttw_content_color_css' => 'wii_content_color_css|Content text', 'ttw_content_font' => '*wii_content_font|Content Font', 'ttw_contentlist_bullet' => '*wii_contentlist_bullet|Content List Bullet', 'ttw_desc_color' => 'wii_desc_color|Site Description', 'ttw_desc_color_css' => 'wii_desc_color_css|Site Description', 'ttw_excerpt_length' => 'wii_excerpt_length|Excerpt length', 'ttw_excerpt_more_msg' => 'wii_excerpt_more_msg|<em>Continue reading</em> Message', 'ttw_fadebody_bg' => 'wii_fadebody_bg|Fade Outside BG', 'ttw_footer_bgcolor' => 'wii_footer_bgcolor|Footer BG', 'ttw_footer_bgcolor_css' => 'wii_footer_bgcolor_css|Footer BG', 'ttw_footer_border_color' => 'wii_border_color|Footer Border', 'ttw_footer_border_color_css' => 'wii_footer_border_color_css|Footer Border', 'ttw_footer_widget_bgcolor' => 'wii_footer_widget_bgcolor|Footer Widget Areas BG', 'ttw_footer_widget_bgcolor_css' => 'wii_footer_widget_bgcolor_css|Footer Widget Areas BG', 'ttw_footer_widget_count' => '!No_longer_needed_by_Weaver_II._Footer_widgets_automatically_spaced.|Horizontal Footer Widget Area Blocks', 'ttw_footer_last' => 'wii_footer_last|Footer &lt;div> Last', 'ttw_force_widg_frontpage' => '!No_longer_needed_by_Weaver_II._New_top/bottom_widgets_available.|Always Show Top/Bottom widget area on front page', 'ttw_gradient_menu' => 'wii_gradient_menu|Menu Bar Gradient', 'ttw_use_superfish' => 'wii_use_superfish|Use Menu Effects', 'ttw_header_bgcolor' => 'wii_header_bgcolor|Header BG', 'ttw_header_bgcolor_css' => 'wii_header_bgcolor_css|Header BG', 'ttw_header_image_height' => 'wii_header_image_height_int|Header Image Height', 'ttw_header_image_width' => '*wii_header_image_width_int|Theme Width', 'ttw_site_margins' => '*wii_site_margins|Theme Margin', 'ttw_header_underline' => 'wii_header_underline_int|Bar under Titles', 'ttw_header_first' => 'wii_header_first|Header &lt;div> First', 'ttw_hide_author_bio' => 'wii_hide_author_bio|Hide Author Bio', 'ttw_hide_comments_closed' => '*wii_show_comments_closed|Hide <em>Comments Off</em>', 'ttw_hide_footer' => 'wii_hide_footer|Hide Entire Footer', 'ttw_hide_menu' => 'wii_hide_menu|Hide Menu Bars', 'ttw_hide_featured_header' => 'wii_hide_featured_header|Hide Featured Image for Header', 'ttw_hide_page_featured' => 'wii_hide_page_featured|Hide Featured Image for Pages', 'ttw_hide_post_fill' => 'wii_post_icons|Hide Post Info Fill-in', 'ttw_hide_singleton_cat' => 'wii_hide_singleton_cat|Hide Category if Only One', 'ttw_hide_single_sidebars' => '^Use_New_Per_Page_Layout|Hide Sidebars on Single Post', 'ttw_hide_special_post_sidebars' => '^Use_Weaver_Pro_Layout_Options|Hide Sidebars on Special Post pages', 'ttw_hide_site_title' => 'wii_hide_site_title|Hide Site Title/Description', 'ttw_hide_special_posts' => '^Use_Weaver_Pro_Layout_Options|Hide Special Post Pages widget area', 'ttw_hide_widg_pages' => '^Use_New_Widget_Areas|Hide Top/Bottom widget area in pages', 'ttw_hide_widg_posts' => '^Use_New_Widget_Areas|Hide Top/Bottom widget area in blog', 'ttw_hr_color' => 'wii_hr_color|&lt;HR&gt; color', 'ttw_hr_color_css' => 'wii_hr_color_css|&lt;HR&gt; color', 'ttw_ilink_color' => 'wii_ilink_color|Post Info Link', 'ttw_ilink_color_css' => 'wii_ilink_color_css|Post Info Link', 'ttw_ilink_hover_color' => 'wii_ilink_hover_color|Post Info Link Hover', 'ttw_ilink_hover_color_css' => 'wii_ilink_hover_color_css|Post Info Link Hover', 'ttw_ilink_visited_color' => 'wii_ilink_visited_color|Post Info Link Visited', 'ttw_ilink_visited_color_css' => 'wii_ilink_visited_color_css|Post Info Link Visited', 'ttw_info_color' => 'wii_info_color|Post Info text', 'ttw_info_color_css' => 'wii_info_color_css|Post Info text', 'ttw_infotop_bgcolor' => 'wii_infotop_bgcolor|Top Post Info BG', 'ttw_infotop_bgcolor_css' => 'wii_infotop_bgcolor_css|Top Post Info BG', 'ttw_infobottom_bgcolor' => 'wii_infobottom_bgcolor|Bottom Post Info BG', 'ttw_infobottom_bgcolor_css' => 'wii_infobottom_bgcolor_css|Bottom Post Info BG', 'ttw_input_bgcolor' => 'wii_input_bgcolor|Input Area BG', 'ttw_input_bgcolor_css' => 'wii_input_bgcolor_css|Input Area BG', 'ttw_large_tagline' => '*wii_desc_font_size|Larger Site Description', 'ttw_link_color' => 'wii_link_color|Standard Link', 'ttw_link_color_css' => 'wii_link_color_css|Standard Link', 'ttw_link_hover_color' => 'wii_link_hover_color|Standard Link Hover', 'ttw_link_hover_color_css' => 'wii_link_hover_color_css|Standard Link Hover', 'ttw_link_visited_color' => 'wii_link_visited_color|Standard Link Visited', 'ttw_link_visited_color_css' => 'wii_link_visited_color_css|Standard Link Visited', 'ttw_link_site_image' => 'wii_link_site_image|Header Image Links to Site', 'ttw_list_bullet' => '*wii_list_bullet|Widget List Bullet', 'ttw_main_bgcolor' => 'wii_main_bgcolor|Main Area BG', 'ttw_main_bgcolor_css' => 'wii_main_bgcolor_css|Main Area BG', 'ttw_media_lib_border' => 'wii_media_lib_border_color|Non-Captioned Image Border Color', 'ttw_media_lib_border_css' => 'wii_media_lib_border_color_css|Non-Captioned Image Border Color', 'ttw_media_lib_captioned_border' => '!Captioned_image_borders_no_longer_available|Captioned Image Border Color', 'ttw_media_lib_captioned_border_css' => '!Captioned_image_borders_no_longer_available|Captioned Image Border Color', 'ttw_menu_addsearch' => 'wii_menu_addsearch|Add Search to Menu Bar', 'ttw_menu_addlogin' => 'wii_menu_addlogin|Add Log in to Menu Bar', 'ttw_menu_nohome' => 'wii_|No Home Menu Item', 'ttw_menubar_color' => '*wii_menubar_bgcolor|Menu Bar', 'ttw_menubar_color_css' => '*wii_menubar_bgcolor_css|Menu Bar', 'ttw_menubar_curpage_color' => 'wii_menubar_curpage_color|Menu Bar current page', 'ttw_menubar_curpage_color_css' => 'wii_menubar_curpage_color_css|Menu Bar current page', 'ttw_menubar_hover_color' => '*wii_menubar_hover_color|Menu Bar text hover', 'ttw_menubar_hover_color_css' => '*wii_menubar_hover_color_css|Menu Bar text hover', 'ttw_menubar_hoverbg_color' => '*wii_menubar_hover_bgcolor|Menu Bar hover BG', 'ttw_menubar_hoverbg_color_css' => '*wii_menubar_hover_bgcolor_css|Menu Bar hover BG', 'ttw_menubar_text_color' => '*wii_menubar_text_color|Menu Bar text', 'ttw_menubar_text_color_css' => '*wii_menubar_text_color_css|Menu Bar text', 'ttw_move_menu' => 'wii_move_menu|Move Primary Menu to Top', 'ttw_page_bgcolor' => 'wii_page_bgcolor|Wrapper Page BG', 'ttw_page_bgcolor_css' => 'wii_page_bgcolor_css|xxx', 'ttw_page_title_color' => 'wii_page_title_color|Page Title Text', 'ttw_page_title_color_css' => 'wii_page_title_color_css|Page Title Text', 'ttw_plink_color' => 'wii_plink_color|Post Entry Title Link', 'ttw_plink_color_css' => 'wii_plink_color_css|Post Entry Title Link', 'ttw_plink_hover_color' => 'wii_ttw_plink_hover_color|Post Entry Title Link Hover', 'ttw_plink_hover_color_css' => 'wii_plink_hover_color_css|Post Entry Title Link Hover', 'ttw_plink_visited_color' => 'wii_plink_visited_color|Post Entry Title Link Visited', 'ttw_plink_visited_color_css' => 'wii_plink_visited_color_css|Post Entry Title Link Visited', 'ttw_post_hide_date' => 'wii_post_hide_date|Hide Post Date', 'ttw_post_hide_author' => 'wii_post_hide_author|Hide Post Author', 'ttw_post_hide_cats' => 'wii_post_hide_cats|Hide Post Category, Tags', 'ttw_post_bgcolor' => 'wii_post_bgcolor|xxx', 'ttw_post_bgcolor_css' => 'wii_post_bgcolor_css|xxx', 'ttw_post_icons' => 'wii_post_icons|Use Icons in Post Info', 'ttw_post_title_color' => 'wii_plink|Post Format Title', 'ttw_post_title_color_css' => 'wii_plink_css|Post Format Title', 'ttw_rounded_corners' => 'wii_rounded_corners|Rounded Corners', 'ttw_rounded_corners_radius' => 'wii_rounded_corners_radius|Corner Radius', 'ttw_show_featured_image_excerptedposts' => 'wii_show_featured_image_excerptedposts|Show the Featured Image for excerpted posts', 'ttw_show_featured_image_fullposts' => 'wii_show_featured_image_fullposts|Show Featured Image for full posts', 'ttw_show_post_avatar' => 'wii_show_post_avatar|Show avatar with posts', 'ttw_show_tiny_avatar' => 'wii_show_tiny_avatar|Make avatar tiny', 'ttw_side1_bgcolor' => '*wii_widget_primary_bgcolor|Primary Widget Area BG', 'ttw_side1_bgcolor_css' => '*wii_widget_primary_bgcolor_css|Primary Widget Area BG', 'ttw_side2_bgcolor' => 'wii_widget_right_bgcolor|Secondary Widget Area BG', 'ttw_side2_bgcolor_css' => 'wii_widget_right_bgcolor_css|Secondary Widget Area BG', 'ttw_side3_bgcolor' => '^Alt_Widget_Area_Not_Available._Use_New_Widget_Area_Options.|Alt Template Widget Area BG', 'ttw_side3_bgcolor_css' => '^Alt_Widget_Area_Not_Available._Use_New_Widget_Area_Options.|Alt Template Widget Area BG', 'ttw_sidebar_width' => '^Please_set_new_sidebar_widths_manaully|Sidebar Width', 'ttw_sidebars' => '^Please_select_new_style_sidebars_manually|Main Sidebar Columns', 'ttw_small_content_font' => '#Option_no_longer_available._Use_Fonts:_Site_Base_Font_Size|Smaller Content Font', 'ttw_stickypost_bgcolor' => 'wii_stickypost_bgcolor|Sticky Post BG', 'ttw_stickypost_bgcolor_css' => 'wii_stickypost_bgcolor_css|Sticky Post BG', 'ttw_text_color' => 'wii_content_headings_color|Heading text', 'ttw_text_color_css' => 'wii_content_headings_color_css|Heading text', 'ttw_title_color' => 'wii_title_color|Site Title', 'ttw_title_color_css' => 'wii_title_color_css|Site Title', 'ttw_title_font' => '*wii_title_font|Titles Font', 'ttw_title_on_header' => 'wii_title_on_header|Move Title over Header Image', 'ttw_title_on_header_xy_X' => 'wii_title_on_header_xy_X|Move Title over Header Image', 'ttw_title_on_header_xy_Y' => 'wii_title_on_header_xy_Y|Move Title over Header Image', 'ttw_title_on_header_xy_desc_X' => 'wii_title_on_header_xy_desc_X|Move Title over Header Image', 'ttw_title_on_header_xy_desc_Y' => 'wii_title_on_header_xy_desc_Y|Move Title over Header Image', 'ttw_topbottom_bgcolor' => '*wii_widget_top_bgcolor|Top/Bottom Widget Areas BG', 'ttw_topbottom_bgcolor_css' => '*wii_widget_top_bgcolor_css|Top/Bottom Widget Areas BG', 'ttw_useborders' => 'wii_useborders|Area Border', 'ttw_useborders_topbot' => '*wii_widget_top_std_border|Area Border on Top/Bottom widget areas', 'ttw_weaver_tables' => '*wii_weaverii_tables|Table Style', 'ttw_wide_top_bottom' => '#Please_use_new_widget_area_left/right_indent|Full Width Top/Bottom widget areas', 'ttw_widget_color' => 'wii_widget_color|Widget Area Text', 'ttw_widget_color_css' => 'wii_widget_color_css|Widget Area Text', 'ttw_widget_header_underline' => 'wii_widget_header_underline_int|Bar under Widget Titles', 'ttw_widget_item_bgcolor' => 'wii_widget_widget_bgcolor|Individual Widget BG', 'ttw_widget_item_bgcolor_css' => 'wii_widget_widget_bgcolor_css|Individual Widget BG', 'ttw_widget_title_color' => 'wii_widget_title_color|Widget Title', 'ttw_widget_title_color_css' => 'wii_widget_title_color_css|Widget Title', 'ttw_wlink_color' => 'wii_wlink_color|Widget Link', 'ttw_wlink_color_css' => 'wii_wlink_color_css|Widget Link', 'ttw_wlink_hover_color' => 'wii_wlink_hover_color|Widget Link Hover', 'ttw_wlink_hover_color_css' => 'wii_wlink_hover_color_css|Widget Link Hover', 'ttw_wlink_visited_color' => 'wii_wlink_visited_color|Widget Link Visited', 'ttw_wlink_visited_color_css' => 'wii_wlink_visited_color_css|Widget Link Visited', 'ttw_wrap_shadow' => 'wii_wrap_shadow||Wrap site with shadow', 'ttw_footer_opts' => 'wii_footer_insert|insert into footer', 'ttw_head_opts' => '*wii_head_opts|<HEAD> Section', 'ttw_add_css' => '*wii_add_css|Add CSS Rules to Weaver\'s style rules', 'ttw_preheader_insert' => 'wii_preheader_insert|Pre-Header Code', 'ttw_hide_front_preheader' => 'wii_hide_front_preheader|xxx', 'ttw_hide_rest_preheader' => 'wii_hide_rest_preheader|xxx', 'ttw_header_insert' => 'wii_header_insert|Site Header Insert Code', 'ttw_custom_header_insert' => '!Not_ready_wii_|Custom Header Page Template Code', 'ttw_header_frontpage_only' => '#Option_changed._Please_manually_set_new_values.|Show Header Insert on Front Page Only', 'ttw_postheader_insert' => 'wii_premain_insert|Post-Header Code', 'ttw_hide_front_postheader' => 'wii_hide_front_premain|xxx', 'ttw_hide_rest_postheader' => 'wii_hide_rest_premain|xxx', 'ttw_prefooter_insert' => 'wii_prefooter_insert|Pre-Footer Code', 'ttw_hide_front_prefooter' => 'wii_hide_front_prefooter|xxx', 'ttw_hide_rest_prefooter' => 'wii_hide_rest_prefooter|xxx', 'ttw_postfooter_insert' => 'wii_postfooter_insert|Post-Footer Code', 'ttw_hide_front_postfooter' => 'wii_hide_front_postfooter|xxx', 'ttw_hide_rest_postfooter' => 'wii_hide_rest_postfooter|xxx', 'ttw_presidebar_insert' => 'wii_presidebar_left_insert|Pre-Sidebar Code', 'ttw_hide_front_presidebar' => 'wii_hide_front_presidebar_left|xxx', 'ttw_hide_rest_presidebar' => 'wii_hide_rest_presidebar_left|xxx', 'ttw_hide_PIE' => '_wii_hide_PIE|Don\'t use PIE IE extension', 'ttw_menu_addhtml-left' => 'wii_menu_addhtml-left|add html to left menu', 'ttw_menu_addhtml' => 'wii_menu_addhtml|add html to right menu', 'ttw_notab_mainoptions' => '!Not_supported|no tabs on main options', 'ttw_perpagewidgets' => 'wii_perpagewidgets|Add widget areas for per page', 'ttw_hide_auto_css_rules' => '_wii_hide_auto_css_rules|Don\'t auto-display CSS rules', 'ttw_css_rows' => '_wii_css_rows|expand # CSS+ rows', 'ttw_force_inline_css' => '_wii_inline_style|Use Inline CSS', 'ttw_copyright' => '_wii_copyright|Alternate copyright', 'ttw_hide_poweredby' => '_wii_hide_poweredby|Hide powered by', 'ttw_end_opts' => 'wii_postfooter|The Last Thing', 'ttw_metainfo' => '#Please_manually_add_to_Advanced_Options:_SEO_Tags|meta info for header', 'ttw_hide_metainfo' => '_wii_hide_metainfo|Use SEO Plugin', 'ttw_hide_theme_thumbs' => '_wii_hide_theme_thumbs|Hide thumbs on admin screen', 'ttw_show_preview' => '!Not_supported|show the preview box', 'ttw_hide_updatemsg' => '!Not_supported|hide the version update message', 'ttw_hide_editor_style' => '_wii_hide_editor_style|disable editor styling', 'ttw_theme_head_opts' => '*wii_add_theme_css|Predefined Theme CSS Rules', 'wvr_hide_if_are_oldWeaver_opts' => '!Not_supported_wii_|show if old options to import', 'ftp_hostname' => '!Not_supported|FTP Host Name', 'ftp_username' => '!Not_suppoted|FTP User Name', 'ftp_password' => '!Not_suppoted|FTP Password', 'ftp_hide_check_message' => '!Not_supported|Disable FTP', 'ttw_subtheme' => 'wii_subtheme|Subtheme name', 'ttw_theme_image' => '-Np_longer_needed_by_Weaver_II|image name not used', 'ttw_theme_description' => 'wii_theme_description|Theme Description', 'ttw_themename' => 'wii_themename|theme name', 'ttw_version_id' => '-No_longer_needed_by_Weaver_II|version is not per-site', 'ttw_style_version' => '-No_longer_needed_by_Weaver_II|Style Version', 'ttw_last_advanced' => '-No_longer_needed_by_Weaver_II');
    }
    // Weaver Plus
    if (true) {
        $wvp_ignore = array('wvp_sitetitle_size', 'wvp_sitedesc_size', 'wvp_post_single_hidehtml', 'wvp_post_blog_hidehtml', 'wvp_site_fontsize', 'wvp_post_pretitle', 'wvp_post_prebody', 'wvp_post_postbody');
        // change wvp_ to wii_, add to weaver opts
        $wvp_to_wii_opts = array('wvp_post_info_move_top', 'wvp_post_info_move_bottom', 'wvp_post_info_hide_top', 'wvp_post_info_hide_bottom', 'wvp_hide_prevnext', 'wvp_post_no_titlelink', 'wvp_entrytitle_size', 'wvp_featured_blog_width', 'wvp_featured_single_width', 'wvp_hide_p_category', 'wvp_hide_p_tag', 'wvp_hide_p_date', 'wvp_hide_p_search', 'wvp_hide_tooltip');
    }
    $old_main = get_option('weaver_main_settings');
    if (empty($old_main)) {
        weaverii_maint_error_msg("Previous Version of Weaver not available to convert.");
        return;
    }
    $old_adv = get_option('weaver_advanced_settings');
    if (empty($old_adv)) {
        weaverii_maint_error_msg("Previous Version of Weaver not available to convert.");
        return;
    }
    $old = array_merge($old_main, $old_adv);
    $converted = 0;
    $skipped = 0;
    $special = 0;
    $notes = 0;
    $manual = 0;
    $errors = 0;
    $need_widget_notice = false;
    $css_found = false;
    global $weaverii_opts_cache;
    $weaverii_opts_cache = array();
    delete_option('weaverii_settings');
    echo "<div style=\"border: 4px ridge red; padding:8px; margin-left:auto; margin-right:auto; background:#f4f0f0;max-width:800px;\"><h3>Weaver to Weaver II Conversion Report ";
    weaverii_help_link('help.html#UpgradingWeaver', 'Help for Advanced Options');
    echo "</h3>\n    <p style=\"font-weight:bold;color:blue;\">You may want to Copy/Paste this report into a new WordPress Private or Draft Page, or into a word processor page, for future reference.</p>";
    $sb_areas = array('primary', 'right', 'left', 'top', 'bottom', 'footer', 'widget');
    foreach ($sb_areas as $val) {
        weaverii_setopt('wii_widget_' . $val . '_bgcolor', 'transparent', false);
        // widget areas need to be transparent
    }
    foreach ($old as $opt => $val) {
        // WEAVER settings
        if ($val && isset($convert_list[$opt])) {
            $cvt = $convert_list[$opt];
            $new_name = strtok($cvt, '|');
            $info = strtok('|');
            $msg = substr(str_replace('_', ' ', $new_name), 1);
            switch ($new_name[0]) {
                case '!':
                    $notes++;
                    echo "<span class=\"wvr_yellow\">Conversion Notice:</span> <em>{$info}:</em> {$msg}<br >\n";
                    break;
                case '-':
                    break;
                case '#':
                    $manual++;
                    echo "<span class=\"wvr_red\">Manual conversion required:</span> <em>{$info}:</em> {$msg}<br >\n";
                    break;
                case '^':
                    // widget area
                    if ($opt == 'ttw_sidebars') {
                        // we can sort of do this one
                        switch ($val) {
                            case 'Default - One, right side':
                                //Default - One, right side
                                weaverii_setopt('wii_layout_default', 'right-1-col', false);
                                break;
                            case 'One, wide right side':
                                //One, wide right side
                                weaverii_setopt('wii_layout_default', 'right-1-col', false);
                                $need_widget_notice = true;
                                break;
                            case 'One, left side':
                                //One, left side
                                weaverii_setopt('wii_layout_default', 'left-1-col', false);
                                break;
                            case 'Two, left and right sides':
                                //Two, left and right sides
                                weaverii_setopt('wii_layout_default', 'split', false);
                                break;
                            case 'Two, unequal widths, right side':
                                //Two, unequal widths, right side
                                weaverii_setopt('wii_layout_default', 'right-2-col', false);
                                $need_widget_notice = true;
                                break;
                            case 'Two, unequal widths, left side':
                                //Two, unequal widths, left side
                                weaverii_setopt('wii_layout_default', 'left-2-col', false);
                                $need_widget_notice = true;
                                break;
                            case 'None':
                                //None
                                weaverii_setopt('wii_layout_default', 'one-column', false);
                                break;
                            case 'Default - One, right side':
                                //Default - One, right side
                            //Default - One, right side
                            default:
                                weaverii_setopt('wii_layout_default', 'right-1-col', false);
                                break;
                        }
                        break;
                    }
                    $need_widget_notice = true;
                    break;
                case '*':
                    // special handling
                    $special++;
                    $converted++;
                    $new_name = substr($new_name, 1);
                    switch ($new_name) {
                        case 'wii_add_css':
                        case 'wii_add_theme_css':
                            $manual++;
                            echo "<span class=\"wvr_red\">CSS Rules detected.</span> The following <em>{$info}</em>\nhave been added to Weaver II's <strong>Custom CSS Rules</strong>, but may require manual changes:\n<br /><span style=\"padding-left:20px;\"><code>" . esc_textarea($val) . "</code></span><br />\n";
                            $fixed = str_replace('<style>', '', $val);
                            $fixed = str_replace('<style type="text/css">', '', $fixed);
                            $fixed = str_replace('</style>', '', $fixed);
                            $prev = weaverii_getopt('wii_add_css');
                            if ($prev != '') {
                                $prev = $prev . "\n" . $fixed;
                            } else {
                                $prev = $fixed;
                            }
                            weaverii_setopt('wii_add_css', $prev, false);
                            if (strstr($fixed, '<style') !== false) {
                                echo "<span class=\"wvr_red\">Warning - unmatched &lt;style&gt; found.</span> You will have to manually\n\t\t\t\t    convert the CSS in \"Custom CSS Rules\".\n";
                                $manual++;
                            }
                            break;
                        case 'wii_content_font':
                            // Content Font
                        // Content Font
                        case 'wii_title_font:':
                            //Titles Font
                            echo "<span class=\"wvr_red\">Font settings detected.</span> You may have to manually adjust font selections.<br />\n";
                            $manual++;
                            break;
                        case 'wii_contentlist_bullet':
                            // Content List Bullet
                        // Content List Bullet
                        case 'wii_list_bullet':
                            // Widget List Bullet
                            if ($val != 'circle' && $val != 'disc' && $val != 'square') {
                                $oldval = $val;
                                $val = 'disc';
                                if ($oldval != 'default') {
                                    echo "<span class=\"wvr_red\">Additional manual conversion may be required for list bullet:</span> <em>{$info}:\n<br /><span style=\"padding-left:20px;\">" . esc_textarea($oldval) . "</span><br />\n";
                                }
                                $manual++;
                            }
                            weaverii_setopt($new_name, $val, false);
                            break;
                        case 'wii_content_color':
                            weaverii_setopt('wii_content_color', $val, false);
                            weaverii_setopt('wii_body_color', $val, false);
                            break;
                        case 'wii_head_opts':
                            $bare = str_replace("\n", '', $val);
                            $bare = str_replace(' ', '', $bare);
                            if ($bare == '<!--AddyourownCSSsnippetsbetweenthestyletags.--><styletype="text/css"></style>') {
                                break;
                            }
                            echo "<span class=\"wvr_red\">CSS Rules possibly detected.</span> The following <em>&lt;HEAD&gt; Section</em>\ncode has been added to Weaver II's settings, and may require manual changes. CSS rules should be moved to the\n<strong>Custom CSS Rules</strong> section.\n<br /><span style=\"padding-left:20px;\"><code>" . esc_textarea($val) . "</code></span><br />\n";
                            $manual++;
                            weaverii_setopt($new_name, $val, false);
                            break;
                        case 'wii_header_image_width_int':
                            // Theme Width (this is both the header and theme width)
                            weaverii_setopt('wii_header_image_width_int', $val, false);
                            weaverii_setopt('wii_theme_width_int', $val, false);
                            break;
                        case 'wii_menubar_bgcolor':
                            // Menu Bar'
                        // Menu Bar'
                        case 'wii_menubar_bgcolor_css':
                            // Menu Bar',
                        // Menu Bar',
                        case 'wii_menubar_hover_color':
                        case 'wii_menubar_hover_color_css:':
                        case 'wii_menubar_text_color':
                            // Menu Bar text',
                        // Menu Bar text',
                        case 'wii_menubar_text_color_css':
                            // Menu Bar text',
                            $sub = str_replace('menu', 'submenu', $new_name);
                            weaverii_setopt($new_name, $val, false);
                            weaverii_setopt($sub, $val, false);
                            break;
                        case 'wii_menubar_hover_bgcolor':
                            // Menu Bar hover BG',
                        // Menu Bar hover BG',
                        case 'wii_menubar_hover_bgcolor_css':
                            // Menu Bar hover BG',
                            weaverii_setopt($new_name, $val, false);
                            weaverii_setopt('wii_submenubar_bgcolor', $val, false);
                            weaverii_setopt('wii_submenubar_hover_bgcolor', $val, false);
                            break;
                        case 'wii_site_margins':
                            // Theme Margin
                            weaverii_setopt('wii_site_margins_T', $val, false);
                            weaverii_setopt('wii_site_margins_B', $val, false);
                            weaverii_setopt('wii_site_margins_L', $val, false);
                            weaverii_setopt('wii_site_margins_R', $val, false);
                            break;
                        case 'wii_show_comments_closed':
                            // Hide <em>Comments Off</em>
                            weaverii_setopt($new_name, !$val, false);
                            break;
                        case 'wii_desc_font_size':
                            // Larger Site Description
                            weaverii_setopt($new_name, '200', false);
                            break;
                        case 'wii_widget_primary_bgcolor':
                            // Primary Widget Area BG
                            weaverii_setopt('wii_widget_primary_bgcolor', $val, false);
                            weaverii_setopt('wii_widget_left_bgcolor', $val, false);
                            weaverii_setopt('wii_widget_right_bgcolor', $val, false);
                            break;
                        case 'wii_widget_primary_bgcolor_css':
                            // Primary Widget Area BG
                            weaverii_setopt('wii_widget_primary_bgcolor_css', $val, false);
                            weaverii_setopt('wii_widget_left_bgcolor_css', $val, false);
                            weaverii_setopt('wii_widget_right_bgcolor_css', $val, false);
                            break;
                        case 'wii_widget_top_bgcolor':
                            // Top/Bottom Widget Areas BG
                            weaverii_setopt('wii_widget_top_bgcolor', $val, false);
                            weaverii_setopt('wii_widget_bottom_bgcolor', $val, false);
                            break;
                        case 'wii_widget_top_bgcolor_css':
                            // Top/Bottom Widget Areas BG
                            weaverii_setopt('wii_widget_top_bgcolor_css', $val, false);
                            weaverii_setopt('wii_widget_bottom_bgcolor_css', $val, false);
                            break;
                        case 'wii_widget_top_std_border':
                            // Area Border on Top/Bottom widget areas
                            weaverii_setopt('wii_widget_top_std_border', $val, false);
                            weaverii_setopt('wii_widget_bottom_std_border', $val, false);
                            break;
                        case 'wii_weaverii_tables':
                            // Table Styes
                            switch ($val) {
                                case 'Default':
                                    weaverii_setopt($new_name, 'wide', false);
                                    break;
                                case 'Weaver':
                                    weaverii_setopt($new_name, 'default', false);
                                    break;
                                case 'Bold Headings':
                                    weaverii_setopt($new_name, 'bold', false);
                                    break;
                                case 'Full Width':
                                    weaverii_setopt($new_name, 'fullwidth', false);
                                    break;
                                case 'None':
                                    weaverii_setopt($new_name, 'plain', false);
                                    break;
                                default:
                                    weaverii_setopt($new_name, 'default', false);
                                    break;
                            }
                            break;
                    }
                    // end switch
                    break;
                default:
                    $converted++;
                    weaverii_setopt($new_name, $val, false);
            }
            // end switch
        } else {
            if ($val) {
                $errors++;
                echo "Conversion Error for {$opt}: No conversion available</br>\n";
            } else {
                $skipped++;
            }
        }
    }
    // Now do Weaver Plus options
    $old_plus = get_option('weaver_plus', array());
    $plus = array();
    // converted plus options
    $plus_num = 0;
    if (!empty($old_plus) && weaverii_init_base()) {
        foreach ($old_plus as $opt => $val) {
            // WEAVER PLUS SETTINGS
            if ($val == '') {
                continue;
            }
            $plus_num++;
            // ignore these $wvp_ignore
            if (array_search($opt, $wvp_ignore) !== false) {
                continue;
            }
            // change wvp_ to wii_ and add to weaver ii opts $wvp_to_wii_opts
            if (array_search($opt, $wvp_to_wii_opts) !== false) {
                $fixed = str_replace('wvp_', 'wii_', $opt);
                weaverii_setopt($fixed, $val, false);
                continue;
            }
            if (strpos($opt, 'ttw_') !== false) {
                continue;
                // bug in Weaver - ignore these...
            }
            if (strpos($opt, 'wvp_bg_') !== false) {
                // wvp_bg_ -> _wii_bg_ : weaver opts
                $fixed = str_replace('wvp_', 'wii_', $opt);
                weaverii_setopt($fixed, $val, false);
                continue;
            }
            // fonts_ -> fonts_ : weaver opts
            if (strpos($opt, 'fonts_') !== false) {
                weaverii_setopt('wiip_' . $opt, $val, false);
                continue;
            }
            // everything starting with 'css_' is a straight through copy (total css) : PRO opts
            // everything starting with 'slider' is straight through (slider menu shortcode) : PRO opts
            // buttons => buttons :PRO opts
            // hdr_ -> no change: PRO opts
            // 'wvpsc_ - no change : PRO opts
            // wvr_disclaimer - no change : PRO opts
            // wvp_add_social_to_menu : PRO opts
            $plus[$opt] = $val;
        }
    }
    if (!empty($plus) && weaverii_init_base()) {
        global $weaverii_pro_opts;
        delete_option('weaverii_pro');
        $weaverii_pro_opts = $plus;
        weaverii_pro_update_options('convert');
    }
    if ($need_widget_notice) {
        echo "<span class=\"wvr_red\">Manual attention required:</span> The options for sidebars and widget areas have changed <strong>significantly</strong> in Weaver II. <em>Please see the help file discussion about this topic.</em>\nYou will have to make some manual adjustments to your sidebar and widget settings.<br />\n";
    }
    if (!weaverii_getopt('wii_layout_default')) {
        weaverii_setopt('wii_layout_default', 'right-1-col', false);
    }
    if (!weaverii_getopt('wii_layout_default_archive')) {
        weaverii_setopt('wii_layout_default_archive', 'one-column', false);
    }
    weaverii_setopt('wii_comment_content_bgcolor', 'transparent', false);
    // decent compromise
    weaverii_setopt('wii_infobar_hide', 'checked', false);
    // just hide it...
    weaverii_setopt('wii_hide_old_weaver', 10, false);
    // kill the message
    weaverii_setopt('wii_version_id', WEAVERII_VERSION_ID);
    // an force db save as well (not false)
    weaverii_init_opts('convert_old_weaver');
    // changed some things, so re-save
    echo '<hr /><strong>Page Template Usage</strong><p>The following pages use old style Weaver Page Templates. They will
    require manual conversion to the new style Weaver II Page Templates. Please see the Help file
    for hints on converting old Weaver II templates to the new Weaver II templates.&nbsp;';
    weaverii_help_link('help.html#converttemplates', 'Help for Converting Page Templates');
    echo '</p>';
    $tpl_num = 0;
    $pages = get_pages();
    foreach ($pages as $page) {
        // PAGE TEMPLATE LIST
        $template = get_post_meta($page->ID, '_wp_page_template', true);
        if ($template == 'default' || !$template) {
            continue;
        }
        switch ($template) {
            case 'page-altleft.php':
                $name = 'Alternative sidebar, left';
                break;
            case 'page-altright.php':
                $name = 'Alternative sidebar, right';
                break;
            case 'page-customheader.php':
                $name = 'Custom Header (see Adv Opts admin)';
                break;
            case 'page-multicolcontent.php':
                $name = '2 Col Content (split w/ &lt;!--more--&gt;)';
                break;
            case 'page-onecolumniframe.php':
                $name = 'One column, iframe full width';
                break;
            case 'page-posts-excerpt.php':
                $name = 'Page with Posts (excerpts)';
                break;
            case 'page-posts-excerpt2col.php':
                $name = 'Page with Posts (excerpts - 2 cols)';
                break;
            case 'page-posts-title.php':
                $name = 'Page with Posts (title)';
                break;
            case 'page-posts-title2col.php':
                $name = 'Page with Posts (title - 2 cols)';
                break;
            case 'page-posts.php':
                $name = 'Page with Posts';
                break;
            case 'page-posts2col.php':
                $name = 'Page with Posts (2 cols)';
                break;
            case 'page-sitemap.php':
                $name = 'Sitemap';
                break;
            case 'page-wrapperonly.php':
                $name = 'Blank - (see Adv Opts admin)';
                break;
            case 'page-sitemap.php':
                $name = 'Sitemap';
                break;
            case 'pg-popup.php':
                $name = 'Pop Up';
                break;
            case 'onecolumn-page.php':
                $name = 'One column, no sidebar';
                break;
            default:
                if (strstr($template, 'paget-') !== false) {
                    $name = 'Existing Weaver II template - no action required.';
                } else {
                    $name = 'unknown: (' . $template . ')';
                }
                break;
        }
        echo '<strong><em>' . $page->post_title . '</em></strong> &nbsp; <small>(id:' . $page->ID . ')</small> &nbsp; uses template: <strong>' . $name . '</strong><br>';
        $tpl_num++;
    }
    if ($tpl_num < 1) {
        echo '<p>None of you existing pages use Weaver Page Templates.</p>';
    }
    // check on background and header image
    $updated = false;
    if (weaverii_init_base()) {
        $updated = weaverii_update_mods(WEAVER_SLUG, WEAVERII_PRO_SLUG);
    } else {
        $updated = weaverii_update_mods(WEAVER_SLUG, WEAVERII_SLUG);
    }
    echo '<hr /><strong>Appearance settings (Header, Background) copied.</strong>';
    echo '<br /><hr /><strong>Summary for ' . weaverii_getopt('wii_subtheme') . ' theme.</strong>';
    $name = weaverii_getopt('wii_themename');
    if ($name && $name != weaverii_getopt('wii_subtheme')) {
        echo ' (' . $name . ') ';
    }
    if (weaverii_getopt('wii_theme_description')) {
        echo '<br /><em>Description:</em> ' . weaverii_getopt('wii_theme_description');
    }
    echo '<br />';
    echo "<span class=\"wvr_green\">Compatible values converted:</span> {$converted}<br />\n";
    if ($plus_num > 0) {
        echo "<span class=\"wvr_green\">Weaver Plus values converted:</span> {$plus_num}<br />\n";
    }
    // echo ("Values requiring special conversion: $special<br />\n");
    // echo ("Values skipped: $skipped<br />\n");
    echo "<span class=\"wvr_yellow\">Values no longer supported or needed:</span> {$notes}<br />\n";
    echo "<span class=\"wvr_red\">Values requiring manual attention:</span> {$manual}<br />\n";
    echo "</div>\n";
}
Ejemplo n.º 6
0
function weaverii_mainopts_widgets()
{
    $opts = array(array('type' => 'submit'), array('name' => 'Widget Areas', 'id' => 'maintab5', 'type' => 'header', 'info' => 'Settings affecting widget areas', 'help' => 'help.html#WidgetAreas'), array('name' => 'Individual Widgets', 'id' => 'wii_widget_widget', 'type' => 'widget_area', 'info' => 'Properties for individual widgets (e.g., Text, Recent Posts, etc.)'), array('name' => 'Widget Padding', 'id' => 'wii_widget_widget_padding_int', 'type' => '=val_px', 'info' => 'Padding used around all sides of individual widgets. Not usually needed unless widgets have bg color.'), array('name' => 'Widget Title', 'id' => 'wii_widget_title_color', 'type' => 'ctext', 'info' => 'Color for Widget titles and labels.'), array('name' => 'Bar under Widget Titles', 'id' => 'wii_widget_header_underline_int', 'type' => 'val_px', 'info' => 'Enter size in px if you want a bar under Widget Titles. Leave blank or 0 for no bar.'), array('name' => 'Widget Area Text', 'id' => 'wii_widget_color', 'type' => 'ctext', 'info' => 'Color for widget area content (text color).'), array('name' => '<small>Widget Area Font size</small>', 'id' => 'wii_widget_size_int', 'type' => 'val_percent', 'info' => 'Font size for widgets. (Default: 120%)'), array('name' => 'Widget List Bullet', 'id' => 'wii_widgetlist_bullet', 'type' => '=select_id', 'info' => 'Bullet used for Unorderd Lists in Widget areas', 'value' => array(array('val' => 'disc', 'desc' => 'Filled Disc (default)'), array('val' => 'circle', 'desc' => 'Circle'), array('val' => 'square', 'desc' => 'Square'), array('val' => 'none', 'desc' => 'None'), array('val' => 'custom', 'desc' => 'Custom bullet'))), array('name' => '<small>Custom Bullet URL</small>', 'id' => 'wii_widgetlist_bullet_custom_url', 'type' => '+textmedia', 'info' => 'URL for "Custom" bullet image (&#9679;Pro)'), array('type' => 'submit'), array('name' => 'Sidebar Widths:', 'type' => 'note', 'info' => 'Widths of Sidebars set under Layout tab.'), array('name' => 'Primary Widget Area', 'id' => 'wii_widget_primary', 'type' => 'widget_area', 'info' => 'Properties for the Primary Sidebar Widget Area. (Applies to Mobile Widget area also.)'), array('name' => 'Upper/Right Widget Area', 'id' => 'wii_widget_right', 'type' => 'widget_area', 'info' => 'Properties for the Upper/Right Sidebar Widget Area.'), array('name' => 'Lower/Left Widget Area', 'id' => 'wii_widget_left', 'type' => 'widget_area', 'info' => 'Properties for the Lower/Left Sidebar Widget Area.'), array('name' => 'Primary, Right, Left Margins', 'type' => 'subheader_alt', 'info' => 'Left and Right margins for Primary, Upper/Right, and Lower/Left Widget areas'), array('name' => 'Left/Right Margins', 'id' => 'wii_sidbar_widget_margins', 'type' => 'text_lr', 'info' => 'Left and right margins for the sidebar widget areas.'), array('name' => 'Top Widget Areas', 'id' => 'wii_widget_top', 'type' => 'widget_area', 'info' => 'Properties for all Top Widget areas (Sitewide, Pages, Blog, Archive).'), array('name' => 'Left/Right indent', 'id' => 'wii_widget_top_indent_int', 'type' => 'val_percent', 'info' => 'Top Widget Areas: Set the left and right indents - centers widget area in content area'), array('name' => 'Bottom Widget Areas', 'id' => 'wii_widget_bottom', 'type' => 'widget_area', 'info' => 'Properties for all Bottom Widget areas (Sitewide, Pages, Blog, Archive).'), array('name' => 'Left/Right indent', 'id' => 'wii_widget_bottom_indent_int', 'type' => 'val_percent', 'info' => 'Bottom Widget Areas: Set the left and right indents - centers widget area in content area'), array('name' => 'Footer Widget Areas', 'id' => 'wii_widget_footer', 'type' => 'widget_area', 'info' => 'Properties for all Footer Widget areas.'), array('name' => 'All Widget Areas', 'type' => 'subheader_alt', 'info' => 'Properties that apply to all widget areas.'), array('name' => 'Widget Area Padding', 'id' => 'wii_widget_padding_int', 'type' => 'val_px', 'info' => 'Padding used around all sides of widget areas.'));
    ?>
<p>
Options affecting <strong>Widget Areas</strong>. This includes properties of <strong>Widgets</strong>, as well as
properties of various <strong>Widget Areas</strong>. This is also where you can define new
<strong>Per Page Widget Areas</strong>.
</p>
<?php 
    weaverii_form_show_options($opts);
    ?>
<span style="color:blue;"><b>Define Per Page Widget Areas</b></span>
<?php 
    weaverii_help_link('help.html#PPWidgets', weaverii_t_('Help for Per Page Widget Areas'));
    ?>
	<br/>
	<small>You may define extra widget areas that can then be used in the <em>Per Page</em> settings. Enter
	a list of one or more widget area names separated by commas. Your names should include only letters, numbers, or underscores -
	no spaces or other special characters. The widgets areas will then appear on the Appearance->Widgets menus. They can be included
	on individual pages by adding the name you define here to the "Weaver II Options For This Page" box on the Edit Page screen.</small>
	<br />
	<textarea name="<?php 
    weaverii_sapi_main_name('wii_perpagewidgets');
    ?>
" rows=1 style="width: 95%"><?php 
    echo esc_textarea(weaverii_getopt('wii_perpagewidgets'));
    ?>
</textarea>
	<br />
	<small>These extra widget areas are also used by the Weaver II Pro Widget Area shortcode.</small>
<?php 
    ?>

<p style="color:green;"><strong>Note: Specify the layout of sidebar widget areas on the Layout tab.
</strong></p>
<?php 
}
Ejemplo n.º 7
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 wpwii_maint_admin()
{
    if (!function_exists('weaverii_submitted')) {
        return;
    }
    ?>
<div class="wrap">
    <h1>Weaver II Maintenance Tools Version 1.1 (<?php 
    echo WEAVERII_THEMEVERSION;
    ?>
)</h1>
	<h2>Clean Weaver II Settings</h2>
	    <p>When you click "Clear All Weaver II Settings", <strong>all</strong> Weaver II settings will be cleared from the data base. This includes both Weaver II Free version and Weaver II Pro settings.</p>
	    <form id="wpw_maintweaver" name="wpw_maintweaver" action="<?php 
    get_bloginfo('wpurl');
    ?>
/wp-admin/themes.php?page=weaverii_maintenance" method="post">
		<span class="submit"><input type="submit" name="resetm_weaverii" value="Clear All Weaver II Settings"/></span>
		<?php 
    weaverii_nonce_field('resetm_weaverii');
    ?>
	    </form>
	    <br /><br />
	<hr />
<?php 
    if (get_option('weaver_main_settings') || get_option('ttw_options') || get_option('ttw_myoptions') || get_option('ttw_adminoptions') || get_option('weaver-settings') || get_option('widget_weaver_login') || get_option('widget_weaver_text') || get_option('widget_weaver_login') || get_option('weaver_advanced_settings')) {
        ?>

	<h2>Clean Old Weaver Version Settings</h2>
	    <p>Settings from previous versions of the Weaver theme have been detected. When you click "Clean OLD Weaver", <strong>all</strong> settings from previous versions of Weaver will be cleared from the data base. This includes 2010 Weaver, Weaver 1.x, Weaver 2.x, and Weaver Plus.</p>
	    <p>
		<strong style="color:red">IMPORTANT!</strong> If you need to upgrade your Weaver 2.2.x settings to Weaver II, be sure to do that BEFORE you clear your old settings!</p>
	    <form id="wpw_cleanweaver" name="wpw_cleanweaver" action="<?php 
        get_bloginfo('wpurl');
        ?>
/wp-admin/themes.php?page=weaverii_maintenance" method="post">
		<span class="submit"><input type="submit" name="reset_old_weaver" value="Clear OLD Weaver"/></span>
		<?php 
        weaverii_nonce_field('reset_old_weaver');
        ?>
	    </form>
	    <br /><br />
	<hr />
<?php 
    }
    ?>
	<h2>Upgrade Weaver 2.2.x to Weaver II</h2>
<?php 
    /* see if old Weaver 2.0 settings found, and tell them how to upgrade */
    if (!get_option('weaver_main_settings')) {
        ?>
      <div style="background-color:#FFEEEE; border: 1px solid red; margin: 0px 60px 0px 20px; padding-left:10px;width:70%">
	<p><strong>Notice:</strong> No existing settings from an older version of Weaver have been found, no upgrade possible.
	</p>
      </div>
      <?php 
    } else {
        ?>
      <div style="background-color:#EEFFEE; border: 1px solid green; margin: 0px 60px 0px 20px; padding-left:10px;width:70%">
	<p><strong>Notice:</strong> Existing settings from an older version of Weaver have been found.
	Click the ? Help button for more information.
	<?php 
        weaverii_help_link('help.html#UpgradingWeaver', 'Help for Advanced Options');
        ?>
	</p>
      </div>
      <br /> <br />
      <form name="resetweaverii_form" method="post">
	    <strong>Click the Convert Old Weaver Settings button to convert the settings from the previous version to the
	    new Weaver II settings.</strong><br />
<?php 
        if (weaverii_init_base()) {
            ?>
	    This will also convert Weaver Plus settings if they are present.<br />
<?php 
        }
        ?>
	    <em>Warning: You will lose all current settings.</em> You should use the
	    Save/Restore tab to save a copy of your current settings before converting!<br /><br />
	    <span class="submit"><input type="submit" name="convertm_weaver" value="Convert Old Weaver Settings"/></span>
	    <?php 
        weaverii_nonce_field('convertm_weaver');
        ?>
	</form> <!-- wii_resetweaverii_form -->
      <?php 
    }
    ?>
</div>
<?php 
}
Ejemplo n.º 9
0
function weaverii_admin_saverestore()
{
    ?>

<div class="wvr-option-header" style="clear:both;">Save/Restore Theme Settings <?php 
    weaverii_help_link('help.html#SaveRestore', 'Help on Save/Restore Themes');
    ?>
</div><br />
<div class="wvr-option-subheader">Save/Restore Current Settings using WordPress Database</div>
<p>This option allows you to save and restore all current theme settings using your host's WordPress
database. Your options will be
preserved across Weaver II theme upgrades, as well when you change to different themes. There is only one
saved backup available. Weaver II Pro allows multiple saves using files.</p>
<p>Note: This save option saves <strong>all</strong> settings, including those marked with a &diams;. Other save options
(available with Weaver II Pro or the <em>Weaver II Theme Extras</em> plugin) will save all settings (backup save), or just
those settings that are theme related (settings <em>not</em> marked with  &diams;).</p>
<form name="wii_save_mysave_form" method="post">
		<span class="submit"><input type="submit" name="save_mytheme" value="Save Settings"/></span>
		<strong>Save all current settings in host WordPress database.</strong>
<?php 
    weaverii_nonce_field('save_mytheme');
    ?>
		<br /><br />
		<span class="submit"><input type="submit" name="restore_mytheme" value="Restore Settings"/></span>
		<strong>Restore from saved settings.</strong>
<?php 
    weaverii_nonce_field('restore_mytheme');
    ?>
	</form>

<?php 
    do_action('weaverii_child_saverestore');
    // allow additional save/restore in child */
    weaverii_saverestore();
    if (weaverii_init_base()) {
        weaverii_pro_saverestore();
    }
    do_action('weaverii_child_update');
    ?>
	<div class="wvr-option-subheader">Reset Current Settings to Default</div><br />
		<form name="resetweaverii_form" method="post" onSubmit="return confirm('Are you sure you want to reset all Weaver II settings?');">
			<strong>Click the Clear button to reset all Weaver II settings to the default values.</strong><br >
<?php 
    if (weaverii_init_base()) {
        ?>
			This will also include Weaver II Pro settings.<br />
<?php 
    }
    ?>
			<em>Warning: You will lose all current settings.</em> You should use the Save/Restore tab to save a copy
			of your current settings before clearing! <br />
			<span class="submit"><input type="submit" name="reset_weaverii" value="Clear All Weaver II Settings"/></span>
			<?php 
    weaverii_nonce_field('reset_weaverii');
    ?>
		</form> <!-- wii_resetweaverii_form -->
		<br /><hr />
<?php 
    $last = weaverii_getopt('wii_last_option');
    if ($last != 'WeaverII') {
        ?>
<p style="color:red">Possible Non-Standard Web Host Configuration detected. If your options
are not saving correctly, your host may have limited the default number of values that PHP can use for
settings. Try saving your settings again, and if this message persists, please contact your host and ask them to "Increase the PHP <em>max_input_vars</em> value for $_POST to at least 600." If that does not fix the issue,
please contact Weaver II support. (diagnostic info: last_option="<?php 
        echo $last;
        ?>
").
</p>
<?php 
    } else {
        echo "<p><small>{$last}</small></p>";
    }
}
Ejemplo n.º 10
0
function weaverii_pro_saverestore()
{
    /* admin tab for saving and restoring theme */
    $weaverii_theme_dir = weaverii_f_uploads_base_dir() . 'weaverii-theme/';
    ?>
    <div class="wvr-option-subheader">Save/Restore Settings using Files on your site host (&#9679;Pro)</div>
    <h4>You can save all your current settings in a backup file:</h4>
    <ol style="font-size: 90%">
     <li>Save <em>all</em> your current settings in a backup file on your site's file system (in <?php 
    echo $weaverii_theme_dir;
    ?>
). Automatically names the backup file to include current date and time.
     Survives Weaver II Theme updates. -or-</li>
    <li>Save only <em>theme related</em> settings to a file you name on your Site's file system (in <?php 
    echo $weaverii_theme_dir;
    ?>
.</li>
    </ol>
<?php 
    if (weaverii_allow_multisite()) {
        ?>
    <h4>You can restore a saved theme or backup file by:</h4>
    <ol style="font-size: 90%">
    <li>Restoring a theme/backup that you saved in a file on your site (to current settings). -or-</li>
    <li>Uploading a theme/backup from a file saved on your own computer (to current settings). </li>
    </ol>
<?php 
    }
    if (!weaverii_allow_multisite()) {
        ?>
    <h4>You will be unable to restore your saved file directly</h4>
    <p>Since this is a WordPress Multi-site installation, you are restricted from uploading
    a Weaver II theme/backup from a saved file. However, the save file capability gives you the ability
    to save your work so you can transfer it to a WordPress site where you have full admin
    capabilities (non-Multi-site installation, for example), or to share with others. Please
    note that you <em>can</em> save your settings in the WordPress Database which will allow you
    to explore other predefined themes without losing your work.
    </p>
<?php 
    }
    ?>
  <br />
    <div class="wvr-option-subheader">Save All Current Settings in Backup File (&#9679;Pro)</div><br />
     <strong>Backup</strong> <u>all</u> current options in a <strong>file</strong> on your
     WordPress Site's <em><?php 
    echo $weaverii_theme_dir;
    ?>
</em> directory named 'weaverii_backup_yyyy-mm-dd-hhmm.w2b'
     where the last part is a GMT based date and time stamp.
<?php 
    if (weaverii_allow_multisite()) {
        ?>
    You will be able to restore this theme later using the <strong>Restore Saved Theme/Backup</strong> section.
<?php 
    }
    ?>
    Please be sure you've saved any changes you might have made.<br />
     <form enctype="multipart/form-data" name='backup-settings' method='post'>
	<span class='submit'><input name='backup_settings' type='submit' value='Backup All Current Settings'/></span>
    <?php 
    weaverii_nonce_field('backup_settings');
    ?>
    </form><br />

    <div class="wvr-option-subheader">Save Current Theme Related Settings to File (&#9679;Pro)</div><br />
     <strong>Save</strong> current <em>theme related</em> settings, either by downloading
    to <strong>your computer</strong> or saving a <strong>file</strong> on your WordPress Site's <em><?php 
    echo $weaverii_theme_dir;
    ?>
</em> directory.
<?php 
    if (weaverii_allow_multisite()) {
        ?>
    You will be able to restore this theme later using the <strong>Restore Saved Theme/Backup</strong> section.
<?php 
    }
    ?>
    <em>Theme related</em> settings include most standard Weaver settings <em>except</em>: Site Copyright, SEO settings,
    Weaver Pro HTML Insert areas, Background Images, FavIcons, and Weaver II Pro shortcode settings.<br /><br />

  <strong>Save as file on this website's server</strong>
 <p>Please provide a name for your file, then click the "Save File" button. <b>Warning:</b> Duplicate names will
    automatically overwrite existing file without notification.</p>
 <form enctype="multipart/form-data" name='savetheme' method='post'><table cellspacing='10' cellpadding='5'>
    <tr>
    <td>Name for saved theme: <input type="text" name="savethemename" size="30" />&nbsp;<small>(Please use a meaningful
    name - do not provide file extension. Name might be altered to standard form.)</small></td></tr>
	<tr>
	<td><span class='submit'><input name='filesavetheme' type='submit' value='Save Theme in File'/></span>&nbsp;&nbsp;
	<strong>Save Theme in File</strong> - <small>Theme will be saved in <em><?php 
    echo $weaverii_theme_dir;
    ?>
</em>
	directory on your site server.</small></td>
        </tr>
    </table>
    <?php 
    weaverii_nonce_field('filesavetheme');
    ?>
 </form><br />

<?php 
    if (weaverii_allow_multisite()) {
        ?>


    <div class="wvr-option-subheader">Restore Saved Theme/Backup from file (&#9679;Pro)</div><br />
    You can restore a previously saved theme (.w2t) or backup (.w2b) file directly from your WordPress
    Site's <em><?php 
        echo $weaverii_theme_dir;
        ?>
</em> directory, or from a file saved on your computer.
    Note: after you restore a saved theme, it will be loaded into the current settings. A <em>theme</em> restore will
    replace only settings that are not site-specific. A <em>backup</em> file will replace all current settings.
    If you've uploaded the theme from your computer, you might then want to also save a local copy on your
    website server.<br /><br />

    <form enctype="multipart/form-data" name='localrestoretheme' method='post'><table cellspacing='10' cellpadding='5'>
    <table>
    <tr><td><strong>Restore from file saved on this website's server</strong></td></tr>
    <tr>
        <td>Select theme/backup file: <?php 
        weaverii_subtheme_list('wii_restorename');
        ?>
&nbsp;Note: <strong>.w2t</strong> are Theme definitions. <strong>.w2b</strong> are full backups. (Restores to current settings.)</td></tr>
	<tr>
	<td><span class='submit'><input name='restoretheme' type='submit' value='Restore Theme/Backup'/></span>&nbsp;&nbsp;
	<strong>Restore</strong> a theme/backup you've previously saved on your site's <em><?php 
        echo $weaverii_theme_dir;
        ?>
</em> directory. Will replace current settings.</td>
    </tr>
        <tr><td>&nbsp;</td></tr>
    </table>
    <?php 
        weaverii_nonce_field('restoretheme');
        ?>
    </form>

<div class="wvr-option-subheader">Save Settings for Alternate Mobile Theme (&#9679;Pro)<?php 
        weaverii_help_link('help.html#AltMobileTheme', 'Help on Alternate Mobile Theme');
        ?>
</div>
<p>This will save your current settings to a special Mobile Settings database entry. You can use this to create a totally
separate style used when the site is viewed from a Mobile device. You <strong>must</strong> enable the
<em>Use Alternate Mobile Theme</em> option on the Advanced:Mobile tab for these settings to be used. <strong>IMPORTANT!</strong> Be sure to save backup copies of both your normal and mobile theme settings using one of the above
save to file options. You will need them to be able to tweak the alternate mobile theme settings.</p>
  <form name="wii_save_mobile_form" method="post"
	<span class="submit"><input type="submit" name="save_mobiletheme" value="Save Settings for Mobile View"/></span>
	<strong>Save all current settings in Alternate Mobile Theme Settings.</strong>
<?php 
        weaverii_nonce_field('save_mobiletheme');
        ?>
    </form>


    <form enctype="multipart/form-data" name='themenames' method='post'>
    <div class="wvr-option-subheader">Theme Name and Description (&#9679;Pro)</div>
        <p>You can change the name an description of your current settings if you would like to create a new theme
	theme file for sharing with others, or for you own identification.
	</p>
	<input name="wii_themename" id="wii_themename" value="<?php 
        echo weaverii_getopt('wii_themename');
        ?>
" />
	<br />
	<textarea name="wii_theme_description" id="_wii_favicon_url" rows=2 style="width: 350px"><?php 
        echo esc_textarea(weaverii_getopt('wii_theme_description'));
        ?>
</textarea>
	<br />
        <span class='submit'><input name='renametheme' type='submit' value='Save Theme Name and Description'/></span>
        <?php 
        weaverii_nonce_field('renametheme');
        ?>
    </form>
    <br />

    <form enctype="multipart/form-data" name='maintaintheme' method='post'>
    <div class="wvr-option-subheader" >Subtheme and Backup File Maintenance (&#9679;Pro)</div><br />
        <?php 
        weaverii_subtheme_list('selectName');
        ?>

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

		<!-- ======== -->
		<div class="wvr-option-subheader">SEO/Meta Tags (legacy support)</div><br/>
		<p>Previous versions of Weaver II supported two &lt;meta&gt; tags: "description" and "keywords". This is no
		longer supported. If you want these values in your site, you can use the <em>Advanced Options : &lt;HEAD&gt;
		Section</em> option to add them.</p>

<input name="<?php 
    weaverii_sapi_main_name('_wii_metainfo');
    ?>
" id="<?php 
    echo '_wii_metainfo';
    ?>
" type="hidden" value="<?php 
    echo esc_textarea(addslashes(weaverii_getopt('_wii_metainfo')));
    ?>
" />

<?php 
    $oldmeta = weaverii_getopt('_wii_metainfo');
    if ($oldmeta != '') {
        ?>
		<p>You have a value for this meta information saved in your settings - probably from a previous
		version of Weaver II. If you had set these to something other than the default, you might want
		to copy/paste these into the <em>Advanced Options : &lt;HEAD&gt; Section</em> option. Otherwise,
		you should consider using an SEO plugin.</p>

		<p style="background:#ddd;">
			<?php 
        echo esc_textarea($oldmeta);
        ?>
		</p>
<?php 
    }
}
function weaveriip_sc_iframe_admin()
{
    ?>
    <label><span style="color:blue;font-weight:bold; font-size: larger;"><b>iFrame - [weaver_iframe]</b></span></label>&nbsp;
<?php 
    weaverii_help_link('help.html#sciframe', 'Help for Weaver iFrame');
    ?>
<p>The <code>[weaver_iframe]</code> shortcode allows you easily display the content of an external site. You simply have to specify
the URL for the external site, and optionally a height. This shortcode automatically generates the correct HTML &lt;iframe&gt; code.</p>

<p><strong>Shortcode usage:</strong> <code>[weaver_iframe src='http://example.com' height=600 percent=100 style="style"]</code>
<br />
<ol>
    <li><strong>src='http://example.com'</strong> - The standard URL for the external site.
    </li>
    <li><strong>height=600</strong> - Optional height to allocate for the site - in px. Default is 600.
    </li>
    <li><strong>percent=100</strong> - Optional width specification in per cent. Default is 100%.
    </li>
    <li><strong>style="style"</strong> - Optional style values. Added to &lt;iframe&gt; tag as style="values" (shortcode adds double quotation marks).
    </li>
</ol>
</p>

<?php 
}
Ejemplo n.º 14
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');
}
Ejemplo n.º 15
0
function weaverii_admin_subthemes()
{
    ?>

<h3>Predefined Weaver II Subthemes
<?php 
    weaverii_help_link('help.html#PredefinedThemes', 'Help for Weaver II Predefined Themes');
    ?>
<small style="font-weight:normal;font-size:10px;">&nbsp;&larr; You can click the ?'s found throughout Weaver II admin pages for context specific help.</small></h3>
<b>Welcome to Weaver II</b>

<p>Weaver II gives you extreme control of your WordPress blog appearance using the
different admin tabs here. This tab lets you get a quick start by picking one of the many
predefined subthemes. Once you've picked a starter theme, use the <em>Main Options</em> and <em>Advanced Options</em>
tabs to tweak the theme to be whatever you like. After you have a theme you're happy with,
you can save it from the Save/Restore tab. The <em>Help</em> tab has much more <b>useful</b> information.</p>

<p>We realize Weaver II has a <strong>lot</strong> of options. To help make it easier to get started,
you can click the "Hide Advanced Options" button found on the right side of the screen wherever a
"Save Options" button is found, and a simplified set of options will be displayed. Just click the "Show All Options" button
to once again show all options.</p>


<h3 class="wvr-option-subheader" style="color:red;font-style:italic">Visit our
<?php 
    weaverii_site('/subthemes/');
    ?>
website</a> for even more great looking subthemes!</h3>
<table><tr><td><img src="<?php 
    echo weaverii_relative_url('/images/');
    ?>
addon_themes.png" alt="addons" /></td>
<td><p style="margin-left:10px;">All the subthemes included here provide a great starting point, but we're trying hard to make even more great looking subthemes available for you to try. Click to check out our
<?php 
    weaverii_site('/subthemes/');
    ?>
<strong>Subthemes</strong></a> page now on the main Weaver II website.
</p></td></tr></table>

<?php 
    if (!has_action('weaverii_child_show_extrathemes')) {
        echo '<p>We suggest that you download the Weaver II Theme Extras Plugin for easy access to new subthemes.</p>';
    }
    do_action('weaverii_child_show_extrathemes');
    ?>

<h3 class="wvr-option-subheader">Get started by trying one of the predefined subthemes!</h3>
<?php 
    $theme_dir = trailingslashit(WP_CONTENT_DIR) . 'themes/' . get_template() . '/subthemes/';
    $theme_list = array();
    if ($media_dir = opendir($theme_dir)) {
        // build the list of themes from directory
        while ($m_file = readdir($media_dir)) {
            $len = strlen($m_file);
            $base = substr($m_file, 0, $len - 4);
            $ext = $len > 4 ? substr($m_file, $len - 4, 4) : '';
            if ($ext == '.w2t') {
                $theme_list[] = $base;
            }
        }
    }
    if (!empty($theme_list)) {
        weaverii_st_pick_theme($theme_list);
        // show the theme picker
    } else {
        echo "<h3>WARNING: Your version of Weaver II is likely installed incorrectly. Unable to find subtheme defiitions.</h3>\n";
    }
}
Ejemplo n.º 16
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();
}