[wp-trac] [WordPress Trac] #56721: get_page_by_title: duplicate SQL query
WordPress Trac
noreply at wordpress.org
Mon Oct 3 11:23:01 UTC 2022
#56721: get_page_by_title: duplicate SQL query
-------------------------------+-----------------------------
Reporter: david.binda | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: trunk
Severity: normal | Keywords:
Focuses: performance |
-------------------------------+-----------------------------
The r54234 has introduced a duplicate SQL query triggered for the
`get_page_by_title` function, as it's executing the SQL query by passing
the arguments for a WP_Query directly to the constructor of the class, and
then triggering the `WP_Query::get_posts()` directly, instead of accessing
the `WP_Query::posts` property.
See https://core.trac.wordpress.org/browser/trunk/src/wp-
includes/post.php?rev=54320#L5790
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56721>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list