| 7 common.inc | drupal_html_class($class) |
| 8 common.inc | drupal_html_class($class) |
Prepares a string for use as a valid class name.
Do not pass one string containing multiple classes as they will be incorrectly concatenated with dashes, i.e. "one two" will become "one-two".
Parameters
$class: The class name to clean.
Return value
The cleaned class name.
12 calls to drupal_html_class()
File
- includes/
common.inc, line 3744 - Common functions that many Drupal modules will need to reference.
Code
function drupal_html_class($class) {
return drupal_clean_css_identifier(drupal_strtolower($class));
}
Login or register to post comments