Changeset 12144
- Timestamp:
- 11/05/2009 04:08:53 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r12143 r12144 1487 1487 } 1488 1488 1489 if ( !empty($qv['post_type']) ) 1490 $qv['post_type'] = sanitize_user($qv['post_type'], true); 1489 if ( !empty($qv['post_type']) ) { 1490 if(is_array($qv['post_type'])) 1491 $qv['post_type'] = array_map('sanitize_user', $qv['post_type'], array(true)); 1492 else 1493 $qv['post_type'] = sanitize_user($qv['post_type'], true); 1494 } 1491 1495 1492 1496 if ( !empty($qv['post_status']) ) … … 2073 2077 } 2074 2078 2075 $post_type_cap = $post_type; 2079 if ( is_array($post_type) ) 2080 $post_type_cap = 'multiple_post_type'; 2081 else 2082 $post_type_cap = $post_type; 2076 2083 2077 2084 $exclude_post_types = ''; … … 2081 2088 if ( 'any' == $post_type ) { 2082 2089 $where .= $exclude_post_types; 2090 } elseif ( !empty( $post_type ) && is_array( $post_type ) ) { 2091 $where .= " AND $wpdb->posts.post_type IN ('" . join("', '", $post_type) . "')"; 2083 2092 } elseif ( ! empty( $post_type ) ) { 2084 2093 $where .= " AND $wpdb->posts.post_type = '$post_type'";
Note: See TracChangeset
for help on using the changeset viewer.