Changeset 28542 for trunk/src/wp-includes/functions.php
- Timestamp:
- 05/22/2014 06:33:34 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r28426 r28542 4446 4446 mbstring_binary_safe_encoding( true ); 4447 4447 } 4448 4449 /** 4450 * Alternative to filter_var( $var, FILTER_VALIDATE_BOOLEAN ) 4451 * 4452 * @since 4.0.0 4453 * 4454 * @param mixed $var 4455 * @return boolean 4456 */ 4457 function wp_validate_boolean( $var ) { 4458 if ( is_bool( $var ) ) { 4459 return $var; 4460 } 4461 4462 if ( 'false' === $var ) { 4463 return false; 4464 } 4465 4466 return (bool) $var; 4467 }
Note: See TracChangeset
for help on using the changeset viewer.