Tips on Customizing User Registration & User Profile – Profile Builder

How to Hide Profile Builder Admin Menus

function plt_hide_profile_builder_menus() {
	//Hide "Profile Builder1".
	remove_menu_page('profile-builder');
	//Hide "Profile Builder1 → Basic Information".
	remove_submenu_page('profile-builder', 'profile-builder-basic-info');
	//Hide "Profile Builder1 → Settings".
	remove_submenu_page('profile-builder', 'profile-builder-general-settings');
	//Hide "Profile Builder1 → Admin Bar Settings".
	remove_submenu_page('profile-builder', 'profile-builder-admin-bar-settings');
	//Hide "Profile Builder1 → Form Fields".
	remove_submenu_page('profile-builder', 'manage-fields');
	//Hide "Profile Builder1 → Content Restriction".
	remove_submenu_page('profile-builder', 'profile-builder-content_restriction');
	//Hide "Profile Builder1 → Add-Ons1".
	remove_submenu_page('profile-builder', 'profile-builder-add-ons');
}

add_action('admin_menu', 'plt_hide_profile_builder_menus', 20);

Where do I put this code?

How to Hide Profile Builder Meta Boxes

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

	//Hide the "Form Field Properties" meta box.
	remove_meta_box('manage-fields', $screen->id, 'normal');
	//Hide the "Registration & Edit Profile Forms" meta box.
	remove_meta_box('manage-fields-info', $screen->id, 'side');
}

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