get_disp_boolean

Return boolean status depending on passed in value.

Description

get_disp_boolean( (mixed) $bool_text ); 

Parameters (1)

0. $bool_text (mixed)
Text to compare to typical boolean values.

Usage

  1. if ( !function_exists( 'get_disp_boolean' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'custom-post-type-ui/inc/utility.php'; 
  3.  
  4. // text to compare to typical boolean values. 
  5. $bool_text = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = get_disp_boolean($bool_text); 
  9.  

Defined (1)

The function is defined in the following location(s).

/inc/utility.php  
  1. function get_disp_boolean( $bool_text ) { 
  2. $bool_text = (string) $bool_text; 
  3. if ( empty( $bool_text ) || '0' === $bool_text || 'false' === $bool_text ) { 
  4. return false; 
  5.  
  6. return true;