the_modified_date
Filters the date a post was last modified for display.
Usage
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(string|false)
- The last modified date or false if no post is found.
- $format(string)
- PHP date format.
- $before(string)
- HTML output before the date.
- $after(string)
- HTML output after the date.
Changelog
Since 2.1.0 | Introduced. |
Where the hook is called
the_modified_date
wp-includes/general-template.php 2618
$the_modified_date = apply_filters( 'the_modified_date', $the_modified_date, $format, $before, $after );