You are here

function batch_add_terms_menu in Batch add terms 7

Same name and namespace in other branches
  1. 8 batch_add_terms.module \batch_add_terms_menu()

Implements hook_menu().

File

./batch_add_terms.module, line 6

Code

function batch_add_terms_menu() {
  $items = array();
  $items['admin/structure/taxonomy/%taxonomy_vocabulary_machine_name/mass-add'] = array(
    'title' => 'Batch add terms',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'batch_add_terms_form',
      3,
    ),
    'access arguments' => array(
      'administer taxonomy',
    ),
    'type' => MENU_LOCAL_ACTION,
    'file' => 'batch_add_terms.admin.inc',
  );
  if (module_exists('vppr')) {
    $items['admin/structure/taxonomy/%taxonomy_vocabulary_machine_name/mass-add']['access callback'] = 'vppr_access_vocabulary_terms';
    $items['admin/structure/taxonomy/%taxonomy_vocabulary_machine_name/mass-add']['access arguments'] = array(
      3,
    );
  }
  if (module_exists('taxonomy_access_fix')) {
    $items['admin/structure/taxonomy/%taxonomy_vocabulary_machine_name/mass-add']['access callback'] = 'taxonomy_access_fix_access';
    $items['admin/structure/taxonomy/%taxonomy_vocabulary_machine_name/mass-add']['access arguments'] = array(
      'add terms',
      3,
    );
  }
  return $items;
}