function optimizely_uninstall in Optimizely 7.2
Same name and namespace in other branches
- 8.3 optimizely.install \optimizely_uninstall()
- 8 optimizely.install \optimizely_uninstall()
- 8.0 optimizely.install \optimizely_uninstall()
- 7.3 optimizely.install \optimizely_uninstall()
Implements hook_uninstall().
Clean up / remove all data created by the module.
File
- ./
optimizely.install, line 149 - Install, update and uninstall functions for the Optimizely module
Code
function optimizely_uninstall() {
// Remove all optimizely settings in the variable table
$cleanup_status = (bool) db_delete('variable')
->condition('name', '%optimizely_%', 'LIKE')
->execute();
if ($cleanup_status == TRUE) {
drupal_set_message(st('Optimizely variables deleted.'), 'status');
}
else {
drupal_set_message(st('No entries found when deleting Optimizely variables.'), 'warning');
}
// hook_uninstall removes schema automatically
drupal_set_message(st('Optimizely database table dropped.'), 'status');
}