[wp-trac] [WordPress Trac] #34442: How to target only the get_comments() query in comment_template()

WordPress Trac noreply at wordpress.org
Mon Jan 11 09:13:35 UTC 2016


#34442: How to target only the get_comments() query in comment_template()
-------------------------+---------------------------
 Reporter:  birgire      |       Owner:  boonebgorges
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  4.5
Component:  Comments     |     Version:  4.3.1
 Severity:  normal       |  Resolution:  fixed
 Keywords:               |     Focuses:
-------------------------+---------------------------

Comment (by birgire):

 @boonebgorges thanks for your reply.

 Regarding my extra arguments speculations:

 I thought it would make it easer to target the relevant
 {{{comments_template( $file )}}}, to pass on the $file argument to the
 filter.  I then just added {{{$seperate_comments}}} for the completion,
 but I think it would be less valuable than the {{{$file}}} argument.

 As you mentioned it's much easier to get the {{{$post}}}, {{{$user_ID}}}
 and {{{$commenter}}} (in the case when we need to modify the query
 arguments for a given post type or some group of users, these will be
 handy.)

 But what I had in mind was to decrease duplication, better contain it and
 hopefully reduce explicit usage of globals (though they are used
 implicitly).

 But if you think any of these extra arguments would cause more confusion
 than benefit, then we should skip it.

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


More information about the wp-trac mailing list