You are here

function insert_elements in Insert 6

Implementation of hook_elements().

File

./insert.module, line 12
Allows insertion of files, images, and other media directly into the body field by using an "Insert" button next to the uploaded file.

Code

function insert_elements() {
  $extra = array(
    '#after_build' => array(
      'insert_element_process',
    ),
  );
  $elements = array();
  foreach (insert_widgets() as $widget_type => $widget) {
    $element_type = isset($widget['element_type']) ? $widget['element_type'] : $widget_type;
    $elements[$element_type] = $extra;
  }
  return $elements;
}