From f1172ba195875237e3cd66dd43603ef5921b94e5 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 17 Jun 2014 23:34:31 +0000 Subject: [PATCH] Pass WP_Customize_Setting instance to 'customize_preview_*' and 'customize_update_*' actions. props dustyn, DrewAPicture. fixes #27979. git-svn-id: https://develop.svn.wordpress.org/trunk@28767 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-customize-setting.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/class-wp-customize-setting.php b/src/wp-includes/class-wp-customize-setting.php index 4bca44252e..b61e397e55 100644 --- a/src/wp-includes/class-wp-customize-setting.php +++ b/src/wp-includes/class-wp-customize-setting.php @@ -130,8 +130,10 @@ class WP_Customize_Setting { * The dynamic portion of the hook name, $this->id, refers to the setting ID. * * @since 3.4.0 + * + * @param WP_Customize_Setting $this WP_Customize_Setting instance. */ - do_action( 'customize_preview_' . $this->id ); + do_action( 'customize_preview_' . $this->id, $this ); } } @@ -246,9 +248,10 @@ class WP_Customize_Setting { * * @since 3.4.0 * - * @param mixed $value Value of the setting. + * @param mixed $value Value of the setting. + * @param WP_Customize_Setting $this WP_Customize_Setting instance. */ - return do_action( 'customize_update_' . $this->type, $value ); + return do_action( 'customize_update_' . $this->type, $value, $this ); } }