New
PeoplePress is here. Community building for WordPress, reimagined. Fast, modern, and built for the communities you've always wanted to run.
See it live

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi Hugo,
    Thank you for the
    Are you using any custom code to filter activity stream? Is it happening with CB or some other theme?

    Please let me know and I will assist.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi Emanuele,
    Thank you for the reply.

    1. Please use the updated code. There was a bug in the previous snippet.

    
    
    /**
     * Add as friend other user with same member type on user member change.
     */
    add_action( 'bp_set_member_type', function ( $user_id, $member_type ) {
    
    	if ( 'partner' !== $member_type ) {
    		return;
    	}
    
    	$users = new BP_User_Query(
    		array(
    			'member_type'     => $member_type,
    			'populate_extras' => false,
    		)
    	);
    
    	if ( ! $users->total_users ) {
    		return;
    	}
    
    	foreach ( $users->user_ids as $id ) {
    
    		if ( $id == $user_id ) {
    			continue;
    		}
    
    		if ( ! friends_check_friendship( $user_id, $id ) ) {
    			friends_add_friend( $id, $user_id, true );
    		}
    	}
    }, 10, 2 );
    
    

    2. The above code is independent of the Friendship Pro plugin. It will work with any rules.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509
    Brajesh Singh on in reply to: [Resolved] Issues with Testimonials #36712

    Hi Khalid,
    Thank you for letting us know.

    I am glad you have resolved it.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509
    Brajesh Singh on in reply to: Buddypress Poke Adjustments #36711

    Hi Tosin,
    Thank you for the suggestion. I have noted them for our future update.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509
    Brajesh Singh on in reply to: Buddypress Profanity Filter #36710

    Hi Ravi,
    Thank you for the update.

    Hi @Fmd530
    I am sorry, I had seen some part of code and had assumed the support without checking settings. Ravi has updated the plugin now to include these.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi Tiffany,
    I am sorry, Our team could not get back to you early.

    It is not possible to apply elementor design to these plugins. If you want to do that, you will need to disable the Front end creation of posts and disable showing the single post on user profile. Now, You can create the post from WordPress dashboard and apply. The post list will be visible on user’s profile but single link will show the elemntor designed page as normal.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi Waseem,
    Thank you for confirming. I am glad it worked.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi Tosin,
    Thank you for the question.
    I am updating the plugin to add settings this week. It is still doable via code. Please let me know if you need the code for now?

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509
    Brajesh Singh on in reply to: [Resolved] Problem to Setting Auto Friendship #36688

    Hi Emanuele,
    You are right. It would do so for all member types.

    Here is the code that only targets the ‘partner’ member type

    
    
    /**
     * Add as friend other user with same member type on user member change.
     */
    add_action( 'bp_set_member_type', function ( $user_id, $member_type ) {
    
    	if ( 'partner' !== $member_type ) {
    		return;
    	}
    
    	$users = new BP_User_Query(
    		array(
    			'member_type'     => $member_type,
    			'populate_extras' => false,
    		)
    	);
    
    	if ( ! $users->total_users ) {
    		return;
    	}
    
    	foreach ( $users->user_ids as $id ) {
    
    		if ( $id == $user_id ) {
    			return;
    		}
    
    		if ( ! friends_check_friendship( $user_id, $id ) ) {
    			friends_add_friend( $id, $user_id, true );
    		}
    	}
    }, 10, 2 );
    
    

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509
    Brajesh Singh on in reply to: Buddy press profile tabs #36677
    This reply has been marked as private.