Tribe__Events__Aggregator__Records::get_active()

Fetches the current active tab.


Return

(object) An instance of the Class used to create the Tab.


Top ↑

Source

File: src/Tribe/Aggregator/Records.php

	public function get_active() {
		/**
		 * Allow Developers to change the default tab
		 * @param string $slug
		 */
		$default = apply_filters( 'tribe_aggregator_default_tab', 'new' );

		$tab = ! empty( $_GET['tab'] ) && $this->exists( $_GET['tab'] ) ? $_GET['tab'] : $default;

		// Return the active tab or the default one
		return $this->get( $tab );
	}

Top ↑

Changelog

Changelog
Version Description
4.3.0 Introduced.