WordPress at Your Fingertips
function is not described

bool_from_yn() WP 1.0.0

Whether input is yes or no.

Must be 'y' to be true.

No Hooks.

Return

true|false. True if yes, false on anything else.

Usage

bool_from_yn( $yn );
$yn(string) (required)
Character string containing either 'y' (yes) or 'n' (no).

Changelog

Since 1.0.0 Introduced.

Code of bool_from_yn() WP 5.8.2

function bool_from_yn( $yn ) {
	return ( 'y' === strtolower( $yn ) );
}