Changeset 36263 for trunk/src/wp-admin/options-general.php
- Timestamp:
- 01/11/2016 10:53:10 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/options-general.php
r35811 r36263 146 146 </select> 147 147 148 <p class="description" id="timezone-description"><?php _e( 'Choose a city in the same timezone as you.' ); ?></p> 149 <?php if ( $check_zone_info && $tzstring ) : ?> 150 151 <p class="timezone-info"> 148 152 <span id="utc-time"><?php 149 /* translators: %s: UTC time */ 150 printf( __( '<abbr title="Coordinated Universal Time">UTC</abbr> time is %s' ), 153 /* translators: 1: UTC abbreviation, 2: UTC time */ 154 printf( __( 'Universal time (%1$s) is %2$s.' ), 155 '<abbr>' . __( 'UTC' ) . '</abbr>', 151 156 '<code>' . date_i18n( $timezone_format, false, 'gmt' ) . '</code>' 152 157 ); 153 158 ?></span> 154 <?php if ( get_option( 'timezone_string') || !empty($current_offset) ) : ?>159 <?php if ( get_option( 'timezone_string' ) || ! empty( $current_offset ) ) : ?> 155 160 <span id="local-time"><?php 156 161 /* translators: %s: local time */ 157 printf( __( 'Local time is %s ' ),162 printf( __( 'Local time is %s.' ), 158 163 '<code>' . date_i18n( $timezone_format ) . '</code>' 159 164 ); 160 165 ?></span> 161 166 <?php endif; ?> 162 < p class="description" id="timezone-description"><?php _e( 'Choose a city in the same timezone as you.' ); ?></p>163 <?php if ($check_zone_info && $tzstring) : ?> 164 < br />167 </p> 168 169 <p class="timezone-info"> 165 170 <span> 166 171 <?php … … 212 217 </span> 213 218 <?php endif; ?> 219 </p> 214 220 </td> 215 221 … … 233 239 234 240 foreach ( $date_formats as $format ) { 235 echo "\t<label title='" . esc_attr($format) . "'><input type='radio' name='date_format' value='" . esc_attr($format) . "'";241 echo "\t<label><input type='radio' name='date_format' value='" . esc_attr( $format ) . "'"; 236 242 if ( get_option('date_format') === $format ) { // checked() uses "==" rather than "===" 237 243 echo " checked='checked'"; 238 244 $custom = false; 239 245 } 240 echo ' /> ' . date_i18n( $format ) . "</label><br />\n";246 echo ' /> <span class="date-time-text format-i18n">' . date_i18n( $format ) . '</span><code>' . $format . "</code></label><br />\n"; 241 247 } 242 248 243 echo ' 249 echo '<label><input type="radio" name="date_format" id="date_format_custom_radio" value="\c\u\s\t\o\m"'; 244 250 checked( $custom ); 245 echo '/> ' . __( 'Custom:' ) . '<span class="screen-reader-text"> ' . __( 'enter a custom date format in the following field' ) . "</span></label>\n"; 246 echo '<label for="date_format_custom" class="screen-reader-text">' . __( 'Custom date format:' ) . '</label><input type="text" name="date_format_custom" id="date_format_custom" value="' . esc_attr( get_option('date_format') ) . '" class="small-text" /> <span class="screen-reader-text">' . __( 'example:' ) . ' </span><span class="example"> ' . date_i18n( get_option('date_format') ) . "</span> <span class='spinner'></span>\n"; 251 echo '/> <span class="date-time-text date-time-custom-text">' . __( 'Custom:' ) . '<span class="screen-reader-text"> ' . __( 'enter a custom date format in the following field' ) . '</span></label>' . 252 '<label for="date_format_custom" class="screen-reader-text">' . __( 'Custom date format:' ) . '</label>' . 253 '<input type="text" name="date_format_custom" id="date_format_custom" value="' . esc_attr( get_option( 'date_format' ) ) . '" class="small-text" /></span>' . 254 '<span class="screen-reader-text">' . __( 'example:' ) . ' </span> <span class="example">' . date_i18n( get_option( 'date_format' ) ) . '</span>' . 255 "<span class='spinner'></span>\n"; 247 256 ?> 248 257 </fieldset> … … 266 275 267 276 foreach ( $time_formats as $format ) { 268 echo "\t<label title='" . esc_attr($format) . "'><input type='radio' name='time_format' value='" . esc_attr($format) . "'";277 echo "\t<label><input type='radio' name='time_format' value='" . esc_attr( $format ) . "'"; 269 278 if ( get_option('time_format') === $format ) { // checked() uses "==" rather than "===" 270 279 echo " checked='checked'"; 271 280 $custom = false; 272 281 } 273 echo ' /> ' . date_i18n( $format ) . "</label><br />\n";282 echo ' /> <span class="date-time-text format-i18n">' . date_i18n( $format ) . '</span><code>' . $format . "</code></label><br />\n"; 274 283 } 275 284 276 echo ' 285 echo '<label><input type="radio" name="time_format" id="time_format_custom_radio" value="\c\u\s\t\o\m"'; 277 286 checked( $custom ); 278 echo '/> ' . __( 'Custom:' ) . '<span class="screen-reader-text"> ' . __( 'enter a custom time format in the following field' ) . "</span></label>\n"; 279 echo '<label for="time_format_custom" class="screen-reader-text">' . __( 'Custom time format:' ) . '</label><input type="text" name="time_format_custom" id="time_format_custom" value="' . esc_attr( get_option('time_format') ) . '" class="small-text" /> <span class="screen-reader-text">' . __( 'example:' ) . ' </span><span class="example"> ' . date_i18n( get_option('time_format') ) . "</span> <span class='spinner'></span>\n"; 280 281 echo "\t<p>" . __('<a href="https://codex.wordpress.org/Formatting_Date_and_Time">Documentation on date and time formatting</a>.') . "</p>\n"; 287 echo '/> <span class="date-time-text date-time-custom-text">' . __( 'Custom:' ) . '<span class="screen-reader-text"> ' . __( 'enter a custom time format in the following field' ) . '</span></label>' . 288 '<label for="time_format_custom" class="screen-reader-text">' . __( 'Custom time format:' ) . '</label>' . 289 '<input type="text" name="time_format_custom" id="time_format_custom" value="' . esc_attr( get_option( 'time_format' ) ) . '" class="small-text" /></span>' . 290 '<span class="screen-reader-text">' . __( 'example:' ) . ' </span> <span class="example">' . date_i18n( get_option( 'time_format' ) ) . '</span>' . 291 "<span class='spinner'></span>\n"; 292 293 echo "\t<p class='date-time-doc'>" . __('<a href="https://codex.wordpress.org/Formatting_Date_and_Time">Documentation on date and time formatting</a>.') . "</p>\n"; 282 294 ?> 283 295 </fieldset>
Note: See TracChangeset
for help on using the changeset viewer.