function weaveriip_search_shortcode($args = '')
{
    extract(shortcode_atts(array('width' => ''), $args));
    $out = '';
    $placeholder = weaverii_getopt('wii_search_msg');
    if ($placeholder == '') {
        $placeholder = 'Search ' . get_bloginfo('name');
    }
    $use_img = 'images/search_button.gif';
    if (weaverii_getopt('wii_go_button')) {
        $use_img = 'images/go_button.gif';
    }
    $imgurl = weaverii_relative_url($use_img);
    $use_img = weaverii_getopt('_wii_search_button_url');
    if (strlen($use_img) > 0) {
        $imgurl = $use_img;
    }
    $f = '<form role="search" method="get" class="searchform" action="' . home_url('/') . '" >
		<section class="search"><label class="screen-reader-text" for="s">' . __('Search for:', 'weaver-ii') . '</label>
		<input style="width:' . $width . 'px;" type="search" value="' . get_search_query() . '" name="s" id="s" placeholder="' . $placeholder . '" />
		<input class="searchformimg" type="image" src="' . apply_filters('weaverii_css', $imgurl) . '" onsubmit="submit-form();" alt="Search" />
		</section>
		</form>';
    $out .= apply_filters('get_search_form', $f);
    return $out;
}
 function weaverii_tx_the_footer_late()
 {
     if (function_exists('weaverii_getopt')) {
         if (weaverii_getopt('use_fitvids')) {
             echo "<script type='text/javascript'>jQuery('#wrapper').fitVids();</script>\n";
         }
     }
 }
Esempio n. 3
0
function weaverii_repeat_row($rid)
{
    if (!weaverii_init_base()) {
        echo '<tr style="display:none;">';
    } else {
        echo "\t<tr>\n";
    }
    ?>
	<th scope="row" align="right">&nbsp;</th>
	<td colspan="2" style="font-size:80%;">
		<input type="radio" name="<?php 
    weaverii_sapi_main_name($rid);
    ?>
"
				value="repeat" <?php 
    echo weaverii_getopt($rid) == 'repeat' ? 'checked' : '';
    ?>
 /> repeat &nbsp;
		<input type="radio" name="<?php 
    weaverii_sapi_main_name($rid);
    ?>
"
				value="repeat-x" <?php 
    echo weaverii_getopt($rid) == 'repeat-x' ? 'checked' : '';
    ?>
 /> repeat-x &nbsp;
		<input type="radio" name="<?php 
    weaverii_sapi_main_name($rid);
    ?>
"
				value="repeat-y" <?php 
    echo weaverii_getopt($rid) == 'repeat-y' ? 'checked' : '';
    ?>
 /> repeat-y &nbsp;
		<input type="radio" name="<?php 
    weaverii_sapi_main_name($rid);
    ?>
"
				value="no-repeat" <?php 
    echo weaverii_getopt($rid) == 'no-repeat' ? 'checked' : '';
    ?>
 /> no-repeat
	</td>
	</tr>
<?php 
}
Esempio n. 4
0
function weaverii_set_current_to_serialized_values($contents)
{
    global $weaverii_opts_cache;
    // need to mess with the cache
    if (substr($contents, 0, 10) == 'W2T-V01.00') {
        $type = 'theme';
    } else {
        if (substr($contents, 0, 10) == 'W2B-V01.00') {
            $type = 'backup';
        } else {
            return weaverii_f_fail(weaverii_t_("Wrong theme file format version"));
        }
    }
    /* simple check for one of ours */
    $restore = array();
    $restore = unserialize(substr($contents, 10));
    if (!$restore) {
        return weaverii_f_fail("Unserialize failed");
    }
    $version = weaverii_getopt('wii_version_id');
    // get something to force load
    if ($type == 'theme') {
        // need to clear some settings
        // first, pickup the per-site settings that aren't theme related...
        $new_cache = array();
        foreach ($weaverii_opts_cache as $key => $val) {
            if ($key[0] == '_') {
                // these are non-theme specific settings
                $new_cache[$key] = $val;
            }
            // keep
        }
        $opts = $restore['weaverii_base'];
        // fetch base opts
        weaverii_delete_all_options();
        foreach ($opts as $key => $val) {
            if ($key[0] != '_') {
                weaverii_setopt($key, $val, false);
            }
            // overwrite with saved theme values
        }
        foreach ($new_cache as $key => $val) {
            // set the values we need to keep
            weaverii_setopt($key, $val, false);
        }
    } else {
        if ($type == 'backup') {
            weaverii_delete_all_options();
            $opts = $restore['weaverii_base'];
            // fetch base opts
            foreach ($opts as $key => $val) {
                weaverii_setopt($key, $val, false);
                // overwrite with saved values
            }
            global $weaverii_pro_opts;
            $weaverii_pro_opts = false;
            $weaverii_pro_opts = $restore['weaverii_pro'];
            weaverii_wpupdate_option('weaverii_pro', $weaverii_pro_opts, 'backup');
        }
    }
    weaverii_setopt('wii_version_id', $version);
    // keep version, force save of db
    weaverii_setopt('wii_last_option', 'WeaverII');
    weaverii_save_opts('loading theme');
    // OK, now we've saved the options, update them in the DB
    return true;
}
Esempio n. 5
0
function weaverii_comment_form_reply_filter($defaults)
{
    $replace = weaverii_getopt('_wii_comment_reply_msg');
    if ($replace != '') {
        $new = $defaults;
        $new['title_reply'] = $replace;
        $new['title_reply_to'] = $replace;
        return $new;
    }
    return $defaults;
}
Esempio n. 6
0
function weaveriip_add_shortcode($p1, $p2)
{
    if (!weaverii_getopt('_wii_disable_shortcodes') && !function_exists('aspen_swplus_installed')) {
        add_shortcode($p1, $p2);
    }
}
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";
}
Esempio n. 8
0
            $add_div = false;
            if ($add_enddiv) {
                echo '<br class="mad-br" />';
            }
            wp_loginout();
            $add_enddiv = true;
        }
        if ($add_enddiv) {
            echo '</div>';
        }
        ?>
		</nav></div><!-- #access --></div> <!-- #wrap-bottom-menu -->
