You are here

menu_attributes.install in Menu Attributes 6.2

Install, update and uninstall functions for the menu_attributes module.

File

menu_attributes.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the menu_attributes module.
 */

/**
 * Implements hook_install().
 */
function menu_attributes_install() {
  db_query("UPDATE {system} SET weight = 10 WHERE type = 'module' AND name = 'menu_attributes'");
}

/**
 * Implements hook_uninstall().
 */
function menu_attributes_uninstall() {
  drupal_load('module', 'menu_attributes');
  $attributes = menu_attributes_menu_attribute_info();
  foreach (array_keys($attributes) as $attribute) {
    variable_del("menu_attributes_{$attribute}_enable");
    variable_del("menu_attributes_{$attribute}_default");
  }
}

/**
 * Update the module weight.
 */
function menu_attributes_update_1() {
  $ret = array();
  db_query("UPDATE {system} SET weight = 10 WHERE type = 'module' AND name = 'menu_attributes'");
  return $ret;
}

Functions

Namesort descending Description
menu_attributes_install Implements hook_install().
menu_attributes_uninstall Implements hook_uninstall().
menu_attributes_update_1 Update the module weight.