function user_badges_uninstall in User Badges 7.4
Same name and namespace in other branches
- 5 user_badges.install \user_badges_uninstall()
- 6.2 user_badges.install \user_badges_uninstall()
- 6 user_badges.install \user_badges_uninstall()
- 7 user_badges.install \user_badges_uninstall()
- 7.2 user_badges.install \user_badges_uninstall()
- 7.3 user_badges.install \user_badges_uninstall()
Implements hook_uninstall().
File
- ./
user_badges.install, line 331 - Install for user_badge module
Code
function user_badges_uninstall() {
foreach (array_keys(user_badges_get_field_bases()) as $field) {
field_delete_field($field);
}
field_purge_batch(1000);
db_delete('variable')
->condition('name', 'user_badges_%', 'LIKE')
->execute();
cache_clear_all('variables', 'cache_bootstrap');
}