Changeset 14478 for trunk/wp-includes/query.php
- Timestamp:
- 05/06/2010 06:03:05 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r14477 r14478 2027 2027 if ( !is_wp_error($post_ids) && !empty($post_ids) ) { 2028 2028 $whichcat .= " AND $wpdb->posts.ID IN (" . implode(', ', $post_ids) . ") "; 2029 if ( '' === $post_type) {2029 if ( empty($post_type) ) { 2030 2030 $post_type = 'any'; 2031 2031 $post_status_join = true; … … 2033 2033 $post_status_join = true; 2034 2034 } 2035 $q['post_status'] = 'publish'; 2035 if ( empty($q['post_status']) ) 2036 $q['post_status'] = 'publish'; 2036 2037 } else { 2037 2038 $whichcat = " AND 0 "; … … 2084 2085 // MIME-Type stuff for attachment browsing 2085 2086 2086 if ( isset($q['post_mime_type']) && '' != $q['post_mime_type'] ) 2087 $whichmimetype = wp_post_mime_type_where($q['post_mime_type']); 2087 if ( isset($q['post_mime_type']) && '' != $q['post_mime_type'] ) { 2088 $table_alias = $post_status_join ? $wpdb->posts : ''; 2089 $whichmimetype = wp_post_mime_type_where($q['post_mime_type'], $table_alias); 2090 } 2088 2091 2089 2092 $where .= $search . $whichcat . $whichauthor . $whichmimetype;
Note: See TracChangeset
for help on using the changeset viewer.