diff --git a/wp-includes/class-wp-customize-manager.php b/wp-includes/class-wp-customize-manager.php index 206d9641bd..5a9770a676 100644 --- a/wp-includes/class-wp-customize-manager.php +++ b/wp-includes/class-wp-customize-manager.php @@ -3599,6 +3599,7 @@ final class WP_Customize_Manager { $custom_css_setting = new WP_Customize_Custom_CSS_Setting( $this, sprintf( 'custom_css[%s]', get_stylesheet() ), array( 'capability' => 'unfiltered_css', + 'default' => sprintf( "/*\n%s\n*/", __( "You can add your own CSS here.\n\nClick the help icon above to learn more." ) ), ) ); $this->add_setting( $custom_css_setting ); @@ -3606,9 +3607,6 @@ final class WP_Customize_Manager { 'type' => 'textarea', 'section' => 'custom_css', 'settings' => array( 'default' => $custom_css_setting->id ), - 'input_attrs' => array( - 'placeholder' => __( "/*\nYou can add your own CSS here.\n\nClick the help icon above to learn more.\n*/" ), - ) ) ); } diff --git a/wp-includes/customize/class-wp-customize-custom-css-setting.php b/wp-includes/customize/class-wp-customize-custom-css-setting.php index 2015458119..17e01fc6a5 100644 --- a/wp-includes/customize/class-wp-customize-custom-css-setting.php +++ b/wp-includes/customize/class-wp-customize-custom-css-setting.php @@ -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; } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index d934c047ae..3cb9a94a8a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-beta2-39150'; +$wp_version = '4.7-beta2-39151'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.