get_the_modified_date
Filters the date a post was last modified.
Использование
add_filter( 'get_the_modified_date', 'wp_kama_get_the_modified_date_filter', 10, 3 ); /** * Function for `get_the_modified_date` filter-hook. * * @param string|int|false $the_time The formatted date or false if no post is found. * @param string $format PHP date format. * @param WP_Post|null $post WP_Post object or null if no post is found. * * @return string|int|false */ function wp_kama_get_the_modified_date_filter( $the_time, $format, $post ){ // filter... return $the_time; }
- $the_time(строка|int|false)
- The formatted date or false if no post is found.
- $format(строка)
- PHP date format.
- $post(WP_Post|null)
- WP_Post object or null if no post is found.
Список изменений
С версии 2.1.0 | Введена. |
С версии 4.6.0 | Added the $post parameter. |
Где вызывается хук
get_the_modified_date
wp-includes/general-template.php 2672
return apply_filters( 'get_the_modified_date', $the_time, $format, $post );