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
This commit is contained in:
parent
c22a2e2d7a
commit
a19ca4686c
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue