Tips on Customizing 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 → Galleries".
	remove_submenu_page('edit.php?post_type=modula-gallery', 'edit.php?post_type=modula-gallery');
	//Hide "Modula → Add New".
	remove_submenu_page('edit.php?post_type=modula-gallery', 'post-new.php?post_type=modula-gallery');
	//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', 11);

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 "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');
	//Hide the "Sorting" meta box.
	remove_meta_box('modula-sorting-upsell', $screen->id, 'side');
}

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