Customize: Ensure that `WP_Customize_Setting::value()` can return a previewed value for aggregated multidimensionals.
Fixes #37294. Built from https://develop.svn.wordpress.org/trunk@37982 git-svn-id: http://core.svn.wordpress.org/trunk@37923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
64a2d70a90
commit
f1b7a9c77d
|
@ -711,6 +711,11 @@ class WP_Customize_Setting {
|
||||||
} elseif ( $this->is_multidimensional_aggregated ) {
|
} elseif ( $this->is_multidimensional_aggregated ) {
|
||||||
$root_value = self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['root_value'];
|
$root_value = self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['root_value'];
|
||||||
$value = $this->multidimensional_get( $root_value, $this->id_data['keys'], $this->default );
|
$value = $this->multidimensional_get( $root_value, $this->id_data['keys'], $this->default );
|
||||||
|
|
||||||
|
// Ensure that the post value is used if the setting is previewed, since preview filters aren't applying on cached $root_value.
|
||||||
|
if ( $this->is_previewed ) {
|
||||||
|
$value = $this->post_value( $value );
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$value = $this->get_root_value( $this->default );
|
$value = $this->get_root_value( $this->default );
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.6-beta1-37981';
|
$wp_version = '4.6-beta1-37982';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue