WD Instagram Feed – Instagram Gallery - Version 1.1.4

Version Description

Fixed: Error handling in case of wrong access_token
Fixed: Image description not opening after pagination (Pro)
Fixed: Do not show load more button if feed media are finished
Fixed: Infinite scroll triggering bug (Pro)

Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 WD Instagram Feed – Instagram Gallery
Version 1.1.4
Comparing to
See all releases

Code changes from version 1.1.3 to 1.1.4

js/wdi_frontend.js CHANGED
@@ -331,11 +331,20 @@ wdi_front.saveUserData = function(data, user, currentFeed) {
331
  } else {
332
 
333
 
334
-
335
  //display feed
336
  wdi_front.displayFeed(currentFeed);
337
  //when all data us properly displayed check for any active filters and then apply them
338
  wdi_front.applyFilters(currentFeed);
 
 
 
 
 
 
 
 
 
 
339
 
340
  }
341
 
@@ -628,11 +637,11 @@ wdi_front.masonryDisplayFeedItems = function(data, currentFeed) {
628
  * so event assigning moved to here
629
  *
630
  */
631
- if ( currentFeed.feed_row.feed_type != 'blog_style' ){
632
- jQuery('#wdi_feed_'+currentFeed.feed_row.wdi_feed_counter+' .wdi_photo_title').each(function(){
633
- wdi_responsive.bindMasonryCaptionEvent(jQuery(this),currentFeed);
634
- });
635
- }
636
 
637
 
638
 
@@ -814,11 +823,12 @@ wdi_front.displayFeedItems = function(data, currentFeed) {
814
  * so event assigning moved to here
815
  *
816
  */
817
- if ( currentFeed.feed_row.feed_type != 'blog_style' ){
818
- jQuery('#wdi_feed_'+currentFeed.feed_row.wdi_feed_counter+' .wdi_photo_title').each(function(){
819
- wdi_responsive.bindCaptionEvent(jQuery(this),currentFeed);
820
- });
821
- }
 
822
 
823
 
824
 
@@ -1208,6 +1218,7 @@ wdi_front.getPhotoTemplate = function(currentFeed) {
1208
 
1209
 
1210
 
 
1211
  if(currentFeed.feed_row.show_username_on_thumb == '1'){
1212
  showUsernameOnThumb = '<span class="wdi_media_user">@<%= wdi_username%></span>';
1213
  }
@@ -1218,6 +1229,17 @@ wdi_front.getPhotoTemplate = function(currentFeed) {
1218
  customClass += ' wdi_full_caption';
1219
  }
1220
 
 
 
 
 
 
 
 
 
 
 
 
1221
  //creating onclick string for different options
1222
  switch (currentFeed.feed_row.feed_item_onclick) {
1223
  case 'lightbox':
@@ -1265,7 +1287,7 @@ wdi_front.getPhotoTemplate = function(currentFeed) {
1265
  }
1266
  source += '<div class="clear"></div>';
1267
  if (currentFeed['feed_row']['show_description'] === '1') {
1268
- source += '<div class="wdi_photo_title" >' +
1269
  '<%=caption%>' +
1270
  '</div>';
1271
  }
@@ -1321,6 +1343,16 @@ wdi_front.getVideoTemplate = function(currentFeed) {
1321
  customClass += ' wdi_full_caption';
1322
  }
1323
 
 
 
 
 
 
 
 
 
 
 
1324
  //creating onclick string for different options
1325
  switch (currentFeed.feed_row.feed_item_onclick) {
1326
  case 'lightbox':
@@ -1374,7 +1406,7 @@ wdi_front.getVideoTemplate = function(currentFeed) {
1374
  }
1375
  source += '<div class="clear"></div>';
1376
  if (currentFeed['feed_row']['show_description'] === '1') {
1377
- source += '<div class="wdi_photo_title" >' +
1378
  '<%=caption%>' +
1379
  '</div>';
1380
  }
@@ -1750,13 +1782,15 @@ wdi_front.checkForLoadMoreDone = function(currentFeed, button) {
1750
  } else {
1751
 
1752
  currentFeed.usersData = currentFeed.temproraryUsersData;
1753
-
1754
  wdi_front.displayFeed(currentFeed);
1755
  //when all data us properly displayed check for any active filters and then apply them
1756
  wdi_front.applyFilters(currentFeed);
1757
 
1758
  //resetting temprorary users data array for the next loadmoer call
1759
  currentFeed.temproraryUsersData = [];
 
 
1760
  }
1761
 
1762
  } else {
@@ -1770,6 +1804,11 @@ wdi_front.checkForLoadMoreDone = function(currentFeed, button) {
1770
 
1771
  currentFeed.usersData = currentFeed.temproraryUsersData;
1772
 
 
 
 
 
 
1773
  wdi_front.displayFeed(currentFeed, load_more_number);
1774
  //when all data us properly displayed check for any active filters and then apply them
1775
  wdi_front.applyFilters(currentFeed);
@@ -2169,7 +2208,6 @@ wdi_front.addFilter = function(index, feed_counter) {
2169
  currentFeed.resIndex = 0;
2170
  }
2171
 
2172
-
2173
  //applying filters
2174
  if (activeFilterCount != 0) {
2175
  wdi_front.filterData(currentFeed);
331
  } else {
332
 
333
 
 
334
  //display feed
335
  wdi_front.displayFeed(currentFeed);
336
  //when all data us properly displayed check for any active filters and then apply them
337
  wdi_front.applyFilters(currentFeed);
338
+
339
+
340
+ /*removing load more button of feed has finished*/
341
+ if( !wdi_front.activeUsersCount(currentFeed) ){
342
+ if (currentFeed.feed_row.feed_display_view == 'load_more_btn') {
343
+ let feed_container = jQuery('#wdi_feed_' + currentFeed.feed_row.wdi_feed_counter);
344
+ feed_container.find('.wdi_load_more').addClass('wdi_hidden');
345
+ feed_container.find('.wdi_spinner').addClass('wdi_hidden');
346
+ }
347
+ };
348
 
349
  }
350
 
637
  * so event assigning moved to here
638
  *
639
  */
640
+ // if ( currentFeed.feed_row.feed_type != 'blog_style' ){
641
+ // jQuery('#wdi_feed_'+currentFeed.feed_row.wdi_feed_counter+' .wdi_photo_title').each(function(){
642
+ // wdi_responsive.bindMasonryCaptionEvent(jQuery(this),currentFeed);
643
+ // });
644
+ // }
645
 
646
 
647
 
823
  * so event assigning moved to here
824
  *
825
  */
826
+ // if ( currentFeed.feed_row.feed_type != 'blog_style' ){
827
+ // jQuery('#wdi_feed_'+currentFeed.feed_row.wdi_feed_counter+' .wdi_photo_title').each(function(){
828
+ // wdi_responsive.bindCaptionEvent(jQuery(this),currentFeed);
829
+ // });
830
+
831
+ // }
832
 
833
 
834
 
1218
 
1219
 
1220
 
1221
+
1222
  if(currentFeed.feed_row.show_username_on_thumb == '1'){
1223
  showUsernameOnThumb = '<span class="wdi_media_user">@<%= wdi_username%></span>';
1224
  }
1229
  customClass += ' wdi_full_caption';
1230
  }
1231
 
1232
+ let onclickevent = "";
1233
+ if( currentFeed.feed_row.feed_type !== "blog_style" ){
1234
+ if( currentFeed.feed_row.feed_type == 'masonry'){
1235
+ onclickevent = "wdi_responsive.showMasonryCaption(jQuery(this),"+currentFeed.feed_row.wdi_feed_counter+");"
1236
+ }else{
1237
+ onclickevent = "wdi_responsive.showCaption(jQuery(this),"+currentFeed.feed_row.wdi_feed_counter+");";
1238
+ }
1239
+
1240
+ }
1241
+
1242
+
1243
  //creating onclick string for different options
1244
  switch (currentFeed.feed_row.feed_item_onclick) {
1245
  case 'lightbox':
1287
  }
1288
  source += '<div class="clear"></div>';
1289
  if (currentFeed['feed_row']['show_description'] === '1') {
1290
+ source += '<div class="wdi_photo_title" onclick='+ onclickevent +' >' +
1291
  '<%=caption%>' +
1292
  '</div>';
1293
  }
1343
  customClass += ' wdi_full_caption';
1344
  }
1345
 
1346
+ let onclickevent = "";
1347
+ if( currentFeed.feed_row.feed_type !== "blog_style" ){
1348
+ if( currentFeed.feed_row.feed_type == 'masonry'){
1349
+ onclickevent = "wdi_responsive.showMasonryCaption(jQuery(this),"+currentFeed.feed_row.wdi_feed_counter+");"
1350
+ }else{
1351
+ onclickevent = "wdi_responsive.showCaption(jQuery(this),"+currentFeed.feed_row.wdi_feed_counter+");";
1352
+ }
1353
+
1354
+ }
1355
+
1356
  //creating onclick string for different options
1357
  switch (currentFeed.feed_row.feed_item_onclick) {
1358
  case 'lightbox':
1406
  }
1407
  source += '<div class="clear"></div>';
1408
  if (currentFeed['feed_row']['show_description'] === '1') {
1409
+ source += '<div class="wdi_photo_title" onclick='+ onclickevent +' >' +
1410
  '<%=caption%>' +
1411
  '</div>';
1412
  }
1782
  } else {
1783
 
1784
  currentFeed.usersData = currentFeed.temproraryUsersData;
1785
+
1786
  wdi_front.displayFeed(currentFeed);
1787
  //when all data us properly displayed check for any active filters and then apply them
1788
  wdi_front.applyFilters(currentFeed);
1789
 
1790
  //resetting temprorary users data array for the next loadmoer call
1791
  currentFeed.temproraryUsersData = [];
1792
+
1793
+
1794
  }
1795
 
1796
  } else {
1804
 
1805
  currentFeed.usersData = currentFeed.temproraryUsersData;
1806
 
1807
+ if( !wdi_front.activeUsersCount(currentFeed) ){
1808
+ return;
1809
+ };
1810
+
1811
+ //debugger;
1812
  wdi_front.displayFeed(currentFeed, load_more_number);
1813
  //when all data us properly displayed check for any active filters and then apply them
1814
  wdi_front.applyFilters(currentFeed);
2208
  currentFeed.resIndex = 0;
2209
  }
2210
 
 
2211
  //applying filters
2212
  if (activeFilterCount != 0) {
2213
  wdi_front.filterData(currentFeed);
js/wdi_instagram.js CHANGED
@@ -217,6 +217,8 @@ function WDIInstagram(args) {
217
  url: baseUrl,
218
  dataType: 'jsonp',
219
  success: function(response) {
 
 
220
  if (successFlag) {
221
  if (typeof args.success == 'object' && args.success.length == 2) {
222
  if (typeof window[args.success[0]] != 'undefined') {
@@ -643,7 +645,8 @@ function WDIInstagram(args) {
643
  dataType: 'jsonp',
644
  url: baseUrl,
645
  success: function(response) {
646
-
 
647
  if (successFlag) {
648
  if (typeof args.success == 'object' && args.success.length == 2) {
649
  if (typeof window[args.success[0]] != 'undefined') {
217
  url: baseUrl,
218
  dataType: 'jsonp',
219
  success: function(response) {
220
+ if( typeof response["data"] === "undefined" ) response["data"] = [];
221
+
222
  if (successFlag) {
223
  if (typeof args.success == 'object' && args.success.length == 2) {
224
  if (typeof window[args.success[0]] != 'undefined') {
645
  dataType: 'jsonp',
646
  url: baseUrl,
647
  success: function(response) {
648
+ if( typeof response["data"] === "undefined" ) response["data"] = [];
649
+
650
  if (successFlag) {
651
  if (typeof args.success == 'object' && args.success.length == 2) {
652
  if (typeof window[args.success[0]] != 'undefined') {
js/wdi_responsive.js CHANGED
@@ -177,17 +177,20 @@ wdi_responsive.columnControl = function(currentFeed,load,customWidth){
177
 
178
  };
179
  wdi_responsive.bindCaptionEvent = function(imgtitle,currentFeed){
180
- imgtitle.on('click',function(){
181
- wdi_responsive.showCaption(jQuery(this),currentFeed);
182
- })
 
 
183
  }
184
  wdi_responsive.bindMasonryCaptionEvent = function(imgtitle,currentFeed){
185
- imgtitle.on('click',function(){
186
- wdi_responsive.showMasonryCaption(jQuery(this),currentFeed);
187
- });
 
188
  }
189
- wdi_responsive.showCaption = function(caption,currentFeed){
190
-
191
  var imgItem = caption.parent().parent();
192
  if(currentFeed.feed_row.feed_display_view === 'pagination'){
193
  var indexType = 'wdi_res_index';
@@ -208,11 +211,13 @@ wdi_responsive.showCaption = function(caption,currentFeed){
208
 
209
 
210
  }
211
-
212
  if(imgItem.hasClass('wdi_full_caption')){
213
  caption.css('white-space','nowrap');
214
  imgItem.removeClass('wdi_full_caption');
215
- jQuery('body, html').animate({scrollTop:imgItem.attr('wdi_scroll_to')}, '500');
 
 
216
  }else{
217
  caption.css('white-space','normal');
218
  imgItem.addClass('wdi_full_caption');
@@ -266,13 +271,15 @@ wdi_responsive.fixRow = function(currentFeed){
266
 
267
  }
268
 
269
- wdi_responsive.showMasonryCaption = function(caption,currentFeed){
 
 
270
  var imgItem = caption.parent().parent();
271
 
272
  if(imgItem.hasClass('wdi_full_caption')){
273
  caption.css('white-space','nowrap');
274
  imgItem.removeClass('wdi_full_caption');
275
- jQuery('body, html').animate({scrollTop:imgItem.attr('wdi_scroll_to')}, '500');
276
  }else{
277
  imgItem.attr('wdi_scroll_to',imgItem.offset().top-50);
278
  caption.css('white-space','normal');
177
 
178
  };
179
  wdi_responsive.bindCaptionEvent = function(imgtitle,currentFeed){
180
+ //if(typeof imgtitle == "undefined") return;
181
+
182
+ // imgtitle.on('click',function(e){
183
+ // wdi_responsive.showCaption(jQuery(this),currentFeed);
184
+ // })
185
  }
186
  wdi_responsive.bindMasonryCaptionEvent = function(imgtitle,currentFeed){
187
+ //console.log("asdasd");
188
+ // imgtitle.on('click',function(){
189
+ // wdi_responsive.showMasonryCaption(jQuery(this),currentFeed);
190
+ // });
191
  }
192
+ wdi_responsive.showCaption = function(caption,currentFeedCounter){
193
+ var currentFeed = window["wdi_feed_" + currentFeedCounter]
194
  var imgItem = caption.parent().parent();
195
  if(currentFeed.feed_row.feed_display_view === 'pagination'){
196
  var indexType = 'wdi_res_index';
211
 
212
 
213
  }
214
+
215
  if(imgItem.hasClass('wdi_full_caption')){
216
  caption.css('white-space','nowrap');
217
  imgItem.removeClass('wdi_full_caption');
218
+
219
+ //jQuery('body, html').animate({scrollTop:imgItem.attr('wdi_scroll_to')}, '500');
220
+ //console.log("showCaption")
221
  }else{
222
  caption.css('white-space','normal');
223
  imgItem.addClass('wdi_full_caption');
271
 
272
  }
273
 
274
+ wdi_responsive.showMasonryCaption = function(caption,currentFeedCounter){
275
+ var currentFeed = window["wdi_feed_" + currentFeedCounter];
276
+
277
  var imgItem = caption.parent().parent();
278
 
279
  if(imgItem.hasClass('wdi_full_caption')){
280
  caption.css('white-space','nowrap');
281
  imgItem.removeClass('wdi_full_caption');
282
+ //jQuery('body, html').animate({scrollTop:imgItem.attr('wdi_scroll_to')}, '500');
283
  }else{
284
  imgItem.attr('wdi_scroll_to',imgItem.offset().top-50);
285
  caption.css('white-space','normal');
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-instagram-feed-wd.html
4
  Tags: : custom instagram Feed, instagram, instagram account, instagram feed, instagram photos, instagram plugin, instagram posts, instagram stream, instagram wall, mobile instagram, responsive instagram, gallery, hashtag, images, photos, shortcode, widget ,Grid instagram view, instagram gallery, instagram images, instagram page, instagram plugin, instagram responsive, instagram touch, Instagram widgets, lightbox instagram, lightbox, feed
5
  Requires at least: 3.9
6
  Tested up to: 4.5
7
- Stable tag: 1.1.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -107,6 +107,12 @@ After downloading the ZIP file of the Instagram Feed WD plugin,
107
 
108
  == Changelog ==
109
 
 
 
 
 
 
 
110
  = 1.1.3 =
111
  New: French translation (Thanks to Guillaume Barjou)
112
  New: English US and UK translation files. Edit them to change default strings
4
  Tags: : custom instagram Feed, instagram, instagram account, instagram feed, instagram photos, instagram plugin, instagram posts, instagram stream, instagram wall, mobile instagram, responsive instagram, gallery, hashtag, images, photos, shortcode, widget ,Grid instagram view, instagram gallery, instagram images, instagram page, instagram plugin, instagram responsive, instagram touch, Instagram widgets, lightbox instagram, lightbox, feed
5
  Requires at least: 3.9
6
  Tested up to: 4.5
7
+ Stable tag: 1.1.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
107
 
108
  == Changelog ==
109
 
110
+ = 1.1.4 =
111
+ Fixed: Error handling in case of wrong access_token
112
+ Fixed: Image description not opening after pagination (Pro)
113
+ Fixed: Do not show load more button if feed media are finished
114
+ Fixed: Infinite scroll triggering bug (Pro)
115
+
116
  = 1.1.3 =
117
  New: French translation (Thanks to Guillaume Barjou)
118
  New: English US and UK translation files. Edit them to change default strings
wd-instagram-feed.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Instagram Feed WD
4
  Plugin URI: https://web-dorado.com/products/wordpress-instagram-feed-wd.html
5
  Description: WD Instagram Feed is a user-friendly tool for displaying user or hashtag-based feeds on your website. You can create feeds with one of the available layouts. It allows displaying image metadata, open up images in lightbox, download them and even share in social networking websites.
6
- Version: 1.1.3
7
  Author: WebDorado
8
  Author URI: https://web-dorado.com
9
  License: GPLv2 or later
@@ -20,7 +20,7 @@ define("WDI_META", "_".WDI_VAR."_meta");
20
  //define("wdi",'wdi');
21
  define('WDI_FEED_TABLE','wdi_feeds');
22
  define('WDI_THEME_TABLE','wdi_themes');
23
- define('WDI_VERSION','1.1.3');
24
  define('WDI_IS_PRO','false');
25
 
26
 
3
  Plugin Name: Instagram Feed WD
4
  Plugin URI: https://web-dorado.com/products/wordpress-instagram-feed-wd.html
5
  Description: WD Instagram Feed is a user-friendly tool for displaying user or hashtag-based feeds on your website. You can create feeds with one of the available layouts. It allows displaying image metadata, open up images in lightbox, download them and even share in social networking websites.
6
+ Version: 1.1.4
7
  Author: WebDorado
8
  Author URI: https://web-dorado.com
9
  License: GPLv2 or later
20
  //define("wdi",'wdi');
21
  define('WDI_FEED_TABLE','wdi_feeds');
22
  define('WDI_THEME_TABLE','wdi_themes');
23
+ define('WDI_VERSION','1.1.4');
24
  define('WDI_IS_PRO','false');
25
 
26