Make WordPress Core

Changeset 686


Ignore:
Timestamp:
01/02/2004 07:27:21 PM (22 years ago)
Author:
saxmatt
Message:

Use post_status in get_lastpostdate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r677 r686  
    378378        $now = date("Y-m-d H:i:s",(time() + ($time_difference * 3600)));
    379379
    380         $lastpostdate = $wpdb->get_var("SELECT post_date FROM $tableposts WHERE post_date <= '$now' ORDER BY post_date DESC LIMIT 1");
     380        $lastpostdate = $wpdb->get_var("SELECT post_date FROM $tableposts WHERE post_date <= '$now' AND post_status = 'publish' ORDER BY post_date DESC LIMIT 1");
    381381        $cache_lastpostdate = $lastpostdate;
    382 //      echo $lastpostdate;
    383382    } else {
    384383        $lastpostdate = $cache_lastpostdate;
Note: See TracChangeset for help on using the changeset viewer.