Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Disable Change Email Address?

@venutius

Moderator

/take a look at this then:

function venutius_change_profile_settings_edit_tab() {

	if( bp_is_active( 'xprofile' ) ) :
	global $bp;
	$access        = bp_core_can_edit_settings();
	$slug          = bp_get_settings_slug();

	$args = array(
		'parent_slug'     => $slug,
		'subnav_slug'	  => 'settings',
		'screen_function' => 'bp_settings_screen_notification',
		'user_has_access' => $access
		);
 
	bp_core_new_nav_default( $args );

	bp_core_remove_subnav_item( BP_SETTINGS_SLUG, 'general' );
//	bp_core_remove_subnav_item( BP_SETTINGS_SLUG, 'notifications' );
	
	bp_core_new_subnav_item( array( 
	'name'            => __( 'Email' ), 
	'slug'            => 'settings', 
	
	'parent_url'      => $bp->displayed_user->domain . $slug.'/', 

	
	'parent_slug'     => $slug, 
	
	'screen_function' => 'swapluisa',
	'position'        => 1,
	
	) );

	endif;

}
add_action( 'bp_actions', 'venutius_change_profile_settings_edit_tab' );

This gives you two Email tabs, one is the original, one is the new one the way you want it. so long as the original one is there it works, but try uncommenting the code to remove the original tab, you get page not found on the settings page.

Skip to toolbar