-} elseif ( in_array($status->post_status, array('draft', 'pending') ) ) {
- do_action('comment_on_draft', $comment_post_ID);
+} elseif ( 'trash' == $status ) {
+ /**
+ * Fires when a comment is attempted on a trashed post.
+ *
+ * @since 2.9.0
+ * @param int $comment_post_ID Post ID.
+ */
+ do_action( 'comment_on_trash', $comment_post_ID );
+ exit;
+} elseif ( ! $status_obj->public && ! $status_obj->private ) {
+ /**
+ * Fires when a comment is attempted on a post in draft mode.
+ *
+ * @since unknown
+ * @param int $comment_post_ID Post ID.
+ */
+ do_action( 'comment_on_draft', $comment_post_ID );