wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



bool_from_yn › WordPress Function

Depuis1.0.0
Dépréciéen/a
bool_from_yn ( $yn )
Paramètres:
  • (string) $yn Character string containing either 'y' (yes) or 'n' (no).
    Requis: Oui
Retourne:
  • (bool) True if 'y', false on anything else.
Défini(e) dans:
Codex:

Determines whether input is yes or no.

Must be 'y' to be true.


Fonctions en relation: get_blog_id_from_url

Source

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