WD Instagram Feed – Instagram Gallery - Version 1.4.4

Version Description

Fixed: Decreased feed load time. Fixed: Business account.

Download this release

Release Info

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

Code changes from version 1.4.3 to 1.4.4

frontend/controllers/WDIControllerImageBrowser_view.php DELETED
@@ -1,36 +0,0 @@
1
- <?php
2
- class WDIControllerImageBrowser_view{
3
- ////////////////////////////////////////////////////////////////////////////////////////
4
- // Events //
5
- ////////////////////////////////////////////////////////////////////////////////////////
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- // Constants //
8
- ////////////////////////////////////////////////////////////////////////////////////////
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- // Variables //
11
- ////////////////////////////////////////////////////////////////////////////////////////
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- // Constructor & Destructor //
14
- ////////////////////////////////////////////////////////////////////////////////////////
15
- public function __construct() {
16
- }
17
- ////////////////////////////////////////////////////////////////////////////////////////
18
- // Public Methods //
19
- ////////////////////////////////////////////////////////////////////////////////////////
20
- public function execute($feed_row,$wdi_feed_counter){
21
- //including model
22
- require_once(WDI_DIR .'/frontend/models/WDIModelImageBrowser_view.php');
23
- $model = new WDIModelImageBrowser_view($feed_row,$wdi_feed_counter);
24
- //including view
25
- require_once(WDI_DIR .'/frontend/views/WDIViewImageBrowser_view.php');
26
- $view = new WDIViewImageBrowser_view($model);
27
- $view->display();
28
- }
29
-
30
-
31
-
32
-
33
-
34
-
35
- }
36
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
frontend/controllers/WDIControllerThumbnails_view.php DELETED
@@ -1,18 +0,0 @@
1
- <?php
2
- class WDIControllerThumbnails_view{
3
-
4
- public function __construct() {
5
- }
6
-
7
- public function execute($feed_row,$wdi_feed_counter){
8
- //including model
9
- require_once(WDI_DIR .'/frontend/models/WDIModelThumbnails_view.php');
10
- $model = new WDIModelThumbnails_view($feed_row,$wdi_feed_counter);
11
-
12
- //including view
13
- require_once(WDI_DIR .'/frontend/views/WDIViewThumbnails_view.php');
14
- $view = new WDIViewThumbnails_view($model);
15
- $view->display();
16
- }
17
- }
18
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
frontend/models/WDIModelImageBrowser_view.php DELETED
@@ -1,56 +0,0 @@
1
- <?php
2
- class WDIModelImageBrowser_view{
3
- ////////////////////////////////////////////////////////////////////////////////////////
4
- // Events //
5
- ////////////////////////////////////////////////////////////////////////////////////////
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- // Constants //
8
- ////////////////////////////////////////////////////////////////////////////////////////
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- // Variables //
11
- ////////////////////////////////////////////////////////////////////////////////////////
12
- private $feed_row;
13
- public $theme_row;
14
- public $wdi_feed_counter;
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- // Constructor & Destructor //
17
- ////////////////////////////////////////////////////////////////////////////////////////
18
- public function __construct($feed_row,$wdi_feed_counter) {
19
- $this->feed_row = $this->parseDefaults($feed_row);
20
- $this->wdi_feed_counter = $wdi_feed_counter;
21
- $this->theme_row=$this->setThemeDefaults();
22
- }
23
- ////////////////////////////////////////////////////////////////////////////////////////
24
- // Public Methods //
25
- ////////////////////////////////////////////////////////////////////////////////////////
26
- public function get_feed_row(){
27
- $this->feed_row['number_of_columns'] = 1;
28
- $this->feed_row['feed_display_view'] = 'pagination';
29
- $this->feed_row['resort_after_load_more'] = 0;
30
- $this->feed_row['disable_mobile_layout'] = 0;
31
- return $this->feed_row;
32
- }
33
- public function getThemeDefaults(){
34
- return $this->theme_row;
35
- }
36
- public function parseDefaults($args){
37
- require_once(WDI_DIR .'/admin/models/WDIModelFeeds_wdi.php');
38
- $defaults = WDIModelFeeds_wdi::wdi_get_feed_defaults();
39
- return wp_parse_args($args,$defaults);
40
- }
41
- private function setThemeDefaults(){
42
- require_once(WDI_DIR .'/admin/models/WDIModelThemes_wdi.php');
43
- $defaults = WDIModelThemes_wdi::get_theme_defaults();
44
- $theme_row = $this->get_theme_row($this->feed_row['theme_id']);
45
- return wp_parse_args($theme_row,$defaults);
46
- }
47
- public function get_theme_row($theme_id){
48
- require_once(WDI_DIR .'/admin/models/WDIModelThemes_wdi.php');
49
- $theme_row = WDIModelThemes_wdi::get_theme_row($theme_id);
50
- return WDILibrary::objectToArray($theme_row);
51
- }
52
-
53
-
54
-
55
- }
56
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
frontend/models/WDIModelThumbnails_view.php DELETED
@@ -1,52 +0,0 @@
1
- <?php
2
- class WDIModelThumbnails_view{
3
- ////////////////////////////////////////////////////////////////////////////////////////
4
- // Events //
5
- ////////////////////////////////////////////////////////////////////////////////////////
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- // Constants //
8
- ////////////////////////////////////////////////////////////////////////////////////////
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- // Variables //
11
- ////////////////////////////////////////////////////////////////////////////////////////
12
- private $feed_row;
13
- public $theme_row;
14
- public $wdi_feed_counter;
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- // Constructor & Destructor //
17
- ////////////////////////////////////////////////////////////////////////////////////////
18
- public function __construct($feed_row,$wdi_feed_counter) {
19
- $this->feed_row = $this->parseDefaults($feed_row);
20
- $this->wdi_feed_counter = $wdi_feed_counter;
21
- $this->theme_row=$this->setThemeDefaults();
22
- }
23
- ////////////////////////////////////////////////////////////////////////////////////////
24
- // Public Methods //
25
- ////////////////////////////////////////////////////////////////////////////////////////
26
- public function get_feed_row(){
27
- return $this->feed_row;
28
- }
29
- public function getThemeDefaults(){
30
- return $this->theme_row;
31
- }
32
- public function parseDefaults($args){
33
- require_once(WDI_DIR .'/admin/models/WDIModelFeeds_wdi.php');
34
- $defaults = WDIModelFeeds_wdi::wdi_get_feed_defaults();
35
- return wp_parse_args($args,$defaults);
36
- }
37
- private function setThemeDefaults(){
38
- require_once(WDI_DIR .'/admin/models/WDIModelThemes_wdi.php');
39
- $defaults = WDIModelThemes_wdi::get_theme_defaults();
40
- $theme_row = $this->get_theme_row($this->feed_row['theme_id']);
41
- return wp_parse_args($theme_row,$defaults);
42
- }
43
- public function get_theme_row($theme_id){
44
- require_once(WDI_DIR .'/admin/models/WDIModelThemes_wdi.php');
45
- $theme_row = WDIModelThemes_wdi::get_theme_row($theme_id);
46
- return WDILibrary::objectToArray($theme_row);
47
- }
48
-
49
-
50
-
51
- }
52
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
frontend/views/WDIViewImageBrowser_view.php DELETED
@@ -1,212 +0,0 @@
1
- <?php
2
- class WDIViewImageBrowser_view{
3
- ////////////////////////////////////////////////////////////////////////////////////////
4
- // Events //
5
- ////////////////////////////////////////////////////////////////////////////////////////
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- // Constants //
8
- ////////////////////////////////////////////////////////////////////////////////////////
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- // Variables //
11
- ////////////////////////////////////////////////////////////////////////////////////////
12
- private $model;
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct($model) {
17
- $this->model = $model;
18
- }
19
- ////////////////////////////////////////////////////////////////////////////////////////
20
- // Public Methods //
21
- ////////////////////////////////////////////////////////////////////////////////////////
22
- public function display(){
23
- $this->pass_feed_data_to_js();
24
- $feed_row = $this->model->get_feed_row();
25
- $wdi_feed_counter = $this->model->wdi_feed_counter;
26
- $this->add_theme_styles();
27
- $this->generate_feed_styles($feed_row);
28
- $style = $this->model->theme_row;
29
- $container_class = 'wdi_feed_theme_' . '1' . ' wdi_feed_browser_' . '1';
30
- $wdi_data_ajax = defined('DOING_AJAX') && DOING_AJAX ? 'data-wdi_ajax=1' : '';
31
-
32
- ?>
33
-
34
- <div id="wdi_feed_<?php echo $wdi_feed_counter?>" class="wdi_feed_main_container wdi_layout_ib <?php echo $container_class; ?>" <?php echo $wdi_data_ajax; ?> >
35
- <?php wdi_feed_frontend_messages();?>
36
- <div id="wdi_spider_popup_loading_<?php echo $wdi_feed_counter?>" class="wdi_spider_popup_loading"></div>
37
- <div id="wdi_spider_popup_overlay_<?php echo $wdi_feed_counter?>" class="wdi_spider_popup_overlay" onclick="wdi_spider_destroypopup(1000)"></div>
38
- <div class="wdi_feed_container">
39
- <div class="wdi_feed_info">
40
- <div id="wdi_feed_<?php echo $wdi_feed_counter?>_header" class='wdi_feed_header'></div>
41
- <div id="wdi_feed_<?php echo $wdi_feed_counter?>_users" class='wdi_feed_users'></div>
42
- </div>
43
- <?php
44
- if($feed_row['feed_display_view']==='pagination' && $style['pagination_position_vert']==='top'){
45
- ?><div id="wdi_pagination" class="wdi_pagination"><div class="wdi_pagination_container"><i id="wdi_first_page" title="<?php echo __('First Page',"wd-instagram-feed")?>" class="tenweb-i tenweb-i-step-backward wdi_pagination_ctrl wdi_disabled"></i><i id="wdi_prev" title="<?php echo __('Previous Page',"wd-instagram-feed")?>" class="tenweb-i tenweb-i-arrow-left wdi_pagination_ctrl"></i><i id="wdi_current_page" class="wdi_pagination_ctrl" style="font-style:normal">1</i><i id="wdi_next" title="<?php echo __('Next Page',"wd-instagram-feed")?>" class="tenweb-i tenweb-i-arrow-right wdi_pagination_ctrl"></i> <i id="wdi_last_page" title="<?php echo __('Last Page',"wd-instagram-feed")?>" class="tenweb-i tenweb-i-step-forward wdi_pagination_ctrl wdi_disabled"></i></div></div> <?php
46
- }
47
- ?>
48
- <div class="wdi_feed_wrapper <?php echo 'wdi_col_'.$feed_row['number_of_columns']?>" wdi-res='<?php echo 'wdi_col_'.$feed_row['number_of_columns']?>'></div>
49
- <div class="wdi_clear"></div>
50
- <?php switch($feed_row['feed_display_view']){
51
- case 'load_more_btn':{
52
- ?><div class="wdi_load_more"><div class="wdi_load_more_container"><div class="wdi_load_more_wrap"><div class="wdi_load_more_wrap_inner"><div class="wdi_load_more_text"><?php echo __('Load More',"wd-instagram-feed");?></div></div></div></div></div><?php
53
- break;
54
- }
55
- case 'pagination':{
56
- if($style['pagination_position_vert']==='bottom'){
57
- ?><div id="wdi_pagination" class="wdi_pagination"><div class="wdi_pagination_container"><i id="wdi_first_page" title="<?php echo __('First Page',"wd-instagram-feed")?>" class="tenweb-i tenweb-i-step-backward wdi_pagination_ctrl wdi_disabled"></i><i id="wdi_prev" title="<?php echo __('Previous Page',"wd-instagram-feed")?>" class="tenweb-i tenweb-i-arrow-left wdi_pagination_ctrl"></i><i id="wdi_current_page" class="wdi_pagination_ctrl" style="font-style:normal">1</i><i id="wdi_next" title="<?php echo __('Next Page',"wd-instagram-feed")?>" class="tenweb-i tenweb-i-arrow-right wdi_pagination_ctrl"></i> <i id="wdi_last_page" title="<?php echo __('Last Page',"wd-instagram-feed")?>" class="tenweb-i tenweb-i-step-forward wdi_pagination_ctrl wdi_disabled"></i></div></div> <?php
58
- }
59
-
60
- break;
61
- }
62
- case 'infinite_scroll':{
63
- ?><div id="wdi_infinite_scroll" class="wdi_infinite_scroll"></div> <?php
64
- }
65
- }
66
- ?>
67
- </div>
68
- <div class="wdi_front_overlay"></div>
69
- </div>
70
- <?php
71
-
72
- }
73
- public function pass_feed_data_to_js(){
74
- global $wdi_options;
75
- $feed_row = $this->model->get_feed_row();
76
-
77
- $users = isset($feed_row['feed_users']) ? json_decode($feed_row['feed_users']) : null;
78
- if($users === null) {
79
- $users = array();
80
- }
81
-
82
- $wdi_feed_counter = $this->model->wdi_feed_counter;
83
- $feed_row['access_token'] = WDILibrary::get_user_access_token($users);
84
- $feed_row['wdi_feed_counter'] = $wdi_feed_counter;
85
-
86
- wp_localize_script("wdi_frontend", 'wdi_feed_'.$wdi_feed_counter,array('feed_row'=>$feed_row,'data'=>array(),'usersData'=>array(),'dataCount'=>0));
87
- wp_localize_script("wdi_frontend", 'wdi_theme_' . $this->model->theme_row['id'], $this->model->theme_row);
88
- wp_localize_script("wdi_frontend", 'wdi_front',array('feed_counter'=>$wdi_feed_counter));
89
-
90
- if(WDILibrary::is_ajax() || WDILibrary::elementor_is_active()) {
91
- wdi_load_frontend_scripts_ajax();
92
- }
93
- }
94
-
95
-
96
- private function add_theme_styles(){
97
-
98
- if(WDILibrary::is_ajax() || WDILibrary::elementor_is_active()) {
99
- $style_tag = "<link rel='stylesheet' id='%s' href='%s' type='text/css' media='all' />";
100
- echo sprintf($style_tag, 'wdi_default_theme', WDI_URL . '/css/default_theme.css' . '?ver=' . WDI_VERSION);
101
- } else {
102
- wp_enqueue_style("wdi_default_theme",WDI_URL . '/css/default_theme.css',array(),WDI_VERSION);
103
- }
104
-
105
- /*THIS METHOD FOR PAID VERSION*/
106
- }
107
-
108
- /**
109
- * @param $generator WDI_generate_styles
110
- * @return boolean
111
- * */
112
- private function load_theme_css_file($generator){
113
- /*THIS METHOD FOR PAID VERSION*/
114
- return false;
115
- }
116
-
117
- public function generate_feed_styles($feed_row)
118
- {
119
- $style = $this->model->theme_row;
120
- $colNum = (100/$feed_row['number_of_columns']);
121
- $wdi_feed_counter = $this->model->wdi_feed_counter;
122
- ?>
123
- <style type="text/css">
124
-
125
- #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_header{
126
- display: <?php echo ($feed_row['display_header']=='1')? 'block' : 'none'?>; /*if display-header is true display:block*/
127
- }
128
-
129
- <?php
130
-
131
- if($feed_row['display_user_post_follow_number'] == '1'){
132
- $header_text_padding =(intval($style['user_img_width']) - intval($style['users_text_font_size']))/4;
133
- }else{
134
- $header_text_padding =(intval($style['user_img_width']) - intval($style['users_text_font_size']))/2;
135
- }
136
- ?>
137
- #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_header_user_text {
138
- padding-top: <?php echo $header_text_padding; ?>px;
139
-
140
- }
141
-
142
- #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_header_user_text h3 {
143
- margin-top: <?php echo $header_text_padding ?>px;
144
- }
145
-
146
- #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_media_info{
147
- display: <?php echo ($feed_row['display_user_post_follow_number'] == '1') ? 'block' : 'none'; ?>
148
- }
149
-
150
- #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item{
151
- width: <?php echo $colNum.'%'?>;/*thumbnail_size*/
152
- }
153
-
154
- <?php if($feed_row['disable_mobile_layout']=="0"){
155
- ?>
156
- @media screen and (min-width: 800px) and (max-width:1024px){
157
- #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item{
158
- width: <?php echo ($colNum<33.33) ? '33.333333333333%' : $colNum.'%'?>;/*thumbnail_size*/
159
- margin: 0;
160
- display: inline-block;
161
- vertical-align: top;
162
- overflow: hidden;
163
- }
164
-
165
- #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_container {
166
- width: 100%;
167
- margin: 0 auto;
168
- background-color: <?php echo $style['feed_container_bg_color']?>;/*feed_container_bg_color*/
169
- }
170
-
171
- }
172
-
173
- @media screen and (min-width: 480px) and (max-width:800px){
174
- #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item{
175
- width: <?php echo ($colNum<50) ? '50%' : $colNum.'%'?>;/*thumbnail_size*/
176
- margin: 0;
177
- display: inline-block;
178
- overflow: hidden;
179
- }
180
-
181
- #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_container {
182
- width: 100%;
183
- margin: 0 auto;
184
- background-color: <?php echo $style['feed_container_bg_color']?>;/*feed_container_bg_color*/
185
- }
186
- }
187
-
188
- @media screen and (max-width: 480px){
189
- #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item{
190
- width: <?php echo ($colNum<100) ? '100%' : $colNum.'%'?>;/*thumbnail_size*/
191
- margin: 0;
192
- display: inline-block;
193
- overflow: hidden;
194
- }
195
-
196
- #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_container {
197
- width: 100%;
198
- margin: 0 auto;
199
- background-color: <?php echo $style['feed_container_bg_color']?>;/*feed_container_bg_color*/
200
- }
201
- }
202
-
203
- <?php
204
- }?>
205
- </style>
206
- <?php
207
- }
208
-
209
-
210
- }
211
-
212
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
frontend/views/WDIViewThumbnails_view.php DELETED
@@ -1,249 +0,0 @@
1
- <?php
2
-
3
- class WDIViewThumbnails_view
4
- {
5
- private $model;
6
-
7
- public function __construct($model)
8
- {
9
- $this->model = $model;
10
- }
11
-
12
- public function display()
13
- {
14
-
15
- $this->pass_feed_data_to_js();
16
- $feed_row = $this->model->get_feed_row();
17
- $wdi_feed_counter = $this->model->wdi_feed_counter;
18
- $this->add_theme_styles();
19
- $this->generate_feed_styles($feed_row);
20
- $style = $this->model->theme_row;
21
- $container_class = 'wdi_feed_theme_' . '1' . ' wdi_feed_thumbnail_' . '1';
22
- $wdi_data_ajax = defined('DOING_AJAX') && DOING_AJAX ? 'data-wdi_ajax=1' : '';
23
- ?>
24
- <div id="wdi_feed_<?php echo $wdi_feed_counter ?>" class="wdi_feed_main_container wdi_layout_th <?php echo $container_class; ?>" <?php echo $wdi_data_ajax; ?> >
25
- <?php wdi_feed_frontend_messages();?>
26
- <div id="wdi_spider_popup_loading_<?php echo $wdi_feed_counter ?>" class="wdi_spider_popup_loading"></div>
27
- <div id="wdi_spider_popup_overlay_<?php echo $wdi_feed_counter ?>" class="wdi_spider_popup_overlay"
28
- onclick="wdi_spider_destroypopup(1000)"></div>
29
- <div class="wdi_feed_container">
30
- <div class="wdi_feed_info">
31
- <div id="wdi_feed_<?php echo $wdi_feed_counter ?>_header" class='wdi_feed_header'></div>
32
- <div id="wdi_feed_<?php echo $wdi_feed_counter ?>_users" class='wdi_feed_users'></div>
33
- </div>
34
- <?php
35
- if ($feed_row['feed_display_view'] === 'pagination' && $style['pagination_position_vert'] === 'top') {
36
- ?>
37
- <div id="wdi_pagination" class="wdi_pagination">
38
- <div class="wdi_pagination_container"><i id="wdi_first_page"
39
- title="<?php echo __('First Page', "wd-instagram-feed") ?>"
40
- class="tenweb-i tenweb-i-step-backward wdi_pagination_ctrl wdi_disabled"></i><i
41
- id="wdi_prev" title="<?php echo __('Previous Page', "wd-instagram-feed") ?>"
42
- class="tenweb-i tenweb-i-arrow-left wdi_pagination_ctrl"></i><i id="wdi_current_page" class="wdi_pagination_ctrl"
43
- style="font-style:normal">1</i><i id="wdi_next"
44
- title="<?php echo __('Next Page', "wd-instagram-feed") ?>"
45
- class="tenweb-i tenweb-i-arrow-right wdi_pagination_ctrl"></i>
46
- <i id="wdi_last_page" title="<?php echo __('Last Page', "wd-instagram-feed") ?>"
47
- class="tenweb-i tenweb-i-step-forward wdi_pagination_ctrl wdi_disabled"></i>
48
- </div>
49
- </div>
50
- <?php
51
- }
52
- ?>
53
- <div class="wdi_feed_wrapper <?php echo 'wdi_col_' . $feed_row['number_of_columns'] ?>" wdi-res='<?php echo 'wdi_col_' . $feed_row['number_of_columns'] ?>'></div>
54
- <div class="wdi_clear"></div>
55
- <?php switch ($feed_row['feed_display_view']) {
56
- case 'load_more_btn': {
57
- ?>
58
- <div class="wdi_load_more wdi_hidden">
59
- <div class="wdi_load_more_container">
60
- <div class="wdi_load_more_wrap">
61
- <div class="wdi_load_more_wrap_inner">
62
- <div class="wdi_load_more_text"><?php echo __('Load More', "wd-instagram-feed"); ?></div>
63
- </div>
64
- </div>
65
- </div>
66
- </div>
67
- <div class="wdi_spinner ">
68
- <div class="wdi_spinner_container">
69
- <div class="wdi_spinner_wrap">
70
- <div class="wdi_spinner_wrap_inner"><i class="wdi_load_more_spinner tenweb-i tenweb-i-spinner"></i></div>
71
- </div>
72
- </div>
73
- </div>
74
- <?php
75
- break;
76
- }
77
- case 'pagination': {
78
- if ($style['pagination_position_vert'] === 'bottom') {
79
- ?>
80
- <div id="wdi_pagination" class="wdi_pagination">
81
- <div class="wdi_pagination_container"><i id="wdi_first_page"
82
- title="<?php echo __('First Page', "wd-instagram-feed") ?>"
83
- class="tenweb-i tenweb-i-step-backward wdi_disabled wdi_pagination_ctrl"></i><i
84
- id="wdi_prev" title="<?php echo __('Previous Page', "wd-instagram-feed") ?>"
85
- class="tenweb-i tenweb-i-arrow-left wdi_pagination_ctrl"></i><i id="wdi_current_page" class="wdi_pagination_ctrl"
86
- style="font-style:normal">1</i><i id="wdi_next"
87
- title="<?php echo __('Next Page', "wd-instagram-feed") ?>"
88
- class="tenweb-i tenweb-i-arrow-right wdi_pagination_ctrl"></i>
89
- <i id="wdi_last_page" title="<?php echo __('Last Page', "wd-instagram-feed") ?>"
90
- class="tenweb-i tenweb-i-step-forward wdi_pagination_ctrl wdi_disabled"></i></div></div> <?php
91
- }
92
-
93
- break;
94
- }
95
- case 'infinite_scroll': {
96
- ?>
97
- <div id="wdi_infinite_scroll" class="wdi_infinite_scroll"></div> <?php
98
- }
99
- }
100
- ?>
101
- </div>
102
- <div class="wdi_front_overlay"></div>
103
- </div>
104
- <?php
105
- }
106
-
107
- public function pass_feed_data_to_js()
108
- {
109
- global $wdi_options;
110
- $feed_row = $this->model->get_feed_row();
111
-
112
- $users = isset($feed_row['feed_users']) ? json_decode($feed_row['feed_users']) : null;
113
- if($users === null) {
114
- $users = array();
115
- }
116
-
117
- $feed_row = $this->model->get_feed_row();
118
- $wdi_feed_counter = $this->model->wdi_feed_counter;
119
- $feed_row['access_token'] = WDILibrary::get_user_access_token($users);
120
- $feed_row['wdi_feed_counter'] = $wdi_feed_counter;
121
-
122
- wp_localize_script("wdi_frontend", 'wdi_feed_' . $wdi_feed_counter, array('feed_row' => $feed_row, 'data' => array(), 'usersData' => array(), 'dataCount' => 0));
123
- wp_localize_script("wdi_frontend", 'wdi_theme_' . $this->model->theme_row['id'], $this->model->theme_row);
124
- wp_localize_script("wdi_frontend", 'wdi_front', array('feed_counter' => $wdi_feed_counter));
125
-
126
- if(WDILibrary::is_ajax() || WDILibrary::elementor_is_active()) {
127
- wdi_load_frontend_scripts_ajax();
128
- }
129
- }
130
-
131
- private function add_theme_styles(){
132
-
133
- if(WDILibrary::is_ajax() || WDILibrary::elementor_is_active()) {
134
- $style_tag = "<link rel='stylesheet' id='%s' href='%s' type='text/css' media='all' />";
135
- echo sprintf($style_tag, 'wdi_default_theme', WDI_URL . '/css/default_theme.css' . '?ver=' . WDI_VERSION);
136
- } else {
137
- wp_enqueue_style("wdi_default_theme",WDI_URL . '/css/default_theme.css',array(),WDI_VERSION);
138
- }
139
-
140
- /*THIS METHOD FOR PAID VERSION*/
141
- }
142
-
143
- /**
144
- * @param $generator WDI_generate_styles
145
- * @return boolean
146
- * */
147
- private function load_theme_css_file($generator){
148
- /*THIS METHOD FOR PAID VERSION*/
149
- return false;
150
- }
151
-
152
- public function generate_feed_styles($feed_row)
153
- {
154
- $style = $this->model->theme_row;
155
- $wdi_feed_counter = $this->model->wdi_feed_counter;
156
- $colNum = (100 / $feed_row['number_of_columns']);
157
- ?>
158
- <style type="text/css">
159
-
160
- #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_header {
161
- display: <?php echo ($feed_row['display_header']=='1')? 'block' : 'none'?>; /*if display-header is true display:block*/
162
- }
163
-
164
- <?php
165
-
166
- if($feed_row['display_user_post_follow_number'] == '1'){
167
- $header_text_padding =(intval($style['user_img_width']) - intval($style['users_text_font_size']))/4;
168
- }else{
169
- $header_text_padding =(intval($style['user_img_width']) - intval($style['users_text_font_size']))/2;
170
- }
171
- ?>
172
- #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_header_user_text {
173
- padding-top: <?php echo $header_text_padding; ?>px;
174
-
175
- }
176
-
177
- #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_header_user_text h3 {
178
- margin-top: <?php echo $header_text_padding ?>px;
179
- }
180
-
181
- #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_media_info {
182
- display: <?php echo ($feed_row['display_user_post_follow_number'] == '1') ? 'block' : 'none'; ?>
183
- }
184
-
185
- #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item {
186
- width: <?php echo $colNum.'%'?>; /*thumbnail_size*/
187
- }
188
-
189
-
190
- <?php if($feed_row['disable_mobile_layout']=="0"){
191
- ?>
192
- @media screen and (min-width: 800px) and (max-width: 1024px) {
193
- #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item {
194
- width: <?php echo ($colNum<33.33) ? '33.333333333333%' : $colNum.'%'?>; /*thumbnail_size*/
195
- margin: 0;
196
- display: inline-block;
197
- vertical-align: top;
198
- overflow: hidden;
199
- }
200
-
201
- #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_container {
202
- width: 100%;
203
- margin: 0 auto;
204
- background-color: <?php echo $style['feed_container_bg_color']?>; /*feed_container_bg_color*/
205
- }
206
-
207
- }
208
-
209
- @media screen and (min-width: 480px) and (max-width: 800px) {
210
- #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item {
211
- width: <?php echo ($colNum<50) ? '50%' : $colNum.'%'?>; /*thumbnail_size*/
212
- margin: 0;
213
- display: inline-block;
214
- vertical-align: top;
215
- overflow: hidden;
216
- }
217
-
218
- #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_container {
219
- width: 100%;
220
- margin: 0 auto;
221
- background-color: <?php echo $style['feed_container_bg_color']?>; /*feed_container_bg_color*/
222
- }
223
- }
224
-
225
- @media screen and (max-width: 480px) {
226
- #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_item {
227
- width: <?php echo ($colNum<100) ? '100%' : $colNum.'%'?>; /*thumbnail_size*/
228
- margin: 0;
229
- display: inline-block;
230
- vertical-align: top;
231
- overflow: hidden;
232
- }
233
-
234
- #wdi_feed_<?php echo $wdi_feed_counter?> .wdi_feed_container {
235
- width: 100%;
236
- margin: 0 auto;
237
- background-color: <?php echo $style['feed_container_bg_color']?>; /*feed_container_bg_color*/
238
- }
239
- }
240
-
241
- <?php } ?>
242
- </style>
243
- <?php
244
- }
245
-
246
-
247
- }
248
-
249
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: custom instagram feed, feed, instagram, hashtag, Instagram feed, instagram
4
  Requires at least: 3.9
