You are here

function custom_formatters_insert_content in Custom Formatters 6

Same name and namespace in other branches
  1. 7.2 includes/insert.inc \custom_formatters_insert_content()

Implementation of hook_insert_content().

File

includes/insert.inc, line 28
Provides Custom Formatters integration with the Insert module.

Code

function custom_formatters_insert_content($item, $style, $widget) {
  $item['data']['description'] = $item['data']['description'] == '' ? '__description__' : $item['data']['description'];
  $element = array(
    '#formatter' => $style['name'],
    '#item' => $item,
    '#node' => (object) $_POST,
  );
  return theme('custom_formatters_formatter_' . $element['#formatter'], $element);
}