[wp-trac] [WordPress Trac] #48556: Query for multiple post types not considering user permission to retrieve private posts

WordPress Trac noreply at wordpress.org
Mon Aug 24 18:24:35 UTC 2020


#48556: Query for multiple post types not considering user permission to retrieve
private posts
--------------------------+-----------------------------
 Reporter:  leogermani    |       Owner:  SergeyBiryukov
     Type:  defect (bug)  |      Status:  reviewing
 Priority:  normal        |   Milestone:  5.6
Component:  Query         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------

Comment (by leogermani):

 Thanks for the feedback @boonebgorges

 > This decision means that there are two places where the `post_status`
 logic is built: one for single post types, and one for multiple post types
 and/or 'any'.

 Yes, just clarify that with "less problems for developers" I meant
 backward compatibility for anyone doing fancy transformations in the query
 using the `posts_where` filter.

 If we change the query in all cases we will basically break things for
 anyone using this filter, since they usually rely on the query structure
 they expect from core using a regex or similar approach.

 Is that ok? Something we let everyone know with a Dev note?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48556#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list