WD Instagram Feed – Instagram Gallery - Version 1.1.23

Version Description

Fixed: cropping of "landscape" images in thumbnails layout

Download this release

Release Info

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

Code changes from version 1.1.22 to 1.1.23

admin/models/WDIModelFeeds_wdi.php CHANGED
@@ -91,7 +91,7 @@ class WDIModelFeeds_wdi {
91
  'display_header'=> '0',
92
  'number_of_photos'=> '20',
93
  'load_more_number' => '4',
94
- 'pagination_per_page_number'=>'10',
95
  'pagination_preload_number'=>'10',
96
  'image_browser_preload_number'=>'10',
97
  'image_browser_load_number'=>'10',
91
  'display_header'=> '0',
92
  'number_of_photos'=> '20',
93
  'load_more_number' => '4',
94
+ 'pagination_per_page_number'=>'12',
95
  'pagination_preload_number'=>'10',
96
  'image_browser_preload_number'=>'10',
97
  'image_browser_load_number'=>'10',
frontend/shortcode.php CHANGED
@@ -170,9 +170,9 @@ function wdi_load_frontend_scripts()
170
 
171
  function wdi_load_frontend_styles()
172
  {
173
- wp_register_style('wdi_frontend_thumbnails', plugins_url('../css/wdi_frontend.css', __FILE__));
174
  wp_enqueue_style('wdi_frontend_thumbnails');
175
- wp_register_style('font-awesome', plugins_url('../css/font-awesome/css/font-awesome.css', __FILE__));
176
  wp_enqueue_style('font-awesome');
177
  }
178
 
170
 
171
  function wdi_load_frontend_styles()
172
  {
173
+ wp_register_style('wdi_frontend_thumbnails', plugins_url('../css/wdi_frontend.css', __FILE__), array(), WDI_VERSION);
174
  wp_enqueue_style('wdi_frontend_thumbnails');
175
+ wp_register_style('font-awesome', plugins_url('../css/font-awesome/css/font-awesome.css', __FILE__), array(), WDI_VERSION);
176
  wp_enqueue_style('font-awesome');
177
  }
178
 
frontend/views/WDIViewThumbnails_view.php CHANGED
@@ -319,14 +319,25 @@ public function generate_feed_styles($feed_row){
319
  height: 100%;
320
  }
321
  #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_img{
322
- width: 100%;
323
  display: block;
324
  position: absolute;
325
- top: 0;
326
- left: 0;
327
- right: 0;
328
- bottom: 0;
329
- margin: auto;
 
 
 
 
 
 
 
 
 
 
 
 
330
  }
331
  #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item{
332
  width: <?php echo $colNum.'%'?>;/*thumbnail_size*/
319
  height: 100%;
320
  }
321
  #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_img{
 
322
  display: block;
323
  position: absolute;
324
+ top: 50%;
325
+ left: 50%;
326
+ max-width:none;
327
+ -webkit-transform: translateX(-50%) translateY(-50%);
328
+ -moz-transform: translateX(-50%) translateY(-50%);
329
+ -ms-transform: translateX(-50%) translateY(-50%);
330
+ -o-transform: translateX(-50%) translateY(-50%);
331
+ transform: translateX(-50%) translateY(-50%);
332
+ }
333
+ #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_shape_portrait .wdi_img,
334
+ #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_shape_square .wdi_img{
335
+ width: 100%;
336
+ height:auto;
337
+ }
338
+ #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_shape_landscape .wdi_img{
339
+ height: 100%;
340
+ width:auto;
341
  }
342
  #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item{
343
  width: <?php echo $colNum.'%'?>;/*thumbnail_size*/
js/wdi_frontend.js CHANGED
@@ -1296,6 +1296,15 @@ wdi_front.createObject = function (obj, currentFeed)
1296
 
1297
  var imageIndex = currentFeed.imageIndex;
1298
 
 
 
 
 
 
 
 
 
 
1299
  var photoObject = {
1300
  'id': obj['id'],
1301
  'caption': caption,
@@ -1307,7 +1316,8 @@ wdi_front.createObject = function (obj, currentFeed)
1307
  'wdi_media_user': obj['user']['username'],
1308
  'link': obj['link'],
1309
  'video_url': videoUrl,
1310
- 'wdi_username': obj['user']['username']
 
1311
  };
1312
  return photoObject;
1313
  }
@@ -1404,11 +1414,13 @@ wdi_front.getPhotoTemplate = function (currentFeed)
1404
  thumbClass = '';
