Hi Brajesh
Request in brief – if at all possible, it would be really useful to have two additional filters in BuddyBlog Groups (similar to “bblpro_groups_post_submission_notify_author”) to allow filtering of the admin and group admin notifications (similar to what already exists in BuddyBlog Pro for admin and author notifications).
Longer explanation (if needed) –
The default workflow for all posts on my site is that they are submitted for review upon submission.
I use the bblpro_default_post_status_for_user filter to allow posts by certain users (ie. editors and group admins) to be published immediately (ie without approval).
If a post is submitted/published without requiring approval, I want to prevent admin, author and group admin (if relevant) notifcations from being sent out.
With BuddyBlog Pro, this works very well using the following code/filters –
/** * Skip notification on post submit * * @param null $skip_notify Need to notify or not. * @param WP_Post $post Post object. * @param int $form_id Form id. * * @return mixed */ function buddydev_skip_post_submit_notification( $skip_notify, $post, $form_id ) { if ( 'publish' === bblpro_get_default_post_status_for_user( get_current_user_id(), $form_id, $post->ID ) ) { $skip_notify = true; } return $skip_notify; } add_filter( 'bblpro_pre_handle_post_submission_admin_notification', 'buddydev_skip_post_submit_notification', 10, 3 ); add_filter( 'bblpro_pre_handle_post_submission_author_notification', 'buddydev_skip_post_submit_notification', 10, 3 );
My one remaining request would be to be able to achieve similar for BuddyBlog Group posts. I understand that the new “bblpro_groups_post_submission_notify_author” filter will allow me to “skip” the author notification, ideally what I would like to see would be two additional filters eg. something along the lines of “bblpro_groups_post_submission_notify_admin” and “bblpro_groups_post_submission_notify_group_admin”.
I do hope this helps to clarify but any queries, please do let me know. I really do appreciate all your efforts to accommodate this if at all practical.
Regards
NikHi Nik,
Thank you.
It makes a lot of sense.Please allow me to push an update by tomorrow.
Thank you
BrajeshHi Nik,
Thank you for your patience.
Please upgrade to RC8.
I have added following filters in 1.0.0-RC8bblgroups_pre_handle_post_submission_author_notification bblgroups_pre_handle_post_submission_admin_notification bblgroups_pre_handle_post_submission_group_admin_notification bblgroups_pre_handle_post_approval_author_notification bblgroups_pre_handle_post_rejection_author_notification
All of these have same signature
apply_filters( 'bblgroups_pre_handle_post_submission_author_notification', null, $post, $form_id, $group_id )
If you return first parameter as true, the notification will be stopped.
Hope that helps.
Regards
BrajeshThank you Nik.
I look forward to your test and feedback.Regards
Brajesh
You must be logged in to reply to this topic.