You are here

function hook_insert_process in Insert 8.2

Triggered before Insert module processing. Returning FALSE skips processing. Returning a string indicates Insert's parent process callback that $element contains multiple sub-values under the specified key, so, instead of $element itself, that sub-array will be processed. Variables to be passed on to hook_insert_variables may be added to $element.

@example if ($insertType === 'text') { $element['#insert'][$insertType]['custom_variable'] = 'value'; $element['#attached']['library'][] = 'insert_text/insert_text'; }

Parameters

string $insertType:

array $element:

Return value

array [] or [FALSE] or ['<value elements key>']

See also

insert_insert_process()

2 functions implement hook_insert_process()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

insert_insert_process in ./insert.module
Implements hook_insert_process().
insert_media_insert_process in modules/insert_media/insert_media.module
Implements hook_insert_process().
1 invocation of hook_insert_process()
_insert_field_process in ./insert.module
Form API callback: Processes a file field element.

File

./insert.api.php, line 66
This file documents hooks provided by the Insert module.

Code

function hook_insert_process(&$insertType, array &$element) {
  return [];
}