Projet

Général

Profil

Paste
Télécharger (793 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / colorbox / colorbox.api.php @ 87dbc3bf

1
<?php
2

    
3
/**
4
 * @file
5
 * API documentation for the colorbox module.
6
 */
7

    
8
/**
9
 * Allows to override Colorbox settings and style.
10
 *
11
 * Implements hook_colorbox_settings_alter().
12
 *
13
 * @param $settings
14
 *   An associative array of Colorbox settings. See the
15
 *   @link http://colorpowered.com/colorbox/ Colorbox documentation @endlink
16
 *   for the full list of supported parameters.
17
 * @param $style
18
 *   The name of the active style plugin. If $style is 'none', no Colorbox
19
 *   theme will be loaded.
20
 */
21
function hook_colorbox_settings_alter(&$settings, &$style) {
22
  // Disable automatic downscaling of images to maxWidth/maxHeight size.
23
  $settings['scalePhotos'] = FALSE;
24

    
25
  // Use custom style plugin specifically for node/123.
26
  if ($_GET['q'] == 'node/123') {
27
    $style = 'mystyle';
28
  }
29
}