You are here

function taxonomy_xml_menu in Taxonomy import/export via XML 5.2

Same name and namespace in other branches
  1. 5 taxonomy_xml.module \taxonomy_xml_menu()
  2. 6.2 taxonomy_xml.module \taxonomy_xml_menu()
  3. 6 taxonomy_xml.module \taxonomy_xml_menu()
  4. 7 taxonomy_xml.module \taxonomy_xml_menu()

Implementation of hook_menu: Define menu links.

@note See hook_menu for a description of parameters and return values.

File

./taxonomy_xml.module, line 93
taxonomy_xml.module This module makes it possible to import and export taxonomies as XML documents.

Code

function taxonomy_xml_menu($may_cache) {
  if (!module_exists('taxonomy')) {
    return;
  }
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/content/taxonomy/export',
      'title' => t('Export'),
      'access' => user_access('administer taxonomy'),
      'callback' => 'taxonomy_xml_export',
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/content/taxonomy/import',
      'title' => t('Import'),
      'access' => user_access('administer taxonomy'),
      'callback' => 'taxonomy_xml_import',
      'type' => MENU_LOCAL_TASK,
    );
  }
  $items[] = array(
    'path' => 'taxonomy_xml',
    'title' => t('Taxonomy XML'),
    'callback' => 'taxonomy_xml_file',
    'access' => true,
    'type' => MENU_CALLBACK,
  );
  return $items;
}