Make WordPress Core


Ignore:
Timestamp:
04/07/2010 08:29:46 AM (15 years ago)
Author:
dd32
Message:

Fix a case where $post_type = 'any' causes a large query to run without any specifications (post_name/limits/id/etc). See #12704

File:
1 edited

Legend:

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

    r13839 r14027  
    17131713            $where .= " AND DAYOFMONTH($wpdb->posts.post_date)='" . $q['day'] . "'";
    17141714
    1715         if ( !empty($q['post_type']) ) {
     1715        if ( !empty($q['post_type']) && 'any' != $q['post_type'] ) {
    17161716            $_pt = is_array($q['post_type']) ? $q['post_type'] : array($q['post_type']);
    17171717            foreach ( $_pt as $_post_type ) {
Note: See TracChangeset for help on using the changeset viewer.