the_modified_time хук-фильтрWP 2.0.0

Filters the localized time a post was last modified, for display.

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

add_filter( 'the_modified_time', 'wp_kama_the_modified_time_filter', 10, 2 );

/**
 * Function for `the_modified_time` filter-hook.
 * 
 * @param string|false $get_the_modified_time The formatted time or false if no post is found.
 * @param string       $format                Format to use for retrieving the time the post was modified. Accepts 'G', 'U', or PHP date format.
 *
 * @return string|false
 */
function wp_kama_the_modified_time_filter( $get_the_modified_time, $format ){

	// filter...
	return $get_the_modified_time;
}
$get_the_modified_time(строка|false)
The formatted time or false if no post is found.
$format(строка)
Format to use for retrieving the time the post was modified. Accepts 'G', 'U', or PHP date format.

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

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

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

the_modified_time()
the_modified_time
wp-includes/general-template.php 2859
echo apply_filters( 'the_modified_time', get_the_modified_time( $format ), $format );

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

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