WordPress.org

Make WordPress Core

Ticket #18848: 18848.2.patch

File 18848.2.patch, 2.1 KB (added by johnbillion, 9 years ago)
  • wp-admin/includes/post.php

     
    887887                $query['order'] = 'asc';
    888888                $query['posts_per_page'] = -1;
    889889                $query['posts_per_archive_page'] = -1;
     890                if ( isset( $q['post_parent'] ) )
     891                        $query['post_parent'] = absint( $q['post_parent'] );
     892                if ( isset( $q['child_of'] ) )
     893                        $query['child_of'] = absint( $q['child_of'] );
    890894        }
    891895
    892896        if ( ! empty( $q['show_sticky'] ) )
  • wp-includes/class-wp.php

     
    2525         * @since 2.0.0
    2626         * @var array
    2727         */
    28         var $private_query_vars = array('offset', 'posts_per_page', 'posts_per_archive_page', 'showposts', 'nopaging', 'post_type', 'post_status', 'category__in', 'category__not_in', 'category__and', 'tag__in', 'tag__not_in', 'tag__and', 'tag_slug__in', 'tag_slug__and', 'tag_id', 'post_mime_type', 'perm', 'comments_per_page', 'post__in', 'post__not_in');
     28        var $private_query_vars = array('offset', 'posts_per_page', 'posts_per_archive_page', 'showposts', 'nopaging', 'post_type', 'post_status', 'category__in', 'category__not_in', 'category__and', 'tag__in', 'tag__not_in', 'tag__and', 'tag_slug__in', 'tag_slug__and', 'tag_id', 'post_mime_type', 'perm', 'comments_per_page', 'post__in', 'post__not_in', 'post_parent', 'child_of');
    2929
    3030        /**
    3131         * Extra query variables set by the user.
  • wp-includes/query.php

     
    26342634
    26352635                $this->posts = $wpdb->get_results($this->request);
    26362636
     2637                if ( $q['child_of'] )
     2638                        $this->posts = & get_page_children($q['child_of'], $this->posts);
     2639
    26372640                // Raw results filter.  Prior to status checks.
    26382641                if ( !$q['suppress_filters'] )
    26392642                        $this->posts = apply_filters_ref_array('posts_results', array( $this->posts, &$this ) );