function imagezoom_preprocess_page in Image Zoom 7
Implements hook_preprocess_page().
File
- ./
imagezoom.module, line 419 - Provides an Image Zoom field formatter for Image fields.
Code
function imagezoom_preprocess_page(&$variables) {
$type = isset($variables['node']->type) ? $variables['node']->type : '';
$types = array_filter(variable_get('imagezoom_load_all_types', array()));
if (variable_get('imagezoom_load_all', 0) && in_array($type, $types)) {
$display_title = variable_get('imagezoom_display_title', 0);
$hide_thumbs = variable_get('imagezoom_hide_active_thumb', 0);
drupal_add_js(drupal_get_path('module', 'imagezoom') . '/js/imagezoom.min.js');
$settings = array(
'zoom_type' => variable_get('imagezoom_zoom_type', 'popup'),
'display_title' => $display_title,
'hide_thumbs' => $hide_thumbs,
);
drupal_add_js(array(
'imagezoom' => $settings,
), 'setting');
drupal_add_css(drupal_get_path('module', 'imagezoom') . '/css/imagezoom.css');
}
}