BuddyBlog Groups – activity string

  • Participant
    Level: Master
    Posts: 239
    NikB on #48819

    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.

  • Keymaster
    (BuddyDev Team)
    Posts: 22879
    Brajesh Singh on #48828

    Hi 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 ) ) {
    	$activity_helper = BuddyBlog_Groups\Handlers\Activity_Helper::get_instance();
    	if ( has_filter( 'bblpro_pre_format_activity_action_new_blog_post', array(
    	) ) ) {
    		remove_filter( 'bblpro_pre_format_activity_action_new_blog_post', array(
    		), 10 );
    } );

    In the same way, you can add your won filter.


  • Participant
    Level: Master
    Posts: 239
    NikB on #48884

    Hi Brajesh

    Please accept my apologies for the delay in acknowledging this but thank you so much for your time in putting this together.

    I haven’t had a chance to test it out yet but certainly as if it’s just what I need and will be very helpful.

    Warm regards

You must be logged in to reply to this topic.

This topic is: not resolved