Settings::add_admin_pages()

Adds the Event Tickets menu and pages.

Contents


Source

File: src/Tribe/Admin/Settings.php

	public function add_admin_pages() {
		$admin_pages = tribe( 'admin.pages' );

		$admin_pages->register_page(
			[
				'id'       => static::$parent_slug,
				'path'     => static::$parent_slug,
				'title'    => esc_html__( 'Tickets', 'event-tickets' ),
				'icon'     => $this->get_menu_icon(),
				'position' => 7,
				'callback' => [
					tribe( 'tickets.admin.home' ),
					'display_home_page',
				],
			]
		);

		$admin_pages->register_page(
			[
				'id'     => static::$parent_slug,
				'path'   => static::$parent_slug,
				'parent' => static::$parent_slug,
				'title'  => esc_html__( 'Home', 'event-tickets' ),
			]
		);

		$admin_pages->register_page(
			[
				'id'       => static::$settings_page_id,
				'parent'   => static::$parent_slug,
				'title'    => esc_html__( 'Settings', 'event-tickets' ),
				'path'     => static::$settings_page_id,
				'callback' => [
					tribe( 'settings' ),
					'generatePage',
				],
			]
		);

		$admin_pages->register_page(
			[
				'id'       => 'tec-tickets-help',
				'parent'   => static::$parent_slug,
				'title'    => esc_html__( 'Help', 'event-tickets' ),
				'path'     => 'tec-tickets-help',
				'callback' => [
					tribe( 'settings.manager' ),
					'do_help_tab',
				],
			]
		);

		$this->maybe_add_troubleshooting();
	}

Top ↑

Changelog

Changelog
Version Description
5.9.1.1 Removed translation from the Title.
5.4.0 Introduced.