WD Instagram Feed – Instagram Gallery - Version 1.1.20

Version Description

New: Instagram feed displayed in AJAX-loaded content. AJAX request callback needs to call wp_footer() in the end.

Download this release

Release Info

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

Code changes from version 1.1.19 to 1.1.20

Files changed (5) hide show
  1. changelog.txt +0 -114
  2. frontend/shortcode.php +172 -106
  3. js/wdi_frontend.js +44 -14
  4. readme.txt +4 -1
  5. wd-instagram-feed.php +2 -2
changelog.txt DELETED
@@ -1,114 +0,0 @@
1
- = 1.1.19 =
2
- Fixed: Strange bug in Instagram API when user feed pagination is null, causing JS errors in frontend
3
-
4
- = 1.1.18 =
5
- Fixed: Frontend filter colors (PRO)
6
- Changed: Featured plugins, brand new Mailchimp Forms WD plugin added
7
-
8
- = 1.1.17 =
9
- New: Option in feed settings to show small size images and low-bandwidth videos when viewed in mobile devices
10
- Fixed: Escaping in custom JS
11
- Change: WP 4.7 compatibility - language of frontend content in AJAX response
12
-
13
- = 1.1.16 =
14
- Fixed: Unicode "paragraph separator" symbol in media caption crashes lightbox
15
- Fixed: Javascript error in admin feed page and styling issue in lightbox because of some non-standard themes
16
-
17
- = 1.1.15 =
18
- New: Show hashtag media number in header
19
- Fixed: Scripts dependency on underscore.js
20
- Fixed: Compatibility issues with Yoast SEO
21
-
22
- = 1.1.14 =
23
- Fixed: Single user bio not shown
24
- Changed: Plugin logo
25
- Changed: Featured plugins logos
26
-
27
- = 1.1.13 =
28
- Fixed: Changes in database after plugin version update via FTP or AJAX requests with silent activation
29
-
30
- = 1.1.12 =
31
- New: Feed based on liked media (Pro)
32
- Fixed: Hidden media in last page
33
- Fixed: Minor issues
34
-
35
- = 1.1.11 =
36
- Added: Setting to show media descriptions in widget mode (Pro)
37
- Fixed: Untranslatable strings in widget editor
38
- Change: Featured plugins list
39
-
40
- = 1.1.10 =
41
- Added: New text in uninstall page
42
- Added: Featured plugins admin page
43
- Fixed: Video not centering issue on blogstyle
44
- Added: Swedish translations
45
-
46
- = 1.1.9 =
47
- New: Option to set minimal user role for adding and managing feeds and themes
48
- Fixed: Masonry feed thumbnails overlay opacity (Pro)
49
-
50
- = 1.1.8 =
51
- Changed: Font-Awesome updated to version 4.6.3
52
-
53
- = 1.1.7 =
54
- New: Featured themes admin page
55
- Fixed: Javascript error in hashtag feed
56
-
57
- = 1.1.6 =
58
- Change: Added compatibility with "All in one SEO pack" and other plugins running shortcodes in page head
59
-
60
- = 1.1.5 =
61
- Fixed: javascript error on firefox and safari
62
-
63
- = 1.1.4 =
64
- Fixed: Error handling in case of wrong access_token
65
- Fixed: Image description not opening after pagination (Pro)
66
- Fixed: Do not show load more button if feed media are finished
67
- Fixed: Infinite scroll triggering bug (Pro)
68
-
69
- = 1.1.3 =
70
- New: French translation (Thanks to Guillaume Barjou)
71
- New: English US and UK translation files. Edit them to change default strings
72
- Fixed: Image sizes and overwflows in thumbnails layout
73
- Fixed: Lightbox filmstrip thumb styles (Pro)
74
-
75
- = 1.1.2 =
76
- Fixed: Bug when saving theme data to some MySQL 5.6 databases
77
- Changed: Pagination of hashtag feeds restored
78
- Changed: Check and get user id on frontend if empty for some unknown reason
79
-
80
- = 1.1.1 =
81
- fix: bug when duplicating feeds
82
-
83
- = 1.1.0 =
84
- new: Instagram new API
85
- new: Spanish translation (Thanks to Alexandro Lacadena Gomez)
86
-
87
- = 1.0.10 =
88
- Temporarily disable pagination in hashtag based feeds
89
- Updated Russian Translations ( Thanks to Alex Petrin )
90
-
91
- = 1.0.9 =
92
- Bug fixes
93
-
94
- = 1.0.8 =
95
- Show video play button when redirect is enabled
96
-
97
- = 1.0.7 =
98
- new: Image Hover Effects
99
-
100
- = 1.0.6 =
101
- new: Conditional Filters (Pro)
102
- new: Option for displaying username in masonry/thumbnails view (Pro)
103
- new: Russian translation (Thanks to Ruslan Tertyshny).
104
-
105
- = 1.0.2 =
106
- fix: PHP error after plugin update
107
-
108
- = 1.0.1 =
109
- fix: PHP 5.3 compatibility
110
- fix: video redirect bug
111
- change: user info styles
112
-
113
- = 1.0.0 =
114
- Initial version
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
frontend/shortcode.php CHANGED
@@ -3,148 +3,165 @@
3
  /*ttt!!! this will not work in case of AJAX request, note that for future versions*/
4
  $wdi_feed_counter = 0;
5
 
6
- add_action('init','wdi_frontend_init');
7
 
8
- function wdi_frontend_init(){
9
- global $wdi_options;
10
- $wdi_options = get_option(WDI_OPT);
 
11
  }
12
 
13
- add_shortcode( 'wdi_feed', 'wdi_feed' );
14
  // [wdi_feed id="feed_id"]
15
- function wdi_feed($atts,$widget_params='') {
16
- ob_start();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
  wdi_load_frontend_scripts();
19
  wdi_load_frontend_styles();
 
20
 
21
- require_once(WDI_DIR . '/framework/WDILibrary.php');
22
-
23
- global $wdi_feed_counter;
24
- $attributes = shortcode_atts( array(
25
- 'id' => 'no_id',
26
- ), $atts );
27
- if ($attributes['id']=='no_id'){
28
- ob_get_clean();
29
- return __('Invalid shortcode', "wdi");
30
- }
31
 
 
32
 
33
 
34
- //including feed model
35
- require_once(WDI_DIR .'/admin/models/WDIModelFeeds_wdi.php');
36
- $feed_model = new WDIModelFeeds_wdi();
37
- //getting all feed information from db
38
- $feed_row = WDILibrary::objectToArray($feed_model->get_feed_row($attributes['id']));
39
-
 
40
 
41
- //checking if access token is not set or removed display proper error message
42
- global $wdi_options;
43
- if(!isset($wdi_options['wdi_access_token']) || $wdi_options['wdi_access_token']==''){
44
- ob_get_clean();
45
- return __('Access Token is invalid, please get it again ', "wdi");
46
- }
47
-
48
- if(!isset($feed_row) || $feed_row==NULL){
49
- ob_get_clean();
50
- return __('Feed Doesn\'t exists ',"wdi");
51
- }
52
 
 
 
 
 
 
53
 
54
 
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
- $feed_row['widget'] = false;
57
- if($widget_params!='' && $widget_params['widget']==true){
58
- $feed_row['widget'] = true;
59
- $feed_row['number_of_photos'] = (string)$widget_params['widget_image_num'];
60
- $feed_row['show_likes'] = (string)$widget_params['widget_show_likes_and_comments'];
61
- $feed_row['show_comments'] = (string)$widget_params['widget_show_likes_and_comments'];
62
- $feed_row['show_usernames'] = '0';
63
- $feed_row['display_header'] = '0';
64
- $feed_row['show_description'] = '0';
65
- $feed_row['number_of_columns'] = (string)$widget_params['number_of_columns'];
66
 
67
- if($widget_params['enable_loading_buttons'] == 0){
68
- $feed_row['feed_display_view'] = 'widget';
69
- }
70
  }
 
71
 
72
- if(isset($feed_row['published']) && $feed_row['published']=== '0'){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  ob_get_clean();
74
- return __('Unable to display unpublished feed ',"wdi");
75
  }
76
- //checking feed type and using proper MVC
77
- $feed_type = isset($feed_row['feed_type']) ? $feed_row['feed_type'] : '';
78
- switch($feed_type){
79
- case 'thumbnails':{
80
- //including thumbnails controller
81
- require_once(WDI_DIR .'/frontend/controllers/WDIControllerThumbnails_view.php');
82
- $controller = new WDIControllerThumbnails_view();
83
- $controller->execute($feed_row,$wdi_feed_counter);
84
- $wdi_feed_counter++;
85
- break;
86
- }
87
- case 'image_browser':{
88
- //including thumbnails controller
89
- require_once(WDI_DIR .'/frontend/controllers/WDIControllerImageBrowser_view.php');
90
- $controller = new WDIControllerImageBrowser_view();
91
- $controller->execute($feed_row,$wdi_feed_counter);
92
- $wdi_feed_counter++;
93
- break;
94
- }
95
- default:{
96
- ob_get_clean();
97
- return __('Invalid feed type', "wdi");
98
- }
99
 
100
- }
101
 
102
 
103
- global $wdi_options;
104
- if(isset($wdi_options['wdi_custom_css'])){
105
- ?>
106
- <style>
107
- <?php echo $wdi_options['wdi_custom_css'];?>
108
- </style>
109
- <?php
110
- }
111
- if(isset($wdi_options['wdi_custom_js'])){
112
- ?>
113
- <script>
114
- <?php echo htmlspecialchars_decode(stripcslashes($wdi_options['wdi_custom_js']));?>
115
- </script>
116
- <?php
117
- }
118
 
119
 
120
- return ob_get_clean();
121
  }
122
 
123
 
124
- function wdi_load_frontend_scripts(){
125
-
126
- wp_enqueue_script('wdi_instagram',plugins_url('../js/wdi_instagram.js', __FILE__),array("jquery"), WDI_VERSION, true );
 
127
 
128
  wp_enqueue_script('underscore');
129
- wp_enqueue_script('wdi_frontend',plugins_url('../js/wdi_frontend.js', __FILE__),array("jquery",'wdi_instagram', 'underscore'), WDI_VERSION, true);
130
 
131
- wp_enqueue_script('wdi_responsive',plugins_url('../js/wdi_responsive.js', __FILE__),array("jquery","wdi_frontend"), WDI_VERSION, true);
132
- wp_localize_script("wdi_frontend", 'wdi_ajax',array( 'ajax_url' => admin_url( 'admin-ajax.php' )), WDI_VERSION);
133
- wp_localize_script("wdi_frontend", 'wdi_url',array('plugin_url'=>plugin_dir_url(__FILE__),
134
- 'ajax_url' => admin_url( 'admin-ajax.php' )), WDI_VERSION);
135
  wp_localize_script("wdi_frontend", 'wdi_front_messages',
136
- array( 'connection_error' => __('Connection Error, try again later :(','wdi'),
137
- 'user_not_found' => __('Username not found', 'wdi'),
138
- 'network_error' =>__('Network error, please try again later :(', 'wdi'),
139
- 'hashtag_nodata' => __('There is no data for that hashtag', 'wdi'),
140
- 'filter_title' => __('Click to filter images by this user','wdi')
141
- ), WDI_VERSION);
142
 
143
 
144
  wdi_front_end_scripts();
145
  }
146
 
