wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



bool_from_yn › WordPress Function

Od1.0.0
Przestarzałyn/a
› bool_from_yn ( $yn )
Parametry:
  • (string) $yn Character string containing either 'y' (yes) or 'n' (no).
    Wymagane: Tak
Powrót:
  • (bool) True if 'y', false on anything else.
Zdefiniowane na:
Codex:

Determines whether input is yes or no.

Must be 'y' to be true.


Powiązane Funkcje: get_blog_id_from_url

Źródło

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