wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



bool_from_yn › WordPress Function

Da1.0.0
Deprecaton/a
› bool_from_yn ( $yn )
Parametri:
  • (string) $yn Character string containing either 'y' (yes) or 'n' (no).
    Richiesto: Sì
Ritorna:
  • (bool) True if 'y', false on anything else.
Definito a:
Codex:

Determines whether input is yes or no.

Must be 'y' to be true.


Funzioni correlate: get_blog_id_from_url

Sorgenti

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