WD Instagram Feed – Instagram Gallery - Version 1.3.20

Version Description

Fixed: Security issues

Download this release

Release Info

Developer 10web
Plugin Icon 128x128 WD Instagram Feed – Instagram Gallery
Version 1.3.20
Comparing to
See all releases

Code changes from version 1.3.19 to 1.3.20

admin/controllers/WDIControllerFeeds_wdi.php CHANGED
@@ -181,7 +181,6 @@ class WDIControllerFeeds_wdi {
181
  $model = new WDIModelFeeds_wdi();
182
 
183
  $settings = isset($_POST[WDI_FSN]) ? (array) $_POST[WDI_FSN]: array();
184
- // $settings = array_map( 'esc_attr', $settings );
185
  $defaults = $model->wdi_get_feed_defaults();
186
  $settings = $this->sanitize_input($settings,$defaults);
187
  $settings = wp_parse_args( $settings, $defaults );
@@ -210,7 +209,6 @@ class WDIControllerFeeds_wdi {
210
  global $wpdb;
211
  $model = new WDIModelFeeds_wdi();
212
  $settings = isset($_POST[WDI_FSN]) ? (array) $_POST[WDI_FSN] : array();
213
- // $settings = array_map( 'esc_attr', $settings );
214
  $defaults = $model->wdi_get_feed_defaults();
215
  $settings = $this->sanitize_input($settings,$defaults);
216
  $settings = wp_parse_args( $settings, $defaults );
181
  $model = new WDIModelFeeds_wdi();
182
 
183
  $settings = isset($_POST[WDI_FSN]) ? (array) $_POST[WDI_FSN]: array();
 
184
  $defaults = $model->wdi_get_feed_defaults();
185
  $settings = $this->sanitize_input($settings,$defaults);
186
  $settings = wp_parse_args( $settings, $defaults );
209
  global $wpdb;
210
  $model = new WDIModelFeeds_wdi();
211
  $settings = isset($_POST[WDI_FSN]) ? (array) $_POST[WDI_FSN] : array();
 
212
  $defaults = $model->wdi_get_feed_defaults();
213
  $settings = $this->sanitize_input($settings,$defaults);
214
  $settings = wp_parse_args( $settings, $defaults );
admin/models/WDIModelFeeds_wdi.php CHANGED
@@ -181,9 +181,7 @@ class WDIModelFeeds_wdi {
181
  'disable_mobile_layout'=>'bool',
182
  'feed_type' => 'string',
183
  'feed_item_onclick' => 'string',
184
-
185
  //lightbox defaults
186
-
187
  'popup_fullscreen'=>'bool',
188
  'popup_width'=>'number',
189
  'popup_height'=>'number',
@@ -210,7 +208,6 @@ class WDIModelFeeds_wdi {
210
  'show_image_counts'=>'bool',
211
  'enable_loop'=>'bool',
212
  'popup_image_right_click'=>'bool',
213
-
214
  'conditional_filters' => 'string',
215
  'conditional_filter_enable'=>'number',
216
  'conditional_filter_type' => 'string',
181
  'disable_mobile_layout'=>'bool',
182
  'feed_type' => 'string',
183
  'feed_item_onclick' => 'string',
 
184
  //lightbox defaults
 
185
  'popup_fullscreen'=>'bool',
186
  'popup_width'=>'number',
187
  'popup_height'=>'number',
208
  'show_image_counts'=>'bool',
209
  'enable_loop'=>'bool',
210
  'popup_image_right_click'=>'bool',
 
211
  'conditional_filters' => 'string',
212
  'conditional_filter_enable'=>'number',
213
  'conditional_filter_type' => 'string',
framework/WDILibrary.php CHANGED
@@ -1124,7 +1124,7 @@ class WDILibrary {
1124
  }
1125
 
1126
  public static function get_user_access_token($users){
1127
- global $wdi_options;
1128
  $users_list = self::get_users_list();
1129
  foreach($users as $user) {
1130
  if(substr($user->username, 0, 1) === '#') {
1124
  }
1125
 
1126
  public static function get_user_access_token($users){
1127
+ global $wdi_options;
1128
  $users_list = self::get_users_list();
1129
  foreach($users as $user) {
1130
  if(substr($user->username, 0, 1) === '#') {
readme.txt CHANGED
@@ -1,24 +1,24 @@
1
- === 10Web Social Feed ===
2
  Contributors: webdorado,10web,progmastery
3
  Tags: custom instagram feed, feed, instagram, hashtag, Instagram feed, instagram gallery, instagram posts, Instagram images, Instagram photos, lightbox, photos,instagram account
4
  Requires at least: 3.9
5
  Requires PHP: 5.2
6
  Tested up to: 5.2
7
- Stable tag: 1.3.19
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- Formerly "10Web Istagram Feed". 10Web Social Feed for Instagram is the leading plugin for easily presenting a customizable Instagram feed on your website.
12
 
13
  == Description ==
14
 
15
- 10Web Social Feed for Instagram is the leading plugin for easily presenting a customizable Instagram feed on your website.
16
 
17
  = Useful Links: =
18
 
19
  [Live Demo](https://demo.10web.io/instagram-feed/)
20
 
21
- [Premium 10Web Social Feed for Instagram](https://10web.io/plugins/wordpress-instagram-feed/)
22
 
23
  [Special Offer for all Premium Plugins](https://10web.io/plugins-bundle-pricing/)
24
 
@@ -26,9 +26,9 @@ Formerly "10Web Istagram Feed". 10Web Social Feed for Instagram is the leading p
26
  https://www.youtube.com/watch?v=CgZNya0HZCQ
27
 
28
 
29
- 10Web Social Feed for Instagram is a user-friendly WordPress plugin that can help you bring Instagram feeds with the media of your Instagram account to any of your posts and pages. It will take couple of minutes to set up and customize to your needs. 10Web Social Feed for Instagram's settings and features will allow you to take full control over how to display the feeds and the content on your website.
30
 
31
- 10Web Social Feed for Instagram is a perfect fit for bloggers, photography websites, travel and food blogs and for WordPress users that want to spice up their posts with the latest images and videos from their Instagram profiles. The plugin is responsive and scales perfectly to screens of all sizes, providing better user experience across the board.
32
 
33
 
34
  == Benefits ==
@@ -38,8 +38,8 @@ https://www.youtube.com/watch?v=CgZNya0HZCQ
38
  * **Add appeal to your website** - Stunning display views, custom styling features and image lightbox effects will bring vibrancy to your posts and pages, and add to your website's overall look and feel.
39
  * **Control** - Take pure charge of what content to display and how to display it with an extensive list of content and display settings. Specify the number of photos you display on the page and choose what happens when a visitor clicks on an image from the feed. Custom styled display views and filtered Instagram content will be a great addition to any post you publish.
40
  * **Minimal effort** – Set the plugin up and have it up and running in no time and with minimal efforts. Out of box solution that's user-friendly and simple in use.
41
- * **Support** - The team behind 10Web Social Feed for Instagram provides timely and effective support to all its users. We keep standards high and response time low.
42
- * **Resource efficient** - WordPress 10Web Social Feed for Instagram plugin loads the images pretty fast as no feed data is stored in the database. All the images, videos, captions and comments are retrieved directly from the Instagram in the front-end.
43
 
44
 
45
 
@@ -55,25 +55,25 @@ Create Instagram galleries on your website by embedding entire timelines to your
55
  You can choose to show a single feed on your pages and posts, but you can make things more interesting and create mixed feeds (Premium version). With single feeds you can show posts from your Instagram account and single hashtag. Mixed feeds, on the other hand, can contain your Instagram account and multiple hashtags. A front end filter is available for mixed feeds (Premium version).
56
 
57
  = FILTERED FEEDS =
58
- Use Conditional Filters of the 10Web Social Feed for Instagram plugin to display or skip certain content from the feeds by setting up a filter logic and condition types. Add custom condition types if necessary and fine-tune your feeds. Conditional Filters option is available for Premium version only.
59
 
60
  = INSTAGRAM WIDGET =
61
  Want to show Instagram feeds on your website sidebar? Do it quick and easy with the help of the Instagram Feed Widget.
62
 
63
  = LIGHTBOX =
64
- 10Web Social Feed for Instagram features a powerful lightbox. It provides support for HTML5 video, 15 transition effects (Premium version), filmstrip (Premium version) and carousel features. The lightbox works great with Instagram touch as well.
65
 
66
  = SCROLL AND PAGINATION =
67
  The plugin comes with a classic pagination with next and previous buttons. You can also choose the infinite scroll option (Premium version) to bring better user experience. This allows to view more images when scrolling the page down. You can set the the number of images you want to show per page.
68
 
69
  = THEMES =
70
- Choose from the two default themes offered by the plugin or create multifarious themes (Premium version) by customizing the colors, sizes and display styles. 10Web Social Feed for Instagram allows you to have separate layout settings for each theme with custom settings for header, user data and pagination.
71
 
72
  = SETTINGS/CUSTOMIZATION =
73
 
74
  *Some customizations described here are available in Premium version. Please refer to feature summary for additional info.*
75
 
76
- 10Web Social Feed for Instagram comes with extensive customization options for the feeds, layouts, themes and content display. Every new feed you add to your website has its own settings for the feed and for the lightbox that pops up when people click on an image or video. Upon clicking on the image you can choose to redirect people to Instagram, open the image in the lightbox, or chose the custom redirect option. There are various image sorting options available based on the date, likes, comments, and on random basis. Media loading options include load more button, infinite Instagram scrolling, or classic pagination with next and previous buttons. You can enable "Follow on Instagram" button from the feed settings and let your visitors follow the displayed Instagram accounts directly from your site. The number of photos you display on the page or post can be specified from the feed settings, as well as the number of the loading images.
77
 
78
 
79
  [Premium version adds](https://10web.io/plugins/wordpress-instagram-feed/)
@@ -94,32 +94,32 @@ Choose from the two default themes offered by the plugin or create multifarious
94
  * Conditional Filters
95
 
96
  ###IMPORTANT:
97
- If you think you found a bug in 10Web Social Feed for Instagram or wonder how to add Instagram to your website, or how to get Instagram plugin up and running, please check out [Support Forum](https://wordpress.org/support/plugin/wd-instagram-feed). Additional information on how to download Instagram plugin to your website you can find in our user manual If you do not find a solution in the forum, do not hesitate to [click here to contact us](https://10web.io/contact-us/).
98
 
99
  == Installation ==
100
 
101
- #### Thank you for your interest in 10Web Social Feed for Instagram.
102
 
103
- Here are two ways of installing 10Web Social Feed for Instagram: via WordPress backend and via FTP. Let's discuss each case individually:
104
 
105
  **Installing via WordPress**
106
 
107
  Login to the WordPress Administrator Panel.
108
  Go to Plugins > Add New > Upload.
109
- Click Choose file button and select the zip folder of 10Web Social Feed for Instagram plugin and press Install now button.
110
  Click Activate button.
111
 
112
  **Installing via FTP**
113
 
114
  Login to your hosting space via an FTP software, e.g. FileZilla.
115
- Unzip the downloaded 10Web Social Feed for Instagram plugin folder without making any changes to the folder.
116
  Upload the Instagram plugin into the following location wp-content>wp-plugins.
117
  Login to the WordPress Administrator Panel.
118
- Activate 10Web Social Feed for Instagram by going to Plugins and pressing Activate button.
119
 
120
  **Creating an Instagram Feed**
121
 
122
- Creating a responsive Instagram feed is simple and easy with this user-friendly Instagram importer plugin. Go to **10Web Social Feed for Instagram > Feeds** and press **Add New.** Here you can choose Instagram feed layout and manage lightbox options. From the lightbox options you can enable filmstrip, slideshow, and take full control how custom feed images, image galleries, pictures, Instagram gallery, and videos of this social network are displayed within the lightbox.
123
 
124
  You can enable autoplay to play photos and Instagram group images similar to an image slider. To get an Instagram slider appearance in the lightbox you'll need to adjust the lightbox and image display settings. Lightbox works great with Instagram touch. The feed will be automatically updated once users share Instagram new images. The feeds support new Instagram carousel feature, and display the images of the responsive carousel.
125
 
@@ -495,18 +495,18 @@ Please make sure you don't have any important information before you proceed.
495
 
496
  == Screenshots ==
497
 
498
- 1. WordPress 10Web Social Feed for Instagram - Thumbnail layout
499
- 2. WordPress 10Web Social Feed for Instagram - Image browser layout
500
- 3. WordPress 10Web Social Feed for Instagram - Lightbox
501
- 4. WordPress 10Web Social Feed for Instagram - Edit Instagram Feed
502
- 5. WordPress 10Web Social Feed for Instagram - Theme Settings
503
 
504
  == Privacy Policy ==
505
- 10Web Social Feed for Instagram plugin uses Instagram API on website front end. You have to authorize the plugin via sign in to get data from Instagram on your behalf. The plugin does not send any user’s data to Instagram. All the data received from Instagram via API is cached in WordPress database for some short customizable period to provide front end optimization. You can delete or update cached data. Instagram saves some cookies in browsers of website visitors via API data. These cookies are mostly used for security purposes. They are regulated under terms of Instagram’s privacy policy https://instagram.com/legal/privacy. The plugin asks for your consent to collect site administrator’s email address and site URL to offer customer support, deals and discounts on premium products and more.
506
 
507
  == Changelog ==
508
 
509
- = 1.3.19 =
510
  Fixed: Security issues
511
 
512
  = 1.3.18 =
@@ -652,7 +652,7 @@ Change: Introduction of Backup WD plugin
652
  Change: "create_function" is not used anymore
653
 
654
  = 1.2.4 =
655
- Fixed: 10Web Social Feed for Instagram compatibility issue with Better WordPress Minify plugin, thanks to @amityweb for bug report
656
 
657
  = 1.2.3 =
658
  Change: WD library updated to version 1.0.11
@@ -800,7 +800,7 @@ Changed: Check and get user id on frontend if empty for some unknown reason
800
  Fixed: Bug when duplicating feeds
801
 
802
  = 1.1.0 =
803
- **IMPORTANT: Instagram changed the API. You need to get a new access token by using "Sign in with Instagram" button on the Settings page in order to keep your 10Web Social Feed for Instagram plugin functioning after June 1.**
804
  new: Instagram new API
805
  new: Spanish translation (Thanks to Alexandro Lacadena Gomez)
806
 
1
+ === 10Web Social Photo Feed ===
2
  Contributors: webdorado,10web,progmastery
3
  Tags: custom instagram feed, feed, instagram, hashtag, Instagram feed, instagram gallery, instagram posts, Instagram images, Instagram photos, lightbox, photos,instagram account
4
  Requires at least: 3.9
5
  Requires PHP: 5.2
6
  Tested up to: 5.2
7
+ Stable tag: 1.3.20
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ Formerly "10Web Instagram Feed". 10Web Social Photo Feed for Instagram is the leading plugin for easily presenting a customizable Instagram feed on your website.
12
 
13
  == Description ==
14
 
15
+ 10Web Social Photo Feed for Instagram is the leading plugin for easily presenting a customizable Instagram feed on your website.
16
 
17
  = Useful Links: =
18
 
19
  [Live Demo](https://demo.10web.io/instagram-feed/)
20
 
21
+ [Premium 10Web Social Photo Feed for Instagram](https://10web.io/plugins/wordpress-instagram-feed/)
22
 
23
  [Special Offer for all Premium Plugins](https://10web.io/plugins-bundle-pricing/)
24
 
26
  https://www.youtube.com/watch?v=CgZNya0HZCQ
27
 
28
 
29
+ 10Web Social Photo Feed for Instagram is a user-friendly WordPress plugin that can help you bring Instagram feeds with the media of your Instagram account to any of your posts and pages. It will take couple of minutes to set up and customize to your needs. 10Web Social Photo Feed for Instagram's settings and features will allow you to take full control over how to display the feeds and the content on your website.
30
 
31
+ 10Web Social Photo Feed for Instagram is a perfect fit for bloggers, photography websites, travel and food blogs and for WordPress users that want to spice up their posts with the latest images and videos from their Instagram profiles. The plugin is responsive and scales perfectly to screens of all sizes, providing better user experience across the board.
32
 
33
 
34
  == Benefits ==
38
  * **Add appeal to your website** - Stunning display views, custom styling features and image lightbox effects will bring vibrancy to your posts and pages, and add to your website's overall look and feel.
39
  * **Control** - Take pure charge of what content to display and how to display it with an extensive list of content and display settings. Specify the number of photos you display on the page and choose what happens when a visitor clicks on an image from the feed. Custom styled display views and filtered Instagram content will be a great addition to any post you publish.
40
  * **Minimal effort** – Set the plugin up and have it up and running in no time and with minimal efforts. Out of box solution that's user-friendly and simple in use.
41
+ * **Support** - The team behind 10Web Social Photo Feed for Instagram provides timely and effective support to all its users. We keep standards high and response time low.
42
+ * **Resource efficient** - WordPress 10Web Social Photo Feed for Instagram plugin loads the images pretty fast as no feed data is stored in the database. All the images, videos, captions and comments are retrieved directly from the Instagram in the front-end.
43
 
44
 
45
 
55
  You can choose to show a single feed on your pages and posts, but you can make things more interesting and create mixed feeds (Premium version). With single feeds you can show posts from your Instagram account and single hashtag. Mixed feeds, on the other hand, can contain your Instagram account and multiple hashtags. A front end filter is available for mixed feeds (Premium version).
56
 
57
  = FILTERED FEEDS =
58
+ Use Conditional Filters of the 10Web Social Photo Feed for Instagram plugin to display or skip certain content from the feeds by setting up a filter logic and condition types. Add custom condition types if necessary and fine-tune your feeds. Conditional Filters option is available for Premium version only.
59
 
60
  = INSTAGRAM WIDGET =
61
  Want to show Instagram feeds on your website sidebar? Do it quick and easy with the help of the Instagram Feed Widget.
62
 
63
  = LIGHTBOX =
64
+ 10Web Social Photo Feed for Instagram features a powerful lightbox. It provides support for HTML5 video, 15 transition effects (Premium version), filmstrip (Premium version) and carousel features. The lightbox works great with Instagram touch as well.
65
 
66
  = SCROLL AND PAGINATION =
67
  The plugin comes with a classic pagination with next and previous buttons. You can also choose the infinite scroll option (Premium version) to bring better user experience. This allows to view more images when scrolling the page down. You can set the the number of images you want to show per page.
68
 
69
  = THEMES =
70
+ Choose from the two default themes offered by the plugin or create multifarious themes (Premium version) by customizing the colors, sizes and display styles. 10Web Social Photo Feed for Instagram allows you to have separate layout settings for each theme with custom settings for header, user data and pagination.
71
 
72
  = SETTINGS/CUSTOMIZATION =
73
 
74
  *Some customizations described here are available in Premium version. Please refer to feature summary for additional info.*
75
 
76
+ 10Web Social Photo Feed for Instagram comes with extensive customization options for the feeds, layouts, themes and content display. Every new feed you add to your website has its own settings for the feed and for the lightbox that pops up when people click on an image or video. Upon clicking on the image you can choose to redirect people to Instagram, open the image in the lightbox, or chose the custom redirect option. There are various image sorting options available based on the date, likes, comments, and on random basis. Media loading options include load more button, infinite Instagram scrolling, or classic pagination with next and previous buttons. You can enable "Follow on Instagram" button from the feed settings and let your visitors follow the displayed Instagram accounts directly from your site. The number of photos you display on the page or post can be specified from the feed settings, as well as the number of the loading images.
77
 
78
 
79
  [Premium version adds](https://10web.io/plugins/wordpress-instagram-feed/)
94
  * Conditional Filters
95
 
96
  ###IMPORTANT:
97
+ If you think you found a bug in 10Web Social Photo Feed for Instagram or wonder how to add Instagram to your website, or how to get Instagram plugin up and running, please check out [Support Forum](https://wordpress.org/support/plugin/wd-instagram-feed). Additional information on how to download Instagram plugin to your website you can find in our user manual If you do not find a solution in the forum, do not hesitate to [click here to contact us](https://10web.io/contact-us/).
98
 
99
  == Installation ==
100
 
101
+ #### Thank you for your interest in 10Web Social Photo Feed for Instagram.
102
 
103
+ Here are two ways of installing 10Web Social Photo Feed for Instagram: via WordPress backend and via FTP. Let's discuss each case individually:
104
 
105
  **Installing via WordPress**
106
 
107
  Login to the WordPress Administrator Panel.
108
  Go to Plugins > Add New > Upload.
109
+ Click Choose file button and select the zip folder of 10Web Social Photo Feed for Instagram plugin and press Install now button.
110
  Click Activate button.
111
 
112
  **Installing via FTP**
113
 
114
  Login to your hosting space via an FTP software, e.g. FileZilla.
115
+ Unzip the downloaded 10Web Social Photo Feed for Instagram plugin folder without making any changes to the folder.
116
  Upload the Instagram plugin into the following location wp-content>wp-plugins.
117
  Login to the WordPress Administrator Panel.
118
+ Activate 10Web Social Photo Feed for Instagram by going to Plugins and pressing Activate button.
119
 
120
  **Creating an Instagram Feed**
121
 
122
+ Creating a responsive Instagram feed is simple and easy with this user-friendly Instagram importer plugin. Go to **10Web Social Photo Feed for Instagram > Feeds** and press **Add New.** Here you can choose Instagram feed layout and manage lightbox options. From the lightbox options you can enable filmstrip, slideshow, and take full control how custom feed images, image galleries, pictures, Instagram gallery, and videos of this social network are displayed within the lightbox.
123
 
124
  You can enable autoplay to play photos and Instagram group images similar to an image slider. To get an Instagram slider appearance in the lightbox you'll need to adjust the lightbox and image display settings. Lightbox works great with Instagram touch. The feed will be automatically updated once users share Instagram new images. The feeds support new Instagram carousel feature, and display the images of the responsive carousel.
125
 
495
 
496
  == Screenshots ==
497
 
498
+ 1. WordPress 10Web Social Photo Feed for Instagram - Thumbnail layout
499
+ 2. WordPress 10Web Social Photo Feed for Instagram - Image browser layout
500
+ 3. WordPress 10Web Social Photo Feed for Instagram - Lightbox
501
+ 4. WordPress 10Web Social Photo Feed for Instagram - Edit Instagram Feed
502
+ 5. WordPress 10Web Social Photo Feed for Instagram - Theme Settings
503
 
504
  == Privacy Policy ==
505
+ 10Web Social Photo Feed for Instagram plugin uses Instagram API on website front end. You have to authorize the plugin via sign in to get data from Instagram on your behalf. The plugin does not send any user’s data to Instagram. All the data received from Instagram via API is cached in WordPress database for some short customizable period to provide front end optimization. You can delete or update cached data. Instagram saves some cookies in browsers of website visitors via API data. These cookies are mostly used for security purposes. They are regulated under terms of Instagram’s privacy policy https://instagram.com/legal/privacy. The plugin asks for your consent to collect site administrator’s email address and site URL to offer customer support, deals and discounts on premium products and more.
506
 
507
  == Changelog ==
508
 
509
+ = 1.3.20 =
510
  Fixed: Security issues
511
 
512
  = 1.3.18 =
652
  Change: "create_function" is not used anymore
653
 
654
  = 1.2.4 =
655
+ Fixed: 10Web Social Photo Feed for Instagram compatibility issue with Better WordPress Minify plugin, thanks to @amityweb for bug report
656
 
657
  = 1.2.3 =
658
  Change: WD library updated to version 1.0.11
800
  Fixed: Bug when duplicating feeds
801
 
802
  = 1.1.0 =
803
+ **IMPORTANT: Instagram changed the API. You need to get a new access token by using "Sign in with Instagram" button on the Settings page in order to keep your 10Web Social Photo Feed for Instagram plugin functioning after June 1.**
804
  new: Instagram new API
805
  new: Spanish translation (Thanks to Alexandro Lacadena Gomez)
806
 
wd-instagram-feed.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: 10Web Social Photo Feed
4
  Plugin URI: https://10web.io/plugins/wordpress-instagram-feed/?utm_source=instagram_feed&utm_medium=free_plugin
5
  Description: 10Web Social Photo 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.3.19
7
  Author: 10Web
8
  Author URI: https://10Web.io/plugins/?utm_source=instagram_feed&utm_medium=free_plugin
9
  License: GPLv2 or later
@@ -21,13 +21,13 @@ 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.3.19');
25
  define('WD_WDI_PREFIX', 'wdi' );
26
  define('WDI_IS_PRO', false );
27
- $wdi_minify = ((isset($_GET['wdi_no_minify']) && $_GET['wdi_no_minify'] == "true") ? false : true);
28
  define('WDI_MINIFY', $wdi_minify);
29
 
30
- if(!empty($_GET['wdi_code'])) {
31
  add_action('plugins_loaded', 'wdi_save_user_access_token');
32
  }
33
 
@@ -50,9 +50,7 @@ function wdi_save_user_access_token(){
50
  }
51
 
52
  $business_accounts = array();
53
-
54
  foreach($accounts['data'] as $accounts_data) {
55
-
56
  foreach($accounts_data as $key => $data) {
57
  if($key === "instagram_business_account") {
58
  $business_accounts[] = $data['id'];
@@ -123,7 +121,9 @@ function wdi_register_block_editor_assets($assets) {
123
  }
124
 
125
  function wdi_set_reset_cache(){
126
- if(wp_verify_nonce($_POST["wdi_nonce"] , 'wdi_cache')) {
 
 
127
  global $wpdb;
128
  $data = $wpdb->query("DELETE FROM {$wpdb->prefix}options WHERE option_name LIKE '%wdi_cache_data%'");
129
  if($data === false){
@@ -136,45 +136,36 @@ function wdi_set_reset_cache(){
136
  }
137
 
138
  function wdi_get_cache_data(){
139
- if(wp_verify_nonce($_POST["wdi_nonce"] , 'wdi_cache')){
140
- if(isset($_POST["wdi_cache_name"])){
141
- $transient_key = "wdi_cache_data_".md5($_POST["wdi_cache_name"]);
 
 
 
142
  $cache_data = get_transient($transient_key);
143
 
144
  if(isset($cache_data) && $cache_data!=false && isset($cache_data["cache_response"])){
145
-
146
  $wdi_debugging = false;
147
  $wdi_debugging_data = array();
148
-
149
- if(isset($_POST["WDI_MINIFY"])&& $_POST["WDI_MINIFY"] === "false"){
150
-
151
-
152
  $wdi_debugging = true;
153
-
154
-
155
  $current_date = (date('Y-m-d H:i:s'));
156
  $cache_date = $cache_data["wdi_debugging_data"]["cache_date"];
157
  $wdi_transient_time = $cache_data["wdi_debugging_data"]["wdi_transient_time"];
158
-
159
-
160
  $current_date_strtotime = strtotime($current_date);
161
  $cache_date_strtotime = strtotime($cache_date);
162
  $seconds_diff = $current_date_strtotime - $cache_date_strtotime;
163
  $date_diff_min = $seconds_diff/60;
164
-
165
-
166
-
167
-
168
  $wdi_debugging_data = array(
169
  'current_date' => $current_date,
170
  'cache_date' => $cache_date,
171
  'date_diff_min' => $date_diff_min,
172
- 'transient_key' => $_POST["wdi_cache_name"],
173
  'wdi_transient_time' => $wdi_transient_time,
174
  );
175
-
176
-
177
  }
 
178
  $cache_data = stripslashes($cache_data["cache_response"]);
179
  wdi_send_response(
180
  array(
@@ -193,9 +184,12 @@ function wdi_get_cache_data(){
193
  }
194
 
195
  function wdi_set_cache_data(){
 
196
  global $wdi_options;
197
- if(wp_verify_nonce($_POST["wdi_nonce"] , 'wdi_cache')){
198
- if(isset($_POST["wdi_cache_name"]) && isset($_POST["wdi_cache_response"])){
 
 
199
  if(isset($wdi_options["wdi_transient_time"])){
200
  $wdi_transient_time = intval($wdi_options["wdi_transient_time"]);
201
  }else{
@@ -203,13 +197,10 @@ function wdi_set_cache_data(){
203
  }
204
 
205
  $cache_date = (date('Y-m-d H:i:s'));
206
-
207
- $wdi_cache_response = $_POST["wdi_cache_response"];
208
-
209
- $transient_key = "wdi_cache_data_".md5($_POST["wdi_cache_name"]);
210
  $expiration_time = $wdi_transient_time * 60;
211
 
212
-
213
  if(!seems_utf8($wdi_cache_response)){
214
  $wdi_cache_response = utf8_encode($wdi_cache_response);
215
  }
@@ -239,13 +230,11 @@ add_action('wp_ajax_nopriv_WDIGalleryBox', 'wdi_ajax_frontend');
239
  add_action('admin_init', 'wdi_setup_redirect');
240
 
241
  function wdi_ajax_frontend() {
242
-
243
  /* reset from user to site locale*/
244
  if(function_exists('switch_to_locale')){
245
  switch_to_locale( get_locale() );
246
  }
247
-
248
- require_once(WDI_DIR . '/framework/WDILibrary.php');
249
  $page = WDILibrary::get('action');
250
  //chenged action hook for esacpeing Photo Gallery confilct
251
  if($page==='WDIGalleryBox'){$page = 'GalleryBox';}
@@ -288,6 +277,7 @@ function wdi_instagram_activate($networkwide) {
288
  }
289
 
290
  function wdi_setup_redirect() {
 
291
  if (get_option('wdi_do_activation_set_up_redirect') ) {
292
  update_option('wdi_do_activation_set_up_redirect',0);
293
  //wp_safe_redirect( admin_url( 'index.php?page=gmwd_setup' ) );
@@ -301,20 +291,18 @@ function wdi_setup_redirect() {
301
  }
302
 
303
  add_filter('wdi_sanitize_options', 'wdi_create_sample_feed');
304
-
305
  function wdi_create_sample_feed($new_options) {
306
-
307
  if(empty($new_options['wdi_authenticated_users_list'])){
308
  $new_options['wdi_authenticated_users_list'] = '[]';
309
  }
310
-
311
  //submit wdi options
312
- if (!isset($_POST['option_page']) || $_POST['option_page'] != 'wdi_all_settings') {
 
313
  return $new_options;
314
  }
315
 
316
  $wdi_options = wdi_get_options();
317
-
318
  if(empty($new_options['wdi_user_name'])) {
319
  return $new_options;
320
  }
3
  Plugin Name: 10Web Social Photo Feed
4
  Plugin URI: https://10web.io/plugins/wordpress-instagram-feed/?utm_source=instagram_feed&utm_medium=free_plugin
5
  Description: 10Web Social Photo 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.3.20
7
  Author: 10Web
8
  Author URI: https://10Web.io/plugins/?utm_source=instagram_feed&utm_medium=free_plugin
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.3.20');
25
  define('WD_WDI_PREFIX', 'wdi' );
26
  define('WDI_IS_PRO', false );
27
+ $wdi_minify = ( isset($_GET['wdi_no_minify']) && $_GET['wdi_no_minify'] == "true" ) ? FALSE : TRUE;
28
  define('WDI_MINIFY', $wdi_minify);
29
 
30
+ if( !empty($_GET['wdi_code']) ) {
31
  add_action('plugins_loaded', 'wdi_save_user_access_token');
32
  }
33
 
50
  }
51
 
52
  $business_accounts = array();
 
53
  foreach($accounts['data'] as $accounts_data) {
 
54
  foreach($accounts_data as $key => $data) {
55
  if($key === "instagram_business_account") {
56
  $business_accounts[] = $data['id'];
121
  }
122
 
123
  function wdi_set_reset_cache(){
124
+ require_once(WDI_DIR . '/framework/WDILibrary.php');
125
+ $wdi_nonce = WDILibrary::get('wdi_nonce', '');
126
+ if( wp_verify_nonce($wdi_nonce, 'wdi_cache') ) {
127
  global $wpdb;
128
  $data = $wpdb->query("DELETE FROM {$wpdb->prefix}options WHERE option_name LIKE '%wdi_cache_data%'");
129
  if($data === false){
136
  }
137
 
138
  function wdi_get_cache_data(){
139
+ require_once(WDI_DIR . '/framework/WDILibrary.php');
140
+ $wdi_nonce = WDILibrary::get('wdi_nonce', '');
141
+ $wdi_cache_name = WDILibrary::get('wdi_cache_name', '');
142
+ if(wp_verify_nonce($wdi_nonce , 'wdi_cache')){
143
+ if( !empty($wdi_cache_name) ) {
144
+ $transient_key = "wdi_cache_data_".md5($wdi_cache_name);
145
  $cache_data = get_transient($transient_key);
146
 
147
  if(isset($cache_data) && $cache_data!=false && isset($cache_data["cache_response"])){
 
148
  $wdi_debugging = false;
149
  $wdi_debugging_data = array();
150
+ $wdi_minify = WDILibrary::get('WDI_MINIFY', '');
151
+ if( !empty($wdi_minify) && $wdi_minify === "false" ) {
 
 
152
  $wdi_debugging = true;
 
 
153
  $current_date = (date('Y-m-d H:i:s'));
154
  $cache_date = $cache_data["wdi_debugging_data"]["cache_date"];
155
  $wdi_transient_time = $cache_data["wdi_debugging_data"]["wdi_transient_time"];
 
 
156
  $current_date_strtotime = strtotime($current_date);
157
  $cache_date_strtotime = strtotime($cache_date);
158
  $seconds_diff = $current_date_strtotime - $cache_date_strtotime;
159
  $date_diff_min = $seconds_diff/60;
 
 
 
 
160
  $wdi_debugging_data = array(
161
  'current_date' => $current_date,
162
  'cache_date' => $cache_date,
163
  'date_diff_min' => $date_diff_min,
164
+ 'transient_key' => $wdi_cache_name,
165
  'wdi_transient_time' => $wdi_transient_time,
166
  );
 
 
167
  }
168
+
169
  $cache_data = stripslashes($cache_data["cache_response"]);
170
  wdi_send_response(
171
  array(
184
  }
185
 
186
  function wdi_set_cache_data(){
187
+ require_once(WDI_DIR . '/framework/WDILibrary.php');
188
  global $wdi_options;
189
+ $wdi_nonce = WDILibrary::get('wdi_nonce', '');
190
+ $wdi_cache_response = WDILibrary::get('wdi_cache_response', '');
191
+ if( wp_verify_nonce($wdi_nonce, 'wdi_cache') ){
192
+ if( !empty($wdi_cache_response) ) {
193
  if(isset($wdi_options["wdi_transient_time"])){
194
  $wdi_transient_time = intval($wdi_options["wdi_transient_time"]);
195
  }else{
197
  }
198
 
199
  $cache_date = (date('Y-m-d H:i:s'));
200
+ $wdi_cache_response = WDILibrary::get('wdi_cache_response', '');
201
+ $transient_key = "wdi_cache_data_".md5($wdi_cache_response);
 
 
202
  $expiration_time = $wdi_transient_time * 60;
203
 
 
204
  if(!seems_utf8($wdi_cache_response)){
205
  $wdi_cache_response = utf8_encode($wdi_cache_response);
206
  }
230
  add_action('admin_init', 'wdi_setup_redirect');
231
 
232
  function wdi_ajax_frontend() {
233
+ require_once(WDI_DIR . '/framework/WDILibrary.php');
234
  /* reset from user to site locale*/
235
  if(function_exists('switch_to_locale')){
236
  switch_to_locale( get_locale() );
237
  }
 
 
238
  $page = WDILibrary::get('action');
239
  //chenged action hook for esacpeing Photo Gallery confilct
240
  if($page==='WDIGalleryBox'){$page = 'GalleryBox';}
277
  }
278
 
279
  function wdi_setup_redirect() {
280
+ require_once(WDI_DIR . '/framework/WDILibrary.php');
281
  if (get_option('wdi_do_activation_set_up_redirect') ) {
282
  update_option('wdi_do_activation_set_up_redirect',0);
283
  //wp_safe_redirect( admin_url( 'index.php?page=gmwd_setup' ) );
291
  }
292
 
293
  add_filter('wdi_sanitize_options', 'wdi_create_sample_feed');
 
294
  function wdi_create_sample_feed($new_options) {
295
+ require_once(WDI_DIR . '/framework/WDILibrary.php');
296
  if(empty($new_options['wdi_authenticated_users_list'])){
297
  $new_options['wdi_authenticated_users_list'] = '[]';
298
  }
 
299
  //submit wdi options
300
+ $option_page = WDILibrary::get('option_page', '');
301
+ if ( empty($option_page) || $option_page != 'wdi_all_settings') {
302
  return $new_options;
303
  }
304
 
305
  $wdi_options = wdi_get_options();
 
306
  if(empty($new_options['wdi_user_name'])) {
307
  return $new_options;
308
  }