Ticket #19739: 19739.2.diff
| File 19739.2.diff, 1.2 KB (added by , 11 years ago) |
|---|
-
wp-comments-post.php
36 36 wp_die( __('Sorry, comments are closed for this item.') ); 37 37 } elseif ( 'trash' == $status ) { 38 38 do_action('comment_on_trash', $comment_post_ID); 39 exit; 39 /** 40 * Allow comments on trashed posts. 41 * 42 * Allow comments on trashed posts, per #19739. 43 * 44 * @since 4.1.0 45 * 46 * @param int $comment_post_ID The post_id for comments to be enabled on. 47 */ 48 if ( !apply_filters( 'allow_comment_on_trash', false, $comment_post_ID ) ){ 49 exit; 50 } 40 51 } elseif ( !$status_obj->public && !$status_obj->private ) { 41 52 do_action('comment_on_draft', $comment_post_ID); 42 exit; 53 /** 54 * Allow comments on draft posts. 55 * 56 * Allow comments on draft posts, per #19739. 57 * 58 * @since 4.1.0 59 * 60 * @param int $comment_post_ID The post_id for comments to be enabled on. 61 */ 62 if ( !apply_filters( 'allow_comment_on_draft', false, $comment_post_ID ) ){ 63 exit; 64 } 43 65 } elseif ( post_password_required($comment_post_ID) ) { 44 66 do_action('comment_on_password_protected', $comment_post_ID); 45 67 exit;