WD Instagram Feed – Instagram Gallery - Version 1.0.9

Version Description

Added: Option for displaying image loading buttons in widgets
Added: Permission for authors displaying instagram feeds on posts

Download this release

Release Info

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

Code changes from version 1.0.8 to 1.0.9

admin/controllers/WDIControllerWidget.php CHANGED
@@ -52,7 +52,9 @@ class WDIControllerWidget extends WP_Widget {
52
  parent::get_field_id('show_likes_comments'),
53
  parent::get_field_name('show_likes_comments'),
54
  parent::get_field_id('number_of_columns'),
55
- parent::get_field_name('number_of_columns')
 
 
56
  );
57
  }
58
 
@@ -63,6 +65,7 @@ class WDIControllerWidget extends WP_Widget {
63
  $instance['img_number'] = intval($new_instance['img_number']) ? intval($new_instance['img_number']) : 4;
64
  $instance['show_likes_comments'] = isset($new_instance['show_likes_comments']) ? 1 : 0;
65
  $instance['number_of_columns'] = intval($new_instance['number_of_columns']) ? intval($new_instance['number_of_columns']) : 1;
 
66
  return $instance;
67
  }
68
 
52
  parent::get_field_id('show_likes_comments'),
53
  parent::get_field_name('show_likes_comments'),
54
  parent::get_field_id('number_of_columns'),
55
+ parent::get_field_name('number_of_columns'),
56
+ parent::get_field_id('enable_loading_buttons'),
57
+ parent::get_field_name('enable_loading_buttons')
58
  );
59
  }
60
 
65
  $instance['img_number'] = intval($new_instance['img_number']) ? intval($new_instance['img_number']) : 4;
66
  $instance['show_likes_comments'] = isset($new_instance['show_likes_comments']) ? 1 : 0;
67
  $instance['number_of_columns'] = intval($new_instance['number_of_columns']) ? intval($new_instance['number_of_columns']) : 1;
68
+ $instance['enable_loading_buttons'] = isset($new_instance['enable_loading_buttons']) ? 1 : 0;
69
  return $instance;
70
  }
71
 
