function insert_styles in Insert 6
Same name and namespace in other branches
- 7 insert.module \insert_styles()
Get a list of all supported image styles.
3 calls to insert_styles()
- insert_element_process in ./
insert.module - Process function for insert-enabled fields.
- insert_styles_list in ./
insert.module - Get a list of styles suitable for an #options array.
- insert_style_load in ./
insert.module - Load an individual insert style.
1 string reference to 'insert_styles'
- insert_widget_settings in ./
insert.module - A list of settings needed by Insert module on widgets.
File
- ./
insert.module, line 90 - 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_styles($reset = FALSE) {
static $styles;
if (!isset($styles) || $reset) {
$styles = array();
foreach (module_implements('insert_styles') as $module) {
$module_styles = module_invoke($module, 'insert_styles');
foreach ($module_styles as $name => $style) {
$module_styles[$name]['name'] = $name;
$module_styles[$name]['module'] = $module;
}
$styles = array_merge($styles, $module_styles);
}
drupal_alter('insert_styles', $styles);
uasort($styles, '_insert_style_sort');
}
return $styles;
}