WD Instagram Feed – Instagram Gallery - Version 1.1.28

Version Description

Fixed: Conflict with some themes

Download this release

Release Info

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

Code changes from version 1.1.27 to 1.1.28

admin/views/WDIViewFeeds_wdi.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
 
3
- class WDIViewFeeds_wdi {
 
4
  ////////////////////////////////////////////////////////////////////////////////////////
5
  // Events //
6
  ////////////////////////////////////////////////////////////////////////////////////////
@@ -11,37 +12,49 @@ class WDIViewFeeds_wdi {
11
  // Variables //
12
  ////////////////////////////////////////////////////////////////////////////////////////
13
  private $model;
14
-
15
  ////////////////////////////////////////////////////////////////////////////////////////
16
  // Constructor & Destructor //
17
  ////////////////////////////////////////////////////////////////////////////////////////
18
- public function __construct($model) {
 
19
  $this->model = $model;
20
  }
21
  ////////////////////////////////////////////////////////////////////////////////////////
22
  // Public Methods //
23
  ////////////////////////////////////////////////////////////////////////////////////////
24
- public function display() {
 
25
  /*My Edit*/
26
  global $wdi_options;
27
  $rows_data = $this->model->get_rows_data();
28
  $page_nav = $this->model->page_nav();
29
  $search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
30
- $search_select_value = ((isset($_POST['search_select_value'])) ? (int) $_POST['search_select_value'] : 0);
31
  $asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
32
  $order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'id');
33
  $order_class = 'manage-column column-title sorted ' . $asc_or_desc;
34
  $ids_string = '';
35
  ?>
36
- <div class="wdi_help_bar_wrap">
37
- <span class="wdi_help_bar_text"><?php _e('This section allows you to create, edit and delete Feeds', "wd-instagram-feed"); ?></span>
38
- <a class="wdi_hb_t_link" target="_blank" href="https://web-dorado.com/wordpress-instagram-feed-wd/creating-feeds.html"><?php _e('Read More in User Guide', "wd-instagram-feed"); ?></a>
39
- <a class="wdi_hb_buy_pro" target="_blank" href="https://web-dorado.com/products/wordpress-instagram-feed-wd.html"><?php _e('Upgrade to Pro Version', "wd-instagram-feed"); ?></a>
40
- <a class="wdi_hb_s_link" target="_blank" href="https://wordpress.org/support/plugin/wd-instagram-feed"><img src="<?php echo WDI_URL; ?>/images/i_support.png"><span class="wdi_hb_s_text"><?php _e('Support Forum', "wd-instagram-feed"); ?></span></a>
 
 
 
 
 
 
 
 
41
  </div>
42
- <form class="wrap" id="sliders_form" method="post" action="admin.php?page=wdi_feeds" style="float: left; width: 99%;">
 
43
  <?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
44
- <input type="hidden" id="wdi_access_token" name="access_token" value="<?php echo isset($wdi_options['wdi_access_token'])?$wdi_options['wdi_access_token']:'';?>">
 
45
  <span class="slider-icon"></span>
46
  <h2>
47
  <?php _e('Feeds', "wd-instagram-feed"); ?>
@@ -52,419 +65,486 @@ class WDIViewFeeds_wdi {
52
  </h2>
53
  <div class="buttons_div">
54
  <span class="button-secondary non_selectable" onclick="wdi_spider_check_all_items()">
55
- <input type="checkbox" id="check_all_items" name="check_all_items" onclick="wdi_spider_check_all_items_checkbox()" style="margin: 0; vertical-align: middle;" />
 
56
  <span style="vertical-align: middle;"><?php _e('Select All', "wd-instagram-feed"); ?></span>
57
  </span>
58
- <input class="button-secondary" type="submit" onclick="wdi_spider_set_input_value('task', 'publish_all')" value="<?php esc_attr_e('Publish', "wd-instagram-feed"); ?>" />
59
- <input class="button-secondary" type="submit" onclick="wdi_spider_set_input_value('task', 'unpublish_all')" value="<?php esc_attr_e('Unpublish', "wd-instagram-feed"); ?>" />
60
- <input class="button-secondary" type="submit" onclick="wdi_spider_set_input_value('task', 'duplicate_all')" value="<?php esc_attr_e('Duplicate', "wd-instagram-feed"); ?>" />
61
-
62
- <input class="button-secondary" type="submit" onclick="if (confirm('<?php esc_attr_e('Do you want to delete selected items?', "wd-instagram-feed"); ?>')) {
63
- wdi_spider_set_input_value('task', 'delete_all');
64
- } else {
65
- return false;
66
- }" value="<?php esc_attr_e('Delete', "wd-instagram-feed"); ?>" />
 
 
 
 
67
  </div>
68
  <div class="tablenav top">
69
  <?php
70
- WDILibrary::search(__('Name',"wd-instagram-feed"), $search_value, 'sliders_form');
71
  WDILibrary::html_page_nav($page_nav['total'], $page_nav['limit'], 'sliders_form');
72
  ?>
73
  </div>
74
  <table class="wp-list-table widefat fixed pages">
75
  <thead>
76
- <th class="manage-column column-cb check-column table_small_col"><input id="check_all" type="checkbox" onclick="wdi_spider_check_all(this)" style="margin:0;" /></th>
77
- <th class="table_small_col <?php if ($order_by == 'id') {echo $order_class;} ?>">
78
- <a onclick="wdi_spider_set_input_value('task', '');
79
- wdi_spider_set_input_value('order_by', 'id');
80
- wdi_spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'id') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
81
- wdi_spider_form_submit(event, 'sliders_form')" href="">
82
- <span>ID</span><span class="sorting-indicator"></span>
83
- </a>
84
- </th>
85
- <th class="table_big_col"><?php _e("Feed","wd-instagram-feed")?></th>
86
- <th class="<?php if ($order_by == 'feed_name') {echo $order_class;} ?>">
87
- <a onclick="wdi_spider_set_input_value('task', '');
88
- wdi_spider_set_input_value('order_by', 'feed_name');
89
- wdi_spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'feed_name') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
90
- wdi_spider_form_submit(event, 'sliders_form')" href="">
91
- <span><?php _e('Name', "wd-instagram-feed"); ?></span><span class="sorting-indicator"></span>
92
- </a>
93
- </th>
94
- <th class="table_big_col"><?php _e('Shortcode', "wd-instagram-feed"); ?></th>
95
- <th class="table_large_col"><?php _e('PHP function', "wd-instagram-feed"); ?></th>
96
- <th class="table_big_col <?php if ($order_by == 'published') {echo $order_class;} ?>">
97
- <a onclick="wdi_spider_set_input_value('task', '');
98
- wdi_spider_set_input_value('order_by', 'published');
99
- wdi_spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'published') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
100
- wdi_spider_form_submit(event, 'sliders_form')" href="">
101
- <span><?php _e('Published', "wd-instagram-feed"); ?></span><span class="sorting-indicator"></span>
102
- </a>
103
- </th>
104
- <th class="table_big_col"><?php _e('Edit', "wd-instagram-feed"); ?></th>
105
- <th class="table_big_col"><?php _e('Delete', "wd-instagram-feed"); ?></th>
 
 
 
 
 
 
 
 
106
  </thead>
107
  <tbody id="tbody_arr">
108
- <?php
109
- if ($rows_data) {
110
- foreach ($rows_data as $row_data) {
111
- $alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
112
- $published_image = (($row_data->published) ? 'publish' : 'unpublish');
113
- $published = (($row_data->published) ? 'unpublish' : 'publish');
114
- $prev_img_url = $this->model->get_slider_prev_img($row_data->id);
115
- ?>
116
- <tr id="tr_<?php echo $row_data->id; ?>" <?php echo $alternate; ?>>
117
- <td class="table_small_col check-column"><input id="check_<?php echo $row_data->id; ?>" name="check_<?php echo $row_data->id; ?>" onclick="wdi_spider_check_all(this)" type="checkbox" /></td>
118
- <td class="table_small_col"><?php echo $row_data->id; ?></td>
119
- <td class="table_big_col">
120
- <img title="<?php echo $row_data->feed_name; ?>" style="border: 1px solid #CCCCCC; max-width: 70px; max-height: 50px;" src="<?php echo $prev_img_url . '?date=' . date('Y-m-y H:i:s'); ?>">
121
- </td>
122
- <td>
123
- <a onclick="wdi_spider_set_input_value('task', 'edit');
124
- wdi_spider_set_input_value('page_number', '1');
125
- wdi_spider_set_input_value('search_value', '');
126
- wdi_spider_set_input_value('search_or_not', '');
127
- wdi_spider_set_input_value('asc_or_desc', 'asc');
128
- wdi_spider_set_input_value('order_by', 'order');
129
- wdi_spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
130
- wdi_spider_form_submit(event, 'sliders_form')" href="" title="Edit"><?php echo $row_data->feed_name; ?>
131
- </a>
132
- </td>
133
- <td class="table_big_col" style="padding-left: 0; padding-right: 0;">
134
- <input type="text" value='[wdi_feed id="<?php echo $row_data->id; ?>"]' onclick="wdi_spider_select_value(this)" size="11" readonly="readonly" style="padding-left: 1px; padding-right: 1px;" />
135
- </td>
136
- <td class="table_large_col" style="padding-left: 0; padding-right: 0;">
137
- <input type="text" value="&#60;?php echo wdi_feed(array('id'=>'<?php echo $row_data->id; ?>')); ?&#62;" onclick="wdi_spider_select_value(this)" size="23" readonly="readonly" style="padding-left: 1px; padding-right: 1px;" />
138
- </td>
139
- <td class="table_big_col"><a onclick="wdi_spider_set_input_value('task', '<?php echo $published; ?>');wdi_spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');wdi_spider_form_submit(event, 'sliders_form')" href=""><img src="<?php echo WDI_URL . '/images/' . $published_image . '.png'; ?>"></img></a></td>
140
- <td class="table_big_col"><a onclick="wdi_spider_set_input_value('task', 'edit');
141
- wdi_spider_set_input_value('page_number', '1');
142
- wdi_spider_set_input_value('search_value', '');
143
- wdi_spider_set_input_value('search_or_not', '');
144
- wdi_spider_set_input_value('asc_or_desc', 'asc');
145
- wdi_spider_set_input_value('order_by', 'order');
146
- wdi_spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
147
- wdi_spider_form_submit(event, 'sliders_form')" href="">Edit</a></td>
148
- <td class="table_big_col"><a onclick="if (confirm('<?php esc_attr_e('Do you want to delete selected items?', "wd-instagram-feed"); ?>')){
149
- wdi_spider_set_input_value('task', 'delete');
150
- wdi_spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
151
- wdi_spider_form_submit(event, 'sliders_form');
152
- }" href="">Delete</a></td>
153
- </tr>
154
- <?php
155
- $ids_string .= $row_data->id . ',';
156
- }
 
 
 
 
 
 
 
 
 
 
 
 
157
  }
158
- ?>
 
159
  </tbody>
160
  </table>
161
- <input id="task" name="task" type="hidden" value="" />
162
- <input id="current_id" name="current_id" type="hidden" value="" />
163
- <input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>" />
164
- <input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc" />
165
- <input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>" />
166
  </form>
167
  <?php
168
  }
169
- public function edit($type){
170
- if($type===0){
171
- $this->generateForm();
172
- ?>
173
- <script>jQuery(document).ready(function(){
174
- wdi_controller.switchFeedTabs('feed_settings');
175
- });</script>
176
- <?php
177
- }else{
178
- global $wdi_new_feed;
179
- $wdi_new_feed = true;
180
- $current_id = $type;
181
- $feed_row= $this->model->get_feed_row($current_id);
182
- $view_id = $feed_row->feed_type;
183
- $this->generateForm($current_id);
184
- $tab = isset($_POST['wdi_refresh_tab']) ? $_POST['wdi_refresh_tab'] : 'feed_settings';
185
- ?>
186
- <script>jQuery(document).ready(function(){
187
- wdi_controller.switchFeedTabs("<?php echo $tab;?>","<?php echo $view_id;?>");
188
- });</script>
189
- <?php
190
-
191
- }
192
-
193
-
194
- }
195
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
 
197
 
