WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/07/2016 06:12:28 PM (5 years ago)
Author:
westonruter
Message:

Customize: Move Custom CSS control placeholder help text to setting default value.

The WP_Customize_Custom_CSS_Setting::value() method now returns the default if wp_get_custom_css() returns empty.

Props westonruter, afercia, helen.
See #35395.
Fixes #38685.

File:
1 edited

Legend:

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

    r39009 r39151  
    129129     */
    130130    public function value() {
    131         return wp_get_custom_css( $this->stylesheet );
     131        $value = wp_get_custom_css( $this->stylesheet );
     132        if ( empty( $value ) ) {
     133            $value = $this->default;
     134        }
     135        return $value;
    132136    }
    133137
Note: See TracChangeset for help on using the changeset viewer.