Sep 16, 2012

Warn employees of your WordPress when your articles are published

Filled under: ,

Warn employees of your WordPress when your articles are published
If you have a collaborative blog like this, and let other people create articles with the partner profile, which requires approval of content before publication, sure you needed this trick.

As WordPress does not have an internal system to alert employees when their articles are published pending review , and is - to say the least - an essential courtesy.


For this there are a few options to value ...

Notify publication ... using code ...

With a simple code, added to your plugin function , can warn employees of your blog when your articles are published, and thank pitch.

This, in particular, is the code I use here in WordPress Help :


//Avisa a los autores de la publicación de sus posts
function avisoAutor($post_id) {
   global $wpdb;
   $post = get_post($post_id);
   $author = get_userdata($post->post_author);
   $message = "
      Hola ".$author->display_name.",
      Tu artículo, ".$post->post_title." ya está publicado, ¡Muchas gracias por compartir tus conocimientos!
   ";
   wp_mail($author->user_email, "Tu artículo se ha publicado", $message);
}
add_action('publish_post', 'avisoAutor');


Save the changes and you're done. Simply personalize the messages if you wish.

Warn publication ... with plugins ...

If you do not want, or do not you dare even to add a little code, there are some plugins that offer virtually the same. Here are two examples, one very simple and a rather more complete:

  1. Edit Flow : full-featured management plugin corporate blogs, among its many utilities, including the notice to employees when they post their tickets. If you just want the functionality of the notice to employees is too plugin for you, but in any case I encourage you to try it, is a fantastic plugin.
  2. Change Notifier WP Status : This version becomes accurate code plugin that I have made ​​before. The caveat is that to customize the messages you need to edit the plugin php file, it has no adjustment to it. Otherwise it works perfectly. As you can tell plus also if an entry is not approved, if you refuse.


Warn employees of your WordPress when your articles are published

And I believe that with these choices have to spare. Of course, if you use some other method you tell us.

0 comments:

Post a Comment