private static function _load_theme($wp_customize)
 {
     // Make sure we have a valid nonce.
     if (!wp_verify_nonce($_REQUEST['wvrx-upload-subtheme'], 'wvrx_select_subtheme')) {
         unset($_POST['wvrx-upload-subtheme']);
         unset($_REQUEST['wvrx-upload-subtheme']);
         weaverx_alert('invalid nonce upload');
         return;
     }
     unset($_POST['wvrx-upload-subtheme']);
     unset($_REQUEST['wvrx-upload-subtheme']);
     if (!isset($_POST['subtheme_picked'])) {
         weaverx_alert('Please select a subtheme to upload.');
         return;
     }
     $theme = weaverx_filter_textarea($_POST['subtheme_picked']);
     $filename = get_template_directory() . '/subthemes/' . $theme . '.wxt';
     if (!weaverx_f_exists($filename)) {
         weaverx_alert(__('Sorry, unable to upload the subtheme.', 'weaver-xtreme'));
         return false;
     }
     $contents = weaverx_f_get_contents($filename);
     // use either real (pro) or file (standard) version of function
     if (empty($contents)) {
         return false;
     }
     // Setup global vars.
     global $wp_customize;
     // upload theme from users computer
     // they've supplied and uploaded a file
     $ok = true;
     // no errors so far
     if (!self::reset_options($contents)) {
         return;
     }
     wp_redirect(home_url('/wp-admin/customize.php?return=%2Fwp-admin%2Fthemes.php%3Fpage%3DWeaverX'));
     //weaverx_alert( __('Weaver Xtreme uploaded subtheme ', 'weaver-xtreme' /*adm*/) . ucwords(str_replace('-',' ',$theme) ) );
 }
function weaverx_admin_mainopts()
{
    if (!function_exists('weaverx_get_wp_custom_logo_url')) {
        weaverx_alert(__('    ****  WARNING!  ****\\r\\n\\r\\nYou are using a new Version 3 of the Weaver Xtreme Theme Support Plugin with an older version of the Weaver Xtreme Theme. Please update to the latest Version 3 of the Weaver Xtreme Theme.\\r\\n\\r\\nTHIS VERSION DOES NOT WORK WITH OLD VERSIONS OF WEAVER XTREME!'));
    }
    ?>
<div id="tabwrap_main" style="padding-left:4px;">

<div id="tab-container-main" class='yetiisub'>
	<ul id="tab-container-main-nav" class='yetiisub'>
	<?php 
    weaverx_elink('#asp_genappear', __('Wrapping background colors, rounded corners, borders, fade, shadow', 'weaver-xtreme'), __('Wrapping Areas', 'weaver-xtreme'), '<li>', '</li>');
    weaverx_elink('#asp_widgets', __('Settings for Sidebars and Sidebar Layout', 'weaver-xtreme'), __('Sidebars &amp; Layout', 'weaver-xtreme'), '<li>', '</li>');
    weaverx_elink('#asp_full', __('Settings to create full width sites', 'weaver-xtreme'), __('Full Width', 'weaver-xtreme'), '<li>', '</li>');
    weaverx_elink('#asp_headeropts', __('Site Title/Tagline properties, Header Image', 'weaver-xtreme'), __('Header', 'weaver-xtreme'), '<li>', '</li>');
    weaverx_elink('#asp_menus', __('Menu text and bg colors and other properties; Info Bar properties', 'weaver-xtreme'), __('Menus', 'weaver-xtreme'), '<li>', '</li>');
    weaverx_elink('#asp_content', __('Text colors and bg, image borders, featured image, other properties related to all content', 'weaver-xtreme'), __('Content Areas', 'weaver-xtreme'), '<li>', '</li>');
    weaverx_elink('#asp_postspecific', __('Properties related to posts: titles, meta info, navigation, excerpts, featured images, and more', 'weaver-xtreme'), __('Post Specifics', 'weaver-xtreme'), '<li>', '</li>');
    weaverx_elink('#asp_footer', __('Footer options: bg color, borders, more. Site Copyright', 'weaver-xtreme'), __('Footer', 'weaver-xtreme'), '<li>', '</li>');
    weaverx_elink('#asp_custom', __('Font settings &amp; Custom Settings', 'weaver-xtreme'), __('Fonts &amp; Custom', 'weaver-xtreme'), '<li>', '</li>');
    ?>
	</ul>

	<?php 
    weaverx_tab_title(__('Main Options', 'weaver-xtreme'), 'help.html#MainOptions', __('Help for Main Options', 'weaver-xtreme'));
    ?>

	<div id="asp_genappear" class="tab_mainopt" >
		<?php 
    weaverx_mainopts_general();
    ?>
	</div>

	<div id="asp_widgets" class="tab_mainopt" >
		<?php 
    weaverx_mainopts_layout();
    weaverx_mainopts_widgets();
    ?>
	</div>

	<div id="asp_full" class="tab_mainopt" >
		<?php 
    weaverx_mainopts_fullwidth();
    ?>
	</div>

	<div id="asp_headeropts" class="tab_mainopt" >
	<?php 
    weaverx_mainopts_header();
    ?>
	</div>

	<div id="asp_menus" class="tab_mainopt" >
	<?php 
    weaverx_mainopts_menus();
    ?>
	</div>

	<div id="asp_content" class="tab_mainopt" >
	<?php 
    weaverx_mainopts_content();
    ?>
	</div>

	<div id="asp_postspecific" class="tab_mainopt" >
	<?php 
    weaverx_mainopts_posts();
    ?>
	</div>

	<div id="asp_footer" class="tab_mainopt" >
		<?php 
    weaverx_mainopts_footer();
    ?>
	</div>


	<div id="asp_links" class="tab_mainopt" >
	<?php 
    weaverx_mainopts_custom();
    ?>
	</div>

</div> <!-- #tab-container-main -->
<?php 
    weaverx_sapi_submit();
    ?>
</div>	<!-- #tabwrap_main -->
   <script type="text/javascript">
	var tabberMainOpts = new Yetii({
	id: 'tab-container-main',
	tabclass: 'tab_mainopt',
	persist: true
	});
</script>
<?php 
}
function weaverx_f_fail($msg)
{
    weaverx_alert($msg);
    return false;
}