From a19ca4686c8e740c398c3a58a9f4787dd9dcb888 Mon Sep 17 00:00:00 2001 From: koopersmith Date: Mon, 30 Apr 2012 17:20:32 +0000 Subject: [PATCH] Theme Customizer: Pass the WP_Customize instance to all actions fired inside the class. Plugins/themes should not refer to the $wp_customize global. see #19910, #20448. git-svn-id: http://svn.automattic.com/wordpress/trunk@20649 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-includes/class-wp-customize.php b/wp-includes/class-wp-customize.php index cdb4f60ba8..6b8230eb0c 100644 --- a/wp-includes/class-wp-customize.php +++ b/wp-includes/class-wp-customize.php @@ -111,7 +111,7 @@ final class WP_Customize { add_filter( 'pre_option_stylesheet_root', array( $this, 'get_stylesheet_root' ) ); add_filter( 'pre_option_template_root', array( $this, 'get_template_root' ) ); - do_action( 'start_previewing_theme' ); + do_action( 'start_previewing_theme', $this ); } /** @@ -139,7 +139,7 @@ final class WP_Customize { remove_filter( 'pre_option_stylesheet_root', array( $this, 'get_stylesheet_root' ) ); remove_filter( 'pre_option_template_root', array( $this, 'get_template_root' ) ); - do_action( 'stop_previewing_theme' ); + do_action( 'stop_previewing_theme', $this ); } /** @@ -148,7 +148,7 @@ final class WP_Customize { * @since 3.4.0 */ public function wp_loaded() { - do_action( 'customize_register' ); + do_action( 'customize_register', $this ); if ( $this->is_preview() && ! is_admin() ) $this->customize_preview_init(); @@ -187,7 +187,7 @@ final class WP_Customize { $setting->preview(); } - do_action( 'customize_preview_init' ); + do_action( 'customize_preview_init', $this ); } @@ -334,7 +334,7 @@ final class WP_Customize { $this->start_previewing_theme(); } - do_action( 'customize_save' ); + do_action( 'customize_save', $this ); foreach ( $this->settings as $setting ) { $setting->save();