Trash comments when trashing a post. see #11073

git-svn-id: https://develop.svn.wordpress.org/trunk@12148 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2009-11-05 21:03:09 +00:00
parent 9d48d02ab6
commit bc7e8e284b
3 changed files with 102 additions and 2 deletions

View File

@@ -30,6 +30,9 @@ if ( empty($status->comment_status) ) {
} elseif ( in_array($status->post_status, array('draft', 'pending') ) ) {
do_action('comment_on_draft', $comment_post_ID);
exit;
} elseif ( 'trash' == $status->post_status ) {
do_action('comment_on_trash', $comment_post_ID);
exit;
} else {
do_action('pre_comment_on_post', $comment_post_ID);
}