wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



bool_from_yn › WordPress Function

Desde1.0.0
Obsoleton/a
› bool_from_yn ( $yn )
Parâmetros:
  • (string) $yn Character string containing either 'y' (yes) or 'n' (no).
    Required: Yes
Retorna:
  • (bool) True if 'y', false on anything else.
Definido em:
Codex:

Determines whether input is yes or no.

Must be 'y' to be true.


Funções relacionadas: get_blog_id_from_url

Fonte

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