Hi again Brajesh
I’m wanting to slightly edit the way BuddyBlog Groups formats the activity string, in order to bring the format of group post activity entries more in line with what is generated automatically for personal posts.
Am I right in thinking that would be something to do with the line…
add_filter( 'bblpro_pre_format_activity_action_new_blog_post', array( $this, 'format_activity_action_string' ), 10, 3 );
And if so… could you possibly suggest how I could remove this filter and add one of my own?
With many thanks in advance for any pointers in the right direction.
NikHi Nik,
Thank you for the question.
You may want to use this to remove the filter.// Disable BuddyBlog groups filtering of activity action string. add_action( 'init', function () { if ( ! class_exists( BuddyBlog_Groups\Handlers\Activity_Helper::class ) ) { return; } $activity_helper = BuddyBlog_Groups\Handlers\Activity_Helper::get_instance(); if ( has_filter( 'bblpro_pre_format_activity_action_new_blog_post', array( $activity_helper, 'format_activity_action_string' ) ) ) { remove_filter( 'bblpro_pre_format_activity_action_new_blog_post', array( $activity_helper, 'format_activity_action_string' ), 10 ); } } );
In the same way, you can add your won filter.
Regards
BrajeshHi Nik,
No issues.Please do let me know when you test it.
Regards
Brajesh
You must be logged in to reply to this topic.