Instagram Gallery - Version 2.6.1

Version Description

  • Fix. small CSS fixes
Download this release

Release Info

Developer quadlayers
Plugin Icon 128x128 Instagram Gallery
Version 2.6.1
Comparing to
See all releases

Code changes from version 2.6.0 to 2.6.1

Files changed (4) hide show
  1. includes/utis.php +2 -2
  2. includes/widget.php +15 -11
  3. insta-gallery.php +2 -2
  4. readme.txt +4 -1
includes/utis.php CHANGED
@@ -66,8 +66,8 @@ function qligg_get_tag_profile($tag = null) {
66
 
67
  $defaults = array(
68
  'id' => '',
69
- 'user' => 'nousername',
70
- 'name' => esc_html__('Something went wrong, remove this token', 'insta-gallery'),
71
  'picture' => 'http://2.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?s=96&d=mm&r=g',
72
  'link' => ''
73
  );
66
 
67
  $defaults = array(
68
  'id' => '',
69
+ 'user' => 'notag',
70
+ 'name' => esc_html__('Something went wrong, remove this this tag', 'insta-gallery'),
71
  'picture' => 'http://2.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?s=96&d=mm&r=g',
72
  'link' => ''
73
  );
includes/widget.php CHANGED
@@ -36,35 +36,39 @@ class QLIGG_Widget extends WP_Widget {
36
 
37
  $title = $instance['title'];
38
  $instagal_id = $instance['instagal_id'];
39
- $InstaGalleryItems = get_option('insta_gallery_items');
40
  ?>
41
  <p>
42
  <label for="<?php echo esc_attr($this->get_field_id('title')); ?>"><?php esc_html_e('Title', 'insta-gallery'); ?>: <input class="widefat" id="<?php echo esc_attr($this->get_field_id('title')); ?>" name="<?php echo esc_attr($this->get_field_name('title')); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></label>
43
  </p>
44
- <?php if (!empty($InstaGalleryItems) && is_array($InstaGalleryItems)): ?>
45
  <p>
46
  <label for="<?php echo esc_attr($this->get_field_id('instagal_id')); ?>"><?php esc_html_e('Select your Instagram gallery', 'insta-gallery'); ?>: </label> <select
47
  id="<?php echo esc_attr($this->get_field_id('instagal_id')); ?>" name="<?php echo esc_attr($this->get_field_name('instagal_id')); ?>" class="widefat">
48
  <?php
49
- foreach ($InstaGalleryItems as $k => $IGItem) {
50
- $label = '';
51
- if ($IGItem['insta_source'] == 'username') {
52
- $label = esc_html__('Username', 'insta-gallery') . ' / ' . $IGItem['insta_username'];
53
- } else {
54
- $label = esc_html__('Tagname', 'insta-gallery') . ' / ' . $IGItem['insta_tag'];
 
 
55
  }
 
 
56
  ?>
57
- <option value="<?php echo esc_html($k); ?>" <?php selected($k, $instagal_id) ?>><?php echo esc_html($label); ?></option>
58
  <?php } ?>
59
  </select>
60
  </p>
61
  <?php else: ?>
62
  <p style="color: #e23565;">
63
- <?php esc_html_e('Please add Gallery item in plugin panel, Then come back and select your Gallery to display.', 'insta-gallery'); ?>
64
  </p>
65
  <?php endif; ?>
66
  <p style="text-align: center;" >
67
- <a href="<?php echo admin_url('admin.php?page=qligg'); ?>"><?php esc_html_e('Add New Gallery', 'insta-gallery'); ?></a>
68
  </p>
69
  <?php
70
  }
36
 
37
  $title = $instance['title'];
38
  $instagal_id = $instance['instagal_id'];
39
+ $instagram_feeds = get_option('insta_gallery_items');
40
  ?>
41
  <p>
42
  <label for="<?php echo esc_attr($this->get_field_id('title')); ?>"><?php esc_html_e('Title', 'insta-gallery'); ?>: <input class="widefat" id="<?php echo esc_attr($this->get_field_id('title')); ?>" name="<?php echo esc_attr($this->get_field_name('title')); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></label>
43
  </p>
44
+ <?php if (!empty($instagram_feeds) && is_array($instagram_feeds)): ?>
45
  <p>
46
  <label for="<?php echo esc_attr($this->get_field_id('instagal_id')); ?>"><?php esc_html_e('Select your Instagram gallery', 'insta-gallery'); ?>: </label> <select
47
  id="<?php echo esc_attr($this->get_field_id('instagal_id')); ?>" name="<?php echo esc_attr($this->get_field_name('instagal_id')); ?>" class="widefat">
48
  <?php
49
+ foreach ($instagram_feeds as $id => $instagram_feed) {
50
+
51
+ if (isset($instagram_feed['insta_source'])) {
52
+ if ($instagram_feed['insta_source'] == 'username') {
53
+ $profile_info = qligg_get_user_profile($instagram_feed['insta_username']);
54
+ } else {
55
+ $profile_info = qligg_get_tag_profile($instagram_feed['insta_tag']);
56
+ }
57
  }
58
+
59
+ $label = sprintf('%s: %s', sprintf(esc_html__('Feed %s', 'insta-gallery'), $id), $profile_info['name']);
60
  ?>
61
+ <option value="<?php echo esc_html($id); ?>" <?php selected($id, $instagal_id) ?>><?php echo esc_html($label); ?></option>
62
  <?php } ?>
63
  </select>
64
  </p>
65
  <?php else: ?>
66
  <p style="color: #e23565;">
67
+ <?php esc_html_e('Please add new gallery in plugin admin panel, then come back and select your gallery to here.', 'insta-gallery'); ?>
68
  </p>
69
  <?php endif; ?>
70
  <p style="text-align: center;" >
71
+ <a target="_blank" href="<?php echo admin_url('admin.php?page=qligg_feeds'); ?>"><?php esc_html_e('Add New Gallery', 'insta-gallery'); ?></a>
72
  </p>
73
  <?php
74
  }
