wpseek.com
A WordPress-centric search engine for devs and theme authors



bool_from_yn › WordPress Function

Since1.0.0
Deprecatedn/a
bool_from_yn ( $yn )
Parameters:
  • (string) $yn Character string containing either 'y' (yes) or 'n' (no).
    Required: Yes
Returns:
  • (bool) True if 'y', false on anything else.
Defined at:
Codex:

Determines whether input is yes or no.

Must be 'y' to be true.


Related Functions: get_blog_id_from_url

Source

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