function insert_styles in Insert 7
Same name and namespace in other branches
- 6 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.
File
- ./
insert.module, line 161 - 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;
}