You are here

function image_insert_content in Insert 7

Implementation of hook_insert_content().

File

includes/image.inc, line 42
Insert support for ImageField module.

Code

function image_insert_content($item, $style, $widget, $element) {
  $style_name = preg_replace('/^image_/', '', $style['name']);
  $style_name_underscores = str_replace('-', '_', $style_name);
  $field_name_underscores = str_replace('-', '_', $element['#field_name']);
  return theme(array(
    'image_insert_image__' . $field_name_underscores . '__' . $style_name_underscores,
    'image_insert_image__' . $field_name_underscores,
    'image_insert_image__' . $style_name_underscores,
    'image_insert_image',
  ), array(
    'item' => $item,
    'widget' => $widget,
    'style_name' => $style_name,
  ));
}