WD Instagram Feed – Instagram Gallery - Version 1.4.25

Version Description

Download this release

Release Info

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

Code changes from version 1.4.24 to 1.4.25

admin/controllers/WDIControllerEditorShortcode.php CHANGED
@@ -1,23 +1,7 @@
1
  <?php
2
 
3
  class WDIControllerEditorShortcode {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
  public function execute() {
22
  $this->display();
23
  }
@@ -30,14 +14,4 @@ class WDIControllerEditorShortcode {
30
  $view = new WDIViewEditorShortcode($model);
31
  $view->display();
32
  }
33
-
34
- ////////////////////////////////////////////////////////////////////////////////////////
35
- // Getters & Setters //
36
- ////////////////////////////////////////////////////////////////////////////////////////
37
- ////////////////////////////////////////////////////////////////////////////////////////
38
- // Private Methods //
39
- ////////////////////////////////////////////////////////////////////////////////////////
40
- ////////////////////////////////////////////////////////////////////////////////////////
41
- // Listeners //
42
- ////////////////////////////////////////////////////////////////////////////////////////
43
  }
1
  <?php
2
 
3
  class WDIControllerEditorShortcode {
4
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  public function execute() {
6
  $this->display();
7
  }
14
  $view = new WDIViewEditorShortcode($model);
15
  $view->display();
16
  }
 
 
 
 
 
 
 
 
 
 
17
  }