147
- function wdi_load_frontend_styles() {
 
148
  wp_register_style('wdi_frontend_thumbnails', plugins_url('../css/wdi_frontend.css', __FILE__));
149
  wp_enqueue_style('wdi_frontend_thumbnails');
150
  wp_register_style('font-awesome', plugins_url('../css/font-awesome/css/font-awesome.css', __FILE__));
@@ -153,7 +170,8 @@ function wdi_load_frontend_styles() {
153
 
154
 
155
  ////////////////////////////GALLERY BOX//////////////////////////////
156
- function wdi_front_end_scripts() {
 
157
  /* ttt!!! petq chi*/
158
  /*
159
  global $wp_scripts;
@@ -173,11 +191,59 @@ function wdi_front_end_scripts() {
173
  /*ttt!!! gallery fullscreeni het conflict chka ?? arje stugel ete fullscreen script ka, apa el chavelacnel*/
174
  wp_enqueue_script('wdi_gallery_box', WDI_FRONT_URL . '/js/gallerybox/wdi_gallery_box.js', array('jquery'), WDI_VERSION);
175
  wp_localize_script('wdi_gallery_box', 'wdi_objectL10n', array(
176
- 'wdi_field_required' => __('Field is required.', "wdi"),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  'wdi_mail_validation' => __('This is not a valid email address.', "wdi"),
178
  'wdi_search_result' => __('There are no images matching your search.', "wdi"),
179
  ));
180
 
 
 
 
181
  }
182
 
183
  ?>
3
  /*ttt!!! this will not work in case of AJAX request, note that for future versions*/
4
  $wdi_feed_counter = 0;
5
 
6
+ add_action('init', 'wdi_frontend_init');
7
 
8
+ function wdi_frontend_init()
9
+ {
10
+ global $wdi_options;
11
+ $wdi_options = get_option(WDI_OPT);
12
  }
13
 
14
+ add_shortcode('wdi_feed', 'wdi_feed');
15
  // [wdi_feed id="feed_id"]
16
+ function wdi_feed($atts, $widget_params = '')
17
+ {
18
+
19
+
20
+ ob_start();
21
+ global $wdi_feed_counter;
22
+
23
+ if (defined('DOING_AJAX') && DOING_AJAX) {
24
+ if ($wdi_feed_counter == 0) {
25
+
26
+ $wdi_feed_counter = rand(1000, 9999);
27
+ global $wdi_feed_counter_init;
28
+ $wdi_feed_counter_init = $wdi_feed_counter;
29
+ }
30
+
31
+ wdi_load_frontend_scripts_styles_ajax();
32
+ } else {
33
 
34
  wdi_load_frontend_scripts();
35
  wdi_load_frontend_styles();
36
+ }
37
 
 
 
 
 
 
 
 
 
 
 
38
 
39
+ require_once(WDI_DIR . '/framework/WDILibrary.php');
40
 
41
 
42
+ $attributes = shortcode_atts(array(
43
+ 'id' => 'no_id',
44
+ ), $atts);
45
+ if ($attributes['id'] == 'no_id') {
46
+ ob_get_clean();
47
+ return __('Invalid shortcode', "wdi");
48
+ }
49
 
 
 
 
 
 
 
 
 
 
 
 
50
 
51
+ //including feed model
52
+ require_once(WDI_DIR . '/admin/models/WDIModelFeeds_wdi.php');
53
+ $feed_model = new WDIModelFeeds_wdi();
54
+ //getting all feed information from db
55
+ $feed_row = WDILibrary::objectToArray($feed_model->get_feed_row($attributes['id']));
56
 
57
 
58
+ //checking if access token is not set or removed display proper error message
59
+ global $wdi_options;
60
+ if (!isset($wdi_options['wdi_access_token']) || $wdi_options['wdi_access_token'] == '') {
61
+ ob_get_clean();
62
+ return __('Access Token is invalid, please get it again ', "wdi");
63
+ }
64
+
65
+ if (!isset($feed_row) || $feed_row == NULL) {
66
+ ob_get_clean();
67
+ return __('Feed Doesn\'t exists ', "wdi");
68
+ }
69
+
70
 
71
+ $feed_row['widget'] = false;
72
+ if ($widget_params != '' && $widget_params['widget'] == true) {
73
+ $feed_row['widget'] = true;
74
+ $feed_row['number_of_photos'] = (string)$widget_params['widget_image_num'];
75
+ $feed_row['show_likes'] = (string)$widget_params['widget_show_likes_and_comments'];
76
+ $feed_row['show_comments'] = (string)$widget_params['widget_show_likes_and_comments'];
77
+ $feed_row['show_usernames'] = '0';
78
+ $feed_row['display_header'] = '0';
79
+ $feed_row['show_description'] = '0';
80
+ $feed_row['number_of_columns'] = (string)$widget_params['number_of_columns'];
81
 
82
+ if ($widget_params['enable_loading_buttons'] == 0) {
83
+ $feed_row['feed_display_view'] = 'widget';
 
84
  }
85
+ }
86
 
87
+ if (isset($feed_row['published']) && $feed_row['published'] === '0') {
88
+ ob_get_clean();
89
+ return __('Unable to display unpublished feed ', "wdi");
90
+ }
91
+ //checking feed type and using proper MVC
92
+ $feed_type = isset($feed_row['feed_type']) ? $feed_row['feed_type'] : '';
93
+ switch ($feed_type) {
94
+ case 'thumbnails': {
95
+ //including thumbnails controller
96
+ require_once(WDI_DIR . '/frontend/controllers/WDIControllerThumbnails_view.php');
97
+ $controller = new WDIControllerThumbnails_view();
98
+ $controller->execute($feed_row, $wdi_feed_counter);
99
+ $wdi_feed_counter++;
100
+ break;
101
+ }
102
+ case 'image_browser': {
103
+ //including thumbnails controller
104
+ require_once(WDI_DIR . '/frontend/controllers/WDIControllerImageBrowser_view.php');
105
+ $controller = new WDIControllerImageBrowser_view();
106
+ $controller->execute($feed_row, $wdi_feed_counter);
107
+ $wdi_feed_counter++;
108
+ break;
109
+ }
110
+ default: {
111
  ob_get_clean();
112
+ return __('Invalid feed type', "wdi");
113
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
 
115
+ }
116
 
117
 
118
+ global $wdi_options;
119
+ if (isset($wdi_options['wdi_custom_css'])) {
120
+ ?>
121
+ <style>
122
+ <?php echo $wdi_options['wdi_custom_css'];?>
123
+ </style>
124
+ <?php
125
+ }
126
+ if (isset($wdi_options['wdi_custom_js'])) {
127
+ ?>
128
+ <script>
129
+ <?php echo htmlspecialchars_decode(stripcslashes($wdi_options['wdi_custom_js']));?>
130
+ </script>
131
+ <?php
132
+ }
133
 
134
 
135
+ return ob_get_clean();
136
  }
137
 
138
 
139
+ function wdi_load_frontend_scripts()
140
+ {
141
+
142
+ wp_enqueue_script('wdi_instagram', plugins_url('../js/wdi_instagram.js', __FILE__), array("jquery"), WDI_VERSION, true);
143
 
144
  wp_enqueue_script('underscore');
145
+ wp_enqueue_script('wdi_frontend', plugins_url('../js/wdi_frontend.js', __FILE__), array("jquery", 'wdi_instagram', 'underscore'), WDI_VERSION, true);
146
 
147
+ wp_enqueue_script('wdi_responsive', plugins_url('../js/wdi_responsive.js', __FILE__), array("jquery", "wdi_frontend"), WDI_VERSION, true);
148
+ wp_localize_script("wdi_frontend", 'wdi_ajax', array('ajax_url' => admin_url('admin-ajax.php')), WDI_VERSION);
149
+ wp_localize_script("wdi_frontend", 'wdi_url', array('plugin_url' => plugin_dir_url(__FILE__),
150
+ 'ajax_url' => admin_url('admin-ajax.php')), WDI_VERSION);
151
  wp_localize_script("wdi_frontend", 'wdi_front_messages',
152
+ array('connection_error' => __('Connection Error, try again later :(', 'wdi'),
153
+ 'user_not_found' => __('Username not found', 'wdi'),
154
+ 'network_error' => __('Network error, please try again later :(', 'wdi'),
155
+ 'hashtag_nodata' => __('There is no data for that hashtag', 'wdi'),
156
+ 'filter_title' => __('Click to filter images by this user', 'wdi')
157
+ ), WDI_VERSION);
158
 
159
 
160
  wdi_front_end_scripts();
161
  }
162
 
163
+ function wdi_load_frontend_styles()
164
+ {
165
  wp_register_style('wdi_frontend_thumbnails', plugins_url('../css/wdi_frontend.css', __FILE__));
166
  wp_enqueue_style('wdi_frontend_thumbnails');
167
  wp_register_style('font-awesome', plugins_url('../css/font-awesome/css/font-awesome.css', __FILE__));
170
 
171
 
172
  ////////////////////////////GALLERY BOX//////////////////////////////
173
+ function wdi_front_end_scripts()
174
+ {
175
  /* ttt!!! petq chi*/
176
  /*
177
  global $wp_scripts;
191
  /*ttt!!! gallery fullscreeni het conflict chka ?? arje stugel ete fullscreen script ka, apa el chavelacnel*/
192
  wp_enqueue_script('wdi_gallery_box', WDI_FRONT_URL . '/js/gallerybox/wdi_gallery_box.js', array('jquery'), WDI_VERSION);
193
  wp_localize_script('wdi_gallery_box', 'wdi_objectL10n', array(
194
+ 'wdi_field_required' => __('Field is required.', "wdi"),
195
+ 'wdi_mail_validation' => __('This is not a valid email address.', "wdi"),
196
+ 'wdi_search_result' => __('There are no images matching your search.', "wdi"),
197
+ ));
198
+
199
+ }
200
+
201
+ /*load all scripts and styles directly without dependency on jquery*/
202
+
203
+ function wdi_load_frontend_scripts_styles_ajax()
204
+ {
205
+
206
+ wp_dequeue_script('jquery');
207
+
208
+ wp_enqueue_script('wdi_instagram', plugins_url('../js/wdi_instagram.js', __FILE__), array(), WDI_VERSION, true);
209
+
210
+ wp_enqueue_script('underscore');
211
+ wp_enqueue_script('wdi_frontend', plugins_url('../js/wdi_frontend.js', __FILE__), array('wdi_instagram', 'underscore'), WDI_VERSION, true);
212
+ wp_enqueue_script('wdi_responsive', plugins_url('../js/wdi_responsive.js', __FILE__), array("wdi_instagram"), WDI_VERSION, true);
213
+
214
+
215
+
216
+ global $wdi_feed_counter_init;
217
+ $wdi_feed_counter_init = isset($wdi_feed_counter_init) ? $wdi_feed_counter_init : 0;
218
+ wp_localize_script("wdi_frontend", 'wdi_feed_counter_init', array('wdi_feed_counter_init' => $wdi_feed_counter_init), WDI_VERSION);
219
+
220
+ wp_localize_script("wdi_frontend", 'wdi_ajax', array('ajax_url' => admin_url('admin-ajax.php'), 'ajax_response' => 1), WDI_VERSION);
221
+ wp_localize_script("wdi_frontend", 'wdi_url', array('plugin_url' => plugin_dir_url(__FILE__),
222
+ 'ajax_url' => admin_url('admin-ajax.php')), WDI_VERSION);
223
+ wp_localize_script("wdi_frontend", 'wdi_front_messages',
224
+ array('connection_error' => __('Connection Error, try again later :(', 'wdi'),
225
+ 'user_not_found' => __('Username not found', 'wdi'),
226
+ 'network_error' => __('Network error, please try again later :(', 'wdi'),
227
+ 'hashtag_nodata' => __('There is no data for that hashtag', 'wdi'),
228
+ 'filter_title' => __('Click to filter images by this user', 'wdi')
229
+ ), WDI_VERSION);
230
+
231
+ // Styles/Scripts for popup.
232
+ wp_enqueue_script('wdi_jquery_mobile', WDI_FRONT_URL . '/js/gallerybox/jquery.mobile.js', array(), WDI_VERSION);
233
+ wp_enqueue_script('wdi_mCustomScrollbar', WDI_FRONT_URL . '/js/gallerybox/jquery.mCustomScrollbar.concat.min.js', array(), WDI_VERSION);
234
+ wp_enqueue_style('wdi_mCustomScrollbar', WDI_FRONT_URL . '/css/gallerybox/jquery.mCustomScrollbar.css', array(), WDI_VERSION);
235
+ wp_enqueue_script('jquery-fullscreen', WDI_FRONT_URL . '/js/gallerybox/jquery.fullscreen-0.4.1.js', array(), WDI_VERSION);
236
+ /*ttt!!! gallery fullscreeni het conflict chka ?? arje stugel ete fullscreen script ka, apa el chavelacnel*/
237
+ wp_enqueue_script('wdi_gallery_box', WDI_FRONT_URL . '/js/gallerybox/wdi_gallery_box.js', array(), WDI_VERSION);
238
+ wp_localize_script('wdi_gallery_box', 'wdi_objectL10n', array(
239
+ 'wdi_field_required' => __('Field is required.', "wdi"),
240
  'wdi_mail_validation' => __('This is not a valid email address.', "wdi"),
241
  'wdi_search_result' => __('There are no images matching your search.', "wdi"),
242
  ));
243
 
244
+
245
+ wdi_load_frontend_styles();
246
+
247
  }
248
 
249
  ?>
js/wdi_frontend.js CHANGED
@@ -3,17 +3,7 @@ if (typeof wdi_front == 'undefined') {
3
  type: 'not_declared'
4
  };
5
  }
6
- jQuery(document).ready(function ()
7
- {
8
- if (wdi_front['type'] != 'not_declared') {
9
- wdi_front.clickOrTouch = wdi_front.detectEvent();
10
- //initializing all feeds in the page
11
- wdi_front.globalInit();
12
- } else {
13
- return;
14
- }
15
 
16
- });
17
 
18
 
19
  wdi_front.detectEvent = function ()
@@ -30,8 +20,13 @@ wdi_front.globalInit = function ()
30
  {
31
  var num = wdi_front['feed_counter'];
32
 
33
-
34
- for (var i = 0; i <= num; i++) {
 
 
 
 
 
35
 
36
  var currentFeed = new WDIFeed(window['wdi_feed_' + i]);
37
 
@@ -136,7 +131,7 @@ wdi_front.globalInit = function ()
136
 
137
  window.onload = function ()
138
  {
139
- for (var i = 0; i <= wdi_front.feed_counter; i++) {
140
  window['wdi_feed_' + i]['nowLoadingImages'] = false;
141
  }
142
  }
@@ -3243,7 +3238,7 @@ WDIFeed.prototype.storeRawData = function (objects, variable)
3243
  }
3244
  }
3245
  else {
3246
-
3247
  /*strange bug sometimes happening in instagram API when user feed pagination is null*/
3248
  if(objects[i].pagination == null){
3249
  objects[i].pagination = [];
@@ -3368,3 +3363,38 @@ wdi_front.updateUsersIfNecessary = function (currentFeed)
3368
 
3369
 
3370
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  type: 'not_declared'
4
  };
5
  }
 
 
 
 
 
 
 
 
 
6
 
 
7
 
8
 
9
  wdi_front.detectEvent = function ()
20
  {
21
  var num = wdi_front['feed_counter'];
22
 
23
+ if(typeof wdi_ajax.ajax_response != "undefined"){
24
+ var init_feed_counter = wdi_feed_counter_init.wdi_feed_counter_init;
25
+ }
26
+ else{
27
+ var init_feed_counter = 0;
28
+ }
29
+ for (var i = init_feed_counter; i <= num; i++) {
30
 
31
  var currentFeed = new WDIFeed(window['wdi_feed_' + i]);
32
 
131
 
132
  window.onload = function ()
133
  {
134
+ for (var i = init_feed_counter; i <= wdi_front.feed_counter; i++) {
135
  window['wdi_feed_' + i]['nowLoadingImages'] = false;
136
  }
137
  }
3238
  }
3239
  }
3240
  else {
3241
+
3242
  /*strange bug sometimes happening in instagram API when user feed pagination is null*/
3243
  if(objects[i].pagination == null){
3244
  objects[i].pagination = [];
3363
 
3364
 
3365
 
3366
+
3367
+
3368
+
3369
+
3370
+ if(typeof wdi_ajax.ajax_response != "undefined"){
3371
+ jQuery( document ).one('ajaxStop', function() {
3372
+
3373
+ if (wdi_front['type'] != 'not_declared') {
3374
+
3375
+ wdi_front.clickOrTouch = wdi_front.detectEvent();
3376
+ //initializing all feeds in the page
3377
+ wdi_front.globalInit();
3378
+ } else {
3379
+ return;
3380
+ }
3381
+ });
3382
+
3383
+
3384
+ }
3385
+ else{
3386
+ jQuery(document).ready(function ()
3387
+ {
3388
+
3389
+
3390
+ if (wdi_front['type'] != 'not_declared') {
3391
+ wdi_front.clickOrTouch = wdi_front.detectEvent();
3392
+ //initializing all feeds in the page
3393
+ wdi_front.globalInit();
3394
+ } else {
3395
+ return;
3396
+ }
3397
+
3398
+ });
3399
+ }
3400
+
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, Instagram wall, lightbox, photos
5
  Requires at least: 3.9
6
  Tested up to: 4.7
7
- Stable tag: 1.1.19
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -107,6 +107,9 @@ After downloading the ZIP file of the Instagram Feed WD plugin,
107
 
108
  == Changelog ==
109
 
 
 
 
110
  = 1.1.19 =
111
  Fixed: Strange bug in Instagram API when user feed pagination is null, causing JS errors in frontend
112
 
4
  Tags: : custom instagram feed, feed, instagram, hashtag, Instagram feed, instagram gallery, instagram posts, Instagram images, Instagram photos, Instagram wall, lightbox, photos
5
  Requires at least: 3.9
6
  Tested up to: 4.7
7
+ Stable tag: 1.1.20
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
107
 
108
  == Changelog ==
109
 
110
+ = 1.1.20 =
111
+ New: Instagram feed displayed in AJAX-loaded content. AJAX request callback needs to call wp_footer() in the end.
112
+
113
  = 1.1.19 =
114
  Fixed: Strange bug in Instagram API when user feed pagination is null, causing JS errors in frontend
115
 
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.19
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.1.19');
24
  define('WDI_IS_PRO','false');
25
 
26
 
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.20
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.1.20');
24
  define('WDI_IS_PRO','false');
25
 
26