Make WordPress Core

Ticket #42022: 42022.6.diff

File 42022.6.diff, 2.2 KB (added by westonruter, 7 years ago)
  • src/wp-admin/css/customize-controls.css

    diff --git src/wp-admin/css/customize-controls.css src/wp-admin/css/customize-controls.css
    index 6180998951..4a06660d62 100644
    body.trashing #publish-settings { 
    270270        margin-bottom: 15px;
    271271}
    272272
    273 .date-time-fields {
     273.date-time-fields.includes-time {
    274274        padding-top: 10px;
    275275        padding-bottom:10px;
    276276}
    body.trashing #publish-settings { 
    280280        float: left;
    281281        margin-right: 5px;
    282282}
     283.customize-control.customize-control-date_time .date-time-fields .date-input.day {
     284        margin-right: 0;
     285}
    283286
    284287.date-time-fields .date-input.month {
    285288        width: auto;
  • src/wp-includes/customize/class-wp-customize-date-time-control.php

    diff --git src/wp-includes/customize/class-wp-customize-date-time-control.php src/wp-includes/customize/class-wp-customize-date-time-control.php
    index 9f36da0e68..11fc66971e 100644
    class WP_Customize_Date_Time_Control extends WP_Customize_Control { 
    112112                <# _.defaults( data, <?php echo wp_json_encode( $data ); ?> ); #>
    113113                <# var idPrefix = _.uniqueId( 'el' ) + '-'; #>
    114114
    115                 <span class="customize-control-title">
    116                         {{ data.label }}
    117                 </span>
     115                <# if ( data.label ) { #>
     116                        <span class="customize-control-title">
     117                                {{ data.label }}
     118                        </span>
     119                <# } #>
    118120                <div class="customize-control-notifications-container"></div>
    119                 <span class="description customize-control-description">{{ data.description }}</span>
    120                 <div class="date-time-fields">
     121                <# if ( data.description ) { #>
     122                        <span class="description customize-control-description">{{ data.description }}</span>
     123                <# } #>
     124                <div class="date-time-fields {{ data.includeTime ? 'includes-time' : '' }}">
    121125                        <fieldset class="day-row">
    122                                 <legend class="title-day"><?php esc_html_e( 'Date' ); ?></legend>
     126                                <legend class="title-day {{ ! data.includeTime ? 'screen-reader-text' : '' }}"><?php esc_html_e( 'Date' ); ?></legend>
    123127                                <div class="day-fields clear">
    124128                                        <label for="{{ idPrefix }}date-time-month" class="screen-reader-text"><?php esc_html_e( 'Month' ); ?></label>
    125129                                        <select id="{{ idPrefix }}date-time-month" class="date-input month" data-component="month">