}
// Only send notifications for approved comments.
- if ( ! isset( $comment->comment_approved ) || 'spam' === $comment->comment_approved || ! $comment->comment_approved ) {
+ if ( ! isset( $comment->comment_approved ) || '1' != $comment->comment_approved ) {
return false;
}
$comment_author = $user->display_name;
$comment_author_email = $user->user_email;
$comment_author_url = $user->user_url;
- $user_id = $user->ID;
+ $user_ID = $user->ID;
if ( current_user_can( 'unfiltered_html' ) ) {
if ( ! isset( $comment_data['_wp_unfiltered_html_comment'] )
|| ! wp_verify_nonce( $comment_data['_wp_unfiltered_html_comment'], 'unfiltered-html-comment_' . $comment_post_ID )
'comment_content',
'comment_type',
'comment_parent',
- 'user_id'
+ 'user_ID'
);
$comment_id = wp_new_comment( wp_slash( $commentdata ) );