the_modified_date
Filters the date a post was last modified for display.
Использование
add_filter( 'the_modified_date', 'wp_kama_the_modified_date_filter', 10, 4 ); /** * Function for `the_modified_date` filter-hook. * * @param string|false $the_modified_date The last modified date or false if no post is found. * @param string $format PHP date format. * @param string $before HTML output before the date. * @param string $after HTML output after the date. * * @return string|false */ function wp_kama_the_modified_date_filter( $the_modified_date, $format, $before, $after ){ // filter... return $the_modified_date; }
- $the_modified_date(строка|false)
- The last modified date or false if no post is found.
- $format(строка)
- PHP date format.
- $before(строка)
- HTML output before the date.
- $after(строка)
- HTML output after the date.
Список изменений
С версии 2.1.0 | Введена. |
Где вызывается хук
the_modified_date
wp-includes/general-template.php 2630
$the_modified_date = apply_filters( 'the_modified_date', $the_modified_date, $format, $before, $after );