Created
September 30, 2016 17:20
-
-
Save TanvirAmi/70df1a019a16b9ed9e6634e9c158c767 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
//add hatom data | |
function add_suf_hatom_data($content) { | |
$t = get_the_modified_time('F jS, Y'); | |
$author = get_the_author(); | |
$title = get_the_title(); | |
if (is_home() || is_singular() || is_archive() ) { | |
$content .= '<div class="hatom-extra" style="display:none;visibility:hidden;"><span class="entry-title">'.$title.'</span> was last modified: <span class="updated"> '.$t.'</span> by <span class="author vcard"><span class="fn">'.$author.'</span></span></div>'; | |
} | |
return $content; | |
} | |
add_filter('the_content', 'add_suf_hatom_data'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment