menu_badges.install in Menu Badges 8
Same filename and directory in other branches
Install file for Menu Badges.
File
menu_badges.installView 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
Name | Description |
---|---|
menu_badges_uninstall | Implements hook_uninstall(). |