How to Hide Visual Portfolio, Posts & Image Gallery Admin Menus

function plt_hide_visual_portfolio_menus() {
	//Hide "Visual Portfolio".
	remove_menu_page('edit.php?post_type=portfolio');
	//Hide "Visual Portfolio → Projects".
	remove_submenu_page('edit.php?post_type=portfolio', 'edit.php?post_type=portfolio');
	//Hide "Visual Portfolio → Categories".
	remove_submenu_page('edit.php?post_type=portfolio', 'edit-tags.php?taxonomy=portfolio_category&post_type=portfolio');
	//Hide "Visual Portfolio → Tags".
	remove_submenu_page('edit.php?post_type=portfolio', 'edit-tags.php?taxonomy=portfolio_tag&post_type=portfolio');
	//Hide "Visual Portfolio → Saved Layouts".
	remove_submenu_page('edit.php?post_type=portfolio', 'edit.php?post_type=vp_lists');
	//Hide "Visual Portfolio → Proofing".
	remove_submenu_page('edit.php?post_type=portfolio', 'vpf_proofing_page');
	//Hide "Visual Portfolio → Settings".
	remove_submenu_page('edit.php?post_type=portfolio', 'visual-portfolio-settings');
	//Hide "Visual Portfolio → Documentation".
	remove_submenu_page('edit.php?post_type=portfolio', 'https://visualportfolio.co/docs/getting-started/?utm_source=plugin&utm_medium=admin_menu&utm_campaign=docs&utm_content=3.3.12');
	//Hide "Visual Portfolio → Go Pro".
	remove_submenu_page('edit.php?post_type=portfolio', 'https://visualportfolio.co/pricing/?utm_source=plugin&utm_medium=admin_menu&utm_campaign=go_pro&utm_content=3.3.12');
}

add_action('admin_menu', 'plt_hide_visual_portfolio_menus', 101);

Where do I put this code?