From f0a3d5cfa865338a3d5cfe0dcedf55aaab1a66bb Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 17 Jun 2014 23:35:15 +0000 Subject: [PATCH] Pass WP_Customize_Setting instance to 'customize_preview_*' and 'customize_update_*' actions. props dustyn, DrewAPicture. fixes #27979. Built from https://develop.svn.wordpress.org/trunk@28767 git-svn-id: http://core.svn.wordpress.org/trunk@28580 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize-setting.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wp-includes/class-wp-customize-setting.php b/wp-includes/class-wp-customize-setting.php index 4bca44252e..b61e397e55 100644 --- a/wp-includes/class-wp-customize-setting.php +++ b/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 ); } }