You are here

function account_profile_menu_alter in Account Profile 6

Same name and namespace in other branches
  1. 7.2 account_profile.module \account_profile_menu_alter()

Implementation of hook_menu_alter().

Remove Account tab

Parameters

$items @type{array}:

Return value

null

File

./account_profile.module, line 104
Account Profile module

Code

function account_profile_menu_alter(&$items) {
  $profile = variable_get('account_profile_main_profile', key(content_profile_get_types('names')));

  // get main profile name
  $disable_edit_tab = variable_get('account_profile_edit_tab', TRUE);
  $items['user/%user_category/edit/' . $profile]['type'] = MENU_CALLBACK;

  // remove content profile tab
  if ($disable_edit_tab) {
    $items['user/%user_category/edit']['type'] = MENU_CALLBACK;
  }
}