Plugin Directory

Changeset 140451


Ignore:
Timestamp:
07/29/2009 12:15:21 PM (17 years ago)
Author:
mstegink
Message:

Exclude future posts

Location:
charted-archives/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • charted-archives/trunk/ChartedArchives.php

    r140449 r140451  
    1717    $table = $wpdb->prefix . 'posts';
    1818    if ($rows == '' || $rows == 0) { $rows = 7; }
    19     $sql = 'select count(*) as n, monthname(post_date) as monthname, month(post_date) as month, year(post_date) as year from ' . $table . ' where post_type = "post" group by year, month order by year desc, month desc limit ' . $rows;
     19    $sql = 'select count(*) as n, monthname(post_date) as monthname, month(post_date) as month, year(post_date) as year from ' . $table . ' where post_type = "post" and post_status != "future" group by year, month order by year desc, month desc limit ' . $rows;
    2020    $months = $wpdb->get_results($sql);
    2121    $months = array_reverse($months);
  • charted-archives/trunk/readme.txt

    r140449 r140451  
    5454
    5555* Solved issue with non-standard database table prefix
     56* Exclude future posts
Note: See TracChangeset for help on using the changeset viewer.