Photo Gallery by Envira – Responsive Image Gallery for WordPress - Version 1.1.7

Version Description

  • Fix: Minification of inline CSS and JS
  • Fix: Alt tags on images
  • Fix: Links on Lightbox Image Titles
Download this release

Release Info

Developer n7studios
Plugin Icon 128x128 Photo Gallery by Envira – Responsive Image Gallery for WordPress
Version 1.1.7
Comparing to
See all releases

Code changes from version 1.1.6 to 1.1.7

envira-gallery-lite.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Envira Gallery is best responsive WordPress gallery plugin. This is the lite version.
6
  * Author: Thomas Griffin
7
  * Author URI: http://thomasgriffinmedia.com
8
- * Version: 1.1.6
9
  * Text Domain: envira-gallery
10
  * Domain Path: languages
11
  *
@@ -54,7 +54,7 @@ class Envira_Gallery_Lite {
54
  *
55
  * @var string
56
  */
57
- public $version = '1.1.6';
58
 
59
  /**
60
  * The name of the plugin.
5
  * Description: Envira Gallery is best responsive WordPress gallery plugin. This is the lite version.
6
  * Author: Thomas Griffin
7
  * Author URI: http://thomasgriffinmedia.com
8
+ * Version: 1.1.7
9
  * Text Domain: envira-gallery
10
  * Domain Path: languages
11
  *
54
  *
55
  * @var string
56
  */
57
+ public $version = '1.1.7';
58
 
59
  /**
60
  * The name of the plugin.
includes/global/shortcode.php CHANGED
@@ -164,11 +164,11 @@ class Envira_Gallery_Shortcode_Lite {
164
 
165
  if ( ! empty( $item['link'] ) ) {
166
  $output = apply_filters( 'envira_gallery_output_before_link', $output, $id, $item, $data, $i );
167
- $output .= '<a href="' . esc_url( $item['link'] ) . '" class="envira-gallery-' . sanitize_html_class( $data['id'] ) . ' envira-gallery-link" rel="enviragallery' . sanitize_html_class( $data['id'] ) . '" title="' . strip_tags( html_entity_decode( $item['title'] ) ) . '" data-thumbnail="' . esc_url( $item['thumb'] ) . '">';
168
  }
169
 
170
  $output = apply_filters( 'envira_gallery_output_before_image', $output, $id, $item, $data, $i );
171
- $output .= '<img id="envira-gallery-image-' . sanitize_html_class( $id ) . '" class="envira-gallery-image envira-gallery-preload envira-gallery-image-' . $i . '" src="' . esc_url( plugins_url( 'assets/css/images/holder.gif', dirname( dirname( __FILE__ ) ) ) ) . '" data-envira-src="' . esc_url( $imagesrc ) . '" alt="' . esc_attr( $item['title'] ) . '" title="' . strip_tags( html_entity_decode( $item['title'] ) ) . '" ' . apply_filters( 'envira_gallery_output_image_attr', '', $id, $item, $data, $i ) . ' />';
172
  $output = apply_filters( 'envira_gallery_output_after_image', $output, $id, $item, $data, $i );
173
 
174
  if ( ! empty( $item['link'] ) ) {
@@ -221,17 +221,6 @@ class Envira_Gallery_Shortcode_Lite {
221
  envira_holder_<?php echo $data['id']; ?> = $('#envira-gallery-<?php echo $data['id']; ?>').find(".envira-gallery-preload"),
222
  envira_throttle_<?php echo $data['id']; ?> = <?php echo apply_filters( 'envira_gallery_isotope_throttle', 500, $data ); ?>;
223
 
224
- var titles_<?php echo $data['id']; ?> = [];
225
-
226
- <?php
227
- foreach ( $data['gallery'] as $imageID => $image ) {
228
- $title = addslashes( str_replace( "\n", "", nl2br( $image['title'] ) ) );
229
- ?>
230
- titles_<?php echo $data['id']; ?>.push('<?php echo $title; ?>');
231
- <?php
232
- }
233
- ?>
234
-
235
  function enviraOnFinished<?php echo $data['id']; ?>(){
236
  envira_container_<?php echo $data['id']; ?>.isotope('reLayout');
237
  envira_container_<?php echo $data['id']; ?>.parent().css('background-image', 'none');
@@ -325,8 +314,9 @@ class Envira_Gallery_Shortcode_Lite {
325
  window.location.href = href;
326
  return false;
327
  }
328
-
329
- opts.title = titles_<?php echo $data['id']; ?>[index];
 
330
  }
331
  });
332
 
@@ -476,7 +466,7 @@ class Envira_Gallery_Shortcode_Lite {
476
  public function minify( $string, $stripDoubleForwardslashes = true ) {
477
 
478
  return $string;
479
-
480
  // Added a switch for stripping double forwardslashes
481
  // This can be disabled when using URLs in JS, to ensure http:// doesn't get removed
482
  // All other comment removal and minification will take place
164
 
165
  if ( ! empty( $item['link'] ) ) {
166
  $output = apply_filters( 'envira_gallery_output_before_link', $output, $id, $item, $data, $i );
167
+ $output .= '<a href="' . esc_url( $item['link'] ) . '" class="envira-gallery-' . sanitize_html_class( $data['id'] ) . ' envira-gallery-link" rel="enviragallery' . sanitize_html_class( $data['id'] ) . '" title="' . esc_attr( $item['title'] ) . '" data-thumbnail="' . esc_url( $item['thumb'] ) . '">';
168
  }
169
 
170
  $output = apply_filters( 'envira_gallery_output_before_image', $output, $id, $item, $data, $i );
171
+ $output .= '<img id="envira-gallery-image-' . sanitize_html_class( $id ) . '" class="envira-gallery-image envira-gallery-preload envira-gallery-image-' . $i . '" src="' . esc_url( plugins_url( 'assets/css/images/holder.gif', dirname( dirname( __FILE__ ) ) ) ) . '" data-envira-src="' . esc_url( $imagesrc ) . '" alt="' . esc_attr( $item['alt'] ) . '" title="' . esc_attr( $item['title'] ) . '" ' . apply_filters( 'envira_gallery_output_image_attr', '', $id, $item, $data, $i ) . ' />';
172
  $output = apply_filters( 'envira_gallery_output_after_image', $output, $id, $item, $data, $i );
173
 
174
  if ( ! empty( $item['link'] ) ) {
221
  envira_holder_<?php echo $data['id']; ?> = $('#envira-gallery-<?php echo $data['id']; ?>').find(".envira-gallery-preload"),
222
  envira_throttle_<?php echo $data['id']; ?> = <?php echo apply_filters( 'envira_gallery_isotope_throttle', 500, $data ); ?>;
223
 
 
 
 
 
 
 
 
 
 
 
 
224
  function enviraOnFinished<?php echo $data['id']; ?>(){
225
  envira_container_<?php echo $data['id']; ?>.isotope('reLayout');
226
  envira_container_<?php echo $data['id']; ?>.parent().css('background-image', 'none');
314
  window.location.href = href;
315
  return false;
316
  }
317
+ },
318
+ beforeLoad: function(){
319
+ this.title = $(this.element).attr('title');
320
  }
321
  });
322
 
466
  public function minify( $string, $stripDoubleForwardslashes = true ) {
467
 
468
  return $string;
469
+
470
  // Added a switch for stripping double forwardslashes
471
  // This can be disabled when using URLs in JS, to ensure http:// doesn't get removed
472
  // All other comment removal and minification will take place
readme.txt CHANGED
@@ -57,6 +57,11 @@ Also, I'm an <a href="https://thomasgriffin.io" rel="me" title="WordPress Develo
57
 
58
  == Changelog ==
59
 
 
 
 
 
 
60
  = 1.1.6 =
61
  * Fix: Upgraded Fancybox to 2.1.5
62
  * Fix: Improved error message UI when uploading files exceeding WordPress / PHP file size limits
57
 
58
  == Changelog ==
59
 
60
+ = 1.1.7 =
61
+ * Fix: Minification of inline CSS and JS
62
+ * Fix: Alt tags on images
63
+ * Fix: Links on Lightbox Image Titles
64
+
65
  = 1.1.6 =
66
  * Fix: Upgraded Fancybox to 2.1.5
67
  * Fix: Improved error message UI when uploading files exceeding WordPress / PHP file size limits