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

WordPress Trac noreply at wordpress.org
Sat May 2 20:40:38 UTC 2020


#50059: posts_results filter documentation of parameters incorrect.
--------------------------+-----------------------------
 Reporter:  nwjames       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Query         |    Version:  5.4
 Severity:  minor         |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Documentation in class-wp-query defines two parameters
  * @param WP_Post[] $posts Array of post objects.
  * @param WP_Query  $this  The WP_Query instance (passed by reference).

 but code is called with a single parameter being an array of these two:

 apply_filters_ref_array( 'posts_results', array( $this->posts, &$this ) )

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


More information about the wp-trac mailing list