function hook_cdn_blacklist in CDN 7.2
Allow modules to blacklist file URLs.
If a module provides files (static assets, or dynamically generated files) that should never be served from a CDN, they must be blacklisted.
Return value
string[] A set of path patterns.
See also
1 function implements hook_cdn_blacklist()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- cdn_cdn_blacklist in ./
cdn.module - Implementation of hook_cdn_blacklist().
2 invocations of hook_cdn_blacklist()
- cdn_admin_other_settings_form in ./
cdn.admin.inc - Form definition; other settings.
- cdn_get_blacklist in ./
cdn.module - See if any installed modules need to exclude certain files from being accessed from the CDN. List gets updated on cron runs.
File
- ./
cdn.api.php, line 19 - Hooks provided by the CDN module.
Code
function hook_cdn_blacklist() {
$blacklist = array();
// Blacklist wysiwyg library files.
if (module_exists('wysiwyg')) {
foreach (wysiwyg_get_all_editors() as $editor) {
if (!$editor['installed']) {
continue;
}
$blacklist[] = $editor['library path'] . '/*';
}
}
// Blacklist Image CAPTCHA' dynamically generated CAPTCHA images.
$blacklist[] = 'image_captcha*';
// Blacklist SimpleTest paths
$blacklist[] = "*simpletest/verbose/*";
return $blacklist;
}