Tribe__Context::is( string $flag_key, bool $default = false )
Convenience method to get and check if a location has a truthy value or not.
Contents
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
Return
(bool) Whether the location has a truthy value or not.
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 );
}
Changelog
| Version | Description |
|---|---|
| 4.9.18 | Introduced. |