Skip to content

Instantly share code, notes, and snippets.

@mirzap
Forked from CodeNegar/gist:4030888
Created November 10, 2012 15:48
Show Gist options
  • Save mirzap/4051438 to your computer and use it in GitHub Desktop.
Save mirzap/4051438 to your computer and use it in GitHub Desktop.
PHP: Wordpress last blog update jdate
<?php
function last_update() {
global $wpdb;
$date = $wpdb->get_var("SELECT DISTINCT post_date FROM $wpdb->posts WHERE post_date < '".current_time('mysql')."' AND post_status = 'publish' ORDER BY post_date DESC LIMIT 1");
return jdate('l d M Y', strtotime($date));
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment