[wp-trac] Re: [WordPress Trac] #4297: Order Comments

WordPress Trac wp-trac at lists.automattic.com
Sat May 19 17:56:03 GMT 2007


#4297: Order Comments
------------------------------------+---------------------------------------
 Reporter:  hyp0r                   |        Owner:  anonymous
     Type:  enhancement             |       Status:  new      
 Priority:  normal                  |    Milestone:  2.4      
Component:  General                 |      Version:           
 Severity:  minor                   |   Resolution:           
 Keywords:  sort comments order by  |  
------------------------------------+---------------------------------------
Comment (by filosofo):

 You can read about plugin filters
 [http://codex.wordpress.org/Plugin_API#Filters here].

 Before the comments_template function prints the comments template, it
 filters the comments through the comments_array filter.

 {{{function sort_my_comments($comments) { }}}

 {{{[do sorting]}}}

 {{{return $comments;}}}

 {{{ } }}}

 {{{add_filter('comments_array','sort_my_comments');}}}

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4297#comment:6>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list