Skip to content

Instantly share code, notes, and snippets.

@WerdsWords
Created July 27, 2013 17:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WerdsWords/6095648 to your computer and use it in GitHub Desktop.
Save WerdsWords/6095648 to your computer and use it in GitHub Desktop.
#25: the_modified_date
<?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