function image_config_import_create

Implements hook_config_import_create().

File

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

Code

function image_config_import_create($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;
  }
  $style = entity_create('image_style', $new_config
    ->get());
  $style
    ->save();
  return TRUE;
}