function xmlsitemap_menu_install in XML sitemap 5.2
Implementation of hook_install().
File
- xmlsitemap_menu/
xmlsitemap_menu.install, line 29 - Install file for XML sitemap menu
Code
function xmlsitemap_menu_install() {
$mid = db_result(db_query("SELECT mid FROM {menu} WHERE pid = 0 AND title = '%s'", t('XML sitemap')));
if ($mid === FALSE) {
$mid = db_next_id('{menu}_mid');
db_query("INSERT INTO {menu} (mid, title, description, type) VALUES (%d, '%s', '%s', %d)", $mid, t('XML sitemap'), t('Menu items to include in the sitemap.'), MENU_CUSTOM_MENU | MENU_MODIFIED_BY_ADMIN);
menu_rebuild();
}
variable_set('xmlsitemap_menu_custom_menu', $mid);
}