関数 bool_from_yn()
定義ファイル :/blog/wp-includes/functions.php 6
bool_from_yn()
1 2 3 4 5 6 7 8 9 10 11 12 13 | /** * Whether input is yes or no. * * Must be 'y' to be true. * * @since 1.0.0 * * @param string $yn Character string containing either 'y' (yes) or 'n' (no). * @return bool True if yes, false on anything else. */ function bool_from_yn( $yn ) { return ( strtolower( $yn ) == 'y' ); } |