admin/controllers/feeds.php CHANGED
@@ -35,11 +35,12 @@ class Feeds_controller_wdi {
35
  else {
36
  $search_value = WDILibrary::get('search_value');
37
  if ( $search_value != '' ) {
38
- WDILibrary::wdi_spider_redirect(add_query_arg(array(
39
- 'page' => WDILibrary::get('page'),
40
- 'task' => 'display',
41
- 'search' => $search_value,
42
- ), admin_url('admin.php')));
 
43
  }
44
  else {
45
  $this->display();
35
  else {
36
  $search_value = WDILibrary::get('search_value');
37
  if ( $search_value != '' ) {
38
+
39
+ wp_redirect( add_query_arg( array(
40
+ 'page' => WDILibrary::get('page'),
41
+ 'task' => 'display',
42
+ 'search' => $search_value,
43
+ ), admin_url('admin.php')) );
44
  }
45
  else {
46
  $this->display();
admin/controllers/settings.php CHANGED
@@ -56,7 +56,7 @@ class Settings_controller_wdi {
56
  $post = WDILibrary::get(WDI_OPT);
57
  $wdi_options = wdi_get_options();
58
  $wdi_options['wdi_upd_microtime'] = microtime();
59
- $wdi_options['wdi_transient_time'] = intval($post['wdi_transient_time']);
60
  $wdi_options['wdi_feeds_min_capability'] = $post['wdi_feeds_min_capability'];
61
  $wdi_options['wdi_custom_css'] = esc_js(str_replace(array( "\n", "\r" ), "", $post['wdi_custom_css']));
62
  $wdi_options['wdi_custom_js'] = esc_js(str_replace(array( "\n", "\r" ), "", $post['wdi_custom_js']));
56
  $post = WDILibrary::get(WDI_OPT);
57
  $wdi_options = wdi_get_options();
58
  $wdi_options['wdi_upd_microtime'] = microtime();
59
+ $wdi_options['wdi_transient_time'] = (intval($post['wdi_transient_time']) < 10 ) ? 2880 : intval($post['wdi_transient_time']);
60
  $wdi_options['wdi_feeds_min_capability'] = $post['wdi_feeds_min_capability'];
61
  $wdi_options['wdi_custom_css'] = esc_js(str_replace(array( "\n", "\r" ), "", $post['wdi_custom_css']));
62
  $wdi_options['wdi_custom_js'] = esc_js(str_replace(array( "\n", "\r" ), "", $post['wdi_custom_js']));
admin/views/WDIViewEditorShortcode.php CHANGED
@@ -81,7 +81,7 @@ class WDIViewEditorShortcode {
81
  <span class="table-cell">
82
  <select name="wdi_feed_select" onchange="wdi_selectChange()" id="wdi_feed_select">
83
  <?php foreach ($rows as $row) { ?>
84
- <option value="<?php echo $row['id'] ?>"><?php echo $row["feed_name"]?></option>
85
  <?php } ?>
86
  </select>
87
  <button id="wdi_editor_insert_btn" class="wdi_editor_insert wd-button button-primary">Insert</button>
81
  <span class="table-cell">
82
  <select name="wdi_feed_select" onchange="wdi_selectChange()" id="wdi_feed_select">
83
  <?php foreach ($rows as $row) { ?>
84
+ <option value="<?php echo esc_attr($row['id']) ?>"><?php echo esc_html($row["feed_name"]) ?></option>
85
  <?php } ?>
86
  </select>
87
  <button id="wdi_editor_insert_btn" class="wdi_editor_insert wd-button button-primary">Insert</button>
admin/views/WDIViewWidget.php CHANGED
@@ -66,26 +66,26 @@ class WDIViewWidget {
66
  ?>
67
 
68
  <p>
69
- <label for="<?php echo $id_title; ?>"><?php _e("Title", 'wd-instagram-feed'); ?></label>
70
- <input class="widefat" id="<?php echo $id_title; ?>" name="<?php echo $name_title; ?>" type="text" value="<?php echo $instance['title']; ?>"/>
71
  </p>
72
  <p>
73
- <label for="<?php echo $id_feed_id; ?>"><?php _e("Feed", 'wd-instagram-feed'); ?></label>
74
- <select onchange="wdi_toggle(jQuery(this));" class="widefat" id="<?php echo $id_feed_id; ?>" name="<?php echo $name_feed_id; ?>" >
75
  <?php foreach ($feeds as $feed) {
76
  ?>
77
- <option <?php if($instance['feed_id'] == $feed['id']) echo 'selected'?> value="<?php echo $feed['id'];?>"><?php echo $feed['feed_name'];?></option>
78
  <?php
79
  }?>
80
  </select>
81
  </p>
82
 
83
  <p class="wdi_number_of_columns">
84
- <label for="<?php echo $id_number_of_columns; ?>"><?php _e("Number of columns", 'wd-instagram-feed'); ?></label>
85
- <select class="widefat" id="<?php echo $id_number_of_columns; ?>" name="<?php echo $name_number_of_columns; ?>" >
86
  <?php for ($k = 1 ;$k <= 10; $k++) {
87
  ?>
88
- <option <?php if($instance['number_of_columns'] == $k) echo 'selected'?> value="<?php echo $k?>"><?php echo $k;?></option>
89
  <?php
90
  }?>
91
  </select>
@@ -93,20 +93,20 @@ class WDIViewWidget {
93
 
94
 
95
  <p>
96
- <label for="<?php echo $id_img_number; ?>"><?php _e("Number of images to show", 'wd-instagram-feed'); ?></label>
97
- <input class="widefat" id="<?php echo $id_img_number; ?>" name="<?php echo $name_img_number; ?>" type="text" value="<?php echo $instance['img_number']; ?>"/>
98
  </p>
99
  <p>
100
- <input <?php if($instance['show_description']=='1') echo "checked"?> class="widefat" id="<?php echo $id_show_description; ?>" name="<?php echo $name_show_description; ?>" type="checkbox" value="<?php echo $instance['show_description']; ?>"/>
101
- <label for="<?php echo $id_show_description; ?>"><?php _e("Show Description", 'wd-instagram-feed'); ?></label>
102
  </p>
103
  <p>
104
- <input <?php if($instance['show_likes_comments']=='1') echo "checked"?> class="widefat" id="<?php echo $id_show_likes_comments; ?>" name="<?php echo $name_show_likes_comments; ?>" type="checkbox" value="<?php echo $instance['show_likes_comments']; ?>"/>
105
- <label for="<?php echo $id_show_likes_comments; ?>"><?php _e("Show likes and comments", 'wd-instagram-feed'); ?></label>
106
  </p>
107
  <p>
108
- <input <?php if($instance['enable_loading_buttons']=='1') echo "checked"?> class="widefat" id="<?php echo $id_enable_loading_buttons; ?>" name="<?php echo $name_enable_loading_buttons; ?>" type="checkbox" value="<?php echo $instance['enable_loading_buttons']; ?>"/>
109
- <label for="<?php echo $id_enable_loading_buttons; ?>"><?php _e("Enable loading new images", 'wd-instagram-feed'); ?></label>
110
  </p>
111
  <script>
112
  jQuery(document).ready(function(){
66
  ?>
67
 
68
  <p>
69
+ <label for="<?php echo esc_attr($id_title); ?>"><?php _e("Title", 'wd-instagram-feed'); ?></label>
70
+ <input class="widefat" id="<?php echo sanitize_html_class($id_title); ?>" name="<?php echo esc_attr($name_title); ?>" type="text" value="<?php echo esc_attr($instance['title']); ?>"/>
71
  </p>
72
  <p>
73
+ <label for="<?php echo esc_attr($id_feed_id); ?>"><?php _e("Feed", 'wd-instagram-feed'); ?></label>
74
+ <select onchange="wdi_toggle(jQuery(this));" class="widefat" id="<?php echo sanitize_html_class($id_feed_id); ?>" name="<?php echo esc_attr($name_feed_id); ?>" >
75
  <?php foreach ($feeds as $feed) {
76
  ?>
77
+ <option <?php if($instance['feed_id'] == $feed['id']) echo 'selected'?> value="<?php echo esc_attr($feed['id']);?>"><?php echo esc_html($feed['feed_name']);?></option>
78
  <?php
79
  }?>
80
  </select>
81
  </p>
82
 
83
  <p class="wdi_number_of_columns">
84
+ <label for="<?php echo esc_attr($id_number_of_columns); ?>"><?php _e("Number of columns", 'wd-instagram-feed'); ?></label>
85
+ <select class="widefat" id="<?php echo sanitize_html_class($id_number_of_columns); ?>" name="<?php echo esc_attr($name_number_of_columns); ?>" >
86
  <?php for ($k = 1 ;$k <= 10; $k++) {
87
  ?>
88
+ <option <?php if($instance['number_of_columns'] == $k) echo 'selected'?> value="<?php echo esc_attr($k) ?>"><?php echo esc_html($k); ?></option>
89
  <?php
90
  }?>
91
  </select>
93
 
94
 
95
  <p>
96
+ <label for="<?php echo esc_attr($id_img_number); ?>"><?php _e("Number of images to show", 'wd-instagram-feed'); ?></label>
97
+ <input class="widefat" id="<?php echo sanitize_html_class($id_img_number); ?>" name="<?php echo esc_attr($name_img_number); ?>" type="text" value="<?php echo esc_attr($instance['img_number']); ?>"/>
98
  </p>
99
  <p>
100
+ <input <?php if($instance['show_description']=='1') echo "checked"?> class="widefat" id="<?php echo sanitize_html_class($id_show_description); ?>" name="<?php echo esc_attr($name_show_description); ?>" type="checkbox" value="<?php echo esc_attr($instance['show_description']); ?>"/>
101
+ <label for="<?php echo esc_attr($id_show_description); ?>"><?php _e("Show Description", 'wd-instagram-feed'); ?></label>
102
  </p>
103
  <p>
104
+ <input <?php if($instance['show_likes_comments']=='1') echo "checked"?> class="widefat" id="<?php echo sanitize_html_class($id_show_likes_comments); ?>" name="<?php echo esc_attr($name_show_likes_comments); ?>" type="checkbox" value="<?php echo esc_attr($instance['show_likes_comments']); ?>"/>
105
+ <label for="<?php echo esc_attr($id_show_likes_comments); ?>"><?php _e("Show likes and comments", 'wd-instagram-feed'); ?></label>
106
  </p>
107
  <p>
108
+ <input <?php if($instance['enable_loading_buttons']=='1') echo "checked"?> class="widefat" id="<?php echo sanitize_html_class($id_enable_loading_buttons); ?>" name="<?php echo esc_attr($name_enable_loading_buttons); ?>" type="checkbox" value="<?php echo esc_attr($instance['enable_loading_buttons']); ?>"/>
109
+ <label for="<?php echo esc_attr($id_enable_loading_buttons); ?>"><?php _e("Enable loading new images", 'wd-instagram-feed'); ?></label>
110
  </p>
111
  <script>
112
  jQuery(document).ready(function(){
admin/views/feeds.php CHANGED
@@ -62,7 +62,7 @@ class Feeds_view_wdi {
62
  'task' => 'add',
63
  );
64
  ?>
65
- <a href="<?php echo WDILibrary::get_page_link($add_page_data);?>" class="add-new-h2"><?php _e('Add new', 'wd-instagram-feed'); ?></a>
66
  </div>
67
  <?php WDILibrary::search(__('Name', 'wd-instagram-feed'), $search_value, 'wdi_feed_form'); ?>
68
  <div class="tablenav top">
@@ -72,7 +72,7 @@ class Feeds_view_wdi {
72
  <?php
73
  foreach ($wdi_button_array as $key => $value) {
74
  ?>
75
- <option value="<?php echo $key; ?>"><?php echo $value; ?></option>
76
  <?php
77
  }
78
  ?>
@@ -80,7 +80,7 @@ class Feeds_view_wdi {
80
  <input class="button action" type="button" title="<?php _e('Apply', 'wds'); ?>" onclick="if (!wdi_bulk_actions('.bulk_action')) {return false}" value="<?php _e('Apply', 'wds'); ?>" />
81
  </div>
82
  <?php
83
- WDILibrary::html_page_nav($page_nav['total'], $page_nav['limit'], 'wdi_feed_form');
84
  ?>
85
  </div>
86
  <table class="wp-list-table widefat fixed pages media">
@@ -130,8 +130,8 @@ class Feeds_view_wdi {
130
  );
131
  $wdi_nonce_wd = wp_create_nonce('nonce_wd');
132
  ?>
133
- <tr id="tr_<?php echo $row_data->id; ?>" <?php echo $alternate; ?>>
134
- <th class="table_small_col check-column"><input id="check_<?php echo $row_data->id; ?>"
135
  name="check_<?php echo $row_data->id; ?>"
136
  onclick="wdi_spider_check_all(this)" type="checkbox"/>
137
  </th>
@@ -140,9 +140,9 @@ class Feeds_view_wdi {
140
  <a href="<?php echo WDILibrary::get_page_link($edit_page_data);?>"
141
  title="Edit">
142
  <span class="media-icon image-icon">
143
- <img title="<?php echo $row_data->feed_name; ?>"
144
  style="border: 1px solid #CCCCCC; max-width: 70px; max-height: 50px;"
145
- src="<?php echo $prev_img_url; ?>">
146
  </span>
147
  <?php echo $row_data->feed_name; ?>
148
  </a>
@@ -158,17 +158,17 @@ class Feeds_view_wdi {
158
  </strong>
159
  <div class="row-actions">
160
  <span>
161
- <a href="<?php echo WDILibrary::get_page_link($edit_page_data);?>"
162
  title="Edit"><?php _e('Edit', 'wd-instagram-feed'); ?>
163
  </a>
164
  |
165
  </span>
166
  <span>
167
- <a href="<?php echo WDILibrary::get_page_link(array('task'=>'duplicate','current_id'=>$row_data->id, 'nonce_wd'=>$wdi_nonce_wd));?>"><?php _e('Duplicate', 'wd-instagram-feed'); ?></a>
168
  |
169
  </span>
170
  <span>
171
- <a href="<?php echo WDILibrary::get_page_link(array('task'=>$published,'current_id'=>$row_data->id, 'nonce_wd'=>$wdi_nonce_wd));?>" ><?php echo ( $row_data->published ? __('Unpublish', 'wd-instagram-feed') : __('Publish', 'wd-instagram-feed')); ?></a>
172
  |
173
  </span>
174
  <span class="trash">
@@ -184,12 +184,12 @@ class Feeds_view_wdi {
184
  </button>
185
  </td>
186
  <td class="table_big_col" data-colname="Shortcode" >
187
- <input type="text" value='[wdi_feed id="<?php echo $row_data->id; ?>"]'
188
  onclick="wdi_spider_select_value(this)" size="12" readonly="readonly"
189
  style="padding-left: 1px; padding-right: 1px; text-align: center;"/>
190
  </td>
191
  <td class="table_large_col" data-colname="PHP function" >
192
- <input type="text" value="&#60;?php echo wdi_feed(array('id'=>'<?php echo $row_data->id; ?>')); ?&#62;"
193
  onclick="wdi_spider_select_value(this)" size="30" readonly="readonly"
194
  style="padding-left: 1px; padding-right: 1px; text-align: center;"/>
195
  </td>
@@ -202,12 +202,12 @@ class Feeds_view_wdi {
202
  </tbody>
203
  </table>
204
  <?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
205
- <input type="hidden" id="wdi_access_token" name="access_token" value="<?php echo isset($wdi_options['wdi_access_token']) ? $wdi_options['wdi_access_token'] : ''; ?>">
206
  <input id="task" name="task" type="hidden" value=""/>
207
  <input id="current_id" name="current_id" type="hidden" value=""/>
208
- <input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>"/>
209
  <input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc"/>
210
- <input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>"/>
211
  </form>
212
  </div>
213
  <?php
@@ -851,26 +851,26 @@ class Feeds_view_wdi {
851
  wp_nonce_field('nonce_wd', 'nonce_wd');
852
  ?>
853
  <input type="hidden" id="task" name='task'>
854
- <input type="hidden" id="wdi_feed_type" name='<?php echo WDI_FSN . '[feed_type]' ?>'>
855
- <input type="hidden" id="wdi_access_token" name="access_token" value="<?php echo $wdi_options['wdi_access_token']; ?>">
856
- <input type="hidden" id="wdi_add_or_edit" name="add_or_edit" value="<?php echo $current_id; ?>">
857
- <input type="hidden" id="wdi_default_user" value="<?php echo $wdi_options['wdi_user_name']; ?>">
858
- <input type="hidden" id="wdi_default_user_id" value="<?php echo $wdi_options['wdi_user_id']; ?>">
859
- <input type="hidden" name="<?php echo WDI_FSN . '[published]' ?>" value="<?php echo isset($feed_row['published']) ? $feed_row['published'] : '1'; ?>">
860
  <input type="hidden" id="wdi_current_id" name="current_id" value=''>
861
  <input type="hidden" id="wdi_refresh_tab" name="wdi_refresh_tab">
862
  <div class="form-table">
863
  <?php
864
  foreach ($tabs as $key => $tab) { ?>
865
- <div id="<?php echo $key; ?>_tab" class="wdi_tab" style="<?php echo $key == "feed_settings" ? "display:block;" : ""; ?>">
866
  <?php foreach ($tab as $key => $section) {
867
  $section_class = "wdi_section_open";
868
  if(isset($section["visibility"]) && $section["visibility"]==="show"){
869
  $section_class = "wdi_section_close";
870
  }
871
  ?>
872
- <div id="<?php echo $key; ?>_section" class="wdi_section <?php echo $section["type"]; ?> <?php echo $section["column"]; ?>">
873
- <h3 data-section_name="<?php echo $section['section_name']?>" class="wdi_section_name <?php echo $section_class;?>"><?php echo $section["title"]; ?></h3>
874
  <div class="wdi_elements wdi_clear_tag">
875
  <?php foreach ($section["elements"] as $elements) { ?>
876
  <div class="section_col">
@@ -907,9 +907,9 @@ class Feeds_view_wdi {
907
  </div>
908
  <!-- END CONDITIONAL FILTERS TOP -->
909
  <?php } ?>
910
- <div class="wdi_element wdi_element_name_<?php echo $element['name'] ; ?>">
911
  <div class="wdi_element_title">
912
- <span class="wdi_settings_link" ><?php echo $element['title']; ?></span>
913
  </div>
914
  <div class="wdi_element_content">
915
  <?php $this->buildField($element, $feed_row); ?>
@@ -941,7 +941,7 @@ class Feeds_view_wdi {
941
  <div tab="conditional_filters"></div>
942
  </div>
943
  </div>
944
- <textarea style="display:none" id="wdi_conditional_filters_textarea" name='<?php echo WDI_FSN . '[conditional_filters]' ?>'> <?php echo isset($feed_row['conditional_filters']) ? $feed_row['conditional_filters'] : ''; ?> </textarea>
945
  <div class="wdi_filter_ctrl_container">
946
  <div class="wdi_filter_input">
947
  <input id="wdi_filter_input" placeholder="<?php _e('Enter Your Condition Here...', 'wd-instagram-feed'); ?>" type="text">
62
  'task' => 'add',
63
  );
64
  ?>
65
+ <a href="<?php echo esc_url(WDILibrary::get_page_link($add_page_data));?>" class="add-new-h2"><?php _e('Add new', 'wd-instagram-feed'); ?></a>
66
  </div>
67
  <?php WDILibrary::search(__('Name', 'wd-instagram-feed'), $search_value, 'wdi_feed_form'); ?>
68
  <div class="tablenav top">
72
  <?php
73
  foreach ($wdi_button_array as $key => $value) {
74
  ?>
75
+ <option value="<?php echo esc_attr($key); ?>"><?php echo esc_html($value); ?></option>
76
  <?php
77
  }
78
  ?>
80
  <input class="button action" type="button" title="<?php _e('Apply', 'wds'); ?>" onclick="if (!wdi_bulk_actions('.bulk_action')) {return false}" value="<?php _e('Apply', 'wds'); ?>" />
81
  </div>
82
  <?php
83
+ WDILibrary::html_page_nav(intval($page_nav['total']), intval($page_nav['limit']), 'wdi_feed_form');
84
  ?>
85
  </div>
86
  <table class="wp-list-table widefat fixed pages media">
130
  );
131
  $wdi_nonce_wd = wp_create_nonce('nonce_wd');
132
  ?>
133
+ <tr id="tr_<?php echo sanitize_html_class($row_data->id); ?>" <?php echo $alternate; ?>>
134
+ <th class="table_small_col check-column"><input id="check_<?php echo sanitize_html_class($row_data->id); ?>"
135
  name="check_<?php echo $row_data->id; ?>"
136
  onclick="wdi_spider_check_all(this)" type="checkbox"/>
137
  </th>
140
  <a href="<?php echo WDILibrary::get_page_link($edit_page_data);?>"
141
  title="Edit">
142
  <span class="media-icon image-icon">
143
+ <img title="<?php echo esc_html($row_data->feed_name); ?>"
144
  style="border: 1px solid #CCCCCC; max-width: 70px; max-height: 50px;"
145
+ src="<?php echo esc_url($prev_img_url); ?>">
146
  </span>
147
  <?php echo $row_data->feed_name; ?>
148
  </a>
158
  </strong>
159
  <div class="row-actions">
160
  <span>
161
+ <a href="<?php echo esc_url(WDILibrary::get_page_link($edit_page_data));?>"
162
  title="Edit"><?php _e('Edit', 'wd-instagram-feed'); ?>
163
  </a>
164
  |
165
  </span>
166
  <span>
167
+ <a href="<?php echo esc_url(WDILibrary::get_page_link(array('task'=>'duplicate','current_id'=>$row_data->id, 'nonce_wd'=>$wdi_nonce_wd)));?>"><?php _e('Duplicate', 'wd-instagram-feed'); ?></a>
168
  |
169
  </span>
170
  <span>
171
+ <a href="<?php echo esc_url(WDILibrary::get_page_link(array('task'=>$published,'current_id'=>$row_data->id, 'nonce_wd'=>$wdi_nonce_wd)));?>" ><?php echo ( $row_data->published ? __('Unpublish', 'wd-instagram-feed') : __('Publish', 'wd-instagram-feed')); ?></a>
172
  |
173
  </span>
174
  <span class="trash">
184
  </button>
185
  </td>
186
  <td class="table_big_col" data-colname="Shortcode" >
187
+ <input type="text" value='[wdi_feed id="<?php echo intval($row_data->id); ?>"]'
188
  onclick="wdi_spider_select_value(this)" size="12" readonly="readonly"
189
  style="padding-left: 1px; padding-right: 1px; text-align: center;"/>
190
  </td>
191
  <td class="table_large_col" data-colname="PHP function" >
192
+ <input type="text" value="&#60;?php echo wdi_feed(array('id'=>'<?php echo intval($row_data->id); ?>')); ?&#62;"
193
  onclick="wdi_spider_select_value(this)" size="30" readonly="readonly"
194
  style="padding-left: 1px; padding-right: 1px; text-align: center;"/>
195
  </td>
202
  </tbody>
203
  </table>
204
  <?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
205
+ <input type="hidden" id="wdi_access_token" name="access_token" value="<?php echo isset($wdi_options['wdi_access_token']) ? esc_attr($wdi_options['wdi_access_token']) : ''; ?>">
206
  <input id="task" name="task" type="hidden" value=""/>
207
  <input id="current_id" name="current_id" type="hidden" value=""/>
208
+ <input id="ids_string" name="ids_string" type="hidden" value="<?php echo esc_attr($ids_string); ?>"/>
209
  <input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc"/>
210
+ <input id="order_by" name="order_by" type="hidden" value="<?php echo esc_attr($order_by); ?>"/>
211
  </form>
212
  </div>
213
  <?php
851
  wp_nonce_field('nonce_wd', 'nonce_wd');
852
  ?>
853
  <input type="hidden" id="task" name='task'>
854
+ <input type="hidden" id="wdi_feed_type" name='<?php echo esc_attr(WDI_FSN . '[feed_type]') ?>'>
855
+ <input type="hidden" id="wdi_access_token" name="access_token" value="<?php echo esc_attr($wdi_options['wdi_access_token']); ?>">
856
+ <input type="hidden" id="wdi_add_or_edit" name="add_or_edit" value="<?php echo esc_attr($current_id); ?>">
857
+ <input type="hidden" id="wdi_default_user" value="<?php echo esc_attr($wdi_options['wdi_user_name']); ?>">
858
+ <input type="hidden" id="wdi_default_user_id" value="<?php echo esc_attr($wdi_options['wdi_user_id']); ?>">
859
+ <input type="hidden" name="<?php echo esc_attr(WDI_FSN . '[published]') ?>" value="<?php echo isset($feed_row['published']) ? esc_attr($feed_row['published']) : '1'; ?>">
860
  <input type="hidden" id="wdi_current_id" name="current_id" value=''>
861
  <input type="hidden" id="wdi_refresh_tab" name="wdi_refresh_tab">
862
  <div class="form-table">
863
  <?php
864
  foreach ($tabs as $key => $tab) { ?>
865
+ <div id="<?php echo sanitize_html_class($key); ?>_tab" class="wdi_tab" style="<?php echo $key == "feed_settings" ? "display:block;" : ""; ?>">
866
  <?php foreach ($tab as $key => $section) {
867
  $section_class = "wdi_section_open";
868
  if(isset($section["visibility"]) && $section["visibility"]==="show"){
869
  $section_class = "wdi_section_close";
870
  }
871
  ?>
872
+ <div id="<?php echo sanitize_html_class($key); ?>_section" class="wdi_section <?php echo sanitize_html_class($section["type"]); ?> <?php echo sanitize_html_class($section["column"]); ?>">
873
+ <h3 data-section_name="<?php echo $section['section_name']?>" class="wdi_section_name <?php echo sanitize_html_class($section_class);?>"><?php echo esc_html($section["title"]); ?></h3>
874
  <div class="wdi_elements wdi_clear_tag">
875
  <?php foreach ($section["elements"] as $elements) { ?>
876
  <div class="section_col">
907
  </div>
908
  <!-- END CONDITIONAL FILTERS TOP -->
909
  <?php } ?>
910
+ <div class="wdi_element wdi_element_name_<?php echo sanitize_html_class($element['name']); ?>">
911
  <div class="wdi_element_title">
912
+ <span class="wdi_settings_link" ><?php echo esc_html($element['title']); ?></span>
913
  </div>
914
  <div class="wdi_element_content">
915
  <?php $this->buildField($element, $feed_row); ?>
941
  <div tab="conditional_filters"></div>
942
  </div>
943
  </div>
944
+ <textarea style="display:none" id="wdi_conditional_filters_textarea" name='<?php echo WDI_FSN . '[conditional_filters]' ?>'> <?php echo isset($feed_row['conditional_filters']) ? esc_html($feed_row['conditional_filters']) : ''; ?> </textarea>
945
  <div class="wdi_filter_ctrl_container">
946
  <div class="wdi_filter_input">
947
  <input id="wdi_filter_input" placeholder="<?php _e('Enter Your Condition Here...', 'wd-instagram-feed'); ?>" type="text">
admin/views/settings.php CHANGED
@@ -55,12 +55,12 @@ class Settings_view_wdi {
55
  <h2 class="wdi-page-title"><?php _e('Accounts', 'wd-instagram-feed'); ?></h2>
56
  <ul class="wdi-accounts-list">
57
  <?php foreach ( $authenticated_users_list as $user_name => $user ) { ?>
58
- <li class="wdi-account-list-<?php echo $user['user_id'] ?>">
59
  <div class="wdi-account-block">
60
  <div>
61
  <div class="wdi-account-user-info">
62
- <h4 class="wdi-account-name"><?php echo $user['user_name']; ?></h4>
63
- <p class="wdi-account-type"><?php echo $user['type']; ?> <?php _e('(New API)', 'wd-instagram-feed'); ?></p>
64
  </div>
65
  <div class="wdi-account-show-token">
66
  <i class="dashicons dashicons-arrow-down-alt2"></i>
@@ -74,19 +74,19 @@ class Settings_view_wdi {
74
  <div>
75
  <p class="wdi-input-group">
76
  <label><?php _e('User ID:', 'wd-instagram-feed'); ?></label>
77
- <input type="text" value="<?php echo $user['user_id']; ?>" readonly="readonly"
78
  onclick="this.focus();this.select()"
79
  title="<?php _e('To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac).', 'wd-instagram-feed'); ?>">
80
  </p>
81
  <p class="wdi-input-group">
82
  <label><?php _e('Access Token:', 'wd-instagram-feed'); ?></label>
83
- <input class="wdi_user_token" type="text" value="<?php echo $user['access_token']; ?>" readonly="readonly"
84
  onclick="this.focus();this.select()"
85
  title="<?php _e('To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac).', 'wd-instagram-feed'); ?>">
86
  </p>
87
  <p class="wdi-input-group">
88
  <label><?php _e('Refresh Access Token', 'wd-instagram-feed'); ?></label>
89
- <span class="button wdi_account_refresh" data-wdi_account="<?php echo $user_name; ?>"><?php _e('Refresh', 'wd-instagram-feed'); ?></span>
90
  </p>
91
  </div>
92
  <span class="button wdi-account-remove"
@@ -106,11 +106,11 @@ class Settings_view_wdi {
106
  <div class="wdi-advanced-body">
107
  <p class="wdi-input-group">
108
  <label><?php _e('Set Maximum Count of Cache Requests', 'wd-instagram-feed'); ?></label>
109
- <input type="number" name="<?php echo WDI_OPT . '[wdi_cache_request_count]' ?>" value="<?php echo (isset($options['wdi_cache_request_count']) && $options['wdi_cache_request_count'] !== '') ? $options['wdi_cache_request_count'] : 10; ?>">
110
  </p>
111
  <p class="wdi-input-group">
112
  <label><?php _e('Check for new posts every (min)', 'wd-instagram-feed'); ?></label>
113
- <input type="number" name="<?php echo WDI_OPT . '[wdi_transient_time]' ?>" value="<?php echo $options['wdi_transient_time']; ?>">
114
  </p>
115
  <?php /* @ToDo It must be separate for each user */ ?>
116
  <p class="wdi-input-group">
@@ -119,12 +119,12 @@ class Settings_view_wdi {
119
  </p>
120
  <p class="wdi-input-group">
121
  <label><?php _e('Minimal role to add and manage Feeds or Themes', 'wd-instagram-feed'); ?></label>
122
- <select name="<?php echo WDI_OPT . '[wdi_feeds_min_capability]' ?>">
123
  <?php
124
  foreach ( $min_capability as $capability_key => $capability_name ) {
125
  $selected = ( $options['wdi_feeds_min_capability'] == $capability_key ) ? 'selected' : '';
126
  ?>
127
- <option value="<?php echo $capability_key; ?>" <?php echo $selected; ?>><?php echo $capability_name; ?></option>
128
  <?php } ?>
129
  </select>
130
  <p class="wdi-input-group">
@@ -143,9 +143,9 @@ class Settings_view_wdi {
143
  </div>
144
  </div>
145
  </div>
146
- <input type="hidden" name="<?php echo WDI_OPT . '[wdi_user_id]' ?>" value="<?php echo $options['wdi_user_id']; ?>">
147
- <input type="hidden" name="<?php echo WDI_OPT . '[wdi_user_name]' ?>" value="<?php echo $options['wdi_user_name']; ?>">
148
- <input type="hidden" name="<?php echo WDI_OPT . '[wdi_access_token]' ?>" value="<?php echo $options['wdi_access_token']; ?>">
149
  <input type="hidden" name="task" value="save">
150
  <?php
151
  wp_nonce_field('wdi_nonce', 'wdi_nonce');
@@ -220,7 +220,7 @@ class Settings_view_wdi {
220
  <div class="wdi-radio-button">
221
  <p class="wdi-label-personal wdi_input_group wdi_active <?php echo (WDI_IS_FREE)?"wdi_free":"wdi_pro"; ?>">
222
  <label for="wdi-personal">
223
- <input type="radio" id="wdi-personal" name="wdi-connect-type" value="<?php echo $personal_href; ?>"
224
  checked="checked">
225
  <span class="wdi_account_type"><?php _e('Personal', 'wd-instagram-feed'); ?></span>
226
  </label>
@@ -228,7 +228,7 @@ class Settings_view_wdi {
228
  </p>
229
  <p class="wdi-label-business wdi_input_group <?php echo (WDI_IS_FREE)?"wdi_free":"wdi_pro"; ?>">
230
  <label for="wdi-business">
231
- <input type="radio" id="wdi-business" <?php echo (WDI_IS_FREE)?"disabled":""; ?> name="wdi-connect-type" value="<?php echo $business_href; ?>">
232
  <span class="wdi_account_type"><?php _e('Business', 'wd-instagram-feed'); ?></span>
233
  </label>
234
  <span class="wdi_info_text"><?php _e('Used for displaying user feeds and <span>hashtags</span><br class="wdi_desktop"> from a “Business” Instagram account.', 'wd-instagram-feed'); ?></span>
@@ -237,7 +237,7 @@ class Settings_view_wdi {
237
  <?php } ?>
238
  </p>
239
  </div>
240
- <a href="<?php echo $personal_href; ?>" class="button button-primary wdi-connect"><?php _e('Connect', 'wd-instagram-feed'); ?></a>
241
  </div>
242
  </div>
243
  <?php
55
  <h2 class="wdi-page-title"><?php _e('Accounts', 'wd-instagram-feed'); ?></h2>
56
  <ul class="wdi-accounts-list">
57
  <?php foreach ( $authenticated_users_list as $user_name => $user ) { ?>
58
+ <li class="wdi-account-list-<?php echo sanitize_html_class($user['user_id']) ?>">
59
  <div class="wdi-account-block">
60
  <div>
61
  <div class="wdi-account-user-info">
62
+ <h4 class="wdi-account-name"><?php echo esc_html($user['user_name']); ?></h4>
63
+ <p class="wdi-account-type"><?php echo esc_html($user['type']); ?> <?php _e('(New API)', 'wd-instagram-feed'); ?></p>
64
  </div>
65
  <div class="wdi-account-show-token">
66
  <i class="dashicons dashicons-arrow-down-alt2"></i>
74
  <div>
75
  <p class="wdi-input-group">
76
  <label><?php _e('User ID:', 'wd-instagram-feed'); ?></label>
77
+ <input type="text" value="<?php echo esc_attr($user['user_id']); ?>" readonly="readonly"
78
  onclick="this.focus();this.select()"
79
  title="<?php _e('To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac).', 'wd-instagram-feed'); ?>">
80
  </p>
81
  <p class="wdi-input-group">
82
  <label><?php _e('Access Token:', 'wd-instagram-feed'); ?></label>
83
+ <input class="wdi_user_token" type="text" value="<?php echo esc_attr($user['access_token']); ?>" readonly="readonly"
84
  onclick="this.focus();this.select()"
85
  title="<?php _e('To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac).', 'wd-instagram-feed'); ?>">
86
  </p>
87
  <p class="wdi-input-group">
88
  <label><?php _e('Refresh Access Token', 'wd-instagram-feed'); ?></label>
89
+ <span class="button wdi_account_refresh" data-wdi_account="<?php echo esc_attr($user_name); ?>"><?php _e('Refresh', 'wd-instagram-feed'); ?></span>
90
  </p>
91
  </div>
92
  <span class="button wdi-account-remove"
106
  <div class="wdi-advanced-body">
107
  <p class="wdi-input-group">
108
  <label><?php _e('Set Maximum Count of Cache Requests', 'wd-instagram-feed'); ?></label>
109
+ <input type="number" name="<?php echo WDI_OPT . '[wdi_cache_request_count]' ?>" value="<?php echo (isset($options['wdi_cache_request_count']) && $options['wdi_cache_request_count'] !== '') ? intval($options['wdi_cache_request_count']) : 10; ?>">
110
  </p>
111
  <p class="wdi-input-group">
112
  <label><?php _e('Check for new posts every (min)', 'wd-instagram-feed'); ?></label>
113
+ <input type="number" min="10" name="<?php echo esc_attr(WDI_OPT . '[wdi_transient_time]') ?>" value="<?php echo intval($options['wdi_transient_time']); ?>">
114
  </p>
115
  <?php /* @ToDo It must be separate for each user */ ?>
116
  <p class="wdi-input-group">
119
  </p>
120
  <p class="wdi-input-group">
121
  <label><?php _e('Minimal role to add and manage Feeds or Themes', 'wd-instagram-feed'); ?></label>
122
+ <select name="<?php echo esc_attr(WDI_OPT . '[wdi_feeds_min_capability]') ?>">
123
  <?php
124
  foreach ( $min_capability as $capability_key => $capability_name ) {
125
  $selected = ( $options['wdi_feeds_min_capability'] == $capability_key ) ? 'selected' : '';
126
  ?>
127
+ <option value="<?php echo esc_attr($capability_key); ?>" <?php echo $selected; ?>><?php echo esc_html($capability_name); ?></option>
128
  <?php } ?>
129
  </select>
130
  <p class="wdi-input-group">
143
  </div>
144
  </div>
145
  </div>
146
+ <input type="hidden" name="<?php echo esc_attr(WDI_OPT . '[wdi_user_id]') ?>" value="<?php echo esc_attr($options['wdi_user_id']); ?>">
147
+ <input type="hidden" name="<?php echo esc_attr(WDI_OPT . '[wdi_user_name]') ?>" value="<?php echo esc_attr($options['wdi_user_name']); ?>">
148
+ <input type="hidden" name="<?php echo esc_attr(WDI_OPT . '[wdi_access_token]') ?>" value="<?php echo esc_attr($options['wdi_access_token']); ?>">
149
  <input type="hidden" name="task" value="save">
150
  <?php
151
  wp_nonce_field('wdi_nonce', 'wdi_nonce');
220
  <div class="wdi-radio-button">
221
  <p class="wdi-label-personal wdi_input_group wdi_active <?php echo (WDI_IS_FREE)?"wdi_free":"wdi_pro"; ?>">
222
  <label for="wdi-personal">
223
+ <input type="radio" id="wdi-personal" name="wdi-connect-type" value="<?php echo esc_attr($personal_href); ?>"
224
  checked="checked">
225
  <span class="wdi_account_type"><?php _e('Personal', 'wd-instagram-feed'); ?></span>
226
  </label>
228
  </p>
229
  <p class="wdi-label-business wdi_input_group <?php echo (WDI_IS_FREE)?"wdi_free":"wdi_pro"; ?>">
230
  <label for="wdi-business">
231
+ <input type="radio" id="wdi-business" <?php echo (WDI_IS_FREE)?"disabled":""; ?> name="wdi-connect-type" value="<?php echo esc_url($business_href); ?>">
232
  <span class="wdi_account_type"><?php _e('Business', 'wd-instagram-feed'); ?></span>
233
  </label>
234
  <span class="wdi_info_text"><?php _e('Used for displaying user feeds and <span>hashtags</span><br class="wdi_desktop"> from a “Business” Instagram account.', 'wd-instagram-feed'); ?></span>
237
  <?php } ?>
238
  </p>
239
  </div>
240
+ <a href="<?php echo esc_url($personal_href); ?>" class="button button-primary wdi-connect"><?php _e('Connect', 'wd-instagram-feed'); ?></a>
241
  </div>
242
  </div>
243
  <?php
config.php CHANGED
@@ -3,7 +3,7 @@ if ( !defined('ABSPATH') ) {
3
  exit;
4
  }
5
 
6
- define('WDI_VERSION', '1.4.24');
7
  define('WDI_IS_FREE', TRUE);
8
  define('WDI_PREFIX', 'wdi');
9
  define('WDI_DIR', WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)));
3
  exit;
4
  }
5
 
6
+ define('WDI_VERSION', '1.4.25');
7
  define('WDI_IS_FREE', TRUE);
8
  define('WDI_PREFIX', 'wdi');
9
  define('WDI_DIR', WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__)));
css/pricing.css CHANGED
@@ -72,6 +72,9 @@
72
  width: 170px;
73
  line-height: 50px;
74
  }
 
 
 
75
  .topbar-links * {
76
  font-size: 18px;
77
  }
72
  width: 170px;
73
  line-height: 50px;
74
  }
75
+ .topbar-links-item * {
76
+ width: auto !important;
77
+ }
78
  .topbar-links * {
79
  font-size: 18px;
80
  }
framework/WDILibrary.php CHANGED
@@ -257,9 +257,9 @@ class WDILibrary {
257
  // temporary
258
  if ( !empty($message) && !is_numeric($message) ) {
259
  ob_start();
260
- ?><div style="width:99%" class="<?php echo $type; ?> inline">
261
  <p>
262
- <strong><?php echo $message; ?></strong>
263
  </p>
264
  </div><?php
265
  $message = ob_get_clean();
@@ -423,10 +423,10 @@ class WDILibrary {
423
  <?php endif;?>
424
  <span class="paging-input">
425
  <span class="total-pages">
426
- <input class="current_page" id="current_page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return check_enter_key(event ,this)" title="Go to the page" type="text" size="1" />
427
  </span> of
428
  <span class="total-pages">
429
- <?php echo $items_county; ?>
430
  </span>
431
  </span>
432
  <?php if($next_last_page):?>
@@ -482,13 +482,13 @@ class WDILibrary {
482
  $order_by = self::get('order_by');
483
  $order = self::get('order');
484
  if ( !empty($search) ) {
485
- $page_link_data['search'] = $_GET["search"];
486
  }
487
  if ( !empty($order_by) ) {
488
- $page_link_data['order_by'] = $_GET["order_by"];
489
  }
490
  if ( !empty($order) ) {
491
- $page_link_data['order'] = $_GET["order"];
492
  }
493
  return self::get_page_link(array($page_link_data));
494
 
@@ -519,7 +519,7 @@ class WDILibrary {
519
  }
520
  </script>
521
  <div class="alignleft actions" style="">
522
- <label for="search_value" style="font-size:14px; width:60px; display:inline-block;"><?php echo $search_by; ?>:</label>
523
  <input type="text" id="search_value" name="search_value" class="wdi_spider_search_value" onkeypress="return check_search_key(event, this);" value="<?php echo esc_html($search_value); ?>" style="width: 150px;<?php echo (get_bloginfo('version') > '3.7') ? ' height: 28px;' : ''; ?>" />
524
  </div>
525
  <div class="alignleft actions">
@@ -726,8 +726,8 @@ class WDILibrary {
726
  <i title="<?php echo __('Search', 'wd-instagram-feed'); ?>" class="wdi_search tenweb-i tenweb-i-search" onclick="wdi_spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1)"></i>
727
  </span>
728
  <span class="wdi_search_input_container">
729
- <input id="wdi_search_input_<?php echo $current_view; ?>" class="wdi_search_input_<?php echo $current_view; ?>" type="text" onkeypress="return check_enter_key(event ,this)" name="wdi_search_<?php echo $current_view; ?>" value="<?php echo $wdi_search; ?>" >
730
- <input id="wdi_images_count_<?php echo $current_view; ?>" class="wdi_search_input" type="hidden" name="wdi_images_count_<?php echo $current_view; ?>" value="<?php echo $images_count; ?>" >
731
  </span>
732
  </div>
733
  </div>
@@ -765,9 +765,9 @@ class WDILibrary {
765
  width: <?php echo $search_box_width; ?>px;
766
  }
767
  </style>
768
- <div class="wdi_order_cont_<?php echo $current_view; ?>">
769
- <span class="wdi_order_label_<?php echo $current_view; ?>"><?php echo __('Order by: ', 'wd-instagram-feed'); ?></span>
770
- <select class="wdi_order_<?php echo $current_view; ?>" onchange="wdi_spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1, '', this.value)">
771
  <option <?php if ($sort_by == 'default') echo 'selected'; ?> value="default"><?php echo __('Default', 'wd-instagram-feed'); ?></option>
772
  <option <?php if ($sort_by == 'filename') echo 'selected'; ?> value="filename"><?php echo __('Filename', 'wd-instagram-feed'); ?></option>
773
  <option <?php if ($sort_by == 'size') echo 'selected'; ?> value="size"><?php echo __('Size', 'wd-instagram-feed'); ?></option>
@@ -887,24 +887,25 @@ class WDILibrary {
887
  public static function keep_only_self_user($feed_row){
888
  global $wdi_options;
889
 
890
- if($feed_row['liked_feed'] == 'liked'){
891
  $feed_row['nothing_to_display'] = '1';
892
  return $feed_row;
893
  }
894
 
895
- $users = json_decode($feed_row['feed_users'], true);
896
- $new_users_list = array();
897
- $users_list = self::get_users_list();
898
- if(is_array($users)) {
899
- foreach($users as $i => $user) {
900
- if(substr($user['username'], 0, 1) === '#' || $user['username'] === $wdi_options['wdi_user_name'] || !empty($users_list[$user['username']])) {
901
- $new_users_list[] = $user;
 
 
902
  }
903
  }
 
 
904
  }
905
- $feed_row['nothing_to_display'] = (empty($new_users_list)) ? '1' : '0';
906
- $feed_row['feed_users'] = json_encode($new_users_list);
907
-
908
  return $feed_row;
909
  }
910
 
@@ -1270,10 +1271,10 @@ class WDILibrary {
1270
  <?php if ( !empty($settings['show_usernames']) && $settings['show_usernames'] == 1 ) { ?>
1271
  <?php if ( $business ) { ?>
1272
  <div class="wdi_user_img_wrap">
1273
- <img src="<?php echo $user['profile_picture_url']; ?>" alt="<?php echo $user['user_name']; ?>">
1274
  </div>
1275
  <?php } ?>
1276
- <h3 onclick="window.open('//instagram.com/<?php echo $user['user_name']; ?>','_blank')"><?php echo $user['user_name']; ?></h3>
1277
  <?php } ?>
1278
  <?php if ( !empty($settings['show_follow']) && $settings['show_follow'] == 1 ) { ?>
1279
  <div class="wdi_user_controls">
@@ -1286,10 +1287,10 @@ class WDILibrary {
1286
  <?php if ( $business && !empty($settings['show_usernames']) && !empty($settings['media_followers']) && $settings['media_followers'] == 1 ) { ?>
1287
  <div class="wdi_media_info">
1288
  <p class="wdi_posts">
1289
- <span class="tenweb-i tenweb-i-camera-retro"></span><?php echo $user['media_count']; ?>
1290
  </p>
1291
  <p class="wdi_followers">
1292
- <span class="tenweb-i tenweb-i-user"></span><?php echo $user['followers_count']; ?>
1293
  </p>
1294
  </div>
1295
  <?php } ?>
@@ -1297,7 +1298,7 @@ class WDILibrary {
1297
  <div class="wdi_clear"></div>
1298
  <div class="wdi_bio"><?php echo $user['biography']; ?></div>
1299
  <div class="wdi_website">
1300
- <a target="_blank" href="<?php echo $user['website']; ?>"><?php echo $user['website']; ?></a>
1301
  </div>
1302
  <?php } ?>
1303
  </div>
@@ -1314,7 +1315,7 @@ class WDILibrary {
1314
  * @return string Top bar html.
1315
  */
1316
  public static function topbar() {
1317
- $page = isset($_GET['page']) ? esc_html($_GET['page']) : '';
1318
  $user_guide_link = 'https://help.10web.io/hc/en-us/articles/';
1319
  $show_guide_link = true;
1320
  $description = "";
257
  // temporary
258
  if ( !empty($message) && !is_numeric($message) ) {
259
  ob_start();
260
+ ?><div style="width:99%" class="<?php echo sanitize_html_class($type); ?> inline">
261
  <p>
262
+ <strong><?php echo esc_html($message); ?></strong>
263
  </p>
264
  </div><?php
265
  $message = ob_get_clean();
423
  <?php endif;?>
424
  <span class="paging-input">
425
  <span class="total-pages">
426
+ <input class="current_page" id="current_page" name="current_page" value="<?php echo esc_attr($page_number); ?>" onkeypress="return check_enter_key(event ,this)" title="Go to the page" type="text" size="1" />
427
  </span> of
428
  <span class="total-pages">
429
+ <?php echo esc_html($items_county); ?>
430
  </span>
431
  </span>
432
  <?php if($next_last_page):?>
482
  $order_by = self::get('order_by');
483
  $order = self::get('order');
484
  if ( !empty($search) ) {
485
+ $page_link_data['search'] = $search;
486
  }
487
  if ( !empty($order_by) ) {
488
+ $page_link_data['order_by'] = $order_by;
489
  }
490
  if ( !empty($order) ) {
491
+ $page_link_data['order'] = $order;
492
  }
493
  return self::get_page_link(array($page_link_data));
494
 
519
  }
520
  </script>
521
  <div class="alignleft actions" style="">
522
+ <label for="search_value" style="font-size:14px; width:60px; display:inline-block;"><?php echo esc_html($search_by); ?>:</label>
523
  <input type="text" id="search_value" name="search_value" class="wdi_spider_search_value" onkeypress="return check_search_key(event, this);" value="<?php echo esc_html($search_value); ?>" style="width: 150px;<?php echo (get_bloginfo('version') > '3.7') ? ' height: 28px;' : ''; ?>" />
524
  </div>
525
  <div class="alignleft actions">
726
  <i title="<?php echo __('Search', 'wd-instagram-feed'); ?>" class="wdi_search tenweb-i tenweb-i-search" onclick="wdi_spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1)"></i>
727
  </span>
728
  <span class="wdi_search_input_container">
729
+ <input id="wdi_search_input_<?php echo sanitize_html_class($current_view); ?>" class="wdi_search_input_<?php echo sanitize_html_class($current_view); ?>" type="text" onkeypress="return check_enter_key(event ,this)" name="wdi_search_<?php echo esc_attr($current_view); ?>" value="<?php echo esc_attr($wdi_search); ?>" >
730
+ <input id="wdi_images_count_<?php echo sanitize_html_class($current_view); ?>" class="wdi_search_input" type="hidden" name="wdi_images_count_<?php echo esc_attr($current_view); ?>" value="<?php echo esc_attr($images_count); ?>" >
731
  </span>
732
  </div>
733
  </div>
765
  width: <?php echo $search_box_width; ?>px;
766
  }
767
  </style>
768
+ <div class="wdi_order_cont_<?php echo sanitize_html_class($current_view); ?>">
769
+ <span class="wdi_order_label_<?php echo sanitize_html_class($current_view); ?>"><?php echo __('Order by: ', 'wd-instagram-feed'); ?></span>
770
+ <select class="wdi_order_<?php echo sanitize_html_class($current_view); ?>" onchange="wdi_spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1, '', this.value)">
771
  <option <?php if ($sort_by == 'default') echo 'selected'; ?> value="default"><?php echo __('Default', 'wd-instagram-feed'); ?></option>
772
  <option <?php if ($sort_by == 'filename') echo 'selected'; ?> value="filename"><?php echo __('Filename', 'wd-instagram-feed'); ?></option>
773
  <option <?php if ($sort_by == 'size') echo 'selected'; ?> value="size"><?php echo __('Size', 'wd-instagram-feed'); ?></option>
887
  public static function keep_only_self_user($feed_row){
888
  global $wdi_options;
889
 
890
+ if( isset($feed_row['liked_feed']) && $feed_row['liked_feed'] == 'liked' ) {
891
  $feed_row['nothing_to_display'] = '1';
892
  return $feed_row;
893
  }
894
 
895
+ if( !empty($feed_row['feed_users']) ) {
896
+ $users = json_decode($feed_row['feed_users'], TRUE);
897
+ $new_users_list = array();
898
+ $users_list = self::get_users_list();
899
+ if ( is_array($users) ) {
900
+ foreach ( $users as $i => $user ) {
901
+ if ( substr($user['username'], 0, 1) === '#' || $user['username'] === $wdi_options['wdi_user_name'] || !empty($users_list[$user['username']]) ) {
902
+ $new_users_list[] = $user;
903
+ }
904
  }
905
  }
906
+ $feed_row['nothing_to_display'] = (empty($new_users_list)) ? '1' : '0';
907
+ $feed_row['feed_users'] = json_encode($new_users_list);
908
  }
 
 
 
909
  return $feed_row;
910
  }
911
 
1271
  <?php if ( !empty($settings['show_usernames']) && $settings['show_usernames'] == 1 ) { ?>
1272
  <?php if ( $business ) { ?>
1273
  <div class="wdi_user_img_wrap">
1274
+ <img src="<?php echo esc_url($user['profile_picture_url']); ?>" alt="<?php echo esc_attr($user['user_name']); ?>">
1275
  </div>
1276
  <?php } ?>
1277
+ <h3 onclick="window.open('//instagram.com/<?php echo $user['user_name']; ?>','_blank')"><?php echo esc_html($user['user_name']); ?></h3>
1278
  <?php } ?>
1279
  <?php if ( !empty($settings['show_follow']) && $settings['show_follow'] == 1 ) { ?>
1280
  <div class="wdi_user_controls">
1287
  <?php if ( $business && !empty($settings['show_usernames']) && !empty($settings['media_followers']) && $settings['media_followers'] == 1 ) { ?>
1288
  <div class="wdi_media_info">
1289
  <p class="wdi_posts">
1290
+ <span class="tenweb-i tenweb-i-camera-retro"></span><?php echo esc_html($user['media_count']); ?>
1291
  </p>
1292
  <p class="wdi_followers">
1293
+ <span class="tenweb-i tenweb-i-user"></span><?php echo esc_html($user['followers_count']); ?>
1294
  </p>
1295
  </div>
1296
  <?php } ?>
1298
  <div class="wdi_clear"></div>
1299
  <div class="wdi_bio"><?php echo $user['biography']; ?></div>
1300
  <div class="wdi_website">
1301
+ <a target="_blank" href="<?php echo esc_url($user['website']); ?>"><?php echo esc_html($user['website']); ?></a>
1302
  </div>
1303
  <?php } ?>
1304
  </div>
1315
  * @return string Top bar html.
1316
  */
1317
  public static function topbar() {
1318
+ $page = self::get('page', '', 'sanitize_text_field', 'GET');
1319
  $user_guide_link = 'https://help.10web.io/hc/en-us/articles/';
1320
  $show_guide_link = true;
1321
  $description = "";
framework/WDI_admin_view.php CHANGED
@@ -25,9 +25,9 @@ class WDI_admin_view {
25
  public function link_button($element, $context = 'option', $opt_val = '', $meta=array()){
26
  global $wdi_options;
27
  ?>
28
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
29
  <div class="block margin">
30
- <a href="<?php echo $element['href']; ?>" id="<?php echo $element['name']; ?>" class="button" style="text-decoration:none;"><?php echo (isset($element['value']))?esc_html($element['value']):esc_html($element['title']); ?></a>
31
  </div>
32
  <?php if(isset($element['description'])){ ?>
33
  <p style="font-style: italic;"><?php echo $element['description']; ?></p>
@@ -45,10 +45,10 @@ class WDI_admin_view {
45
  public function button($element, $context = 'option', $opt_val = '', $meta=array()){
46
  global $wdi_options;
47
  ?>
48
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
49
  <div class="block margin">
50
  <div class="optioninput checkbox">
51
- <span id="<?php echo $element['name']; ?>" class="button" style="text-decoration:none;"><?php echo esc_html($element['title']); ?></span>
52
  </div>
53
  </div>
54
  <script>
@@ -105,10 +105,10 @@ class WDI_admin_view {
105
  }
106
  $opt_val = trim($opt_val);
107
  ?>
108
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
109
  <div class="block margin">
110
  <div class="optioninput checkbox">
111
- <input type="checkbox" class="checkbox" name="<?php echo $optionname; ?>" id="<?php echo $element['name'] ?>" <?php checked($opt_val || $opt_val =='on'); ?> <?php $this->custom_attrs($element); ?> value="1">
112
  </div>
113
  </div>
114
  </div>
@@ -138,10 +138,10 @@ class WDI_admin_view {
138
  $opt_val = trim($opt_val);
139
 
140
  ?>
141
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
142
  <div class="block margin">
143
  <div class="optioninput checkbox">
144
- <input type="checkbox" class="checkbox" name="<?php echo $optionname; ?>" id="<?php echo $element['name'] ?>" <?php checked($opt_val || $opt_val =='on'); ?> <?php $this->custom_attrs($element); ?> value="<?php echo esc_attr($opt_val); ?>">
145
  </div>
146
  </div>
147
  </div>
@@ -193,10 +193,10 @@ class WDI_admin_view {
193
  $opt_val = $wdi_options[$element['name']];
194
  }
195
  ?>
196
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
197
  <div class='wdwt_float'>
198
  <div>
199
- <input type="text" class='color_input' id="<?php echo $element['name']; ?>" name="<?php echo $optionname; ?>" value="<?php echo esc_attr($opt_val); ?>" data-default-color="<?php echo $element['default']; ?>" <?php $this->custom_attrs($element); ?> style="background-color:<?php echo esc_attr($opt_val); ?>;">
200
  </div>
201
  </div>
202
  </div>
@@ -214,13 +214,13 @@ class WDI_admin_view {
214
  $input_size = isset($element["input_size"]) ? $element["input_size"] : $this->params["input_size"];
215
  $optionname = WDI_OPT . '[' . $element['name'] . ']';
216
  ?>
217
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
218
  <div class="block">
219
  <?php WDILibrary::add_auth_button(''); ?>
220
  <div class="wdi_more_token_template" style="display: none;">
221
- <input type="text" name="<?php echo $optionname . '[access_token][]'; ?>" class="wdi_more_access_token" disabled/>
222
- <input type="text" name="<?php echo $optionname . '[user_name][]'; ?>" class="wdi_more_user_name" disabled/>
223
- <input type="text" name="<?php echo $optionname . '[user_id][]'; ?>" class="wdi_more_user_id" disabled/>
224
  </div>
225
  </div>
226
  </div>
@@ -258,12 +258,12 @@ class WDI_admin_view {
258
  $input_size = isset($element["input_size"]) ? $element["input_size"] : $this->params["input_size"];
259
 
260
  ?>
261
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
262
  <div class="block">
263
  <div class="optioninput">
264
- <input <?php echo $readonly;?> type=<?php echo isset($element['input_type']) ? $element['input_type'] : 'text'?> name="<?php echo $optionname; ?>" id="<?php echo $element['name'];?>"
265
  <?php echo isset($element['required'])? 'required' : ''; $this->custom_attrs($element); ?>
266
- value="<?php echo esc_attr($opt_val); ?>" size="<?php echo $input_size; ?>"
267
  <?php if(isset($element['attr'])) {echo $element['attr']['name'] . '="' .$element["attr"]["value"].'"';} ?>>
268
  <?php
269
  if(isset($element['unit_symbol'])){
@@ -296,11 +296,11 @@ class WDI_admin_view {
296
  }
297
 
298
  ?>
299
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
300
  <?php
301
  foreach ( $element['valid_options'] as $key => $option ) {
302
  ?>
303
- <input type="radio" name="<?php echo $optionname; ?>" <?php checked( $key, $opt_val ); ?> <?php $this->custom_attrs($element); ?> value="<?php echo esc_attr($key); ?>" /> <?php echo esc_html($option); ?>
304
  <?php
305
  echo isset($element['label']) ? $element['label'] : "";
306
  }
@@ -328,11 +328,11 @@ class WDI_admin_view {
328
  }
329
 
330
  ?>
331
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
332
  <?php
333
  foreach ( $element['valid_options'] as $key => $option ) {
334
  ?>
335
- <input type="radio" name="<?php echo $optionname; ?>" <?php checked( $key, $opt_val ); ?> <?php $this->custom_attrs($element); ?> value="<?php echo esc_attr($key); ?>" /> <?php echo esc_html($option); ?>
336
  <?php
337
  }
338
  ?>
@@ -411,13 +411,13 @@ class WDI_admin_view {
411
  }
412
  ?>
413
 
414
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
415
  <?php
416
  $img_h = intval($element['img_height']) / sizeof($element['valid_options']);
417
  foreach($element['valid_options'] as $option) { ?>
418
  <div class="sprite_layouts">
419
  <div alt="<?php echo esc_attr($option['title']); ?>" style="width:<?php echo esc_attr($element['img_width']); ?>px; height:<?php echo esc_attr($img_h); ?>px; background:url(<?php echo esc_url(WDWT_IMG_INC.$element['img_src']); ?>) no-repeat 0 -<?php echo (intval($option['index'])-1) * $img_h; ?>px;"></div>
420
- <input type="radio" name="<?php echo $optionname; ?>" <?php checked( $option['index'], $opt_val ); ?> <?php $this->custom_attrs($element); ?> value="<?php echo intval($option['index']); ?>">
421
  </div>
422
  <?php
423
  }
@@ -451,13 +451,13 @@ class WDI_admin_view {
451
  }
452
  ?>
453
 
454
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
455
  <?php
456
  $img_h = intval($element['img_height']) / sizeof($element['valid_options']);
457
  foreach($element['valid_options'] as $option) { ?>
458
  <div class="sprite_layouts">
459
  <div alt="<?php echo esc_attr($option['title']); ?>" style="width:<?php echo $element['img_width']; ?>px; height:<?php echo $img_h; ?>px; background:url(<?php echo esc_url(WDWT_IMG_INC.$element['img_src']); ?>) no-repeat 0 -<?php echo (intval($option['index'])-1) * $img_h; ?>px;"></div>
460
- <input type="radio" name="<?php echo $optionname; ?>" <?php checked( $option['index'], $opt_val ); ?> <?php $this->custom_attrs($element); ?> value="<?php echo intval($option['index']); ?>">
461
  </div>
462
  <?php
463
  }
@@ -539,10 +539,10 @@ class WDI_admin_view {
539
  $width = isset($element["width"]) ? intval($element["width"]) : $this->params["select_width"];
540
  $disabled = isset($element["disabled"]) ? $element["disabled"] : array();
541
  ?>
542
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
543
  <div class="block">
544
  <div class="optioninput">
545
- <select name="<?php echo $optionname; ?>" id="<?php echo $element['name'] ?>" <?php echo $multiple ? 'multiple="multiple"' : ''; ?> <?php $this->custom_attrs($element); ?> style="width:<?php echo $width; ?>px; resize:vertical;">
546
  <?php foreach($element['valid_options'] as $key => $value){ ?>
547
  <option value="<?php echo esc_attr($key) ?>" <?php selected(true, in_array($key, $opt_val)); ?> <?php echo in_array($key, $disabled) ? 'disabled="disabled"' : ''; ?>>
548
  <?php echo esc_html($value); ?>
@@ -577,9 +577,9 @@ class WDI_admin_view {
577
  $width = isset($element["width"]) ? intval($element["width"]) : $this->params["select_width"];
578
 
579
  ?>
580
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
581
 
582
- <select name="<?php echo $optionname; ?>" id="<?php echo $element['name'] ?>" <?php echo $multiple ? 'multiple="multiple"' : ''; ?> <?php $this->custom_attrs($element); ?> style="width:<?php echo $width; ?>px; resize:vertical;">
583
  <?php
584
  foreach($element['valid_options'] as $key => $value){ ?>
585
  <option value="<?php echo esc_attr($key); ?>" <?php selected(true, in_array($key, $opt_val)); ?>><?php echo esc_html($value); ?></option>
@@ -660,8 +660,8 @@ class WDI_admin_view {
660
  $width = isset($element["width"]) ? $element["width"] : $this->params["select_width"];
661
 
662
  ?>
663
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
664
- <select name="<?php echo $optionname; ?>" id="<?php echo $element['name'] ?>" <?php $this->custom_attrs($element); ?> style="width:<?php echo $width;?>px;">
665
  <?php
666
  foreach($element['valid_options'] as $key => $value){ ?>
667
  <option value="<?php echo esc_attr($key); ?>" <?php selected(true, in_array($key, $opt_val)); ?>><?php echo esc_html($value); ?></option>
@@ -716,10 +716,10 @@ class WDI_admin_view {
716
  $textarea_w = isset($element["width"]) ? $element["width"] : $this->params["textarea_width"];
717
  $textarea_h = isset($element["height"]) ? $element["height"] : $this->params["textarea_height"];
718
  ?>
719
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
720
  <div class="block">
721
  <div class="optioninput">
722
- <textarea name="<?php echo $optionname; ?>" id="<?php echo $element['name'] ?>" <?php $this->custom_attrs($element); ?> style="width:<?php echo $textarea_w; ?>px; height:<?php echo $textarea_h; ?>px;"><?php echo esc_html($opt_val); ?></textarea>
723
  </div>
724
  </div>
725
  </div>
@@ -740,10 +740,10 @@ class WDI_admin_view {
740
  global $wdi_options;
741
  ?>
742
 
743
- <div class="font_preview_wrap" id="wdwt_wrap_<?php echo $element['name']; ?>">
744
  <label class="typagrphy_label" for="" style="font-size:18px;font-size: 20px;font-family: Segoe UI;"><?php echo __('Preview', WDWT_LANG ); ?></label>
745
  <div class="font_preview">
746
- <div class="optioninput-preview" id="<?php echo $element['name']; ?>" style="margin-top: 14px; margin-bottom: 23px;" ><?php
747
  $theme = wp_get_theme();
748
  echo esc_html($theme->description);
749
  ?></div>
@@ -822,10 +822,10 @@ class WDI_admin_view {
822
  /*jQuery(".slide_tab").prev().parent().prev().css("display","none");*/
823
  });
824
  </script>
825
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
826
  <div class="optioninput" id="upload_images">
827
- <input type="text" class="upload" id="<?php echo $element["name"] ?>" name="<?php echo $optionname; ?>" size="<?php echo $upload_size; ?>" <?php $this->custom_attrs($element); ?> value="<?php echo esc_url($opt_val); ?>"/>
828
- <input class="upload-button button" type="button" id="uploader_<?php echo $element['name']; ?>" value="<?php esc_attr_e('Upload Image', WDWT_LANG); ?>"/>
829
  </div>
830
  </div>
831
  <?php
@@ -869,35 +869,35 @@ class WDI_admin_view {
869
  $filetype = (isset($element["filetype"]) && $element_filetype != '') ? $element["filetype"] : $this->params["upload_filetype"];
870
  ?>
871
 
872
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
873
 
874
- <div class="wdwt_slide wdwt_slide_<?php echo $element['name']; ?> last_slide" id="wdwt_slide_<?php echo $element['name']; ?>_0">
875
  <!-- Image URL -->
876
  <div class="slide-from-base_url" style="margin-bottom:3%;">
877
  <div valign="middle"><h2><?php esc_html_e("Image URL",WDWT_LANG); ?></h2></div>
878
  <div>
879
- <input type="text" id="<?php echo $element['name']; ?>_url_0" size="50" value="" class="upload image_links_group" >
880
 
881
- <input type="button" class="<?php echo $element['name']; ?>_update-image slide_but_up" id="<?php echo $element['name']; ?>_update-button_0" value="<?php esc_attr_e("Update image", WDWT_LANG); ?>">
882
 
883
- <input type="button" class="<?php echo $element['name']; ?>_remove-image slide_but_rem wdwt_btn_red" id="<?php echo $element['name']; ?>_remove-button_0" value="<?php esc_attr_e("Remove this slide", WDWT_LANG); ?>" />
884
  </div>
885
  </div>
886
  <!-- Image -->
887
  <div class="slide-from-base_image">
888
- <div><img style="width:82%;" id="<?php echo $element['name']; ?>_img_0" src="" /></div>
889
  </div>
890
  <!-- Image HREF -->
891
  <div class="slide-from-base_href">
892
  <div valign="middle"><h2><?php esc_html_e("Image Href", WDWT_LANG); ?></h2></div>
893
- <div><input type="text" id="<?php echo $element['name']; ?>_href_0" class="image_href_group" value="" /></div>
894
  </div>
895
  <!-- Image TITLE -->
896
  <div class="slide-from-base_title">
897
  <div valign="middle">
898
  <h2><?php esc_html_e("Image Title", WDWT_LANG); ?></h2>
899
  </div>
900
- <div><input type="text" id="<?php echo $element['name']; ?>_title_0" class="image_title_group" value="" /></div>
901
  </div>
902
  <!-- Image DESCRIPTION -->
903
  <div class="slide-from-base_desc" style="margin-bottom:3%;">
@@ -905,7 +905,7 @@ class WDI_admin_view {
905
  <h2><?php esc_html_e("Image Description", WDWT_LANG); ?></h2>
906
  </div>
907
  <div>
908
- <textarea class="image_descr_group" id="<?php echo $element['name']; ?>_descr_0" style="width:236px; height:120px;"></textarea>
909
  </div>
910
  </div>
911
  </div>
@@ -918,11 +918,11 @@ class WDI_admin_view {
918
  </h2>
919
  </div>
920
  <div>
921
- <input type="hidden" name="<?php echo $optionname_url; ?>" id="<?php echo $element['name']; ?>_urls" data-customize-setting-link="<?php echo $optionname_url; ?>" value="<?php echo esc_attr($imgs_url); ?>" >
922
- <input type="hidden" name="<?php echo $optionname_href; ?>" id="<?php echo $element['name']; ?>_hrefs" data-customize-setting-link="<?php echo $optionname_href; ?>" value="<?php echo esc_attr($imgs_href); ?>" >
923
- <input type="hidden" name="<?php echo $optionname_title; ?>" id="<?php echo $element['name']; ?>_titles" data-customize-setting-link="<?php echo $optionname_title; ?>" value="<?php echo esc_attr($imgs_title); ?>" >
924
- <input type="hidden" name="<?php echo $optionname_desc; ?>" id="<?php echo $element['name']; ?>_descrs" data-customize-setting-link="<?php echo $optionname_desc; ?>" value="<?php echo esc_attr($imgs_desc); ?>" >
925
- <input class="upload_button_slide" type="button" id="<?php echo $element['name']; ?>_add-button" value="<?php esc_attr_e('Add new slide', WDWT_LANG); ?>" />
926
  </div>
927
  </div>
928
  </div>
@@ -1029,11 +1029,11 @@ class WDI_admin_view {
1029
  $current = $opt_val['active'];
1030
  $width = isset($element["width"]) ? $element["width"] : $this->params["select_width"];
1031
  ?>
1032
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
1033
- <select name="<?php echo $optionname; ?>[active]" id="<?php echo $element['name'] ?>" <?php $this->custom_attrs($element); ?> style="width:<?php echo $width; ?>px;">
1034
  <?php
1035
  for($i=0; $i<sizeof($element['default']['themes']); $i++){ ?>
1036
- <option value="<?php echo $i ?>" <?php selected( $current, $i); ?>> <?php echo esc_html($element['default']['themes'][$i]['title']); ?></option>
1037
  <?php } ?>
1038
  </select>
1039
  </div>
@@ -1098,15 +1098,15 @@ class WDI_admin_view {
1098
 
1099
  $select_theme = $opt_val['select_theme'];
1100
  ?>
1101
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
1102
- <input type="text" class="hidden_field" id="theme_<?php echo $element['name']; ?>" hidden='hidden' name="<?php echo $optionname.'[select_theme]'; ?>" value="<?php echo esc_attr($opt_val['select_theme']); ?>">
1103
- <input type="text" class="hidden_field" id="active_<?php echo $element['name']; ?>" hidden='hidden' name="<?php echo $optionname.'[active]'; ?>" value="<?php echo esc_attr($opt_val['active']); ?>">
1104
  <?php foreach($opt_val['colors'] as $color_name => $color): ?>
1105
  <div class='wdwt_float'>
1106
  <span class="wdwt_color_title"><?php echo esc_html($element['color_names'][$color_name]); ?></span>
1107
  <div>
1108
- <input type="text" class="hidden_field" id="default_<?php echo $element['name']; ?>_<?php echo $color_name; ?>" hidden='hidden' name="<?php echo $optionname.'[colors]['.$color_name.']'.'[default]'; ?>" value="<?php echo $color['default']; ?>">
1109
- <input type="text" class='color_input' id="value_<?php echo $element['name']; ?>_<?php echo $color_name; ?>" name="<?php echo $optionname.'[colors]['.$color_name.']'.'[value]'; ?>" value="<?php echo $color['value']; ?>" data-default-color="<?php echo $color['default']; ?>" style="background-color:<?php echo $color['value']; ?>;">
1110
  </div>
1111
  </div>
1112
  <?php endforeach; ?>
@@ -1147,15 +1147,15 @@ class WDI_admin_view {
1147
  }
1148
  ?>
1149
 
1150
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
1151
 
1152
- <div class="wdwt_diagram wdwt_diagram_<?php echo $element['name']; ?> last_percent" id="wdwt_diagram_<?php echo $element['name']; ?>_0">
1153
  <!-- Percent TITLE -->
1154
  <div class="diagram-from-base_title">
1155
  <div valign="middle">
1156
  <h2><?php esc_html_e("Title", WDWT_LANG); ?></h2>
1157
  </div>
1158
- <div><input type="text" id="<?php echo $element['name']; ?>_title_0" class="diagram_title_group" value="" /></div>
1159
  </div>
1160
  <!-- percent DESCRIPTION -->
1161
  <div class="diagram-from-base_desc" style="margin-bottom:3%;">
@@ -1163,17 +1163,17 @@ class WDI_admin_view {
1163
  <h2><?php esc_html_e("Percent", WDWT_LANG); ?></h2>
1164
  </div>
1165
  <div>
1166
- <input type="text" class="diagram_percent_group" id="<?php echo $element['name']; ?>_percent_0" value="" />%
1167
- <input type="button" class="<?php echo $element['name']; ?>_remove-percent wdwt_btn_red" id="<?php echo $element['name']; ?>_remove-button_0" value="<?php esc_attr_e("Remove this percent", WDWT_LANG); ?>" />
1168
  </div>
1169
  </div>
1170
  </div>
1171
 
1172
  <div class="diagram-controls">
1173
  <div>
1174
- <input type="hidden" name="<?php echo $optionname_title; ?>" id="<?php echo $element['name']; ?>_titles" data-customize-setting-link="<?php echo $optionname_title; ?>" value="<?php echo esc_attr($diagram_title); ?>" >
1175
- <input type="hidden" name="<?php echo $optionname_percent; ?>" id="<?php echo $element['name']; ?>_percents" data-customize-setting-link="<?php echo $optionname_percent; ?>" value="<?php echo esc_attr($diagram_percent); ?>" >
1176
- <input class="add_percent wdwt_btn_blue" type="button" id="<?php echo $element['name']; ?>_add-button" value="<?php esc_attr_e('Add new percent value', WDWT_LANG); ?>" />
1177
  </div>
1178
  </div>
1179
  </div>
@@ -1303,18 +1303,18 @@ class WDI_admin_view {
1303
  }
1304
  ?>
1305
  <span class="pagination-links">
1306
- <a class="<?php echo $first_page; ?>" title="Go to the first page" href="javascript:wdi_spider_page(<?php echo $page_number; ?>,-2);">«</a>
1307
- <a class="<?php echo $prev_page; ?>" title="Go to the previous page" href="javascript:wdi_spider_page(<?php echo $page_number; ?>,-1);">‹</a>
1308
  <span class="paging-input">
1309
  <span class="total-pages">
1310
- <input class="current_page" id="current_page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return check_enter_key(event)" title="Go to the page" type="text" size="1" />
1311
  </span> of
1312
  <span class="total-pages">
1313
- <?php echo $items_county; ?>
1314
  </span>
1315
  </span>
1316
- <a class="<?php echo $next_page ?>" title="Go to the next page" href="javascript:wdi_spider_page(<?php echo $page_number; ?>,1);">›</a>
1317
- <a class="<?php echo $last_page ?>" title="Go to the last page" href="javascript:wdi_spider_page(<?php echo $page_number; ?>,2);">»</a>
1318
  <?php
1319
  }
1320
  ?>
25
  public function link_button($element, $context = 'option', $opt_val = '', $meta=array()){
26
  global $wdi_options;
27
  ?>
28
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo sanitize_html_class($element['name']); ?>">
29
  <div class="block margin">
30
+ <a href="<?php echo esc_url($element['href']); ?>" id="<?php echo $element['name']; ?>" class="button" style="text-decoration:none;"><?php echo (isset($element['value']))?esc_html($element['value']):esc_html($element['title']); ?></a>
31
  </div>
32
  <?php if(isset($element['description'])){ ?>
33
  <p style="font-style: italic;"><?php echo $element['description']; ?></p>
45
  public function button($element, $context = 'option', $opt_val = '', $meta=array()){
46
  global $wdi_options;
47
  ?>
48
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo sanitize_html_class($element['name']); ?>">
49
  <div class="block margin">
50
  <div class="optioninput checkbox">
51
+ <span id="<?php echo sanitize_html_class($element['name']); ?>" class="button" style="text-decoration:none;"><?php echo esc_html($element['title']); ?></span>
52
  </div>
53
  </div>
54
  <script>
105
  }
106
  $opt_val = trim($opt_val);
107
  ?>
108
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo sanitize_html_class($element['name']); ?>">
109
  <div class="block margin">
110
  <div class="optioninput checkbox">
111
+ <input type="checkbox" class="checkbox" name="<?php echo esc_attr($optionname); ?>" id="<?php echo sanitize_html_class($element['name']); ?>" <?php checked($opt_val || $opt_val =='on'); ?> <?php $this->custom_attrs($element); ?> value="1">
112
  </div>
113
  </div>
114
  </div>
138
  $opt_val = trim($opt_val);
139
 
140
  ?>
141
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo sanitize_html_class($element['name']); ?>">
142
  <div class="block margin">
143
  <div class="optioninput checkbox">
144
+ <input type="checkbox" class="checkbox" name="<?php echo esc_attr($optionname); ?>" id="<?php echo sanitize_html_class($element['name']); ?>" <?php checked($opt_val || $opt_val =='on'); ?> <?php $this->custom_attrs($element); ?> value="<?php echo esc_attr($opt_val); ?>">
145
  </div>
146
  </div>
147
  </div>
193
  $opt_val = $wdi_options[$element['name']];
194
  }
195
  ?>
196
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo sanitize_html_class($element['name']); ?>">
197
  <div class='wdwt_float'>
198
  <div>
199
+ <input type="text" class='color_input' id="<?php echo sanitize_html_class($element['name']); ?>" name="<?php echo esc_attr($optionname); ?>" value="<?php echo esc_attr($opt_val); ?>" data-default-color="<?php echo esc_attr($element['default']); ?>" <?php $this->custom_attrs($element); ?> style="background-color:<?php echo esc_attr($opt_val); ?>;">
200
  </div>
201
  </div>
202
  </div>
214
  $input_size = isset($element["input_size"]) ? $element["input_size"] : $this->params["input_size"];
215
  $optionname = WDI_OPT . '[' . $element['name'] . ']';
216
  ?>
217
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo sanitize_html_class($element['name']); ?>">
218
  <div class="block">
219
  <?php WDILibrary::add_auth_button(''); ?>
220
  <div class="wdi_more_token_template" style="display: none;">
221
+ <input type="text" name="<?php echo esc_attr($optionname . '[access_token][]'); ?>" class="wdi_more_access_token" disabled/>
222
+ <input type="text" name="<?php echo esc_attr($optionname . '[user_name][]'); ?>" class="wdi_more_user_name" disabled/>
223
+ <input type="text" name="<?php echo esc_attr($optionname . '[user_id][]'); ?>" class="wdi_more_user_id" disabled/>
224
  </div>
225
  </div>
226
  </div>
258
  $input_size = isset($element["input_size"]) ? $element["input_size"] : $this->params["input_size"];
259
 
260
  ?>
261
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo sanitize_html_class($element['name']); ?>">
262
  <div class="block">
263
  <div class="optioninput">
264
+ <input <?php echo $readonly;?> type=<?php echo isset($element['input_type']) ? esc_attr($element['input_type']) : 'text'?> name="<?php echo esc_attr($optionname); ?>" id="<?php echo sanitize_html_class($element['name']);?>"
265
  <?php echo isset($element['required'])? 'required' : ''; $this->custom_attrs($element); ?>
266
+ value="<?php echo esc_attr($opt_val); ?>" size="<?php echo esc_attr($input_size); ?>"
267
  <?php if(isset($element['attr'])) {echo $element['attr']['name'] . '="' .$element["attr"]["value"].'"';} ?>>
268
  <?php
269
  if(isset($element['unit_symbol'])){
296
  }
297
 
298
  ?>
299
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo sanitize_html_class($element['name']); ?>">
300
  <?php
301
  foreach ( $element['valid_options'] as $key => $option ) {
302
  ?>
303
+ <input type="radio" name="<?php echo esc_attr($optionname); ?>" <?php checked( $key, $opt_val ); ?> <?php $this->custom_attrs($element); ?> value="<?php echo esc_attr($key); ?>" /> <?php echo esc_html($option); ?>
304
  <?php
305
  echo isset($element['label']) ? $element['label'] : "";
306
  }
328
  }
329
 
330
  ?>
331
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo sanitize_html_class($element['name']); ?>">
332
  <?php
333
  foreach ( $element['valid_options'] as $key => $option ) {
334
  ?>
335
+ <input type="radio" name="<?php echo esc_attr($optionname); ?>" <?php checked( $key, $opt_val ); ?> <?php $this->custom_attrs($element); ?> value="<?php echo esc_attr($key); ?>" /> <?php echo esc_html($option); ?>
336
  <?php
337
  }
338
  ?>
411
  }
412
  ?>
413
 
414
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo sanitize_html_class($element['name']); ?>">
415
  <?php
416
  $img_h = intval($element['img_height']) / sizeof($element['valid_options']);
417
  foreach($element['valid_options'] as $option) { ?>
418
  <div class="sprite_layouts">
419
  <div alt="<?php echo esc_attr($option['title']); ?>" style="width:<?php echo esc_attr($element['img_width']); ?>px; height:<?php echo esc_attr($img_h); ?>px; background:url(<?php echo esc_url(WDWT_IMG_INC.$element['img_src']); ?>) no-repeat 0 -<?php echo (intval($option['index'])-1) * $img_h; ?>px;"></div>
420
+ <input type="radio" name="<?php echo esc_attr($optionname); ?>" <?php checked( $option['index'], $opt_val ); ?> <?php $this->custom_attrs($element); ?> value="<?php echo intval($option['index']); ?>">
421
  </div>
422
  <?php
423
  }
451
  }
452
  ?>
453
 
454
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo sanitize_html_class($element['name']); ?>">
455
  <?php
456
  $img_h = intval($element['img_height']) / sizeof($element['valid_options']);
457
  foreach($element['valid_options'] as $option) { ?>
458
  <div class="sprite_layouts">
459
  <div alt="<?php echo esc_attr($option['title']); ?>" style="width:<?php echo $element['img_width']; ?>px; height:<?php echo $img_h; ?>px; background:url(<?php echo esc_url(WDWT_IMG_INC.$element['img_src']); ?>) no-repeat 0 -<?php echo (intval($option['index'])-1) * $img_h; ?>px;"></div>
460
+ <input type="radio" name="<?php echo esc_attr($optionname); ?>" <?php checked( $option['index'], $opt_val ); ?> <?php $this->custom_attrs($element); ?> value="<?php echo intval($option['index']); ?>">
461
  </div>
462
  <?php
463
  }
539
  $width = isset($element["width"]) ? intval($element["width"]) : $this->params["select_width"];
540
  $disabled = isset($element["disabled"]) ? $element["disabled"] : array();
541
  ?>
542
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo sanitize_html_class($element['name']); ?>">
543
  <div class="block">
544
  <div class="optioninput">
545
+ <select name="<?php echo esc_attr($optionname); ?>" id="<?php echo sanitize_html_class($element['name']) ?>" <?php echo $multiple ? 'multiple="multiple"' : ''; ?> <?php $this->custom_attrs($element); ?> style="width:<?php echo $width; ?>px; resize:vertical;">
546
  <?php foreach($element['valid_options'] as $key => $value){ ?>
547
  <option value="<?php echo esc_attr($key) ?>" <?php selected(true, in_array($key, $opt_val)); ?> <?php echo in_array($key, $disabled) ? 'disabled="disabled"' : ''; ?>>
548
  <?php echo esc_html($value); ?>
577
  $width = isset($element["width"]) ? intval($element["width"]) : $this->params["select_width"];
578
 
579
  ?>
580
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo sanitize_html_class($element['name']); ?>">
581
 
582
+ <select name="<?php echo $optionname; ?>" id="<?php echo sanitize_html_class($element['name']) ?>" <?php echo $multiple ? 'multiple="multiple"' : ''; ?> <?php $this->custom_attrs($element); ?> style="width:<?php echo $width; ?>px; resize:vertical;">
583
  <?php
584
  foreach($element['valid_options'] as $key => $value){ ?>
585
  <option value="<?php echo esc_attr($key); ?>" <?php selected(true, in_array($key, $opt_val)); ?>><?php echo esc_html($value); ?></option>
660
  $width = isset($element["width"]) ? $element["width"] : $this->params["select_width"];
661
 
662
  ?>
663
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo sanitize_html_class($element['name']); ?>">
664
+ <select name="<?php echo esc_attr($optionname); ?>" id="<?php echo sanitize_html_class($element['name']); ?>" <?php $this->custom_attrs($element); ?> style="width:<?php echo $width;?>px;">
665
  <?php
666
  foreach($element['valid_options'] as $key => $value){ ?>
667
  <option value="<?php echo esc_attr($key); ?>" <?php selected(true, in_array($key, $opt_val)); ?>><?php echo esc_html($value); ?></option>
716
  $textarea_w = isset($element["width"]) ? $element["width"] : $this->params["textarea_width"];
717
  $textarea_h = isset($element["height"]) ? $element["height"] : $this->params["textarea_height"];
718
  ?>
719
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo sanitize_html_class($element['name']); ?>">
720
  <div class="block">
721
  <div class="optioninput">
722
+ <textarea name="<?php echo esc_attr($optionname); ?>" id="<?php echo sanitize_html_class($element['name']); ?>" <?php $this->custom_attrs($element); ?> style="width:<?php echo $textarea_w; ?>px; height:<?php echo $textarea_h; ?>px;"><?php echo esc_html($opt_val); ?></textarea>
723
  </div>
724
  </div>
725
  </div>
740
  global $wdi_options;
741
  ?>
742
 
743
+ <div class="font_preview_wrap" id="wdwt_wrap_<?php echo sanitize_html_class($element['name']); ?>">
744
  <label class="typagrphy_label" for="" style="font-size:18px;font-size: 20px;font-family: Segoe UI;"><?php echo __('Preview', WDWT_LANG ); ?></label>
745
  <div class="font_preview">
746
+ <div class="optioninput-preview" id="<?php echo sanitize_html_class($element['name']); ?>" style="margin-top: 14px; margin-bottom: 23px;" ><?php
747
  $theme = wp_get_theme();
748
  echo esc_html($theme->description);
749
  ?></div>
822
  /*jQuery(".slide_tab").prev().parent().prev().css("display","none");*/
823
  });
824
  </script>
825
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo sanitize_html_class($element['name']); ?>">
826
  <div class="optioninput" id="upload_images">
827
+ <input type="text" class="upload" id="<?php echo sanitize_html_class($element["name"]); ?>" name="<?php echo esc_attr($optionname); ?>" size="<?php echo esc_attr($upload_size); ?>" <?php $this->custom_attrs($element); ?> value="<?php echo esc_url($opt_val); ?>"/>
828
+ <input class="upload-button button" type="button" id="uploader_<?php echo sanitize_html_class($element['name']); ?>" value="<?php esc_attr_e('Upload Image', WDWT_LANG); ?>"/>
829
  </div>
830
  </div>
831
  <?php
869
  $filetype = (isset($element["filetype"]) && $element_filetype != '') ? $element["filetype"] : $this->params["upload_filetype"];
870
  ?>
871
 
872
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo sanitize_html_class($element['name']); ?>">
873
 
874
+ <div class="wdwt_slide wdwt_slide_<?php echo sanitize_html_class($element['name']); ?> last_slide" id="wdwt_slide_<?php echo sanitize_html_class($element['name']); ?>_0">
875
  <!-- Image URL -->
876
  <div class="slide-from-base_url" style="margin-bottom:3%;">
877
  <div valign="middle"><h2><?php esc_html_e("Image URL",WDWT_LANG); ?></h2></div>
878
  <div>
879
+ <input type="text" id="<?php echo sanitize_html_class($element['name']); ?>_url_0" size="50" value="" class="upload image_links_group" >
880
 
881
+ <input type="button" class="<?php echo sanitize_html_class($element['name']); ?>_update-image slide_but_up" id="<?php echo $element['name']; ?>_update-button_0" value="<?php esc_attr_e("Update image", WDWT_LANG); ?>">
882
 
883
+ <input type="button" class="<?php echo sanitize_html_class($element['name']); ?>_remove-image slide_but_rem wdwt_btn_red" id="<?php echo $element['name']; ?>_remove-button_0" value="<?php esc_attr_e("Remove this slide", WDWT_LANG); ?>" />
884
  </div>
885
  </div>
886
  <!-- Image -->
887
  <div class="slide-from-base_image">
888
+ <div><img style="width:82%;" id="<?php echo sanitize_html_class($element['name']); ?>_img_0" src="" /></div>
889
  </div>
890
  <!-- Image HREF -->
891
  <div class="slide-from-base_href">
892
  <div valign="middle"><h2><?php esc_html_e("Image Href", WDWT_LANG); ?></h2></div>
893
+ <div><input type="text" id="<?php echo sanitize_html_class($element['name']); ?>_href_0" class="image_href_group" value="" /></div>
894
  </div>
895
  <!-- Image TITLE -->
896
  <div class="slide-from-base_title">
897
  <div valign="middle">
898
  <h2><?php esc_html_e("Image Title", WDWT_LANG); ?></h2>
899
  </div>
900
+ <div><input type="text" id="<?php echo sanitize_html_class($element['name']); ?>_title_0" class="image_title_group" value="" /></div>
901
  </div>
902
  <!-- Image DESCRIPTION -->
903
  <div class="slide-from-base_desc" style="margin-bottom:3%;">
905
  <h2><?php esc_html_e("Image Description", WDWT_LANG); ?></h2>
906
  </div>
907
  <div>
908
+ <textarea class="image_descr_group" id="<?php echo sanitize_html_class($element['name']); ?>_descr_0" style="width:236px; height:120px;"></textarea>
909
  </div>
910
  </div>
911
  </div>
918
  </h2>
919
  </div>
920
  <div>
921
+ <input type="hidden" name="<?php echo esc_attr($optionname_url); ?>" id="<?php echo sanitize_html_class($element['name']); ?>_urls" data-customize-setting-link="<?php echo $optionname_url; ?>" value="<?php echo esc_attr($imgs_url); ?>" >
922
+ <input type="hidden" name="<?php echo esc_attr($optionname_href); ?>" id="<?php echo sanitize_html_class($element['name']); ?>_hrefs" data-customize-setting-link="<?php echo $optionname_href; ?>" value="<?php echo esc_attr($imgs_href); ?>" >
923
+ <input type="hidden" name="<?php echo esc_attr($optionname_title); ?>" id="<?php echo sanitize_html_class($element['name']); ?>_titles" data-customize-setting-link="<?php echo $optionname_title; ?>" value="<?php echo esc_attr($imgs_title); ?>" >
924
+ <input type="hidden" name="<?php echo esc_attr($optionname_desc); ?>" id="<?php echo sanitize_html_class($element['name']); ?>_descrs" data-customize-setting-link="<?php echo $optionname_desc; ?>" value="<?php echo esc_attr($imgs_desc); ?>" >
925
+ <input class="upload_button_slide" type="button" id="<?php echo sanitize_html_class($element['name']); ?>_add-button" value="<?php esc_attr_e('Add new slide', WDWT_LANG); ?>" />
926
  </div>
927
  </div>
928
  </div>
1029
  $current = $opt_val['active'];
1030
  $width = isset($element["width"]) ? $element["width"] : $this->params["select_width"];
1031
  ?>
1032
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo sanitize_html_class($element['name']); ?>">
1033
+ <select name="<?php echo $optionname; ?>[active]" id="<?php echo sanitize_html_class($element['name']); ?>" <?php $this->custom_attrs($element); ?> style="width:<?php echo $width; ?>px;">
1034
  <?php
1035
  for($i=0; $i<sizeof($element['default']['themes']); $i++){ ?>
1036
+ <option value="<?php echo esc_attr($i) ?>" <?php selected( $current, $i); ?>> <?php echo esc_html($element['default']['themes'][$i]['title']); ?></option>
1037
  <?php } ?>
1038
  </select>
1039
  </div>
1098
 
1099
  $select_theme = $opt_val['select_theme'];
1100
  ?>
1101
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo sanitize_html_class($element['name']); ?>">
1102
+ <input type="text" class="hidden_field" id="theme_<?php echo sanitize_html_class($element['name']); ?>" hidden='hidden' name="<?php echo esc_attr($optionname.'[select_theme]'); ?>" value="<?php echo esc_attr($opt_val['select_theme']); ?>">
1103
+ <input type="text" class="hidden_field" id="active_<?php echo sanitize_html_class($element['name']); ?>" hidden='hidden' name="<?php echo esc_attr($optionname.'[active]'); ?>" value="<?php echo esc_attr($opt_val['active']); ?>">
1104
  <?php foreach($opt_val['colors'] as $color_name => $color): ?>
1105
  <div class='wdwt_float'>
1106
  <span class="wdwt_color_title"><?php echo esc_html($element['color_names'][$color_name]); ?></span>
1107
  <div>
1108
+ <input type="text" class="hidden_field" id="default_<?php echo sanitize_html_class($element['name'].'_'.$color_name); ?>" hidden='hidden' name="<?php echo esc_attr($optionname.'[colors]['.$color_name.']'.'[default]'); ?>" value="<?php echo esc_attr($color['default']); ?>">
1109
+ <input type="text" class='color_input' id="value_<?php echo sanitize_html_class($element['name'].'_'.$color_name); ?>" name="<?php echo esc_attr($optionname.'[colors]['.$color_name.']'.'[value]'); ?>" value="<?php echo esc_attr($color['value']); ?>" data-default-color="<?php echo esc_attr($color['default']); ?>" style="background-color:<?php echo $color['value']; ?>;">
1110
  </div>
1111
  </div>
1112
  <?php endforeach; ?>
1147
  }
1148
  ?>
1149
 
1150
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo sanitize_html_class($element['name']); ?>">
1151
 
1152
+ <div class="wdwt_diagram wdwt_diagram_<?php echo sanitize_html_class($element['name']); ?> last_percent" id="wdwt_diagram_<?php echo sanitize_html_class($element['name']); ?>_0">
1153
  <!-- Percent TITLE -->
1154
  <div class="diagram-from-base_title">
1155
  <div valign="middle">
1156
  <h2><?php esc_html_e("Title", WDWT_LANG); ?></h2>
1157
  </div>
1158
+ <div><input type="text" id="<?php echo sanitize_html_class($element['name']); ?>_title_0" class="diagram_title_group" value="" /></div>
1159
  </div>
1160
  <!-- percent DESCRIPTION -->
1161
  <div class="diagram-from-base_desc" style="margin-bottom:3%;">
1163
  <h2><?php esc_html_e("Percent", WDWT_LANG); ?></h2>
1164
  </div>
1165
  <div>
1166
+ <input type="text" class="diagram_percent_group" id="<?php echo sanitize_html_class($element['name']); ?>_percent_0" value="" />%
1167
+ <input type="button" class="<?php echo sanitize_html_class($element['name']); ?>_remove-percent wdwt_btn_red" id="<?php echo sanitize_html_class($element['name']); ?>_remove-button_0" value="<?php esc_attr_e("Remove this percent", WDWT_LANG); ?>" />
1168
  </div>
1169
  </div>
1170
  </div>
1171
 
1172
  <div class="diagram-controls">
1173
  <div>
1174
+ <input type="hidden" name="<?php echo esc_attr($optionname_title); ?>" id="<?php echo sanitize_html_class($element['name']); ?>_titles" data-customize-setting-link="<?php echo esc_attr($optionname_title); ?>" value="<?php echo esc_attr($diagram_title); ?>" >
1175
+ <input type="hidden" name="<?php echo esc_attr($optionname_percent); ?>" id="<?php echo sanitize_html_class($element['name']); ?>_percents" data-customize-setting-link="<?php echo esc_attr($optionname_percent); ?>" value="<?php echo esc_attr($diagram_percent); ?>" >
1176
+ <input class="add_percent wdwt_btn_blue" type="button" id="<?php echo sanitize_html_class($element['name']); ?>_add-button" value="<?php esc_attr_e('Add new percent value', WDWT_LANG); ?>" />
1177
  </div>
1178
  </div>
1179
  </div>
1303
  }
1304
  ?>
1305
  <span class="pagination-links">
1306
+ <a class="<?php echo sanitize_html_class($first_page); ?>" title="Go to the first page" href="javascript:wdi_spider_page(<?php echo $page_number; ?>,-2);">«</a>
1307
+ <a class="<?php echo sanitize_html_class($prev_page); ?>" title="Go to the previous page" href="javascript:wdi_spider_page(<?php echo $page_number; ?>,-1);">‹</a>
1308
  <span class="paging-input">
1309
  <span class="total-pages">
1310
+ <input class="current_page" id="current_page" name="current_page" value="<?php echo esc_attr($page_number); ?>" onkeypress="return check_enter_key(event)" title="Go to the page" type="text" size="1" />
1311
  </span> of
1312
  <span class="total-pages">
1313
+ <?php echo esc_html($items_county); ?>
1314
  </span>
1315
  </span>
1316
+ <a class="<?php echo sanitize_html_class($next_page); ?>" title="Go to the next page" href="javascript:wdi_spider_page(<?php echo $page_number; ?>,1);">›</a>
1317
+ <a class="<?php echo sanitize_html_class($last_page); ?>" title="Go to the last page" href="javascript:wdi_spider_page(<?php echo $page_number; ?>,2);">»</a>
1318
  <?php
1319
  }
1320
  ?>
framework/WDI_form_builder.php CHANGED
@@ -36,26 +36,26 @@ public function __construct() {
36
 
37
 
38
  ?>
39
- <div class="wdwt_param" id="WDI_wrap_<?php echo $element['name']; ?>">
40
  <div class="block">
41
  <div class="optioninput">
42
 
43
  <?php
44
  if($label!='' && $label['place']=='before'){
45
  ?>
46
- <label for="<?php echo $id; ?>"><?php echo $label['text']; ?></label>
47
  <?php echo isset($label['br'])? '<br/>' : ''?>
48
  <?php
49
  }
50
  ?>
51
 
52
- <input type="<?php echo $type; ?>" id="<?php echo $id; ?>" name="<?php echo $name; ?>" value="<?php echo esc_attr($value); ?>"
53
- <?php echo $attr; ?> size="<?php echo $input_size; ?>">
54
  <?php
55
  if($label!='' && $label['place']=='after'){
56
  ?>
57
  <?php echo isset($label['br'])? '<br/>' : ''?>
58
- <label for="<?php echo $id; ?>"><?php echo $label['text']; ?></label>
59
  <?php
60
  }
61
 
@@ -103,18 +103,18 @@ public function __construct() {
103
  }
104
  $attr = $attrs;
105
  ?>
106
- <div class="wdwt_param" id="WDI_wrap_<?php echo $element['name']; ?>">
107
  <div class="block">
108
  <div class="optioninput">
109
  <?php
110
  if($label!='' && $label['place']=='before'){
111
  ?>
112
- <label for="<?php echo $id; ?>"><?php echo $label['text']; ?></label>
113
  <?php echo isset($label['br']) ? '<br/>' : ''?>
114
  <?php
115
  }
116
  ?>
117
- <select name="<?php echo $name; ?>" id="<?php echo $id; ?>" <?php echo $switched; ?> <?php echo $type; ?> style="<?php if($width!='') echo 'width:' .$width . ';';?> resize:vertical;" <?php echo $attr; ?>>
118
 
119
  <?php foreach($options as $key => $value){ ?>
120
  <option <?php echo (in_array($key, $disabled_options)) ? 'disabled' : '' ?> value="<?php echo esc_attr($key) ?>" <?php if($key==$opt_value){echo 'selected';}?>>
@@ -128,12 +128,13 @@ public function __construct() {
128
 
129
  ?>
130
  <?php echo isset($label['br'])? '<br/>' : ''?>
131
- <label class="<?php echo isset($label['class']) ? $label['class'] : '';?>" for="<?php echo $id; ?>"><?php echo $label['text']; ?></label>
132
  <?php
133
  }
134
- if($disabled_text != ''){
135
- ?><span class="wdi_pro_only"><?php echo $disabled_text?></span> <?php
136
- }
 
137
  ?>
138
 
139
  </div>
@@ -208,14 +209,14 @@ public function __construct() {
208
  }
209
  $attr = $attrs;
210
  ?>
211
- <div class="wdwt_param" id="WDI_wrap_<?php echo $element['name']; ?>">
212
  <div class="block">
213
  <div class="optioninput">
214
  <?php if ( !empty($label['place']) && $label['place'] == 'before' ) { ?>
215
- <label for="<?php echo $id; ?>"><?php echo $label['text']; ?></label>
216
  <?php echo isset($label['br']) ? '<br/>' : ''; ?>
217
  <?php } ?>
218
- <select name="<?php echo $name; ?>" id="<?php echo $id; ?>" <?php echo $type; ?> style="<?php if($width!='') echo 'width:' .$width . ';';?> resize:vertical;" <?php echo $attr; ?>>
219
  <option value=""><?php _e('Select', 'wd-instagram-feed'); ?></option>
220
  <?php foreach($options as $label => $values) { ?>
221
  <optgroup label="<?php echo ucfirst($label) ?>">
@@ -234,7 +235,7 @@ public function __construct() {
234
  <?php
235
  if ( !empty($label['place']) && $label['place']=='after' ) { ?>
236
  <?php echo isset($label['br'])? '<br/>' : ''?>
237
- <label for="<?php echo $id; ?>"><?php echo $label['text']; ?></label>
238
  <?php
239
  }
240
  ?>
@@ -355,13 +356,13 @@ public function __construct() {
355
  }
356
 
357
  ?>
358
- <div class="wdwt_param" id="WDI_wrap_<?php echo $element['name'];?>">
359
  <div class="block">
360
  <div class="optioninput">
361
  <?php
362
  if($label!='' && $label['place']=='before'){
363
  ?>
364
- <label for="<?php echo $id; ?>"><?php echo $label['text']; ?></label>
365
  <?php echo isset($label['br']) ? '<br/>' : ''?>
366
  <?php
367
  }
@@ -375,12 +376,12 @@ public function __construct() {
375
  }
376
  }
377
  ?>
378
- <input <?php echo $disable;?> style="margin:2px;" type="radio" name="<?php echo $name ?>" value="<?php echo esc_attr($key); ?>" <?php checked($key,$opt_value); ?> <?php echo $attr; ?> id="<?php echo $option_name . "_" . $key;?>"/> <label for="<?php echo $option_name . "_" . $key;?>"><?php echo esc_html($option); ?></label>
379
  <?php if($disable_text != '') : ?>
380
  <?php if(isset($disabled_options['br'])) : ?>
381
  <br>
382
  <?php endif; ?>
383
- <span class="wdi_pro_only"><?php echo $disable_text?></span>
384
  <?php endif;?>
385
 
386
  <?php echo $break;?>
@@ -498,23 +499,23 @@ public function __construct() {
498
 
499
  $hide_ids = isset($element['hide_ids']) ? $element['hide_ids'] : '';
500
  ?>
501
- <div class="wdwt_param" id="WDI_wrap_<?php echo $element['name'];?>">
502
  <div class="block margin">
503
  <div class="optioninput checkbox">
504
  <?php
505
  if($label!='' && $label['place']=='before'){
506
  ?>
507
- <label class="<?php echo isset($label['class']) ? $label['class'] : '' ?>" for="<?php echo $id; ?>"><?php echo $label['text']; ?></label>
508
  <?php echo isset($label['br'])? '<br/>' : ''?>
509
  <?php
510
  }
511
  ?>
512
- <input <?php echo $disable; ?> type="checkbox" class="checkbox" name="<?php echo $name; ?>" id="<?php echo $id ?>" <?php echo $attr;?> <?php checked(1,$opt_value)?> value="1">
513
  <?php
514
  if($label!='' && $label['place']=='after'){
515
  ?>
516
  <?php echo isset($label['br'])? '<br/>' : ''?>
517
- <label class="<?php echo isset($label['class']) ? $label['class'] : '' ?>" for="<?php echo $id; ?>"><?php echo $label['text']; ?></label>
518
  <?php
519
  }
520
  ?>
@@ -646,10 +647,10 @@ public function __construct() {
646
  }
647
  }
648
  ?>
649
- <div class="wdwt_param" id="WDI_wrap_<?php echo $element['name'];?>">
650
  <div class='wdwt_float' >
651
  <div>
652
- <input type="text" class='color_input' id="<?php echo $id ?>" <?php echo $attr;?> name="<?php echo $name; ?>" value="<?php echo esc_attr($opt_value); ?>" data-default-color="<?php echo $defaults[$element['name']]; ?>" style="background-color:<?php echo esc_attr($opt_value); ?>;">
653
  </div>
654
  </div>
655
  </div>
36
 
37
 
38
  ?>
39
+ <div class="wdwt_param" id="WDI_wrap_<?php echo sanitize_html_class($element['name']); ?>">
40
  <div class="block">
41
  <div class="optioninput">
42
 
43
  <?php
44
  if($label!='' && $label['place']=='before'){
45
  ?>
46
+ <label for="<?php echo esc_attr($id); ?>"><?php echo esc_html($label['text']); ?></label>
47
  <?php echo isset($label['br'])? '<br/>' : ''?>
48
  <?php
49
  }
50
  ?>
51
 
52
+ <input type="<?php echo esc_attr($type); ?>" id="<?php echo sanitize_html_class($id); ?>" name="<?php echo esc_attr($name); ?>" value="<?php echo esc_attr($value); ?>"
53
+ <?php echo $attr; ?> size="<?php echo esc_attr($input_size); ?>">
54
  <?php
55
  if($label!='' && $label['place']=='after'){
56
  ?>
57
  <?php echo isset($label['br'])? '<br/>' : ''?>
58
+ <label for="<?php echo esc_attr($id); ?>"><?php echo esc_html($label['text']); ?></label>
59
  <?php
60
  }
61
 
103
  }
104
  $attr = $attrs;
105
  ?>
106
+ <div class="wdwt_param" id="WDI_wrap_<?php echo sanitize_html_class($element['name']); ?>">
107
  <div class="block">
108
  <div class="optioninput">
109
  <?php
110
  if($label!='' && $label['place']=='before'){
111
  ?>
112
+ <label for="<?php echo esc_attr($id); ?>"><?php echo esc_html($label['text']); ?></label>
113
  <?php echo isset($label['br']) ? '<br/>' : ''?>
114
  <?php
115
  }
116
  ?>
117
+ <select name="<?php echo esc_attr($name); ?>" id="<?php echo sanitize_html_class($id); ?>" <?php echo $switched; ?> <?php echo $type; ?> style="<?php if($width!='') echo 'width:' .$width . ';';?> resize:vertical;" <?php echo $attr; ?>>
118
 
119
  <?php foreach($options as $key => $value){ ?>
120
  <option <?php echo (in_array($key, $disabled_options)) ? 'disabled' : '' ?> value="<?php echo esc_attr($key) ?>" <?php if($key==$opt_value){echo 'selected';}?>>
128
 
129
  ?>
130
  <?php echo isset($label['br'])? '<br/>' : ''?>
131
+ <label class="<?php echo isset($label['class']) ? sanitize_html_class($label['class']) : '';?>" for="<?php echo esc_attr($id); ?>"><?php echo esc_html($label['text']); ?></label>
132
  <?php
133
  }
134
+ if($disabled_text != ''){ ?>
135
+ <span class="wdi_pro_only"><?php echo esc_html($disabled_text); ?></span>
136
+ <?php
137
+ }
138
  ?>
139
 
140
  </div>
209
  }
210
  $attr = $attrs;
211
  ?>
212
+ <div class="wdwt_param" id="WDI_wrap_<?php echo sanitize_html_class($element['name']); ?>">
213
  <div class="block">
214
  <div class="optioninput">
215
  <?php if ( !empty($label['place']) && $label['place'] == 'before' ) { ?>
216
+ <label for="<?php echo esc_attr($id); ?>"><?php echo esc_html($label['text']); ?></label>
217
  <?php echo isset($label['br']) ? '<br/>' : ''; ?>
218
  <?php } ?>
219
+ <select name="<?php echo esc_attr($name); ?>" id="<?php echo sanitize_html_class($id); ?>" <?php echo $type; ?> style="<?php if($width!='') echo 'width:' .$width . ';';?> resize:vertical;" <?php echo $attr; ?>>
220
  <option value=""><?php _e('Select', 'wd-instagram-feed'); ?></option>
221
  <?php foreach($options as $label => $values) { ?>
222
  <optgroup label="<?php echo ucfirst($label) ?>">
235
  <?php
236
  if ( !empty($label['place']) && $label['place']=='after' ) { ?>
237
  <?php echo isset($label['br'])? '<br/>' : ''?>
238
+ <label for="<?php echo esc_attr($id); ?>"><?php echo esc_html($label['text']); ?></label>
239
  <?php
240
  }
241
  ?>
356
  }
357
 
358
  ?>
359
+ <div class="wdwt_param" id="WDI_wrap_<?php echo sanitize_html_class($element['name']);?>">
360
  <div class="block">
361
  <div class="optioninput">
362
  <?php
363
  if($label!='' && $label['place']=='before'){
364
  ?>
365
+ <label for="<?php echo esc_attr($id); ?>"><?php echo esc_html($label['text']); ?></label>
366
  <?php echo isset($label['br']) ? '<br/>' : ''?>
367
  <?php
368
  }
376
  }
377
  }
378
  ?>
379
+ <input <?php echo $disable;?> style="margin:2px;" type="radio" name="<?php echo esc_attr($name); ?>" value="<?php echo esc_attr($key); ?>" <?php checked($key,$opt_value); ?> <?php echo $attr; ?> id="<?php echo $option_name . "_" . $key;?>"/> <label for="<?php echo $option_name . "_" . $key;?>"><?php echo esc_html($option); ?></label>
380
  <?php if($disable_text != '') : ?>
381
  <?php if(isset($disabled_options['br'])) : ?>
382
  <br>
383
  <?php endif; ?>
384
+ <span class="wdi_pro_only"><?php echo esc_html($disable_text); ?></span>
385
  <?php endif;?>
386
 
387
  <?php echo $break;?>
499
 
500
  $hide_ids = isset($element['hide_ids']) ? $element['hide_ids'] : '';
501
  ?>
502
+ <div class="wdwt_param" id="WDI_wrap_<?php echo sanitize_html_class($element['name']);?>">
503
  <div class="block margin">
504
  <div class="optioninput checkbox">
505
  <?php
506
  if($label!='' && $label['place']=='before'){
507
  ?>
508
+ <label class="<?php echo isset($label['class']) ? sanitize_html_class($label['class']) : '' ?>" for="<?php echo esc_attr($id); ?>"><?php echo esc_html($label['text']); ?></label>
509
  <?php echo isset($label['br'])? '<br/>' : ''?>
510
  <?php
511
  }
512
  ?>
513
+ <input <?php echo $disable; ?> type="checkbox" class="checkbox" name="<?php echo esc_attr($name); ?>" id="<?php echo sanitize_html_class($id) ?>" <?php echo $attr;?> <?php checked(1,$opt_value)?> value="1">
514
  <?php
515
  if($label!='' && $label['place']=='after'){
516
  ?>
517
  <?php echo isset($label['br'])? '<br/>' : ''?>
518
+ <label class="<?php echo isset($label['class']) ? sanitize_html_class($label['class']) : '' ?>" for="<?php echo esc_attr($id); ?>"><?php echo esc_html($label['text']); ?></label>
519
  <?php
520
  }
521
  ?>
647
  }
648
  }
649
  ?>
650
+ <div class="wdwt_param" id="WDI_wrap_<?php echo sanitize_html_class($element['name']);?>">
651
  <div class='wdwt_float' >
652
  <div>
653
+ <input type="text" class='color_input' id="<?php echo sanitize_html_class($id) ?>" <?php echo $attr;?> name="<?php echo esc_attr($name); ?>" value="<?php echo esc_attr($opt_value); ?>" data-default-color="<?php echo esc_attr($defaults[$element['name']]); ?>" style="background-color:<?php echo esc_attr($opt_value); ?>;">
654
  </div>
655
  </div>
656
  </div>
frontend/controllers/WDIControllerGalleryBox.php CHANGED
@@ -2,9 +2,6 @@
2
 
3
  class WDIControllerGalleryBox {
4
 
5
- public function __construct() {
6
- }
7
-
8
  public function execute() {
9
  $ajax_task = WDILibrary::get('ajax_task', '', 'sanitize_text_field', 'POST');
10
  if (method_exists($this, $ajax_task)) {
2
 
3
  class WDIControllerGalleryBox {
4
 
 
 
 
5
  public function execute() {
6
  $ajax_task = WDILibrary::get('ajax_task', '', 'sanitize_text_field', 'POST');
7
  if (method_exists($this, $ajax_task)) {
frontend/controllers/imagebrowser.php CHANGED
@@ -2,9 +2,6 @@
2
 
3
  class WDI_ImageBrowser_controller {
4
 
5
- public function __construct() {
6
- }
7
-
8
  public function execute( $feed_row, $wdi_feed_counter ) {
9
  //including model
10
  require_once(WDI_DIR . '/frontend/models/imagebrowser.php');
2
 
3
  class WDI_ImageBrowser_controller {
4
 
 
 
 
5
  public function execute( $feed_row, $wdi_feed_counter ) {
6
  //including model
7
  require_once(WDI_DIR . '/frontend/models/imagebrowser.php');
frontend/controllers/thumbnails.php CHANGED
@@ -2,9 +2,6 @@
2
 
3
  class WDI_Thumbnails_controller {
4
 
5
- public function __construct() {
6
- }
7
-
8
  public function execute( $feed_row, $wdi_feed_counter ) {
9
  //including model
10
  require_once(WDI_DIR . '/frontend/models/thumbnails.php');
2
 
3
  class WDI_Thumbnails_controller {
4
 
 
 
 
5
  public function execute( $feed_row, $wdi_feed_counter ) {
6
  //including model
7
  require_once(WDI_DIR . '/frontend/models/thumbnails.php');
frontend/models/WDIModelGalleryBox.php CHANGED
@@ -1,23 +1,7 @@
1
  <?php
2
 
3
  class WDIModelGalleryBox {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
  public function get_theme_row_data($id) {
22
  global $wpdb;
23
  if ($id) {
@@ -29,11 +13,13 @@ class WDIModelGalleryBox {
29
 
30
  return WDILibrary::objectToArray($row);
31
  }
32
- public function get_feed_row_data($id) {
33
- global $wpdb;
34
- $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . WDI_FEED_TABLE . ' WHERE id="%d"', $id));
35
- return WDILibrary::objectToArray($row);
36
- }
 
 
37
  public function get_option_row_data() {
38
  global $wpdb;
39
  $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdi_option WHERE id="%d"', 1));
@@ -76,14 +62,4 @@ public function get_feed_row_data($id) {
76
  $row = $wpdb->get_results($wpdb->prepare('SELECT t1.*,t2.rate FROM (SELECT image.* FROM ' . $wpdb->prefix . 'wdi_image as image INNER JOIN ' . $wpdb->prefix . 'wdi_image_tag as tag ON image.id=tag.image_id WHERE image.published=1 AND tag.tag_id="%d" ORDER BY ' . $sort_by . ' ' . $order_by. ') as t1 LEFT JOIN (SELECT rate, image_id FROM ' . $wpdb->prefix . 'wdi_image_rate WHERE ip="%s") as t2 ON t1.id=t2.image_id ', $tag_id, $_SERVER['REMOTE_ADDR']));
77
  return $row;
78
  }
79
-
80
- ////////////////////////////////////////////////////////////////////////////////////////
81
- // Getters & Setters //
82
- ////////////////////////////////////////////////////////////////////////////////////////
83
- ////////////////////////////////////////////////////////////////////////////////////////
84
- // Private Methods //
85
- ////////////////////////////////////////////////////////////////////////////////////////
86
- ////////////////////////////////////////////////////////////////////////////////////////
87
- // Listeners //
88
- ////////////////////////////////////////////////////////////////////////////////////////
89
  }
1
  <?php
2
 
3
  class WDIModelGalleryBox {
4
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  public function get_theme_row_data($id) {
6
  global $wpdb;
7
  if ($id) {
13
 
14
  return WDILibrary::objectToArray($row);
15
  }
16
+
17
+ public function get_feed_row_data($id) {
18
+ global $wpdb;
19
+ $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . WDI_FEED_TABLE . ' WHERE id="%d"', $id));
20
+ return WDILibrary::objectToArray($row);
21
+ }
22
+
23
  public function get_option_row_data() {
24
  global $wpdb;
25
  $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdi_option WHERE id="%d"', 1));
62
  $row = $wpdb->get_results($wpdb->prepare('SELECT t1.*,t2.rate FROM (SELECT image.* FROM ' . $wpdb->prefix . 'wdi_image as image INNER JOIN ' . $wpdb->prefix . 'wdi_image_tag as tag ON image.id=tag.image_id WHERE image.published=1 AND tag.tag_id="%d" ORDER BY ' . $sort_by . ' ' . $order_by. ') as t1 LEFT JOIN (SELECT rate, image_id FROM ' . $wpdb->prefix . 'wdi_image_rate WHERE ip="%s") as t2 ON t1.id=t2.image_id ', $tag_id, $_SERVER['REMOTE_ADDR']));
63
  return $row;
64
  }
 
 
 
 
 
 
 
 
 
 
65
  }
frontend/views/WDIViewGalleryBox.php CHANGED
@@ -60,7 +60,7 @@ class WDIViewGalleryBox {
60
  $current_image_index = WDILibrary::get('current_image_index', 0, 'intval', 'POST');
61
  $theme_id = (isset($current_feed['theme_id']) ? esc_html($current_feed['theme_id']) : 1);
62
 
63
- $carousel_media_row = $_POST["carousel_media_row"];
64
  $carousel_media = json_decode(stripslashes($carousel_media_row), true);
65
  $carousel_media = WDILibrary::get('', $carousel_media, 'sanitize_text_field', '');
66
  $carousel_media = is_array($carousel_media) ? $carousel_media : array();
@@ -130,9 +130,7 @@ class WDIViewGalleryBox {
130
  $image_filmstrip_width = 0;
131
  }
132
 
133
- //$json = (($_POST['image_rows']));
134
- //$json = WDILibrary::get('image_rows', '', 'sanitize_text_field', 'POST');
135
- $json = $_POST['image_rows'];
136
  str_replace('"',"&quot;", $json);
137
 
138
  $image_rows = json_decode(stripslashes($json));
@@ -372,8 +370,8 @@ class WDIViewGalleryBox {
372
  if ($option_row->show_image_counts) {
373
  ?>
374
  <span class="wdi_image_count_container wdi_ctrl_btn">
375
- <span class="wdi_image_count"><?php echo $current_image_key + 1; ?></span> /
376
- <span><?php echo $image_rows_count; ?></span>
377
  </span>
378
  <?php
379
  }
@@ -504,7 +502,7 @@ class WDIViewGalleryBox {
504
  <div class="wdi_title" onclick="window.open('//instagram.com/<?php echo $current_image_user_name; ?>','_blank')">
505
  <div class="wdi_header_text"><?php echo $current_image_user_name;?></div>
506
  <?php if(!empty($current_image_user_pic)): ?>
507
- <div class="wdi_users_img_wrap"><img src="<?php echo $current_image_user_pic;?>" alt=""></div>
508
  <?php endif;?>
509
  </div>
510
  </div>
60
  $current_image_index = WDILibrary::get('current_image_index', 0, 'intval', 'POST');
61
  $theme_id = (isset($current_feed['theme_id']) ? esc_html($current_feed['theme_id']) : 1);
62
 
63
+ $carousel_media_row = isset($_POST["carousel_media_row"]) ? $_POST["carousel_media_row"] : '';
64
  $carousel_media = json_decode(stripslashes($carousel_media_row), true);
65
  $carousel_media = WDILibrary::get('', $carousel_media, 'sanitize_text_field', '');
66
  $carousel_media = is_array($carousel_media) ? $carousel_media : array();
130
  $image_filmstrip_width = 0;
131
  }
132
 
133
+ $json = isset($_POST['image_rows']) ? $_POST['image_rows'] : '';
 
 
134
  str_replace('"',"&quot;", $json);
135
 
136
  $image_rows = json_decode(stripslashes($json));
370
  if ($option_row->show_image_counts) {
371
  ?>
372
  <span class="wdi_image_count_container wdi_ctrl_btn">
373
+ <span class="wdi_image_count"><?php echo esc_html($current_image_key + 1); ?></span> /
374
+ <span><?php echo esc_html($image_rows_count); ?></span>
375
  </span>
376
  <?php
377
  }
502
  <div class="wdi_title" onclick="window.open('//instagram.com/<?php echo $current_image_user_name; ?>','_blank')">
503
  <div class="wdi_header_text"><?php echo $current_image_user_name;?></div>
504
  <?php if(!empty($current_image_user_pic)): ?>
505
+ <div class="wdi_users_img_wrap"><img src="<?php echo esc_url($current_image_user_pic); ?>" alt=""></div>
506
  <?php endif;?>
507
  </div>
508
  </div>
frontend/views/imagebrowser.php CHANGED
@@ -16,18 +16,18 @@ class WDI_ImageBrowser_view {
16
  $this->generate_feed_styles($feed_row);
17
  $style = $this->model->theme_row;
18
  $wdi_feed_counter = $this->model->wdi_feed_counter;
19
- $container_class = 'wdi_feed_theme_' . $style['id'] . ' wdi_feed_browser_' . $style['id'];
20
  $wdi_data_ajax = defined('DOING_AJAX') && DOING_AJAX ? 'data-wdi_ajax=1' : '';
21
  ?>
22
- <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; ?> >
23
  <?php wdi_feed_frontend_messages();?>
24
- <div id="wdi_spider_popup_loading_<?php echo $wdi_feed_counter ?>" class="wdi_spider_popup_loading"></div>
25
- <div id="wdi_spider_popup_overlay_<?php echo $wdi_feed_counter ?>" class="wdi_spider_popup_overlay"
26
  onclick="wdi_spider_destroypopup(1000)"></div>
27
  <div class="wdi_feed_container">
28
  <div class="wdi_feed_info">
29
- <div id="wdi_feed_<?php echo $wdi_feed_counter ?>_header" class='wdi_feed_header'></div>
30
- <div id="wdi_feed_<?php echo $wdi_feed_counter ?>_users" class='wdi_feed_users'>
31
  <?php
32
  if ( !empty($user_feed_header_args) ) {
33
  echo WDILibrary::user_feed_header_info( $user_feed_header_args );
@@ -49,7 +49,7 @@ class WDI_ImageBrowser_view {
49
  <?php
50
  }
51
  ?>
52
- <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>
53
  <div class="wdi_clear"></div>
54
  <?php
55
  switch ($feed_row['feed_display_view']) {
16
  $this->generate_feed_styles($feed_row);
17
  $style = $this->model->theme_row;
18
  $wdi_feed_counter = $this->model->wdi_feed_counter;
19
+ $container_class = 'wdi_feed_theme_' . sanitize_html_class($style['id']) . ' wdi_feed_browser_' . sanitize_html_class($style['id']);
20
  $wdi_data_ajax = defined('DOING_AJAX') && DOING_AJAX ? 'data-wdi_ajax=1' : '';
21
  ?>
22
+ <div id="wdi_feed_<?php echo sanitize_html_class($wdi_feed_counter) ?>" class="wdi_feed_main_container wdi_layout_ib <?php echo $container_class; ?>" <?php echo $wdi_data_ajax; ?> >
23
  <?php wdi_feed_frontend_messages();?>
24
+ <div id="wdi_spider_popup_loading_<?php echo sanitize_html_class($wdi_feed_counter) ?>" class="wdi_spider_popup_loading"></div>
25
+ <div id="wdi_spider_popup_overlay_<?php echo sanitize_html_class($wdi_feed_counter) ?>" class="wdi_spider_popup_overlay"
26
  onclick="wdi_spider_destroypopup(1000)"></div>
27
  <div class="wdi_feed_container">
28
  <div class="wdi_feed_info">
29
+ <div id="wdi_feed_<?php echo sanitize_html_class($wdi_feed_counter) ?>_header" class='wdi_feed_header'></div>
30
+ <div id="wdi_feed_<?php echo sanitize_html_class($wdi_feed_counter) ?>_users" class='wdi_feed_users'>
31
  <?php
32
  if ( !empty($user_feed_header_args) ) {
33
  echo WDILibrary::user_feed_header_info( $user_feed_header_args );
49
  <?php
50
  }
51
  ?>
52
+ <div class="wdi_feed_wrapper <?php echo 'wdi_col_' . sanitize_html_class($feed_row['number_of_columns']) ?>" wdi-res='<?php echo 'wdi_col_' . esc_attr($feed_row['number_of_columns']) ?>'></div>
53
  <div class="wdi_clear"></div>
54
  <?php
55
  switch ($feed_row['feed_display_view']) {
frontend/views/thumbnails.php CHANGED
@@ -16,17 +16,17 @@ class WDI_Thumbnails_view {
16
  $this->generate_feed_styles($feed_row); // @TODO. should be moved to shortcode.php
17
  $style = $this->model->theme_row;
18
  $wdi_feed_counter = $this->model->wdi_feed_counter;
19
- $container_class = 'wdi_feed_theme_' . $style['id'] . ' wdi_feed_thumbnail_' . $style['id'];
20
  $wdi_data_ajax = defined('DOING_AJAX') && DOING_AJAX ? 'data-wdi_ajax=1' : '';
21
  ?>
22
- <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; ?> >
23
  <?php wdi_feed_frontend_messages();?>
24
- <div id="wdi_spider_popup_loading_<?php echo $wdi_feed_counter ?>" class="wdi_spider_popup_loading"></div>
25
- <div id="wdi_spider_popup_overlay_<?php echo $wdi_feed_counter ?>" class="wdi_spider_popup_overlay" onclick="wdi_spider_destroypopup(1000)"></div>
26
  <div class="wdi_feed_container">
27
  <div class="wdi_feed_info">
28
- <div id="wdi_feed_<?php echo $wdi_feed_counter ?>_header" class='wdi_feed_header'></div>
29
- <div id="wdi_feed_<?php echo $wdi_feed_counter ?>_users" class='wdi_feed_users'>
30
  <?php
31
  if ( !empty($user_feed_header_args) ) {
32
  echo WDILibrary::user_feed_header_info( $user_feed_header_args );
16
  $this->generate_feed_styles($feed_row); // @TODO. should be moved to shortcode.php
17
  $style = $this->model->theme_row;
18
  $wdi_feed_counter = $this->model->wdi_feed_counter;
19
+ $container_class = 'wdi_feed_theme_' . sanitize_html_class($style['id']) . ' wdi_feed_thumbnail_' . sanitize_html_class($style['id']);
20
  $wdi_data_ajax = defined('DOING_AJAX') && DOING_AJAX ? 'data-wdi_ajax=1' : '';
21
  ?>
22
+ <div id="wdi_feed_<?php echo sanitize_html_class($wdi_feed_counter) ?>" class="wdi_feed_main_container wdi_layout_th <?php echo $container_class; ?>" <?php echo $wdi_data_ajax; ?> >
23
  <?php wdi_feed_frontend_messages();?>
24
+ <div id="wdi_spider_popup_loading_<?php echo sanitize_html_class($wdi_feed_counter) ?>" class="wdi_spider_popup_loading"></div>
25
+ <div id="wdi_spider_popup_overlay_<?php echo sanitize_html_class($wdi_feed_counter) ?>" class="wdi_spider_popup_overlay" onclick="wdi_spider_destroypopup(1000)"></div>
26
  <div class="wdi_feed_container">
27
  <div class="wdi_feed_info">
28
+ <div id="wdi_feed_<?php echo sanitize_html_class($wdi_feed_counter) ?>_header" class='wdi_feed_header'></div>
29
+ <div id="wdi_feed_<?php echo sanitize_html_class($wdi_feed_counter) ?>_users" class='wdi_feed_users'>
30
  <?php
31
  if ( !empty($user_feed_header_args) ) {
32
  echo WDILibrary::user_feed_header_info( $user_feed_header_args );
readme.txt CHANGED
@@ -4,977 +4,6 @@ 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.8
7
- Stable tag: 1.4.24
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
-
25
-
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 ==
35
- * **Increase user engagement** - Engagement on Instagram is higher than on any other social platform. Keep your visitors engaged and significantly increase surfing time and visitor retention on your website.
36
- * **Increase brand/blog awareness** - Let your site visitors get into conversation and connect with your blog or brand. Keep your visitors tuned and increase your blog's/brand's awareness.
37
- * **Save your time** – Keep your posts authentic with content from your Instagram account without any manual work involved. Your feeds will be fresh and up to date and synced automatically.
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
-
46
- == What's in it ==
47
-
48
- = CUSTOMIZABLE LAYOUTS =
49
- Display the feeds in one of the available layouts Thumbnail, Image Browser, Masonry (Premium version), Blog Style(Premium version). Whether you want to have small sized image thumbnails or larger images displayed you'll find the right layout for that. Customize layouts to get exactly what you need and display the metadata that's most relevant for your niche.
50
-
51
- = INSTAGRAM GALLERY =
52
- Create Instagram galleries on your website by embedding entire timelines to your posts using a shortcode or the plugin's Instagram widget on your sidebar.
53
-
54
- = INDIVIDUAL AND MIXED FEEDS =
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/)
80
-
81
- * Masonry Layout feeds
82
- * Blog Style Layout feeds
83
- * Image metadata (Instagram tag,image caption, comments, like) display
84
- * Mixed and multiple feeds (Instagram account posts with multiple hashtags)
85
- * Fully Customizable Themes
86
- * Vertical/horizontal filmstrip in lightbox
87
- * HTML5 Video Support in Lightbox
88
- * Blog Style and Image Browser views for displaying Instagram videos
89
- * 15 Lightbox transition effects
90
- * Social sharing buttons (Facebook, Twitter, Google+, LinkedIn and Pinterest)
91
- * Infinite scroll for the feed (Similar to Instagram standard)
92
- * Instagram Comments display in Lightbox
93
- * Instagram Hashtag filtering options
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
-
126
- Create an Instagram feed based on one of the available layouts - Thumbnail, Masonry, Blog Style, Image Browser.
127
-
128
-
129
-
130
- == Frequently Asked Questions ==
131
-
132
- = What can I achieve using Instagram Feed plugin? =
133
-
134
- WordPress Instagram Feed is a user-friendly plugin with enhanced functionality, which lets you create and showcase Instagram feeds on your WordPress website. You can build **multiple feeds** with the media of **your Instagram account** or **hashtag** by completing just a few simple steps.
135
-
136
- You will need a couple of minutes to incorporate **Instagram API** to your website. The plugin will automatically create a feed from your Instagram profile. Additionally, you can build Instagram feeds and show posts of your username, as well as **hashtags.**
137
-
138
- Customize the features of the feeds by configuring advanced settings of Instagram Feed plugin. Its user-friendly tools and features allow you fully personalize your feeds, set up conditional filters for feed username and hashtags, modify **image lightbox** settings and more.
139
-
140
- Control the appearance and layout of your Instagram feed using 4 outstanding **layout types** and **theme options** of Instagram Feed plugin. You can publish the feeds with one of the following layouts:
141
-
142
- * Thumbnails,
143
- * Masonry,
144
- * Blog Style,
145
- * Image Browser.
146
-
147
- Furthermore, its **lightbox** feature allows you to also display the images as a beautiful image slider in a popup. The themes of Instagram Feed plugin let you modify each and every attribute of the feeds.
148
-
149
- With Instagram Feed plugin, you can showcase photos and videos, share wonderful food and travel blog pictures of Instagram with your website visitors. In case you use Instagram for e-commerce, this is the best Instagram plugin to engage your social network followers to your website.
150
-
151
- The plugin is designed with mobile-friendly layout, letting you provide great user experience on any screen size or device.
152
-
153
- = How can I get my Instagram Access Token? =
154
-
155
- To begin creating feeds with WordPress Instagram Feed plugin, you need to configure Instagram app for website and get **Instagram Access Token** first. This is a very simple process. Visit **Instagram Feed > Settings** page from WordPress administrative dashboard to start the setup.
156
-
157
- Press **Sign in with Instagram** button. In case you are logged in to [Instagram.com](https://www.instagram.com/) from your web browser, **Access Token** and **Username** fields will be automatically filled in. Otherwise, if there are no logged in users, a popup will appear letting you sign in.
158
-
159
- To use a different Instagram account, simply press **Reset access token and username** button. Afterwards, you can sign out from Instagram.com, and get access token for another Instagram user by logging in again.
160
-
161
- This is all you need to do, to be able to embed Instagram gallery to your WordPress website. You can then display your Instagram photos and videos as a responsive carousel, as widgets on the sidebar or footer of your site, and more.
162
-
163
- As soon as you sign in to Instagram and get Access Token, a sample feed is created with your account and placed on a **private page** of your WordPress website. You can view your Instagram image gallery by clicking on **View your feed** button, or modify its settings and appearance by pressing **Edit your feed.** The feed will also appear on **Instagram Feed > Feeds** page.
164
-
165
- Note, that this feed is not visible to website visitors, unless you edit its page and make it **public.**
166
-
167
- = How to embed Instagram media to my WordPress site? =
168
-
169
- To begin creating your first feed, navigate to **Feeds** page of Instagram Feed plugin. This page of our Instagram HTML plugin contains a list of all your feeds created with the plugin. You will see the feed of your Instagram timeline appearing on this list.
170
-
171
- Press **Add New** button to start building your feed and import Instagram posts to your WordPress website.
172
-
173
- Firstly, make sure to set a **Feed Title** for your feed. Then, let's configure the mandatory settings which are necessary for displaying the feed. Click on **Media** bar to expand these options.
174
-
175
- Use **Feed Media** drop-down box to choose the content of your Instagram feed. **Feed Usernames and Hashtags** option lets you input your Instagram username and display feeds containing images and videos of your account. You can also add **hashtags** and showcase your posts with those hashtags.
176
-
177
- Write the usernames without the **@** sign, however for hashtags, you do need to add **#** at the beginning.
178
-
179
- While using this Instagram media importer tool, make sure to specify one username or hashtag at a time, and press **Add** button each time.
180
-
181
- You can customize the **sorting** of the media on your feed using the following settings.
182
-
183
- **Sort Media By** allows you to choose the **parameter,** based on which the photos and videos on your Instagram feed will be ordered. You can select one of the following:
184
-
185
- * Date,
186
- * Likes,
187
- * Comments,
188
- * Random.
189
-
190
- **Sorting Order** option lets you specify the **direction** of ordering the Instagram media on your feed. It can have one of the following two values:
191
-
192
- * Ascending,
193
- * Descending.
194
-
195
- **Media** section of feed settings also allows you to change the action which takes place after users click on an image. With **Action OnClick** option, Instagram Feed plugin provides 4 functions for this:
196
-
197
- * **Open Lightbox.** Clicking on a post will open a popup box with the large version of the image or video, letting you navigate through the rest of your feed media just like a slider.
198
- * **Redirect To Instagram.** This option will redirect users to the same post on Instagram when they click on an item in the feed.
199
- * **Custom Redirect.** Select this option and specify a link in Redirect URL input box. Users will be taken to this page after clicking on a post in the feed.
200
- * **Do Nothing.** Clicking on posts of the feed will not trigger any functions.
201
-
202
- = Can I display more than one Instagram feeds on my website? =
203
-
204
- Yes, you can add as many Instagram feeds as you want to your website and show them on posts and pages.
205
-
206
- Add the Instagram feeds to posts and pages by using the **shortcode** provided or choosing from the list by clicking on the Instagram Feed button.
207
-
208
- = What layouts can I use to showcase my Instagram feed? =
209
-
210
- Instagram Feed plugin provides 4 beautiful layouts, which you can use to showcase the photos and videos on your Instagram feeds. Each of them can be fully personalized to fit the style of your website.
211
-
212
- Use **Select Layout** option and choose the appearance:
213
-
214
- * Thumbnails,
215
- * Masonry,
216
- * Blog Style,
217
- * Image Browser.
218
-
219
- Let's go through all 4 layouts and help you choose the one that suits your site the best.
220
-
221
- **Thumbnails Layout**
222
-
223
- **Thumbnails Layout** of Instagram Feed plugin provides an equally aligned beautiful Instagram grid, consisting of the thumbnail images of the media on your feed. All thumbnails on this layout are set to have the same dimensions, and you can assign the width and height you like.
224
-
225
- **Masonry Layout**
226
-
227
- Just like Thumbnails, **Masonry Layout** is also built with the thumbnail images of Instagram posts. However, its Instagram grid is not aligned equally. The thumbnail images are created as the exact miniatures of their large versions (i.e. the dimensions of thumbnails and large posts are proportional).
228
-
229
- **Blog Style Layout**
230
-
231
- **Blog Style Layout** is a perfect choice if you want to post a media file on Instagram and repost the content to WordPress website as a photo blog. The images are displayed with larger dimensions, than on Thumbnails and Masonry Layouts.
232
-
233
- You can enable captions, descriptions, and hashtags of the media and show them below the posts on your feed.
234
-
235
- **Image Browser Layout**
236
-
237
- Just like Blog Style, **Image Browser Layout** of Instagram Feed plugin also displays the posts with larger dimensions. However, this layout shows a single large image with navigation buttons, similar to a slideshow. You can navigate through the posts by clicking on **Next** and **Previous** buttons.
238
-
239
- = How can I personalize the features of my Instagram feed? =
240
-
241
- Instagram Feed social plugin comes with a number of advanced customization options, which you can use to change the functionality and features of your feeds. You can modify the feed as far as:
242
-
243
- * changing its **pagination** and **loading,**
244
- * defining the number of displayed and newly loaded posts,
245
- * personalizing the settings of all 4 layouts,
246
- * controlling the **sort order** of the media on your Instagram feed,
247
- * choosing the attributes to showcase with the feed,
248
-
249
- and much more.
250
-
251
- To begin configuring these options, edit your feed and open **Feed Settings** tab. Scroll down a bit to find the following two sections:
252
-
253
- * Layout and Pagination,
254
- * Advanced.
255
-
256
- Let's go through each section and discuss every option individually.
257
-
258
- **Layout and Pagination**
259
-
260
- **New Media Loading.** Select the method to use while loading more images and videos on your Instagram feed. You can choose one of the following options:
261
-
262
- * Pagination,
263
- * Load More Button,
264
- * Infinite Scroll,
265
- * None.
266
-
267
- **Number of Columns.** Set the number of columns which will be used to align Instagram media in **Thumbnails** and **Masonry** feeds.
268
-
269
- **Number of Images/Videos.** Specify the number of Instagram media to display when the feed is loaded initially.
270
-
271
- **Number of New Media.** Set the number of posts which will be added to the feed, after the user clicks on **Load More** button or triggers **Infinite Scroll.**
272
-
273
- **Combine and Sort Again After Loading More.** If this option is enabled, both newly loaded and existing media are mixed then resorted together according to **Sort Media By** setting.
274
-
275
- **Make Layout Not Responsive.** When this option is selected, the layout of the feed does not convert to single-column display on small screens. The feed width is shrunk, but the number of columns stays the same.
276
-
277
- **Number of Media for Initial Preload.** Specify the number of posts to preload, when an Instagram feed is first loaded. This option helps to load a few posts at once, then navigate through the media smoothly. Note, that this setting applies to **Image Browser** feeds only.
278
-
279
- **Number of Media for Pagination Preload.** Set the number of posts to preload, while the user navigates through the media by clicking on **Next** or **Previous** buttons. Note, that this option is applicable to **Image Browser** layout only.
280
-
281
- **Advanced**
282
-
283
- **Theme.** Select the theme which will be used to style the appearance of your Instagram feed. You can edit the theme or create a new one from **Instagram Feed > Themes** page.
284
-
285
- **Feed Media Resolution.** Choose the resolution of the media on your Instagram feed. You can select one of the following options:
286
-
287
- * Optimal,
288
- * Standard (640 pixels),
289
- * Low (320 pixels),
290
- * Thumbnail (150 pixels).
291
-
292
- In case **Optimal** is selected, the dimensions of the loaded media are calculated according to the width of feed container. This provides fast loading and no stretching images.
293
-
294
- **Featured Image.** Set the featured image of the header section of your Instagram feed. The image is pulled from the **user profile** or **hashtag** you select.
295
-
296
- **Show Feed Header.** Activate this option to display a header on your Instagram feed. It includes **Feed Title** and **Featured Image** you specified.
297
-
298
- **Show User Data.** If this option is enabled, additional details from the selected accounts and hashtags will be displayed on your Instagram feed. You can activate:
299
-
300
- * **Follow On Instagram** button,
301
- * Number of **Posts** and **Followers** of Instagram account/hashtag,
302
- * **User Bio** of your Instagram account.
303
-
304
- **Show Media Caption.** Enable this setting to display descriptions of Instagram photos or videos below them, fully or partially.
305
-
306
- **Show Full Description.** Activate this setting to show the full captions of Instagram media. Note that this option only applies to feeds with **Masonry** layout.
307
-
308
- **Show Number of Likes.** Mark this option as checked to display the number of likes on each Instagram post.
309
-
310
- **Show Number of Comments.** Display the number of comments on Instagram photos or videos with your feed.
311
-
312
- **Show Username On Image Thumb.** Activating this setting will let you show your Instagram account username on the images or videos of your feed.
313
-
314
- = Is it possible to modify the settings of Instagram lightbox? =
315
-
316
- Instagram Feed plugin comes with a popup box, which appears when users click on a photo or a video in the feed. It lets them display the larger versions of Instagram media, as well as play videos and navigate through the posts.
317
-
318
- To run the lightbox by clicking on the media, make sure **Action OnClick** option of **Feed Settings** tab is set to **Open Lightbox.**
319
-
320
- Just like other attributes of Instagram feeds, **Lightbox Settings** can be personalized as well. Edit your feed, then navigate to **Lightbox Settings** tab. Here you will find all the tools which help you tweak the features of the lightbox.
321
-
322
- The user-friendly lightbox options are divided into the following two main sections:
323
-
324
- * General Settings,
325
- * Advanced Settings.
326
-
327
- Let's discuss these two sections and discover the benefits of the options they provide.
328
-
329
- **General**
330
-
331
- **General** section of Lightbox Settings mainly provides options to modify the dimensions and effects on the popup box. You are able to make the following changes:
332
-
333
- * set the dimensions of the lightbox,
334
- * configure autoplay and choose from 14 amazing animation effects,
335
- * activate full-width lightbox,
336
-
337
- and more.
338
-
339
- **Advanced**
340
-
341
- With **Advanced** section of Lightbox settings, you have full control of what's shown with the popup pox of Instagram feed images and videos. It takes just a few steps to get the appearance of the lightbox exactly as you wish to have it.
342
-
343
- Lightbox Advanced options allow you to:
344
-
345
- * add a filmstrip to the lightbox, containing the thumbnails of Instagram posts,
346
- * customize the navigation on the lightbox, adding **Next** and **Previous** buttons,
347
- * activate image **captions** and display them on the image,
348
- * enable **right-click protection,** and thus disallow right-click on images and videos,
349
- * place **share, fullscreen, download** and other control buttons,
350
- * add **comments section** to the lightbox,
351
-
352
- and much more.
353
-
354
- = Can I create mixed Instagram feeds my Instagram account and multiple hashtags? =
355
-
356
- This option is available in **Premium** version. There, you can create mixed Instagram feeds with your Instagram account and several hashtags. You can even create the combination of both.
357
-
358
- = I see an invalid access Token error. What should I do? =
359
-
360
- If you are seeing this alert message on your Instagram Feed plugin, please note, that Instagram access tokens expire from time to time. Therefore you need to get new from your Instagram account again.
361
-
362
- Please sign in to your Instagram account and get a new token. Add it to **Instagram Feed > Settings** page.
363
-
364
- If the token will still cause "Invalid access token" error, revoke access for the plugin [here](www.instagram.com/accounts/manage_access/) and sign in again from **Settings** page.
365
-
366
- = I would like to display only the Instagram posts which have certain hashtags. How can this be done? =
367
-
368
- *You can definitely do this with premium version!*
369
-
370
- In case you wish to showcase Instagram feeds with additional, more definitive filters, **Conditional Filters** feature of Instagram Feed plugin will help you with it. This functionality allows you to show images of your Instagram account with a specific hashtag, skip images which belong to certain hashtags, and more.
371
-
372
- To begin creating additional filters for your Instagram feed, edit it and navigate to **Conditional Filters** tab. Use **Enable Conditional Filters** to activate the necessary tools.
373
-
374
- **Feeds to Filter** option shows the basis for conditional filters. These are the username and hashtags you have added to your Instagram feed. The filters will search among the posts of the username and hashtags, and pull those which fulfill the specified condition.
375
-
376
- Now let's configure the condition itself. First, you need to choose the logical operator of the condition using **Filter Logic** setting. Select one of the following 3 operators:
377
-
378
- * AND: Shows Instagram posts that belong to **all sources** of filtering.
379
- * OR: Shows Instagram media which belong to **at least one of the sources** of filtering.
380
- * NOR: Hides Instagram posts which belong to **at least one of the sources** of filtering.
381
-
382
- Afterwards, use **Add Condition** option to specify the parameter for the condition, which can be one of the following.
383
-
384
- * **Hashtag.** If you wish to filter your accout feed with a certain hashtag, you can use this option.
385
- * **Mention.** This option can be used for feeds both with hashtags and username, i.e. you can display posts where another user is mentioned.
386
- * **Description.** Just like Mentions, Description can be used both with hashtags and username. You can specify a single keyword or a phrase, which is used in descriptions of your Instagram posts.
387
- * **Instagram Media Link.** You are able to filter using the shareable link of Instagram media. Simply provide the full URL of the post, as the following example: https://www.instagram.com/p/Be6H6G9lmCQ/
388
-
389
- Afterwards, select the **Condition Type** for the filter, which corresponds to the parameter you are adding. For instance, in case you are adding #liveauthentic hashtag, the **Condition Type** needs to be set as **Hashtag** as well.
390
-
391
- Lastly, click **Add Condition** button, and the parameters you have added will be visible below **Result** section. Make sure to press **Save** after you finish configuring the filters.
392
-
393
- With **Result** option, you will see all of the added filters which will be applied to your Instagram feed.This feature is widely used on Instagram for eCommerce websites, as it serves like an Instagram feed with analytics.
394
-
395
- = How can I publish the Instagram Feed on my website? =
396
-
397
- Using WordPress Instagram feed plugin, you can publish your feeds with the following 3 different methods:
398
-
399
- * on a WordPress **page** or **post,**
400
- * as a **widget,**
401
- * on a **custom template** with a **PHP function.**
402
-
403
- A quick guide for this is provided with **How To Publish Feed** tab above your Instagram feed. Let's go through the necessary steps of each publishing method, and help you choose the one that fits your site the best.
404
-
405
- **Publishing the Feed on Pages or Posts**
406
-
407
- To publish Instagram feeds with this method, add or edit the page or post from WordPress administrative dashboard of your website. Click on **Add Instagram Feed** button from the top of the post editor. Afterwards, select the feed you wish to publish and press **Insert.**
408
-
409
- The **shortcode** of Instagram Feed plugin will be added to the content of your page/post.
410
-
411
- Alternatively, you can copy the shortcode from **Instagram Feed > Feeds** dashboard, under **Shortcode** column, and paste it into the content of your WordPress page/post.
412
-
413
- **Publishing Instagram Feed as a Widget**
414
-
415
- Navigate to **Appearance > Widgets** page from WordPress administrative dashboard to begin configuring your Instagram feed widget. Firstly, search for **Instagram Feed Widget** and drag it to the widget area, where you wish to display your feed.
416
-
417
- Provide a **Title** for your Instagram Feed, then choose the feed to publish using **Feed** drop-down box. Make sure to specify **Number of Columns,** as well as **Number of images** to show on your Instagram feed.
418
-
419
- Also, you can activate the following attributes and display them with your feed:
420
-
421
- * post **descriptions,**
422
- * **likes** and **comments,**
423
- * **Load More** button.
424
-
425
- **Publishing with PHP function**
426
-
427
- It is also possible to publish Instagram feeds on **custom PHP templates** using their **PHP functions.** To do this, simply copy the PHP function of your feed from **Instagram Feed > Feeds** page, then paste it to the necessary section of your custom template.
428
-
429
- = Is it possible to change the Instagram Feed themes to match my website? =
430
-
431
- *This is possible in Premium version.*
432
-
433
- Instagram Feed plugin provides a variety of user-friendly styling options, which let you customize the appearance and features of your Instagram feed even further. You can access these tools from **Instagram Feed > Themes** page.
434
-
435
- By default, Instagram Feed plugin comes with 2 themes:
436
-
437
- * Instagram,
438
- * Elegant.
439
-
440
- You can modify and use them on your feeds, or create a new theme with your own configurations. To select a default theme for your Instagram feeds, click on the star icon next to the corresponding entry.
441
-
442
- Each theme is divided into 2 main sections.
443
-
444
- **Customizing Feed**
445
-
446
- These theme settings allow you to modify global styling of your feeds, such as their width, text font, pagination attributes and more. This toolbox consists of the following sub-sections:
447
-
448
- * **General.** Configure the main parameters of the feed with these options, e.g. **feed container width** and **background color.**
449
- * **Header.** Edit header parameters, its text **font styles, image size, padding** and other attributes.
450
- * **User Data.** Set the appearance of user information section above the feeds, such as **text font size,** and the styling of **follow button** and **user bio.**
451
- * **Pagination.** Modify the styles of **Load More** button, as well as the font size, margins, and alignment of **Pagination** buttons.
452
- * **Thumbnails, Masonry, Blog Style** and **Image Browser.** Use the options on these tabs to modify default styles of layouts provided by Instagram Feed plugin. You can edit the border and padding of **photo wrapper,** text color and font of **post caption, comments** and **likes,** transparency of **image overlay,** and more.
453
-
454
- **Customizing Lightbox**
455
-
456
- You can customize each attribute of Instagram Feed lightbox using the tools in this section. They will help you change **lightbox background, control button** styles, **filmstrip** position and alignment, and more. Navigate through the following sub-sections to change the options:
457
-
458
- * General,
459
- * Control Buttons,
460
- * Close Button,
461
- * Navigation Buttons,
462
- * Filmstrip,
463
- * Info,
464
- * Comments.
465
-
466
- = Where can I change the settings of Instagram Feed plugin? =
467
-
468
- **Advanced Options** of Instagram Feed plugin allow you to modify a few global parameters, that apply to all feeds. Go to **Instagram Feed > Settings** page and click on **Advanced Options** bar to expand this toolbox.
469
-
470
- With **Minimal role to add and manage Feeds or Themes** option, you can select the WordPress user role which will have access to Instagram Feed plugin. The user roles of higher levels will also be able to modify and manage the feeds.
471
-
472
- **Custom CSS** lets you write your own CSS code for your Instagram feeds. This is handy, in case you need to make specific changes regarding the styling of your feed. Whereas with **Custom Javascript** you are able to apply additional scripts.
473
-
474
- For instance, let's consider you have a feed with **Thumbnails Layout,** and besides displaying the feed, you wish to expand captions for some posts. You can achieve this the following way.
475
-
476
- Firstly, you need to assign custom **wdi_feed_loaded** event of the plugin to the container of the Instagram feed, then set callback function for this event.
477
-
478
- Here is an example of a script, which expands captions of posts with 0, 1, 2, 3 indexes:
479
-
480
- `jQuery('#wdi_feed_0').on('wdi_feed_loaded',function(){
481
- jQuery('.wdi_photo_title').eq(0).trigger('click');
482
- jQuery('.wdi_photo_title').eq(1).trigger('click');
483
- jQuery('.wdi_photo_title').eq(2).trigger('click');
484
- jQuery('.wdi_photo_title').eq(3).trigger('click');
485
- });`
486
-
487
- Make sure to **Save** Changes after you finish modifying Advanced Options.
488
-
489
- **Uninstalling Instagram Feed Plugin**
490
-
491
- In case you wish to completely remove Instagram Feed plugin, you can **Uninstall** it using **Instagram Feed > Uninstall** menu item. However, it is important to note, that uninstalling the plugin will delete all feeds, reset all options to their defaults, and remove other data on the plugin.
492
-
493
- Please make sure you don't have any important information before you proceed.
494
-
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
- = 1.4.24 =
509
- Fixed: Recent Hashtags ordering.
510
- Fixed: Large images height in the lightbox.
511
- Fixed: Image in Pinterest share preview.
512
-
513
- = 1.4.23 =
514
- Improved: Cache logic.
515
- Fixed: Share to Twitter.
516
- Fixed: XSS vulnerabilities on widget title.
517
- Fixed: Pagination.
518
- Fixed: Show error message if "hashtag" is not found.
519
-
520
- = 1.4.22 =
521
- Fixed: XSS vulnerabilities on settings page.
522
- Fixed: Disable pagination during page load.
523
-
524
- = 1.4.21 =
525
- Fixed: Connecting to the Business account.
526
-
527
- = 1.4.20 =
528
- Fixed: Cache logic.
529
-
530
- = 1.4.19 =
531
- Fixed: XSS vulnerability.
532
-
533
- = 1.4.18 =
534
- Added: Possibility to show IGTV media in the feed.
535
- Fixed: Lightbox filmstrip issue.
536
- Fixed: Issue on changing account type from business to personal.
537
- Fixed: Show caption for posts loaded with load more.
538
- Fixed: Logic of cache.
539
-
540
- = 1.4.17 =
541
- Improved: Load more functionality.
542
- Fixed: Show thumbnails for Video posts.
543
- Fixed: Adding shortcode with classic editor.
544
-
545
- = 1.4.16 =
546
- Improved: Pagination logic.
547
- Fixed: Compatibility with PHP8.
548
-
549
- = 1.4.15 =
550
- Improved: Decreased load time on front end.
551
-
552
- = 1.4.14 =
553
- Fixed: Removing feed.
554
- Fixed: Deactivation after uninstall.
555
- Fixed: Duplicated images in filmstrip.
556
- Fixed: Load more.
557
-
558
- = 1.4.13 =
559
- Fixed: Preview in Elementor.
560
- Fixed: Issue when "Check for new posts every" option set to 0.
561
-
562
- = 1.4.12 =
563
- Fixed: Ordering for hashtag.
564
-
565
- = 1.4.11 =
566
- Fixed: Adding the Instagram Feed to the Elementor.
567
- Fixed: Feed preview.
568
- Fixed: Comments for feed.
569
-
570
- = 1.4.10 =
571
- Fixed: Open settings page after activation.
572
- Fixed: Load more functionality.
573
- Fixed: Feed does not work with hashtag for some cases.
574
- Fixed: Error after re-connecting a Business account.
575
-
576
- = 1.4.9 =
577
- Fixed: Filters logic.
578
- Fixed: Load more functionality.
579
- Fixed: Update user info on feed saving.
580
- Fixed: Hashtag removing functionality.
581
-
582
- = 1.4.8 =
583
- Fixed: JS error.
584
- Fixed: Broken images.
585
- Fixed: Uninstall functionality.
586
- Fixed: Requests limitation in API.
587
-
588
- = 1.4.7 =
589
- Fixed: Feed images view.
590
-
591
- == Changelog ==
592
- = 1.4.6 =
593
- Improved: Separate options for personal and business accounts.
594
- Improved: Increased loading time of feed.
595
- Fixed: Multiple accounts functionality.
596
-
597
- = 1.4.5 =
598
- Fixed: Missing images from post with multiple images.
599
- Fixed: Conflict with WP5.5.
600
- Fixed: Number of comments and likes.
601
- Fixed: Images ordering on Firefox.
602
-
603
- = 1.4.4 =
604
- Fixed: Decreased feed load time.
605
- Fixed: Business account.
606
-
607
- = 1.4.3 =
608
- Fixed: Getting User's metadata.
609
- Fixed: Reset access token.
610
- Fixed: Conditional filters.
611
-
612
- = 1.4.2 =
613
- Fixed: Feed Media Resolution.
614
- Fixed: Feed Header.
615
- Fixed: Show Follow on Instagram.
616
-
617
- = 1.4.1 =
618
- Fixed: Refresh a Long-Lived Token.
619
-
620
- = 1.4.0 =
621
- Changed: Using Instagram Basic Display API instead of Legacy API,
622
-
623
- = 1.3.26 =
624
- Fixed: JS error on Instagram feed front.
625
-
626
- = 1.3.25 =
627
- Fixed: Hashtag exclude.
628
- Fixed: Privacy policy text structure.
629
-
630
- = 1.3.24 =
631
- Removed: Banner to install Image optimizer.
632
-
633
- = 1.3.23 =
634
- Fixed: Minor bug.
635
-
636
- = 1.3.22 =
637
- Improved: Do not use Font Awesome.
638
- Fixed: Do not show username(no user) for hashtags.
639
-
640
- = 1.3.21 =
641
- Added: Ask a question button.
642
-
643
- = 1.3.20 =
644
- Fixed: Security issues
645
-
646
- = 1.3.18 =
647
- Fixed: Error from Instagram after connecting a Personal account.
648
- Fixed: Instagram Feed warning after deleting a feed.
649
- Fixed: Pagination problem on hashtag feeds..
650
-
651
- = 1.3.17 =
652
- Added: Feed edit links for Elementor widget.
653
-
654
- = 1.3.16 =
655
- Fixed: First time authorization.
656
-
657
- = 1.3.15 =
658
- Added: Banner to install 10Web manager.
659
-
660
- = 1.3.14 =
661
- New: Added contributor role in the option 'Minimal role to add and manage Feeds or Themes'.
662
- Fixed: Conditional filters for hashtags.
663
-
664
- = 1.3.13 =
665
- New: Option to get hashtag top media
666
- Improved: Notices during Facebook Log in
667
- Fixed: Occasional JS error on front end
668
-
669
- = 1.3.12 =
670
- Fixed: Conflict with Gutenberg.
671
-
672
- = 1.3.11 =
673
- New: Create hashtag feeds for business profiles using Instagram Graph API
674
-
675
- = 1.3.10 =
676
- Fixed: Gutenberg compatibility
677
- Fixed: Duplicate media when several filters are applied (Premium)
678
-
679
- = 1.3.9 =
680
- Fixed: Lib conflict with photo-gallery
681
-
682
- = 1.3.8 =
683
- Changed: Links to docs
684
- Fixed: Compatibility with Elementor
685
- Added: wdi_display_shortcode_button filter
686
-
687
- = 1.3.7 =
688
- New: Option to disable loading of Font-Awesome by the plugin
689
- Fixed: PHP notice in feed preview
690
- Fixed: Issue with admin styles for notices
691
-
692
- = 1.3.6 =
693
- Changed: Instagram Feed by 10Web
694
- Fixed: Minor bugs when saving feed and opening lightbox
695
-
696
- = 1.3.5 =
697
- Changed: Deactivation popup
698
-
699
- = 1.3.4 =
700
- New: Display website link in header along with bio
701
-
702
- = 1.3.3 =
703
- New: Cache debugging tools
704
- New: WD library updated
705
- New: GDPR compliance help
706
-
707
- = 1.3.2 =
708
- New: Signing up with multiple accounts
709
- Fixed: Settings page layout when language is not English
710
-
711
- = 1.3.1 =
712
- Fixed: Security issues. Reported by Karan Saini https://www.karansaini.com/
713
-
714
- = 1.3.0 =
715
- New: Caching of Instagram data. API rate limits do not constrain feed loading anymore.
716
- New: Compatibility with Gutenberg editor.
717
- Improved: It is possible now to manually edit access token.
718
- Changed: Plugin will output a warning when an incompatible version of Font-Awesome is loaded (SVG generated by JS)
719
- Fixed: Error when PHP filter extension is not enabled.
720
- Fixed: PHP warning in feed editor page appearing sometimes.
721
-
722
- = 1.2.19 =
723
- Fixed: Loading more images
724
-
725
- = 1.2.18 =
726
- Important: Instagram shut down its API partially without any warning. See [changelog](https://www.instagram.com/developer/endpoints/media/). It is not allowed anymore to display photos from other Instagram accounts which are not your own.
727
- Sorry.
728
-
729
- = 1.2.17 =
730
- Fixed: Video play issue on mac safari
731
- Changed: Uninstall moved to settings page
732
-
733
- = 1.2.16 =
734
- New: Instagram slideshow is supported in popup
735
- New: UX of feeds and themes admin screen, it is now similar to posts list screen
736
- New: Inline actions for feeds and themes in admin list view
737
- Improved: Theme styles are generated as CSS files, not inline styles. Faster page loading and better styles caching
738
- Improved: Popup is faster now and less data is being sent via AJAX
739
-
740
- = 1.2.15 =
741
- Added: "How to publish feed" tab in feeds editor screen
742
- Added: Closeable metaboxes in feeds editor screen
743
- Added: Feed preview button in feeds editor screen
744
- Changed: Save, apply and cancel buttons in feed and theme editor screens
745
- Changed: Feed and theme title input design
746
- Fixed: Minor bugs and conflicts with some themes
747
- Improved: Shortcode popup design
748
- Removed: Update submenu (Premium)
749
-
750
- = 1.2.14 =
751
- Fixed: Conflict with Page Builder by SiteOrigin
752
-
753
- = 1.2.13 =
754
- Fixed: Conflict with Divi
755
-
756
- = 1.2.12 =
757
- New: Customize feed media resolution. Choose between optimal or custom resolutions, fast loading and higher quality.
758
- Improved: Redesigned feed and theme editor screens.
759
- Improved: More user-friendly names and descriptions of feed settings.
760
- Improved: UX when access token is expired or have not been obtained yet.
761
- Improved: UX when there are JS errors on front-end.
762
- Fixed: Minor: do not include custom scroll bar JS if feed does not have popup.
763
-
764
- = 1.2.11 =
765
- Changed: Scripts and styles are minified by default
766
- Changed: Font-Awesome has been updated to version 4.7.0 and loaded from CDN
767
- Changed: Pagination buttons are smaller now in default theme
768
- Changed: Deactivation popup.
769
-
770
- = 1.2.10 =
771
- Fixed: CSS XSS vulnerability in lightbox
772
-
773
- = 1.2.9 =
774
- Changed: Web-Dorado links
775
-
776
- = 1.2.8 =
777
- Changed: Allow more users and hashtags in feed settings
778
-
779
- = 1.2.7 =
780
- Changed: Show notification to install Backup WD plugin only on plugin pages
781
-
782
- = 1.2.6 =
783
- Change: Introduction of Backup WD plugin
784
-
785
- = 1.2.5 =
786
- Change: "create_function" is not used anymore
787
-
788
- = 1.2.4 =
789
- Fixed: 10Web Social Photo Feed for Instagram compatibility issue with Better WordPress Minify plugin, thanks to @amityweb for bug report
790
-
791
- = 1.2.3 =
792
- Change: WD library updated to version 1.0.11
793
- Fixed: Error message when editing feed and token is expired
794
-
795
- = 1.2.2 =
796
- New: Redirection to custom URL
797
-
798
- = 1.2.1 =
799
- New: Option to disable loading of new images in feed
800
-
801
- = 1.2.0 =
802
- New: Default feed
803
- Fixed: Infinite scroll triggering (PRO)
804
- Fixed: "No media in feed" message on mobile masonry feed
805
- Fixed: Minor style conflicts with some themes
806
-
807
- = 1.1.30 =
808
- Changed: Frontend styles optimized, loads faster now
809
-
810
- = 1.1.29 =
811
- Fixed: Display only published feeds in feeds selector popup for shortcode
812
- Changed: UX improvement - no error message when user first inserts a widget then creates feeds
813
-
814
- = 1.1.28 =
815
- Fixed: Conflict with some themes
816
-
817
- = 1.1.27 =
818
- Fixed: Overriding window.onload function
819
- Changed: Some strings on frontend are translatable now
820
-
821
- = 1.1.26 =
822
- Fixed: Conflict with Beaver Builder
823
- Fixed: Frontend error messages in old Chrome and Safari browsers
824
- Changed: Translations hosted on WordPress.org
825
-
826
- = 1.1.25 =
827
- New: UX improvements: when authorizing and editing feeds
828
- Changed: JavaScript error notices on frontend
829
- Fixed: Updates page restored (PRO)
830
- Fixed: Deactivation popup in uninstall page (PRO)
831
- Fixed: Subscribe after uninstall
832
-
833
- = 1.1.24 =
834
- Added: Overview page
835
- Changed: Deactivation
836
-
837
- = 1.1.23 =
838
- Fixed: cropping of "landscape" images in thumbnails layout
839
-
840
- = 1.1.22 =
841
- New: message displayed on frontend if feed has no media
842
- Fixed: JS errors for media with Instagram's new "Slideshow" feature. This feature is not supported by Instagram's API yet.
843
- Changed: Errors by plugin and Instagram API are alerted in frontend only for admins, otherwise output the message to the Web Console
844
- Changed: Custom attribute "wdi_media_user" added to media containers in frontend. Useful for adding different event listeners, e.g. custom redirects for every user's media.
845
- Changed: Minor style conflicts fixed
846
-
847
- = 1.1.21 =
848
- New: Three new plugins added to featured plugins list: Ad Manager WD, Youtube WD and Staff Team WD
849
- Fixed: Colors and opacities of share buttons in lightbox (PRO)
850
-
851
- = 1.1.20 =
852
- New: Instagram feed displayed in AJAX-loaded content. AJAX request callback needs to call wp_footer() in the end.
853
-
854
- = 1.1.19 =
855
- Fixed: Strange bug in Instagram API when user feed pagination is null, causing JS errors in frontend
856
-
857
- = 1.1.18 =
858
- Fixed: Frontend filter colors (PRO)
859
- Changed: Featured plugins, brand new Mailchimp Forms WD plugin added
860
-
861
- = 1.1.17 =
862
- New: Option in feed settings to show small size images and low-bandwidth videos when viewed in mobile devices
863
- Fixed: Escaping in custom JS
864
- Change: WP 4.7 compatibility - language of frontend content in AJAX response
865
-
866
- = 1.1.16 =
867
- Fixed: Unicode "paragraph separator" symbol in media caption crashes lightbox
868
- Fixed: Javascript error in admin feed page and styling issue in lightbox because of some non-standard themes
869
-
870
- = 1.1.15 =
871
- New: Show hashtag media number in header
872
- Fixed: Scripts dependency on underscore.js
873
- Fixed: Compatibility issues with Yoast SEO
874
-
875
- = 1.1.14 =
876
- Fixed: Single user bio not shown
877
- Changed: Plugin logo
878
- Changed: Featured plugins logos
879
-
880
- = 1.1.13 =
881
- Fixed: Changes in database after plugin version update via FTP or AJAX requests with silent activation
882
-
883
- = 1.1.12 =
884
- New: Feed based on liked media (Pro)
885
- Fixed: Hidden media in last page
886
- Fixed: Minor issues
887
-
888
- = 1.1.11 =
889
- Added: Setting to show media descriptions in widget mode (PRO)
890
- Fixed: Untranslatable strings in widget editor
891
- Change: Featured plugins list
892
-
893
- = 1.1.10 =
894
- Added: New text in uninstall page
895
- Fixed: Video not centering issue on blogstyle
896
- Added: Swedish translations
897
-
898
- = 1.1.9 =
899
- New: Option to set minimal user role for adding and managing feeds and themes
900
- Fixed: Masonry feed thumbnails overlay opacity (Pro)
901
-
902
- = 1.1.8 =
903
- Changed: Font-Awesome updated to version 4.6.3
904
-
905
- = 1.1.7 =
906
- New: Featured themes admin page
907
- Fixed: Javascript error in hashtag feed
908
-
909
- = 1.1.6 =
910
- Change: Added compatibility with "All in one SEO pack" and other plugins running shortcodes in page head
911
-
912
- = 1.1.5 =
913
- Fixed: Javascript error on Firefox and Safari
914
-
915
- = 1.1.4 =
916
- Fixed: Error handling in case of wrong access_token
917
- Fixed: Image description not opening after pagination (Pro)
918
- Fixed: Do not show load more button if feed media are finished
919
- Fixed: Infinite scroll triggering bug (Pro)
920
-
921
- = 1.1.3 =
922
- New: French translation (Thanks to Guillaume Barjou)
923
- New: English US and UK translation files. Edit them to change default strings
924
- Fixed: Image sizes and overwflows in thumbnails layout
925
- Fixed: Lightbox filmstrip thumb styles (Pro)
926
-
927
-
928
- = 1.1.2 =
929
- Fixed: Bug when saving theme data to some MySQL 5.6 databases
930
- Changed: Pagination of hashtag feeds restored
931
- Changed: Check and get user id on frontend if empty for some unknown reason
932
-
933
- = 1.1.1 =
934
- Fixed: Bug when duplicating feeds
935
-
936
- = 1.1.0 =
937
- **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.**
938
- new: Instagram new API
939
- new: Spanish translation (Thanks to Alexandro Lacadena Gomez)
940
-
941
- = 1.0.10 =
942
- Temporarily disable pagination in hashtag based feeds
943
- Changed: Russian Translations ( Thanks to Alex Petrin )
944
-
945
- = 1.0.9 =
946
- Added: Option for displaying image loading buttons in widgets
947
- Added: Permission for authors displaying instagram feeds on posts
948
-
949
- = 1.0.8 =
950
- Fixed: Infinite Scroll bug
951
- Changed: Show videos play button when redirect is enabled
952
-
953
- = 1.0.7 =
954
- ADD: Image Hover Effects (Pro)
955
-
956
- = 1.0.6 =
957
- New: Conditional Filters (Pro)
958
- New: Option for displaying username in masonry/thumbnails view (Pro)
959
- Fixed: Minor bugs
960
- New: Russian translation (Thanks to Ruslan Tertyshny).
961
-
962
- = 1.0.5 =
963
- New: New year promo
964
-
965
- = 1.0.4 =
966
- Fixed: Bug in layout
967
-
968
- = 1.0.3 =
969
- Fixed: PHP function in feeds list
970
-
971
- = 1.0.2 =
972
- Fixed: PHP error after plugin update
973
-
974
- = 1.0.1 =
975
- Fixed: PHP 5.3 compatibility
976
- Fixed: Video redirect bug
977
- Changed: User info styles
978
-
979
- = 1.0.0 =
980
- Initial version
4
  Requires at least: 3.9
5
  Requires PHP: 5.2
6
  Tested up to: 5.8
7
+ Stable tag: 1.4.25
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.24
7
  * Author: 10Web
8
  * Author URI: https://10Web.io/plugins/?utm_source=instagram_feed&utm_medium=free_plugin
9
  * License: GPLv2 or later
@@ -316,6 +316,11 @@ function wdi_run_cache_cron() {
316
  $cache_time = get_option('wdi_current_cache_time');
317
  $now_time = current_time('timestamp',1);
318
  $wdi_options = get_option("wdi_instagram_options");
 
 
 
 
 
319
  $interval = intval($wdi_options["wdi_transient_time"])*60;
320
  $next_run_time = intval( $cache_time + $interval );
321
  if ( $cache_time === false || $next_run_time <= $now_time ) {
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.25
7
  * Author: 10Web
8
  * Author URI: https://10Web.io/plugins/?utm_source=instagram_feed&utm_medium=free_plugin
9
  * License: GPLv2 or later
316
  $cache_time = get_option('wdi_current_cache_time');
317
  $now_time = current_time('timestamp',1);
318
  $wdi_options = get_option("wdi_instagram_options");
319
+ /* Case when wdi_transient_time option is less then 10 minutes */
320
+ if ( $wdi_options["wdi_transient_time"] < 0 ) {
321
+ $wdi_options["wdi_transient_time"] = 2880;
322
+ update_option("wdi_instagram_options" , $wdi_options);
323
+ }
324
  $interval = intval($wdi_options["wdi_transient_time"])*60;
325
  $next_run_time = intval( $cache_time + $interval );
326
  if ( $cache_time === false || $next_run_time <= $now_time ) {