drupal_html_class

Versions
mediamosa-21
drupal_html_class($class)

Prepare 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.

▾ 9 functions call drupal_html_class()

contextual_links_view in modules/contextual/contextual.module
Build a renderable array for contextual links.
dblog_overview in modules/dblog/dblog.admin.inc
Menu callback; displays a listing of log messages.
drupal_region_class in includes/common.inc
Provides a standard HTML class name that identifies a page region.
field_default_form in modules/field/field.form.inc
Create a separate form element for each field.
field_multiple_value_form in modules/field/field.form.inc
Special handling to create form elements for multiple values.
template_preprocess in includes/theme.inc
Adds a default set of helper variables for variable processors and templates. This comes in before any other preprocess function which makes it possible to be used in default theme implementations (non-overridden theme functions).
template_preprocess_block in modules/block/block.module
Process variables for block.tpl.php
template_preprocess_html in includes/theme.inc
Preprocess variables for html.tpl.php
template_preprocess_node in modules/node/node.module
Process variables for node.tpl.php

Code

includes/common.inc, line 3310

<?php
function drupal_html_class($class) {
  return drupal_clean_css_identifier(drupal_strtolower($class));
}
?>