198
- public function getFormElements($current_id=''){
199
- require_once(WDI_DIR. '/admin/models/WDIModelThemes_wdi.php');
 
200
  $themes = WDIModelThemes_wdi::get_themes();
201
  $elements = array(
202
- 'feed_name' => array('name'=>'feed_name','title'=>__('Feed Name',"wd-instagram-feed"),'type'=>'input','tooltip'=>__('The name of your feed which can be displayed in feed\'s header section',"wd-instagram-feed"),'attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry,blog_style,image_browser'))),
203
- 'theme_id' => array('switched'=>'off','label'=>array('place'=>'after','class'=>'wdi_pro_only','text'=>__("Changing Theme is Available Only in PRO version","wd-instagram-feed"),'br'=>'true'),'name' =>'theme_id', 'title'=>__('Theme',"wd-instagram-feed"),'valid_options'=>$themes,'type'=>'select','tooltip'=>__('The theme of your feed, you can create themes in themes menu',"wd-instagram-feed"),'attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry,blog_style,image_browser'))),
204
- 'liked_feed' => array('switched'=>'off', 'disabled_options'=>array('liked'=>__('Feed of liked media is Available in PRO version'),'br'=>'true'), 'name'=>'liked_feed','title'=>__('User/Hashtag feed or liked media',"wd-instagram-feed"),'type'=>'radio','valid_options'=>array('userhash'=>__('Username/Hashtag',"wd-instagram-feed"),'liked'=>__('Media I liked',"wd-instagram-feed")),'break'=>'false','hide_ids'=>array('liked'=>'feed_users,thumb_user'),'tooltip'=>__('Show the media I liked instead of showing user or hashtag feed',"wd-instagram-feed"),'attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry,blog_style,image_browser'))),
205
- 'feed_users' => array('name'=>'feed_users','title'=>__('Feed Usernames and Hashtags',"wd-instagram-feed"),'type'=>'input','input_type'=>'hidden','tooltip'=>__('Enter usernames or hashtags to your feed, hashtags must start with #, username\'s shouldn\'t start with @',"wd-instagram-feed"),'attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry,blog_style,image_browser'))),
206
- 'thumb_user' => array('name' =>'thumb_user', 'title'=>__('Featured Image',"wd-instagram-feed"),'valid_options'=>array(),'type'=>'select','tooltip'=>__('Select Featured Image For Header Section',"wd-instagram-feed"),'attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry,blog_style,image_browser'))),
207
- 'feed_display_view' => array('name'=>'feed_display_view','title'=>__('Feed Display Type',"wd-instagram-feed"),'type'=>'radio','valid_options'=>array('pagination'=>__('Pagination',"wd-instagram-feed"),'load_more_btn'=>__('Load More Button',"wd-instagram-feed"),'infinite_scroll'=>__('Infinite Scroll',"wd-instagram-feed")),'disabled_options'=>array('infinite_scroll'=>__('This Feature is Available in PRO version'),'br'=>'true'),'break'=>'true','hide_ids'=>array('pagination'=>'number_of_photos,load_more_number,resort_after_load_more','load_more_btn'=>'pagination_per_page_number,pagination_preload_number','infinite_scroll'=>'pagination_per_page_number,pagination_preload_number'),'tooltip'=>__('How to load and display new images',"wd-instagram-feed"),'attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry,blog_style'))),
208
- 'sort_images_by' => array('name' =>'sort_images_by', 'title'=>__('Sort Images By',"wd-instagram-feed"),'valid_options'=>array('date'=>__('Date',"wd-instagram-feed"),'likes'=>__('Likes',"wd-instagram-feed"),'comments'=>__('Comments',"wd-instagram-feed"),'random'=>__('Random',"wd-instagram-feed")),'type'=>'select','tooltip'=>__('How to sort images',"wd-instagram-feed"),'attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry,blog_style,image_browser'))),
209
- 'display_order' => array('name' =>'display_order', 'title'=>__('Order By',"wd-instagram-feed"),'valid_options'=>array('asc'=>'Ascending','desc'=>'Descending '),'type'=>'select','tooltip'=>__('Sorting order either Ascending or Descending',"wd-instagram-feed"),'attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry,blog_style,image_browser'))),
210
- 'follow_on_instagram_btn' => array('name'=>'follow_on_instagram_btn','title'=>__('Follow on Instagram Button',"wd-instagram-feed"),'type'=>'checkbox','tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry,blog_style,image_browser'))),
211
- 'display_header' => array('name'=>'display_header','title'=>__('Display Header',"wd-instagram-feed"),'type'=>'checkbox','tooltip'=>__('Displays feed\'s header, header includes feed name and feed users',"wd-instagram-feed"),'attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry,blog_style,image_browser'))),
212
- 'number_of_photos' => array('name'=>'number_of_photos','title'=>__('Number of Photos to Display',"wd-instagram-feed"),'type'=>'input','input_type'=>'number','tooltip'=>__('Number of images to load when page loads first time',"wd-instagram-feed"),'attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry,blog_style'))),
213
- 'load_more_number' => array('name'=>'load_more_number','title'=>__('Number of Photos to Load',"wd-instagram-feed"),'type'=>'input','input_type'=>'number','tooltip'=>__('Number of images to load when clicking load more button or triggering infinite scroll',"wd-instagram-feed"),'attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry,blog_style'))),
214
- 'pagination_per_page_number'=>array('name'=>'pagination_per_page_number','title'=>__('Number of Images Per Page',"wd-instagram-feed"),'type'=>'input','input_type'=>'number','tooltip'=>__('Number Of Images To Show On Each Pagination Page',"wd-instagram-feed"),'attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry,blog_style'))),
215
- 'pagination_preload_number'=>array('name'=>'pagination_preload_number','title'=>__('Number of Pages To Preload',"wd-instagram-feed"),'type'=>'input','input_type'=>'number','tooltip'=>__('This Will Preload Images For Pagination',"wd-instagram-feed"),'attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry,blog_style'))),
216
- 'image_browser_preload_number'=>array('name'=>'image_browser_preload_number','title'=>__('Number of Images To Preload',"wd-instagram-feed"),'type'=>'input','input_type'=>'number','tooltip'=>__('This Will Preload Images For Pagination',"wd-instagram-feed"),'attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'image_browser'))),
217
- 'image_browser_load_number'=>array('name'=>'image_browser_load_number','title'=>__('Number of Images To Load Each Time',"wd-instagram-feed"),'type'=>'input','input_type'=>'number','tooltip'=>__('Number Of Photos To Load on Each Load',"wd-instagram-feed"),'attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'image_browser'))),
218
- 'number_of_columns' => array('name'=>'number_of_columns','title'=>__('Number of Columns',"wd-instagram-feed"),'type'=>'select','valid_options'=>array('1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6','7'=>'7','8'=>'8'),'tooltip'=>__('Feed item\'s column count',"wd-instagram-feed"),'attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry'))),
219
- 'resort_after_load_more' => array('name'=>'resort_after_load_more','title'=>__('Sort Again Whole Feed After Loading New Images',"wd-instagram-feed"),'type'=>'checkbox','tooltip'=>__('Sort both newly loaded and existing images alltogether',"wd-instagram-feed"),'attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry,blog_style'))),
220
- 'show_likes' => array('switched'=>'off','name'=>'show_likes','title'=>__('Show Likes',"wd-instagram-feed"),'type'=>'checkbox','label'=>array('place'=>'after','class'=>'wdi_pro_only','text'=>__("This Feature is Available Only in PRO version","wd-instagram-feed"),'br'=>'true'),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry,blog_style,image_browser'))),
221
- 'show_description' => array('switched'=>'off','name'=>'show_description','title'=>__('Show Description',"wd-instagram-feed"),'type'=>'checkbox','label'=>array('place'=>'after','class'=>'wdi_pro_only','text'=>__("This Feature is Available Only in PRO version","wd-instagram-feed"),'br'=>'true'),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry,blog_style,image_browser'))),
222
- 'show_comments' => array('switched'=>'off','name'=>'show_comments','title'=>__('Show Comments',"wd-instagram-feed"),'type'=>'checkbox','label'=>array('place'=>'after','class'=>'wdi_pro_only','text'=>__("This Feature is Available Only in PRO version","wd-instagram-feed"),'br'=>'true'),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry,blog_style,image_browser'))),
223
- 'show_username_on_thumb' => array('switched'=>'off','name'=>'show_username_on_thumb','title'=>__('Show Username On Image Thumb',"wd-instagram-feed"),'type'=>'checkbox','label'=>array('place'=>'after','class'=>'wdi_pro_only','text'=>__("This Feature is Available Only in PRO version","wd-instagram-feed"),'br'=>'true'),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry'))),
224
- 'show_usernames' => array('name'=>'show_usernames','title'=>__('Show User Data',"wd-instagram-feed"),'type'=>'checkbox','tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry,blog_style,image_browser'))),
225
- 'display_user_info' => array('name'=>'display_user_info','title'=>__('Display User Bio',"wd-instagram-feed"),'type'=>'checkbox','tooltip'=>__('User bio will be displayed if feed has only one user',"wd-instagram-feed"),'attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry,blog_style,image_browser'))),
226
- 'display_user_post_follow_number' => array('name'=>'display_user_post_follow_number','title'=>__('Display User Posts and Followers count',"wd-instagram-feed"),'type'=>'checkbox','tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry,blog_style,image_browser'))),
227
- 'show_full_description' => array('name'=>'show_full_description','title'=>__('Show Full Description',"wd-instagram-feed"),'type'=>'checkbox','tooltip'=>__('Discription will be shown no matter how long it is',"wd-instagram-feed"),'attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'masonry'))),
228
- 'disable_mobile_layout' => array('name'=>'disable_mobile_layout','title'=>__('Disable Mobile Layout',"wd-instagram-feed"),'type'=>'checkbox','tooltip'=>__('Column number stays the same in all screens',"wd-instagram-feed"),'attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry'))),
229
- 'mobile_breakpoint' => array('name'=>'mobile_breakpoint','title'=>__('Window width breakpoint for small size media',"wd-instagram-feed"),'type'=>'input','input_type'=>'number','tooltip'=>__('Load media of smaller size from Instagram if browser width is smaller than this value. Faster loading in mobile devices. Set the value about 320px to always load large-size media.',"wd-instagram-feed"),'attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry,blog_style,image_browser'))),
230
- 'feed_item_onclick' => array('name'=>'feed_item_onclick','title'=>__('Image Onclick',"wd-instagram-feed"),'type'=>'radio','valid_options'=>array('lightbox'=>__('Open Lightbox',"wd-instagram-feed"),'instagram'=>__('Redirect To Instagram',"wd-instagram-feed"),'none'=>__('Do Nothing',"wd-instagram-feed")),'break'=>'true','tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'feed_settings'),array('name'=>'section','value'=>'thumbnails,masonry,blog_style,image_browser'))),
231
  //lightbox settings
232
- 'popup_fullscreen' => array('name'=>'popup_fullscreen','title'=>__('Full width lightbox',"wd-instagram-feed"),'type'=>'radio','valid_options'=>array('1'=>__('Yes',"wd-instagram-feed"),'0'=>__('No',"wd-instagram-feed")),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'lightbox_settings'))),
233
- 'popup_width' => array('name'=>'popup_width','title'=>__('Lightbox Width',"wd-instagram-feed"),'type'=>'input','input_type'=>'number','label'=>array('text'=>'px','place'=>'after'),'tooltip'=>'','attr'=>array(array('name'=>'class','value'=>'small_input'),array('name'=>'tab','value'=>'lightbox_settings'))),
234
- 'popup_height' => array('name'=>'popup_height','title'=>__('Lightbox Height',"wd-instagram-feed"),'type'=>'input','input_type'=>'number','label'=>array('text'=>'px','place'=>'after'),'tooltip'=>'','attr'=>array(array('name'=>'class','value'=>'small_input'),array('name'=>'tab','value'=>'lightbox_settings'))),
235
- 'popup_type' => array('name' =>'popup_type', 'title'=>__('Lightbox Effect',"wd-instagram-feed"),'valid_options'=>array('none'=>'None','fade'=>'Fade','cubeH'=>'Cube Horizontal','cubeV'=>'Cube Vertical','sliceH'=>'Slice Horizontal','sliceV'=>'Slice Vertical','slideH'=>'Slide Horizontal','slideV'=>'Slide Vertical','scaleOut'=>'Scale Out','scaleIn'=>'Scale In','blockScale'=>'Block Scale','kaleidoscope'=>'Kaleidoscope','fan'=>'Fan','blindH'=>'Blind Horizontal','blindV'=>'Blinde Vertical','random'=>'Random'),'disabled_options'=>array('cubeH','cubeV','sliceH','sliceV','slideH','slideV','scaleOut','scaleIn','blockScale','kaleidoscope','fan','blindH','blindV','random'),'type'=>'select','tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'lightbox_settings'))),
236
- 'popup_autoplay' => array('name'=>'popup_autoplay','title'=>__('Lightbox autoplay',"wd-instagram-feed"),'type'=>'radio','valid_options'=>array('1'=>__('Yes',"wd-instagram-feed"),'0'=>__('No',"wd-instagram-feed")),'hide_ids'=>array('0'=>'popup_interval'),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'lightbox_settings'))),
237
- 'popup_interval' => array('name'=>'popup_interval','title'=>__('Time Interval',"wd-instagram-feed"),'type'=>'input','input_type'=>'number','label'=>array('text'=>'sec','place'=>'after'),'tooltip'=>'','attr'=>array(array('name'=>'class','value'=>'small_input'),array('name'=>'tab','value'=>'lightbox_settings'))),
238
- 'popup_enable_filmstrip' => array('disabled_options'=>array('1'=>'','0'=>''),'label'=>array('place'=>'after','class'=>'wdi_pro_only','text'=>__("This Feature is Available Only in PRO version","wd-instagram-feed"),'br'=>'true'),'name'=>'popup_enable_filmstrip','title'=>__('Enable filmstrip in lightbox',"wd-instagram-feed"),'type'=>'radio','valid_options'=>array('1'=>__('Yes',"wd-instagram-feed"),'0'=>__('No',"wd-instagram-feed")),'hide_ids'=>array('0'=>'popup_filmstrip_height'),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'lightbox_settings'))),
239
- 'popup_filmstrip_height' => array('switched'=>'off','disabled'=>array('text'=>__("This Feature is Available Only in PRO version","wd-instagram-feed")),'name'=>'popup_filmstrip_height','title'=>__('Filmstrip size',"wd-instagram-feed"),'type'=>'input','input_type'=>'number','label'=>array('text'=>'px','place'=>'after'),'tooltip'=>'','attr'=>array(array('name'=>'class','value'=>'small_input'),array('name'=>'tab','value'=>'lightbox_settings'))),
240
- 'autohide_lightbox_navigation' => array('name'=>'autohide_lightbox_navigation','title'=>__('Show Next / Previous Buttons',"wd-instagram-feed"),'type'=>'radio','valid_options'=>array('1'=>__('On Hover',"wd-instagram-feed"),'0'=>__('Always',"wd-instagram-feed")),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'lightbox_settings'))),
241
- 'popup_info_always_show' => array('disabled_options'=>array('1'=>'','0'=>''),'name'=>'popup_info_always_show','title'=>__('Display info by default',"wd-instagram-feed"),'type'=>'radio','label'=>array('place'=>'after','class'=>'wdi_pro_only','text'=>__("This Feature is Available Only in PRO version","wd-instagram-feed"),'br'=>'true'),'valid_options'=>array('1'=>__('Yes',"wd-instagram-feed"),'0'=>__('No',"wd-instagram-feed")),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'lightbox_settings'))),
242
- 'popup_info_full_width' => array('disabled_options'=>array('1'=>'','0'=>''),'name'=>'popup_info_full_width','title'=>__('Full width info',"wd-instagram-feed"),'type'=>'radio','label'=>array('place'=>'after','class'=>'wdi_pro_only','text'=>__("This Feature is Available Only in PRO version","wd-instagram-feed"),'br'=>'true'),'valid_options'=>array('1'=>__('Yes',"wd-instagram-feed"),'0'=>__('No',"wd-instagram-feed")),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'lightbox_settings'))),
243
- 'enable_loop' => array('name'=>'enable_loop','title'=>__('Enable Loop',"wd-instagram-feed"),'type'=>'radio','valid_options'=>array('1'=>__('Yes',"wd-instagram-feed"),'0'=>__('No',"wd-instagram-feed")),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'lightbox_settings'))),
244
- 'popup_image_right_click' => array('name'=>'popup_image_right_click','title'=>__('Enable Right Click Protection',"wd-instagram-feed"),'type'=>'radio','valid_options'=>array('1'=>__('Yes',"wd-instagram-feed"),'0'=>__('No',"wd-instagram-feed")),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'lightbox_settings'))),
245
- 'popup_enable_ctrl_btn' => array('name'=>'popup_enable_ctrl_btn','title'=>__('Enable control buttons',"wd-instagram-feed"),'type'=>'radio','valid_options'=>array('1'=>__('Yes',"wd-instagram-feed"),'0'=>__('No',"wd-instagram-feed")),'hide_ids'=>array('0'=>'popup_enable_info,popup_enable_fullscreen,popup_enable_info,popup_enable_comment,popup_enable_download,popup_enable_share_buttons,popup_enable_fullsize_image'),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'lightbox_settings'))),
246
- 'popup_enable_info' => array('disabled_options'=>array('1'=>'','0'=>''),'name'=>'popup_enable_info','title'=>__('Enable info',"wd-instagram-feed"),'type'=>'radio','label'=>array('place'=>'after','class'=>'wdi_pro_only','text'=>__("This Feature is Available Only in PRO version","wd-instagram-feed"),'br'=>'true'),'valid_options'=>array('1'=>'Yes','0'=>'No'),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'lightbox_settings'))),
247
- 'popup_enable_fullscreen' => array('name'=>'popup_enable_fullscreen','title'=>__('Enable fullscreen',"wd-instagram-feed"),'type'=>'radio','valid_options'=>array('1'=>__('Yes',"wd-instagram-feed"),'0'=>__('No',"wd-instagram-feed")),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'lightbox_settings'))),
248
- 'popup_enable_comment' => array('switched'=>'off','disabled_options'=>array('1'=>'','0'=>''),'label'=>array('place'=>'after','class'=>'wdi_pro_only','text'=>__("This Feature is Available Only in PRO version","wd-instagram-feed"),'br'=>'true'),'name'=>'popup_enable_comment','title'=>__('Enable comments',"wd-instagram-feed"),'type'=>'radio','valid_options'=>array('1'=>__('Yes',"wd-instagram-feed"),'0'=>__('No',"wd-instagram-feed")),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'lightbox_settings'))),
249
- 'popup_enable_fullsize_image' => array('name'=>'popup_enable_fullsize_image','title'=>__('Link To Instagram Button',"wd-instagram-feed"),'type'=>'radio','valid_options'=>array('1'=>__('Yes',"wd-instagram-feed"),'0'=>__('No',"wd-instagram-feed")),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'lightbox_settings'))),
250
- 'popup_enable_download' => array('name'=>'popup_enable_download','title'=>__('Enable Download Button',"wd-instagram-feed"),'type'=>'radio','valid_options'=>array('1'=>__('Yes',"wd-instagram-feed"),'0'=>__('No',"wd-instagram-feed")),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'lightbox_settings'))),
251
- 'popup_enable_share_buttons' => array('disabled_options'=>array('1'=>'','0'=>''),'label'=>array('place'=>'after','class'=>'wdi_pro_only','text'=>__("This Feature is Available Only in PRO version","wd-instagram-feed"),'br'=>'true'),'name'=>'popup_enable_share_buttons','title'=>__('Enable Share Buttons',"wd-instagram-feed"),'type'=>'radio','valid_options'=>array('1'=>__('Yes',"wd-instagram-feed"),'0'=>__('No',"wd-instagram-feed")),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'lightbox_settings'))),
252
- 'popup_enable_facebook' => array('status'=>'disabled','name'=>'popup_enable_facebook','title'=>__('Enable Facebook button',"wd-instagram-feed"),'type'=>'radio','valid_options'=>array('1'=>__('Yes',"wd-instagram-feed"),'0'=>__('No',"wd-instagram-feed")),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'lightbox_settings'))),
253
- 'popup_enable_twitter' => array('status'=>'disabled','name'=>'popup_enable_twitter','title'=>__('Enable Twitter button',"wd-instagram-feed"),'type'=>'radio','valid_options'=>array('1'=>__('Yes',"wd-instagram-feed"),'0'=>__('No',"wd-instagram-feed")),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'lightbox_settings'))),
254
- 'popup_enable_google' => array('status'=>'disabled','name'=>'popup_enable_google','title'=>__('Enable Google+ button',"wd-instagram-feed"),'type'=>'radio','valid_options'=>array('1'=>__('Yes',"wd-instagram-feed"),'0'=>__('No',"wd-instagram-feed")),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'lightbox_settings'))),
255
- 'popup_enable_pinterest' => array('status'=>'disabled','name'=>'popup_enable_pinterest','title'=>__('Enable Pinterest button',"wd-instagram-feed"),'type'=>'radio','valid_options'=>array('1'=>__('Yes',"wd-instagram-feed"),'0'=>__('No',"wd-instagram-feed")),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'lightbox_settings'))),
256
- 'popup_enable_tumblr' => array('status'=>'disabled','name'=>'popup_enable_tumblr','title'=>__('Enable Tumblr button',"wd-instagram-feed"),'type'=>'radio','valid_options'=>array('1'=>__('Yes',"wd-instagram-feed"),'0'=>__('No',"wd-instagram-feed")),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'lightbox_settings'))),
257
- 'show_image_counts' => array('status'=>'disabled','name'=>'show_image_counts','title'=>__('Show Images Count',"wd-instagram-feed"),'type'=>'radio','valid_options'=>array('1'=>__('Yes',"wd-instagram-feed"),'0'=>__('No',"wd-instagram-feed")),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'lightbox_settings'))),
258
 
259
  //filters
260
- 'conditional_filter_enable' => array('name'=>'conditional_filter_enable','title'=>__('Enable Conditional Filters',"wd-instagram-feed"),'type'=>'radio','valid_options'=>array('1'=>__('Yes',"wd-instagram-feed"),'0'=>__('No',"wd-instagram-feed")),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'conditional_filters'))),
261
- 'conditional_filter_type' => array('name'=>'conditional_filter_type','title'=>__('Filter Logic',"wd-instagram-feed"),'type'=>'select','label'=>array('text'=>'','place'=>'after'),'valid_options'=>array('AND'=>'AND','OR'=>'OR','NOR'=>'NOR'),'tooltip'=>'','attr'=>array(array('name'=>'tab','value'=>'conditional_filters'))),
262
- );
263
- $return = array('elements'=>$elements,'current_id'=>$current_id);
264
  return $return;
265
- }
266
 
267
 
268
- public function genarateFeedViews(){
269
- ?>
270
- <div class="wdi_border_wrapper">
 
271
 
272
 
273
- <div class="display_type" tab="feed_settings" style="margin:5px;float:left;">
274
- <div style="text-align:center;padding:2px;" ><input type="radio" id="thumbnails" name="feed_type" value="thumbnails"><label for="thumbnails">Thumbnails</label></div>
275
- <label for="thumbnails"><img src="<?php echo plugins_url('../../images/feed_views/thumbnails.png',__FILE__);?>"></label>
276
  </div>
 
 
277
 
278
- <div class="display_type wdi_tooltip" wdi-tooltip="<?php _e('Available In Pro Version') ?>" tab="feed_settings" style="margin:5px;float:left;">
279
- <div style="text-align:center;padding:2px;" ><input type="radio" disabled id="masonry" name="feed_type" value="masonry"><label for="masonry" class="wdi_pro_only">Masonry</label></div>
280
- <label for="masonry" class="wdi_pro_only_op"><img src="<?php echo plugins_url('../../images/feed_views/masonry.png',__FILE__);?>"></label>
 
281
  </div>
 
 
 
282
 
283
- <div class="display_type wdi_tooltip" wdi-tooltip="<?php _e('Available In Pro Version') ?>" tab="feed_settings" style="margin:5px;float:left;">
284
- <div style="text-align:center;padding:2px;" ><input disabled type="radio" id="blog_style" name="feed_type" value="blog_style"><label for="blog_style" class="wdi_pro_only">Blog Style</label></div>
285
- <label for="blog_style" class="wdi_pro_only_op"><img src="<?php echo plugins_url('../../images/feed_views/blog_style.png',__FILE__);?>"></label>
286
- </div>
 
 
 
 
 
287
 
288
- <div class="display_type" tab="feed_settings" style="margin:5px;float:left;">
289
- <div style="text-align:center;padding:2px;" ><input type="radio" id="image_browser" name="feed_type" value="image_browser"><label for="image_browser">Image Browser</label></div>
290
- <label for="image_browser"><img src="<?php echo plugins_url('../../images/feed_views/image_browser.png',__FILE__);?>"></label>
291
- </div>
 
 
 
292
 
293
- <br class="wdi_clear">
294
  <?php
295
- }
296
- public function generateTabs(){
297
- ?>
298
- <div id="wdi_feed_tabs">
299
- <div class="wdi_feed_tabs" id="wdi_feed_settings" onclick="wdi_controller.switchFeedTabs('feed_settings');"><?php _e('Feed Settings',"wd-instagram-feed")?></div>
300
- <div class="wdi_feed_tabs" id="wdi_lightbox_settings" onclick="wdi_controller.switchFeedTabs('lightbox_settings');"><?php _e('Lightbox Settings',"wd-instagram-feed")?></div>
301
- <div class="wdi_feed_tabs" id="wdi_conditional_filters" onclick="wdi_controller.switchFeedTabs('conditional_filters');"><?php _e('Conditional Filters',"wd-instagram-feed")?></div>
302
- <br class="wdi_clear">
303
- </div>
304
- <?php
305
- }
306
- public function generateForm($current_id = ''){
307
- $formInfo = $this->getFormElements($current_id);
308
- $elements=$formInfo['elements'];
309
-
310
- global $wdi_options;
311
- //for edit
312
- $edit = false;
313
- if($current_id != ''){
314
- $feed_row = WDILibrary::objectToarray($this->model->get_feed_row($current_id));
315
- $edit = true;
316
- }
317
- else{
318
- $feed_row = '';
319
- }
320
- ?>
321
- <div class="wdi_help_bar_wrap">
322
- <span class="wdi_help_bar_text"><?php _e('Here You Can Change Feed Parameters', "wd-instagram-feed"); ?></span>
323
- <a class="wdi_hb_t_link" target="_blank" href="https://web-dorado.com/wordpress-instagram-feed-wd/creating-feeds.html"><?php _e('Read More in User Guide', "wd-instagram-feed"); ?></a>
324
- <a class="wdi_hb_buy_pro" target="_blank" href="https://web-dorado.com/products/wordpress-instagram-feed-wd.html"><?php _e('Upgrade to Pro Version', "wd-instagram-feed"); ?></a>
325
- <a class="wdi_hb_s_link" target="_blank" href="https://wordpress.org/support/plugin/wd-instagram-feed"><img src="<?php echo WDI_URL; ?>/images/i_support.png"><span class="wdi_hb_s_text"><?php _e('Support Forum', "wd-instagram-feed"); ?></span></a>
326
- </div>
327
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
328
  <div class="wrap">
329
- <h2><?php if($edit==true && isset($feed_row['feed_name'])){
330
- echo __('Edit feed',"wd-instagram-feed").' <b style="font-size:23px;color:rgb(255, 97, 0);">' .$feed_row['feed_name'].'</b>';
331
- }
332
- else{
333
- _e('Add new Feed', "wd-instagram-feed");
334
- }?>
335
-
336
-
337
- </h2>
338
- <?php $this->generateTabs();?>
339
- <?php $this->genarateFeedViews();?>
340
- <form method="post" action="admin.php?page=wdi_feeds" id='wdi_save_feed'>
341
- <?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
342
- <input type="hidden" id="wdi_feed_type" name='<?php echo WDI_FSN.'[feed_type]'?>'>
343
- <input type="hidden" id="task" name='task'>
344
- <input type="hidden" id="wdi_feed_thumb" name="<?php echo WDI_FSN.'[feed_thumb]'?>">
345
- <input type="hidden" id="wdi_access_token" name="access_token" value="<?php echo $wdi_options['wdi_access_token'];?>">
346
- <input type="hidden" id="wdi_add_or_edit" name="add_or_edit" value="<?php echo $current_id;?>">
347
- <input type="hidden" id="wdi_thumb_user" value="<?php echo isset($feed_row['thumb_user'])?$feed_row['thumb_user']:$wdi_options['wdi_user_name'];?>">
348
- <input type="hidden" id="wdi_default_user" value="<?php echo $wdi_options['wdi_user_name'];?>">
349
- <input type="hidden" id="wdi_default_user_id" value="<?php echo $wdi_options['wdi_user_id'];?>">
350
- <input type="hidden" name="<?php echo WDI_FSN.'[published]'?>" value="<?php echo isset($feed_row['published'])?$feed_row['published']: '1';?>">
351
- <input type="hidden" id="wdi_current_id" name="current_id" value=''>
352
- <input type="hidden" id="wdi_refresh_tab" name="wdi_refresh_tab">
353
- <table class="form-table">
354
- <tbody>
 
 
 
355
  <?php
356
  foreach ($elements as $element) {
357
- if( $element['name'] == 'conditional_filter_enable' ){ continue; }
358
-
359
- if( $element['name'] == 'conditional_filter_type' ){
360
- ?>
361
-
362
- <div id="wdi-conditional-filters-ui" class="wdi_demo_img">
363
- <div class="wdi_pro_notice"> <?php _e("This is FREE version, Conditional filters are available only in PRO version","wd-instagram-feed"); ?> </div>
364
- <div class="wdi-pro-overlay"> <img src="<?php echo WDI_URL . '/demo_images/filters.png'; ?>" alt=""></div>
365
- </div><?php
366
  continue;
367
- }
368
 
369
- if(isset($element['status'])){
370
- if($element['status'] == 'disabled'){
371
- continue;
 
 
 
 
 
 
 
 
 
 
 
372
  }
373
  }
374
  ?>
375
 
376
-
377
-
378
 
379
  <tr>
380
- <th scope="row"><a href="#" <?php echo ($element['tooltip']!='' && isset($element['tooltip'])) ? 'class="wdi_tooltip" wdi-tooltip="'.$element['tooltip'].'"' : 'class="wdi_settings_link"'; ?> ><?php echo $element['title'];?></a></th>
381
- <td>
382
-
383
- <?php $this->buildField($element,$feed_row);?>
384
- <!-- FEED USERS -->
385
- <?php if($element['name']=='feed_users'):?>
386
- <input type="text" id="wdi_add_user_ajax_input">
387
- <div id="wdi_add_user_ajax" class="button"><?php _e('Add', "wd-instagram-feed"); ?></div>
388
- <div id="wdi_feed_users">
389
- <?php $this->display_feed_users($feed_row);?>
390
- </div>
391
- <?php endif; ?>
392
- <!-- END FEED USERS -->
393
-
394
-
395
-
396
- </td>
397
- </tr><?php
 
398
 
399
  }
400
  ?>
401
- </tbody>
402
- </table>
403
- <div id="wdi_save_feed_submit" class="button button-primary"><?php _e('Save', "wd-instagram-feed"); ?></div>
404
-
405
  <div id="wdi_save_feed_apply" class="button button-primary"><?php _e('Apply', "wd-instagram-feed"); ?></div>
406
- <div id="wdi_save_feed_reset" style="display:none" class="button button-secondary"><?php _e('Reset', "wd-instagram-feed"); ?></div>
 
407
  <div id="wdi_cancel_changes" class="button button-secondary"><?php _e('Cancel', "wd-instagram-feed"); ?></div>
408
- </form>
409
- </div>
410
  </div>
 
411
  <?php
412
  }
