From 565300e1cd8d27a81a890109a6b1a23ef23e1484 Mon Sep 17 00:00:00 2001 From: koopersmith Date: Tue, 17 Apr 2012 20:49:39 +0000 Subject: [PATCH] Theme Customizer: Display 'Save and Activate' when switching themes. Add and properties to the WP_Customize class. see #19910. git-svn-id: http://svn.automattic.com/wordpress/trunk@20495 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize.php | 6 ++++++ wp-includes/customize-controls.php | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-customize.php b/wp-includes/class-wp-customize.php index 33e0fef11..21ce6031d 100644 --- a/wp-includes/class-wp-customize.php +++ b/wp-includes/class-wp-customize.php @@ -10,6 +10,9 @@ final class WP_Customize { protected $template; protected $stylesheet; + protected $original_template; + protected $original_stylesheet; + protected $previewing = false; protected $settings = array(); @@ -81,6 +84,9 @@ final class WP_Customize { show_admin_bar( false ); + $this->original_template = get_template(); + $this->original_stylesheet = get_stylesheet(); + add_filter( 'template', array( $this, 'get_template' ) ); add_filter( 'stylesheet', array( $this, 'get_stylesheet' ) ); add_filter( 'pre_option_current_theme', array( $this, 'current_theme' ) ); diff --git a/wp-includes/customize-controls.php b/wp-includes/customize-controls.php index d77a3a97e..11661037e 100644 --- a/wp-includes/customize-controls.php +++ b/wp-includes/customize-controls.php @@ -81,7 +81,8 @@ do_action( 'customize_controls_print_scripts' );