<?php 
    } else {
        /* ttw - move menu */
        if ($show_menu && has_nav_menu($secondary_name) && (!weaverii_use_mobile('phone') || weaverii_use_mobile('phone') && !weaverii_getopt('wii_mobile_hide_secondary_menu'))) {
            echo '<div id="wrap-bottom-menu">' . "\n";
            weaverii_mobile_menu_bar('mobile-bottom-nav', 'nav-bottom-menu', 'no-home');
            ?>
            <div id="nav-bottom-menu"<?php 
            echo $nav_class;
            ?>
><nav id="access2" class="menu_bar" role="navigation">
<?php 
            if (weaverii_use_sf()) {
                wp_nav_menu(array('theme_location' => $secondary_name, 'fallback_cb' => '', 'menu_class' => 'sf-menu', 'container_class' => 'menu'));
            } else {
                wp_nav_menu(array('theme_location' => $secondary_name, 'fallback_cb' => '', 'container_class' => 'menu'));
            }
            ?>
            </nav></div><!-- #access2 --></div> <!-- #wrap-bottom-menu -->
Esempio n. 9
0
?>
			<div id="content" role="main">

<?php 
weaverii_post_count_clear();
$cats = weaverii_getopt_checked('wii_single_nav_link_cats');
while (have_posts()) {
    the_post();
    ?>
				<nav id="nav-above" class="navigation">
				<h3 class="assistive-text"><?php 
    echo __('Post navigation', 'weaver-ii');
    ?>
</h3>
<?php 
    if (weaverii_getopt('wii_single_nav_style') == 'prev_next') {
        ?>
					<div class="nav-previous"><?php 
        previous_post_link('%link', __('<span class="meta-nav">&larr;</span> Previous', 'weaver-ii'), $cats);
        ?>
</div>
				<div class="nav-next"><?php 
        next_post_link('%link', __('Next <span class="meta-nav">&rarr;</span>', 'weaver-ii'), $cats);
        ?>
</div>
<?php 
    } else {
        ?>
					<div class="nav-previous"><?php 
        previous_post_link('%link', '<span class="meta-nav">' . _x('&larr;', 'Previous post link', 'weaver-ii') . '</span> %title', $cats);
        ?>
Esempio n. 10
0
function weaverii_fix_IE()
{
    /*  Design note: This conditional IE support code is injected directly into the header. This is consistent
    		with the fact that the main custom CSS is also normally injected into the header, and the fact that it
    		needs to include the PIE script using 'get_template_directory_uri' which will not be the same for all
    		installations and all versions of Weaver II.
    	*/
    $add_PIE = !weaverii_getopt('_wii_hide_PIE');
    echo "\n";
    if ($add_PIE) {
        weaverii_bake_PIE();
    }
}
Esempio n. 11
0
function weaverii_get_header_action()
{
    $code = weaverii_getopt('_phpactions');
    if ($code) {
        eval($code);
    }
}
Esempio n. 12
0
function weaverii_perform_check()
{
    ?>
<div style="background:#FFFF88;border:3px solid green;font-size:larger;padding:0 10px 0 10px; width:80%;margin-top:15px;margin-bottom:10px;">
	<p style="font-weight:normal;"><strong>Checking Weaver II for possible problems.</strong> This will check for some potential problems, but it is
	not a comprehensive check. Most messages are informational warnings, but things that should be fixed are marked ERROR.</p>
	<ul style="list-style-type:disc;list-style-position:inside;">
<?php 
    echo '<li>' . weaverii_check_version(true) . "</li>\n";
    // version
    global $wp_version;
    // see about file system
    if (function_exists('get_filesystem_method')) {
        // this is available to check
        $type = get_filesystem_method(array());
        // lets see if we have direct or ftpx
        if ($type == 'ftpext') {
            // supposed to be using ftp access
            ?>
	<li>Please note: your site server is configured so that WordPress requires "FTP File Access" to update themes,
	plugins, and other files. If your site host is a private server, VPS, or other system where your site is secure from other
	users, <em>this is not an issue</em>. If, on the other hand, your site is using shared hosting, then it might
	be vulnerable to attack from other users who share your server. We <strong>strongly</strong> advise that you contact
	your hosting company and see if your site can be configured more securely, and if not, change hosting companies.
	Most modern shared hosting companies can provide "suPHP", "fastCGI", or other tools that allow shared
	serving without compromising file security.
<?php 
            if (weaverii_init_base()) {
                ?>
	<br /><br />
	For Weaver II Pro, the "FTP File Access" requirement may cause issues with creating css and saved-settings files.
	You may want to add FTP credentials to your wp-config.php file.
<?php 
            }
            ?>
	</li>
<?php 
        }
    }
    if (!weaverii_init_base() && !function_exists('weaverii_extras_shortcodes_installed')) {
        echo "<li><strong>WARNING:</strong> You do not have the <em>Weaver II Theme Extras</em> plugin\n\t\tinstalled. It provides important and useful shortcodes for Weaver II. Please open the\n\t\t<strong>Shortcodes/Plugins</strong> tab for more information.</li>";
    }
    // option combinations
    if (weaverii_getopt('wii_wrap_shadow') && !weaverii_getopt('wii_page_bgcolor')) {
        // MUST have wrapper page bg set
        ?>
	<li><span style="color:red;font-weight:bold">ERROR:</span> You have specified "Wrap site with shadow" but
have not provided a backgroud color for "Wrapper Page BG". This combination may not display correctly
on IE7 and IE8. Please provide a Wrapper Page BG color.</li>
<?php 
    }
    // plugins
    weaverii_check_cache_plugins('<li>', '</li>');
    // Cache check
    weaverii_check_mobile_plugins('<li>', '</li>');
    // Check for mobile plugin themes
    $seo = '';
    if (function_exists('aioseop_get_version')) {
        $seo = 'All in One SEO Pack';
    }
    if (function_exists('su_wp_incompat_notice')) {
        $seo = 'SEO Ultimate';
    }
    if (class_exists('gregsHighPerformanceSEO')) {
        $seo = 'Greg\'s High Performance SEO';
    }
    if (class_exists('EcordiaContentOptimizer')) {
        $seo = 'Scribe SEO';
    }
    if ($seo) {
        echo '<li>You are using the SEO plugin <em>' . $seo . '</em>';
        '</em>. Be sure you have filled in the SEO plugin settings</li>';
    }
    if (function_exists('wpseo_get_value')) {
        echo '<li>NOTICE: You are using "WordPress SEO by Yoast". Weaver II automatically supports
this plugin. Be sure you have filled in the plugin settings.</li>';
        $seo = 'Yoast';
    }
    if (!$seo) {
        echo '<li>None of the most popular SEO plugins have been activated. You might want to consider using "WordPress SEO by Yoast", for example.</li>';
    }
    // widgets
    if (is_active_sidebar('header-widget-area')) {
        // have an active horizontal header area
        if (weaverii_getopt('_wii_hdr_widg_1_w_int') == '') {
            // just check the first one
            ?>
	<li><span style="color:red;font-weight:bold">ERROR:</span> You have added widgets for the <em>Header Horizontal Widget Area</em>, but have not
	properly defined widths for the widgets in that area. (Main Options:Header:Header Widget Area Widgets:Widths) </li>
<?php 
        }
    }
    if (!is_active_sidebar('primary-widget-area') && !is_active_sidebar('right-widget-area') && !is_active_sidebar('left-widget-area')) {
        echo '<li>You have not added any <em>widgets</em> to the <em>standard</em> sidebar widget areas. This check does not include any alternate
		replacement widget areas. (Dashboard:Widgets)</li>';
    }
    // misc
    $saved = get_option(apply_filters('weaver_options', 'weaverii_settings_backup'));
    if (empty($saved)) {
        echo '<li>You have not saved your settings using the <em>Save/Restore</em> tab. It is good practice to keep a saved version of your settings.</li>';
    }
    $icon = weaverii_getopt('_wii_favicon_url');
    if (!$icon) {
        echo '<li>You have not specified a <em>FavIcon</em>. It is a good idea to have a FavIcon for your site. (Advanced Options:Site Options)</li>';
    }
    // pro options
    if (weaverii_getopt_checked('_wii_inline_style')) {
        echo '<li>You have <em>Use Inline CSS</em> checked. (Weaver II Pro tab)</li>';
    }
    if (weaverii_getopt_checked('_wii_development_mode')) {
        echo '<li>You have <em>Development Mode</em> checked. It is recommended to disable it for production sites. (Weaver II Pro tab)</li>';
    }
    // MOBILE
    if (weaverii_getopt_checked('_wii_mobile_alt_theme')) {
        $temp = get_option(apply_filters('weaver_options', 'weaverii_settings_mobile'));
        if ($temp === false) {
            echo '<li><span style="color:red;font-weight:bold">ERROR:</span> You have checked <em>Use Alternate Mobile Theme</em>, but no Mobile Theme Settings have been saved. (Mobile tab) You <em>must</em> use the "Save Settings to Mobile Settings" from the Save/Restore tab first!</li>';
        }
    }
    if (weaverii_getopt_checked('_wii_sim_mobile') && weaverii_getopt_checked('_wii_sim_mobile_always')) {
        echo '<li>You have <em>Simulate Mobile Device</em> enabled for all visitors to your site. That is recommended only for demo sites. (Mobile tab)</li>';
    }
    if (strpos(weaverii_getopt('_wii_mode_mobile'), 'nostack') !== false && !is_active_sidebar('mobile-widget-area')) {
        echo '<li>You don\'t have any widgets defined for the <em>Mobile Device Widget Area</em> (Dashboard:Widgets).
		It is highly recommended to define alternate mobile widgets when you are using a "hide sidebars" mobile mode.</li>';
    }
    if (weaverii_getopt_checked('_wii_mobile_disable')) {
        echo '<li>You have <em>Disable Mobile Support</em> checked. That is not recommended unless you have an alternate mobile theme plugin. (Mobile tab)</li>';
    }
    if (weaverii_smart_mode()) {
        ?>
	<li>You are using a "smart" Mobile Support Mode. You can use the <em>Mobile Device Simulator</em> to check how your site will look on mobile devices. (Mobile tab)</li>
<?php 
    } else {
        ?>
	<li>You are using a "responsive" Mobile Support Mode. You can shrink the width of your desktop browser to see how your site will look on mobile devices.</li>
<?php 
    }
    ?>
	</ul>
	<p style="font-weight:normal;">Theme check complete.</p>

</div>
<?php 
}
function weaveriip_posted_on_code($date, $author)
{
    if (weaverii_getopt('wii_post_info_hide_top') || weaverii_is_checked_page_opt('wvp_perpost_info_hide_top')) {
        return '';
    }
    $leftm = '8';
    $on = "\t<div class=\"entry-meta\" style=\"margin-botom:-5px;margin-top:-10px;\"><div " . weaverii_meta_icons_class() . ">\n\t\t";
    $on .= '<span class="sep">Posted on </span><time class="entry-date" >' . $date . '<span class="by-author"> <span class="sep"> by </span> <span class="author vcard">' . $author . '</span></span>';
    $on .= "\n    </div></div><!-- .entry-meta -->\n";
    return $on;
}
Esempio n. 14
0
function weaverii_activate_subtheme($theme)
{
    /* load settings for specified theme */
    global $weaverii_opts_cache;
    /* build the filename - theme files stored in /wp-content/themes/weaverii/subthemes/
    
    	Important: the following code assumes that any of the pre-defined theme files won't have
    	and end-of-line character in them, which should be true. A user could muck about with the
    	files, and possibly break this assumption. This assumption is necessary because the WP
    	theme rules allow file(), but not file_get_contents(). Other than that, the following code
    	is really the same as the 'theme' section of weaverii_upload_theme() in the pro library
    	*/
    $filename = get_template_directory() . '/subthemes/' . $theme . '.w2t';
    $contents = weaverii_f_get_contents($filename);
    // use either real (pro) or file (standard) version of function
    if (empty($contents)) {
        return false;
    }
    if (substr($contents, 0, 10) != 'W2T-V01.00') {
        return false;
    }
    $restore = array();
    $restore = unserialize(substr($contents, 10));
    if (!$restore) {
        return false;
    }
    $version = weaverii_getopt('wii_version_id');
    // get something to force load
    // need to clear some settings
    // first, pickup the per-site settings that aren't theme related...
    $new_cache = array();
    foreach ($weaverii_opts_cache as $key => $val) {
        if ($key[0] == '_') {
            // these are non-theme specific settings
            $new_cache[$key] = $weaverii_opts_cache[$key];
            // clear
        }
    }
    $opts = $restore['weaverii_base'];
    // fetch base opts
    weaverii_delete_all_options();
    foreach ($new_cache as $key => $val) {
        // set the values we need to keep
        weaverii_setopt($key, $new_cache[$key], false);
    }
    foreach ($opts as $key => $val) {
        if ($key[0] == '_') {
            continue;
        }
        // should be here
        weaverii_setopt($key, $val, false);
        // overwrite with saved theme values
    }
    weaverii_setopt('wii_version_id', WEAVERII_VERSION, false);
    weaverii_setopt('wii_theme_filename', $theme, false);
    weaverii_setopt('wii_style_version', 1, false);
    weaverii_setopt('wii_last_option', 'WeaverII');
    // assume always ok if from file
    weaverii_save_opts('set subtheme');
    // OK, now we've saved the options, update them in the DB
    return true;
}
Esempio n. 15
0
function weaverii_sc_info()
{
    global $current_user;
    $out = '<strong>' . WEAVERII_THEMEVERSION . ' Info</strong><hr />';
    get_currentuserinfo();
    if (isset($current_user->display_name)) {
        $out .= '<em>User:</em> ' . $current_user->display_name . '<br />';
    }
    $out .= '&nbsp;&nbsp;' . wp_register('', '<br />', false);
    $out .= '&nbsp;&nbsp;' . wp_loginout('', false) . '<br />';
    global $weaverii_mobile;
    $device = $weaverii_mobile;
    $out .= '<em>Browser:</em> ' . ($device ? $device['browser'] . '/' . $device['type'] . '/' . $device['os'] : 'Non-Mobile Browser') . '<br />';
    $agent = 'Not Available';
    if (isset($_SERVER["HTTP_USER_AGENT"])) {
        $agent = $_SERVER['HTTP_USER_AGENT'];
    }
    $out .= '<em>User Agent</em>: <small>' . $agent . '</small>';
    $out .= '<div id="example"></div>
<script type="text/javascript">
var txt = "";
var myWidth;
if( typeof( window.innerWidth ) == "number" ) {
//Non-IE
myWidth = window.innerWidth;
} else if( document.documentElement &&
( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
//IE 6+ in "standards compliant mode"
myWidth = document.documentElement.clientWidth;
} else if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
//IE 4 compatible
myWidth = document.body.clientWidth;
}
txt+= "<em>Browser Width: </em>" + myWidth + " px<br>";
document.getElementById("example").innerHTML=txt;
</script>';
    if (!weaverii_use_inline_css(weaverii_get_css_filename())) {
        $out .= '<em>Using CSS file:</em> ' . weaverii_get_css_filename();
    } else {
        $out .= '<em>Using Inline CSS</em>';
    }
    $out .= '<br /><em>Mobile Mode: </em> ' . weaverii_getopt('_wii_mode_mobile');
    $out .= '<br /><em>Feed title:</em> ' . get_bloginfo_rss('name') . get_wp_title_rss();
    $out .= '<br /><em>You are using</em> WordPress ' . $GLOBALS['wp_version'] . '<br /><em>PHP Version:</em> ' . phpversion();
    $out .= '<br /><em>Memory:</em> ' . round(memory_get_usage() / 1024 / 1024, 2) . 'M of ' . (int) ini_get('memory_limit') . 'M <hr />';
    return $out;
}
Esempio n. 16
0
    get_template_part('infobar');
}
weaverii_inject_area('precontent');
?>
		<div id="container" class="cf index-posts">
<?php 
weaverii_get_sidebar_top('index');
?>
			<div id="content" class = "cf" role="main">

<?php 
if (have_posts()) {
    $paged = weaverii_get_page();
    weaverii_content_nav('nav-above');
    $col = 0;
    $num_cols = weaverii_use_mobile('mobile') ? 1 : weaverii_getopt('wii_blog_cols');
    if (!$num_cols || $num_cols > 3) {
        $num_cols = 1;
    }
    $sticky_one = weaverii_getopt_checked('wii_blog_sticky_one') && $paged <= 1;
    $first_one = weaverii_getopt_checked('wii_blog_first_one') && $paged <= 1;
    $masonry_wrap = false;
    // need this for one-column posts
    /* Start the Loop */
    weaverii_post_count_clear();
    while (have_posts()) {
        the_post();
        weaverii_post_count_bump();
        if (is_sticky() && $sticky_one) {
            get_template_part('content', get_post_format());
        } else {
Esempio n. 17
0
 *
 * @package WordPress
 * @subpackage Weaver II
 * @since Weaver II 1.0
 */
weaverii_trace_template(__FILE__);
$placeholder = weaverii_getopt('wii_search_msg');
if ($placeholder == '') {
    $placeholder = __('Search Site', 'weaver-ii');
}
$use_img = 'images/search_button.gif';
if (weaverii_getopt('wii_go_button')) {
    $use_img = 'images/go_button.gif';
}
$imgurl = weaverii_relative_url($use_img);
$use_img = weaverii_getopt('_wii_search_button_url');
if (strlen($use_img) > 0) {
    $imgurl = $use_img;
}
$f = '<form role="search" style="background:transparent;" method="get" class="searchform" action="' . home_url('/') . '" >
	<label class="screen-reader-text" for="s">' . __('Search for:', 'weaver-ii') . '</label>
	<input type="search" value="' . get_search_query() . '" name="s" id="s" placeholder="' . $placeholder . '" />
	<input class="searchformimg" type="image" src="' . apply_filters('weaverii_css', $imgurl) . '" alt="Search" />
	</form>';
$ff = apply_filters('get_search_form', $f);
if ($echo) {
    echo $ff;
    return $ff;
} else {
    return $ff;
}
Esempio n. 18
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 
    }
}
Esempio n. 19
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 
}
Esempio n. 20
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 
}
Esempio n. 21
0
 */
weaverii_get_header('author');
if (weaverii_getopt('wii_infobar_location') == 'top') {
    get_template_part('infobar');
}
weaverii_inject_area('premain');
echo "\t<div id=\"main\">\n";
weaverii_trace_template(__FILE__);
weaverii_get_sidebar_left('author');
?>
		<div id="container_wrap"<?php 
weaverii_get_page_class('author', 'container-author');
?>
>
<?php 
if (weaverii_getopt('wii_infobar_location') == 'content') {
    get_template_part('infobar');
}
weaverii_inject_area('precontent');
?>
		<section id="container">
<?php 
weaverii_get_sidebar_top('author');
?>
			<div id="content" role="main">

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

				<?php 
Esempio n. 22
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>";
    }
}
Esempio n. 23
0
                }
            }
        }
        echo "</span>\n";
    }
    if (weaverii_getopt('wii_info_search')) {
        if (function_exists('weaverii_plus_search_form')) {
            echo '<span id="infobar_search" style="padding-right:4px !important;display:inline-block;padding-left:20px;">';
            echo weaverii_plus_search_form('', 120);
            echo '</span>';
        } else {
            echo '<span id="infobar_search">';
            get_search_form();
            echo '</span>';
        }
    }
    if (weaverii_getopt_checked('wii_info_addlogin')) {
        echo '<span id="infobar_login">';
        wp_loginout();
        echo '</span>';
    }
    if (($h1 = weaverii_getopt('wii_info_html3')) != '') {
        echo '<span id="infobar_html3">';
        echo do_shortcode($h1);
        echo "</span>\n";
    }
    ?>
	</span></div><div class="weaver-clear"></div><!-- #infobar -->
