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/class-wp-customize-manager.php

    r39149 r39151  
    36003600        $custom_css_setting = new WP_Customize_Custom_CSS_Setting( $this, sprintf( 'custom_css[%s]', get_stylesheet() ), array(
    36013601            'capability' => 'unfiltered_css',
     3602            'default' => sprintf( "/*\n%s\n*/", __( "You can add your own CSS here.\n\nClick the help icon above to learn more." ) ),
    36023603        ) );
    36033604        $this->add_setting( $custom_css_setting );
     
    36073608            'section'  => 'custom_css',
    36083609            'settings' => array( 'default' => $custom_css_setting->id ),
    3609             'input_attrs' => array(
    3610                 'placeholder' => __( "/*\nYou can add your own CSS here.\n\nClick the help icon above to learn more.\n*/" ),
    3611             )
    36123610        ) );
    36133611    }
Note: See TracChangeset for help on using the changeset viewer.