Make WordPress Core

Ticket #38864: 38864.0.diff

File 38864.0.diff, 1.6 KB (added by westonruter, 9 years ago)
  • src/wp-includes/class-wp-customize-setting.php

    diff --git src/wp-includes/class-wp-customize-setting.php src/wp-includes/class-wp-customize-setting.php
    index a16b100..7f1f98a 100644
    class WP_Customize_Setting { 
    696696                $is_core_type = ( 'option' === $this->type || 'theme_mod' === $this->type );
    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
    701710                        /**
  • src/wp-includes/customize/class-wp-customize-custom-css-setting.php

    diff --git src/wp-includes/customize/class-wp-customize-custom-css-setting.php src/wp-includes/customize/class-wp-customize-custom-css-setting.php
    index eb9379e..eadd47c 100644
    final class WP_Customize_Custom_CSS_Setting extends WP_Customize_Setting { 
    132132         * @return string
    133133         */
    134134        public function value() {
    135                 $id_base = $this->id_data['base'];
    136                 if ( $this->is_previewed && null !== $this->post_value( null ) ) {
    137                         return $this->post_value();
     135                if ( $this->is_previewed ) {
     136                        $post_value = $this->post_value( null );
     137                        if ( null !== $post_value ) {
     138                                return $post_value;
     139                        }
    138140                }
     141                $id_base = $this->id_data['base'];
    139142                $value = '';
    140143                $post = wp_get_custom_css_post( $this->stylesheet );
    141144                if ( $post ) {