[wp-trac] [WordPress Trac] #61307: Wrong variable name in filter documentation

WordPress Trac noreply at wordpress.org
Thu May 30 22:45:09 UTC 2024


#61307: Wrong variable name in filter documentation
-------------------------+------------------------
 Reporter:  david.binda  |       Owner:  audrasjb
     Type:  enhancement  |      Status:  reviewing
 Priority:  normal       |   Milestone:  6.6
Component:  Query        |     Version:  6.0
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  docs
-------------------------+------------------------

Comment (by SergeyBiryukov):

 Thanks for the ticket!

 IIRC, this part of the DocBlock was not reverted back to `$pieces` in
 [53376] specifically to avoid confusion. My thinking was that `$clauses`
 represents `compact( $pieces )`, which gets passed to the fillters, not
 `$pieces` itself.

 So reverting this to `$pieces` would be more confusing for me, but I'm
 curious to see what others think.

 Another thing to consider is that these variable names are often copied
 when writing new functions attached to the hooks, and `$clauses` seems
 like a more fitting variable name.

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


More information about the wp-trac mailing list