You are here

function icon_menu_menu_breadcrumb_alter in Icon API 7

Same name and namespace in other branches
  1. 8 modules/icon_menu/icon_menu.module \icon_menu_menu_breadcrumb_alter()

Implements hook_menu_breadcrumb_alter().

File

modules/icon_menu/icon_menu.module, line 41
icon_menu.module Implements an API for icon providers and an administrative UI for integrating icons through out the site.

Code

function icon_menu_menu_breadcrumb_alter(&$active_trail, &$item) {
  foreach ($active_trail as $key => $value) {
    if (!empty($value['localized_options']['icon']) && empty($value['localized_options']['icon']['breadcrumb'])) {
      unset($active_trail[$key]['localized_options']['icon']);
    }
  }
  if (!empty($item['localized_options']['icon']) && empty($item['localized_options']['icon']['breadcrumb'])) {
    unset($item['localized_options']['icon']);
  }
}