You are here

function context_reaction_menu::execute in Context 6.3

Same name and namespace in other branches
  1. 6 plugins/context_reaction_menu.inc \context_reaction_menu::execute()
  2. 7.3 plugins/context_reaction_menu.inc \context_reaction_menu::execute()

If primary + secondary links are pointed at the same menu, provide contextual trailing by default.

1 method overrides context_reaction_menu::execute()
context_reaction_breadcrumb::execute in plugins/context_reaction_breadcrumb.inc
Override of execute().

File

plugins/context_reaction_menu.inc, line 51

Class

context_reaction_menu
Expose menu items as context reactions.

Code

function execute(&$vars = NULL) {
  if (variable_get('menu_primary_links_source', 'primary-links') == variable_get('menu_secondary_links_source', 'secondary-links')) {
    $vars['primary_links'] = theme_get_setting('toggle_primary_links') ? $this
      ->menu_navigation_links(variable_get('menu_primary_links_source', 'primary-links')) : $vars['primary_links'];
    $vars['secondary_links'] = theme_get_setting('toggle_secondary_links') ? $this
      ->menu_navigation_links(variable_get('menu_secondary_links_source', 'secondary-links'), 1) : $vars['secondary_links'];
  }
  $vars['primary_links'] = $this
    ->menu_set_active($vars['primary_links']);
  $vars['secondary_links'] = $this
    ->menu_set_active($vars['secondary_links']);
}