bool_from_yn( string $yn )
Determines whether input is yes or no.
Description
Must be ‘y’ to be true.
Parameters
- $yn
-
(Required) Character string containing either 'y' (yes) or 'n' (no).
Return
(bool) True if 'y', false on anything else.
Source
File: wp-includes/functions.php
function bool_from_yn( $yn ) {
return ( strtolower( $yn ) == 'y' );
}
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |