mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Add filters to comments_open() and pings_open(). Props tellyworth. fixes #5761
git-svn-id: https://develop.svn.wordpress.org/trunk@6716 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -16,7 +16,7 @@ $status = $wpdb->get_row("SELECT post_status, comment_status FROM $wpdb->posts W
|
||||
if ( empty($status->comment_status) ) {
|
||||
do_action('comment_id_not_found', $comment_post_ID);
|
||||
exit;
|
||||
} elseif ( 'closed' == $status->comment_status ) {
|
||||
} elseif ( !comments_open($comment_post_ID) ) {
|
||||
do_action('comment_closed', $comment_post_ID);
|
||||
wp_die( __('Sorry, comments are closed for this item.') );
|
||||
} elseif ( in_array($status->post_status, array('draft', 'pending') ) ) {
|
||||
|
||||
Reference in New Issue
Block a user