BuddyDev

Search

[Resolved] Anonymous posting in youzify/buddypress

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #42940

    Hello Vasudev,

    use bp-custom.php. For more info look at here:

    https://buddydev.com/docs/buddypress-guides/what-is-bp-custom-php/

    Regards
    Ravi

  • Participant
    Level: Initiated
    Posts: 9
    Vasudev Bajpai on #42941

    Hi,

    The code got the anonymous part fine, but all the other names disappeared. Please check –

    https://ibb.co/KL6GKsJ

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #42942

    Hello,

    Sorry for the incovenenience. Please try the following code:

    
    add_filter( 'bp_get_activity_action', function ( $action, $activity ) {
    
    	if ( function_exists( 'bp_anonymous_activity' ) && bp_anonymous_activity()->is_anonymous_activity( $activity->id ) ) {
    		$action = $activity->action;
    	}
    
    	return $action;
    }, 99, 2 );
    
    

    it will modify only if the activity is anonymous.

    Regards
    Ravi

  • Participant
    Level: Initiated
    Posts: 9
    Vasudev Bajpai on #42943

    Hi,

    This works perfectly. Thank you.

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #42944

    Hello Vasudev,

    Thank you for the acknowledgment. I am glad that I could help.

    Regards
    Ravi

The topic ‘ [Resolved] Anonymous posting in youzify/buddypress’ is closed to new replies.

This topic is: resolved