mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 20:54:29 +00:00
Resurrect comment approval notification. Props chmac. fixes #6892 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@7917 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -734,6 +734,8 @@ function wp_set_comment_status($comment_id, $comment_status) {
|
||||
break;
|
||||
case 'approve':
|
||||
$query = $wpdb->prepare("UPDATE $wpdb->comments SET comment_approved='1' WHERE comment_ID = %d LIMIT 1", $comment_id);
|
||||
if ( get_option( 'comments_notify' ) == true )
|
||||
wp_notify_postauthor( $comment_id );
|
||||
break;
|
||||
case 'spam':
|
||||
$query = $wpdb->prepare("UPDATE $wpdb->comments SET comment_approved='spam' WHERE comment_ID = %d LIMIT 1", $comment_id);
|
||||
|
||||
Reference in New Issue
Block a user