Tribe__Context::set_locations( array $locations, bool $use_default_locations = true )
Sets, replacing them, the locations used by this context.
Contents
Parameters
- $locations
-
(array) (Required) An array of locations to replace the current ones.
- $use_default_locations
-
(bool) (Optional) Whether the context should use the default locations defined in the static
$locationsproperty or not.Default value: true
Return
(Tribe__Context) A clone of the current context with modified locations.
Source
File: src/Tribe/Context.php
public function set_locations( array $locations, $use_default_locations = true ) {
$clone = clone $this;
$clone->override_locations = $locations;
$clone->use_default_locations = (bool) $use_default_locations;
return $clone;
}
Changelog
| Version | Description |
|---|---|
| 4.9.5 | Introduced. |