You are here

function om_tools_class_safe in OM Tools 8

Same name and namespace in other branches
  1. 8.2 inc/om_tools.utils.inc \om_tools_class_safe()
  2. 6.2 inc/om_tools.utils.inc \om_tools_class_safe()
  3. 6 om_tools.module \om_tools_class_safe()
  4. 7.2 inc/om_tools.utils.inc \om_tools_class_safe()
  5. 7 om_tools.module \om_tools_class_safe()

Safe classes

1 call to om_tools_class_safe()
om_node_preprocess_html in tools/node/node.inc
Override or insert om variables into the templates.

File

./om_tools.module, line 185
This is a collection of OM Tools.

Code

function om_tools_class_safe($string) {

  // Replace with dashes anything that isn't A-Z, numbers, dashes, or underscores.
  return strtolower(preg_replace('/[^a-zA-Z0-9-]+/', '-', $string));
}