Tribe__Template::set( string|array $index, mixed $value = null, boolean $is_local = true )
Sets a Index inside of the global or local context Final to prevent extending the class when the set
already exists on the child class
See also
Parameters
- $index
-
(string|array) (Required) To set a key nested multiple levels deep pass an array specifying each key in order as a value. Example: array( 'lvl1', 'lvl2', 'lvl3' );
- $value
-
(mixed) (Optional) The value.
Default value: null
- $is_local
-
(boolean) (Optional) Use the Local or Global context
Default value: true
Return
(array) Full array with the key set to the specified value.
Source
File: src/Tribe/Template.php
final public function set( $index, $value = null, $is_local = true ) { if ( true === $is_local ) { return Tribe__Utils__Array::set( $this->context, $index, $value ); } else { return Tribe__Utils__Array::set( $this->global, $index, $value ); } }
Changelog
Version | Description |
---|---|
4.6.2 | Introduced. |