[wp-trac] [WordPress Trac] #49368: Posts query is broken after changeset 47181
WordPress Trac
noreply at wordpress.org
Wed Feb 5 12:13:35 UTC 2020
#49368: Posts query is broken after changeset 47181
-------------------------------+---------------------
Reporter: audrasjb | Owner: (none)
Type: defect (bug) | Status: new
Priority: high | Milestone: 5.4
Component: Posts, Post Types | Version: trunk
Severity: major | Resolution:
Keywords: needs-patch | Focuses:
-------------------------------+---------------------
Comment (by audrasjb):
@SergeyBiryukov I made some tests and it looks like it works again if I
replace:
{{{#!php
// If the post_status was specifically requested, let it pass through.
if ( ! in_array( $status, $q_status ) ) {
$post_status_obj = get_post_status_object( $status );
if ( $post_status_obj && ! $post_status_obj->public ) {
}}}
with:
{{{#!php
$post_status_obj = get_post_status_object( $status );
// If the post_status was specifically requested, let it pass through.
if ( ! $post_status_obj->public && ! in_array( $status, $q_status ) ) {
if ( $post_status_obj && ! $post_status_obj->public ) {
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49368#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list