Page::hide_events_manager_submenu_item()

Removes the submenu so users cannot navigate to this particular submenu directly.


Source #

File: src/Tribe/Admin/Manager/Page.php

	public function hide_events_manager_submenu_item() {
		global $submenu;

		$parent_page = 'edit.php?post_type=' . TEC::POSTTYPE;
		if ( ! isset( $submenu[ $parent_page ] ) ) {
			return;
		}

		foreach ( $submenu[ $parent_page ] as $submenu_index => $item ) {
			if ( $this->get_page_slug() === $item[2] ) {
				// Remove this link from menu
				unset( $submenu[ $parent_page ][ $submenu_index ] );

				return;
			}
		}
	}

Top ↑

Changelog #

Changelog
Version Description
5.10.0 Introduced.