You are here

function advanced_help_menu_alter in Advanced Help 7

Same name and namespace in other branches
  1. 6 advanced_help.module \advanced_help_menu_alter()

Implements hook_menu_alter().

File

./advanced_help.module, line 115
Pluggable system to provide advanced help facilities for Drupal and modules.

Code

function advanced_help_menu_alter(&$callbacks) {

  // Check if it advanced_help is registered.
  $sam = variable_get('search_active_modules', NULL);
  if (!empty($sam['advanced_help']) && 'advanced_help' == $sam['advanced_help']) {

    // We need to fix the menu item provided by search module to restrict access.
    $callbacks['search/advanced_help/%menu_tail']['access callback'] = 'user_access';
    $callbacks['search/advanced_help/%menu_tail']['access arguments'] = array(
      'view advanced help index',
    );
  }
}