Tribe_Events::filter_context_locations( array $locations = array() )
Filters the context locations to add the ones used by Shortcodes.
Contents
Parameters
- $locations
-
(array) (Optional) The array of context locations.
Default value: array()
Return
(array) The modified context locations.
Source
File: src/Tribe/Views/V2/Shortcodes/Tribe_Events.php
public static function filter_context_locations( array $locations = [] ) {
$locations['shortcode'] = [
'read' => [
Context::REQUEST_VAR => 'shortcode',
Context::LOCATION_FUNC => [
'view_prev_url',
static function ( $url ) {
return tribe_get_query_var( $url, 'shortcode', Context::NOT_FOUND );
},
],
],
];
return $locations;
}
Changelog
| Version | Description |
|---|---|
| 5.5.0 | Move this to a method inside of Shortcodes|Tribe_Events |
| 4.7.9 | Introduced. |