Tips on Customizing Ultimate Member – User Profile & Membership Plugin

How to Hide Ultimate Member Admin Menus

function plt_hide_ultimate_member_menus() {
	//Hide "Ultimate Member".
	remove_menu_page('ultimatemember');
	//Hide "Ultimate Member → Dashboard".
	remove_submenu_page('ultimatemember', 'ultimatemember');
	//Hide "Ultimate Member → Settings".
	remove_submenu_page('ultimatemember', 'um_options');
	//Hide "Ultimate Member → Forms".
	remove_submenu_page('ultimatemember', 'edit.php?post_type=um_form');
	//Hide "Ultimate Member → User Roles".
	remove_submenu_page('ultimatemember', 'um_roles');
	//Hide "Ultimate Member → Member Directories".
	remove_submenu_page('ultimatemember', 'edit.php?post_type=um_directory');
	//Hide "Ultimate Member → Extensions".
	remove_submenu_page('ultimatemember', 'ultimatemember-extensions');
}

add_action('admin_menu', 'plt_hide_ultimate_member_menus', 10000);

Where do I put this code?

How to Hide the "UM Content Restriction" Meta Box

function plt_hide_ultimate_member_metaboxes() {
	$screen = get_current_screen();
	if ( !$screen ) {
		return;
	}

	//Hide the "UM Content Restriction" meta box.
	remove_meta_box('um-admin-restrict-content', $screen->id, 'normal');
}

add_action('add_meta_boxes', 'plt_hide_ultimate_member_metaboxes', 20);