Commit 7b2ca2a3 authored by Dave Reid's avatar Dave Reid

by Dave Reid: Add entity support for menu links.

parent 75019932
...@@ -14,7 +14,7 @@ function xmlsitemap_menu_uninstall() { ...@@ -14,7 +14,7 @@ function xmlsitemap_menu_uninstall() {
drupal_load('module', 'xmlsitemap'); drupal_load('module', 'xmlsitemap');
$menus = array_keys(menu_get_menus()); $menus = array_keys(menu_get_menus());
foreach ($menus as $menu) { foreach ($menus as $menu) {
xmlsitemap_link_bundle_delete('menu', $menu); xmlsitemap_link_bundle_delete('menu_link', $menu);
} }
} }
......
...@@ -47,6 +47,9 @@ function xmlsitemap_menu_entity_info_alter(&$info) { ...@@ -47,6 +47,9 @@ function xmlsitemap_menu_entity_info_alter(&$info) {
} }
} }
/**
* Entity URI callback.
*/
function xmlsitemap_menu_menu_link_uri($menu_item) { function xmlsitemap_menu_menu_link_uri($menu_item) {
return is_array($menu_item) ? $menu_item['href'] : $menu_item->href; return is_array($menu_item) ? $menu_item['href'] : $menu_item->href;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment