function image_config_import_delete

Implements MODULE_config_import_delete().

File

drupal/core/modules/image/image.module, line 546
Exposes global functionality for creating image styles.

Code

function image_config_import_delete($name, $new_config, $old_config) {

  // Only image styles require custom handling. Any other module settings can be
  // synchronized directly.
  if (strpos($name, 'image.style.') !== 0) {
    return FALSE;
  }

  // @todo image_style_delete() supports the notion of a "replacement style"
  //   to be used by other modules instead of the deleted style. Essential!
  //   But that is impossible currently, since the config system only knows
  //   about deleted and added changes. Introduce an 'old_ID' key within
  //   config objects as a standard?
  list(, , $id) = explode('.', $name);
  $style = entity_load('image_style', $id);
  return image_style_delete($style);
}