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

Top ↑



(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' );


(mixed) (Optional) The value.

Default value: null


(boolean) (Optional) Use the Local or Global context

Default value: true

Top ↑


(array) Full array with the key set to the specified value.

Top ↑


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 );

Top ↑


Version Description
4.6.2 Introduced.