[wp-trac] [WordPress Trac] #56991: Update to get_page_by_title in 6.1 changes WHERE clause
WordPress Trac
noreply at wordpress.org
Mon Nov 7 00:53:40 UTC 2022
#56991: Update to get_page_by_title in 6.1 changes WHERE clause
--------------------------+---------------------
Reporter: Bjorn2404 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.1.1
Component: General | Version: 6.1
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+---------------------
Comment (by peterwilsoncc):
`post_status => 'any'` already exists but limits the query to those
readable by the current user (it uses `exclude_from_search` for logged out
users).
I think adding a second option, `all`, would create confusion and
developers could accidentally expose data they don't intend to.
Something like this may be a useful solution in the fullness of time but I
am reluctant to add it to a point release as it would require substantial
modifications to `WP_Query::parse_query()`. The post type and status
clauses are intertwined and would require a tonne of tests before changes
could be considered.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56991#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list