function libraries_invoke in Libraries API 7.2
Same name and namespace in other branches
- 8.3 libraries.module \libraries_invoke()
- 7.3 libraries.module \libraries_invoke()
Invokes library callbacks.
Parameters
$group: A string containing the group of callbacks that is to be applied. Should be either 'info', 'pre-detect', 'post-detect', or 'load'.
$library: An array of library information, passed by reference.
3 calls to libraries_invoke()
- libraries_detect in ./
libraries.module - Tries to detect a library and its installed version.
- libraries_info in ./
libraries.module - Returns information about registered libraries.
- libraries_load in ./
libraries.module - Loads a library.
File
- ./
libraries.module, line 244 - External library handling for Drupal modules.
Code
function libraries_invoke($group, &$library) {
// When introducing new callback groups in newer versions, stale cached
// library information somehow reaches this point during the database update
// before clearing the library cache.
if (empty($library['callbacks'][$group])) {
return;
}
foreach ($library['callbacks'][$group] as $callback) {
libraries_traverse_library($library, $callback);
}
}