notify_moderator filter-hookWP 4.4.0

Filters whether to send the site moderator email notifications, overriding the site setting.

Usage

add_filter( 'notify_moderator', 'wp_kama_notify_moderator_filter', 10, 2 );

/**
 * Function for `notify_moderator` filter-hook.
 * 
 * @param bool $maybe_notify Whether to notify blog moderator.
 * @param int  $comment_id   The ID of the comment for the notification.
 *
 * @return bool
 */
function wp_kama_notify_moderator_filter( $maybe_notify, $comment_id ){

	// filter...
	return $maybe_notify;
}
$maybe_notify(true|false)
Whether to notify blog moderator.
$comment_id(int)
The ID of the comment for the notification.

Changelog

Since 4.4.0 Introduced.

Where the hook is called

wp_notify_moderator()
notify_moderator
wp_new_comment_notify_moderator()
notify_moderator
wp-includes/pluggable.php 1894
$maybe_notify = apply_filters( 'notify_moderator', $maybe_notify, $comment_id );
wp-includes/comment.php 2340
$maybe_notify = apply_filters( 'notify_moderator', $maybe_notify, $comment_id );

Where the hook is used in WordPress

Usage not found.