' . esc_html__( 'Absolute Weaver Theme Support Plugin required for Save/Restore', 'absolute-weaver' ) . ''; echo '
Click "Set to Selected Subtheme" to pick new selected subtheme. Selecting a subtheme will reset all existing theme settings. Site settings (♦) will not be changed.
$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['wvrx_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-sr-css', get_template_directory_uri() . '/admin/customizer/save-restore/save-restore' . AWEAVER_MINIFY . '.css', array(), AWEAVER_VERSION ); wp_register_script( 'wvrx-sr-js', get_template_directory_uri() . '/admin/customizer/save-restore/save-restore' . AWEAVER_MINIFY . '.js', array( 'jquery' ), AWEAVER_VERSION, true ); // Localize wp_localize_script( 'wvrx-sr-js', 'WVRXl10n', array( 'emptyImport' => esc_html__( 'Please choose a file to import.', 'absolute-weaver' ), ) ); // Config wp_localize_script( 'wvrx-sr-js', 'WVRXConfig', array( 'customizerURL' => admin_url( 'customize.php' ), 'exportNonce' => wp_create_nonce( 'wvrx-settings-saving' ), ) ); // Enqueue wp_enqueue_style( 'wvrx-sr-css' ); wp_enqueue_script( 'wvrx-sr-js' ); } static public function controls_print_scripts() { if ( self::$wvrx_error ) { echo ''; } } } }