Index: src/wp-includes/comment.php
===================================================================
--- src/wp-includes/comment.php	(revision 40128)
+++ src/wp-includes/comment.php	(working copy)
@@ -2985,31 +2985,55 @@
 	} elseif ( 'trash' == $status ) {
 
 		/**
-		 * Fires when a comment is attempted on a trashed post.
+		 * Whether to allow comments on trashed posts.
 		 *
-		 * @since 2.9.0
+		 * @since 4.8.0
 		 *
-		 * @param int $comment_post_ID Post ID.
+		 * @param bool $allow           Whether to allow comments on trashed posts. Default false.
+		 * @param int  $comment_post_ID The post ID for comments to be enabled on.
 		 */
-		do_action( 'comment_on_trash', $comment_post_ID );
+		if ( ! apply_filters( 'allow_comment_on_trash', false, $comment_post_ID ) ) {
 
-		return new WP_Error( 'comment_on_trash' );
+			/**
+			 * 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 );
 
+			return new WP_Error( 'comment_on_trash' );
+
+		}
+
 	} elseif ( ! $status_obj->public && ! $status_obj->private ) {
 
 		/**
-		 * Fires when a comment is attempted on a post in draft mode.
+		 * Whether to allow comments on draft posts.
 		 *
-		 * @since 1.5.1
+		 * @since 4.8.0
 		 *
-		 * @param int $comment_post_ID Post ID.
+		 * @param bool $allow           Whether to allow comments on draft posts. Default false.
+		 * @param int  $comment_post_ID The post ID for comments to be enabled on.
 		 */
-		do_action( 'comment_on_draft', $comment_post_ID );
-		
-		if ( current_user_can( 'read_post', $comment_post_ID ) ) {
-			return new WP_Error( 'comment_on_draft', __( 'Sorry, comments are not allowed for this item.' ), 403 );
-		} else {
-			return new WP_Error( 'comment_on_draft' );
+		if ( ! apply_filters( 'allow_comment_on_draft', false, $comment_post_ID ) ) {
+
+			/**
+			* Fires when a comment is attempted on a post in draft mode.
+			*
+			* @since 1.5.1
+			*
+			* @param int $comment_post_ID Post ID.
+			*/
+			do_action( 'comment_on_draft', $comment_post_ID );
+
+			if ( current_user_can( 'read_post', $comment_post_ID ) ) {
+				return new WP_Error( 'comment_on_draft', __( 'Sorry, comments are not allowed for this item.' ), 403 );
+			} else {
+				return new WP_Error( 'comment_on_draft' );
+			}
+
 		}
 
 	} elseif ( post_password_required( $comment_post_ID ) ) {
@@ -3025,19 +3049,17 @@
 
 		return new WP_Error( 'comment_on_password_protected' );
 
-	} else {
+	}
 
-		/**
-		 * Fires before a comment is posted.
-		 *
-		 * @since 2.8.0
-		 *
-		 * @param int $comment_post_ID Post ID.
-		 */
-		do_action( 'pre_comment_on_post', $comment_post_ID );
+	/**
+	 * Fires before a comment is posted.
+	 *
+	 * @since 2.8.0
+	 *
+	 * @param int $comment_post_ID Post ID.
+	 */
+	do_action( 'pre_comment_on_post', $comment_post_ID );
 
-	}
-
 	// If the user is logged in
 	$user = wp_get_current_user();
 	if ( $user->exists() ) {
