• dpks

    (@dpks)


    I’m using the Simple Trackback Validation Plugin. It works well, but there’s the annoying side effect that a notification email still gets sent to the post author even if the plugin has deleted the trackback or marked it as spam.

    I’m not a WordPress expert, but it looks like the reason is because in wp-trackback.php, the order of events is:

    1. Call wp_new_comment, which inserts the comment into the database and sends the email notification.
    2. Invoke the ‘trackback_post’ hook, which runs the Simple Trackback Validation Plugin. It deletes the trackback or marks it as spam, but by that time the notification has already been sent in the previous step.

    I’ve made a patch to separate email notification into a new function, wp_notify_comment, which is now called after the trackback_post hook. It checks the comment status in the database before sending out the notification.

    Click here to get the patch (applies to WordPress 2.1).

Viewing 1 replies (of 1 total)
  • Thanks for doing this, but I’m having trouble following the changes I’d need to make with your patch. Any chance you could package up the changed files and make them available for download?

Viewing 1 replies (of 1 total)
  • The topic ‘[PATCH] Remove email notification if plugin deletes trackback’ is closed to new replies.