You are here

function field_collection_menu_alter in Field collection 7

Implements hook_menu_alter().

Fix the field collections admin UI tabs.

File

./field_collection.module, line 298
Module implementing field collection field type.

Code

function field_collection_menu_alter(&$items) {
  if (isset($items['admin/structure/field-collections/%field_collection_field_name/fields']) && module_exists('field_ui')) {

    // Make the fields task the default local task.
    $items['admin/structure/field-collections/%field_collection_field_name'] = $items['admin/structure/field-collections/%field_collection_field_name/fields'];
    $item =& $items['admin/structure/field-collections/%field_collection_field_name'];
    $item['type'] = MENU_NORMAL_ITEM;
    $item['title'] = 'Manage fields';
    $item['title callback'] = 'field_collection_admin_page_title';
    $item['title arguments'] = array(
      3,
    );
    $items['admin/structure/field-collections/%field_collection_field_name/fields'] = array(
      'title' => 'Manage fields',
      'type' => MENU_DEFAULT_LOCAL_TASK,
      'weight' => 1,
    );
  }
}