WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/06/2016 05:58:28 AM (5 years ago)
Author:
westonruter
Message:

Customize: Ensure that WP_Customize_Setting::value() can return a previewed value for aggregated multidimensionals.

Fixes #37294.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-setting.php

    r37491 r37982  
    712712            $root_value = self::$aggregated_multidimensionals[ $this->type ][ $id_base ]['root_value'];
    713713            $value = $this->multidimensional_get( $root_value, $this->id_data['keys'], $this->default );
     714
     715            // Ensure that the post value is used if the setting is previewed, since preview filters aren't applying on cached $root_value.
     716            if ( $this->is_previewed ) {
     717                $value = $this->post_value( $value );
     718            }
    714719        } else {
    715720            $value = $this->get_root_value( $this->default );
Note: See TracChangeset for help on using the changeset viewer.