wp_new_comment_notify_moderator( int $comment_ID )

Send a comment moderation notification to the comment moderator.


Description Description


Parameters Parameters

$comment_ID

(int) (Required) ID of the comment.


Top ↑

Return Return

(bool) True on success, false on failure.


Top ↑

Source Source

File: wp-includes/comment.php

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/comment.php */
	$maybe_notify = apply_filters( 'notify_moderator', $maybe_notify, $comment_ID );

	if ( ! $maybe_notify ) {
		return false;
	}

	return wp_notify_moderator( $comment_ID );
}

Top ↑

Changelog Changelog

Changelog
Version Description
4.4.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.