' . esc_html__( 'Absolute Weaver Theme Support Plugin required for Save/Restore', 'absolute-weaver' ) . ''; echo '

' . aweaver_esc_markdown( __( 'Please install the free *Absolute Weaver Theme Support Plugin* from the WordPress Plugin repository to enable saving and restoring your theme settings to your own computer. This will allow you to save different versions of your designs, or transfer them to other sites.', 'absolute-weaver' ) ) . '

'; echo '' . esc_html( $this->label ) . ''; } static public function process_save( $wp_customize ) { } static private function _aweaver_filter_strip_default( $var ) { if ( ! is_string( $var ) ) { return true; } return strlen( $var ) && $var != 'default'; } static private function _save_settings( $wp_customize, $ext ) { // Note: a $_REQUEST based nonce has been verified before this function called } static public function enqueue_scripts() { // Register // no-op } } } if ( class_exists( 'WP_Customize_Control' ) && ! class_exists( 'AWeaver_Restore_WV_Settings' ) ) { class AWeaver_Restore_WV_Settings extends WP_Customize_Control { public $description = ''; public $code; static private $wvrx_error = ''; /** */ public function render_content() { echo '' . esc_html( $this->label ) . ''; } static public function process_restore( $wp_customize ) { } static private function _restore( $wp_customize ) { } static public function reset_options( $contents, $ext ) { return true; } static public function enqueue_scripts() { } static public function controls_print_scripts() { if ( self::$wvrx_error ) { echo ''; } } } } } else { // there is a plugin // do_action ('aweaver_ts_load_save', array ( AWEAVER_VERSION ) ); } if ( class_exists( 'WP_Customize_Control' ) && ! class_exists( 'AWeaver_Load_WA_Subtheme' ) ) { class AWeaver_Load_WA_Subtheme extends WP_Customize_Control { public $description = ''; public $code; static private $wvrx_error = ''; /** */ public function render_content() { $cur_theme = aweaver_getopt( 'theme_filename' ); echo '' . esc_html( $this->label ) . ''; if ( '' !== $this->description ) { echo '' . esc_html( $this->description ) . ''; } $theme_dir = trailingslashit( get_template_directory_uri() ) . 'themes/' . get_template() . '/subthemes/'; $theme_list = array( 'ajax', 'arctic-white', 'black-and-white', 'blank', 'cosmic-latte', 'full-width-dark', 'go-basic-traditional', 'go-basic-full', 'go-basic-stretched', 'go-blue', 'go-green', 'kitchen-sink', 'magazine', 'pioneer', 'plain-full-width', 'transparent-dark', 'transparent-light', ); ?>

Selecting a subtheme will reset all existing theme settings. Site settings (♦) will not be changed.', 'absolute-weaver') ); ?>

' . "\n"; } else { echo "
\n"; } } wp_nonce_field( 'wvrx_select_subtheme', 'wvrx-upload-subtheme' ); ?>

$val ) { if ( isset( $key[0] ) && $key[0] == '_' ) // these are non-theme specific settings { $new_cache[ $key ] = $val; } // keep } $opts = $restore['weaverx_base']; // fetch base opts foreach ( $opts as $key => $val ) { if ( isset( $key[0] ) && $key[0] != '_' ) { $new_cache[ $key ] = $val; } // and add rest from restore } } elseif ( $type == 'backup' ) { $opts = $restore['weaverx_base']; // fetch base opts foreach ( $opts as $key => $val ) { $new_cache[ $key ] = $val; // overwrite with saved values } } $new_cache['aweaver_version_id'] = $version; $new_cache['aweaver_css_saved'] = ''; $new_cache['settings_version'] = AWEAVER_SETTINGS_VERSION; $new_cache['last_option'] = AWEAVER_THEMENAME; $new_cache['style_date'] = date( 'Y-m-d-H:i:s' ); $opt_func = AWEAVER_DELETE_OPTION; $opt_func( AWEAVER_SETTINGS_NAME ); $opt_func = AWEAVER_UPDATE_OPTION; $opt_func( AWEAVER_SETTINGS_NAME, $new_cache ); $aweaver_opts_cache = $new_cache; aweaver_fwrite_current_css( true ); do_action( 'aweaver_save_mcecss' ); // theme support plugin saved editor css in file do_action( 'aweaver_save_gutenberg_css' ); return true; } static public function enqueue_scripts() { // Register wp_register_style( 'wvrx-ldth-css', get_template_directory_uri() . '/admin/customizer/load-subthemes/load-subthemes' . AWEAVER_MINIFY . '.css', array(), AWEAVER_VERSION ); wp_register_script( 'wvrx-ldth-js', get_template_directory_uri() . '/admin/customizer/load-subthemes/load-subthemes' . AWEAVER_MINIFY . '.js', array( 'jquery' ), AWEAVER_VERSION, true ); // Localize wp_localize_script( 'wvrx-ldth-js', 'WVRXl10n', array( 'emptyImport' => esc_html__( 'Please choose a file to import.', 'absolute-weaver' ), ) ); // Config wp_localize_script( 'wvrx-ldth-js', 'WVRXConfig', array( 'customizerURL' => admin_url( 'customize.php' ), 'exportNonce' => wp_create_nonce( 'wvrx-settings-saving' ), ) ); // Enqueue wp_enqueue_style( 'wvrx-ldth-css' ); wp_enqueue_script( 'wvrx-ldth-js' ); } static public function controls_print_scripts() { if ( self::$wvrx_error ) { echo ''; } } } }