a_z_listing_is_truthy( string|int|bool $value )

Check value for truthiness

Advertisements

Description


Parameters

$value

(string|int|bool) (Required) The value to check for thruthiness.


Return

(bool) The truthiness of the value.


Source

File: functions/helpers.php

function a_z_listing_is_truthy( $value ) {
	switch ( $value ) {
		case '1':
		case 'yes':
		case 'true':
		case 1:
		case true:
			return true;
		default:
			return false;
	}
}

Changelog

Changelog
VersionDescription
2.1.0Introduced.

More Information

You are currently logged out. To view tickets you must first login.

I have read and understood the Terms of Service

Advertisements


User Contributed Notes

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.