function custom_formatters_insert_styles in Custom Formatters 7.2
Same name and namespace in other branches
- 6 includes/insert.inc \custom_formatters_insert_styles()
Implements hook_insert_styles().
File
- includes/
insert.inc, line 11 - Insert module integration.
Code
function custom_formatters_insert_styles() {
$insert_styles = array();
$supported = array(
'image',
'file',
);
$settings = variable_get('custom_formatters_settings', array(
'label_prefix' => TRUE,
'label_prefix_value' => t('Custom'),
));
foreach (custom_formatters_crud_load_all() as $formatter) {
if (array_intersect($supported, drupal_explode_tags($formatter->field_types))) {
$label = $settings['label_prefix'] ? "{$settings['label_prefix_value']}: {$formatter->label}" : $formatter->label;
$insert_styles["custom_formatters_{$formatter->name}"] = array(
'label' => $label,
);
}
}
return $insert_styles;
}