the_time
Filters the time a post was written for display.
Использование
add_filter( 'the_time', 'wp_kama_the_time_filter', 10, 2 ); /** * Function for `the_time` filter-hook. * * @param string $get_the_time The formatted time. * @param string $format Format to use for retrieving the time the post was written. Accepts 'G', 'U', or PHP date format. * * @return string */ function wp_kama_the_time_filter( $get_the_time, $format ){ // filter... return $get_the_time; }
- $get_the_time(строка)
- The formatted time.
- $format(строка)
- Format to use for retrieving the time the post was written. Accepts 'G', 'U', or PHP date format.
Список изменений
С версии 0.71 | Введена. |
Где вызывается хук
the_time
wp-includes/general-template.php 2693
echo apply_filters( 'the_time', get_the_time( $format ), $format );