You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
587 B
21 lines
587 B
<?php |
|
|
|
/** |
|
* @file |
|
* Functions to support theming. |
|
*/ |
|
|
|
/** |
|
* Implements hook_preprocess_image_widget(). |
|
*/ |
|
function islandscholar_preprocess_image_widget(array &$variables) { |
|
$data = &$variables['data']; |
|
|
|
// This prevents image widget templates from rendering preview container HTML |
|
// to users that do not have permission to access these previews. |
|
// @todo revisit in https://drupal.org/node/953034 |
|
// @todo revisit in https://drupal.org/node/3114318 |
|
if (isset($data['preview']['#access']) && $data['preview']['#access'] === FALSE) { |
|
unset($data['preview']); |
|
} |
|
}
|
|
|