A WordPress-centric search engine for devs and theme authors



bool_from_yn ›

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 yes, false on anything else.
Defined at:
Codex:

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 ( strtolower( $yn ) == 'y' );
}