WordPress.org

Support

Support » How-To and Troubleshooting » Moderation email recipient

Moderation email recipient

  • I would like to edit the code that deals with sending an email to the admin for moderation notifications so that instead of emailing the admin, it emails whoever owns the page on which the comment was left. Does anyone know of any plugins for this, or alternatively which file to hack about with?

    Many thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Just figured it out:

    In the file wp-includes/pluggable.php, find the function wp_notify_moderator, and at the end, replace this line:

    @wp_mail($admin_email, $subject, $notify_message);

    with this:

    $q = mysql_query("SELECT user_email FROM wp_users WHERE ID = " . $post->post_author);
    	$q = mysql_fetch_assoc($q);
    	@wp_mail($q['user_email'], $subject, $notify_message);

    Looks like a good idea to me.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Moderation email recipient’ is closed to new replies.
Skip to toolbar