Tribe__Settings::get_tab_url( string $tab )

Generate the URL for a tab.


Parameters

$tab

(string) (Required) The tab slug.


Top ↑

Return

(string) $url The URL.


Top ↑

Source

File: src/Tribe/Settings.php

		public function get_tab_url( $tab ) {
			$admin_pages  = tribe( 'admin.pages' );
			$admin_page   = $admin_pages->get_current_page();
			$wp_page      = is_network_admin() ? network_admin_url( 'settings.php' ) : admin_url( 'admin.php' );
			$url          = add_query_arg(
				[
					'page'      => $admin_page,
					'tab'       => $tab,
				],
				$wp_page
			);

			$url = apply_filters( 'tec_settings_tab_url', $url, $admin_page, $tab );

			return $url;
		}

Top ↑

Changelog

Changelog
Version Description
4.15.0 Introduced.