Changeset 42111
- Timestamp:
- 11/02/2017 10:59:04 PM (7 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/customize-controls.css
r42046 r42111 333 333 } 334 334 335 .customize-control.customize-control-date_time .date-time-fields .date-input,336 .customize-control.customize-control-date_time .date-time-fields .date-time-separator {337 float: left;338 margin-right: 5px;339 }340 335 .customize-control.customize-control-date_time .date-time-fields .date-input.day { 341 336 margin-right: 0; … … 362 357 } 363 358 364 .date-time-fields .date-time-separator {365 line-height: 2;366 }367 368 359 .date-time-fields .time-row { 369 360 margin-top: 12px; … … 371 362 372 363 .date-time-fields .date-timezone { 373 float: left;374 364 line-height: 2.2; 375 365 text-decoration: none; … … 2831 2821 } 2832 2822 2833 .date-time-fields .date-time-separator,2834 2823 .date-time-fields .date-timezone { 2835 2824 line-height: 3.2; -
trunk/src/wp-includes/customize/class-wp-customize-date-time-control.php
r42042 r42111 99 99 $data = array_merge( $this->json(), $this->get_month_choices() ); 100 100 $timezone_info = $this->get_timezone_info(); 101 102 $date_format = get_option( 'date_format' ); 103 foreach ( array( 'Y', 'y', 'o' ) as $year_token ) { 104 $date_format = preg_replace( '/(?<!\\\\)' . $year_token . '/', '%1$s', $date_format ); 105 } 106 foreach ( array( 'F', 'm', 'M', 'n' ) as $month_token ) { 107 $date_format = preg_replace( '/(?<!\\\\)' . $month_token . '/', '%2$s', $date_format ); 108 } 109 foreach ( array( 'j', 'd' ) as $day_token ) { 110 $date_format = preg_replace( '/(?<!\\\\)' . $day_token . '/', '%3$s', $date_format ); 111 } 101 112 ?> 102 113 … … 117 128 <legend class="title-day {{ ! data.includeTime ? 'screen-reader-text' : '' }}"><?php esc_html_e( 'Date' ); ?></legend> 118 129 <div class="day-fields clear"> 130 <?php ob_start(); ?> 119 131 <label for="{{ idPrefix }}date-time-month" class="screen-reader-text"><?php esc_html_e( 'Month' ); ?></label> 120 132 <select id="{{ idPrefix }}date-time-month" class="date-input month" data-component="month"> … … 130 142 <# } ); #> 131 143 </select> 144 <?php $month_field = trim( ob_get_clean() ); ?> 145 146 <?php ob_start(); ?> 132 147 <label for="{{ idPrefix }}date-time-day" class="screen-reader-text"><?php esc_html_e( 'Day' ); ?></label> 133 148 <input id="{{ idPrefix }}date-time-day" type="number" size="2" autocomplete="off" class="date-input day" data-component="day" min="1" max="31" /> 134 <span class="time-special-char date-time-separator">,</span> 149 <?php $day_field = trim( ob_get_clean() ); ?> 150 151 <?php ob_start(); ?> 135 152 <label for="{{ idPrefix }}date-time-year" class="screen-reader-text"><?php esc_html_e( 'Year' ); ?></label> 136 153 <input id="{{ idPrefix }}date-time-year" type="number" size="4" autocomplete="off" class="date-input year" data-component="year" min="{{ data.minYear }}" max="{{ data.maxYear }}"> 154 <?php $year_field = trim( ob_get_clean() ); ?> 155 156 <?php printf( $date_format, $year_field, $month_field, $day_field ); ?> 137 157 </div> 138 158 </fieldset> … … 145 165 <# var minHour = data.twelveHourFormat ? 1 : 0; #> 146 166 <input id="{{ idPrefix }}date-time-hour" type="number" size="2" autocomplete="off" class="date-input hour" data-component="hour" min="{{ minHour }}" max="{{ maxHour }}"> 147 <span class="time-special-char date-time-separator">:</span>167 : 148 168 <label for="{{ idPrefix }}date-time-minute" class="screen-reader-text"><?php esc_html_e( 'Minute' ); ?></label> 149 169 <input id="{{ idPrefix }}date-time-minute" type="number" size="2" autocomplete="off" class="date-input minute" data-component="minute" min="0" max="59">
Note: See TracChangeset
for help on using the changeset viewer.