WD Instagram Feed – Instagram Gallery - Version 1.2.2

Version Description

New: Redirection to custom URL

Download this release

Release Info

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

Code changes from version 1.2.1 to 1.2.2

admin-functions.php CHANGED
@@ -173,6 +173,7 @@ function wdi_install()
173
  conditional_filter_enable varchar(1) NOT NULL,
174
  liked_feed varchar(30) NOT NULL,
175
  mobile_breakpoint varchar(10) NOT NULL,
 
176
 
177
  UNIQUE KEY id (id)
178
  ) $charset_collate;";
173
  conditional_filter_enable varchar(1) NOT NULL,
174
  liked_feed varchar(30) NOT NULL,
175
  mobile_breakpoint varchar(10) NOT NULL,
176
+ redirect_url varchar(255) NOT NULL,
177
 
178
  UNIQUE KEY id (id)
179
  ) $charset_collate;";
admin/controllers/WDIControllerFeeds_wdi.php CHANGED
@@ -93,6 +93,7 @@ class WDIControllerFeeds_wdi {
93
  '%d',/*disable_mobile_layout*/
94
  '%s',/*feed_type*/
95
  '%s',/*feed_item_onclick*/
 
96
  '%d',//'popup_fullscreen'=>'bool',
97
 
98
  '%d',//'popup_width'=>'number',
@@ -131,7 +132,7 @@ class WDIControllerFeeds_wdi {
131
  '%d',//'conditional_filter_enable'=>'0',
132
  '%s',//'liked_feed' => 'string'
133
  '%d',//'mobile_breakpoint'=>'640',
134
-
135
 
136
  );
137
  }
93
  '%d',/*disable_mobile_layout*/
94
  '%s',/*feed_type*/
95
  '%s',/*feed_item_onclick*/
96
+
97
  '%d',//'popup_fullscreen'=>'bool',
98
 
99
  '%d',//'popup_width'=>'number',
132
  '%d',//'conditional_filter_enable'=>'0',
133
  '%s',//'liked_feed' => 'string'
134
  '%d',//'mobile_breakpoint'=>'640',
135
+ '%s',//'redirect_url'
136
 
137
  );
138
  }
admin/models/WDIModelFeeds_wdi.php CHANGED
@@ -108,6 +108,7 @@ class WDIModelFeeds_wdi {
108
  'disable_mobile_layout'=>'0',
109
  'feed_type' => 'thumbnails',
110
  'feed_item_onclick' => 'lightbox',
 
111
  //lightbox defaults
112
 
113
  'popup_fullscreen'=>'0',
@@ -143,6 +144,7 @@ class WDIModelFeeds_wdi {
143
  'conditional_filter_enable'=>'0',
144
  'liked_feed' => 'userhash',
145
  'mobile_breakpoint' => '640',
 
146
  );
147
  return $settings;
148
  }
@@ -179,6 +181,7 @@ class WDIModelFeeds_wdi {
179
  'disable_mobile_layout'=>'bool',
180
  'feed_type' => 'string',
181
  'feed_item_onclick' => 'string',
 
182
  //lightbox defaults
183
 
184
  'popup_fullscreen'=>'bool',
@@ -213,6 +216,7 @@ class WDIModelFeeds_wdi {
213
  'conditional_filter_type' => 'string',
214
  'liked_feed' => 'string',
215
  'mobile_breakpoint' => 'number',
 
216
  );
217
  return $sanitize_types;
218
  }
108
  'disable_mobile_layout'=>'0',
109
  'feed_type' => 'thumbnails',
110
  'feed_item_onclick' => 'lightbox',
111
+
112
  //lightbox defaults
113
 
114
  'popup_fullscreen'=>'0',
144
  'conditional_filter_enable'=>'0',
145
  'liked_feed' => 'userhash',
146
  'mobile_breakpoint' => '640',
147
+ 'redirect_url' => '',
148
  );
149
  return $settings;
150
  }
181
  'disable_mobile_layout'=>'bool',
182
  'feed_type' => 'string',
183
  'feed_item_onclick' => 'string',
184
+
185
  //lightbox defaults
