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:
Weston Ruter 2016-07-06 05:59:28 +00:00
parent 64a2d70a90
commit f1b7a9c77d
2 changed files with 6 additions and 1 deletions

View File

@ -711,6 +711,11 @@ class WP_Customize_Setting {
} 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 );
// 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 {
$value = $this->get_root_value( $this->default );
}

View File

@ -4,7 +4,7 @@
*
* @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.