| 38 | | do_action('comment_on_trash', $comment_post_ID); |
| 39 | | exit; |
| | 38 | /** |
| | 39 | * Allow comments on trashed posts. |
| | 40 | * |
| | 41 | * Allow comments on trashed posts, per #19739. |
| | 42 | * |
| | 43 | * @since 4.1.0 |
| | 44 | * |
| | 45 | * @param int $comment_post_ID The post_id for comments to be enabled on. |
| | 46 | */ |
| | 47 | if ( !apply_filters( 'allow_comment_on_trash', false, $comment_post_ID ) ){ |
| | 48 | /** |
| | 49 | * Action on trashed post. |
| | 50 | * |
| | 51 | * Action on trashed post where comments on trashed posts are not allowed. |
| | 52 | * |
| | 53 | * @since 2.9.0 |
| | 54 | * |
| | 55 | * @param int $comment_post_ID The post_id |
| | 56 | */ |
| | 57 | do_action('comment_on_trash', $comment_post_ID); |
| | 58 | exit; |
| | 59 | } |
| 41 | | do_action('comment_on_draft', $comment_post_ID); |
| 42 | | exit; |
| | 61 | /** |
| | 62 | * Allow comments on draft posts. |
| | 63 | * |
| | 64 | * Allow comments on draft posts, per #19739. |
| | 65 | * |
| | 66 | * @since 4.1.0 |
| | 67 | * |
| | 68 | * @param int $comment_post_ID The post_id for comments to be enabled on. |
| | 69 | */ |
| | 70 | if ( !apply_filters( 'allow_comment_on_draft', false, $comment_post_ID ) ){ |
| | 71 | /** |
| | 72 | * Action on draft post. |
| | 73 | * |
| | 74 | * Action on draft post where comments on draft posts are not allowed. |
| | 75 | * |
| | 76 | * @since 2.9.0 |
| | 77 | * |
| | 78 | * @param int $comment_post_ID The post_id |
| | 79 | */ |
| | 80 | do_action('comment_on_draft', $comment_post_ID); |
| | 81 | exit; |
| | 82 | } |