1405
  }
1406
  }
 
 
1407
  var wdi_feed_counter = currentFeed.feed_row['wdi_feed_counter'];
1408
  var source = '<div class="wdi_feed_item ' + customClass + '" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> ' + pagination + ' wdi_type="image" id="wdi_' + wdi_feed_counter + '_<%=id%>">' +
1409
  '<div class="wdi_photo_wrap">' +
1410
  '<div class="wdi_photo_wrap_inner">' +
1411
- '<div class="wdi_photo_img">' +
1412
  '<img class="wdi_img" ' + sourceAttr + '="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);">' +
1413
  '<div class="wdi_photo_overlay ' + overlayCustomClass + '" >' + showUsernameOnThumb +
1414
  '<div class="wdi_thumb_icon" ' + onclick + ' style="display:table;width:100%;height:100%;">' +
@@ -1512,11 +1524,13 @@ wdi_front.getSliderTemplate = function (currentFeed)
1512
  thumbClass = '';
1513
  }
1514
  }
 
 
1515
  var wdi_feed_counter = currentFeed.feed_row['wdi_feed_counter'];
1516
  var source = '<div class="wdi_feed_item ' + customClass + '" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> ' + pagination + ' wdi_type="slideshow" id="wdi_' + wdi_feed_counter + '_<%=id%>">' +
1517
  '<div class="wdi_photo_wrap">' +
1518
  '<div class="wdi_photo_wrap_inner">' +
1519
- '<div class="wdi_photo_img">' +
1520
  '<img class="wdi_img" ' + sourceAttr + '="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);">' +
1521
  '<div class="wdi_photo_overlay ' + overlayCustomClass + '" >' + showUsernameOnThumb +
1522
  '<div class="wdi_thumb_icon" ' + onclick + ' style="display:table;width:100%;height:100%;">' +
@@ -1631,13 +1645,13 @@ wdi_front.getVideoTemplate = function (currentFeed)
1631
  }
1632
  }
1633
  }
1634
-
1635
 
1636
  var wdi_feed_counter = currentFeed.feed_row['wdi_feed_counter'];
1637
  var source = '<div class="wdi_feed_item ' + customClass + '" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> ' + pagination + ' wdi_type="image" id="wdi_' + wdi_feed_counter + '_<%=id%>">' +
1638
  '<div class="wdi_photo_wrap">' +
1639
  '<div class="wdi_photo_wrap_inner">' +
1640
- '<div class="wdi_photo_img">' +
1641
  '<img class="wdi_img" ' + sourceAttr + '="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);">' +
1642
  '<div class="wdi_photo_overlay ' + overlayCustomClass + '" ' + onclick + '>' + showUsernameOnThumb +
1643
  '<div class="wdi_thumb_icon" style="display:table;width:100%;height:100%;">' +
1296
 
1297
  var imageIndex = currentFeed.imageIndex;
1298
 
1299
+ var wdi_shape = 'square';
1300
+ var media_standard_h = obj['images']['standard_resolution']['height'];
1301
+ var media_standard_w = obj['images']['standard_resolution']['width'];
1302
+ if(media_standard_h > media_standard_w){
1303
+ wdi_shape = 'portrait';
1304
+ }
1305
+ else if(media_standard_h < media_standard_w){
1306
+ wdi_shape = 'landscape';
1307
+ }
1308
  var photoObject = {
1309
  'id': obj['id'],
1310
  'caption': caption,
1316
  'wdi_media_user': obj['user']['username'],
1317
  'link': obj['link'],
1318
  'video_url': videoUrl,
1319
+ 'wdi_username': obj['user']['username'],
1320
+ 'wdi_shape': wdi_shape
1321
  };
1322
  return photoObject;
1323
  }
1414
  thumbClass = '';
1415
  }
1416
  }
1417
+
1418
+ var wdi_shape_class = "<%= wdi_shape == 'square' ? 'wdi_shape_square' : (wdi_shape == 'portrait' ? 'wdi_shape_portrait' : (wdi_shape == 'landscape' ? 'wdi_shape_landscape' : 'wdi_shape_square') ) %>";
1419
  var wdi_feed_counter = currentFeed.feed_row['wdi_feed_counter'];
1420
  var source = '<div class="wdi_feed_item ' + customClass + '" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> ' + pagination + ' wdi_type="image" id="wdi_' + wdi_feed_counter + '_<%=id%>">' +
1421
  '<div class="wdi_photo_wrap">' +
1422
  '<div class="wdi_photo_wrap_inner">' +
