WordPress.org

Make WordPress Core

Ticket #4783: query.php.patch

File query.php.patch, 862 bytes (added by joost538, 7 years ago)

patch for WP_Query in wp-includes/query.php

Line 
1*** wp-includes/query.php       2007-08-20 22:32:58.470299200 +0000
2--- ../www/wp-includes/query.php        2007-06-01 23:14:35.000000000 +0000
3***************
4*** 389,395 ****
5                        , 'paged'
6                        , 'comments_popup'
7                        , 'preview'
8-                       , 'post_parent'
9                );
10 
11                foreach ($keys as $key) {
12--- 389,394 ----
13***************
14*** 987,998 ****
15                        $where .= '))';
16                }
17 
18-               // If a post parent is specified in the querystring, load posts with that parent
19-               if ( $q['post_parent'] ) {
20-                       $q['post_parent'] = '' . preg_replace('|[^0-9]|', '', $q['post_parent']);
21-                       $where = "AND post_parent = " . $q['post_parent'] . " AND post_status = 'publish'";
22-               }
23-
24                // Apply filters on where and join prior to paging so that any
25                // manipulations to them are reflected in the paging by day queries.
26                $where = apply_filters('posts_where', $where);
27--- 986,991 ----