Speakers::str_to_bool( $value )
Convert a string representation of a boolean to an actual boolean
Contents
Parameters
-
(string|bool) (Required)
Return
(bool)
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' ] );
}