186
 
187
  'popup_fullscreen'=>'bool',
216
  'conditional_filter_type' => 'string',
217
  'liked_feed' => 'string',
218
  'mobile_breakpoint' => 'number',
219
+ 'redirect_url' => 'string',
220
  );
221
  return $sanitize_types;
222
  }
admin/views/WDIViewFeeds_wdi.php CHANGED
@@ -273,7 +273,9 @@ class WDIViewFeeds_wdi
273
  'show_full_description' => array('name' => 'show_full_description', 'title' => __('Show Full Description', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('Discription will be shown no matter how long it is', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'masonry'))),
274
  'disable_mobile_layout' => array('name' => 'disable_mobile_layout', 'title' => __('Disable Mobile Layout', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('Column number stays the same in all screens', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry'))),
275
  'mobile_breakpoint' => array('name' => 'mobile_breakpoint', 'title' => __('Window width breakpoint for small size media', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('Load media of smaller size from Instagram if browser width is smaller than this value. Faster loading in mobile devices. Set the value about 320px to always load large-size media.', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
276
- 'feed_item_onclick' => array('name' => 'feed_item_onclick', 'title' => __('Image Onclick', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('lightbox' => __('Open Lightbox', "wd-instagram-feed"), 'instagram' => __('Redirect To Instagram', "wd-instagram-feed"), 'none' => __('Do Nothing', "wd-instagram-feed")), 'break' => 'true', 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
 
 
277
  //lightbox settings
278
  'popup_fullscreen' => array('name' => 'popup_fullscreen', 'title' => __('Full width lightbox', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
279
  'popup_width' => array('name' => 'popup_width', 'title' => __('Lightbox Width', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'label' => array('text' => 'px', 'place' => 'after'), 'tooltip' => '', 'attr' => array(array('name' => 'class', 'value' => 'small_input'), array('name' => 'tab', 'value' => 'lightbox_settings'))),
273
  'show_full_description' => array('name' => 'show_full_description', 'title' => __('Show Full Description', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('Discription will be shown no matter how long it is', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'masonry'))),
274
  'disable_mobile_layout' => array('name' => 'disable_mobile_layout', 'title' => __('Disable Mobile Layout', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('Column number stays the same in all screens', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry'))),
275
  'mobile_breakpoint' => array('name' => 'mobile_breakpoint', 'title' => __('Window width breakpoint for small size media', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('Load media of smaller size from Instagram if browser width is smaller than this value. Faster loading in mobile devices. Set the value about 320px to always load large-size media.', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
276
+ 'feed_item_onclick' => array('name' => 'feed_item_onclick', 'title' => __('Image Onclick', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('lightbox' => __('Open Lightbox', "wd-instagram-feed"), 'instagram' => __('Redirect To Instagram', "wd-instagram-feed"), 'custom_redirect' => __('Custom Redirect', "wd-instagram-feed"), 'none' => __('Do Nothing', "wd-instagram-feed")), 'break' => 'true', 'hide_ids' => array('lightbox' => 'redirect_url','instagram' => 'redirect_url','none' => 'redirect_url'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
277
+ 'redirect_url' => array('name' => 'redirect_url', 'title' => __('Redirect Absolute Url', "wd-instagram-feed"), 'type' => 'input', 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
278
+
279
  //lightbox settings
280
  'popup_fullscreen' => array('name' => 'popup_fullscreen', 'title' => __('Full width lightbox', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
281
  'popup_width' => array('name' => 'popup_width', 'title' => __('Lightbox Width', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'label' => array('text' => 'px', 'place' => 'after'), 'tooltip' => '', 'attr' => array(array('name' => 'class', 'value' => 'small_input'), array('name' => 'tab', 'value' => 'lightbox_settings'))),
css/wdi_frontend.css CHANGED
@@ -878,4 +878,9 @@ div[id^="wdi_container"] p {
878
 
879
  .wdi_embed_frame video{
880
  display: inline-block;
881
- }
 
 
 
 
 
878
 
879
  .wdi_embed_frame video{
880
  display: inline-block;
881
+ }
882
+
883
+ /*reset style */
884
+ .wdi_image_container img{
885
+ display:inline;
886
+ }
js/wdi_frontend.js CHANGED
@@ -1416,6 +1416,13 @@ wdi_front.getPhotoTemplate = function (currentFeed)
1416
  thumbClass = '';
1417
  break;
1418
  }
 
 
 
 
 
 
 
1419
  case 'none':
1420
  {
1421
  onclick = '';
@@ -1526,6 +1533,13 @@ wdi_front.getSliderTemplate = function (currentFeed)
1526
  thumbClass = 'fa-clone';
1527
  break;
1528
  }
 
 
 
 
 
 
 
1529
  case 'none':
1530
  {
1531
  onclick = '';
@@ -1643,6 +1657,13 @@ wdi_front.getVideoTemplate = function (currentFeed)
1643
  thumbClass = 'fa-play';
1644
  break;
1645
  }
 
 
 
 
 
 
 
1646
  case 'none':
1647
  {
1648
  overlayCustomClass = 'wdi_cursor_off wdi_hover_off';
1416
  thumbClass = '';
1417
  break;
1418
  }
1419
+ case 'custom_redirect':
1420
+ {
1421
+ onclick = 'onclick="window.open (\'' + currentFeed.feed_row.redirect_url + '\',\'_self\')"';
1422
+ overlayCustomClass = 'wdi_hover_off';
1423
+ thumbClass = '';
1424
+ break;
1425
+ }
1426
  case 'none':
1427
  {
1428
  onclick = '';
1533
  thumbClass = 'fa-clone';
1534
  break;
1535
  }
1536
+ case 'custom_redirect':
1537
+ {
1538
+ onclick = 'onclick="window.open (\'' + currentFeed.feed_row.redirect_url + '\',\'_self\')"';
1539
+ overlayCustomClass = 'wdi_hover_off';
1540
+ thumbClass = '';
1541
+ break;
1542
+ }
1543
  case 'none':
1544
  {
1545
  onclick = '';
1657
  thumbClass = 'fa-play';
1658
  break;
1659
  }
1660
+ case 'custom_redirect':
1661
+ {
1662
+ onclick = 'onclick="window.open (\'' + currentFeed.feed_row.redirect_url + '\',\'_self\')"';
1663
+ overlayCustomClass = 'wdi_hover_off';
1664
+ thumbClass = '';
1665
+ break;
1666
+ }
1667
  case 'none':
1668
  {
1669
  overlayCustomClass = 'wdi_cursor_off wdi_hover_off';
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.8
7
- Stable tag: 1.2.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -110,6 +110,9 @@ After downloading the ZIP file of the Instagram Feed WD plugin,
110
 
111
  == Changelog ==
112
 
 
 
 
113
  = 1.2.1 =
114
  New: Option to disable loading of new images in feed
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.8
7
+ Stable tag: 1.2.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
110
 
111
  == Changelog ==
112
 
113
+ = 1.2.2 =
114
+ New: Redirection to custom URL
115
+
116
  = 1.2.1 =
117
  New: Option to disable loading of new images in feed
118
 
update/wdi_update.php CHANGED
@@ -85,6 +85,9 @@ function wdi_update_diff($new_v, $old_v = 0.0){
85
  if(version_compare($old_v, "1.17", '<')){
86
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . WDI_FEED_TABLE . " ADD `mobile_breakpoint` varchar(10) NOT NULL DEFAULT '640'");
87
  }
 
 
 
88
 
89
 
90
 
85
  if(version_compare($old_v, "1.17", '<')){
86
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . WDI_FEED_TABLE . " ADD `mobile_breakpoint` varchar(10) NOT NULL DEFAULT '640'");
87
  }
88
+ if(version_compare($old_v, "2.2", '<')){
89
+ $wpdb->query("ALTER TABLE " . $wpdb->prefix . WDI_FEED_TABLE . " ADD `redirect_url` varchar(255) NOT NULL DEFAULT ''");
90
+ }
91
 
92
 
93
 
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.2.1
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.2.1');
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.2.2
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.2.2');
25
  define('WDI_IS_PRO','false');
26
 
27