function imagecache_action_definitions in ImageCache 6.2
Same name and namespace in other branches
- 5.2 imagecache.module \imagecache_action_definitions()
Pull in actions exposed by other modules using hook_imagecache_actions().
Parameters
$reset: Boolean flag indicating whether the cached data should be wiped and recalculated.
Return value
An array of actions to be used when transforming images.
2 calls to imagecache_action_definitions()
File
- ./
imagecache.module, line 271 - Dynamic image resizer and image cacher.
Code
function imagecache_action_definitions($reset = FALSE) {
static $actions = array();
if (empty($actions) || $reset) {
if (!$reset && ($cache = cache_get('imagecache_actions')) && !empty($cache->data)) {
$actions = $cache->data;
}
else {
foreach (module_implements('imagecache_actions') as $module) {
foreach (module_invoke($module, 'imagecache_actions') as $key => $action) {
$action['module'] = $module;
if (!empty($action['file'])) {
$action['file'] = drupal_get_path('module', $action['module']) . '/' . $action['file'];
}
$actions[$key] = $action;
}
}
uasort($actions, '_imagecache_definitions_sort');
cache_set('imagecache_actions', $actions);
}
}
return $actions;
}