Skip to content

Instantly share code, notes, and snippets.

@CodeNegar
Created November 7, 2012 11:07
Show Gist options
  • Save CodeNegar/4030888 to your computer and use it in GitHub Desktop.
Save CodeNegar/4030888 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