Ticket #13927: 16850.diff
File 16850.diff, 773 bytes (added by , 14 years ago) |
---|
-
wp-includes/query.php
2108 2108 $where .= " AND {$wpdb->posts}.ID NOT IN ($post__not_in)"; 2109 2109 } 2110 2110 2111 if ( is_numeric($q['post_parent']) ) 2112 $where .= $wpdb->prepare( " AND $wpdb->posts.post_parent = %d ", $q['post_parent'] ); 2111 $parent_ids = array_filter( array_map( 'absint', (array) $q['post_parent'] ) ); 2112 if ( !empty( $parent_ids ) ) { 2113 $parent_ids = implode( ',', $parent_ids ); 2114 $where .= " AND $wpdb->posts.post_parent IN ($parent_ids)"; 2115 } 2113 2116 2114 2117 if ( $q['page_id'] ) { 2115 2118 if ( ('page' != get_option('show_on_front') ) || ( $q['page_id'] != get_option('page_for_posts') ) ) {