tribe_context()

A wrapper function to get the singleton, immutable, global context object.

Due to its immutable nature any method that would modify the context will return a clone of the context, not the original one.


Return #

(Tribe__Context) The singleton, immutable, global object instance.


Top ↑

Source #

File: src/functions/template-tags/general.php

	function tribe_context() {
		$context = tribe( 'context' );

		/**
		 * Filters the global context object.
		 *
		 * @since 4.9.5
		 *
		 * @param Tribe__Context $context The singleton, immutable, global object instance.
		 */
		$context = apply_filters( 'tribe_global_context', $context );

		return $context;
	}

Top ↑

Changelog #

Changelog
Version Description
4.9.5 Introduced.