From 82c5f5ed9bfa169778d732efbf7527524e0a16c3 Mon Sep 17 00:00:00 2001 From: Daryl 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: https://develop.svn.wordpress.org/trunk@20649 602fd350-edb4-49c9-b593-d223f7449a82 --- 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();