413
- private function buildField($element,$feed_row=''){
414
- require_once(WDI_DIR.'/framework/WDI_form_builder.php');
415
- $element['defaults'] = $this->model->wdi_get_feed_defaults();
416
- $element['CONST'] = WDI_FSN;
417
- $builder = new WDI_form_builder();
418
- switch($element['type']){
419
- case 'input':{
420
- $builder->input($element,$feed_row);
421
- break;
422
- }
423
- case 'select':{
424
- $builder->select($element,$feed_row);
425
- break;
426
- }
427
- case 'radio':{
428
- $builder->radio($element,$feed_row);
429
- break;
430
- }
431
- case 'checkbox':{
432
- $builder->checkbox($element,$feed_row);
433
- break;
 
 
434
  }
435
  }
436
- }
437
 
438
 
439
- public function display_feed_users($feed_row){
440
- global $wdi_options;
 
441
 
442
- $users = isset($feed_row['feed_users']) ? $feed_row['feed_users']: "";
443
-
444
- $users = json_decode($users);
445
- if($users === null){
446
- $users = array();
447
- }
448
-
449
-
450
 
451
- ?>
452
- <script>
453
- jQuery(document).ready(function(){
454
- wdi_controller.instagram = new WDIInstagram();
455
- wdi_controller.feed_users = [];
456
- wdi_controller.instagram.addToken(<?php echo '"'.$wdi_options['wdi_access_token'].'"'; ?>);
457
-
458
- wdi_controller.updateFeaturedImageSelect(<?php echo '"'.$wdi_options['wdi_user_name'].'"'; ?>,'add','selected');
459
-
460
- <?php foreach ($users as $user) : ?>
461
- wdi_controller.makeInstagramUserRequest(<?php echo '"'.$user->username.'"'?>,true);
462
- <?php endforeach; ?>
463
- });
464
- </script>
465
- <?php
466
-
467
- }
 
 
 
 
 
 
 
468
 
469
 
470
  }
1
  <?php
2
 
3
+ class WDIViewFeeds_wdi
4
+ {
5
  ////////////////////////////////////////////////////////////////////////////////////////
6
  // Events //
7
  ////////////////////////////////////////////////////////////////////////////////////////
12
  // Variables //
13
  ////////////////////////////////////////////////////////////////////////////////////////
14
  private $model;
15
+
16
  ////////////////////////////////////////////////////////////////////////////////////////
17
  // Constructor & Destructor //
18
  ////////////////////////////////////////////////////////////////////////////////////////
19
+ public function __construct($model)
20
+ {
21
  $this->model = $model;
22
  }
23
  ////////////////////////////////////////////////////////////////////////////////////////
24
  // Public Methods //
25
  ////////////////////////////////////////////////////////////////////////////////////////
26
+ public function display()
27
+ {
28
  /*My Edit*/
29
  global $wdi_options;
30
  $rows_data = $this->model->get_rows_data();
31
  $page_nav = $this->model->page_nav();
32
  $search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
33
+ $search_select_value = ((isset($_POST['search_select_value'])) ? (int)$_POST['search_select_value'] : 0);
34
  $asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
35
  $order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'id');
36
  $order_class = 'manage-column column-title sorted ' . $asc_or_desc;
37
  $ids_string = '';
38
  ?>
39
+ <div class="update-nag wdi_help_bar_wrap">
40
+ <span class="wdi_help_bar_text">
41
+ <?php _e('This section allows you to create, edit and delete Feeds.', "wd-instagram-feed"); ?>
42
+ <a class="wdi_hb_t_link" target="_blank"
43
+ href="https://web-dorado.com/wordpress-instagram-feed-wd/creating-feeds.html"><?php _e('Read More in User Guide', "wd-instagram-feed"); ?></a>
44
+ </span>
45
+ <div class="wdi_hb_buy_pro">
46
+ <a target="_blank" href="https://web-dorado.com/products/wordpress-instagram-feed-wd.html">
47
+ <img alt="web-dorado.com" title="UPGRADE TO PAID VERSION"
48
+ src="<?php echo WDI_URL . '/images/wd-logo.png'; ?>">
49
+ <span><?php _e('Upgrade to paid version', "wd-instagram-feed"); ?></span>
50
+ </a>
51
+ </div>
52
  </div>
53
+ <form class="wrap" id="sliders_form" method="post" action="admin.php?page=wdi_feeds"
54
+ style="float: left; width: 99%;">
55
  <?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
56
+ <input type="hidden" id="wdi_access_token" name="access_token"
57
+ value="<?php echo isset($wdi_options['wdi_access_token']) ? $wdi_options['wdi_access_token'] : ''; ?>">
58
  <span class="slider-icon"></span>
59
  <h2>
60
  <?php _e('Feeds', "wd-instagram-feed"); ?>
65
  </h2>
66
  <div class="buttons_div">
67
  <span class="button-secondary non_selectable" onclick="wdi_spider_check_all_items()">
68
+ <input type="checkbox" id="check_all_items" name="check_all_items"
69
+ onclick="wdi_spider_check_all_items_checkbox()" style="margin: 0; vertical-align: middle;"/>
70
  <span style="vertical-align: middle;"><?php _e('Select All', "wd-instagram-feed"); ?></span>
71
  </span>
72
+ <input class="button-secondary" type="submit" onclick="wdi_spider_set_input_value('task', 'publish_all')"
73
+ value="<?php esc_attr_e('Publish', "wd-instagram-feed"); ?>"/>
74
+ <input class="button-secondary" type="submit" onclick="wdi_spider_set_input_value('task', 'unpublish_all')"
75
+ value="<?php esc_attr_e('Unpublish', "wd-instagram-feed"); ?>"/>
76
+ <input class="button-secondary" type="submit" onclick="wdi_spider_set_input_value('task', 'duplicate_all')"
77
+ value="<?php esc_attr_e('Duplicate', "wd-instagram-feed"); ?>"/>
78
+
79
+ <input class="button-secondary" type="submit"
80
+ onclick="if (confirm('<?php esc_attr_e('Do you want to delete selected items?', "wd-instagram-feed"); ?>')) {
81
+ wdi_spider_set_input_value('task', 'delete_all');
82
+ } else {
83
+ return false;
84
+ }" value="<?php esc_attr_e('Delete', "wd-instagram-feed"); ?>"/>
85
  </div>
86
  <div class="tablenav top">
87
  <?php
88
+ WDILibrary::search(__('Name', "wd-instagram-feed"), $search_value, 'sliders_form');
89
  WDILibrary::html_page_nav($page_nav['total'], $page_nav['limit'], 'sliders_form');
90
  ?>
91
  </div>
92
  <table class="wp-list-table widefat fixed pages">
93
  <thead>
94
+ <th class="manage-column column-cb check-column table_small_col"><input id="check_all" type="checkbox"
95
+ onclick="wdi_spider_check_all(this)"
96
+ style="margin:0;"/></th>
97
+ <th class="table_small_col <?php if ($order_by == 'id') {
98
+ echo $order_class;
99
+ } ?>">
100
+ <a onclick="wdi_spider_set_input_value('task', '');
101
+ wdi_spider_set_input_value('order_by', 'id');
102
+ wdi_spider_set_input_value('asc_or_desc', '<?php echo((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'id') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
103
+ wdi_spider_form_submit(event, 'sliders_form')" href="">
104
+ <span>ID</span><span class="sorting-indicator"></span>
105
+ </a>
106
+ </th>
107
+ <th class="table_big_col"><?php _e("Feed", "wd-instagram-feed") ?></th>
108
+ <th class="<?php if ($order_by == 'feed_name') {
109
+ echo $order_class;
110
+ } ?>">
111
+ <a onclick="wdi_spider_set_input_value('task', '');
112
+ wdi_spider_set_input_value('order_by', 'feed_name');
113
+ wdi_spider_set_input_value('asc_or_desc', '<?php echo((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'feed_name') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
114
+ wdi_spider_form_submit(event, 'sliders_form')" href="">
115
+ <span><?php _e('Name', "wd-instagram-feed"); ?></span><span class="sorting-indicator"></span>
116
+ </a>
117
+ </th>
118
+ <th class="table_big_col"><?php _e('Shortcode', "wd-instagram-feed"); ?></th>
119
+ <th class="table_large_col"><?php _e('PHP function', "wd-instagram-feed"); ?></th>
120
+ <th class="table_big_col <?php if ($order_by == 'published') {
121
+ echo $order_class;
122
+ } ?>">
123
+ <a onclick="wdi_spider_set_input_value('task', '');
124
+ wdi_spider_set_input_value('order_by', 'published');
125
+ wdi_spider_set_input_value('asc_or_desc', '<?php echo((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'published') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
126
+ wdi_spider_form_submit(event, 'sliders_form')" href="">
127
+ <span><?php _e('Published', "wd-instagram-feed"); ?></span><span class="sorting-indicator"></span>
128
+ </a>
129
+ </th>
130
+ <th class="table_big_col"><?php _e('Edit', "wd-instagram-feed"); ?></th>
131
+ <th class="table_big_col"><?php _e('Delete', "wd-instagram-feed"); ?></th>
132
  </thead>
133
  <tbody id="tbody_arr">
134
+ <?php
135
+ if ($rows_data) {
136
+ foreach ($rows_data as $row_data) {
137
+ $alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
138
+ $published_image = (($row_data->published) ? 'publish' : 'unpublish');
139
+ $published = (($row_data->published) ? 'unpublish' : 'publish');
140
+ $prev_img_url = $this->model->get_slider_prev_img($row_data->id);
141
+ ?>
142
+ <tr id="tr_<?php echo $row_data->id; ?>" <?php echo $alternate; ?>>
143
+ <td class="table_small_col check-column"><input id="check_<?php echo $row_data->id; ?>"
144
+ name="check_<?php echo $row_data->id; ?>"
145
+ onclick="wdi_spider_check_all(this)" type="checkbox"/>
146
+ </td>
147
+ <td class="table_small_col"><?php echo $row_data->id; ?></td>
148
+ <td class="table_big_col">
149
+ <img title="<?php echo $row_data->feed_name; ?>"
150
+ style="border: 1px solid #CCCCCC; max-width: 70px; max-height: 50px;"
151
+ src="<?php echo $prev_img_url . '?date=' . date('Y-m-y H:i:s'); ?>">
152
+ </td>
153
+ <td>
154
+ <a onclick="wdi_spider_set_input_value('task', 'edit');
155
+ wdi_spider_set_input_value('page_number', '1');
156
+ wdi_spider_set_input_value('search_value', '');
157
+ wdi_spider_set_input_value('search_or_not', '');
158
+ wdi_spider_set_input_value('asc_or_desc', 'asc');
159
+ wdi_spider_set_input_value('order_by', 'order');
160
+ wdi_spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
161
+ wdi_spider_form_submit(event, 'sliders_form')" href=""
162
+ title="Edit"><?php echo $row_data->feed_name; ?>
163
+ </a>
164
+ </td>
165
+ <td class="table_big_col" style="padding-left: 0; padding-right: 0;">
166
+ <input type="text" value='[wdi_feed id="<?php echo $row_data->id; ?>"]'
167
+ onclick="wdi_spider_select_value(this)" size="11" readonly="readonly"
168
+ style="padding-left: 1px; padding-right: 1px;"/>
169
+ </td>
170
+ <td class="table_large_col" style="padding-left: 0; padding-right: 0;">
171
+ <input type="text" value="&#60;?php echo wdi_feed(array('id'=>'<?php echo $row_data->id; ?>')); ?&#62;"
172
+ onclick="wdi_spider_select_value(this)" size="23" readonly="readonly"
173
+ style="padding-left: 1px; padding-right: 1px;"/>
174
+ </td>
175
+ <td class="table_big_col"><a
176
+ onclick="wdi_spider_set_input_value('task', '<?php echo $published; ?>');wdi_spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');wdi_spider_form_submit(event, 'sliders_form')"
177
+ href=""><img src="<?php echo WDI_URL . '/images/' . $published_image . '.png'; ?>"></img></a></td>
178
+ <td class="table_big_col"><a onclick="wdi_spider_set_input_value('task', 'edit');
179
+ wdi_spider_set_input_value('page_number', '1');
180
+ wdi_spider_set_input_value('search_value', '');
181
+ wdi_spider_set_input_value('search_or_not', '');
182
+ wdi_spider_set_input_value('asc_or_desc', 'asc');
183
+ wdi_spider_set_input_value('order_by', 'order');
184
+ wdi_spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
185
+ wdi_spider_form_submit(event, 'sliders_form')" href="">Edit</a></td>
186
+ <td class="table_big_col"><a
187
+ onclick="if (confirm('<?php esc_attr_e('Do you want to delete selected items?', "wd-instagram-feed"); ?>')){
188
+ wdi_spider_set_input_value('task', 'delete');
189
+ wdi_spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
190
+ wdi_spider_form_submit(event, 'sliders_form');
191
+ }" href="">Delete</a></td>
192
+ </tr>
193
+ <?php
194
+ $ids_string .= $row_data->id . ',';
195
  }
196
+ }
197
+ ?>
198
  </tbody>
199
  </table>
200
+ <input id="task" name="task" type="hidden" value=""/>
201
+ <input id="current_id" name="current_id" type="hidden" value=""/>
202
+ <input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>"/>
203
+ <input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc"/>
204
+ <input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>"/>
205
  </form>
206
  <?php
207
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
208
 
209
+ public function edit($type)
210
+ {
211
+ if ($type === 0) {
212
+ $this->generateForm();
213
+ ?>
214
+ <script>jQuery(document).ready(function ()
215
+ {
216
+ wdi_controller.switchFeedTabs('feed_settings');
217
+ });</script>
218
+ <?php
219
+ }
220
+ else {
221
+ global $wdi_new_feed;
222
+ $wdi_new_feed = true;
223
+ $current_id = $type;
224
+ $feed_row = $this->model->get_feed_row($current_id);
225
+ $view_id = $feed_row->feed_type;
226
+ $this->generateForm($current_id);
227
+ $tab = isset($_POST['wdi_refresh_tab']) ? $_POST['wdi_refresh_tab'] : 'feed_settings';
228
+ ?>
229
+ <script>jQuery(document).ready(function ()
230
+ {
231
+ wdi_controller.switchFeedTabs("<?php echo $tab;?>", "<?php echo $view_id;?>");
232
+ });</script>
233
+ <?php
234
+
235
+ }
236
+
237
+
238
+ }
239
 
240
 
241
+ public function getFormElements($current_id = '')
242
+ {
243
+ require_once(WDI_DIR . '/admin/models/WDIModelThemes_wdi.php');
244
  $themes = WDIModelThemes_wdi::get_themes();
245
  $elements = array(
246
+ 'feed_name' => array('name' => 'feed_name', 'title' => __('Feed Name', "wd-instagram-feed"), 'type' => 'input', 'tooltip' => __('The name of your feed which can be displayed in feed\'s header section', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
247
+ 'theme_id' => array('switched' => 'off', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("Changing Theme is Available Only in PRO version", "wd-instagram-feed"), 'br' => 'true'), 'name' => 'theme_id', 'title' => __('Theme', "wd-instagram-feed"), 'valid_options' => $themes, 'type' => 'select', 'tooltip' => __('The theme of your feed, you can create themes in themes menu', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
248
+ 'liked_feed' => array('switched' => 'off', 'disabled_options' => array('liked' => __('Feed of liked media is Available in PRO version'), 'br' => 'true'), 'name' => 'liked_feed', 'title' => __('User/Hashtag feed or liked media', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('userhash' => __('Username/Hashtag', "wd-instagram-feed"), 'liked' => __('Media I liked', "wd-instagram-feed")), 'break' => 'false', 'hide_ids' => array('liked' => 'feed_users,thumb_user'), 'tooltip' => __('Show the media I liked instead of showing user or hashtag feed', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
249
+ 'feed_users' => array('name' => 'feed_users', 'title' => __('Feed Usernames and Hashtags', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'hidden', 'tooltip' => __('Enter usernames or hashtags to your feed, hashtags must start with #, username\'s shouldn\'t start with @', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
250
+ 'thumb_user' => array('name' => 'thumb_user', 'title' => __('Featured Image', "wd-instagram-feed"), 'valid_options' => array(), 'type' => 'select', 'tooltip' => __('Select Featured Image For Header Section', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
251
+ 'feed_display_view' => array('name' => 'feed_display_view', 'title' => __('Feed Display Type', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('pagination' => __('Pagination', "wd-instagram-feed"), 'load_more_btn' => __('Load More Button', "wd-instagram-feed"), 'infinite_scroll' => __('Infinite Scroll', "wd-instagram-feed")), 'disabled_options' => array('infinite_scroll' => __('This Feature is Available in PRO version'), 'br' => 'true'), 'break' => 'true', 'hide_ids' => array('pagination' => 'number_of_photos,load_more_number,resort_after_load_more', 'load_more_btn' => 'pagination_per_page_number,pagination_preload_number', 'infinite_scroll' => 'pagination_per_page_number,pagination_preload_number'), 'tooltip' => __('How to load and display new images', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
252
+ 'sort_images_by' => array('name' => 'sort_images_by', 'title' => __('Sort Images By', "wd-instagram-feed"), 'valid_options' => array('date' => __('Date', "wd-instagram-feed"), 'likes' => __('Likes', "wd-instagram-feed"), 'comments' => __('Comments', "wd-instagram-feed"), 'random' => __('Random', "wd-instagram-feed")), 'type' => 'select', 'tooltip' => __('How to sort images', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
253
+ 'display_order' => array('name' => 'display_order', 'title' => __('Order By', "wd-instagram-feed"), 'valid_options' => array('asc' => 'Ascending', 'desc' => 'Descending '), 'type' => 'select', 'tooltip' => __('Sorting order either Ascending or Descending', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
254
+ 'follow_on_instagram_btn' => array('name' => 'follow_on_instagram_btn', 'title' => __('Follow on Instagram Button', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
255
+ 'display_header' => array('name' => 'display_header', 'title' => __('Display Header', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('Displays feed\'s header, header includes feed name and feed users', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
256
+ 'number_of_photos' => array('name' => 'number_of_photos', 'title' => __('Number of Photos to Display', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('Number of images to load when page loads first time', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
257
+ 'load_more_number' => array('name' => 'load_more_number', 'title' => __('Number of Photos to Load', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('Number of images to load when clicking load more button or triggering infinite scroll', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
258
+ 'pagination_per_page_number' => array('name' => 'pagination_per_page_number', 'title' => __('Number of Images Per Page', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('Number Of Images To Show On Each Pagination Page', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
259
+ 'pagination_preload_number' => array('name' => 'pagination_preload_number', 'title' => __('Number of Pages To Preload', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('This Will Preload Images For Pagination', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
260
+ 'image_browser_preload_number' => array('name' => 'image_browser_preload_number', 'title' => __('Number of Images To Preload', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('This Will Preload Images For Pagination', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'image_browser'))),
261
+ 'image_browser_load_number' => array('name' => 'image_browser_load_number', 'title' => __('Number of Images To Load Each Time', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('Number Of Photos To Load on Each Load', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'image_browser'))),
262
+ 'number_of_columns' => array('name' => 'number_of_columns', 'title' => __('Number of Columns', "wd-instagram-feed"), 'type' => 'select', 'valid_options' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8'), 'tooltip' => __('Feed item\'s column count', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry'))),
263
+ 'resort_after_load_more' => array('name' => 'resort_after_load_more', 'title' => __('Sort Again Whole Feed After Loading New Images', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('Sort both newly loaded and existing images alltogether', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
264
+ 'show_likes' => array('switched' => 'off', 'name' => 'show_likes', 'title' => __('Show Likes', "wd-instagram-feed"), 'type' => 'checkbox', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This Feature is Available Only in PRO version", "wd-instagram-feed"), 'br' => 'true'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
265
+ 'show_description' => array('switched' => 'off', 'name' => 'show_description', 'title' => __('Show Description', "wd-instagram-feed"), 'type' => 'checkbox', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This Feature is Available Only in PRO version", "wd-instagram-feed"), 'br' => 'true'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
266
+ 'show_comments' => array('switched' => 'off', 'name' => 'show_comments', 'title' => __('Show Comments', "wd-instagram-feed"), 'type' => 'checkbox', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This Feature is Available Only in PRO version", "wd-instagram-feed"), 'br' => 'true'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
267
+ 'show_username_on_thumb' => array('switched' => 'off', 'name' => 'show_username_on_thumb', 'title' => __('Show Username On Image Thumb', "wd-instagram-feed"), 'type' => 'checkbox', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This Feature is Available Only in PRO version", "wd-instagram-feed"), 'br' => 'true'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry'))),
268
+ 'show_usernames' => array('name' => 'show_usernames', 'title' => __('Show User Data', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
269
+ 'display_user_info' => array('name' => 'display_user_info', 'title' => __('Display User Bio', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('User bio will be displayed if feed has only one user', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
270
+ 'display_user_post_follow_number' => array('name' => 'display_user_post_follow_number', 'title' => __('Display User Posts and Followers count', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
271
+ 'show_full_description' => array('name' => 'show_full_description', 'title' => __('Show Full Description', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('Discription will be shown no matter how long it is', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'masonry'))),
272
+ 'disable_mobile_layout' => array('name' => 'disable_mobile_layout', 'title' => __('Disable Mobile Layout', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('Column number stays the same in all screens', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry'))),
273
+ 'mobile_breakpoint' => array('name' => 'mobile_breakpoint', 'title' => __('Window width breakpoint for small size media', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('Load media of smaller size from Instagram if browser width is smaller than this value. Faster loading in mobile devices. Set the value about 320px to always load large-size media.', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
274
+ 'feed_item_onclick' => array('name' => 'feed_item_onclick', 'title' => __('Image Onclick', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('lightbox' => __('Open Lightbox', "wd-instagram-feed"), 'instagram' => __('Redirect To Instagram', "wd-instagram-feed"), 'none' => __('Do Nothing', "wd-instagram-feed")), 'break' => 'true', 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
275
  //lightbox settings
276
+ 'popup_fullscreen' => array('name' => 'popup_fullscreen', 'title' => __('Full width lightbox', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
277
+ 'popup_width' => array('name' => 'popup_width', 'title' => __('Lightbox Width', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'label' => array('text' => 'px', 'place' => 'after'), 'tooltip' => '', 'attr' => array(array('name' => 'class', 'value' => 'small_input'), array('name' => 'tab', 'value' => 'lightbox_settings'))),
278
+ 'popup_height' => array('name' => 'popup_height', 'title' => __('Lightbox Height', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'label' => array('text' => 'px', 'place' => 'after'), 'tooltip' => '', 'attr' => array(array('name' => 'class', 'value' => 'small_input'), array('name' => 'tab', 'value' => 'lightbox_settings'))),
279
+ 'popup_type' => array('name' => 'popup_type', 'title' => __('Lightbox Effect', "wd-instagram-feed"), 'valid_options' => array('none' => 'None', 'fade' => 'Fade', 'cubeH' => 'Cube Horizontal', 'cubeV' => 'Cube Vertical', 'sliceH' => 'Slice Horizontal', 'sliceV' => 'Slice Vertical', 'slideH' => 'Slide Horizontal', 'slideV' => 'Slide Vertical', 'scaleOut' => 'Scale Out', 'scaleIn' => 'Scale In', 'blockScale' => 'Block Scale', 'kaleidoscope' => 'Kaleidoscope', 'fan' => 'Fan', 'blindH' => 'Blind Horizontal', 'blindV' => 'Blinde Vertical', 'random' => 'Random'), 'disabled_options' => array('cubeH', 'cubeV', 'sliceH', 'sliceV', 'slideH', 'slideV', 'scaleOut', 'scaleIn', 'blockScale', 'kaleidoscope', 'fan', 'blindH', 'blindV', 'random'), 'type' => 'select', 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
280
+ 'popup_autoplay' => array('name' => 'popup_autoplay', 'title' => __('Lightbox autoplay', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'hide_ids' => array('0' => 'popup_interval'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
281
+ 'popup_interval' => array('name' => 'popup_interval', 'title' => __('Time Interval', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'label' => array('text' => 'sec', 'place' => 'after'), 'tooltip' => '', 'attr' => array(array('name' => 'class', 'value' => 'small_input'), array('name' => 'tab', 'value' => 'lightbox_settings'))),
282
+ 'popup_enable_filmstrip' => array('disabled_options' => array('1' => '', '0' => ''), 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This Feature is Available Only in PRO version", "wd-instagram-feed"), 'br' => 'true'), 'name' => 'popup_enable_filmstrip', 'title' => __('Enable filmstrip in lightbox', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'hide_ids' => array('0' => 'popup_filmstrip_height'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
283
+ 'popup_filmstrip_height' => array('switched' => 'off', 'disabled' => array('text' => __("This Feature is Available Only in PRO version", "wd-instagram-feed")), 'name' => 'popup_filmstrip_height', 'title' => __('Filmstrip size', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'label' => array('text' => 'px', 'place' => 'after'), 'tooltip' => '', 'attr' => array(array('name' => 'class', 'value' => 'small_input'), array('name' => 'tab', 'value' => 'lightbox_settings'))),
284
+ 'autohide_lightbox_navigation' => array('name' => 'autohide_lightbox_navigation', 'title' => __('Show Next / Previous Buttons', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('On Hover', "wd-instagram-feed"), '0' => __('Always', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
285
+ 'popup_info_always_show' => array('disabled_options' => array('1' => '', '0' => ''), 'name' => 'popup_info_always_show', 'title' => __('Display info by default', "wd-instagram-feed"), 'type' => 'radio', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This Feature is Available Only in PRO version", "wd-instagram-feed"), 'br' => 'true'), 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
286
+ 'popup_info_full_width' => array('disabled_options' => array('1' => '', '0' => ''), 'name' => 'popup_info_full_width', 'title' => __('Full width info', "wd-instagram-feed"), 'type' => 'radio', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This Feature is Available Only in PRO version", "wd-instagram-feed"), 'br' => 'true'), 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
287
+ 'enable_loop' => array('name' => 'enable_loop', 'title' => __('Enable Loop', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
288
+ 'popup_image_right_click' => array('name' => 'popup_image_right_click', 'title' => __('Enable Right Click Protection', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
289
+ 'popup_enable_ctrl_btn' => array('name' => 'popup_enable_ctrl_btn', 'title' => __('Enable control buttons', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'hide_ids' => array('0' => 'popup_enable_info,popup_enable_fullscreen,popup_enable_info,popup_enable_comment,popup_enable_download,popup_enable_share_buttons,popup_enable_fullsize_image'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
290
+ 'popup_enable_info' => array('disabled_options' => array('1' => '', '0' => ''), 'name' => 'popup_enable_info', 'title' => __('Enable info', "wd-instagram-feed"), 'type' => 'radio', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This Feature is Available Only in PRO version", "wd-instagram-feed"), 'br' => 'true'), 'valid_options' => array('1' => 'Yes', '0' => 'No'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
291
+ 'popup_enable_fullscreen' => array('name' => 'popup_enable_fullscreen', 'title' => __('Enable fullscreen', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
292
+ 'popup_enable_comment' => array('switched' => 'off', 'disabled_options' => array('1' => '', '0' => ''), 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This Feature is Available Only in PRO version", "wd-instagram-feed"), 'br' => 'true'), 'name' => 'popup_enable_comment', 'title' => __('Enable comments', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
293
+ 'popup_enable_fullsize_image' => array('name' => 'popup_enable_fullsize_image', 'title' => __('Link To Instagram Button', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
294
+ 'popup_enable_download' => array('name' => 'popup_enable_download', 'title' => __('Enable Download Button', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
295
+ 'popup_enable_share_buttons' => array('disabled_options' => array('1' => '', '0' => ''), 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This Feature is Available Only in PRO version", "wd-instagram-feed"), 'br' => 'true'), 'name' => 'popup_enable_share_buttons', 'title' => __('Enable Share Buttons', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
296
+ 'popup_enable_facebook' => array('status' => 'disabled', 'name' => 'popup_enable_facebook', 'title' => __('Enable Facebook button', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
297
+ 'popup_enable_twitter' => array('status' => 'disabled', 'name' => 'popup_enable_twitter', 'title' => __('Enable Twitter button', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
298
+ 'popup_enable_google' => array('status' => 'disabled', 'name' => 'popup_enable_google', 'title' => __('Enable Google+ button', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
299
+ 'popup_enable_pinterest' => array('status' => 'disabled', 'name' => 'popup_enable_pinterest', 'title' => __('Enable Pinterest button', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
300
+ 'popup_enable_tumblr' => array('status' => 'disabled', 'name' => 'popup_enable_tumblr', 'title' => __('Enable Tumblr button', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
301
+ 'show_image_counts' => array('status' => 'disabled', 'name' => 'show_image_counts', 'title' => __('Show Images Count', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
302
 
303
  //filters
304
+ 'conditional_filter_enable' => array('name' => 'conditional_filter_enable', 'title' => __('Enable Conditional Filters', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'conditional_filters'))),
305
+ 'conditional_filter_type' => array('name' => 'conditional_filter_type', 'title' => __('Filter Logic', "wd-instagram-feed"), 'type' => 'select', 'label' => array('text' => '', 'place' => 'after'), 'valid_options' => array('AND' => 'AND', 'OR' => 'OR', 'NOR' => 'NOR'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'conditional_filters'))),
306
+ );
307
+ $return = array('elements' => $elements, 'current_id' => $current_id);
308
  return $return;
309
+ }
310
 
311
 
312
+ public function genarateFeedViews()
313
+ {
314
+ ?>
315
+ <div class="wdi_border_wrapper">
316
 
317
 
318
+ <div class="display_type" tab="feed_settings" style="margin:5px;float:left;">
319
+ <div style="text-align:center;padding:2px;"><input type="radio" id="thumbnails" name="feed_type"
320
+ value="thumbnails"><label for="thumbnails">Thumbnails</label>
321
  </div>
322
+ <label for="thumbnails"><img src="<?php echo plugins_url('../../images/feed_views/thumbnails.png', __FILE__); ?>"></label>
323
+ </div>
324
 
325
+ <div class="display_type wdi_tooltip" wdi-tooltip="<?php _e('Available In Pro Version') ?>" tab="feed_settings"
326
+ style="margin:5px;float:left;">
327
+ <div style="text-align:center;padding:2px;"><input type="radio" disabled id="masonry" name="feed_type"
328
+ value="masonry"><label for="masonry" class="wdi_pro_only">Masonry</label>
329
  </div>
330
+ <label for="masonry" class="wdi_pro_only_op"><img
331
+ src="<?php echo plugins_url('../../images/feed_views/masonry.png', __FILE__); ?>"></label>
332
+ </div>
333
 
334
+ <div class="display_type wdi_tooltip" wdi-tooltip="<?php _e('Available In Pro Version') ?>" tab="feed_settings"
335
+ style="margin:5px;float:left;">
336
+ <div style="text-align:center;padding:2px;"><input disabled type="radio" id="blog_style" name="feed_type"
337
+ value="blog_style"><label for="blog_style"
338
+ class="wdi_pro_only">Blog
339
+ Style</label></div>
340
+ <label for="blog_style" class="wdi_pro_only_op"><img
341
+ src="<?php echo plugins_url('../../images/feed_views/blog_style.png', __FILE__); ?>"></label>
342
+ </div>
343
 
344
+ <div class="display_type" tab="feed_settings" style="margin:5px;float:left;">
345
+ <div style="text-align:center;padding:2px;"><input type="radio" id="image_browser" name="feed_type"
346
+ value="image_browser"><label for="image_browser">Image
347
+ Browser</label></div>
348
+ <label for="image_browser"><img
349
+ src="<?php echo plugins_url('../../images/feed_views/image_browser.png', __FILE__); ?>"></label>
350
+ </div>
351
 
352
+ <br class="wdi_clear">
353
  <?php
354
+ }
355
+ public function generateTabs()
356
+ {
357
+ ?>
358
+ <div id="wdi_feed_tabs">
359
+ <div class="wdi_feed_tabs" id="wdi_feed_settings"
360
+ onclick="wdi_controller.switchFeedTabs('feed_settings');"><?php _e('Feed Settings', "wd-instagram-feed") ?></div>
361
+ <div class="wdi_feed_tabs" id="wdi_lightbox_settings"
362
+ onclick="wdi_controller.switchFeedTabs('lightbox_settings');"><?php _e('Lightbox Settings', "wd-instagram-feed") ?></div>
363
+ <div class="wdi_feed_tabs" id="wdi_conditional_filters"
364
+ onclick="wdi_controller.switchFeedTabs('conditional_filters');"><?php _e('Conditional Filters', "wd-instagram-feed") ?></div>
365
+ <br class="wdi_clear">
366
+ </div>
367
+ <?php
368
+ }
369
+ public function generateForm($current_id = ''){
370
+ $formInfo = $this->getFormElements($current_id);
371
+ $elements = $formInfo['elements'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
372
 
373
+ global $wdi_options;
374
+ //for edit
375
+ $edit = false;
376
+ if ($current_id != '') {
377
+ $feed_row = WDILibrary::objectToarray($this->model->get_feed_row($current_id));
378
+ $edit = true;
379
+ }
380
+ else {
381
+ $feed_row = '';
382
+ }
383
+ ?>
384
+ <div class="update-nag wdi_help_bar_wrap">
385
+ <span class="wdi_help_bar_text">
386
+ <?php _e('Here You Can Change Feed Parameters.', "wd-instagram-feed"); ?>
387
+ <a class="wdi_hb_t_link" target="_blank"
388
+ href="https://web-dorado.com/wordpress-instagram-feed-wd/creating-feeds.html"><?php _e('Read More in User Guide', "wd-instagram-feed"); ?></a>
389
+ </span>
390
+ <div class="wdi_hb_buy_pro">
391
+ <a target="_blank" href="https://web-dorado.com/products/wordpress-instagram-feed-wd.html">
392
+ <img alt="web-dorado.com" title="UPGRADE TO PAID VERSION"
393
+ src="<?php echo WDI_URL . '/images/wd-logo.png'; ?>">
394
+ <span><?php _e('Upgrade to paid version', "wd-instagram-feed"); ?></span>
395
+ </a>
396
+ </div>
397
+ </div>
398
  <div class="wrap">
399
+ <h2><?php if ($edit == true && isset($feed_row['feed_name'])) {
400
+ echo __('Edit feed', "wd-instagram-feed") . ' <b style="font-size:23px;color:rgb(255, 97, 0);">' . $feed_row['feed_name'] . '</b>';
401
+ }
402
+ else {
403
+ _e('Add new Feed', "wd-instagram-feed");
404
+ } ?>
405
+
406
+
407
+ </h2>
408
+ <?php $this->generateTabs(); ?>
409
+ <?php $this->genarateFeedViews(); ?>
410
+ <form method="post" action="admin.php?page=wdi_feeds" id='wdi_save_feed'>
411
+ <?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
412
+ <input type="hidden" id="wdi_feed_type" name='<?php echo WDI_FSN . '[feed_type]' ?>'>
413
+ <input type="hidden" id="task" name='task'>
414
+ <input type="hidden" id="wdi_feed_thumb" name="<?php echo WDI_FSN . '[feed_thumb]' ?>">
415
+ <input type="hidden" id="wdi_access_token" name="access_token"
416
+ value="<?php echo $wdi_options['wdi_access_token']; ?>">
417
+ <input type="hidden" id="wdi_add_or_edit" name="add_or_edit" value="<?php echo $current_id; ?>">
418
+ <input type="hidden" id="wdi_thumb_user"
419
+ value="<?php echo isset($feed_row['thumb_user']) ? $feed_row['thumb_user'] : $wdi_options['wdi_user_name']; ?>">
420
+ <input type="hidden" id="wdi_default_user" value="<?php echo $wdi_options['wdi_user_name']; ?>">
421
+ <input type="hidden" id="wdi_default_user_id" value="<?php echo $wdi_options['wdi_user_id']; ?>">
422
+ <input type="hidden" name="<?php echo WDI_FSN . '[published]' ?>"
423
+ value="<?php echo isset($feed_row['published']) ? $feed_row['published'] : '1'; ?>">
424
+ <input type="hidden" id="wdi_current_id" name="current_id" value=''>
425
+ <input type="hidden" id="wdi_refresh_tab" name="wdi_refresh_tab">
426
+ <table class="form-table">
427
+ <tbody>
428
  <?php
429
  foreach ($elements as $element) {
430
+ if ($element['name'] == 'conditional_filter_enable') {
 
 
 
 
 
 
 
 
431
  continue;
432
+ }
433
 
434
+ if ($element['name'] == 'conditional_filter_type') {
435
+ ?>
436
+
437
+ <div id="wdi-conditional-filters-ui" class="wdi_demo_img">
438
+ <div
439
+ class="wdi_pro_notice"> <?php _e("This is FREE version, Conditional filters are available only in PRO version", "wd-instagram-feed"); ?> </div>
440
+ <div class="wdi-pro-overlay"><img src="<?php echo WDI_URL . '/demo_images/filters.png'; ?>" alt=""></div>
441
+ </div><?php
442
+ continue;
443
+ }
444
+
445
+ if (isset($element['status'])) {
446
+ if ($element['status'] == 'disabled') {
447
+ continue;
448
  }
449
  }
450
  ?>
451
 
452
+
453
+
454
 
455
  <tr>
456
+ <th scope="row"><a
457
+ href="#" <?php echo ($element['tooltip'] != '' && isset($element['tooltip'])) ? 'class="wdi_tooltip" wdi-tooltip="' . $element['tooltip'] . '"' : 'class="wdi_settings_link"'; ?> ><?php echo $element['title']; ?></a>
458
+ </th>
459
+ <td>
460
+
461
+ <?php $this->buildField($element, $feed_row); ?>
462
+ <!-- FEED USERS -->
463
+ <?php if ($element['name'] == 'feed_users'): ?>
464
+ <input type="text" id="wdi_add_user_ajax_input">
465
+ <div id="wdi_add_user_ajax" class="button"><?php _e('Add', "wd-instagram-feed"); ?></div>
466
+ <div id="wdi_feed_users">
467
+ <?php $this->display_feed_users($feed_row); ?>
468
+ </div>
469
+ <?php endif; ?>
470
+ <!-- END FEED USERS -->
471
+
472
+
473
+ </td>
474
+ </tr><?php
475
 
476
  }
477
  ?>
478
+ </tbody>
479
+ </table>
480
+ <div id="wdi_save_feed_submit" class="button button-primary"><?php _e('Save', "wd-instagram-feed"); ?></div>
481
+
482
  <div id="wdi_save_feed_apply" class="button button-primary"><?php _e('Apply', "wd-instagram-feed"); ?></div>
483
+ <div id="wdi_save_feed_reset" style="display:none"
484
+ class="button button-secondary"><?php _e('Reset', "wd-instagram-feed"); ?></div>
485
  <div id="wdi_cancel_changes" class="button button-secondary"><?php _e('Cancel', "wd-instagram-feed"); ?></div>
486
+ </form>
 
487
  </div>
488
+ </div>
489
  <?php
490
  }
491
+ private function buildField($element, $feed_row = '')
492
+ {
493
+ require_once(WDI_DIR . '/framework/WDI_form_builder.php');
494
+ $element['defaults'] = $this->model->wdi_get_feed_defaults();
495
+ $element['CONST'] = WDI_FSN;
496
+ $builder = new WDI_form_builder();
497
+ switch ($element['type']) {
498
+ case 'input': {
499
+ $builder->input($element, $feed_row);
500
+ break;
501
+ }
502
+ case 'select': {
503
+ $builder->select($element, $feed_row);
504
+ break;
505
+ }
506
+ case 'radio': {
507
+ $builder->radio($element, $feed_row);
508
+ break;
509
+ }
510
+ case 'checkbox': {
511
+ $builder->checkbox($element, $feed_row);
512
+ break;
513
+ }
514
  }
515
  }
 
516
 
517
 
518
+ public function display_feed_users($feed_row)
519
+ {
520
+ global $wdi_options;
521
 
522
+ $users = isset($feed_row['feed_users']) ? $feed_row['feed_users'] : "";
 
 
 
 
 
 
 
523
 
524
+ $users = json_decode($users);
525
+ if ($users === null) {
526
+ $users = array();
527
+ }
528
+
529
+
530
+ ?>
531
+ <script>
532
+ jQuery(document).ready(function ()
533
+ {
534
+ wdi_controller.instagram = new WDIInstagram();
535
+ wdi_controller.feed_users = [];
536
+ wdi_controller.instagram.addToken(<?php echo '"' . $wdi_options['wdi_access_token'] . '"'; ?>);
537
+
538
+ wdi_controller.updateFeaturedImageSelect(<?php echo '"' . $wdi_options['wdi_user_name'] . '"'; ?>, 'add', 'selected');
539
+
540
+ <?php foreach ($users as $user) : ?>
541
+ wdi_controller.makeInstagramUserRequest(<?php echo '"' . $user->username . '"'?>, true);
542
+ <?php endforeach; ?>
543
+ });
544
+ </script>
545
+ <?php
546
+
547
+ }
548
 
549
 
550
  }
admin/views/WDIViewLicensing_wdi.php CHANGED
@@ -24,9 +24,16 @@ class WDIViewLicensing_wdi {
24
  ////////////////////////////////////////////////////////////////////////////////////////
25
  public function display() {
26
  ?>
27
- <div class="wdi_help_bar_wrap">
28
- <a class="wdi_hb_buy_pro" target="_blank" href="https://web-dorado.com/products/wordpress-instagram-feed-wd.html"><?php _e('Upgrade to Pro Version', "wd-instagram-feed"); ?></a>
 
 
 
 
 
 
29
  </div>
 
30
  <div id="featurs_tables">
31
  <div id="featurs_table1">
32
  <span>WordPress 4.0+ <?php _e("ready", 'wd-instagram-feed'); ?></span>
24
  ////////////////////////////////////////////////////////////////////////////////////////
25
  public function display() {
26
  ?>
27
+ <div class="update-nag wdi_help_bar_wrap">
28
+ <div class="wdi_hb_buy_pro">
29
+ <a target="_blank" href="https://web-dorado.com/products/wordpress-instagram-feed-wd.html">
30
+ <img alt="web-dorado.com" title="UPGRADE TO PAID VERSION"
31
+ src="<?php echo WDI_URL . '/images/wd-logo.png'; ?>">
32
+ <span><?php _e('Upgrade to paid version', "wd-instagram-feed"); ?></span>
33
+ </a>
34
+ </div>
35
  </div>
36
+
37
  <div id="featurs_tables">
38
  <div id="featurs_table1">
39
  <span>WordPress 4.0+ <?php _e("ready", 'wd-instagram-feed'); ?></span>
admin/views/WDIViewSettings_wdi.php CHANGED
@@ -43,11 +43,19 @@ private $model;
43
  <?php
44
  }
45
  ?>
46
- <div class="wdi_help_bar_wrap">
47
- <span class="wdi_help_bar_text"><?php _e('This section allows you to set API parameters', "wd-instagram-feed"); ?></span>
48
- <a class="wdi_hb_t_link" target="_blank" href="https://web-dorado.com/wordpress-instagram-feed-wd/installation-and-configuration/getting-access-token.html"><?php _e('Read More in User Guide', "wd-instagram-feed"); ?></a>
49
- <a class="wdi_hb_buy_pro" target="_blank" href="https://web-dorado.com/products/wordpress-instagram-feed-wd.html"><?php _e('Upgrade to Pro Version', "wd-instagram-feed"); ?></a>
50
- <a class="wdi_hb_s_link" target="_blank" href="https://wordpress.org/support/plugin/wd-instagram-feed"><img src="<?php echo WDI_URL; ?>/images/i_support.png"><span class="wdi_hb_s_text"><?php _e('Support Forum', "wd-instagram-feed"); ?></span></a>
 
 
 
 
 
 
 
 
51
  </div>
52
 
53
  <h1 id="settings_wdi_title"><?php _e('Instagram WD Settings', "wd-instagram-feed"); ?></h1>
43
  <?php
44
  }
45
  ?>
46
+ <div class="update-nag wdi_help_bar_wrap">
47
+ <span class="wdi_help_bar_text">
48
+ <?php _e('This section allows you to set API parameters.', "wd-instagram-feed"); ?>
49
+ <a class="wdi_hb_t_link" target="_blank"
50
+ href="https://web-dorado.com/wordpress-instagram-feed-wd/installation-and-configuration/getting-access-token.html"><?php _e('Read More in User Guide', "wd-instagram-feed"); ?></a>
51
+ </span>
52
+ <div class="wdi_hb_buy_pro">
53
+ <a target="_blank" href="https://web-dorado.com/products/wordpress-instagram-feed-wd.html">
54
+ <img alt="web-dorado.com" title="UPGRADE TO PAID VERSION"
55
+ src="<?php echo WDI_URL . '/images/wd-logo.png'; ?>">
56
+ <span><?php _e('Upgrade to paid version', "wd-instagram-feed"); ?></span>
57
+ </a>
58
+ </div>
59
  </div>
60
 
61
  <h1 id="settings_wdi_title"><?php _e('Instagram WD Settings', "wd-instagram-feed"); ?></h1>
admin/views/WDIViewThemes_wdi.php CHANGED
@@ -24,12 +24,22 @@ class WDIViewThemes_wdi {
24
  public function display() {
25
 
26
  ?>
27
- <div class="wdi_help_bar_wrap">
28
- <span class="wdi_help_bar_text"><?php _e('This section allows you to create, edit and delete Themes', "wd-instagram-feed"); ?></span>
29
- <a class="wdi_hb_t_link" target="_blank" href="https://web-dorado.com/wordpress-instagram-feed-wd/editing-themes.html"><?php _e('Read More in User Guide', "wd-instagram-feed"); ?></a>
30
- <a class="wdi_hb_buy_pro" target="_blank" href="https://web-dorado.com/products/wordpress-instagram-feed-wd.html"><?php _e('Upgrade to Pro Version', "wd-instagram-feed"); ?></a>
31
- <a class="wdi_hb_s_link" target="_blank" href="https://wordpress.org/support/plugin/wd-instagram-feed"><img src="<?php echo WDI_URL; ?>/images/i_support.png"><span class="wdi_hb_s_text"><?php _e('Support Forum', "wd-instagram-feed"); ?></span></a>
 
 
 
 
 
 
 
 
32
  </div>
 
 
33
  <div class="wdi_pro_notice"> <?php _e("This is FREE version, Customizing themes is available only in PRO version","wd-instagram-feed"); ?> </div>
34
 
35
 
24
  public function display() {
25
 
26
  ?>
27
+ <div class="update-nag wdi_help_bar_wrap">
28
+ <span class="wdi_help_bar_text">
29
+ <?php _e('This section allows you to create, edit and delete Themes.', "wd-instagram-feed"); ?>
30
+ <a class="wdi_hb_t_link" target="_blank"
31
+ href="https://web-dorado.com/wordpress-instagram-feed-wd/editing-themes.html"><?php _e('Read More in User Guide', "wd-instagram-feed"); ?></a>
32
+ </span>
33
+ <div class="wdi_hb_buy_pro">
34
+ <a target="_blank" href="https://web-dorado.com/products/wordpress-instagram-feed-wd.html">
35
+ <img alt="web-dorado.com" title="UPGRADE TO PAID VERSION"
36
+ src="<?php echo WDI_URL . '/images/wd-logo.png'; ?>">
37
+ <span><?php _e('Upgrade to paid version', "wd-instagram-feed"); ?></span>
38
+ </a>
39
+ </div>
40
  </div>
41
+
42
+
43
  <div class="wdi_pro_notice"> <?php _e("This is FREE version, Customizing themes is available only in PRO version","wd-instagram-feed"); ?> </div>
44
 
45
 
changelog.txt DELETED
@@ -1,151 +0,0 @@
1
- = 1.1.27 =
2
- Fixed: Overriding window.onload function
3
- Changed: Some strings on frontend are translatable now
4
-
5
- = 1.1.26 =
6
- Fixed: Conflict with Beaver Builder
7
- Fixed: Frontend error messages in old Chrome and Safari browsers
8
- Changed: Translations hosted on WordPress.org
9
-
10
- = 1.1.25 =
11
- New: UX improvements: when authorizing and editing feeds
12
- Changed: JavaScript error notices on frontend
13
- Fixed: Updates page restored (PRO)
14
- Fixed: Deactivation popup in uninstall page (PRO)
15
- Fixed: Subscribe after uninstall
16
-
17
- = 1.1.24 =
18
- New: Overview page
19
- Changed: Deactivation
20
-
21
- = 1.1.23 =
22
- Fixed: cropping of "landscape" images in thumbnails layout
23
-
24
- = 1.1.22 =
25
- New: message displayed on frontend if feed has no media
26
- Fixed: JS errors for media with Instagram's new "Slideshow" feature. This feature is not supported by Instagram's API yet.
27
- Changed: Errors by plugin and Instagram API are alerted in frontend only for admins, otherwise output the message to the Web Console
28
- 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.
29
- Changed: Minor style conflicts fixed
30
-
31
- = 1.1.21 =
32
- New: Three new plugins added to featured plugins list: Ad Manager WD, Youtube WD and Staff Team WD
33
- Fixed: Colors and opacities of share buttons in lightbox (PRO)
34
-
35
- = 1.1.20 =
36
- New: Instagram feed displayed in AJAX-loaded content. AJAX request callback needs to call wp_footer() in the end.
37
-
38
- = 1.1.19 =
39
- Fixed: Strange bug in Instagram API when user feed pagination is null, causing JS errors in frontend
40
-
41
- = 1.1.18 =
42
- Fixed: Frontend filter colors (PRO)
43
- Changed: Featured plugins, brand new Mailchimp Forms WD plugin added
44
-
45
- = 1.1.17 =
46
- New: Option in feed settings to show small size images and low-bandwidth videos when viewed in mobile devices
47
- Fixed: Escaping in custom JS
48
- Change: WP 4.7 compatibility - language of frontend content in AJAX response
49
-
50
- = 1.1.16 =
51
- Fixed: Unicode "paragraph separator" symbol in media caption crashes lightbox
52
- Fixed: Javascript error in admin feed page and styling issue in lightbox because of some non-standard themes
53
-
54
- = 1.1.15 =
55
- New: Show hashtag media number in header
56
- Fixed: Scripts dependency on underscore.js
57
- Fixed: Compatibility issues with Yoast SEO
58
-
59
- = 1.1.14 =
60
- Fixed: Single user bio not shown
61
- Changed: Plugin logo
62
- Changed: Featured plugins logos
63
-
64
- = 1.1.13 =
65
- Fixed: Changes in database after plugin version update via FTP or AJAX requests with silent activation
66
-
67
- = 1.1.12 =
68
- New: Feed based on liked media (Pro)
69
- Fixed: Hidden media in last page
70
- Fixed: Minor issues
71
-
72
- = 1.1.11 =
73
- Added: Setting to show media descriptions in widget mode (Pro)
74
- Fixed: Untranslatable strings in widget editor
75
- Change: Featured plugins list
76
-
77
- = 1.1.10 =
78
- Added: New text in uninstall page
79
- Added: Featured plugins admin page
80
- Fixed: Video not centering issue on blogstyle
81
- Added: Swedish translations
82
-
83
- = 1.1.9 =
84
- New: Option to set minimal user role for adding and managing feeds and themes
85
- Fixed: Masonry feed thumbnails overlay opacity (Pro)
86
-
87
- = 1.1.8 =
88
- Changed: Font-Awesome updated to version 4.6.3
89
-
90
- = 1.1.7 =
91
- New: Featured themes admin page
92
- Fixed: Javascript error in hashtag feed
93
-
94
- = 1.1.6 =
95
- Change: Added compatibility with "All in one SEO pack" and other plugins running shortcodes in page head
96
-
97
- = 1.1.5 =
98
- Fixed: javascript error on firefox and safari
99
-
100
- = 1.1.4 =
101
- Fixed: Error handling in case of wrong access_token
102
- Fixed: Image description not opening after pagination (Pro)
103
- Fixed: Do not show load more button if feed media are finished
104
- Fixed: Infinite scroll triggering bug (Pro)
105
-
106
- = 1.1.3 =
107
- New: French translation (Thanks to Guillaume Barjou)
108
- New: English US and UK translation files. Edit them to change default strings
109
- Fixed: Image sizes and overwflows in thumbnails layout
110
- Fixed: Lightbox filmstrip thumb styles (Pro)
111
-
112
- = 1.1.2 =
113
- Fixed: Bug when saving theme data to some MySQL 5.6 databases
114
- Changed: Pagination of hashtag feeds restored
115
- Changed: Check and get user id on frontend if empty for some unknown reason
116
-
117
- = 1.1.1 =
118
- fix: bug when duplicating feeds
119
-
120
- = 1.1.0 =
121
- new: Instagram new API
122
- new: Spanish translation (Thanks to Alexandro Lacadena Gomez)
123
-
124
- = 1.0.10 =
125
- Temporarily disable pagination in hashtag based feeds
126
- Updated Russian Translations ( Thanks to Alex Petrin )
127
-
128
- = 1.0.9 =
129
- Bug fixes
130
-
131
- = 1.0.8 =
132
- Show video play button when redirect is enabled
133
-
134
- = 1.0.7 =
135
- new: Image Hover Effects
136
-
137
- = 1.0.6 =
138
- new: Conditional Filters (Pro)
139
- new: Option for displaying username in masonry/thumbnails view (Pro)
140
- new: Russian translation (Thanks to Ruslan Tertyshny).
141
-
142
- = 1.0.2 =
143
- fix: PHP error after plugin update
144
-
145
- = 1.0.1 =
146
- fix: PHP 5.3 compatibility
147
- fix: video redirect bug
148
- change: user info styles
149
-
150
- = 1.0.0 =
151
- Initial version
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/wdi_backend.css CHANGED
@@ -345,57 +345,51 @@ padding: 5px;
345
  }
346
 
347
 
348
- .wdi_help_bar_wrap{
349
- clear: both;
350
- float: left;
351
- width: 99%;
352
  background-color: #ffffff;
353
- padding: 12px 10px 8px;
354
  box-sizing: border-box;
355
- margin-bottom: 12px;
356
- margin-top:5px;
357
-
358
- -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
359
- -moz-box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
360
- box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
361
- }
362
-
363
- .wdi_help_bar_wrap > *{
364
- display: block;
365
- min-height:25px;
366
- }
367
- .wdi_help_bar_wrap * {
368
- font-size: 16px !important;
369
  }
370
-
371
  .wdi_help_bar_text{
372
  float:left;
373
- padding:0 6px;
374
- }
375
- .wdi_hb_t_link{
376
- float: left;
377
- color: #00a0d2;
378
- text-decoration: underline;
379
  }
380
- .wdi_hb_s_link{
381
- float: right;
 
382
  }
383
- .wdi_hb_s_text{
384
- display: block;
385
- float: right;
386
- padding-top: 2px;
387
  }
388
 
389
- .wdi_hb_buy_pro{
390
- color: #ffffff;
391
- background-color: #45A6B7;
392
- float: right;
393
- margin: -2px 0 0 10px;
394
- padding: 2px 7px 0;
 
 
 
 
 
 
 
395
  text-decoration: none;
396
- border-radius: 3px;
397
- }
398
- .wdi_hb_buy_pro:hover {
399
- color: #ffffff;
400
- background-color: #008EC2;
401
  }
 
 
 
 
 
 
 
345
  }
346
 
347
 
348
+ .wdi_help_bar_wrap {
 
 
 
349
  background-color: #ffffff;
350
+ border: none;
351
  box-sizing: border-box;
352
+ clear: both;
353
+ color: #6e7990;
354
+ font-size: 14px;
355
+ font-weight: bold;
356
+ line-height: 44px;
357
+ padding: 0 0 0 15px;
358
+ vertical-align: middle;
359
+ width: 98%;
 
 
 
 
 
 
360
  }
 
361
  .wdi_help_bar_text{
362
  float:left;
 
 
 
 
 
 
363
  }
364
+ .wdi_help_bar_text > a{
365
+ color:#0073aa;
366
+ text-decoration: none;
367
  }
368
+ .wdi_hb_buy_pro{
369
+ float:right;
370
+ padding:0;
 
371
  }
372
 
373
+ .wdi_hb_buy_pro a,
374
+ .wdi_hb_buy_pro a:active,
375
+ .wdi_hb_buy_pro a:visited,
376
+ .wdi_hb_buy_pro a:hover {
377
+ background-color: #D8D8D8;
378
+ color: #175c8b;
379
+ display: inline-block;
380
+ font-size: 11px;
381
+ font-weight: bold;
382
+ padding: 0 10px;
383
+ vertical-align: middle;
384
+ border: none;
385
+ box-shadow: none !important;
386
  text-decoration: none;
387
+ text-transform: uppercase;
 
 
 
 
388
  }
389
+
390
+
391
+ .wdi_hb_buy_pro img {
392
+ border: none;
393
+ display: inline-block;
394
+ vertical-align: middle;
395
+ }
css/wdi_licensing.css CHANGED
@@ -157,6 +157,3 @@ span.no {
157
  color: #F47629;
158
  }
159
 
160
- .wdi_hb_buy_pro{
161
- float: left !important;
162
- }
157
  color: #F47629;
158
  }
159
 
 
 
 
frontend/shortcode.php CHANGED
@@ -191,8 +191,8 @@ function wdi_front_end_scripts()
191
  }
192
  */
193
  // Styles/Scripts for popup.
194
- wp_enqueue_script('wdi_jquery_mobile', WDI_FRONT_URL . '/js/gallerybox/jquery.mobile.js', array('jquery'), WDI_VERSION);
195
- wp_enqueue_script('wdi_mCustomScrollbar', WDI_FRONT_URL . '/js/gallerybox/jquery.mCustomScrollbar.concat.min.js', array('jquery'), WDI_VERSION);
196
  wp_enqueue_style('wdi_mCustomScrollbar', WDI_FRONT_URL . '/css/gallerybox/jquery.mCustomScrollbar.css', array(), WDI_VERSION);
197
  wp_enqueue_script('jquery-fullscreen', WDI_FRONT_URL . '/js/gallerybox/jquery.fullscreen-0.4.1.js', array('jquery'), WDI_VERSION);
198
  /*ttt!!! gallery fullscreeni het conflict chka ?? arje stugel ete fullscreen script ka, apa el chavelacnel*/
@@ -242,8 +242,8 @@ function wdi_load_frontend_scripts_styles_ajax()
242
  ), WDI_VERSION);
243
 
244
  // Styles/Scripts for popup.
245
- wp_enqueue_script('wdi_jquery_mobile', WDI_FRONT_URL . '/js/gallerybox/jquery.mobile.js', array(), WDI_VERSION);
246
- wp_enqueue_script('wdi_mCustomScrollbar', WDI_FRONT_URL . '/js/gallerybox/jquery.mCustomScrollbar.concat.min.js', array(), WDI_VERSION);
247
  wp_enqueue_style('wdi_mCustomScrollbar', WDI_FRONT_URL . '/css/gallerybox/jquery.mCustomScrollbar.css', array(), WDI_VERSION);
248
  wp_enqueue_script('jquery-fullscreen', WDI_FRONT_URL . '/js/gallerybox/jquery.fullscreen-0.4.1.js', array(), WDI_VERSION);
249
  /*ttt!!! gallery fullscreeni het conflict chka ?? arje stugel ete fullscreen script ka, apa el chavelacnel*/
191
  }
192
  */
193
  // Styles/Scripts for popup.
194
+ wp_enqueue_script('jquery-mobile', WDI_FRONT_URL . '/js/gallerybox/jquery.mobile.js', array('jquery'), WDI_VERSION);
195
+ wp_enqueue_script('jquery-mCustomScrollbar', WDI_FRONT_URL . '/js/gallerybox/jquery.mCustomScrollbar.concat.min.js', array('jquery'), WDI_VERSION);
196
  wp_enqueue_style('wdi_mCustomScrollbar', WDI_FRONT_URL . '/css/gallerybox/jquery.mCustomScrollbar.css', array(), WDI_VERSION);
197
  wp_enqueue_script('jquery-fullscreen', WDI_FRONT_URL . '/js/gallerybox/jquery.fullscreen-0.4.1.js', array('jquery'), WDI_VERSION);
198
  /*ttt!!! gallery fullscreeni het conflict chka ?? arje stugel ete fullscreen script ka, apa el chavelacnel*/
242
  ), WDI_VERSION);
243
 
244
  // Styles/Scripts for popup.
245
+ wp_enqueue_script('jquery-mobile', WDI_FRONT_URL . '/js/gallerybox/jquery.mobile.js', array(), WDI_VERSION);
246
+ wp_enqueue_script('jquery-mCustomScrollbar', WDI_FRONT_URL . '/js/gallerybox/jquery.mCustomScrollbar.concat.min.js', array(), WDI_VERSION);
247
  wp_enqueue_style('wdi_mCustomScrollbar', WDI_FRONT_URL . '/css/gallerybox/jquery.mCustomScrollbar.css', array(), WDI_VERSION);
248
  wp_enqueue_script('jquery-fullscreen', WDI_FRONT_URL . '/js/gallerybox/jquery.fullscreen-0.4.1.js', array(), WDI_VERSION);
249
  /*ttt!!! gallery fullscreeni het conflict chka ?? arje stugel ete fullscreen script ka, apa el chavelacnel*/
images/wd-logo.png ADDED
Binary file
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: webdorado, progmastery
3
  Donate link: https://web-dorado.com/products/wordpress-instagram-feed-wd.html
4
  Tags: custom instagram feed, feed, instagram, hashtag, Instagram feed, instagram gallery, instagram posts, Instagram images, Instagram photos, lightbox, photos,instagram account
5
  Requires at least: 3.9
6
- Tested up to: 4.7.4
7
- Stable tag: 1.1.27
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -110,6 +110,9 @@ After downloading the ZIP file of the Instagram Feed WD plugin,
110
 
111
  == Changelog ==
112
 
 
 
 
113
  = 1.1.27 =
114
  Fixed: Overriding window.onload function
115
  Changed: Some strings on frontend are translatable now
3
  Donate link: https://web-dorado.com/products/wordpress-instagram-feed-wd.html
4
  Tags: custom instagram feed, feed, instagram, hashtag, Instagram feed, instagram gallery, instagram posts, Instagram images, Instagram photos, lightbox, photos,instagram account
5
  Requires at least: 3.9
6
+ Tested up to: 4.7
7
+ Stable tag: 1.1.28
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
110
 
111
  == Changelog ==
112
 
113
+ = 1.1.28 =
114
+ Fixed: Conflict with some themes
115
+
116
  = 1.1.27 =
117
  Fixed: Overriding window.onload function
118
  Changed: Some strings on frontend are translatable now
wd-instagram-feed.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Instagram Feed WD
4
  Plugin URI: https://web-dorado.com/products/wordpress-instagram-feed-wd.html
5
  Description: WD Instagram Feed is a user-friendly tool for displaying user or hashtag-based feeds on your website. You can create feeds with one of the available layouts. It allows displaying image metadata, open up images in lightbox, download them and even share in social networking websites.
6
- Version: 1.1.27
7
  Author: WebDorado
8
  Author URI: https://web-dorado.com
9
  License: GPLv2 or later
@@ -21,7 +21,7 @@ define("WDI_META", "_".WDI_VAR."_meta");
21
  //define("wdi",'wdi');
22
  define('WDI_FEED_TABLE','wdi_feeds');
23
  define('WDI_THEME_TABLE','wdi_themes');
24
- define('WDI_VERSION','1.1.27');
25
  define('WDI_IS_PRO','false');
26
 
27
 
@@ -182,7 +182,7 @@ function WDI_instagram_menu() {
182
  add_submenu_page($parent_slug,__('Settings',"wd-instagram-feed"),__('Settings',"wd-instagram-feed"),'manage_options','wdi_settings','WDI_instagram_settings_page');
183
  //add_submenu_page('overview_wdi',__('Featured Themes',"wd-instagram-feed"),__('Featured Themes',"wd-instagram-feed"),$min_feeds_capability,'wdi_featured_themes','wdi_featured_themes');
184
  //add_submenu_page('overview_wdi',__('Featured Plugins',"wd-instagram-feed"),__('Featured Plugins',"wd-instagram-feed"),$min_feeds_capability,'wdi_featured_plugins','wdi_featured_plugins');
185
- add_submenu_page($parent_slug,__('Upgrade to Pro',"wd-instagram-feed"),__('Upgrade to Pro',"wd-instagram-feed"),$min_feeds_capability,'wdi_licensing','WDI_instagram_licensing_page');
186
  add_submenu_page($parent_slug,__('Uninstall',"wd-instagram-feed"),__('Uninstall',"wd-instagram-feed"),'manage_options','wdi_uninstall','WDI_instagram_uninstall_page');
187
  }
188
 
3
  Plugin Name: Instagram Feed WD
4
  Plugin URI: https://web-dorado.com/products/wordpress-instagram-feed-wd.html
5
  Description: WD Instagram Feed is a user-friendly tool for displaying user or hashtag-based feeds on your website. You can create feeds with one of the available layouts. It allows displaying image metadata, open up images in lightbox, download them and even share in social networking websites.
6
+ Version: 1.1.28
7
  Author: WebDorado
8
  Author URI: https://web-dorado.com
9
  License: GPLv2 or later
21
  //define("wdi",'wdi');
22
  define('WDI_FEED_TABLE','wdi_feeds');
23
  define('WDI_THEME_TABLE','wdi_themes');
24
+ define('WDI_VERSION','1.1.28');
25
  define('WDI_IS_PRO','false');
26
 
27
 
182
  add_submenu_page($parent_slug,__('Settings',"wd-instagram-feed"),__('Settings',"wd-instagram-feed"),'manage_options','wdi_settings','WDI_instagram_settings_page');
183
  //add_submenu_page('overview_wdi',__('Featured Themes',"wd-instagram-feed"),__('Featured Themes',"wd-instagram-feed"),$min_feeds_capability,'wdi_featured_themes','wdi_featured_themes');
184
  //add_submenu_page('overview_wdi',__('Featured Plugins',"wd-instagram-feed"),__('Featured Plugins',"wd-instagram-feed"),$min_feeds_capability,'wdi_featured_plugins','wdi_featured_plugins');
185
+ add_submenu_page($parent_slug,__('Pro Version',"wd-instagram-feed"),__('Pro Version',"wd-instagram-feed"),$min_feeds_capability,'wdi_licensing','WDI_instagram_licensing_page');
186
  add_submenu_page($parent_slug,__('Uninstall',"wd-instagram-feed"),__('Uninstall',"wd-instagram-feed"),'manage_options','wdi_uninstall','WDI_instagram_uninstall_page');
187
  }
188
 
wd/README.md CHANGED
@@ -1,4 +1,4 @@
1
- Version: 1.0.5
2
 
3
 
4
  Usage:
1
+ Version: 1.0.8
2
 
3
 
4
  Usage:
wd/assets/img/{fwd_main_plugin.png → fm_main_plugin.png} RENAMED
File without changes
wd/includes/deactivate.php CHANGED
@@ -108,7 +108,7 @@
108
 
109
  $data["reason"] = isset($_POST[$wd_options->prefix . "_reasons"]) ? $_POST[$wd_options->prefix . "_reasons"] : "";
110
  $data["site_url"] = site_url();
111
- $data["plugin_slug"] = $wd_options->plugin_wordpress_slug;
112
 
113
  $data["additional_details"] = isset($_POST[$wd_options->prefix . "_additional_details"]) ? $_POST[$wd_options->prefix . "_additional_details"] : "";
114
  $admin_data = wp_get_current_user();
108
 
109
  $data["reason"] = isset($_POST[$wd_options->prefix . "_reasons"]) ? $_POST[$wd_options->prefix . "_reasons"] : "";
110
  $data["site_url"] = site_url();
111
+ $data["plugin_id"] = $wd_options->wd_plugin_id;
112
 
113
  $data["additional_details"] = isset($_POST[$wd_options->prefix . "_additional_details"]) ? $_POST[$wd_options->prefix . "_additional_details"] : "";
114
  $admin_data = wp_get_current_user();
wd/wd.php CHANGED
@@ -55,12 +55,10 @@
55
 
56
  $capability = $wd_options->menu_capability ? $wd_options->menu_capability : "manage_options";
57
  if( get_option( $wd_options->prefix . "_subscribe_done" ) == 1 || $wd_options->subscribe === false ){
58
- $parent_slug = $wd_options->custom_post;
59
-
60
-
61
  }
62
  else{
63
-
64
  $subscribe_page = add_menu_page( $wd_options->plugin_menu_title, $wd_options->plugin_menu_title, "manage_options", $wd_options->prefix . '_subscribe' , array( $this, 'display_subscribew_page' ), $wd_options->plugin_menu_icon, $wd_options->menu_position );
65
 
66
  $subscribe_instance = new DoradoWebSubscribe($this->config);
55
 
56
  $capability = $wd_options->menu_capability ? $wd_options->menu_capability : "manage_options";
57
  if( get_option( $wd_options->prefix . "_subscribe_done" ) == 1 || $wd_options->subscribe === false ){
58
+ $parent_slug = $wd_options->custom_post;
 
 
59
  }
60
  else{
61
+
62
  $subscribe_page = add_menu_page( $wd_options->plugin_menu_title, $wd_options->plugin_menu_title, "manage_options", $wd_options->prefix . '_subscribe' , array( $this, 'display_subscribew_page' ), $wd_options->plugin_menu_icon, $wd_options->menu_position );
63
 
64
  $subscribe_instance = new DoradoWebSubscribe($this->config);