Tips on Customizing Auto Post Thumbnail

How to Hide Auto Post Thumbnail Admin Menus

function plt_hide_auto_post_thumbnail_menus() {
	//Hide "Media → Add from APT".
	remove_submenu_page('upload.php', 'menu-media-apt');

	//Hide "Auto Post Thumbnail".
	remove_menu_page('wapt_generate-wbcr_apt');
	//Hide "Auto Post Thumbnail → Generate featured images".
	remove_submenu_page('wapt_generate-wbcr_apt', 'wapt_generate-wbcr_apt');
	//Hide "Auto Post Thumbnail → License".
	remove_submenu_page('wapt_generate-wbcr_apt', 'license-wbcr_apt');
	//Hide "Auto Post Thumbnail → Settings".
	remove_submenu_page('wapt_generate-wbcr_apt', 'wapt_settings-wbcr_apt');
	//Hide "Auto Post Thumbnail → About".
	remove_submenu_page('wapt_generate-wbcr_apt', 'wapt_about-wbcr_apt');
}

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

Where do I put this code?

How to Hide the "Auto Post Thumbnail News" Dashboard Widget

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

	//Remove the "Auto Post Thumbnail News" widget.
	remove_meta_box('wbcr-factory-adverts-widget', 'dashboard', 'normal');
}

add_action('wp_dashboard_setup', 'plt_hide_auto_post_thumbnail_dashboard_widgets', 20);