function hook_insert_variables in Insert 8.2
Allows adding/altering variables to be passed to a style's template. Returning FALSE skips the style from appearing in the Insert style select box.
@example if ($insertType === 'text') { return ['insert_text_bold' => $element['#insert']['settings']['insert_text_bold']]; }
Parameters
string $insertType:
array $element:
string $styleName:
array $vars:
Return value
array [] or [FALSE]
See also
3 functions implement hook_insert_variables()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- insert_colorbox_insert_variables in modules/
insert_colorbox/ insert_colorbox.module - Implements hook_insert_variables().
- insert_insert_variables in ./
insert.module - Implements hook_insert_variables().
- insert_responsive_image_insert_variables in modules/
insert_responsive_image/ insert_responsive_image.module - Implements hook_insert_variables().
1 invocation of hook_insert_variables()
- _insert_field_process in ./
insert.module - Form API callback: Processes a file field element.
File
- ./
insert.api.php, line 90 - This file documents hooks provided by the Insert module.
Code
function hook_insert_variables($insertType, array &$element, $styleName, &$vars) {
return [];
}