Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

This one might be a little tricky, but I'm looking for a way to make the Recent Comments widget on the wp-admin a bit more useful/action-driven. I'd like to be able to filter to only show the Pending comments (as those would require an action to them). I saw on line 45 of wp-admin/includes/dashboard.php there is:

// Recent Comments Widget
    if ( is_blog_admin() && current_user_can('moderate_comments') ) {
        if ( !isset( $widget_options['dashboard_recent_comments'] ) || !isset( $widget_options['dashboard_recent_comments']['items'] ) ) {
            $update = true;
            $widget_options['dashboard_recent_comments'] = array(
                'items' => 5,
            );
        }
        $recent_comments_title = __( 'Recent Comments' );
        wp_add_dashboard_widget( 'dashboard_recent_comments', $recent_comments_title, 'wp_dashboard_recent_comments', 'wp_dashboard_recent_comments_control' );
    }

but I'm a little fuzzy on the correct way (or if there is a way) to hook into this to modify the "types" of comments shown. Any help would be greatly appreciated. Thanks!

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

There doesn't seem to be a hook/filter available to control comments displayed in the widget. You might have to create new dashboard widget for this as new plugin or as part of themes function.php

share|improve this answer
    
Thanks - appreciate the response! –  Zach Dec 30 '11 at 1:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.