comment_notification_text filter for custom post type

Using comment_notification_text you will get comment notification text and comment ID. To check the post type you need to get the post associated with comment and then you can check for post type Example (Read the inline comments): function custom_notificaion($notify_message, $comment_id) { $comment_obj = get_comment($comment_id); //Get comment object $comment_post = get_post($comment_obj->comment_post_ID); //Get post object //Check … Read more

New Post Notifications for Users – BUDDYPRESS

Like JItendra Rana already mentioned, you just send a notification to the author. If all users should get a notification, you must loop through all your users and add a notification to everyone. You get the users with get_users. Here is the modified code to realize it: function bp_post_published_notification( $post_id, $post ) { $author_id = … Read more

How to send post notification when a Author and Contributor post?

Try this. I’ve tested it and it works although your questions is not so clear (snippet VS description). function wpkse_144405_on_post_publish( $ID, $post ) { $users = get_users( array( ‘fields’ => array( ‘user_email’ ) ) ); $email_subject=”New post has been published”; $message .= ‘New post has been published: ‘ . $post->post_title . ‘ You can preview … Read more

What is the most efficient way of implementing a notification system? [closed]

If you’re looking to get in to instant notifications without suffering from backlog, I’d looking in to both Node.js and Socket.io. You should be able to work with them both pretty easily and integrate w/ WordPress. The sample chat application on the Socket.io site isn’t a far cry from what you’d be doing. Basically an … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)