You are here

function xmlsitemap_menu_xmlsitemap_link_info in XML sitemap 6.2

Implements hook_xmlsitemap_link_info().

File

xmlsitemap_menu/xmlsitemap_menu.module, line 6

Code

function xmlsitemap_menu_xmlsitemap_link_info() {
  $types['menu_link'] = array(
    'label' => t('Menu link'),
    'bundle label' => t('Menu'),
    'base table' => 'menu_links',
    'entity keys' => array(
      'id' => 'mlid',
      'bundle' => 'menu_name',
    ),
    'uri callback' => 'xmlsitemap_menu_menu_link_uri',
    'xmlsitemap' => array(
      'process callback' => 'xmlsitemap_menu_xmlsitemap_process_menu_links',
    ),
  );
  foreach (menu_get_menus() as $menu => $name) {
    $types['menu_link']['bundles'][$menu] = array(
      'label' => $name,
      'admin' => array(
        'real path' => 'admin/build/menu-customize/' . $menu . '/edit',
        'access arguments' => array(
          'administer menu',
        ),
      ),
    );
  }
  return $types;
}