Commit 16cf2791 authored by Dave Reid's avatar Dave Reid

Issue #1977108 by Dave Reid, othermachines, superspring: Fixed CSS class names...

Issue #1977108 by Dave Reid, othermachines, superspring: Fixed CSS class names based on parent mlid may contain invalid characters.
parent 8dd19f03
......@@ -157,10 +157,17 @@ function menu_block_block_view($delta = '') {
function template_preprocess_menu_block_wrapper(&$variables) {
$variables['classes_array'][] = 'menu-block-' . $variables['delta'];
$variables['classes_array'][] = 'menu-name-' . $variables['config']['menu_name'];
$variables['classes_array'][] = 'parent-mlid-' . $variables['config']['parent_mlid'];
$variables['classes_array'][] = 'parent-mlid-' . menu_block_clean_css_identifier($variables['config']['parent_mlid']);
$variables['classes_array'][] = 'menu-level-' . $variables['config']['level'];
}
/**
* A copy of drupal_clean_css_identifier() that cleans up colon characters.
*/
function menu_block_clean_css_identifier($identifier, $filter = array(' ' => '-', '_' => '-', '/' => '-', '[' => '-', ']' => '', ':' => '-')) {
return drupal_clean_css_identifier($identifier, $filter);
}
/**
* Returns a list of menu names implemented by all modules.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment