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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39151 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter
2016-11-07 18:12:28 +00:00
parent c78f002ae6
commit 1207af99d4
3 changed files with 11 additions and 5 deletions
@@ -128,7 +128,11 @@ final class WP_Customize_Custom_CSS_Setting extends WP_Customize_Setting {
* @return string
*/
public function value() {
return wp_get_custom_css( $this->stylesheet );
$value = wp_get_custom_css( $this->stylesheet );
if ( empty( $value ) ) {
$value = $this->default;
}
return $value;
}
/**