get_the_date хук-фильтрWP 3.0.0

Filters the date a post was published.

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

add_filter( 'get_the_date', 'wp_kama_get_the_date_filter', 10, 3 );

/**
 * Function for `get_the_date` filter-hook.
 * 
 * @param string|int $the_date Formatted date string or Unix timestamp if `$format` is 'U' or 'G'.
 * @param string     $format   PHP date format.
 * @param WP_Post    $post     The post object.
 *
 * @return string|int
 */
function wp_kama_get_the_date_filter( $the_date, $format, $post ){

	// filter...
	return $the_date;
}
$the_date(строка|int)
Formatted date string or Unix timestamp if $format is 'U' or 'G'.
$format(строка)
PHP date format.
$post(WP_Post)
The post object.

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

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

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

get_the_date()
get_the_date
wp-includes/general-template.php 2589
return apply_filters( 'get_the_date', $the_date, $format, $post );

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

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