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.22   Updated Wednesday, July 1st, 2009 at 8:20pm

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

  If you have found this page useful, please consider donating. Thanks!

Instructions

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

Change Log

  • 07-01-09 Version 1.22 – You can now choose to send the emails to all users on or above a certain level (eg: editors).
  • 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 – This includes auto-saves. A solution to this is being researched.

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.

Changing the user level for notifications

In the script, look for this line:

$email_user_level = 7;

This tells the script to send notification emails to anyone on, or above, that user level. Just change this for your particular needs.

Pages: [8] 7 6 5 4 3 2 1 » Show All

  1. 119
    Owen T

    For those interested in the code to stop the draft saves being sent to any random number of users, use this code. You’ll need to replace the entire line of $editors and it should work fine. Does for me anyway! lol.

    $editors = $wpdb->get_results("SELECT user_id FROM {$tp}usermeta WHERE {$tp}usermeta.meta_key = 'wp_user_level' AND {$tp}usermeta.meta_value = " . $email_user_level);

  2. 118
    Helen

    I tried to add a comment here about your plugins with some suggestions but it didn’t accept it, why? Is it closed or something?

  3. 117
    Helen

    This is a great script and I wish it could get more developed.
    For example: the email is sent as soon as a post title is composed, but it would be nice if email would get sent out each time the posts get edited too, so the admin could monitor the changes right away.

    Other question is how to change user-level to be only for admin? I tried to put there 0 or 1, either way all the users who are contributors or authors also get emails.

    Thanks for your effort in developing a plugin that doesn’t exist there :)

  4. I don’t know if it happened with the old version, but the current version of Wordpress emailed the notification out to all members because of the second query in your script. Good start though! I’m surprised there’s nothing in the repository for this process already.

  5. Does it work with the current version of wordpress?

  6. Thanks for writing, I truly enjoyed reading your newest post.

  7. I like that!!

  8. A beach wedding tends to be a informal occasion and the dress you wear shouldn’t to be so casually. You can accessorize a simple dress with pearls, designer pins, and other jewelry that won’t be too cumbersome as you walk down the sandy aisle. And the halter style or strapless dress are great choices to fit the occasion.

  9. It’s really useful for my blog website!

  10. Michael Kors Black Zipper & Logo Shoulder Bag is practical, yet stylish. This lady-like shoulder bag from Michael Kors Handbags Outlet is constructed of beautifully finished canvas and detailed with zippers embellishments. A large interior with multiple pockets provides versatile function in this Michael Kors Totes bags.

  11. Firstly, social practice can offer students a chance to contact society and meet different kinds of people. In this way students can gain some valuable social experience, which will be useful to their future career. Secondly, students can apply what they have learned in class to practical work, thus knowing themselves more clearly. Thirdly, social practice can bring them some financial reward and make them more independent of their family.

  12. I love to read this blog and people are keen to write on such quality blog

  13. Thanks for writing, I truly enjoyed reading your newest post.

  14. I really liked the post

Pages: [8] 7 6 5 4 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.