[wp-hackers] Single Hook for Comment Status?

scribu scribu at gmail.com
Sat Aug 21 19:59:35 UTC 2010


On Sat, Aug 21, 2010 at 10:32 PM, Peter Adams <peter at oncefuture.com> wrote:

> Is there a single hook for checking comment status?
>
> It seems that one has to hook both comment_post and
> transition_comment_status to cover new comments and edited/moderated
> comments respectively.
>
> Is that right?
>
> If so, any objections to adding transition_comment_status hook to
> wp_new_comment() so plugin developers can use one hook for comment status
> just like with posts?
>

wp_new_comment() should call transition_comment_status(), with the
$old_status being 'new'.

Feel free to open a ticket on trac.


-- 
http://scribu.net


More information about the wp-hackers mailing list