Skip to:
Content
Pages
Categories
Search
Top
Bottom

Customize Activity User-Name


  • dnnsz
    Participant

    @dnnsz

    I try to customize the User Name in the activity feed (add a Group Name),
    so I thought to to use add_filter on the bp_get_activity_action

    1. Question
    Is there a better way to do this?
    2. Question
    How can I do the same to the comments?

    
    add_filter( 'bp_get_activity_action', array( $this, 'filter_header_content' ) );
    public function filter_header_content($args){     
        global $activities_template;
        $displayName = $activities_template->activity->display_name;
        $action = $activities_template->activity->action;
        $newName = 'New Name';
        return str_replace($displayName, $newName, $action);
    }
     
  • You must be logged in to reply to this topic.
Skip to toolbar