From f1b7a9c77d00e93a2df30b44da455fe7c57cbdb8 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Wed, 6 Jul 2016 05:59:28 +0000 Subject: [PATCH] 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 --- wp-includes/class-wp-customize-setting.php | 5 +++++ wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-customize-setting.php b/wp-includes/class-wp-customize-setting.php index f5cb1bfcfc..fc78d07cb0 100644 --- a/wp-includes/class-wp-customize-setting.php +++ b/wp-includes/class-wp-customize-setting.php @@ -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 ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 1facedaccb..904a5522d0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.