WordPress.org

Ready to get started?Download WordPress

Forums

Peter's Collaboration E-mails
[resolved] Suggested Addition - Trigger on Delete (3 posts)

  1. robscott
    Member
    Posted 1 year ago #

    Hi,

    We don't want to revert posts to draft where we use this plugin - instead we want to either publish or delete (usually because the subject is basically spam!).

    Would it be possible to add in an email user upon deletion, ideally with the moderator having selected a "reason for deletion" from a pre-defined list (i.e. "Post against posting policies" or "Post is spam" etc) which can be toggled by site admin.

    Willing and able to help you get this developed if necessary - just could use a little input on how to set this up!

    Regards,

    Rob

    http://wordpress.org/extend/plugins/peters-collaboration-e-mails/

  2. Peter
    Member
    Plugin Author

    Posted 1 year ago #

    Looks like this would definitely be possible, on a couple of hooks:

    Trashing a post: you can hook in to the same post status hook as the collaboration e-mails plugin, but with the new status of "trash"

    Deleting a post (bypassing trash or moving from trash to delete): You cannot use the post status hook, but there is a special hook "before_delete_post"

    Adding a reason for deletion would be more difficult, however, since there are multiple ways to delete a post (not just from the post screen) and even on the post screen, the "Move to trash" action is triggered via a link, not a form button.

  3. robscott
    Member
    Posted 1 year ago #

    Actually, we have switched to a system outside of WordPress for this - but thanks for the response.

    What we are now doing is processing outside WP and sending posts programatically from outside, with emails triggered "up the chain" so to speak. This is because we were deleting more stuff than we were including, so it seemed more appropriate to be "culling" spam higher up the chain.

    Your plugin was very useful prior to this, however, and is still good on our collaborative news website (where we don't delete articles - as we trust our authors on that site - but do require a pause for editing).

    We did not get to the point where we hooked this up, so there's no code to add in. Marking as "resolved" as its no longer necessary.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.