From c5279336c7380de2d9f9d9a68ad349a96c655266 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Thu, 6 Mar 2014 14:11:15 +0000 Subject: [PATCH] Inline documentation for hooks in wp-includes/class-wp-customize-manager.php. Props kpdesign for the typo fix. Fixes #27296. Built from https://develop.svn.wordpress.org/trunk@27433 git-svn-id: http://core.svn.wordpress.org/trunk@27280 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize-manager.php | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/wp-includes/class-wp-customize-manager.php b/wp-includes/class-wp-customize-manager.php index 802d30a5aa..7f337f5f62 100644 --- a/wp-includes/class-wp-customize-manager.php +++ b/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;