[wp-trac] [WordPress Trac] #12795: Recent comments widget filter

WordPress Trac wp-trac at lists.automattic.com
Thu Apr 1 13:16:15 UTC 2010


#12795: Recent comments widget filter
-------------------------+--------------------------------------------------
 Reporter:  firebird75   |       Owner:  azaozz    
     Type:  enhancement  |      Status:  new       
 Priority:  normal       |   Milestone:  Unassigned
Component:  Widgets      |     Version:            
 Severity:  normal       |    Keywords:            
-------------------------+--------------------------------------------------
 Hello,

 It would be nice to add a filter on the query for the recent comments
 filter (on the dashboard and on the frontend sidebar) so that plugins
 could easily filter out comme comments (related to private posts or custom
 post types).

 Right now, because of the lack of built-in filter on that, the only way to
 remove comments is to overwrite the complete widget call with a new one
 containing the custom query. This isn't very easy and efficient from a
 code prospective.

 So basically, something like that would be nice :
 $filtered_query = apply_filters...
 before
 $comments = $wpdb->get_results($filtered_query);
 in default-widgets.php near line 637 (WP 2.9.1)

 Thanks!

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


More information about the wp-trac mailing list