Welcome to Dagon Design. In addition to free scripts, WordPress plugins, and articles, we offer a variety of services including custom theme design, plugin creation, and PHP scripting. Contact me for more information.

Version 1.21   Updated Sunday, April 27th, 2008 at 6:18pm

Draft Notification Plugin for WordPress

This WordPress plugin automatically emails the admin when a new draft is saved. The email contains the post’s title, the author, and a link. There is no options page currently, because there is really nothing to configure. The plugin now supports the new ‘pending’ status.

Download

Instructions

  • Download the above file, rename it from .txt to .php, and upload it to your plugins directory.
  • Enable the plugin.

Change Log

  • 04-27-08 Version 1.21 - Updated to work with WordPress 2.5 and the ‘pending’ status.
  • 05-16-07 Version 1.2 - Updated to work with WordPress 2.2.
  • 10-20-06 Version 1.1 - The emails now contain the author’s name, instead of ID.
  • 04-22-06 Version 1.0 - First release.

Notes

Because of the way this plugin works, it also sends out an email when an existing draft has been saved again. There does not seem to be an efficient way to check to see if it is the first time the draft has been saved, since dates are not stored for drafts.

By default, the author’s display_name is shown in the email. If you would prefer to see the login_name, or nice_name field, just look for the line in the script that says “Choose one of the following options to show the author’s name” and uncomment the option you would like to use.

Modifications

If you would rather have the email notification sent to the author of the post, instead of the admin, replace this line:

$recipient = get_bloginfo('admin_email');

With this:

$recipient = get_the_author_email();

Pages: « 3 2 [1] Show All

  1. Thank you for this great plug-in! This saves a lot of time when you have multiple Blogs you administer.

  2. Thank you very much for the plugin.
    It is exactly what I needed at http://www.newrss.net

    Please feel free to stop by and make a post about it. I’m sure there are others who could benefit from this plugin.

    Again, thanks! This is a great plugin.

  3. 13
    Cisco

    This is EXACTLY the plugin that I’ve been looking for. Thank you so much!

  4. Shane: I just uploaded a new version - 1.1

    It shows the display_name for the author now, and includes an option in the code to use login_name or nice_name if you prefer :)

    I had actually intended it to show the name, not ID, so thanks for pointing that out :)

  5. This is great… Just what I needed… Though is there a way to have it show the author’s name in the post rather than their number?

  6. What a cool idea! This was exactly what I was looking for. :)

  7. Opps, I forgot to mention that I have “just” copy&paste the From:-line from Scott Merrill’s (Skippy) commentauth-plugin. So it was not fully my work. ;)

  8. Quix0r: Nice work. One reason I skipped extra headers in this script was because so many people have problems with extra headers in my mail scripts - since a lot of servers disable the use of the extra parameters when PHP is in safe mode. Eventually I will add checks in to determine whether or not the extra info can be used. I like your code though :)

  9. Hello,

    I have patched your plugin slightly. I have added a nicer “From:”-line than the ugly “www-data” one or what ever your webserver is mailing with.

    http://blog.mxchange.org/dd-draft-notification.phps

    It not (yet) tested but it may work. So please feel free to grab and test it.

    Quix0r

  10. Brian: Good to hear :)

  11. 5
    Brian Barnes

    Nevermind, I got it figured out! I edited the recipient list! Thanks for a great plugin!

  12. 4
    Brian Barnes

    Is there a way to edit the list of recipients? I don’t want the admins to get the emails, but rather a list of editors who will proof and publish the post.

  13. Glad it is working for you :)

    As far as the link, it does appear to work on my site, as long as I am logged in as the admin. I will test it out some more though. Either way, pointing it straight to the admin panel would be a good idea :)

  14. Ok. Forget about this. There was a problem on my server side.
    It’s all fixed and it works great now!
    Just one little remark: the link we receive in the email can not be valid until the draft hasn’t been published. The page doesn’t exist.
    It would make more sense to link to the admin. Something like: /wp-admin/post.php?action=edit&post=$post_id.

  15. Hello,
    Thank you for this plugin. It’s a very good idea. I was just looking for something like that.
    Unfortunately I just tried to install it and it’s not working. I activated it but nothing happens!
    I just came across this : http://wordpress.org/support/topic/51296?replies=4
    Nothing to do with it?

Pages: « 3 2 [1] Show All

Leave a Comment

Before you comment: If you are having an issue with a script, please make sure you have read the entire article. Also, please read through the comments because most common issues have already been discussed many times. Thanks.


Be sure to wrap all code in <code></code> tags.