Move farm_theme_preprocess_menu_link() to where it belongs.

This commit is contained in:
Michael Stenta 2018-11-29 15:04:29 -05:00
parent 326e2095c4
commit a7e6b3afac
2 changed files with 13 additions and 13 deletions

View File

@ -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().
*/

View File

@ -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().
*/