wp-includes/comment.php:2443Sends a comment moderation notification to the comment moderator.
$comment_idintboolOne hook fires while wp_new_comment_notify_moderator() runs, in this order:
Filters whether to send the site moderator email notifications, overriding the site setting.
function wp_new_comment_notify_moderator( $comment_id ) { $comment = get_comment( $comment_id ); // Only send notifications for pending comments. $maybe_notify = ( '0' === $comment->comment_approved ); /** This filter is documented in wp-includes/pluggable.php */ $maybe_notify = apply_filters( 'notify_moderator', $maybe_notify, $comment_id ); if ( ! $maybe_notify ) { return false; } return wp_notify_moderator( $comment_id );}Introduced in 4.4.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/comment.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.