1423
+ '<div class="wdi_photo_img ' + wdi_shape_class + '">' +
1424
  '<img class="wdi_img" ' + sourceAttr + '="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);">' +
1425
  '<div class="wdi_photo_overlay ' + overlayCustomClass + '" >' + showUsernameOnThumb +
1426
  '<div class="wdi_thumb_icon" ' + onclick + ' style="display:table;width:100%;height:100%;">' +
1524
  thumbClass = '';
1525
  }
1526
  }
1527
+
1528
+ var wdi_shape_class = "<%= wdi_shape == 'square' ? 'wdi_shape_square' : (wdi_shape == 'portrait' ? 'wdi_shape_portrait' : (wdi_shape == 'landscape' ? 'wdi_shape_landscape' : 'wdi_shape_square') ) %>";
1529
  var wdi_feed_counter = currentFeed.feed_row['wdi_feed_counter'];
1530
  var source = '<div class="wdi_feed_item ' + customClass + '" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> ' + pagination + ' wdi_type="slideshow" id="wdi_' + wdi_feed_counter + '_<%=id%>">' +
1531
  '<div class="wdi_photo_wrap">' +
1532
  '<div class="wdi_photo_wrap_inner">' +
1533
+ '<div class="wdi_photo_img ' + wdi_shape_class + '">' +
1534
  '<img class="wdi_img" ' + sourceAttr + '="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);">' +
1535
  '<div class="wdi_photo_overlay ' + overlayCustomClass + '" >' + showUsernameOnThumb +
1536
  '<div class="wdi_thumb_icon" ' + onclick + ' style="display:table;width:100%;height:100%;">' +
1645
  }
1646
  }
1647
  }
1648
+ var wdi_shape_class = "<%= wdi_shape == 'square' ? 'wdi_shape_square' : (wdi_shape == 'portrait' ? 'wdi_shape_portrait' : (wdi_shape == 'landscape' ? 'wdi_shape_landscape' : 'wdi_shape_square') ) %>";
1649
 
1650
  var wdi_feed_counter = currentFeed.feed_row['wdi_feed_counter'];
1651
  var source = '<div class="wdi_feed_item ' + customClass + '" wdi_index=<%= wdi_index%> wdi_res_index=<%= wdi_res_index%> wdi_media_user=<%= wdi_media_user%> ' + pagination + ' wdi_type="image" id="wdi_' + wdi_feed_counter + '_<%=id%>">' +
1652
  '<div class="wdi_photo_wrap">' +
1653
  '<div class="wdi_photo_wrap_inner">' +
1654
+ '<div class="wdi_photo_img ' +wdi_shape_class + '">' +
1655
  '<img class="wdi_img" ' + sourceAttr + '="<%=image_url%>" alt="feed_image" onerror="wdi_front.brokenImageHandler(this);">' +
1656
  '<div class="wdi_photo_overlay ' + overlayCustomClass + '" ' + onclick + '>' + showUsernameOnThumb +
1657
  '<div class="wdi_thumb_icon" style="display:table;width:100%;height:100%;">' +
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-instagram-feed-wd.html
4
  Tags: : custom instagram feed, feed, instagram, hashtag, Instagram feed, instagram gallery, instagram posts, Instagram images, Instagram photos, Instagram wall, lightbox, photos
5
  Requires at least: 3.9
6
  Tested up to: 4.7
7
- Stable tag: 1.1.22
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -107,6 +107,9 @@ After downloading the ZIP file of the Instagram Feed WD plugin,
107
 
108
  == Changelog ==
109
 
 
 
 
110
  = 1.1.22 =
111
  New: message displayed on frontend if feed has no media
112
  Fixed: JS errors for media with Instagram's new "Slideshow" feature. This feature is not supported by Instagram's API yet.
4
  Tags: : custom instagram feed, feed, instagram, hashtag, Instagram feed, instagram gallery, instagram posts, Instagram images, Instagram photos, Instagram wall, lightbox, photos
5
  Requires at least: 3.9
6
  Tested up to: 4.7
7
+ Stable tag: 1.1.23
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.23 =
111
+ Fixed: cropping of "landscape" images in thumbnails layout
112
+
113
  = 1.1.22 =
114
  New: message displayed on frontend if feed has no media
115
  Fixed: JS errors for media with Instagram's new "Slideshow" feature. This feature is not supported by Instagram's API yet.
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.22
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.22');
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.23
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.23');
24
  define('WDI_IS_PRO','false');
25
 
26