[wp-trac] [WordPress Trac] #8287: More get_comment_link() improvements

WordPress Trac wp-trac at lists.automattic.com
Wed Nov 19 23:54:58 GMT 2008


#8287: More get_comment_link() improvements
--------------------------+-------------------------------------------------
 Reporter:  Viper007Bond  |       Owner:           
     Type:  enhancement   |      Status:  new      
 Priority:  normal        |   Milestone:  2.7      
Component:  Comments      |     Version:  2.7      
 Severity:  normal        |    Keywords:  has-patch
--------------------------+-------------------------------------------------
 1. Don't force theme authors to pass the page argument value to
 `get_comment_link()` in their comment walker. We can just do it ourselves
 behind the scenes. This simplifies things a lot.

 2. Replace `get_comment_link()`'s second parameter with an `$args`
 allowing you to pass things like `type` (it's backwards compatible).
 Basically if you know you're going to be passing a `type` to
 `wp_list_comments()` (for example `comment`) and need to use
 `get_comment_link()` outside of the loop (i.e. a custom recent comments),
 pass the same `type` to `get_comment_link()` and you should end up with a
 proper page number. Note the default recent comments widget will still
 produce the wrong page numbers if you pass a `type` to
 `wp_list_comments()`.

 3. Change number 2 required updating `get_page_of_comment()` to support
 all these extra args.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8287>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list