Check for moderation_notify flag before notifying moderator that about

held comments.


git-svn-id: https://develop.svn.wordpress.org/trunk@1678 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Donncha O Caoimh 2004-09-17 10:26:34 +00:00
parent fa94dfa448
commit 5e0e0bf9a9
1 changed files with 4 additions and 1 deletions

View File

@ -928,6 +928,9 @@ function wp_notify_moderator($comment_id) {
global $wpdb;
global $querystring_start, $querystring_equal, $querystring_separator;
if( get_settings( "moderation_notify" ) == 0 )
return true;
$comment = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID='$comment_id' LIMIT 1");
$post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID='$comment->comment_post_ID' LIMIT 1");
$user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE ID='$post->post_author' LIMIT 1");