Skip to:
Content
Pages
Categories
Search
Top
Bottom

How-to: Remove General Settings (remove (change email/password) in user profile

  • @mhawksey

    Participant

    I was struggling with this and saw some old posts in the forums here but none appeared to work for BP > 1.5. The problem remove the Setting > General tab from the users profile settings and wp_admin_bar (we have single sign-on and this would have screwed it. The code

    function alt_bp_change_settings_default() {
    	global $bp;
    	// switch the settings default to notifications 
    	$args = array(  'parent_slug' => 'settings',
    			'screen_function' => 'bp_core_screen_notification_settings',
    			'subnav_slug' => 'notifications'
    			);
    	bp_core_new_nav_default( $args );
    	// remove settings > general from wp_admin_bar
    	if ( bp_use_wp_admin_bar() ) {
    		add_action( 'wp_before_admin_bar_render', create_function(
    		'', 'global $wp_admin_bar; $wp_admin_bar->remove_menu( "my-account-settings-general" );' ) );
    	}
    }
    add_action( 'bp_setup_nav','alt_bp_change_settings_default', 5);
    
    function alt_bp_remove_general() {
    	global $bp;
    	bp_core_remove_subnav_item( $bp->settings->slug, 'general' );
    }
    add_action( 'bp_setup_nav', 'alt_bp_remove_general', 200);
    
  • The topic ‘How-to: Remove General Settings (remove (change email/password) in user profile’ is closed to new replies.
Skip to toolbar