Make WordPress Core


Ignore:
Timestamp:
08/30/2016 05:39:38 PM (8 years ago)
Author:
johnbillion
Message:

Posts, Post Types: Introduce a missing private query var that should have been introduced as part of #15459.

This private query var allows the hierarchical page query on the Pages listing screen to query for wp_posts.ID, wp_posts.post_parent instead of wp_posts.*. This introduces large memory and time savings when the site contains a large number of Pages. Combined with the processing time savings introduced in [31730] this makes the Pages listing screen considerably more performant.

Fixes #34982
Props rodrigosprimo

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp.php

    r38376 r38451  
    2727     * @var array
    2828     */
    29     public $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', 'post_parent__in', 'post_parent__not_in', 'title' );
     29    public $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', 'post_parent__in', 'post_parent__not_in', 'title', 'fields' );
    3030
    3131    /**
Note: See TracChangeset for help on using the changeset viewer.