Make WordPress Core

Ticket #10807: 10807.diff

File 10807.diff, 595 bytes (added by ryan, 15 years ago)
  • wp-includes/query.php

     
    20762076                        $where .= " AND $wpdb->posts.post_type = '$post_type'";
    20772077                } elseif ( $this->is_attachment ) {
    20782078                        $where .= " AND $wpdb->posts.post_type = 'attachment'";
     2079                        $post_type = 'attachment';
    20792080                } elseif ($this->is_page) {
    20802081                        $where .= " AND $wpdb->posts.post_type = 'page'";
     2082                        $post_type = 'page';
    20812083                } else {
    20822084                        $where .= " AND $wpdb->posts.post_type = 'post'";
    20832085                        $post_type = 'post';