Enjoy Instagram feed on website with WordPress Widget and Shortcode - Version 6.0.3

Version Description

  • fix: carousel error when the shortcode content is lazy-loaded
Download this release

Release Info

Developer designemotions
Plugin Icon 128x128 Enjoy Instagram feed on website with WordPress Widget and Shortcode
Version 6.0.3
Comparing to
See all releases

Code changes from version 6.0.2 to 6.0.3

enjoyinstagram.php CHANGED
@@ -11,7 +11,7 @@
11
  * Plugin Name: Enjoy Instagram
12
  * Plugin URI: https://www.mediabetaprojects.com/enjoy-instagram-premium/
13
  * Description: Instagram Responsive Images Gallery and Carousel, works with Shortcodes and Widgets.
14
- * Version: 6.0.2
15
  * Requires at least: 4.0
16
  * Requires PHP: 7.2
17
  * Author: Mediabeta Srl
@@ -22,7 +22,7 @@
22
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
23
  */
24
 
25
- ! defined( 'ENJOYINSTAGRAM_VERSION' ) && define( 'ENJOYINSTAGRAM_VERSION', '6.0.2' );
26
  ! defined( 'ENJOYINSTAGRAM_FILE' ) && define( 'ENJOYINSTAGRAM_FILE', __FILE__ );
27
  ! defined( 'ENJOYINSTAGRAM_URL' ) && define( 'ENJOYINSTAGRAM_URL', plugin_dir_url( __FILE__ ) );
28
  ! defined( 'ENJOYINSTAGRAM_DIR' ) && define( 'ENJOYINSTAGRAM_DIR', plugin_dir_path( __FILE__ ) );
11
  * Plugin Name: Enjoy Instagram
12
  * Plugin URI: https://www.mediabetaprojects.com/enjoy-instagram-premium/
13
  * Description: Instagram Responsive Images Gallery and Carousel, works with Shortcodes and Widgets.
14
+ * Version: 6.0.3
15
  * Requires at least: 4.0
16
  * Requires PHP: 7.2
17
  * Author: Mediabeta Srl
22
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
23
  */
24
 
25
+ ! defined( 'ENJOYINSTAGRAM_VERSION' ) && define( 'ENJOYINSTAGRAM_VERSION', '6.0.3' );
26
  ! defined( 'ENJOYINSTAGRAM_FILE' ) && define( 'ENJOYINSTAGRAM_FILE', __FILE__ );
27
  ! defined( 'ENJOYINSTAGRAM_URL' ) && define( 'ENJOYINSTAGRAM_URL', plugin_dir_url( __FILE__ ) );
28
  ! defined( 'ENJOYINSTAGRAM_DIR' ) && define( 'ENJOYINSTAGRAM_DIR', plugin_dir_path( __FILE__ ) );
readme.txt CHANGED
@@ -4,8 +4,8 @@ Donate link: https://www.google.com/url?q=https%3A%2F%2Fwww.paypal.com%2Fcgi-bin
4
  Tags: instagram carousel, instagram, instagram feed, instagram widget, instagram grid
5
  Requires at least: 4.0
6
  Tested up to: 5.6
7
- Version: 6.0.2
8
- Stable tag: 6.0.2
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -210,6 +210,8 @@ In the Setting section yon can customize grid and/or Carousel view
210
  8. Front End View Example
211
 
212
  == Changelog ==
 
 
213
  = 6.0.2 =
214
  * fix: in some cases the photos were not shown.
215
  = 6.0.1 =
4
  Tags: instagram carousel, instagram, instagram feed, instagram widget, instagram grid
5
  Requires at least: 4.0
6
  Tested up to: 5.6
7
+ Version: 6.0.3
8
+ Stable tag: 6.0.3
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
210
  8. Front End View Example
211
 
212
  == Changelog ==
213
+ = 6.0.3 =
214
+ * fix: carousel error when the shortcode content is lazy-loaded
215
  = 6.0.2 =
216
  * fix: in some cases the photos were not shown.
217
  = 6.0.1 =
templates/shortcodes/carousel.php CHANGED
@@ -25,7 +25,6 @@ if ( isset( $settings['theme'] ) ) {
25
  $theme = 'ei-showcase';
26
  }
27
  }
28
-
29
  ?>
30
 
31
  <script type="text/javascript">
@@ -82,24 +81,30 @@ if ( isset( $settings['theme'] ) ) {
82
  }
83
  },
84
  on: {
85
- update: function (sw) {
86
  <?php if ( 'ei-showcase' === $theme ) : ?>
87
  var maxHeight = 0;
88
- sw.slides.forEach(function (s) {
89
- maxHeight = Math.max(maxHeight, s.offsetHeight)
90
- })
 
 
 
 
 
 
91
 
92
- sw.slides.forEach(function (s) {
93
  s.style.height = maxHeight + 'px';
94
  })
95
-
96
  <?php endif; ?>
97
- sw.imagesToLoad.forEach(function (img) {
98
- if (img.className.indexOf('ig-img') !== -1) {
 
 
99
  img.style.height = img.width + 'px';
100
  }
101
- })
102
-
103
  },
104
  }
105
  })
25
  $theme = 'ei-showcase';
26
  }
27
  }
 
28
  ?>
29
 
30
  <script type="text/javascript">
81
  }
82
  },
83
  on: {
84
+ update: function () {
85
  <?php if ( 'ei-showcase' === $theme ) : ?>
86
  var maxHeight = 0;
87
+ var slides = [];
88
+
89
+ for(var i in this.slides) {
90
+ var slide = this.slides[i];
91
+ if(slide.height) {
92
+ maxHeight = Math.max(maxHeight, slide.offsetHeight);
93
+ slides.push(slide);
94
+ }
95
+ }
96
 
97
+ slides.forEach(function (s) {
98
  s.style.height = maxHeight + 'px';
99
  })
 
100
  <?php endif; ?>
101
+
102
+ for(var i in this.imagesToLoad) {
103
+ var img = this.imagesToLoad[i];
104
+ if (img && img.className && img.className.indexOf('ig-img') !== -1) {
105
  img.style.height = img.width + 'px';
106
  }
107
+ }
 
108
  },
109
  }
110
  })