function hook_colorbox_active_alter in Colorbox 7.2
Allows to override activation of Colorbox for the current URL.
Parameters
bool $active: A boolean indicating whether colorbox should be active for the current URL or not.
1 invocation of hook_colorbox_active_alter()
- _colorbox_active in ./
colorbox.module - Check if Colorbox should be active for the current URL.
File
- ./
colorbox.api.php, line 42 - API documentation for the colorbox module.
Code
function hook_colorbox_active_alter(&$active) {
$path = drupal_get_path_alias($_GET['q']);
if (drupal_match_path($path, 'admin/config/colorbox_test')) {
// Enable colorbox for this URL.
$active = TRUE;
}
}