[wp-trac] [WordPress Trac] #60395: Filtering posts by open ping_status returns posts with closed ping_status

WordPress Trac noreply at wordpress.org
Wed Jan 31 10:50:47 UTC 2024


#60395: Filtering posts by open ping_status returns posts with closed ping_status
---------------------------+------------------------------
 Reporter:  jamieburchell  |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Query          |     Version:
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+------------------------------
Changes (by danielbachhuber):

 * version:  6.4.2 =>
 * component:  Posts, Post Types => Query


Comment:

 To clarify, the offending line of code is here:

 https://github.com/WordPress/wordpress-
 develop/blob/c45f527fbd8ec82366847eb934620b85991f8af3/src/wp-includes
 /class-wp-query.php#L3221-L3242

 When `'fields' => 'ids'` is provided, sticky posts are ignored.

 I don't know that it makes sense to change this behavior, but we can at
 least have it documented in a Trac ticket.

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


More information about the wp-trac mailing list