function imageinfo_cache_init in Imageinfo Cache 7.3
Implements hook_init().
File
- ./
imageinfo_cache.module, line 77 - Imageinfo Cache module.
Code
function imageinfo_cache_init() {
// Do nothing if the pseudo toolkit is disabled.
if (!variable_get('imageinfo_cache_pseudo_image_toolkit', IMAGEINFO_CACHE_PSEUDO_IMAGE_TOOLKIT)) {
return;
}
$arg = arg();
// Do not capture the toolkit if on the admin/config/media/* path.
if ($arg[0] === 'admin' && !empty($arg[1]) && $arg[1] === 'config' && !empty($arg[2]) && $arg[2] === 'media') {
return;
}
$GLOBALS['conf']['image_toolkit_original'] = variable_get('image_toolkit', 'gd');
$GLOBALS['conf']['image_toolkit'] = 'imageinfo_cache';
}