WD Instagram Feed – Instagram Gallery - Version 1.1.29

Version Description

Fixed: Display only published feeds in feeds selector popup for shortcode
Changed: UX improvement - no error message when user first inserts a widget then creates feeds

Download this release

Release Info

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

Code changes from version 1.1.28 to 1.1.29

admin/models/WDIModelEditorShortcode.php CHANGED
@@ -21,10 +21,16 @@ class WDIModelEditorShortcode {
21
 
22
  public function get_row_data() {
23
  global $wpdb;
24
- $row = $wpdb->get_results("SELECT id, feed_name, feed_thumb FROM " . $wpdb->prefix . WDI_FEED_TABLE." ORDER BY `feed_name` ASC");
25
  return $row;
26
  }
27
 
 
 
 
 
 
 
28
  ////////////////////////////////////////////////////////////////////////////////////////
29
  // Getters & Setters //
30
  ////////////////////////////////////////////////////////////////////////////////////////
21
 
22
  public function get_row_data() {
23
  global $wpdb;
24
+ $row = $wpdb->get_results("SELECT id, feed_name, feed_thumb FROM " . $wpdb->prefix . WDI_FEED_TABLE." WHERE published=1 ORDER BY `feed_name` ASC");
25
  return $row;
26
  }
27
 
28
+ public function get_first_feed_id(){
29
+ global $wpdb;
30
+ $min_id = $wpdb->get_var('SELECT MIN(id) FROM ' . $wpdb->prefix . WDI_FEED_TABLE.' WHERE published=1');
31
+ return $min_id;
32
+ }
33
+
34
  ////////////////////////////////////////////////////////////////////////////////////////
35
  // Getters & Setters //
36
  ////////////////////////////////////////////////////////////////////////////////////////
admin/models/WDIModelWidget.php CHANGED
@@ -25,13 +25,9 @@ class WDIModelWidget {
25
  $rows = $wpdb->get_results($query);
26
  return $rows;
27
  }
28
- public function get_last_feed_id(){
29
- global $wpdb;
30
- $max_id = $wpdb->get_var('SELECT MAX(id) FROM ' . $wpdb->prefix . WDI_THEME_TABLE);
31
- return $max_id;
32
- }
33
 
34
-
 
35
 
36
  ////////////////////////////////////////////////////////////////////////////////////////
37
  // Getters & Setters //
25
  $rows = $wpdb->get_results($query);
26
  return $rows;
27
  }
 
 
 
 
 
28
 
29
+
30
+
31
 
32
  ////////////////////////////////////////////////////////////////////////////////////////
33
  // Getters & Setters //
admin/views/WDIViewEditorShortcode.php CHANGED
@@ -36,7 +36,6 @@ class WDIViewEditorShortcode {
36
  width: 200px;
37
  padding: 5px;
38
  font-size: 14px;
39
- line-height: 1;
40
  color:rgb(68, 68, 68);
41
  border-radius: 0;
42
  height: 34px;
36
  width: 200px;
37
  padding: 5px;
38
  font-size: 14px;
 
39
  color:rgb(68, 68, 68);
40
  border-radius: 0;
41
  height: 34px;
admin/views/WDIViewWidget.php CHANGED
@@ -63,7 +63,7 @@ class WDIViewWidget {
63
  $id_enable_loading_buttons, $name_enable_loading_buttons) {
64
  $defaults = array(
65
  'title' => 'Instagram Feed',
66
- 'feed_id' => $this->model->get_last_feed_id(),
67
  'img_number' => 4,
68
  'show_likes_comments' => 0,
69
  'number_of_columns' => 1,
63
  $id_enable_loading_buttons, $name_enable_loading_buttons) {
64
  $defaults = array(
65
  'title' => 'Instagram Feed',
66
+ 'feed_id' => 1,
67
  'img_number' => 4,
68
  'show_likes_comments' => 0,
69
  'number_of_columns' => 1,
frontend/shortcode.php CHANGED
@@ -43,8 +43,20 @@ function wdi_feed($atts, $widget_params = '')
43
  'id' => 'no_id',
44
  ), $atts);
45
  if ($attributes['id'] == 'no_id') {
46
- ob_get_clean();
47
- return __('Invalid shortcode', "wd-instagram-feed");
 
 
 
 
 
 
 
 
 
 
 
 
48
  }
49
 
50
 
43
  'id' => 'no_id',
44
  ), $atts);
45
  if ($attributes['id'] == 'no_id') {
46
+ //including feed model
47
+ require_once(WDI_DIR . '/admin/models/WDIModelEditorShortcode.php');
48
+ $shortcode_feeds_model = new WDIModelEditorShortcode();
49
+ /*if there are feeds select first one*/
50
+ $first_feed_id = $shortcode_feeds_model->get_first_feed_id();
51
+
52
+ $attributes['id'] = isset($first_feed_id) ? $first_feed_id : $attributes['id'];
53
+
54
+ if($attributes['id'] == 'no_id'){
55
+ ob_get_clean();
56
+ return __('No feed. Create and publish a feed to display it.', "wd-instagram-feed");
57
+ }
58
+ /*else continue*/
59
+
60
  }
61
 
62
 
