Tips on Customizing Download Monitor

How to Hide Download Monitor Admin Menus

function plt_hide_download_monitor_menus() {
	//Hide "Downloads".
	remove_menu_page('edit.php?post_type=dlm_download');
	//Hide "Downloads → All Downloads".
	remove_submenu_page('edit.php?post_type=dlm_download', 'edit.php?post_type=dlm_download');
	//Hide "Downloads → Add New".
	remove_submenu_page('edit.php?post_type=dlm_download', 'post-new.php?post_type=dlm_download');
	//Hide "Downloads → Categories".
	remove_submenu_page('edit.php?post_type=dlm_download', 'edit-tags.php?taxonomy=dlm_download_category&post_type=dlm_download');
	//Hide "Downloads → Tags".
	remove_submenu_page('edit.php?post_type=dlm_download', 'edit-tags.php?taxonomy=dlm_download_tag&post_type=dlm_download');
	//Hide "Downloads → Settings".
	remove_submenu_page('edit.php?post_type=dlm_download', 'download-monitor-settings');
	//Hide "Downloads → Logs".
	remove_submenu_page('edit.php?post_type=dlm_download', 'download-monitor-logs');
	//Hide "Downloads → Reports".
	remove_submenu_page('edit.php?post_type=dlm_download', 'download-monitor-reports');
	//Hide "Downloads → Extensions".
	remove_submenu_page('edit.php?post_type=dlm_download', 'dlm-extensions');
}

add_action('admin_menu', 'plt_hide_download_monitor_menus', 21);

Where do I put this code?

How to Hide Download Monitor Meta Boxes

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

	//Hide the "Download Information" meta box.
	remove_meta_box('download-monitor-information', $screen->id, 'side');
	//Hide the "Download Options" meta box.
	remove_meta_box('download-monitor-options', $screen->id, 'side');
	//Hide the "Downloadable Files/Versions" meta box.
	remove_meta_box('download-monitor-file', $screen->id, 'normal');
	//Hide the "Short Description" meta box.
	remove_meta_box('postexcerpt', $screen->id, 'normal');
}

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

How to Hide the "Popular Downloads" Dashboard Widget

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

	//Remove the "Popular Downloads" widget.
	remove_meta_box('dlm_popular_downloads', 'dashboard', 'normal');
}

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