Make WordPress Core

Opened 12 years ago

Closed 11 years ago

#12795 closed enhancement (duplicate)

Recent comments widget filter

Reported by: firebird75 Owned by: azaozz
Milestone: Priority: normal
Severity: normal Version:
Component: Widgets Keywords:
Focuses: Cc:



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...
$comments = $wpdb->get_results($filtered_query);
in default-widgets.php near line 637 (WP 2.9.1)


Change History (1)

#1 @nacin
11 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

The widget now uses get_comments(). So duplicate of #15019.

Note: See TracTickets for help on using tickets.