Posts, Post Types: Avoid redundant SQL query in get_pages().

This avoids an additional query by passing the query args directly to the `WP_Query::query()` method, rather than to the constructor and calling get_posts(), following [55569].

Props david.binda, azaozz, spacedmonkey, mukesh27, flixos90, SergeyBiryukov, joemcgill.
Fixes #59224.

Built from https://develop.svn.wordpress.org/trunk@56491


git-svn-id: http://core.svn.wordpress.org/trunk@56003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Joe McGill
2023-08-29 22:13:18 +00:00
parent c15220ee49
commit 3087927a5f
2 changed files with 3 additions and 3 deletions

View File

@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.4-alpha-56490';
$wp_version = '6.4-alpha-56491';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.