|
|
Drupal example source code file (xmlsitemap_menu.install)
The xmlsitemap_menu.install Drupal example source code<?php // $Id: xmlsitemap_menu.install,v 1.7 2011/02/09 22:08:58 davereid Exp $ /** * @file * Install and uninstall schema and functions for the xmlsitemap_menu module. */ /** * Implements hook_uninstall(). */ function xmlsitemap_menu_uninstall() { drupal_load('module', 'menu'); drupal_load('module', 'xmlsitemap'); $menus = array_keys(menu_get_menus()); foreach ($menus as $menu) { xmlsitemap_link_bundle_delete('menu_link', $menu); } } /** * Cleanup variables. */ function xmlsitemap_menu_update_6200() { drupal_load('module', 'menu'); drupal_load('module', 'xmlsitemap'); $menus = array_keys(menu_get_menus()); foreach ($menus as $menu) { $settings = array( 'status' => variable_get('xmlsitemap_menu_status_' . $menu, XMLSITEMAP_STATUS_DEFAULT), 'priority' => variable_get('xmlsitemap_menu_priority_' . $menu, XMLSITEMAP_PRIORITY_DEFAULT), ); variable_set('xmlsitemap_settings_menu_' . $menu, $settings); variable_del('xmlsitemap_menu_status_' . $menu); variable_del('xmlsitemap_menu_priority_' . $menu); variable_del('xmlsitemap_menu_calculate_priority_' . $menu); } variable_del('xmlsitemap_menu_menus'); variable_del('xmlsitemap_menu_calculate_priority'); } /** * Rename the menu type to 'menu_link'. */ function xmlsitemap_menu_update_6201() { drupal_load('module', 'xmlsitemap'); xmlsitemap_link_type_rename('menu', 'menu_link'); } Other Drupal examples (source code examples)Here is a short list of links related to this Drupal xmlsitemap_menu.install source code file: |
"Drupal" is a registered trademark of Dries Buytaert.
my drupal tutorials and examples
Copyright
1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.
Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.