Same name and namespace in other branches
- 7.x-1.x colorbox.api.php \hook_colorbox_settings_alter() 1 commentaire
- 7.x-2.x colorbox.api.php \hook_colorbox_settings_alter() 1 commentaire
- 8.x-1.x colorbox.api.php \hook_colorbox_settings_alter() 1 commentaire
Allows to override Colorbox settings and style.
Implements hook_colorbox_settings_alter().
Colorbox documentation. for the full list of supported parameters.
@codingStandardsIgnoreStart
Paramètres
array $settings: An associative array of Colorbox settings. See the.
string $style: The name of the active style plugin. If $style is 'none', no Colorbox theme will be loaded.
1 invocation of hook_colorbox_settings_alter()
- ColorboxAttachment::attach dans src/
ColorboxAttachment.php - Attach information to the page array.
Fichier
-
./
colorbox.api.php, line 26
Code
function hook_colorbox_settings_alter(&$settings, &$style) {
// @codingStandardsIgnoreEnd
// Disable automatic downscaling of images to maxWidth/maxHeight size.
$settings['scalePhotos'] = FALSE;
// Use custom style plugin specifically for node/123.
if (current_path() == 'node/123') {
$style = 'mystyle';
}
}