[wp-trac] [WordPress Trac] #34771: Comment ordering is not applying the order by latest or newest filter.

WordPress Trac noreply at wordpress.org
Tue Nov 24 07:24:34 UTC 2015


#34771: Comment ordering is not applying the order by latest or newest filter.
-------------------------------+------------------------------
 Reporter:  alexvandervegt     |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Comments           |     Version:  4.3.1
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------

Comment (by alexvandervegt):

 When i have a look at:

 https://github.com/WordPress/WordPress/blob/master/wp-includes/comment-
 template.php

 Line 1284:
 {{{
 'orderby' => 'comment_date_gmt',
 'order' => 'ASC',
 }}}

 The issue is still present. The problem will accure when you build the
 comments.php in HTML and PHP without the comment walker. But just a
 foreach loop on the $comments.

 When i think about it something like this would be a much better better
 solution:

 {{{
 'orderby' => 'comment_date_gmt',
 'order' => apply_filters( 'comments_order', 'ASC' ),
 }}}

 The default function for the '''comments_order''' should proces the admin
 option already and we are also able to overrule when needed.

 Same goes for the '''orderby''', overruling here should also be desirable.

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


More information about the wp-trac mailing list