You are here

function metatag_menu in Metatag 7

Implements hook_menu().

File

./metatag.module, line 130
Primary hook implementations for Metatag.

Code

function metatag_menu() {
  $items['admin/config/search/metatags'] = array(
    'title' => 'Metatag',
    'description' => 'Configure Metatag defaults.',
    'page callback' => 'metatag_config_overview',
    'access arguments' => array(
      'administer meta tags',
    ),
    'file' => 'metatag.admin.inc',
  );
  $items['admin/config/search/metatags/config'] = array(
    'title' => 'Defaults',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/config/search/metatags/config/add'] = array(
    'title' => 'Add default meta tags',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'metatag_config_add_form',
    ),
    'access arguments' => array(
      'administer meta tags',
    ),
    'file' => 'metatag.admin.inc',
    'type' => MENU_LOCAL_ACTION,
  );
  $items['admin/config/search/metatags/config/%metatag_config'] = array(
    'title callback' => 'metatag_config_title',
    'title arguments' => array(
      5,
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'metatag_config_edit_form',
      5,
    ),
    'access arguments' => array(
      'administer meta tags',
    ),
    'file' => 'metatag.admin.inc',
  );
  $items['admin/config/search/metatags/config/%metatag_config/edit'] = array(
    'title' => 'Edit',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/config/search/metatags/config/%metatag_config/enable'] = array(
    'title' => 'Enable',
    'page callback' => 'metatag_config_enable',
    'page arguments' => array(
      5,
    ),
    'access callback' => 'metatag_config_access',
    'access arguments' => array(
      'enable',
      5,
    ),
    'file' => 'metatag.admin.inc',
  );
  $items['admin/config/search/metatags/config/%metatag_config/disable'] = array(
    'title' => 'Disable',
    'page callback' => 'metatag_config_disable',
    'page arguments' => array(
      5,
    ),
    'access callback' => 'metatag_config_access',
    'access arguments' => array(
      'disable',
      5,
    ),
    'file' => 'metatag.admin.inc',
  );
  $items['admin/config/search/metatags/config/%metatag_config/revert'] = array(
    'title' => 'Revert',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'metatag_config_delete_form',
      5,
    ),
    'access callback' => 'metatag_config_access',
    'access arguments' => array(
      'revert',
      5,
    ),
    'file' => 'metatag.admin.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/search/metatags/config/%metatag_config/delete'] = array(
    'title' => 'Delete',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'metatag_config_delete_form',
      5,
    ),
    'access callback' => 'metatag_config_access',
    'access arguments' => array(
      'delete',
      5,
    ),
    'file' => 'metatag.admin.inc',
  );
  $items['admin/config/search/metatags/config/%metatag_config/export'] = array(
    'title' => 'Export',
    'page callback' => 'metatag_config_export_form',
    'page arguments' => array(
      5,
    ),
    'access arguments' => array(
      'administer meta tags',
    ),
    'file' => 'metatag.admin.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,
  );
  $items['admin/config/search/metatags/settings'] = array(
    'title' => 'Settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'metatag_admin_settings_form',
    ),
    'access arguments' => array(
      'administer meta tags',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 30,
    'file' => 'metatag.admin.inc',
  );
  $items['admin/config/search/metatags/bulk-revert'] = array(
    'title' => 'Bulk revert',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'metatag_bulk_revert_form',
    ),
    'access arguments' => array(
      'administer meta tags',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 40,
    'file' => 'metatag.admin.inc',
  );

  // Optional integration with the i18n_string module for translating the
  // configurations. Note: this should also check for 'metatag_i18n_disabled'
  // but doing so would require rebuilding the menu cache every time the Metatag
  // settings page was saved, which may not be advised. Instead the links to
  // these pages on the config pages *do* check the variable, which is close
  // enough.
  if (module_exists('i18n_string')) {
    $items['admin/config/search/metatags/config/%metatag_config/translate'] = array(
      'title' => 'Translate',
      'access arguments' => array(
        'administer meta tags',
      ),
      'page callback' => 'i18n_string_object_translate_page',
      'page arguments' => array(
        'metatag_config',
        5,
      ),
      'type' => MENU_LOCAL_TASK,
    );
    $items['admin/config/search/metatags/config/%metatag_config/translate/%i18n_language'] = array(
      'title' => 'Translate',
      'access arguments' => array(
        'administer meta tags',
      ),
      'page callback' => 'i18n_string_object_translate_page',
      'page arguments' => array(
        'metatag_config',
        5,
        7,
      ),
      'type' => MENU_CALLBACK,
    );
  }
  return $items;
}