Tribe__Context::location_func( array $location_and_callback )

Reads the value from one callback, passing it the value of another Context location.


Parameters

$location_and_callback

(array) (Required) An array of two elements: the location key and the callback to call on the location value. The callback will receive the location value as argument.


Top ↑

Return

(mixed) The return value of the callback, called on the location value.


Top ↑

Source

File: src/Tribe/Context.php

	public function location_func( array $location_and_callback ) {
		list( $location, $callback ) = $location_and_callback;

		return $callback( $this->get( $location ) );
	}

Top ↑

Changelog

Changelog
Version Description
4.9.18 Introduced.