function insert_widgets in Insert 6
Same name and namespace in other branches
- 7 insert.module \insert_widgets()
Get a list of all supported field widgets.
3 calls to insert_widgets()
- insert_elements in ./
insert.module - Implementation of hook_elements().
- insert_widget_load in ./
insert.module - Load a single insert field widget info.
- insert_widget_settings_alter in ./
insert.module - Implementation of hook_widget_settings_alter().
File
- ./
insert.module, line 141 - 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_widgets($reset = FALSE) {
static $widgets;
if (!isset($widgets) || $reset) {
$widgets = array();
foreach (module_implements('insert_widgets') as $module) {
$module_widgets = module_invoke($module, 'insert_widgets');
foreach ($module_widgets as $type => $widget) {
$module_widgets[$type]['type'] = $type;
$module_widgets[$type]['module'] = $module;
}
$widgets = array_merge($widgets, $module_widgets);
}
drupal_alter('insert_widgets', $widgets);
}
return $widgets;
}