You are here

menu_badges.install in Menu Badges 8

Same filename and directory in other branches
  1. 7 menu_badges.install

Install file for Menu Badges.

File

menu_badges.install
View source
<?php

/**
 * @file
 * Install file for Menu Badges.
 */

/**
 * Implements hook_uninstall().
 */
function menu_badges_uninstall() {

  // Remove link badges from menu_links table.
  $result = db_query("SELECT mlid, options FROM {menu_links} WHERE options LIKE '%\"link_badge\"%'");
  foreach ($result as $record) {
    $options = unserialize($record->options);
    unset($options['link_badge']);
    db_query("UPDATE {menu_links} SET options = :options WHERE mlid = :mlid", array(
      ':options' => serialize($options),
      ':mlid' => $record->mlid,
    ));
  }
}

Functions

Namesort descending Description
menu_badges_uninstall Implements hook_uninstall().