Opened 15 years ago
Closed 15 years ago
#12795 closed enhancement (duplicate)
Recent comments widget filter
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Widgets | Keywords: | |
Focuses: | Cc: |
Description
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!
Change History (1)
Note: See
TracTickets for help on using
tickets.
The widget now uses get_comments(). So duplicate of #15019.