tribe_null_or_truthy( mixed $value = null )
Validation of Null or Truthy values for Shortcode Attributes.
Contents
Parameters
- $value
-
(mixed) (Optional) Which value will be validated.
Default value: null
Return
(bool|null) Sanitizes the value passed as a boolean or null.
Source
File: src/functions/utils.php
function tribe_null_or_truthy( $value = null ) {
if ( null === $value || 'null' === $value ) {
return null;
}
return tribe_is_truthy( $value );
}
Changelog
| Version | Description |
|---|---|
| 5.1.4 | Introduced. |