You are here

function tb_megamenu_is_a_key in The Better Mega Menu 7

1 call to tb_megamenu_is_a_key()
tb_megamenu_replace_css in ./tb_megamenu.functions.inc

File

./tb_megamenu.functions.inc, line 597

Code

function tb_megamenu_is_a_key($str) {
  $no_keys = array(
    '(',
    ')',
    ';',
    '/',
    '#tb-megamenu',
    '@',
  );
  foreach ($no_keys as $key) {
    if (strpos($str, $key) !== false) {
      return false;
    }
  }
  $yes_keys = array(
    '.',
    '-',
    ',',
    '{',
  );
  foreach ($yes_keys as $key) {
    if (strpos($str, $key) !== false) {
      return true;
    }
  }
  return false;
}