[wp-hackers] Extending comment filter in comments admin

Mike Schinkel mikeschinkel at newclarity.net
Fri Dec 25 00:19:02 UTC 2009


Sounds like a great plugin Ravi, hope you can get it working.

Happy Holidays hackers!

-Mike

On Dec 24, 2009, at 7:06 PM, Ravi Narayan Sarma wrote:

> Hello all,
> 
> so I have been struggling along with my “comment response tracker” plugin; the plan is: in the comments admin page (edit-comments.php) I offer a few options to let the user mark a comment as “todo”, “replied” or “ignore”. Comments that are “todo” are displayed with some sort of background colouring. Also, the current response status is highlighted among the three choices. That’s all been hacked up to the best of my abilities.
> 
> Now, I figured, wouldn’t it be sweet to let the user “Filter” comments by the response status? Turns out there is a convenient hook “admin_comment_types_dropdown” that lets me extend the filter options offered to the user. The current set of options (“Comments”, “Pings”) is passed down to me and I add in “Todo”, “Replied”, “Ignored” to this list. So far so good. But the next step has me stymied. It seems that _wp_get_comment_list() is where the the status criteria is applied, but there seems to be no hook to influence this process. But then, why would there be an “admin_comment_types_dropdown” hook? Perhaps I am looking in the wrong place.
> 
> Well, how about another direction… also available is a “manage_comments_nav” action to extend this menu. Akismet uses this to add a “Check for Spam” button. Should I perhaps be following suit, and extend the menu to offer my filtering options, rather than extend the Filter options?
> 
> Any suggestions would help alleviate my OCD!
> 
> 	— ravi
> 
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list