mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
Customize: Pass WP_Customize_Setting instance as second argument to customize_value_{$id_base} filter.
Adds parity with setting instance being passed as second argument to `customize_sanitize_{$id}` and `customize_sanitize_js_{$id}`. Allows the actual ID of the (multidimensional) setting value being filtered to be inspected.
Props celloexpressions, westonruter.
Fixes #36452.
git-svn-id: https://develop.svn.wordpress.org/trunk@37350 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -657,11 +657,13 @@ class WP_Customize_Setting {
|
||||
* functions for available hooks.
|
||||
*
|
||||
* @since 3.4.0
|
||||
* @since 4.6.0 Added the `$this` setting instance as the second param.
|
||||
*
|
||||
* @param mixed $default The setting default value. Default empty.
|
||||
* @param mixed $default The setting default value. Default empty.
|
||||
* @param WP_Customize_Setting $this The setting instance.
|
||||
*/
|
||||
$value = apply_filters( "customize_value_{$id_base}", $value );
|
||||
} else if ( $this->is_multidimensional_aggregated ) {
|
||||
$value = apply_filters( "customize_value_{$id_base}", $value, $this );
|
||||
} elseif ( $this->is_multidimensional_aggregated ) {
|
||||
$root_value = self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['root_value'];
|
||||
$value = $this->multidimensional_get( $root_value, $this->id_data['keys'], $this->default );
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user