frontend/views/WDIViewThumbnails_view.php CHANGED
@@ -338,7 +338,7 @@ public function generate_feed_styles($feed_row){
338
  height:auto;
339
  }
340
  #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_shape_landscape .wdi_img{
341
- height: 100%;
342
  width:auto;
343
  }
344
  #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item{
338
  height:auto;
339
  }
340
  #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_shape_landscape .wdi_img{
341
+ height: 100% !important; /*overwrite some themes styles*/
342
  width:auto;
343
  }
344
  #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item{
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, lightbox, photos,instagram account
5
  Requires at least: 3.9
6
  Tested up to: 4.7
7
- Stable tag: 1.1.28
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -15,9 +15,9 @@ Instagram Feed WD is a user-friendly plugin to display user or hashtag-based Ins
15
  [WordPress WD Instagram Feed ](https://web-dorado.com/products/wordpress-instagram-feed-wd.html)
16
  [Demo](http://wpdemo.web-dorado.com/instagram-wd/)
17
  [User Guide](https://web-dorado.com/wordpress-instagram-feed-wd/installation-and-configuration/installation.html)
18
- [Support Forum](https://web-dorado.com/forum/wordpress-instagram-feed-wd.html)
19
-
20
- https://www.youtube.com/watch?v=ijdrpkVAfEw
21
 
22
  Are you looking for a free Instagram feed plugin for WordPress ? Do you want to show Instagram posts, photos and images on your WordPress website? Do you want a simple integration, responsive Instagram gallery, beautiful and custom-styled feeds?
23
  Instagram Feed WD is the best Instagram plugin for WordPress to go with. It is a simple Instagram plugin that comes with a user-friendly management and easy setup, and lets you embed custom Instagram feeds of hashtags and users to your website in just a couple of minutes. You can embed Instagram galleries and entire timelines to your posts using a shortcode or using the plugin’s Instagram widget on your sidebar. You don’t need to install Instagram widget, or add any Instagram code. 0ur plugin comes with a free Instagram widget letting you display Instagram social feeds, photos, images as well as Instagram video feeds.
@@ -110,6 +110,10 @@ After downloading the ZIP file of the Instagram Feed WD plugin,
110
 
111
  == Changelog ==
112
 
 
 
 
 
113
  = 1.1.28 =
114
  Fixed: Conflict with some themes
115
 
4
  Tags: custom instagram feed, feed, instagram, hashtag, Instagram feed, instagram gallery, instagram posts, Instagram images, Instagram photos, lightbox, photos,instagram account
5
  Requires at least: 3.9
6
  Tested up to: 4.7
7
+ Stable tag: 1.1.29
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
15
  [WordPress WD Instagram Feed ](https://web-dorado.com/products/wordpress-instagram-feed-wd.html)
16
  [Demo](http://wpdemo.web-dorado.com/instagram-wd/)
17
  [User Guide](https://web-dorado.com/wordpress-instagram-feed-wd/installation-and-configuration/installation.html)
18
+ [Support Forum](https://web-dorado.com/forum/wordpress-instagram-feed-wd.html)
19
+
20
+ https://www.youtube.com/watch?v=KU4LJFxw0BY
21
 
22
  Are you looking for a free Instagram feed plugin for WordPress ? Do you want to show Instagram posts, photos and images on your WordPress website? Do you want a simple integration, responsive Instagram gallery, beautiful and custom-styled feeds?
23
  Instagram Feed WD is the best Instagram plugin for WordPress to go with. It is a simple Instagram plugin that comes with a user-friendly management and easy setup, and lets you embed custom Instagram feeds of hashtags and users to your website in just a couple of minutes. You can embed Instagram galleries and entire timelines to your posts using a shortcode or using the plugin’s Instagram widget on your sidebar. You don’t need to install Instagram widget, or add any Instagram code. 0ur plugin comes with a free Instagram widget letting you display Instagram social feeds, photos, images as well as Instagram video feeds.
110
 
111
  == Changelog ==
112
 
113
+ = 1.1.29 =
114
+ Fixed: Display only published feeds in feeds selector popup for shortcode
115
+ Changed: UX improvement - no error message when user first inserts a widget then creates feeds
116
+
117
  = 1.1.28 =
118
  Fixed: Conflict with some themes
119
 
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.28
7
  Author: WebDorado
8
  Author URI: https://web-dorado.com
9
  License: GPLv2 or later
@@ -21,7 +21,7 @@ define("WDI_META", "_".WDI_VAR."_meta");
21
  //define("wdi",'wdi');
22
  define('WDI_FEED_TABLE','wdi_feeds');
23
  define('WDI_THEME_TABLE','wdi_themes');
24
- define('WDI_VERSION','1.1.28');
25
  define('WDI_IS_PRO','false');
26
 
27
 
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.29
7
  Author: WebDorado
8
  Author URI: https://web-dorado.com
9
  License: GPLv2 or later
21
  //define("wdi",'wdi');
22
  define('WDI_FEED_TABLE','wdi_feeds');
23
  define('WDI_THEME_TABLE','wdi_themes');
24
+ define('WDI_VERSION','1.1.29');
25
  define('WDI_IS_PRO','false');
26
 
27