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 $the_modified_date The last modified date. * @param string $format PHP date format. * @param string $before HTML output before the date. * @param string $after HTML output after the date. * * @return string */ function wp_kama_the_modified_date_filter( $the_modified_date, $format, $before, $after ){ // filter... return $the_modified_date; }
- $the_modified_date(string)
- The last modified date.
- $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 2758
$the_modified_date = apply_filters( 'the_modified_date', $the_modified_date, $format, $before, $after );