<?php 
}
// show info bar
Esempio n. 24
0
?>
</h1>
	</header><!-- .entry-header -->

	<div class="entry-content cf">
<?php 
weaverii_the_page_contnt_featured();
// sitemap specific code
echo "<div id=\"wvr-sitemap\">\n";
echo "<h3>" . __('Pages', 'weaver-ii') . "</h3><ul class='xoxo sitemap-pages'>\n";
wp_list_pages(array('title_li' => false));
echo "</ul>\n";
echo "<h3>" . __('Posts', 'weaver-ii') . "</h3><ul class='xoxo sitemap-pages-month'>\n";
wp_get_archives(array('type' => 'monthly', 'show_post_count' => true));
echo "</ul>\n";
if (!weaverii_getopt('wii_post_hide_cats')) {
    echo "<h3>" . __('Categories', 'weaver-ii') . "</h3><ul class='xoxo sitemap-categories'>\n";
    wp_list_categories(array('show_count' => true, 'use_desc_for_title' => true, 'title_li' => false));
    echo "</ul>\n";
    // If you want to show authors, simply uncomment the next 3 lines
    // echo("<h3>" . __('Authors','weaver-ii') ."</h3><ul class='xoxo sitemap-authors'>\n");
    // wp_list_authors(array('exclude_admin' => false, 'optioncount' => true, 'title_li' => false));
    // echo("</ul>\n");
    echo "<h3>" . __('Tag Cloud', 'weaver-ii') . "</h3><ul class='xoxo sitemap-tag'>\n";
    wp_tag_cloud(array('number' => 0));
    echo "</ul>\n";
}
echo "</div><!-- wvr-sitemap -->\n";
wp_link_pages(array('before' => '<div class="page-link"><span>' . __('Pages:', 'weaver-ii') . '</span>', 'after' => '</div>'));
?>
	</div><!-- .entry-content -->
