time_formats filter-hookWP 2.7.0

Filters the default time formats.

Usage

add_filter( 'time_formats', 'wp_kama_time_formats_filter' );

/**
 * Function for `time_formats` filter-hook.
 * 
 * @param string[] $default_time_formats Array of default time formats.
 *
 * @return string[]
 */
function wp_kama_time_formats_filter( $default_time_formats ){

	// filter...
	return $default_time_formats;
}
$default_time_formats(string[])
Array of default time formats.

Changelog

Since 2.7.0 Introduced.

Where the hook is called

In file: /wp-admin/options-general.php
time_formats
wp-admin/options-general.php 356
$time_formats = array_unique( apply_filters( 'time_formats', array( __( 'g:i a' ), 'g:i A', 'H:i' ) ) );

Where the hook is used in WordPress

Usage not found.