From 5a3f52fe39f2ab16c2dfbb626d06e97ff12941e3 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Thu, 6 Mar 2014 14:10:04 +0000 Subject: [PATCH] Inline documentation for hooks in wp-includes/class-wp-customize-manager.php. Props kpdesign for the typo fix. Fixes #27296. git-svn-id: https://develop.svn.wordpress.org/trunk@27433 602fd350-edb4-49c9-b593-d223f7449a82 --- .../class-wp-customize-manager.php | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php index 802d30a5aa..7f337f5f62 100644 --- a/src/wp-includes/class-wp-customize-manager.php +++ b/src/wp-includes/class-wp-customize-manager.php @@ -216,6 +216,13 @@ final class WP_Customize_Manager { add_filter( 'pre_option_template_root', array( $this, 'get_template_root' ) ); } + /** + * Fires once the Customizer theme preview has started. + * + * @since 3.4.0 + * + * @param WP_Customize_Manager $this WP_Customize_Manager instance. + */ do_action( 'start_previewing_theme', $this ); } @@ -246,6 +253,13 @@ final class WP_Customize_Manager { remove_filter( 'pre_option_template_root', array( $this, 'get_template_root' ) ); } + /** + * Fires once the Customizer theme preview has stopped. + * + * @since 3.4.0 + * + * @param WP_Customize_Manager $this WP_Customize_Manager instance. + */ do_action( 'stop_previewing_theme', $this ); } @@ -310,6 +324,14 @@ final class WP_Customize_Manager { * @since 3.4.0 */ public function wp_loaded() { + + /** + * Fires once WordPress has loaded, allowing scripts and styles to be initialized. + * + * @since 3.4.0 + * + * @param WP_Customize_Manager $this WP_Customize_Manager instance. + */ do_action( 'customize_register', $this ); if ( $this->is_preview() && ! is_admin() ) @@ -375,6 +397,14 @@ final class WP_Customize_Manager { $setting->preview(); } + /** + * Fires once the Customizer preview has initialized and JavaScript + * settings have been printed. + * + * @since 3.4.0 + * + * @param WP_Customize_Manager $this WP_Customize_Manager instance. + */ do_action( 'customize_preview_init', $this ); } @@ -541,12 +571,27 @@ final class WP_Customize_Manager { $this->start_previewing_theme(); } + /** + * Fires once the theme has switched in the Customizer, but before settings + * have been saved. + * + * @since 3.4.0 + * + * @param WP_Customize_Manager $this WP_Customize_Manager instance. + */ do_action( 'customize_save', $this ); foreach ( $this->settings as $setting ) { $setting->save(); } + /** + * Fires after Customize settings have been saved. + * + * @since 3.6.0 + * + * @param WP_Customize_Manager $this WP_Customize_Manager instance. + */ do_action( 'customize_save_after', $this ); die;