BuddyDev

Search

Replies

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Buddyblog post title checker #47553

    Hello Tosin,

    Sorry for the inconvenience. Please replace with the following code:

    
    
    add_filter( 'bblpro_validation_errors', function ( $errors, $data ) {
    
    	if ( ! class_exists( 'Unique_Title_Checker' ) ) {
    		return $errors;
    	}
    
    	$title_checker = Unique_Title_Checker::get_instance();
    
    	if ( empty( $data['bbl_post_title'] ) ) {
    		return $errors;
    	}
    
    	$post_title = sanitize_text_field( wp_unslash( $data['bbl_post_title'] ) );
    
    	if ( ! empty( $data['bbl_post_id'] ) ) {
    		$post = get_post( absint( $data['bbl_post_id'] ) );
    
    		if ( $post && $post_title == $post->post_title ) {
    			return $errors;
    		}
    	}
    
    	$args = array(
    		'post_title' => $post_title,
    		'post_type'  => sanitize_text_field( wp_unslash( $data['bbl_post_type'] ) ),
    	);
    
    	$validate_data = $title_checker->check_uniqueness( $args );
    
    	if ( 'error' == $validate_data['status'] ) {
    		$errors->add( 'bbl_post_title', $validate_data['message'] );
    	}
    
    	return $errors;
    }, 10, 3 );
    
    

    Please give it a try.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Hide the BP type box and MPP on Website Activity Page #47552

    Hello Daniel,

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

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Hide the BP type box and MPP on Website Activity Page #47545
    This reply has been marked as private.
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] BudyPress Username Changer #47536

    Hello Alex,

    Try the following code:

    
    add_action( 'bp_username_changed', function ( $new_username, $user_data, $user ) {
    
    	// BB uses the nickname in the mentioned name.
    	update_user_meta( $user->ID, 'nickname', $new_username );
    
    	if ( bp_is_active( 'xprofile' ) ) {
                    // To update nicename field.
    		// Replace 3 with your nicename field id.
    		xprofile_set_field_data( 3, $user->ID, $new_username );
    	}
    }, 10, 3 );
    
    

    Please check and let me know if it helps

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Help with syncing groups and roles #47535

    Hello

    Yes, They will get the role as they join the group and does nothing as they leave the group.
    Please let me know if you want to remove the group role as they leave the group.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Help with syncing groups and roles #47525

    Hello,

    I have tested my GitHub version with the roles created with “Members plugin by MemberPress”. Please take a look at the following demo video:

    https://www.awesomescreenshot.com/video/12928163?key=b4fb51423d293c48b171ecd0103b44d6

    Please after deactivating all other plugins and switching to the default theme temporarily and then give it a try. There might be chances that other plugins might be creating this issue.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Favorites plugin #47524

    Hello Alex,

    Thank you for posting. No, we do not have this kind of plugin right now.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] Branded login issues #47523

    Hello Tosin,

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

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] Branded login issues #47516

    Hello Tosin,

    Replace the code section with the following one:

    
    // login all users to the news-feed page (for logged-out users)
    function site_login_redirect_to_news_feed( $redirect_to, $redirect_to_raw, $user ) {
    	if ( ! is_wp_error( $user ) && ! is_user_logged_in() ) {
    		bp_core_redirect( bp_get_activity_directory_permalink() );
    		exit( 0 );
    	}
    }
    add_filter( 'bp_login_redirect', 'site_login_redirect_to_news_feed', 11, 3 );
    
    

    For modifying the message on password reset you can use any translation plugin and modify it.

    Please check it.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Hide the BP type box and MPP on Website Activity Page #47515
    This reply has been marked as private.