function xmlsitemap_menu_calculate_priority in XML sitemap 7.2
Same name and namespace in other branches
- 6.2 xmlsitemap_menu/xmlsitemap_menu.module \xmlsitemap_menu_calculate_priority()
Calculate the priority of a menu link based on depth and weight.
1 string reference to 'xmlsitemap_menu_calculate_priority'
- xmlsitemap_menu_update_6200 in xmlsitemap_menu/
xmlsitemap_menu.install - Cleanup variables.
File
- xmlsitemap_menu/
xmlsitemap_menu.module, line 297 - Main file for XML sitemap menu.
Code
function xmlsitemap_menu_calculate_priority(array $menu_item) {
$priority = (MENU_MAX_DEPTH - $menu_item['depth'] + 1) / MENU_MAX_DEPTH;
$priority -= (50 + $menu_item['weight']) / (100 * (MENU_MAX_DEPTH + 1));
return $priority;
}