Tips on Customizing Customizable WordPress Gallery Plugin – Modula Image Gallery

How to Hide Modula Admin Menus

function plt_hide_modula_best_grid_gallery_menus() {
	//Hide "Modula".
	remove_menu_page('edit.php?post_type=modula-gallery');
	//Hide "Modula → Welcome".
	remove_submenu_page('edit.php?post_type=modula-gallery', 'wpchill-dashboard');
	//Hide "Modula → Galleries".
	remove_submenu_page('edit.php?post_type=modula-gallery', 'edit.php?post_type=modula-gallery');
	//Hide "Modula → Defaults".
	remove_submenu_page('edit.php?post_type=modula-gallery', '#gallery-defaults');
	//Hide "Modula → Albums".
	remove_submenu_page('edit.php?post_type=modula-gallery', '#modula-albums');
	//Hide "Modula → Defaults".
	remove_submenu_page('edit.php?post_type=modula-gallery', '#albums-defaults');
	//Hide "Modula → Image Licenses".
	remove_submenu_page('edit.php?post_type=modula-gallery', '#modula-licenses');
	//Hide "Modula → Settings".
	remove_submenu_page('edit.php?post_type=modula-gallery', 'modula');
	//Hide "Modula → Extensions".
	remove_submenu_page('edit.php?post_type=modula-gallery', 'modula-addons');
}

add_action('admin_menu', 'plt_hide_modula_best_grid_gallery_menus', 100);

Where do I put this code?

How to Hide Modula Meta Boxes

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

	//Hide the "Publish" meta box.
	remove_meta_box('submitdiv', $screen->id, 'side');
	//Hide the "Gallery sorting" meta box.
	remove_meta_box('modula-sorting-upsell', $screen->id, 'side');
	//Hide the "Debug gallery" meta box.
	remove_meta_box('modula-debug', $screen->id, 'side');
	//Hide the "Modula Albums" meta box.
	remove_meta_box('modula-albums-upsell', $screen->id, 'normal');
	//Hide the "Gallery" meta box.
	remove_meta_box('modula-preview-gallery', $screen->id, 'normal');
	//Hide the "Settings" meta box.
	remove_meta_box('modula-settings', $screen->id, 'normal');
}

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