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.2

apply_filters('notify_moderator') is found 2 times:

  • /wp-includes/comment.php line 2368
    2364
    2365
    2366
    2367
    2368
    2369
    2370
    2371
    2372
    2373
    2374
    // 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
    1896
    1897
    1898
    1899
    1900
    1901
    1902
    1903
    1904
    1905
    1906
    *
     * @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: