added get_lastpostmodified()

git-svn-id: http://svn.automattic.com/wordpress/trunk@908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
michelvaldrighi 2004-02-22 03:28:46 +00:00
parent a6165937b1
commit 6d59c60739
1 changed files with 14 additions and 0 deletions

View File

@ -108,6 +108,20 @@ function get_lastpostdate() {
return $lastpostdate;
}
function get_lastpostmodified() {
global $tableposts, $cache_lastpostmodified, $use_cache, $pagenow, $wpdb;
if ((!isset($cache_lastpostmodified)) OR (!$use_cache)) {
$time_difference = get_settings('time_difference'); // for some weird reason the global wasn't set anymore?
$now = date("Y-m-d H:i:s",(time() + ($time_difference * 3600)));
$lastpostmodified = $wpdb->get_var("SELECT post_modified FROM $tableposts WHERE post_modified <= '$now' AND post_status = 'publish' ORDER BY post_modified DESC LIMIT 1");
$cache_lastpostmodified = $lastpostmodified;
} else {
$lastpostmodified = $cache_lastpostmodified;
}
return $lastpostmodified;
}
function user_pass_ok($user_login,$user_pass) {
global $cache_userdata,$use_cache;
if ((empty($cache_userdata[$user_login])) OR (!$use_cache)) {