You are here

function module_filter_get_id in Module Filter 7.2

Same name and namespace in other branches
  1. 7 module_filter.module \module_filter_get_id()

Function to replace special characters with hyphen.

Parameters

string $text:

Return value

String

2 calls to module_filter_get_id()
module_filter_new_modules in ./module_filter.module
Create list of newly added modules (within a week)
theme_module_filter_system_modules_tabs in ./module_filter.theme.inc
Theme callback for the modules tabbed form.

File

./module_filter.module, line 303
This is the file description for Module Filter module.

Code

function module_filter_get_id($text) {
  $id = strtolower($text);
  $id = preg_replace('/([^a-z0-9]+)/', '-', $id);
  return trim($id, '-');
}