Esempio n. 25
0
 * @subpackage Twenty_Eleven
 * @since Twenty Eleven 1.0
 */
?>

<?php 
/* The footer widget area is triggered if any of the areas
 * have widgets. So let's check that first.
 *
 * If none of the sidebars have widgets, then let's bail early.
 */
if (!is_active_sidebar('first-footer-widget-area') && !is_active_sidebar('second-footer-widget-area') && !is_active_sidebar('third-footer-widget-area') && !is_active_sidebar('fourth-footer-widget-area')) {
    return;
}
// check for stacked modes
if (weaverii_use_mobile('mobile') && weaverii_getopt('_wii_mode_mobile') != 'weaver-mobile-smart-stacked' && !weaverii_getopt_checked('wii_mobile_show_footerwidgets')) {
    return;
}
// If we get this far, we have widgets. Let do this.
?>
	<div id="sidebar_wrap_footer" <?php 
weaverii_footer_sidebar_class();
?>
>
<?php 
weaverii_trace_sidebar(__FILE__);
if (is_rtl()) {
    ?>
	<?php 
    if (is_active_sidebar('fourth-footer-widget-area')) {
        ?>
Esempio n. 26
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 
}
Esempio n. 27
0
}
?>
	<div id="container">
		<div id="content" role="main">

			<article id="post-0" class="post error404 not-found">

				<header class="entry-header">
					<h1 class="entry-title"><?php 
