WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/19/2016 05:59:12 AM (4 years ago)
Author:
westonruter
Message:

Customize: Ensure WP_Customize_Setting::value() returns previewed value for custom types utilizing the customize_value_{$id_base} filter.

Fixes #38864.

File:
1 edited

Legend:

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

    r38470 r39318  
    697697
    698698        if ( ! $is_core_type && ! $this->is_multidimensional_aggregated ) {
     699
     700            // Use post value if previewed and a post value is present.
     701            if ( $this->is_previewed ) {
     702                $value = $this->post_value( null );
     703                if ( null !== $value ) {
     704                    return $value;
     705                }
     706            }
     707
    699708            $value = $this->get_root_value( $this->default );
    700709
Note: See TracChangeset for help on using the changeset viewer.