tribe_null_or_truthy( mixed $value = null )

Validation of Null or Truthy values for Shortcode Attributes.


Parameters #

$value

(mixed) (Optional) Which value will be validated.

Default value: null


Top ↑

Return #

(bool|null) Sanitizes the value passed as a boolean or null.


Top ↑

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

Top ↑

Changelog #

Changelog
Version Description
5.1.4 Introduced.