WPDev.one
Core Function
View Source on Trac ↗

bool_from_yn()

bool_from_yn( mixed $yn )

Determines whether input is yes or no.

Parameters 1 required

Name / Type Description
$yn
string

Character string containing either 'y' (yes) or 'n' (no).

Required

Return Value

(bool)
True if 'y', false on anything else.

Function Information

Since Version
1.0.0
Source File
wp-includes/functions.php
Advertisement