function om_tools_class_safe in OM Tools 6
Same name and namespace in other branches
- 8.2 inc/om_tools.utils.inc \om_tools_class_safe()
- 8 om_tools.module \om_tools_class_safe()
- 6.2 inc/om_tools.utils.inc \om_tools_class_safe()
- 7.2 inc/om_tools.utils.inc \om_tools_class_safe()
- 7 om_tools.module \om_tools_class_safe()
Safe classes
1 call to om_tools_class_safe()
- om_node_preprocess_page in tools/
node/ node.inc - Override or insert om variables into the templates.
File
- ./
om_tools.module, line 170 - 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));
}