You are here

function opengraph_meta_menu in Open Graph meta tags 6

Same name and namespace in other branches
  1. 7 opengraph_meta.module \opengraph_meta_menu()

Implementation of hook_menu.

File

./opengraph_meta.module, line 14

Code

function opengraph_meta_menu() {
  $admin_access = array(
    OPENGRAPH_META_PERM_ADMIN,
  );
  $menupath = OPENGRAPH_META_DRUPAL_VERSION == 6 ? OPENGRAPH_META_MENU_ADMIN_D6 : OPENGRAPH_META_MENU_ADMIN_D7;
  $items[$menupath] = array(
    'title' => 'Open Graph meta tags',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'opengraph_meta_settings_form',
    ),
    'description' => 'Configure meta tags for Facebook sharing.',
    'access arguments' => $admin_access,
    'file' => 'opengraph_meta.admin.inc',
    'menu_name' => 'management',
  );
  if (6 == OPENGRAPH_META_DRUPAL_VERSION) {
    $items[$menupath]['type'] = MENU_NORMAL_ITEM;
    $items[rtrim($menupath, '/') . '/settings'] = array(
      'title' => 'Settings',
      'access arguments' => $admin_access,
      'type' => MENU_DEFAULT_LOCAL_TASK,
      'weight' => -1,
      'file' => 'opengraph_meta.admin.inc',
    );
  }
  return $items;
}