Move farm_theme_preprocess_menu_link() to where it belongs.
This commit is contained in:
parent
326e2095c4
commit
a7e6b3afac
|
@ -6,19 +6,6 @@
|
|||
|
||||
include_once 'farm_tour.features.inc';
|
||||
|
||||
/**
|
||||
* Implements hook_preprocess_menu_link().
|
||||
*/
|
||||
function farm_theme_preprocess_menu_link(&$vars) {
|
||||
|
||||
// Give each menu item a CSS class according to its title.
|
||||
if (!empty($vars['element']['#title'])) {
|
||||
$title = $vars['element']['#title'];
|
||||
$class = drupal_html_class($title);
|
||||
$vars['element']['#localized_options']['attributes']['class'][] = $class;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_farm_help_page().
|
||||
*/
|
||||
|
|
|
@ -23,6 +23,19 @@ function farm_theme_menu_link_alter(&$item) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_preprocess_menu_link().
|
||||
*/
|
||||
function farm_theme_preprocess_menu_link(&$vars) {
|
||||
|
||||
// Give each menu item a CSS class according to its title.
|
||||
if (!empty($vars['element']['#title'])) {
|
||||
$title = $vars['element']['#title'];
|
||||
$class = drupal_html_class($title);
|
||||
$vars['element']['#localized_options']['attributes']['class'][] = $class;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_preprocess_menu_tree().
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue