Moderation email recipient (3 posts)

  1. siepmann
    Posted 9 years ago #

    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.

  2. siepmann
    Posted 9 years ago #

    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);
  3. olaparent
    Posted 8 years ago #

    Looks like a good idea to me.

Topic Closed

This topic has been closed to new replies.

About this Topic