How to Hide the "Ad Inserter" Admin Menu

function plt_hide_ad_inserter_menus() {
	//Hide the "Settings → Ad Inserter" menu.
	remove_submenu_page('options-general.php', 'ad-inserter.php');
}

add_action('admin_menu', 'plt_hide_ad_inserter_menus', 11);

Where do I put this code?