wphooks.info - time_formats

time_formats

(trunk - 5.1-alpha-44286)

The hook occurs in the following file:

wp-admin/options-general.php:
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
<td>
	<fieldset><legend class="screen-reader-text"><span><?php _e( 'Time Format' ); ?></span></legend>
<?php
	/**
	 * Filters the default time formats.
	 *
	 * @since 2.7.0
	 *
	 * @param string[] $default_time_formats Array of default time formats.
	 */
	$time_formats = array_unique( apply_filters( 'time_formats', array( __( 'g:i a' ), 'g:i A', 'H:i' ) ) );

	$custom = true;

foreach ( $time_formats as $format ) {
	echo "\t<label><input type='radio' name='time_format' value='" . esc_attr( $format ) . "'";
	if ( get_option( 'time_format' ) === $format ) { // checked() uses "==" rather than "==="
		echo " checked='checked'";
		$custom = false;
	}