wp_notify_postauthor() – Notify an author (and/or others) of a comment/trackback/pingback on a post.

You appear to be a bot. Output may be restricted

Description

Notify an author (and/or others) of a comment/trackback/pingback on a post.

Usage

$bool = wp_notify_postauthor( $comment_id, $deprecated );

Parameters

$comment_id
( int|WP_Comment ) required – Comment ID or WP_Comment object.
$deprecated
( string ) optional – Not used

Returns

bool True on completion. False if no email addresses were specified.

Source

File name: wordpress/wp-includes/pluggable.php
Lines:

201 to 218 of 218
     *
     * @since 1.5.2
     *
     * @param string $message_headers Headers for the comment notification email.
     * @param string $comment_id      Comment ID as a numeric string.
     */
    $message_headers = apply_filters( 'comment_notification_headers', $message_headers, $comment->comment_ID );

    foreach ( $emails as $email ) {
      wp_mail( $email, wp_specialchars_decode( $subject ), $notify_message, $message_headers );
    }

    if ( $switched_locale ) {
      restore_previous_locale();
    }

    return true;
  }
 

 View on GitHub View on Trac