[wp-trac] [WordPress Trac] #56689: Use WP_Query in get_page_by_path
WordPress Trac
noreply at wordpress.org
Mon Feb 6 10:34:50 UTC 2023
#56689: Use WP_Query in get_page_by_path
-------------------------------------------------+-------------------------
Reporter: spacedmonkey | Owner:
| spacedmonkey
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Query | Version: trunk
Severity: normal | Resolution: wontfix
Keywords: needs-testing has-patch has-unit- | Focuses:
tests has-testing-info 2nd-opinion | performance
-------------------------------------------------+-------------------------
Comment (by spacedmonkey):
I have created a PR for backwards compat. See
[https://github.com/WordPress/wordpress-develop/pull/4006 #4006].
This does a number of things.
- If it detects posts_pre_query or pre_get_posts filter / actions are in
use, then it fallbacks to the old logic.
- Passes surpress filters as true.
This should that if someone is using a filter, that it should not effect
this WP_Query. There are lots of filters in that class that are not
covered by surpress filters, but I think should cover most of the breaking
use cases.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56689#comment:29>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list