Created
July 27, 2013 17:40
-
-
Save WerdsWords/6095648 to your computer and use it in GitHub Desktop.
#25: the_modified_date
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Modifed date emphasis | |
* | |
* @param string $modified_date The modified date output. | |
* @param string $date The date format. Defaults to 'date_format' option value. | |
* @param string $before What to output before the date. | |
* @param string $after What to output after the date. | |
* | |
* @return string The modified modified date (heh) | |
*/ | |
function wpdocs_the_modified_date( $modified_date, $format, $before, $after ) { | |
// Add emphasis tags before and after the date | |
$modified_date = '<em>' . get_the_modified_date( $format ) . '</em>'; | |
return $modified_date; | |
} | |
add_filter( 'the_modified_date', 'wpdocs_the_modified_date', 10, 4 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment