Tribe__Context::location_func( array $location_and_callback )
Reads the value from one callback, passing it the value of another Context location.
Contents
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.
Return
(mixed) The return value of the callback, called on the location value.
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 ) );
}
Changelog
| Version | Description |
|---|---|
| 4.9.18 | Introduced. |