function generate_image_size($image, $named_size, $params = NULL, $skip_defaults = FALSE) { $retval = $this->call_parent('generate_image_size', $image, $named_size, $params, $skip_defaults); // TODO: NGG should flush the displayed gallery cache after a user regenerates thumbnails // As of 2.0.78.5, it doesn't do this if (version_compare(NGG_PLUGIN_VERSION, '2.0.78.5', '<=')) { C_Photocrati_Cache::flush('displayed_gallery_rendering'); } // TODO: This will generate a Retina-version of any other image created, // some of which don't need retina versions such as the IGW preview image // used in a post. // // We need to modify NGG so that parameters for dynamic images are stored in the database. // That way we could do a call like this: /* if ($retval) { $params = $this->object->get_image_size_params($image, $named_size); if (!isset($params['no_retina'])) $this->call_parent('generate_image_size', $image, M_NextGen_PictureFill::get_retina_named_size($image, $named_size)); } */ if ($retval) { $this->call_parent('generate_image_size', $image, M_NextGen_PictureFill::get_retina_named_size($image, $named_size)); } return $retval; }
?> "> <div class='ngg-pro-masonry-gutter' style='width: <?php print $padding; ?> px'></div> <div class='ngg-pro-masonry-sizer' style='width: <?php print $size; ?> px'></div> <?php $this->start_element('nextgen_gallery.image_list_container', 'container', $images); for ($i = 0; $i < count($images); $i++) { $image = $images[$i]; $thumb_size = $storage->get_image_dimensions($image, $thumbnail_size_name); $thumb_url = $storage->get_image_url($image, M_NextGen_PictureFill::get_retina_named_size($image, $thumbnail_size_name)); $this->start_element('nextgen_gallery.image_panel', 'item', $image); $this->start_element('nextgen_gallery.image', 'item', $image); ?> <div class='ngg-pro-masonry-item' style='height: <?php echo $thumb_size['height']; ?> px; max-width: <?php echo $thumb_size['width']; ?> px;'> <a href="<?php echo esc_attr($storage->get_image_url($image)); ?> " title="<?php
?> "> <?php $this->include_template('photocrati-nextgen_gallery_display#list/before'); ?> <?php $i = 0; foreach ($images as $image) { ?> <?php $full_size_url = $storage->get_image_url($image); $full_size_2x_url = $storage->get_image_url($image, M_NextGen_PictureFill::get_retina_named_size($image, 'full')); $thumb_url = $storage->get_image_url($image, $thumbnail_size_name); $thumb_2x_url = $storage->get_image_url($image, M_NextGen_PictureFill::get_retina_named_size($image, $thumbnail_size_name)); $thumb_size = $storage->get_image_dimensions($image, $thumbnail_size_name); $thumbnail_retina_size = M_NextGen_PictureFill::get_retina_named_size($image, $thumbnail_size_name); $template_params = array('index' => $i, 'class' => 'batch-image', 'image' => $image); $this->include_template('photocrati-nextgen_gallery_display#image/before', $template_params); ?> <img data-title="<?php echo esc_attr($image->alttext); ?> " data-alt="<?php echo esc_attr($image->alttext); ?> " data-src="<?php echo esc_attr($full_size_url); ?>