Tribe__Context::is( string $flag_key, bool $default = false )

Convenience method to get and check if a location has a truthy value or not.


Parameters

$flag_key

(string) (Required) The location to check.

$default

(bool) (Optional) The default value to return if the location is not set.

Default value: false


Top ↑

Return

(bool) Whether the location has a truthy value or not.


Top ↑

Source

File: src/Tribe/Context.php

	public function is( $flag_key, $default = false ) {
		$val = $this->get( $flag_key, $default );

		return ! empty( $val ) || tribe_is_truthy( $val );
	}

Top ↑

Changelog

Changelog
Version Description
4.9.18 Introduced.