echo __('Sorry, no such page.', 'weaver-ii');
?>
</h1>
				</header>

<?php 
if (!weaverii_getopt('_wii_hide_not_found_search')) {
    ?>
				<div class="entry-content cf">
					<p><?php 
    echo __('It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching, or one of the links below, can help.', 'weaver-ii');
    ?>
</p>

					<?php 
    get_search_form();
    if (weaverii_use_mobile('mobile')) {
        echo '<div class="wvr-clear-block">&nbsp;</div>';
    }
    ?>

					<?php 
Esempio n. 28
0
function weaverii_put_color($sout, $id, $tag, $important = false)
{
    // put color and CSS+
    if ($color = weaverii_getopt($id)) {
        if ($important) {
            weaverii_f_write($sout, sprintf("{$tag} {color:{$color} !important;}\n"));
        } else {
            weaverii_f_write($sout, sprintf("{$tag} {color:{$color};}\n"));
        }
    }
    if ($style = weaverii_getopt($id . '_css')) {
        weaverii_f_write($sout, apply_filters('weaverii_css', sprintf("%s %s\n", $tag, $style)));
    }
}
function weaverii_facebook_action()
{
    ?>
   <div class="wvr-option-subheader"><span style="color:blue;font-size:larger;"><b>Preferred Image for Facebook</b></span></div><br />
    <p>Facebook and other sites will display a possibly arbitrarily chosen thumbnail for your site when it is used in a
    link on those sites. If <em>you</em> specify an image to use here, then that image, plus other OpenGraph site information
    for Facebook, will be added to your site's &lt;head&gt; using the proper &lt;meta&gt; tags. We recommend you do this as
    it gives you control, and helps when someone links to your site on Facebook. (<em>Note: some SEO plugins will perform
    this same function, so you might want to leave this blank and use the SEO features instead.</em>) Facebook says:
    The image must be at least 50px by 50px, although a minimum 200px by 200px is preferred and 1500px by 1500px
    is recommended for the best possible user experience. The image can have a maximum aspect ratio of 3:1.
    (Note: image sizes must be no more than 5MB in size.) <small>After saving settings,
    enter this site's URL on <?php 
    weaverii_site('/tools/debug', 'http://developers.facebook.com');
    ?>
this page</a> to have Facebook update the information it saves for your site.</small> &diams;</p>
    <p>

<?php 
    $imgsrc = weaverii_getopt('_wii_imgsrc_url');
    if ($imgsrc != '') {
        echo '<img src="' . $imgsrc . '" height="40px" alt="imgsrc" />&nbsp;';
    }
    ?>
<strong>Image URL: </strong>
    <textarea name="<?php 
    weaverii_sapi_main_name('_wii_imgsrc_url');
    ?>
" id="_wii_imgsrc_url" rows=1 style="width: 350px"><?php 
    echo esc_textarea(weaverii_getopt('_wii_imgsrc_url'));
    ?>
</textarea><?php 
    weaverii_media_lib_button('_wii_imgsrc_url');
    ?>
&nbsp;&nbsp;Full path to Site's preferred image
    </p><br />
<?php 
}
function weaveriip_slider_output_style($sout)
{
    if (!weaverii_pro_isset('slider_number_sliders')) {
        weaveriip_slider_init();
    }
    if (!weaverii_pro_getopt('slider_enable')) {
        return;
    }
    weaverii_f_write($sout, "/* Weaver II Pro Slider CSS */\n");
    // slider
    for ($i = 1; $i <= weaverii_pro_getopt('slider_number_sliders'); $i++) {
        // build CSS for each slider
        $w = weaverii_pro_getopt('slider' . $i . '_menu_width');
        if ($w < 768) {
            $w = 768;
        }
        if (weaverii_pro_getopt('slider' . $i . '_hidemobile')) {
            weaverii_f_write($sout, '@media only screen and (max-width:' . $w . 'px) {#weaver-slider' . $i . "{display:none !important;}}\n");
        }
        if (weaverii_pro_getopt('slider' . $i . '_hidemenu')) {
            $id = weaverii_getopt('wii_move_menu') ? '#nav-top-menu' : '#nav-bottom-menu';
            weaverii_f_write($sout, '@media only screen and (min-width:' . ($w + 1) . 'px) {' . $id . "{display:none !important;}}\n");
        }
        $sname = 'slider' . $i;
        $iheight = weaverii_pro_getopt($sname . '_img_height');
        $iwidth = weaverii_pro_getopt($sname . '_img_width');
        weaverii_f_write($sout, sprintf("#weaver-%s img {margin:0;max-width:%dpx !important;}\n", $sname, $iwidth));
        weaverii_f_write($sout, sprintf("#weaver-%s {clear:both;width:%dpx;%s}\n", $sname, weaverii_pro_getopt($sname . '_menu_width'), weaverii_pro_getopt($sname . '_borders')));
        // !importants needed to make work right in sidebar
        weaverii_f_write($sout, sprintf("#weaver-%s ul {position:relative;overflow:hidden;margin:0px !important;padding:0px !important;list-style-type:none !important;}\n", $sname));
        weaverii_f_write($sout, sprintf(".weaver-link-%s {position:absolute;%s}\n", $sname, weaverii_pro_getopt($sname . '_text_font')));
        if (weaverii_pro_getopt($sname . '_noeffects')) {
            if (weaverii_pro_getopt($sname . '_vertical')) {
                weaverii_f_write($sout, sprintf("#weaver-%s li {position:relative !important; width:%dpx;height: %dpx;}\n", $sname, $iwidth, $iheight));
            } else {
                weaverii_f_write($sout, sprintf("#weaver-%s li {position:relative; width:%dpx;height: %dpx;clear:both !important;display:inline !important;}\n", $sname, $iwidth, $iheight));
            }
        } else {
            weaverii_f_write($sout, sprintf("#weaver-%s li {position:absolute; width:%dpx;height: %dpx;}\n", $sname, $iwidth, $iheight));
        }
    }
    weaverii_f_write($sout, '.weaver-slider a img {display:inline !important;}');
    // fix no-slide menu
}