notify_moderator

notify_moderator

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.1

apply_filters('notify_moderator') is found 2 times:

  • /wp-includes/comment.php line 2368
    	// 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 );
    
  • /wp-includes/pluggable.php line 1900
    		 *
    		 * @param bool $maybe_notify Whether to notify blog moderator.
    		 * @param int  $comment_id   The ID of the comment for the notification.
    		 */
    		$maybe_notify = apply_filters( 'notify_moderator', $maybe_notify, $comment_id );
    
    		if ( ! $maybe_notify ) {
    			return true;
    		}
    
    		$comment = get_comment( $comment_id );
    

See this hook used in plugins: