-1

Does anyone know of a notification plugin, snippet that will allow me to when i approve a users post they get a notification show up on the menu, and when they go to the notification page it says something like

"Your post [title with hyperlink to post] has been approved/ hasnt been approved"

Thanks in advance

2

You can use publish_post action hook for notifying post author.

function wpcs_author_notification( $post_id ) {

   $post = get_post( $post_id );
   $author = get_userdata( $post->post_author );

   $message = "Hi " . $author->display_name . ", Your post, " . $post->post_title . " has just been published at " . get_permalink( $post_id );

   wp_mail( $author->user_email, "Your article is published", $message );

}

add_action( 'publish_post', 'wpcs_author_notification' );

This function will notify author for published post. You can modify message in above code.

  • He was looking for a notification in the dashboard/menu but this should get him started. :) – Christine Cooper Jul 29 '15 at 15:22
  • Oh. I thought he wanted to send an email. But yes, he can modify the function to add a notification bubble. – Robert hue Jul 29 '15 at 15:34
  • Hello, Thank yo for your help, sadly i dont know how to modify it to add a notification bubble. – Thomas 'Renny' Renshaw Aug 3 '15 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.