Tips on Customizing Advanced Ads – Ad Manager & AdSense

How to Hide Advanced Ads Admin Menus

function plt_hide_advanced_ads_menus() {
	//Hide "Advanced Ads".
	remove_menu_page('advanced-ads');
	//Hide "Advanced Ads → Dashboard".
	remove_submenu_page('advanced-ads', 'advanced-ads');
	//Hide "Advanced Ads → Ads".
	remove_submenu_page('advanced-ads', 'post-new.php?post_type=advanced_ads&new=new');
	//Hide "Advanced Ads → Groups & Rotation".
	remove_submenu_page('advanced-ads', 'advanced-ads-groups');
	//Hide "Advanced Ads → Placements".
	remove_submenu_page('advanced-ads', 'advanced-ads-placements');
	//Hide "Advanced Ads → Settings".
	remove_submenu_page('advanced-ads', 'advanced-ads-settings');
	//Hide "Advanced Ads → Support".
	remove_submenu_page('advanced-ads', 'http://127.0.0.1/wp-admin/admin.php?page=advanced-ads-settings#top#support');
}

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

Where do I put this code?

How to Hide the "Ad Settings" Meta Box

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

	//Hide the "Ad Settings" meta box.
	remove_meta_box('advads-ad-settings', $screen->id, 'side');
}

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

How to Hide the "Advanced Ads" Dashboard Widget

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

	//Remove the "Advanced Ads" widget.
	remove_meta_box('advads_dashboard_widget', 'dashboard', 'side');
}

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