Skip to content

Instantly share code, notes, and snippets.

@beastaugh
Created December 10, 2008 10:35
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save beastaugh/34298 to your computer and use it in GitHub Desktop.
Add timestamps to post dates.
<?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