How to Hide Enable Media Replace Admin Menus

function plt_hide_enable_media_replace_menus() {
	//Hide the "Media →" menu.
	remove_submenu_page('upload.php', 'enable-media-replace/enable-media-replace');
}

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

Where do I put this code?