You are here

function answers_menu_alter in Answers 7.4

Same name and namespace in other branches
  1. 8 answers.module \answers_menu_alter()
  2. 6.2 answers.module \answers_menu_alter()
  3. 7.3 answers.module \answers_menu_alter()

Implements hook_menu_alter().

File

./answers.module, line 60
The Answers module.

Code

function answers_menu_alter(&$items) {

  // Remove 'answers' from the 'add content' menu item in the 'navigation' menu.
  // Thanks to http://drupal.stackexchange.com/questions/17643/how-to-hide-a-content-type-on-the-node-add-page
  if (isset($items['node/add/answers-answer'])) {
    $items['node/add/answers-answer']['type'] = MENU_DEFAULT_LOCAL_TASK;
  }
}