Révision 91f42c9e
Ajouté par Assos Assos il y a presque 10 ans
drupal7/sites/all/modules/colorbox/colorbox.theme.inc | ||
---|---|---|
30 | 30 |
'style_name' => $settings['colorbox_node_style'], |
31 | 31 |
); |
32 | 32 |
|
33 |
if ($variables['delta'] == 0 && !empty($settings['colorbox_node_style_first'])) { |
|
34 |
$image['style_name'] = $settings['colorbox_node_style_first']; |
|
35 |
} |
|
36 |
|
|
33 | 37 |
if (isset($item['width']) && isset($item['height'])) { |
34 | 38 |
$image['width'] = $item['width']; |
35 | 39 |
$image['height'] = $item['height']; |
36 | 40 |
} |
37 | 41 |
|
42 |
if (isset($item['attributes'])) { |
|
43 |
$image['attributes'] = $item['attributes']; |
|
44 |
} |
|
45 |
|
|
38 | 46 |
$entity_title = entity_label($entity_type, $entity); |
39 | 47 |
|
40 | 48 |
switch ($settings['colorbox_caption']) { |
... | ... | |
153 | 161 |
* Preprocess variables for the colorbox-insert-image.tpl.php file. |
154 | 162 |
*/ |
155 | 163 |
function template_preprocess_colorbox_insert_image(&$variables) { |
156 |
$variables['file'] = file_load($variables['item']['fid']); |
|
157 |
$variables['style_name'] = $variables['item']['style_name']; |
|
158 |
$variables['width'] = $variables['item']['width']; |
|
159 |
$variables['height'] = $variables['item']['height']; |
|
164 |
$item = $variables['item']; |
|
165 |
$variables['file'] = file_load($item['fid']); |
|
166 |
$variables['style_name'] = $item['style_name']; |
|
167 |
$variables['width'] = isset($item['width']) ? $item['width'] : NULL; |
|
168 |
$variables['height'] = isset($item['height']) ? $item['height'] : NULL; |
|
160 | 169 |
|
161 | 170 |
// Determine dimensions of the image after the image style transformations. |
162 | 171 |
image_style_transform_dimensions($variables['style_name'], $variables); |
Formats disponibles : Unified diff
Weekly update of contrib modules