[wp-trac] [WordPress Trac] #50059: posts_results filter documentation of parameters incorrect.

WordPress Trac noreply at wordpress.org
Sun May 3 10:01:52 UTC 2020


#50059: posts_results filter documentation of parameters incorrect.
--------------------------+----------------------
 Reporter:  nwjames       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Query         |     Version:  5.4
 Severity:  minor         |  Resolution:  invalid
 Keywords:                |     Focuses:  docs
--------------------------+----------------------
Changes (by SergeyBiryukov):

 * status:  new => closed
 * focuses:   => docs
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 Hi there, welcome back to WordPress Trac! Thanks for the report.

 It might be confusing, but the documentation is correct as is,
 `apply_filters_ref_array()` passes both of these parameters to the filter
 separately, not as a single array.

 This is not specific for `posts_results` and is the case for any other
 instance of `apply_filters_ref_array()` in core, e.g.
 `comments_pre_query`, `get_meta_sql`, etc.

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


More information about the wp-trac mailing list