Created
December 10, 2008 10:35
-
-
Save beastaugh/34298 to your computer and use it in GitHub Desktop.
Add timestamps to post dates.
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 | |
/* | |
Plugin Name: Posted At | |
Plugin URI: http://tarskitheme.com/ | |
Description: Add timestamps to post dates. | |
Author: Benedict Eastaugh | |
Version: 1.0 | |
Author URI: http://extralogical.net/ | |
*/ | |
function add_times_to_post_dates($date, $d, $post) { | |
if ($post->ID > 0) | |
$date = sprintf(__('%s at %s', 'tarski'), | |
$date, | |
get_post_time(get_option('time_format'), false, $post)); | |
return $date; | |
} | |
add_filter('get_the_time', 'add_times_to_post_dates', 10, 3); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment