wpseek.com
A WordPress-centric search engine for devs and theme authors
wp_new_comment_notify_moderator › WordPress Function
Since4.4.0
Deprecatedn/a
› wp_new_comment_notify_moderator ( $comment_id )
Parameters: |
|
Returns: |
|
Defined at: |
|
Codex: |
Sends a comment moderation notification to the comment moderator.
Related Functions: wp_new_comment_notify_postauthor, wp_notify_moderator, wp_new_comment, wp_get_comment_status, wp_check_comment_data
Source
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 );
}