get_the_time хук-фильтрWP 1.5.0

Filters the time a post was written.

Использование

add_filter( 'get_the_time', 'wp_kama_get_the_time_filter', 10, 3 );

/**
 * Function for `get_the_time` filter-hook.
 * 
 * @param string|int $the_time Formatted date string or Unix timestamp if `$format` is 'U' or 'G'.
 * @param string     $format   Format to use for retrieving the time the post was written. Accepts 'G', 'U', or PHP date format.
 * @param WP_Post    $post     Post object.
 *
 * @return string|int
 */
function wp_kama_get_the_time_filter( $the_time, $format, $post ){

	// filter...
	return $the_time;
}
$the_time(строка|int)
Formatted date string or Unix timestamp if $format is 'U' or 'G'.
$format(строка)
Format to use for retrieving the time the post was written. Accepts 'G', 'U', or PHP date format.
$post(WP_Post)
Post object.

Список изменений

С версии 1.5.0 Введена.

Где вызывается хук

get_the_time()
get_the_time
wp-includes/general-template.php 2715
return apply_filters( 'get_the_time', $the_time, $format, $post );

Где используется хук в WordPress

Использование не найдено.