BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25211

    Hi Amit,
    Thank you for the reply.
    I am glad it is working.

    Do you want the comments to have attachment?

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211

    Hi,
    Please contact BuddyBoss for the select issue. It seems to be very specific to their platform/theme.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211
    Brajesh Singh on in reply to: Profile visiblity #45578

    Hi,
    Thank you for purchasing from us.
    I am, sorry for the delayed reply.

    We will certainly add the option t have privacy for forums tab.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211

    Hi Tosin,
    Ravi has worked on it and the code is under review. Please expect it to be available by next week.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211

    Hi Fabian,
    I am sorry for the delaye.

    Please use the following code and you can specify the field ids to be excluded.

    
    
    /**
     * Filter display of BP Profile search form fields by role.
     */
    function buddydev_enable_conditional_profile_search_form_fields( $form ) {
    
    	if ( ! is_user_logged_in() ) {
    		return $form;// update as you need. we are not restricting.
    	}
    
    	// Use comma separated field ids to exclude for the given role.
    	$roles_excluded_fields = array(
    		'subscriber'    => array(1,3),
    		'contributor'   => array(),
    		'author'        => array(),
    		'editor'        => array(),
    		'administrator' => array( ),
    	);
    
    	// I am assuming that user has only one role.
    	$role            = current( wp_get_current_user()->roles );
    	$excluded_fields = isset( $roles_excluded_fields[ $role ] ) ? $roles_excluded_fields[ $role ] : array();
    
    	if ( empty( $excluded_fields ) ) {
    		return $form;
    	}
    
    	for ( $i = 0; $i < count( $form->fields ); $i ++ ) {
    		if ( empty( $form->fields[ $i ] ) || empty( $form->fields[ $i ]->id ) ) {
    			continue;
    		}
    		if ( in_array( $form->fields[ $i ]->id, $excluded_fields ) ) {
    			unset( $form->fields[ $i ] );
    		}
    	}
    }
    add_action( 'bps_before_search_form', 'buddydev_enable_conditional_profile_search_form_fields' );
    add_action( 'bps_before_filters', 'buddydev_enable_conditional_profile_search_form_fields' );
    
    

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211
    Brajesh Singh on in reply to: [Resolved] Remove activity filter option #45555

    Hi Tosin,
    Thank you for the confirmation.

    I am sorry, I am not familiar with that plugin.
    You may want to approach the author for help.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211
    Brajesh Singh on in reply to: Issues with registration member types. #45551

    Hi Ethan,
    Please check my reply about adding a tab via BP Custom Profile Menu. You can not remove a tab added by that plugin conditionally. That will cause 404. I have shared this detail in my previous reply.

    You may use our Profile Tabs Creator pro to achieve this conditional from the settings. Please do note that if you applied conditional tab via code even to the tabs created by Profile Tabs pro, it will also be 404.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211
    Brajesh Singh on in reply to: Issues with registration member types. #45543

    Hi Ethan,
    Please check the site. I have temporarily disabled the “Notifications” menu only for the “Administrator role”.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211

    Hi Nik,
    Thank you for the question.

    1. If the content is being shown for event manager, then it seems their screen callback might not have been removed correctly or there is some bug in how the event manager renders the content.

    The simple solution will be to use a different slug or you can debug further if you want to keep the same slug.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211
    Brajesh Singh on in reply to: [Resolved] Remove activity filter option #45540

    Hi Tosin,
    Please put this in your bp-custom.php

    
    /**
     * Removes the Updates & new members fro activity options dropdown.
     */
    add_filter( 'bp_get_activity_show_filters_options', function ( $filters ) {
    
    	unset( $filters['activity_update'] );
    	unset( $filters['new_member'] );
    
    	return $filters;
    } );
    
    

    Let me know if it works or not?

    Regards
    Brajesh