WordPress.org

Make WordPress Core

Ticket #42022: 42022.7.diff

File 42022.7.diff, 2.4 KB (added by westonruter, 21 months 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..5f09a4622e 100644
    body.trashing #publish-settings { 
    270270        margin-bottom: 15px;
    271271}
    272272
    273 .date-time-fields {
    274         padding-top: 10px;
    275         padding-bottom:10px;
     273.customize-control-date_time .customize-control-description + .date-time-fields.includes-time {
     274        margin-top: 10px;
    276275}
    277276
    278277.customize-control.customize-control-date_time .date-time-fields .date-input,
    body.trashing #publish-settings { 
    280279        float: left;
    281280        margin-right: 5px;
    282281}
     282.customize-control.customize-control-date_time .date-time-fields .date-input.day {
     283        margin-right: 0;
     284}
    283285
    284286.date-time-fields .date-input.month {
    285287        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">