You are here

function nodewords_menu in Nodewords: D6 Meta Tags 6

Same name and namespace in other branches
  1. 5 nodewords.module \nodewords_menu()

Implements hook_menu().

File

./nodewords.module, line 298
Implement an API that other modules can use to implement meta tags.

Code

function nodewords_menu() {
  $admin_access = array(
    'administer meta tags',
  );
  $items = array();
  $items['admin/content/nodewords'] = array(
    'title' => 'Meta tags',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'nodewords_settings_form',
    ),
    'description' => 'Configure HTML meta tags for all the content.',
    'access arguments' => $admin_access,
    'type' => MENU_NORMAL_ITEM,
    'file' => 'nodewords.admin.inc',
  );
  $items['admin/content/nodewords/settings'] = array(
    'title' => 'Settings',
    'access arguments' => $admin_access,
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
    'file' => 'nodewords.admin.inc',
  );
  $items['admin/content/nodewords/meta-tags'] = array(
    'title' => 'Default and specific meta tags',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'nodewords_tags_form',
    ),
    'access arguments' => $admin_access,
    'type' => MENU_LOCAL_TASK,
    'file' => 'nodewords.admin.inc',
    'weight' => -9,
  );
  $items['admin/content/nodewords/meta-tags/default'] = array(
    'title' => 'Default values',
    'access arguments' => $admin_access,
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'file' => 'nodewords.admin.inc',
    'weight' => -10,
  );
  $items['admin/content/nodewords/meta-tags/frontpage'] = array(
    'title' => 'Front page',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'nodewords_tags_form',
      (string) NODEWORDS_TYPE_FRONTPAGE,
    ),
    'access arguments' => $admin_access,
    'type' => MENU_LOCAL_TASK,
    'file' => 'nodewords.admin.inc',
    'weight' => -9,
  );
  $items['admin/content/nodewords/meta-tags/offline'] = array(
    'title' => 'Site off-line page',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'nodewords_tags_form',
      (string) NODEWORDS_TYPE_OFFLINE,
    ),
    'access arguments' => $admin_access,
    'type' => MENU_LOCAL_TASK,
    'file' => 'nodewords.admin.inc',
    'weight' => -8,
  );
  $items['admin/content/nodewords/meta-tags/errorpage_403'] = array(
    'title' => 'Error 403 page',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'nodewords_tags_form',
      (string) NODEWORDS_TYPE_ERRORPAGE,
      '403',
    ),
    'access arguments' => $admin_access,
    'type' => MENU_LOCAL_TASK,
    'file' => 'nodewords.admin.inc',
    'weight' => -7,
  );
  $items['admin/content/nodewords/meta-tags/errorpage_404'] = array(
    'title' => 'Error 404 page',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'nodewords_tags_form',
      (string) NODEWORDS_TYPE_ERRORPAGE,
      '404',
    ),
    'access arguments' => $admin_access,
    'type' => MENU_LOCAL_TASK,
    'file' => 'nodewords.admin.inc',
    'weight' => -6,
  );

  // Only show the forum settings page if the core Blog module is enabled.
  if (module_exists('blog')) {
    $items['admin/content/nodewords/meta-tags/blog'] = array(
      'title' => 'Blog main page',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'nodewords_tags_form',
        (string) NODEWORDS_TYPE_BLOG,
      ),
      'access arguments' => $admin_access,
      'type' => MENU_LOCAL_TASK,
      'file' => 'nodewords.admin.inc',
      'weight' => -5,
    );
  }

  // Only show the forum settings page if the core Forum module is enabled.
  if (module_exists('forum')) {
    $items['admin/content/nodewords/meta-tags/forum'] = array(
      'title' => 'Forum main page',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'nodewords_tags_form',
        (string) NODEWORDS_TYPE_FORUM,
      ),
      'access arguments' => $admin_access,
      'type' => MENU_LOCAL_TASK,
      'file' => 'nodewords.admin.inc',
      'weight' => -4,
    );
  }
  $items['admin/content/nodewords/meta-tags/custom'] = array(
    'title' => 'Custom pages',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'nodewords_custom_pages_overview',
    ),
    'access arguments' => $admin_access,
    'type' => MENU_LOCAL_TASK,
    'weight' => 20,
    'file' => 'nodewords.admin.inc',
  );
  $items['admin/content/nodewords/meta-tags/custom/add'] = array(
    'title' => 'Add custom pages meta tags',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'nodewords_custom_pages_edit',
    ),
    'access arguments' => $admin_access,
    'type' => MENU_CALLBACK,
    'file' => 'nodewords.admin.inc',
  );
  $items['admin/content/nodewords/meta-tags/custom/%nodewords_page/delete'] = array(
    'title' => 'Delete custom pages meta tags',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'nodewords_custom_pages_confirm_delete',
      5,
    ),
    'access arguments' => $admin_access,
    'parent' => 'admin/content/nodewords/meta-tags/custom',
    'type' => MENU_CALLBACK,
    'file' => 'nodewords.admin.inc',
  );
  $items['admin/content/nodewords/meta-tags/custom/%nodewords_page/edit'] = array(
    'title' => 'Edit custom pages meta tags',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'nodewords_custom_pages_edit',
      5,
    ),
    'access arguments' => $admin_access,
    'parent' => 'admin/content/nodewords/meta-tags/custom',
    'type' => MENU_CALLBACK,
    'file' => 'nodewords.admin.inc',
  );
  return $items;
}