You are here

function shortcode_bool in Shortcode 6

Same name and namespace in other branches
  1. 7.2 shortcode.module \shortcode_bool()
  2. 7 shortcode.module \shortcode_bool()

Helper function to decide the give param bool value

Parameters

mixed $var:

Return value

bool

1 call to shortcode_bool()
shortcode_embed_contents_shortcode_node in shortcode_embed_contents/shortcode_embed_contents.module
Insert a span around the text with highlight css class

File

./shortcode.module, line 549

Code

function shortcode_bool($var) {
  switch (strtolower($var)) {
    case false:
    case 'false':
    case 'no':
    case '0':
      $res = FALSE;
      break;
    default:
      $res = TRUE;
      break;
  }
  return $res;
}