Created
November 7, 2012 11:07
-
-
Save CodeNegar/4030888 to your computer and use it in GitHub Desktop.
PHP: Wordpress last blog update jdate
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 | |
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