$code); } /** * Implementation of hook_features_revert(). * * @param $module * name of module to revert content for */ function imagecache_features_revert($module = NULL) { // Get all presets defined in this feature if (module_hook($module, 'imagecache_default_presets')) { $default_presets = module_invoke($module, 'imagecache_default_presets'); // Get all DB defined presets $current_presets = imagecache_presets(); // update all presets to their default values foreach($default_presets as $default_preset) { foreach($current_presets as $current_preset) { if ($current_preset['presetname'] == $default_preset['presetname']) { imagecache_preset_delete($current_preset); } } } } else { drupal_set_message(t('Could not load default imagecache presets.'), 'error'); return FALSE; } return TRUE; }