Snippets: Remove Extra User Options (social settings and staff relationship)

if ( is_admin() ) {

	// Remove staff relationship
	add_filter( 'wpex_staff_users_relations', '__return_false' );

	add_action( 'init', function() {

		// Removes social options
		remove_filter( 'user_contactmethods', 'wpex_user_contactmethods' ); // v4.0+
		remove_filter( 'user_contactmethods', array( 'WPEX_Theme_Setup', 'add_user_social_fields' ) ); // v3.6

	}, 99 );

}

Snippet Type: PHP

Posted Under: Other

All PHP snippets should be added via a child theme's functions.php file.