admin/views/WDIViewWidget.php CHANGED
@@ -32,6 +32,7 @@ class WDIViewWidget {
32
  $img_number = (isset($instance['img_number']) ? $instance['img_number'] : 2);
33
  $show_likes_comments = (isset($instance['show_likes_comments']) ? $instance['show_likes_comments'] : 0);
34
  $number_of_columns = (isset($instance['number_of_columns']) ? $instance['number_of_columns'] : 1);
 
35
  // Before widget.
36
  echo $before_widget;
37
  // Title of widget.
@@ -43,7 +44,8 @@ class WDIViewWidget {
43
  'widget' => true,
44
  'widget_image_num' => $img_number,
45
  'widget_show_likes_and_comments' => $show_likes_comments,
46
- 'number_of_columns'=>$number_of_columns
 
47
  );
48
  echo wdi_feed(array('id'=>$feed_id),$widget_params);
49
 
@@ -57,13 +59,15 @@ class WDIViewWidget {
57
  $id_feed_id, $name_feed_id,
58
  $id_img_number, $name_img_number,
59
  $id_show_likes_comments, $name_show_likes_comments,
60
- $id_number_of_columns,$name_number_of_columns) {
 
61
  $defaults = array(
62
  'title' => 'Instagram Feed',
63
  'feed_id' => $this->model->get_last_feed_id(),
64
  'img_number' => 4,
65
  'show_likes_comments' => 0,
66
- 'number_of_columns' => 1
 
67
  );
68
  require_once(WDI_DIR . '/framework/WDILibrary.php');
69
  $feeds = WDILibrary::objectToArray($this->model->get_feeds());
@@ -105,6 +109,10 @@ class WDIViewWidget {
105
  <input <?php if($instance['show_likes_comments']=='1') echo "checked"?> class="widefat" id="<?php echo $id_show_likes_comments; ?>" name="<?php echo $name_show_likes_comments; ?>'" type="checkbox" value="<?php echo $instance['show_likes_comments']; ?>"/>
106
  <label for="<?php echo $id_show_likes_comments; ?>">Show likes and comments</label>
107
  </p>
 
 
 
 
108
  <script>
109
  jQuery(document).ready(function(){
110
  wdi_toggle(jQuery('#<?php echo $id_feed_id; ?>'));
32
  $img_number = (isset($instance['img_number']) ? $instance['img_number'] : 2);
33
  $show_likes_comments = (isset($instance['show_likes_comments']) ? $instance['show_likes_comments'] : 0);
34
  $number_of_columns = (isset($instance['number_of_columns']) ? $instance['number_of_columns'] : 1);
35
+ $enable_loading_buttons = (isset($instance['enable_loading_buttons']) ? $instance['enable_loading_buttons'] : 0);
36
  // Before widget.
37
  echo $before_widget;
38
  // Title of widget.
44
  'widget' => true,
45
  'widget_image_num' => $img_number,
46
  'widget_show_likes_and_comments' => $show_likes_comments,
47
+ 'number_of_columns'=>$number_of_columns,
48
+ 'enable_loading_buttons' => $enable_loading_buttons,
49
  );
50
  echo wdi_feed(array('id'=>$feed_id),$widget_params);
51
 
59
  $id_feed_id, $name_feed_id,
60
  $id_img_number, $name_img_number,
61
  $id_show_likes_comments, $name_show_likes_comments,
62
+ $id_number_of_columns,$name_number_of_columns,
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,
70
+ 'enable_loading_buttons' => 0
71
  );
72
  require_once(WDI_DIR . '/framework/WDILibrary.php');
73
  $feeds = WDILibrary::objectToArray($this->model->get_feeds());
109
  <input <?php if($instance['show_likes_comments']=='1') echo "checked"?> class="widefat" id="<?php echo $id_show_likes_comments; ?>" name="<?php echo $name_show_likes_comments; ?>'" type="checkbox" value="<?php echo $instance['show_likes_comments']; ?>"/>
110
  <label for="<?php echo $id_show_likes_comments; ?>">Show likes and comments</label>
111
  </p>
112
+ <p>
113
+ <input <?php if($instance['enable_loading_buttons']=='1') echo "checked"?> class="widefat" id="<?php echo $id_enable_loading_buttons; ?>" name="<?php echo $name_enable_loading_buttons; ?>'" type="checkbox" value="<?php echo $instance['enable_loading_buttons']; ?>"/>
114
+ <label for="<?php echo $id_enable_loading_buttons; ?>">Enable loading new images</label>
115
+ </p>
116
  <script>
117
  jQuery(document).ready(function(){
118
  wdi_toggle(jQuery('#<?php echo $id_feed_id; ?>'));
frontend/shortcode.php CHANGED
@@ -61,8 +61,11 @@ function wdi_feed($atts,$widget_params='') {
61
  $feed_row['show_usernames'] = '0';
62
  $feed_row['display_header'] = '0';
63
  $feed_row['show_description'] = '0';
64
- $feed_row['feed_display_view'] = 'widget';
65
  $feed_row['number_of_columns'] = (string)$widget_params['number_of_columns'];
 
 
 
 
66
  }
67
 
68
  if(isset($feed_row['published']) && $feed_row['published']=== '0'){
61
  $feed_row['show_usernames'] = '0';
62
  $feed_row['display_header'] = '0';
63
  $feed_row['show_description'] = '0';
 
64
  $feed_row['number_of_columns'] = (string)$widget_params['number_of_columns'];
65
+
66
+ if($widget_params['enable_loading_buttons'] == 0){
67
+ $feed_row['feed_display_view'] = 'widget';
68
+ }
69
  }
70
 
71
  if(isset($feed_row['published']) && $feed_row['published']=== '0'){
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.4
7
- Stable tag: 1.0.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -105,6 +105,10 @@ After downloading the ZIP file of the Instagram Feed WD plugin,
105
 
106
  == Changelog ==
107
 
 
 
 
 
108
  = 1.0.8 =
109
  Fixed: Infinite Scroll bug
110
  Changed: Show videos play button when redirect is enabled
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.4
7
+ Stable tag: 1.0.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
105
 
106
  == Changelog ==
107
 
108
+ = 1.0.9 =
109
+ Added: Option for displaying image loading buttons in widgets
110
+ Added: Permission for authors displaying instagram feeds on posts
111
+
112
  = 1.0.8 =
113
  Fixed: Infinite Scroll bug
114
  Changed: Show videos play button when redirect is enabled
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.0.8
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.0.8');
24
  define('WDI_IS_PRO','false');
25
 
26
 
@@ -312,7 +312,7 @@ add_action("wp_ajax_WDIEditorShortcode",'wdi_editor_button');
312
 
313
  function wdi_editor_button(){
314
  if (function_exists('current_user_can')) {
315
- if (!current_user_can('manage_options')) {
316
  die('Access Denied');
317
  }
318
  }
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.0.9
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.0.9');
24
  define('WDI_IS_PRO','false');
25
 
26
 
312
 
313
  function wdi_editor_button(){
314
  if (function_exists('current_user_can')) {
315
+ if (!current_user_can('publish_posts')) {
316
  die('Access Denied');
317
  }
318
  }