Tips on Customizing Download Magnet

How to Hide Download Magnet Admin Menus

function plt_hide_download_magnet_menus() {
	//Hide "Download Magnet".
	remove_menu_page('edit.php?post_type=psdmcontent');
	//Hide "Download Magnet → Download Magnet".
	remove_submenu_page('edit.php?post_type=psdmcontent', 'edit.php?post_type=psdmcontent');
	//Hide "Download Magnet → Add New Download".
	remove_submenu_page('edit.php?post_type=psdmcontent', 'post-new.php?post_type=psdmcontent');
	//Hide "Download Magnet → Downloads".
	remove_submenu_page('edit.php?post_type=psdmcontent', 'psdownload_downloaded_files');
	//Hide "Download Magnet → Export".
	remove_submenu_page('edit.php?post_type=psdmcontent', 'psdownload_export_list');
	//Hide "Download Magnet → Settings".
	remove_submenu_page('edit.php?post_type=psdmcontent', 'psdownload_magnet_options');
	//Hide "Download Magnet → Add-Ons".
	remove_submenu_page('edit.php?post_type=psdmcontent', 'downloadmagnet-addons');
}

add_action('admin_menu', 'plt_hide_download_magnet_menus', 1000000000);

Where do I put this code?

How to Hide Download Magnet Meta Boxes

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

	//Hide the "Download Magnet Entry" meta box.
	remove_meta_box('ps_dm', $screen->id, 'advanced');
	//Hide the "Download Options" meta box.
	remove_meta_box('ps_dm_options', $screen->id, 'advanced');
	//Hide the "Email Addon" meta box.
	remove_meta_box('ps_dm_addons', $screen->id, 'advanced');
}

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