Speakers::str_to_bool( $value )

Convert a string representation of a boolean to an actual boolean


Parameters

(string|bool) (Required)


Top ↑

Return

(bool)


Top ↑

Source

File: src/Conference/Views/Shortcode/Speakers.php

	public function str_to_bool( $value ): bool {
		if ( true === $value ) {
			return true;
		}

		return in_array( strtolower( trim( $value ) ), [ 'yes', 'true', '1' ] );
	}