The the_modified_date
filter allows you to modify the modified date output when used for a post inside the Loop.
It is evaluated in the the_modified_date()
template tag in the wp-includes/general-template.php file. Template tags must be used inside the Loop.
the_modified_date
accepts 4 arguments:
- string
$the_modified_date
The date the post was modified - string
$d
The date format, if empty it defaults to the value ofdate_format
option - string
$before
What to output before the date - string
$after
What to output after the date
Example:
The following wraps the modified date in emphasis tags on output.
View the code example on Gist.
Have a suggested improvement? You can fork the Gist and comment back with the link. If all is agreeable, I’ll merge in your changes. Crowd-sourced documentation FTW!