insta-gallery.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Instagram Feed Gallery
4
  * Plugin URI: https://quadlayers.com/portfolio/instagram-gallery/
5
  * Description: Display beautifull and responsive galleries on your website from your Instagram feed account.
6
- * Version: 2.6.0
7
  * Author: Quadlayers
8
  * Author URI: https://quadlayers.com
9
  * License: GPL-2.0+
@@ -18,7 +18,7 @@ if (!defined('QLIGG_PLUGIN_NAME')) {
18
  define('QLIGG_PLUGIN_NAME', 'Instagram Feed Gallery');
19
  }
20
  if (!defined('QLIGG_PLUGIN_VERSION')) {
21
- define('QLIGG_PLUGIN_VERSION', '2.6.0');
22
  }
23
  if (!defined('QLIGG_PLUGIN_FILE')) {
24
  define('QLIGG_PLUGIN_FILE', __FILE__);
3
  * Plugin Name: Instagram Feed Gallery
4
  * Plugin URI: https://quadlayers.com/portfolio/instagram-gallery/
5
  * Description: Display beautifull and responsive galleries on your website from your Instagram feed account.
6
+ * Version: 2.6.1
7
  * Author: Quadlayers
8
  * Author URI: https://quadlayers.com
9
  * License: GPL-2.0+
18
  define('QLIGG_PLUGIN_NAME', 'Instagram Feed Gallery');
19
  }
20
  if (!defined('QLIGG_PLUGIN_VERSION')) {
21
+ define('QLIGG_PLUGIN_VERSION', '2.6.1');
22
  }
23
  if (!defined('QLIGG_PLUGIN_FILE')) {
24
  define('QLIGG_PLUGIN_FILE', __FILE__);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://quadlayers.com/portfolio/instagram-gallery/
4
  Tags: instagram, instagram feed, instagram widget, instagram gallery, instagram pictures, gallery widget, pictures, carousel slider, image gallery, image slider
5
  Requires at least: 4.6
6
  Tested up to: 5.2.2
7
- Stable tag: 2.6.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -91,6 +91,9 @@ There may be some other plugins(like: fancybox, elementor) which also uses image
91
 
92
  == Changelog ==
93
 
 
 
 
94
  = 2.6.0 =
95
  * Fix. small CSS fixes
96
 
4
  Tags: instagram, instagram feed, instagram widget, instagram gallery, instagram pictures, gallery widget, pictures, carousel slider, image gallery, image slider
5
  Requires at least: 4.6
6
  Tested up to: 5.2.2
7
+ Stable tag: 2.6.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
91
 
92
  == Changelog ==
93
 
94
+ = 2.6.1 =
95
+ * Fix. small CSS fixes
96
+
97
  = 2.6.0 =
98
  * Fix. small CSS fixes
99