5
  Requires PHP: 5.2
6
  Tested up to: 5.5
7
- Stable tag: 1.4.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -505,6 +505,10 @@ Please make sure you don't have any important information before you proceed.
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
  = 1.4.3 =
509
  Fixed: Getting User's metadata.
510
  Fixed: Reset access token.
4
  Requires at least: 3.9
5
  Requires PHP: 5.2
6
  Tested up to: 5.5
7
+ Stable tag: 1.4.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
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
+ = 1.4.4 =
509
+ Fixed: Decreased feed load time.
510
+ Fixed: Business account.
511
+
512
  = 1.4.3 =
513
  Fixed: Getting User's metadata.
514
  Fixed: Reset access token.
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.4.3
7
  Author: 10Web
8
  Author URI: https://10Web.io/plugins/?utm_source=instagram_feed&utm_medium=free_plugin
9
  License: GPLv2 or later
@@ -20,7 +20,7 @@ define("WDI_TSN", 'wdi_theme_settings');
20
  define("WDI_META", '_' . WDI_VAR . '_meta');
21
  define('WDI_FEED_TABLE', 'wdi_feeds');
22
  define('WDI_THEME_TABLE', 'wdi_themes');
23
- define('WDI_VERSION', '1.4.3');
24
  define('WD_WDI_PREFIX', 'wdi' );
25
  define('WDI_IS_PRO', false );
26
  $wdi_minify = (isset($_GET['wdi_no_minify']) && $_GET['wdi_no_minify'] == 'true') ? FALSE : TRUE;
@@ -300,16 +300,17 @@ function wdi_privacy_policy() {
300
  );
301
  }
302
 
303
- add_filter('cron_schedules', 'wdi_autoupdate_interval' );
304
  function wdi_autoupdate_interval( $schedules ) {
305
  $schedules['wdi_autoupdate_interval'] = array(
306
- 'interval' => 30, // 84,960 59 days
307
  'display' => __('Instagram Feed token autoupdate interval.', 'wd-instagram-feed'),
308
  );
 
309
  return $schedules;
310
  }
311
 
312
- add_action('wdi_schedule_event_hook', 'wdi_schedule_events' );
313
  function wdi_schedule_events() {
314
  require_once(WDI_DIR . '/framework/WDILibrary.php');
315
  WDILibrary::refresh_instagram_access_token();
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.4.4
7
  Author: 10Web
8
  Author URI: https://10Web.io/plugins/?utm_source=instagram_feed&utm_medium=free_plugin
9
  License: GPLv2 or later
20
  define("WDI_META", '_' . WDI_VAR . '_meta');
21
  define('WDI_FEED_TABLE', 'wdi_feeds');
22
  define('WDI_THEME_TABLE', 'wdi_themes');
23
+ define('WDI_VERSION', '1.4.4');
24
  define('WD_WDI_PREFIX', 'wdi' );
25
  define('WDI_IS_PRO', false );
26
  $wdi_minify = (isset($_GET['wdi_no_minify']) && $_GET['wdi_no_minify'] == 'true') ? FALSE : TRUE;
300
  );
301
  }
302
 
303
+ add_filter('cron_schedules', 'wdi_autoupdate_interval');
304
  function wdi_autoupdate_interval( $schedules ) {
305
  $schedules['wdi_autoupdate_interval'] = array(
306
+ 'interval' => 2592000, // 30 days
307
  'display' => __('Instagram Feed token autoupdate interval.', 'wd-instagram-feed'),
308
  );
309
+
310
  return $schedules;
311
  }
312
 
313
+ add_action('wdi_schedule_event_hook', 'wdi_schedule_events');
314
  function wdi_schedule_events() {
315
  require_once(WDI_DIR . '/framework/WDILibrary.php');
316
  WDILibrary::refresh_instagram_access_token();