wp_validate_boolean
wp_validate_boolean ( $value )
Parameters:- (mixed) value Boolean value to validate.
Returns:- (bool) Whether the value is validated.
Defined at: - Introduced in WordPress: 4.0.0
- Deprecated in WordPress: —
Description
Filters/validates a variable as a boolean.Alternative to `filter_var( $value, FILTER_VALIDATE_BOOLEAN )`.