WD Instagram Feed – Instagram Gallery - Version 1.4.0

Version Description

Changed: Using Instagram Basic Display API instead of Legacy API,

Download this release

Release Info

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

Code changes from version 1.3.25 to 1.4.0

Files changed (39) hide show
  1. admin-functions.php +764 -772
  2. admin/controllers/WDIControllerEditorShortcode.php +42 -42
  3. admin/controllers/WDIControllerFeeds_wdi.php +568 -575
  4. admin/controllers/WDIControllerLicensing_wdi.php +30 -30
  5. admin/controllers/WDIControllerSettings_wdi.php +60 -20
  6. admin/controllers/WDIControllerThemes_wdi.php +679 -699
  7. admin/controllers/WDIControllerUninstall_wdi.php +140 -143
  8. admin/controllers/WDIControllerWidget.php +57 -80
  9. admin/models/WDIModelEditorShortcode.php +18 -42
  10. admin/models/WDIModelFeeds_wdi.php +315 -313
  11. admin/models/WDIModelLicensing_wdi.php +29 -29
  12. admin/models/WDIModelSettings_wdi.php +9 -9
  13. admin/models/WDIModelThemes_wdi.php +577 -599
  14. admin/models/WDIModelUninstall_wdi.php +12 -12
  15. admin/models/WDIModelWidget.php +13 -40
  16. admin/views/WDIViewEditorShortcode.php +124 -154
  17. admin/views/WDIViewFeeds_wdi.php +666 -674
  18. admin/views/WDIViewLicensing_wdi.php +150 -150
  19. admin/views/WDIViewSettings_wdi.php +133 -132
  20. admin/views/WDIViewThemes_wdi.php +41 -41
  21. admin/views/WDIViewUninstall_wdi.php +132 -138
  22. admin/views/WDIViewWidget.php +122 -146
  23. css/block.css +57 -57
  24. css/gallerybox/jquery.mCustomScrollbar.css +473 -473
  25. css/pricing.css +179 -179
  26. css/tenweb-fonts/fonts.css +132 -132
  27. css/tenweb-fonts/fonts/tenweb.svg +44 -44
  28. css/wd_bp_install.css +46 -46
  29. css/wdi_backend.css +1806 -1806
  30. css/wdi_frontend.css +975 -975
  31. css/wdi_licensing.css +159 -159
  32. elementor/elementor.php +57 -57
  33. elementor/js/wdi_elementor_widget.js +22 -22
  34. elementor/styles/editor.css +84 -84
  35. elementor/styles/fonts/twbb-icons.svg +20 -20
  36. elementor/widget.php +114 -114
  37. framework/WDILibrary.php +1352 -1270
  38. framework/WDILibraryEmbed.php +922 -959
  39. framework/WDI_admin_view.php +1179 -1389
admin-functions.php CHANGED
@@ -1,772 +1,764 @@
1
- <?php
2
-
3
- /**
4
- * Checks if username and access_token exist, if not redirects to settings page
5
- */
6
-
7
- function wdi_check_necessary_params(){
8
- global $wdi_options;
9
- $instagram = (!isset($wdi_options['wdi_access_token']) || !isset($wdi_options['wdi_user_name']) || $wdi_options['wdi_access_token']=='' || $wdi_options['wdi_user_name'] =='');
10
- $fb = (empty($wdi_options['fb_token']) && empty($wdi_options['business_account_id']));
11
-
12
- if($instagram && $fb){
13
- ?>
14
- <script>
15
- window.location = "<?php echo admin_url('admin.php?page=wdi_settings');?>";
16
- </script>
17
- <?php
18
- }
19
- }
20
-
21
-
22
- /**
23
- * checks if argument is 1 it displays success message on settings page after uninstalling plugin
24
- * else it displays error message already uninstalled
25
- */
26
-
27
- function wdi_uninstall_notice($arg){
28
- if ($arg == 1) {
29
- ?>
30
- <div class="updated">
31
- <p><?php _e('Succesfully Uninstalled!', "wd-instagram-feed"); ?></p>
32
- </div>
33
- <?php
34
- } else {
35
- ?>
36
- <div class="error">
37
- <p><?php _e('Already Unistalled', "wd-instagram-feed"); ?></p>
38
- </div>
39
- <?php
40
- }
41
- }
42
-
43
- /**
44
- * checks if plugin is uninstalled it displays to all users uninstalled screen
45
- */
46
- function wdi_check_uninstalled(){
47
- global $wdi_options;
48
- if (isset($wdi_options['wdi_plugin_uninstalled']) && $wdi_options['wdi_plugin_uninstalled'] == 'true') {
49
- require_once(WDI_DIR . '/templates/plugin-uninstalled.php');
50
- die();
51
- };
52
- }
53
-
54
- /**
55
- * triggered on plugin activation
56
- *
57
- * adds some plugin related options like plugin version and database version
58
- * also adds uninstalled option
59
- * after adding this basic options,creates tables for plugin in wordpress database
60
- */
61
-
62
- function wdi_install(){
63
- wdi_get_options();
64
- global $wdi_options;
65
- $current_version = WDI_VERSION;
66
- $saved_version = get_option('wdi_version');
67
- if ($saved_version) {
68
-
69
- if (substr($saved_version, 0, 1) == '2' && substr($current_version, 0, 1) == '1') {
70
- wdi_set_options_defaults();
71
- return;
72
- }
73
-
74
- $old_version = substr($saved_version, 2);
75
- $new_version = substr(WDI_VERSION, 2);
76
-
77
- $newer = version_compare($new_version, $old_version, '>');
78
- if ($newer) {
79
- require_once WDI_DIR . '/update/wdi_update.php';
80
- /*adds new params for new versions*/
81
- wdi_update_diff($new_version, $old_version);
82
-
83
- if (!update_option('wdi_version', WDI_VERSION)) {
84
- add_option('wdi_version', WDI_VERSION);
85
- }
86
-
87
- }
88
- wdi_set_options_defaults();
89
- return;
90
-
91
- }
92
-
93
-
94
- wdi_set_options_defaults();
95
- //add_option( WDI_VAR.'_version',$version, '', 'yes' );
96
- // update_option( WDI_VAR.'_version',$version, '', 'yes' );
97
-
98
-
99
- global $wpdb;
100
- $table_name = $wpdb->prefix . WDI_FEED_TABLE;
101
- $charset_collate = 'COLLATE utf8_general_ci';
102
- $sql = "CREATE TABLE $table_name (
103
- id mediumint(9) NOT NULL AUTO_INCREMENT PRIMARY KEY,
104
- feed_name tinytext NOT NULL,
105
- feed_thumb varchar(800) NOT NULL,
106
- thumb_user varchar(30) NOT NULL,
107
- published varchar(1) NOT NULL,
108
- theme_id varchar(10) NOT NULL,
109
- feed_users varchar(2000) NOT NULL,
110
- feed_display_view varchar(30) NOT NULL,
111
- sort_images_by varchar(30) NOT NULL,
112
- display_order varchar(30) NOT NULL,
113
- follow_on_instagram_btn varchar(1) NOT NULL,
114
- display_header varchar(1) NOT NULL,
115
- number_of_photos varchar(10) NOT NULL,
116
- load_more_number varchar(10) NOT NULL,
117
- pagination_per_page_number varchar(10) NOT NULL,
118
- pagination_preload_number varchar(10) NOT NULL,
119
- image_browser_preload_number varchar(10) NOT NULL,
120
- image_browser_load_number varchar(10) NOT NULL,
121
- number_of_columns varchar(30) NOT NULL,
122
-
123
- resort_after_load_more varchar(1) NOT NULL,
124
- show_likes varchar(1) NOT NULL,
125
- show_description varchar(1) NOT NULL,
126
- show_comments varchar(1) NOT NULL,
127
- show_usernames varchar(1) NOT NULL,
128
- display_user_info varchar(1) NOT NULL,
129
- display_user_post_follow_number varchar(1) NOT NULL,
130
- show_full_description varchar(1) NOT NULL,
131
- disable_mobile_layout varchar(1) NOT NULL,
132
- feed_type varchar(30) NOT NULL,
133
- feed_item_onclick varchar(30) NOT NULL,
134
-
135
-
136
- popup_fullscreen varchar(1) NOT NULL,
137
- popup_width varchar(64) NOT NULL,
138
- popup_height varchar(64) NOT NULL,
139
- popup_type varchar(64) NOT NULL,
140
- popup_autoplay varchar(1) NOT NULL,
141
- popup_interval varchar(64) NOT NULL,
142
- popup_enable_filmstrip varchar(1) NOT NULL,
143
- popup_filmstrip_height varchar(64) NOT NULL,
144
- autohide_lightbox_navigation varchar(1) NOT NULL,
145
- popup_enable_ctrl_btn varchar(1) NOT NULL,
146
- popup_enable_fullscreen varchar(1) NOT NULL,
147
- popup_enable_info varchar(1) NOT NULL,
148
- popup_info_always_show varchar(1) NOT NULL,
149
- popup_info_full_width varchar(1) NOT NULL,
150
- popup_enable_comment varchar(1) NOT NULL,
151
- popup_enable_fullsize_image varchar(1) NOT NULL,
152
- popup_enable_download varchar(1) NOT NULL,
153
- popup_enable_share_buttons varchar(1) NOT NULL,
154
- popup_enable_facebook varchar(1) NOT NULL,
155
- popup_enable_twitter varchar(1) NOT NULL,
156
- popup_enable_google varchar(1) NOT NULL,
157
- popup_enable_pinterest varchar(1) NOT NULL,
158
- popup_enable_tumblr varchar(1) NOT NULL,
159
- show_image_counts varchar(1) NOT NULL,
160
- enable_loop varchar(1) NOT NULL,
161
- popup_image_right_click varchar(1) NOT NULL,
162
-
163
- conditional_filters varchar(10000) NOT NULL,
164
- conditional_filter_type varchar(32) NOT NULL,
165
- show_username_on_thumb varchar(32) NOT NULL,
166
- conditional_filter_enable varchar(1) NOT NULL,
167
- liked_feed varchar(30) NOT NULL,
168
- mobile_breakpoint varchar(10) NOT NULL,
169
- redirect_url varchar(255) NOT NULL,
170
- feed_resolution varchar(255) NOT NULL,
171
- hashtag_top_recent varchar(10) NOT NULL,
172
-
173
-
174
- UNIQUE KEY id (id)
175
- ) $charset_collate;";
176
-
177
- if ($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
178
- //table is not created. you may create the table here.
179
- $wpdb->query($sql);
180
- }
181
-
182
- //dbDelta( $sql );
183
- $charset_collate2 = 'COLLATE latin1_general_ci';
184
- $table_name = $wpdb->prefix . WDI_THEME_TABLE;
185
- $sql = "CREATE TABLE $table_name (
186
- id mediumint(9) NOT NULL AUTO_INCREMENT PRIMARY KEY,
187
- theme_name tinytext NOT NULL,
188
- default_theme varchar(1) NOT NULL,
189
-
190
- feed_container_bg_color varchar(32) NOT NULL,
191
- feed_wrapper_width varchar(32) NOT NULL,
192
- feed_container_width varchar(32) NOT NULL,
193
- feed_wrapper_bg_color varchar(32) NOT NULL,
194
- active_filter_bg_color varchar(32) NOT NULL,
195
- header_margin varchar(32) NOT NULL,
196
- header_padding varchar(32) NOT NULL,
197
- header_border_size varchar(32) NOT NULL,
198
- header_border_color varchar(32) NOT NULL,
199
- header_position varchar(32) NOT NULL,
200
- header_img_width varchar(32) NOT NULL,
201
- header_border_radius varchar(32) NOT NULL,
202
- header_text_padding varchar(32) NOT NULL,
203
- header_text_color varchar(32) NOT NULL,
204
- header_font_weight varchar(32) NOT NULL,
205
- header_text_font_size varchar(32) NOT NULL,
206
- header_text_font_style varchar(32) NOT NULL,
207
- follow_btn_border_radius varchar(32) NOT NULL,
208
- follow_btn_padding varchar(32) NOT NULL,
209
- follow_btn_margin varchar(32) NOT NULL,
210
- follow_btn_bg_color varchar(32) NOT NULL,
211
- follow_btn_border_color varchar(32) NOT NULL,
212
- follow_btn_text_color varchar(32) NOT NULL,
213
- follow_btn_font_size varchar(32) NOT NULL,
214
- follow_btn_border_hover_color varchar(32) NOT NULL,
215
- follow_btn_text_hover_color varchar(32) NOT NULL,
216
- follow_btn_background_hover_color varchar(32) NOT NULL,
217
-
218
-
219
-
220
- user_horizontal_margin varchar(32) NOT NULL,
221
- user_padding varchar(32) NOT NULL,
222
- user_border_size varchar(32) NOT NULL,
223
- user_border_color varchar(32) NOT NULL,
224
- user_img_width varchar(32) NOT NULL,
225
- user_border_radius varchar(32) NOT NULL,
226
- user_background_color varchar(32) NOT NULL,
227
-
228
-
229
- users_border_size varchar(32) NOT NULL,
230
- users_border_color varchar(32) NOT NULL,
231
- users_background_color varchar(32) NOT NULL,
232
- users_text_color varchar(32) NOT NULL,
233
- users_font_weight varchar(32) NOT NULL,
234
- users_text_font_size varchar(32) NOT NULL,
235
- users_text_font_style varchar(32) NOT NULL,
236
- user_description_font_size varchar(32) NOT NULL,
237
-
238
- lightbox_overlay_bg_color varchar(32) NOT NULL,
239
- lightbox_overlay_bg_transparent varchar(32) NOT NULL,
240
- lightbox_bg_color varchar(32) NOT NULL,
241
- lightbox_ctrl_btn_height varchar(32) NOT NULL,
242
- lightbox_ctrl_btn_margin_top varchar(32) NOT NULL,
243
- lightbox_ctrl_btn_margin_left varchar(32) NOT NULL,
244
- lightbox_ctrl_btn_pos varchar(32) NOT NULL,
245
- lightbox_ctrl_cont_bg_color varchar(32) NOT NULL,
246
- lightbox_ctrl_cont_border_radius varchar(32) NOT NULL,
247
- lightbox_ctrl_cont_transparent varchar(32) NOT NULL,
248
- lightbox_ctrl_btn_align varchar(32) NOT NULL,
249
- lightbox_ctrl_btn_color varchar(32) NOT NULL,
250
- lightbox_ctrl_btn_transparent varchar(32) NOT NULL,
251
- lightbox_toggle_btn_height varchar(32) NOT NULL,
252
- lightbox_toggle_btn_width varchar(32) NOT NULL,
253
- lightbox_close_btn_border_radius varchar(32) NOT NULL,
254
- lightbox_close_btn_border_width varchar(32) NOT NULL,
255
- lightbox_close_btn_border_style varchar(32) NOT NULL,
256
- lightbox_close_btn_border_color varchar(32) NOT NULL,
257
- lightbox_close_btn_box_shadow varchar(128) NOT NULL,
258
- lightbox_close_btn_bg_color varchar(32) NOT NULL,
259
- lightbox_close_btn_transparent varchar(32) NOT NULL,
260
- lightbox_close_btn_width varchar(32) NOT NULL,
261
- lightbox_close_btn_height varchar(32) NOT NULL,
262
- lightbox_close_btn_top varchar(32) NOT NULL,
263
- lightbox_close_btn_right varchar(32) NOT NULL,
264
- lightbox_close_btn_size varchar(32) NOT NULL,
265
- lightbox_close_btn_color varchar(32) NOT NULL,
266
- lightbox_close_btn_full_color varchar(32) NOT NULL,
267
- lightbox_close_btn_hover_color varchar(32) NOT NULL,
268
- lightbox_comment_share_button_color varchar(32) NOT NULL,
269
- lightbox_rl_btn_style varchar(32) NOT NULL,
270
- lightbox_rl_btn_bg_color varchar(32) NOT NULL,
271
- lightbox_rl_btn_transparent varchar(32) NOT NULL,
272
- lightbox_rl_btn_box_shadow varchar(128) NOT NULL,
273
- lightbox_rl_btn_height varchar(32) NOT NULL,
274
- lightbox_rl_btn_width varchar(32) NOT NULL,
275
- lightbox_rl_btn_size varchar(32) NOT NULL,
276
- lightbox_close_rl_btn_hover_color varchar(32) NOT NULL,
277
- lightbox_rl_btn_color varchar(32) NOT NULL,
278
- lightbox_rl_btn_border_radius varchar(32) NOT NULL,
279
- lightbox_rl_btn_border_width varchar(32) NOT NULL,
280
- lightbox_rl_btn_border_style varchar(32) NOT NULL,
281
- lightbox_rl_btn_border_color varchar(32) NOT NULL,
282
- lightbox_filmstrip_pos varchar(32) NOT NULL,
283
- lightbox_filmstrip_thumb_margin varchar(128) NOT NULL,
284
- lightbox_filmstrip_thumb_border_width varchar(32) NOT NULL,
285
- lightbox_filmstrip_thumb_border_style varchar(32) NOT NULL,
286
- lightbox_filmstrip_thumb_border_color varchar(32) NOT NULL,
287
- lightbox_filmstrip_thumb_border_radius varchar(32) NOT NULL,
288
- lightbox_filmstrip_thumb_active_border_width varchar(32) NOT NULL,
289
- lightbox_filmstrip_thumb_active_border_color varchar(32) NOT NULL,
290
- lightbox_filmstrip_thumb_deactive_transparent varchar(32) NOT NULL,
291
- lightbox_filmstrip_rl_btn_size varchar(32) NOT NULL,
292
- lightbox_filmstrip_rl_btn_color varchar(32) NOT NULL,
293
- lightbox_filmstrip_rl_bg_color varchar(32) NOT NULL,
294
- lightbox_info_pos varchar(32) NOT NULL,
295
- lightbox_info_align varchar(32) NOT NULL,
296
- lightbox_info_bg_color varchar(32) NOT NULL,
297
- lightbox_info_bg_transparent varchar(32) NOT NULL,
298
- lightbox_info_border_width varchar(32) NOT NULL,
299
- lightbox_info_border_style varchar(32) NOT NULL,
300
- lightbox_info_border_color varchar(32) NOT NULL,
301
- lightbox_info_border_radius varchar(32) NOT NULL,
302
- lightbox_info_padding varchar(32) NOT NULL,
303
- lightbox_info_margin varchar(32) NOT NULL,
304
- lightbox_title_color varchar(32) NOT NULL,
305
- lightbox_title_font_style varchar(32) NOT NULL,
306
- lightbox_title_font_weight varchar(32) NOT NULL,
307
- lightbox_title_font_size varchar(32) NOT NULL,
308
- lightbox_description_color varchar(32) NOT NULL,
309
- lightbox_description_font_style varchar(32) NOT NULL,
310
- lightbox_description_font_weight varchar(32) NOT NULL,
311
- lightbox_description_font_size varchar(32) NOT NULL,
312
- lightbox_info_height varchar(32) NOT NULL,
313
- lightbox_comment_width varchar(32) NOT NULL,
314
- lightbox_comment_pos varchar(32) NOT NULL,
315
- lightbox_comment_bg_color varchar(32) NOT NULL,
316
- lightbox_comment_font_size varchar(32) NOT NULL,
317
- lightbox_comment_font_color varchar(32) NOT NULL,
318
- lightbox_comment_font_style varchar(32) NOT NULL,
319
- lightbox_comment_author_font_size varchar(32) NOT NULL,
320
- lightbox_comment_author_font_color varchar(32) NOT NULL,
321
- lightbox_comment_author_font_color_hover varchar(32) NOT NULL,
322
- lightbox_comment_date_font_size varchar(32) NOT NULL,
323
- lightbox_comment_body_font_size varchar(32) NOT NULL,
324
- lightbox_comment_input_border_width varchar(32) NOT NULL,
325
- lightbox_comment_input_border_style varchar(32) NOT NULL,
326
- lightbox_comment_input_border_color varchar(32) NOT NULL,
327
- lightbox_comment_input_border_radius varchar(32) NOT NULL,
328
- lightbox_comment_input_padding varchar(32) NOT NULL,
329
- lightbox_comment_input_bg_color varchar(32) NOT NULL,
330
- lightbox_comment_button_bg_color varchar(32) NOT NULL,
331
- lightbox_comment_button_padding varchar(32) NOT NULL,
332
- lightbox_comment_button_border_width varchar(32) NOT NULL,
333
- lightbox_comment_button_border_style varchar(32) NOT NULL,
334
- lightbox_comment_button_border_color varchar(32) NOT NULL,
335
- lightbox_comment_button_border_radius varchar(32) NOT NULL,
336
- lightbox_comment_separator_width varchar(32) NOT NULL,
337
- lightbox_comment_separator_style varchar(32) NOT NULL,
338
- lightbox_comment_separator_color varchar(32) NOT NULL,
339
- lightbox_comment_load_more_color varchar(32) NOT NULL,
340
- lightbox_comment_load_more_color_hover varchar(32) NOT NULL,
341
-
342
- th_photo_wrap_padding varchar(32) NOT NULL,
343
- th_photo_wrap_border_size varchar(32) NOT NULL,
344
- th_photo_wrap_border_color varchar(32) NOT NULL,
345
- th_photo_img_border_radius varchar(32) NOT NULL,
346
- th_photo_wrap_bg_color varchar(32) NOT NULL,
347
- th_photo_meta_bg_color varchar(32) NOT NULL,
348
- th_photo_meta_one_line varchar(32) NOT NULL,
349
- th_like_text_color varchar(32) NOT NULL,
350
- th_comment_text_color varchar(32) NOT NULL,
351
- th_photo_caption_font_size varchar(32) NOT NULL,
352
- th_photo_caption_color varchar(32) NOT NULL,
353
- th_feed_item_margin varchar(32) NOT NULL,
354
- th_photo_caption_hover_color varchar(32) NOT NULL,
355
- th_like_comm_font_size varchar(32) NOT NULL,
356
- th_overlay_hover_color varchar(32) NOT NULL,
357
- th_overlay_hover_transparent varchar(32) NOT NULL,
358
- th_overlay_hover_icon_color varchar(32) NOT NULL,
359
- th_overlay_hover_icon_font_size varchar(32) NOT NULL,
360
-
361
- th_photo_img_hover_effect varchar(32) NOT NULL,
362
-
363
- mas_photo_wrap_padding varchar(32) NOT NULL,
364
- mas_photo_wrap_border_size varchar(32) NOT NULL,
365
- mas_photo_wrap_border_color varchar(32) NOT NULL,
366
- mas_photo_img_border_radius varchar(32) NOT NULL,
367
- mas_photo_wrap_bg_color varchar(32) NOT NULL,
368
- mas_photo_meta_bg_color varchar(32) NOT NULL,
369
- mas_photo_meta_one_line varchar(32) NOT NULL,
370
- mas_like_text_color varchar(32) NOT NULL,
371
- mas_comment_text_color varchar(32) NOT NULL,
372
- mas_photo_caption_font_size varchar(32) NOT NULL,
373
- mas_photo_caption_color varchar(32) NOT NULL,
374
- mas_feed_item_margin varchar(32) NOT NULL,
375
- mas_photo_caption_hover_color varchar(32) NOT NULL,
376
- mas_like_comm_font_size varchar(32) NOT NULL,
377
- mas_overlay_hover_color varchar(32) NOT NULL,
378
- mas_overlay_hover_transparent varchar(32) NOT NULL,
379
- mas_overlay_hover_icon_color varchar(32) NOT NULL,
380
- mas_overlay_hover_icon_font_size varchar(32) NOT NULL,
381
-
382
- mas_photo_img_hover_effect varchar(32) NOT NULL,
383
-
384
- blog_style_photo_wrap_padding varchar(32) NOT NULL,
385
- blog_style_photo_wrap_border_size varchar(32) NOT NULL,
386
- blog_style_photo_wrap_border_color varchar(32) NOT NULL,
387
- blog_style_photo_img_border_radius varchar(32) NOT NULL,
388
- blog_style_photo_wrap_bg_color varchar(32) NOT NULL,
389
- blog_style_photo_meta_bg_color varchar(32) NOT NULL,
390
- blog_style_photo_meta_one_line varchar(32) NOT NULL,
391
- blog_style_like_text_color varchar(32) NOT NULL,
392
- blog_style_comment_text_color varchar(32) NOT NULL,
393
- blog_style_photo_caption_font_size varchar(32) NOT NULL,
394
- blog_style_photo_caption_color varchar(32) NOT NULL,
395
- blog_style_feed_item_margin varchar(32) NOT NULL,
396
- blog_style_photo_caption_hover_color varchar(32) NOT NULL,
397
- blog_style_like_comm_font_size varchar(32) NOT NULL,
398
-
399
- image_browser_photo_wrap_padding varchar(32) NOT NULL,
400
- image_browser_photo_wrap_border_size varchar(32) NOT NULL,
401
- image_browser_photo_wrap_border_color varchar(32) NOT NULL,
402
- image_browser_photo_img_border_radius varchar(32) NOT NULL,
403
- image_browser_photo_wrap_bg_color varchar(32) NOT NULL,
404
- image_browser_photo_meta_bg_color varchar(32) NOT NULL,
405
- image_browser_photo_meta_one_line varchar(32) NOT NULL,
406
- image_browser_like_text_color varchar(32) NOT NULL,
407
- image_browser_comment_text_color varchar(32) NOT NULL,
408
- image_browser_photo_caption_font_size varchar(32) NOT NULL,
409
- image_browser_photo_caption_color varchar(32) NOT NULL,
410
- image_browser_feed_item_margin varchar(32) NOT NULL,
411
- image_browser_photo_caption_hover_color varchar(32) NOT NULL,
412
- image_browser_like_comm_font_size varchar(32) NOT NULL,
413
-
414
- load_more_position varchar(32) NOT NULL,
415
- load_more_padding varchar(32) NOT NULL,
416
- load_more_bg_color varchar(32) NOT NULL,
417
- load_more_border_radius varchar(32) NOT NULL,
418
- load_more_height varchar(32) NOT NULL,
419
- load_more_width varchar(32) NOT NULL,
420
- load_more_border_size varchar(32) NOT NULL,
421
- load_more_border_color varchar(32) NOT NULL,
422
- load_more_text_color varchar(32) NOT NULL,
423
- load_more_text_font_size varchar(32) NOT NULL,
424
- load_more_wrap_hover_color varchar(32) NOT NULL,
425
- pagination_ctrl_color varchar(32) NOT NULL,
426
- pagination_size varchar(32) NOT NULL,
427
- pagination_ctrl_margin varchar(32) NOT NULL,
428
- pagination_ctrl_hover_color varchar(32) NOT NULL,
429
- pagination_position varchar(32) NOT NULL,
430
- pagination_position_vert varchar(32) NOT NULL,
431
-
432
- /* since v1.0.6*/
433
- /* keep order */
434
- th_thumb_user_bg_color varchar(32) NOT NULL,
435
- th_thumb_user_color varchar(32) NOT NULL,
436
- mas_thumb_user_bg_color varchar(32) NOT NULL,
437
- mas_thumb_user_color varchar(32) NOT NULL,
438
-
439
- UNIQUE KEY id (id)
440
- ) $charset_collate2;";
441
- // dbDelta( $sql );
442
- if ($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
443
- //table is not created. you may create the table here.
444
- $wpdb->query($sql);
445
- wdi_install_default_themes();
446
- }
447
-
448
- if (!update_option('wdi_version', WDI_VERSION)) {
449
- add_option('wdi_version', WDI_VERSION);
450
- }
451
-
452
- /**
453
- * add api update notice
454
- * @since 1.1.0
455
- */
456
-
457
- $admin_notices_option = get_option('wdi_admin_notice', array());
458
- $admin_notices_option['api_update_token_reset'] = array(
459
- 'start' => current_time("n/j/Y"),
460
- 'int' => 0,
461
- 'dismissed' => 1, // dismissed on activate
462
- );
463
- update_option('wdi_admin_notice', $admin_notices_option);
464
-
465
-
466
- }
467
-
468
- //Callback function for Settings Configure Section
469
- function wdi_configure_section_callback(){
470
- $new_url = urlencode(admin_url('admin.php?page=wdi_settings')) . '&response_type=token';
471
- $wdi_sample_feed_post_url = get_option('wdi_sample_feed_post_url');
472
- $default_feed_permalink = null;
473
- $options = get_option(WDI_OPT);
474
-
475
- if ($wdi_sample_feed_post_url == '1') {
476
-
477
- $wdi_sample_feed_post_id = get_option('wdi_sample_feed_post_id');
478
- $wdi_sample_feed_id = get_option('wdi_sample_feed_id');
479
- require_once(WDI_DIR . '/admin/models/WDIModelFeeds_wdi.php');
480
- $feed_model = new WDIModelFeeds_wdi();
481
- //getting all feed information from db
482
- $feed_row = WDILibrary::objectToArray($feed_model->get_feed_row($wdi_sample_feed_id));
483
- $demo_page_status = get_post_status($wdi_sample_feed_post_id);
484
-
485
-
486
- if ($wdi_sample_feed_post_id !== false && $demo_page_status != false && $demo_page_status != 'trash') {
487
- $default_feed_permalink = get_post_permalink($wdi_sample_feed_post_id);
488
- if (!is_string($default_feed_permalink)) {
489
- $default_feed_permalink = null;
490
- }
491
- }
492
- }
493
-
494
- ?>
495
- <div id="login_with_instagram">
496
- <?php if (!isset($options['wdi_access_token']) || $options['wdi_access_token'] == ''){
497
- WDILibrary::add_auth_button();
498
- }
499
- if (isset($options['wdi_access_token']) && $options['wdi_access_token'] != '' && $default_feed_permalink !== null) { ?>
500
- <a target="_blank" href="<?php echo $default_feed_permalink; ?>" class="wdi_default_feed_button"></a>
501
- <?php }
502
-
503
- if(isset($options['wdi_access_token']) && $options['wdi_access_token'] != '' && isset($feed_row)){
504
- ?>
505
- <a target="_blank" href="<?php echo esc_url(add_query_arg(array('page'=>'wdi_feeds',
506
- 'task'=>'edit',
507
- 'current_id' => $wdi_sample_feed_id,
508
- 'nonce_wd' => wp_create_nonce('nonce_wd')
509
- ), admin_url('admin.php'))); ?>" class="wdi_edit_default_feed_button"></a>
510
- <?php } ?>
511
- </div>
512
-
513
- <div class="wdi_access_token_missing">
514
- <?php
515
-
516
- if (!isset($options['wdi_access_token']) || $options['wdi_access_token'] == '' || !isset($options['wdi_user_name']) || $options['wdi_user_name'] == '')
517
- _e('You need Access Token for using Instagram API. Click sign in with Instagram button above to get yours. This will not show your Instagram media. After that you may create your feed.', "wd-instagram-feed");
518
- ?>
519
- </div>
520
- <?php
521
- }
522
-
523
- //Callback function for Settings Customize Section
524
- function wdi_customize_section_callback(){
525
-
526
- }
527
-
528
- //Callback function for Multiple accounts Section
529
- function wdi_multiple_accounts_section_callback(){
530
-
531
- }
532
-
533
- //Settings field callback:
534
- //receives settings element as parameter and checks it's type and displays proper form element
535
- function wdi_field_callback($element)
536
- {
537
- $setting = $element[0];
538
- $wdi_formBuilder = new WDI_admin_view();
539
- switch ($setting['type']) {
540
- case 'input': {
541
- $wdi_formBuilder->input($setting);
542
- break;
543
- }
544
- case 'checkbox': {
545
- $wdi_formBuilder->checkbox($setting);
546
- break;
547
- }
548
- case 'color': {
549
- $wdi_formBuilder->color($setting);
550
- break;
551
- }
552
- case 'textarea': {
553
- $wdi_formBuilder->textarea($setting);
554
- break;
555
- }
556
- case 'select': {
557
- $wdi_formBuilder->select($setting);
558
- break;
559
- }
560
- case 'link_button':{
561
- $wdi_formBuilder->link_button($setting);
562
- break;
563
- }
564
- case 'users_list':{
565
- $wdi_formBuilder->users_list($setting);
566
- break;
567
- }
568
- }
569
- }
570
-
571
- //Validatates input form submit forms
572
- function wdi_validate_options($input)
573
- {
574
- global $wdi_options;
575
- foreach ($input as $key => $value) {
576
- if (isset($input[$key])) {
577
- $wdi_options[$key] = strip_tags(stripslashes($input[$key]));
578
- }
579
- }
580
-
581
- return apply_filters('wdi_validate_options', $wdi_options, $input);
582
- }
583
-
584
- function wdi_sanitize_options($input)
585
- {
586
- $output = array();
587
- $elements = wdi_get_settings();
588
- foreach ($input as $key => $value) {
589
- switch ($elements[$key]['sanitize_type']) {
590
- case 'text': {
591
- if (isset($input[$key])) {
592
- $output[$key] = strip_tags(stripslashes($input[$key]));
593
- }
594
- break;
595
- }
596
- case 'css': {
597
- $output[$key] = esc_js(str_replace(array("\n", "\r"), "", $input[$key]));
598
- break;
599
- }
600
- case 'users_list': {
601
- global $wdi_options;
602
-
603
- $users_list = array();
604
- $option = $input['wdi_authenticated_users_list'];
605
- //$saved_user_list = json_decode($wdi_options['wdi_authenticated_users_list'], true);
606
-
607
- if(!empty($option['access_token'])) {
608
-
609
- $user_count = count($option['access_token']);
610
- for($i = 0; $i < $user_count; $i++) {
611
-
612
- if(!empty($option['access_token'][$i]) &&
613
- !empty($option['user_name'][$i]) &&
614
- !empty($option['user_id'][$i])) {
615
-
616
- $user_name = $option['user_name'][$i];
617
-
618
- if($wdi_options['wdi_user_name'] === $user_name) {
619
- continue;
620
- }
621
-
622
- $users_list[$user_name] = array(
623
- 'access_token' => $option['access_token'][$i],
624
- 'user_name' => $user_name,
625
- 'user_id' => $option['user_id'][$i],
626
- );
627
- }
628
-
629
- }
630
- }
631
-
632
- if(isset($users_list[$input['wdi_user_name']])){
633
- unset($users_list[$input['wdi_user_name']]);
634
- }
635
-
636
- $output[$key] = json_encode($users_list);
637
- break;
638
- }
639
- default: {
640
- if (isset($input[$key])) {
641
- if(is_array($input[$key])){
642
- $output[$key] = strip_tags( stripslashes( json_encode($input[ $key ] ) ));
643
- }else{
644
- $output[$key] = strip_tags(stripslashes($input[$key]));
645
- }
646
-
647
- }
648
- break;
649
- }
650
- }
651
- }
652
- return apply_filters('wdi_sanitize_options', $output, $input);
653
- }
654
- //Sets all settings for admin pages and returns associative array of settings
655
- function wdi_get_settings(){
656
- $opt = wdi_get_options();
657
-
658
- if(empty($opt['fb_token']) || empty($opt['business_account_id'])) {
659
- $fb_button_text = "Log In with Facebook";
660
- } else {
661
- $fb_button_text = "Reconnect";
662
- }
663
-
664
- $settings = array(
665
- 'wdi_access_token' => array('name' => 'wdi_access_token', 'sanitize_type' => 'text', 'input_size' => '53', 'type' => 'input', 'default' => '', 'field_or_not' => 'field', 'section' => 'wdi_configure_section', 'title' => __('Primary Access Token', "wd-instagram-feed")),
666
- 'wdi_user_name' => array('name' => 'wdi_user_name', 'sanitize_type' => 'text', 'type' => 'input', 'input_size' => '53', 'section' => 'wdi_configure_section', 'field_or_not' => 'field', 'default' => '', 'title' => __('Primary Username', "wd-instagram-feed")),
667
- 'wdi_user_id' => array('name' => 'wdi_user_id', 'sanitize_type' => 'text', 'type' => 'input', 'section' => 'wdi_configure_section', 'readonly' => 'readonly', 'default' => '', 'field_or_not' => 'no_field'),
668
- 'wdi_fb_auth' => array('name'=>'wdi_fb_auth','sanitize_type'=>'','field_or_not'=>'','type'=>'link_button', 'section'=>'wdi_configure_section', 'href'=>wdi_get_graph_auth_url(), 'title'=>__('Log in for hashtag feed',"wd-instagram-feed"),'default'=>'', 'value'=>$fb_button_text, 'description' => 'Connect to Facebook Graph API to get hashtag feeds. See more in <a href="https://help.10web.io/hc/en-us/articles/360021344111?utm_source=instagram_feed&utm_medium=free_plugin" target="_blank">documentation</a>.'),
669
-
670
- 'wdi_transient_time' => array('name'=>'wdi_transient_time','sanitize_type'=>'number','field_or_not'=>'','type'=>'input', 'input_type'=>'number', 'section'=>'wdi_customize_section', 'title'=>__('Check for new posts every (min)',"wd-instagram-feed"),'default'=>'' ,'value'=>60),
671
- 'wdi_reset_cache' => array('name'=>'wdi_reset_cache','sanitize_type'=>'','field_or_not'=>'','type'=>'link_button', 'section'=>'wdi_customize_section', 'href'=>admin_url( 'admin.php?page=wdi_settings' ), 'title'=>__('Reset cache with Instagram data',"wd-instagram-feed"),'default'=>'', 'value'=>'Reset cache'),
672
- 'wdi_authenticated_users_list' => array('name' => 'wdi_authenticated_users_list','sanitize_type'=>'users_list','input_size'=>'53','type'=>'users_list','default'=>'[]','field_or_not'=>'field','section'=>'wdi_customize_section','title'=>__('Multiple Instagram accounts ?',"wd-instagram-feed")),
673
- 'wdi_feeds_min_capability' => array('name' => 'wdi_feeds_min_capability', "sanitize_type" => "text", 'title' => __('Minimal role to add and manage Feeds or Themes', "wd-instagram-feed"), 'type' => 'select', 'field_or_not' => 'field', "default" => "manage_options", 'section' => 'wdi_customize_section', 'valid_options' => array('manage_options' => __('Administrator', 'wd-instagram-feed'), 'publish_posts' => __('Author', 'wd-instagram-feed'), 'contributor'=>__('Contributor', 'wd-instagram-feed'))),
674
- 'wdi_custom_css' => array('name' => 'wdi_custom_css', 'sanitize_type' => 'css', 'type' => 'textarea', 'section' => 'wdi_customize_section', 'field_or_not' => 'field', 'default' => '', 'title' => __('Custom CSS', "wd-instagram-feed")),
675
- 'wdi_custom_js' => array('name' => 'wdi_custom_js', 'sanitize_type' => 'css', 'type' => 'textarea', 'section' => 'wdi_customize_section', 'field_or_not' => 'field', 'default' => '', 'title' => __('Custom JavaScript', "wd-instagram-feed")),
676
- //'wdi_preserve_settings_when_remove'=>array('name'=>'wdi_preserve_settings_when_remove','field_or_not'=>'field','type'=>'checkbox','default'=>'1', 'section'=>'wdi_configure_section','title'=>__('Preserve Settings When Remove',"wd-instagram-feed")),
677
- 'wdi_plugin_uninstalled' => array('name' => 'wdi_plugin_uninstalled', 'sanitize_type' => 'bool', 'field_or_not' => 'field', 'type' => 'input', 'input_type' => 'hidden', 'section' => 'wdi_customize_section', 'title' => '', 'default' => 'false', 'value' => 'false'),
678
- 'fb_token' => array('name'=>'fb_token','sanitize_type'=>'','field_or_not'=>'field','type'=>'input','input_type'=>'hidden','section'=>'wdi_customize_section','title'=>'','default'=>''),
679
- 'business_account_id' => array('name'=>'business_account_id','sanitize_type'=>'','field_or_not'=>'field','type'=>'input','input_type'=>'hidden','section'=>'wdi_customize_section','title'=>'','default'=>''),
680
- 'wdi_uninstall' => array('name'=>'wdi_uninstall','sanitize_type'=>'','field_or_not'=>'','type'=>'link_button', 'section'=>'wdi_customize_section', 'href'=>admin_url( 'admin.php?page=wdi_uninstall' ), 'title'=>__('Uninstall',"wd-instagram-feed"),'default'=>''),
681
- //'wdi_version' => array('name'=>'wdi_version','field_or_not'=>'no_field','default'=>WDI_VERSION),
682
- //'wdi_first_time'=>array('name'=>'wdi_first_time','field_or_not'=>'no_field','default'=>'1')
683
- );
684
- return $settings;
685
- }
686
-
687
- //Sets plugin default settings
688
- function wdi_set_options_defaults()
689
- {
690
- $db_options = array();
691
- $options = get_option(WDI_OPT);
692
-
693
- $settings = wdi_get_settings();
694
- foreach ($settings as $setting) {
695
- $settingDefault = isset($setting['default']) ? $setting['default'] : '';
696
- $db_options[$setting['name']] = $settingDefault;
697
- }
698
-
699
- $options = wp_parse_args($options, $db_options);
700
- if (isset($options['wdi_plugin_uninstalled']) && $options['wdi_plugin_uninstalled'] == 'true') {
701
- $options['wdi_plugin_uninstalled'] = 'false';
702
- }
703
-
704
- if(empty($options['wdi_authenticated_users_list'])){
705
- $options['wdi_authenticated_users_list'] = '[]';
706
- }
707
-
708
- add_option(WDI_OPT, $options, '', 'yes');
709
- update_option(WDI_OPT, $options, 'yes');
710
- wdi_get_options();
711
- }
712
-
713
- function wdi_get_options()
714
- {
715
- global $wdi_options;
716
- $wdi_options = get_option(WDI_OPT);
717
- return apply_filters('wdi_get_options', $wdi_options);
718
- }
719
-
720
- function wdi_install_default_themes()
721
- {
722
- global $wdi_options;
723
- global $wpdb;
724
-
725
- require_once WDI_DIR . "/templates/default-themes.php";
726
- $default_themes = wdi_get_default_themes();
727
- foreach ($default_themes as $theme) {
728
- $table_name = $wpdb->prefix . WDI_THEME_TABLE;
729
- if ($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
730
- require_once(WDI_DIR . '/framework/WDILibrary.php');
731
- echo WDILibrary::message(__('Database error, please uninstall the plugin and install again', "wd-instagram-feed"), 'error');
732
- }
733
- else {
734
- $wpdb->insert($table_name, $theme);
735
- }
736
- }
737
- }
738
-
739
- function wdi_get_create_feeds_cap()
740
- {
741
- global $wdi_options;
742
- $min_feeds_capability = isset($wdi_options['wdi_feeds_min_capability']) ? $wdi_options['wdi_feeds_min_capability'] : "manage_options";
743
- if( $min_feeds_capability == 'publish_posts' ) {
744
- $min_feeds_capability = 'publish_posts';
745
- } else if( $min_feeds_capability == 'contributor' ) {
746
- $min_feeds_capability = 'contributor';
747
- } else {
748
- $min_feeds_capability = 'manage_options';
749
- }
750
-
751
- return $min_feeds_capability;
752
- }
753
-
754
- function wdi_get_graph_auth_url(){
755
- $app_id = '356432828483035';
756
- $redirect_uri = 'https://api.web-dorado.com/wdi/';
757
-
758
- $admin_url = admin_url('admin.php?page=wdi_settings');
759
-
760
- $state = array(
761
- 'wp_site_url' => $admin_url
762
- );
763
-
764
- $fb_url = add_query_arg(array(
765
- 'client_id' => $app_id,
766
- 'redirect_uri' => $redirect_uri,
767
- 'scope' => 'manage_pages,instagram_basic',
768
- ), "https://www.facebook.com/dialog/oauth");
769
-
770
- $fb_url .= '&state=' . base64_encode(json_encode($state));
771
- return $fb_url;
772
- }
1
+ <?php
2
+ /**
3
+ * Checks if username and access_token exist, if not redirects to settings page
4
+ */
5
+
6
+ function wdi_check_necessary_params(){
7
+ global $wdi_options;
8
+ $instagram = (!isset($wdi_options['wdi_access_token']) || !isset($wdi_options['wdi_user_name']) || $wdi_options['wdi_access_token']=='' || $wdi_options['wdi_user_name'] =='');
9
+ $fb = (empty($wdi_options['fb_token']) && empty($wdi_options['business_account_id']));
10
+
11
+ if($instagram && $fb){
12
+ ?>
13
+ <script>
14
+ window.location = "<?php echo admin_url('admin.php?page=wdi_settings');?>";
15
+ </script>
16
+ <?php
17
+ }
18
+ }
19
+
20
+
21
+ /**
22
+ * checks if argument is 1 it displays success message on settings page after uninstalling plugin
23
+ * else it displays error message already uninstalled
24
+ */
25
+
26
+ function wdi_uninstall_notice($arg){
27
+ if ($arg == 1) {
28
+ ?>
29
+ <div class="updated">
30
+ <p><?php _e('Succesfully Uninstalled!', "wd-instagram-feed"); ?></p>
31
+ </div>
32
+ <?php
33
+ } else {
34
+ ?>
35
+ <div class="error">
36
+ <p><?php _e('Already Unistalled', "wd-instagram-feed"); ?></p>
37
+ </div>
38
+ <?php
39
+ }
40
+ }
41
+
42
+ /**
43
+ * checks if plugin is uninstalled it displays to all users uninstalled screen
44
+ */
45
+ function wdi_check_uninstalled(){
46
+ global $wdi_options;
47
+ if (isset($wdi_options['wdi_plugin_uninstalled']) && $wdi_options['wdi_plugin_uninstalled'] == 'true') {
48
+ require_once(WDI_DIR . '/templates/plugin-uninstalled.php');
49
+ die();
50
+ };
51
+ }
52
+
53
+ /**
54
+ * triggered on plugin activation
55
+ *
56
+ * adds some plugin related options like plugin version and database version
57
+ * also adds uninstalled option
58
+ * after adding this basic options,creates tables for plugin in wordpress database
59
+ */
60
+
61
+ function wdi_install(){
62
+ wdi_get_options();
63
+ global $wdi_options;
64
+ wp_schedule_event(time(), 'wdi_autoupdate_interval', 'wdi_schedule_event_hook');
65
+
66
+ //delete wdi_admin_check transient recheck for updates on plugin activation
67
+ delete_transient('wdi_update_check');
68
+ $current_version = WDI_VERSION;
69
+ $saved_version = get_option('wdi_version');
70
+ if ($saved_version) {
71
+
72
+ if (substr($saved_version, 0, 1) == '2' && substr($current_version, 0, 1) == '1') {
73
+ wdi_set_options_defaults();
74
+ return;
75
+ }
76
+
77
+ $old_version = substr($saved_version, 2);
78
+ $new_version = substr(WDI_VERSION, 2);
79
+
80
+ $newer = version_compare($new_version, $old_version, '>');
81
+ if ($newer) {
82
+ require_once WDI_DIR . '/update/wdi_update.php';
83
+ /*adds new params for new versions*/
84
+ wdi_update_diff($new_version, $old_version);
85
+
86
+ if (!update_option('wdi_version', WDI_VERSION)) {
87
+ add_option('wdi_version', WDI_VERSION);
88
+ }
89
+
90
+ }
91
+ wdi_set_options_defaults();
92
+
93
+ return;
94
+
95
+ }
96
+
97
+ wdi_set_options_defaults();
98
+ //add_option( WDI_VAR.'_version',$version, '', 'yes' );
99
+ // update_option( WDI_VAR.'_version',$version, '', 'yes' );
100
+
101
+ global $wpdb;
102
+ $table_name = $wpdb->prefix . WDI_FEED_TABLE;
103
+ $charset_collate = 'COLLATE utf8_general_ci';
104
+ $sql = "CREATE TABLE $table_name (
105
+ id mediumint(9) NOT NULL AUTO_INCREMENT PRIMARY KEY,
106
+ feed_name tinytext NOT NULL,
107
+ feed_thumb varchar(800) NOT NULL,
108
+ thumb_user varchar(30) NOT NULL,
109
+ published varchar(1) NOT NULL,
110
+ theme_id varchar(10) NOT NULL,
111
+ feed_users varchar(2000) NOT NULL,
112
+ feed_display_view varchar(30) NOT NULL,
113
+ sort_images_by varchar(30) NOT NULL,
114
+ display_order varchar(30) NOT NULL,
115
+ follow_on_instagram_btn varchar(1) NOT NULL,
116
+ display_header varchar(1) NOT NULL,
117
+ number_of_photos varchar(10) NOT NULL,
118
+ load_more_number varchar(10) NOT NULL,
119
+ pagination_per_page_number varchar(10) NOT NULL,
120
+ pagination_preload_number varchar(10) NOT NULL,
121
+ image_browser_preload_number varchar(10) NOT NULL,
122
+ image_browser_load_number varchar(10) NOT NULL,
123
+ number_of_columns varchar(30) NOT NULL,
124
+
125
+ resort_after_load_more varchar(1) NOT NULL,
126
+ show_likes varchar(1) NOT NULL,
127
+ show_description varchar(1) NOT NULL,
128
+ show_comments varchar(1) NOT NULL,
129
+ show_usernames varchar(1) NOT NULL,
130
+ display_user_info varchar(1) NOT NULL,
131
+ display_user_post_follow_number varchar(1) NOT NULL,
132
+ show_full_description varchar(1) NOT NULL,
133
+ disable_mobile_layout varchar(1) NOT NULL,
134
+ feed_type varchar(30) NOT NULL,
135
+ feed_item_onclick varchar(30) NOT NULL,
136
+
137
+
138
+ popup_fullscreen varchar(1) NOT NULL,
139
+ popup_width varchar(64) NOT NULL,
140
+ popup_height varchar(64) NOT NULL,
141
+ popup_type varchar(64) NOT NULL,
142
+ popup_autoplay varchar(1) NOT NULL,
143
+ popup_interval varchar(64) NOT NULL,
144
+ popup_enable_filmstrip varchar(1) NOT NULL,
145
+ popup_filmstrip_height varchar(64) NOT NULL,
146
+ autohide_lightbox_navigation varchar(1) NOT NULL,
147
+ popup_enable_ctrl_btn varchar(1) NOT NULL,
148
+ popup_enable_fullscreen varchar(1) NOT NULL,
149
+ popup_enable_info varchar(1) NOT NULL,
150
+ popup_info_always_show varchar(1) NOT NULL,
151
+ popup_info_full_width varchar(1) NOT NULL,
152
+ popup_enable_comment varchar(1) NOT NULL,
153
+ popup_enable_fullsize_image varchar(1) NOT NULL,
154
+ popup_enable_download varchar(1) NOT NULL,
155
+ popup_enable_share_buttons varchar(1) NOT NULL,
156
+ popup_enable_facebook varchar(1) NOT NULL,
157
+ popup_enable_twitter varchar(1) NOT NULL,
158
+ popup_enable_google varchar(1) NOT NULL,
159
+ popup_enable_pinterest varchar(1) NOT NULL,
160
+ popup_enable_tumblr varchar(1) NOT NULL,
161
+ show_image_counts varchar(1) NOT NULL,
162
+ enable_loop varchar(1) NOT NULL,
163
+ popup_image_right_click varchar(1) NOT NULL,
164
+
165
+ conditional_filters varchar(10000) NOT NULL,
166
+ conditional_filter_type varchar(32) NOT NULL,
167
+ show_username_on_thumb varchar(32) NOT NULL,
168
+ conditional_filter_enable varchar(1) NOT NULL,
169
+ liked_feed varchar(30) NOT NULL,
170
+ mobile_breakpoint varchar(10) NOT NULL,
171
+ redirect_url varchar(255) NOT NULL,
172
+ feed_resolution varchar(255) NOT NULL,
173
+ hashtag_top_recent varchar(10) NOT NULL,
174
+
175
+
176
+ UNIQUE KEY id (id)
177
+ ) $charset_collate;";
178
+
179
+ if ($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
180
+ //table is not created. you may create the table here.
181
+ $wpdb->query($sql);
182
+ }
183
+
184
+ //dbDelta( $sql );
185
+ $charset_collate2 = 'COLLATE latin1_general_ci';
186
+ $table_name = $wpdb->prefix . WDI_THEME_TABLE;
187
+ $sql = "CREATE TABLE $table_name (
188
+ id mediumint(9) NOT NULL AUTO_INCREMENT PRIMARY KEY,
189
+ theme_name tinytext NOT NULL,
190
+ default_theme varchar(1) NOT NULL,
191
+
192
+ feed_container_bg_color varchar(32) NOT NULL,
193
+ feed_wrapper_width varchar(32) NOT NULL,
194
+ feed_container_width varchar(32) NOT NULL,
195
+ feed_wrapper_bg_color varchar(32) NOT NULL,
196
+ active_filter_bg_color varchar(32) NOT NULL,
197
+ header_margin varchar(32) NOT NULL,
198
+ header_padding varchar(32) NOT NULL,
199
+ header_border_size varchar(32) NOT NULL,
200
+ header_border_color varchar(32) NOT NULL,
201
+ header_position varchar(32) NOT NULL,
202
+ header_img_width varchar(32) NOT NULL,
203
+ header_border_radius varchar(32) NOT NULL,
204
+ header_text_padding varchar(32) NOT NULL,
205
+ header_text_color varchar(32) NOT NULL,
206
+ header_font_weight varchar(32) NOT NULL,
207
+ header_text_font_size varchar(32) NOT NULL,
208
+ header_text_font_style varchar(32) NOT NULL,
209
+ follow_btn_border_radius varchar(32) NOT NULL,
210
+ follow_btn_padding varchar(32) NOT NULL,
211
+ follow_btn_margin varchar(32) NOT NULL,
212
+ follow_btn_bg_color varchar(32) NOT NULL,
213
+ follow_btn_border_color varchar(32) NOT NULL,
214
+ follow_btn_text_color varchar(32) NOT NULL,
215
+ follow_btn_font_size varchar(32) NOT NULL,
216
+ follow_btn_border_hover_color varchar(32) NOT NULL,
217
+ follow_btn_text_hover_color varchar(32) NOT NULL,
218
+ follow_btn_background_hover_color varchar(32) NOT NULL,
219
+
220
+ user_horizontal_margin varchar(32) NOT NULL,
221
+ user_padding varchar(32) NOT NULL,
222
+ user_border_size varchar(32) NOT NULL,
223
+ user_border_color varchar(32) NOT NULL,
224
+ user_img_width varchar(32) NOT NULL,
225
+ user_border_radius varchar(32) NOT NULL,
226
+ user_background_color varchar(32) NOT NULL,
227
+
228
+ users_border_size varchar(32) NOT NULL,
229
+ users_border_color varchar(32) NOT NULL,
230
+ users_background_color varchar(32) NOT NULL,
231
+ users_text_color varchar(32) NOT NULL,
232
+ users_font_weight varchar(32) NOT NULL,
233
+ users_text_font_size varchar(32) NOT NULL,
234
+ users_text_font_style varchar(32) NOT NULL,
235
+ user_description_font_size varchar(32) NOT NULL,
236
+
237
+ lightbox_overlay_bg_color varchar(32) NOT NULL,
238
+ lightbox_overlay_bg_transparent varchar(32) NOT NULL,
239
+ lightbox_bg_color varchar(32) NOT NULL,
240
+ lightbox_ctrl_btn_height varchar(32) NOT NULL,
241
+ lightbox_ctrl_btn_margin_top varchar(32) NOT NULL,
242
+ lightbox_ctrl_btn_margin_left varchar(32) NOT NULL,
243
+ lightbox_ctrl_btn_pos varchar(32) NOT NULL,
244
+ lightbox_ctrl_cont_bg_color varchar(32) NOT NULL,
245
+ lightbox_ctrl_cont_border_radius varchar(32) NOT NULL,
246
+ lightbox_ctrl_cont_transparent varchar(32) NOT NULL,
247
+ lightbox_ctrl_btn_align varchar(32) NOT NULL,
248
+ lightbox_ctrl_btn_color varchar(32) NOT NULL,
249
+ lightbox_ctrl_btn_transparent varchar(32) NOT NULL,
250
+ lightbox_toggle_btn_height varchar(32) NOT NULL,
251
+ lightbox_toggle_btn_width varchar(32) NOT NULL,
252
+ lightbox_close_btn_border_radius varchar(32) NOT NULL,
253
+ lightbox_close_btn_border_width varchar(32) NOT NULL,
254
+ lightbox_close_btn_border_style varchar(32) NOT NULL,
255
+ lightbox_close_btn_border_color varchar(32) NOT NULL,
256
+ lightbox_close_btn_box_shadow varchar(128) NOT NULL,
257
+ lightbox_close_btn_bg_color varchar(32) NOT NULL,
258
+ lightbox_close_btn_transparent varchar(32) NOT NULL,
259
+ lightbox_close_btn_width varchar(32) NOT NULL,
260
+ lightbox_close_btn_height varchar(32) NOT NULL,
261
+ lightbox_close_btn_top varchar(32) NOT NULL,
262
+ lightbox_close_btn_right varchar(32) NOT NULL,
263
+ lightbox_close_btn_size varchar(32) NOT NULL,
264
+ lightbox_close_btn_color varchar(32) NOT NULL,
265
+ lightbox_close_btn_full_color varchar(32) NOT NULL,
266
+ lightbox_close_btn_hover_color varchar(32) NOT NULL,
267
+ lightbox_comment_share_button_color varchar(32) NOT NULL,
268
+ lightbox_rl_btn_style varchar(32) NOT NULL,
269
+ lightbox_rl_btn_bg_color varchar(32) NOT NULL,
270
+ lightbox_rl_btn_transparent varchar(32) NOT NULL,
271
+ lightbox_rl_btn_box_shadow varchar(128) NOT NULL,
272
+ lightbox_rl_btn_height varchar(32) NOT NULL,
273
+ lightbox_rl_btn_width varchar(32) NOT NULL,
274
+ lightbox_rl_btn_size varchar(32) NOT NULL,
275
+ lightbox_close_rl_btn_hover_color varchar(32) NOT NULL,
276
+ lightbox_rl_btn_color varchar(32) NOT NULL,
277
+ lightbox_rl_btn_border_radius varchar(32) NOT NULL,
278
+ lightbox_rl_btn_border_width varchar(32) NOT NULL,
279
+ lightbox_rl_btn_border_style varchar(32) NOT NULL,
280
+ lightbox_rl_btn_border_color varchar(32) NOT NULL,
281
+ lightbox_filmstrip_pos varchar(32) NOT NULL,
282
+ lightbox_filmstrip_thumb_margin varchar(128) NOT NULL,
283
+ lightbox_filmstrip_thumb_border_width varchar(32) NOT NULL,
284
+ lightbox_filmstrip_thumb_border_style varchar(32) NOT NULL,
285
+ lightbox_filmstrip_thumb_border_color varchar(32) NOT NULL,
286
+ lightbox_filmstrip_thumb_border_radius varchar(32) NOT NULL,
287
+ lightbox_filmstrip_thumb_active_border_width varchar(32) NOT NULL,
288
+ lightbox_filmstrip_thumb_active_border_color varchar(32) NOT NULL,
289
+ lightbox_filmstrip_thumb_deactive_transparent varchar(32) NOT NULL,
290
+ lightbox_filmstrip_rl_btn_size varchar(32) NOT NULL,
291
+ lightbox_filmstrip_rl_btn_color varchar(32) NOT NULL,
292
+ lightbox_filmstrip_rl_bg_color varchar(32) NOT NULL,
293
+ lightbox_info_pos varchar(32) NOT NULL,
294
+ lightbox_info_align varchar(32) NOT NULL,
295
+ lightbox_info_bg_color varchar(32) NOT NULL,
296
+ lightbox_info_bg_transparent varchar(32) NOT NULL,
297
+ lightbox_info_border_width varchar(32) NOT NULL,
298
+ lightbox_info_border_style varchar(32) NOT NULL,
299
+ lightbox_info_border_color varchar(32) NOT NULL,
300
+ lightbox_info_border_radius varchar(32) NOT NULL,
301
+ lightbox_info_padding varchar(32) NOT NULL,
302
+ lightbox_info_margin varchar(32) NOT NULL,
303
+ lightbox_title_color varchar(32) NOT NULL,
304
+ lightbox_title_font_style varchar(32) NOT NULL,
305
+ lightbox_title_font_weight varchar(32) NOT NULL,
306
+ lightbox_title_font_size varchar(32) NOT NULL,
307
+ lightbox_description_color varchar(32) NOT NULL,
308
+ lightbox_description_font_style varchar(32) NOT NULL,
309
+ lightbox_description_font_weight varchar(32) NOT NULL,
310
+ lightbox_description_font_size varchar(32) NOT NULL,
311
+ lightbox_info_height varchar(32) NOT NULL,
312
+ lightbox_comment_width varchar(32) NOT NULL,
313
+ lightbox_comment_pos varchar(32) NOT NULL,
314
+ lightbox_comment_bg_color varchar(32) NOT NULL,
315
+ lightbox_comment_font_size varchar(32) NOT NULL,
316
+ lightbox_comment_font_color varchar(32) NOT NULL,
317
+ lightbox_comment_font_style varchar(32) NOT NULL,
318
+ lightbox_comment_author_font_size varchar(32) NOT NULL,
319
+ lightbox_comment_author_font_color varchar(32) NOT NULL,
320
+ lightbox_comment_author_font_color_hover varchar(32) NOT NULL,
321
+ lightbox_comment_date_font_size varchar(32) NOT NULL,
322
+ lightbox_comment_body_font_size varchar(32) NOT NULL,
323
+ lightbox_comment_input_border_width varchar(32) NOT NULL,
324
+ lightbox_comment_input_border_style varchar(32) NOT NULL,
325
+ lightbox_comment_input_border_color varchar(32) NOT NULL,
326
+ lightbox_comment_input_border_radius varchar(32) NOT NULL,
327
+ lightbox_comment_input_padding varchar(32) NOT NULL,
328
+ lightbox_comment_input_bg_color varchar(32) NOT NULL,
329
+ lightbox_comment_button_bg_color varchar(32) NOT NULL,
330
+ lightbox_comment_button_padding varchar(32) NOT NULL,
331
+ lightbox_comment_button_border_width varchar(32) NOT NULL,
332
+ lightbox_comment_button_border_style varchar(32) NOT NULL,
333
+ lightbox_comment_button_border_color varchar(32) NOT NULL,
334
+ lightbox_comment_button_border_radius varchar(32) NOT NULL,
335
+ lightbox_comment_separator_width varchar(32) NOT NULL,
336
+ lightbox_comment_separator_style varchar(32) NOT NULL,
337
+ lightbox_comment_separator_color varchar(32) NOT NULL,
338
+ lightbox_comment_load_more_color varchar(32) NOT NULL,
339
+ lightbox_comment_load_more_color_hover varchar(32) NOT NULL,
340
+
341
+ th_photo_wrap_padding varchar(32) NOT NULL,
342
+ th_photo_wrap_border_size varchar(32) NOT NULL,
343
+ th_photo_wrap_border_color varchar(32) NOT NULL,
344
+ th_photo_img_border_radius varchar(32) NOT NULL,
345
+ th_photo_wrap_bg_color varchar(32) NOT NULL,
346
+ th_photo_meta_bg_color varchar(32) NOT NULL,
347
+ th_photo_meta_one_line varchar(32) NOT NULL,
348
+ th_like_text_color varchar(32) NOT NULL,
349
+ th_comment_text_color varchar(32) NOT NULL,
350
+ th_photo_caption_font_size varchar(32) NOT NULL,
351
+ th_photo_caption_color varchar(32) NOT NULL,
352
+ th_feed_item_margin varchar(32) NOT NULL,
353
+ th_photo_caption_hover_color varchar(32) NOT NULL,
354
+ th_like_comm_font_size varchar(32) NOT NULL,
355
+ th_overlay_hover_color varchar(32) NOT NULL,
356
+ th_overlay_hover_transparent varchar(32) NOT NULL,
357
+ th_overlay_hover_icon_color varchar(32) NOT NULL,
358
+ th_overlay_hover_icon_font_size varchar(32) NOT NULL,
359
+ th_photo_img_hover_effect varchar(32) NOT NULL,
360
+
361
+ mas_photo_wrap_padding varchar(32) NOT NULL,
362
+ mas_photo_wrap_border_size varchar(32) NOT NULL,
363
+ mas_photo_wrap_border_color varchar(32) NOT NULL,
364
+ mas_photo_img_border_radius varchar(32) NOT NULL,
365
+ mas_photo_wrap_bg_color varchar(32) NOT NULL,
366
+ mas_photo_meta_bg_color varchar(32) NOT NULL,
367
+ mas_photo_meta_one_line varchar(32) NOT NULL,
368
+ mas_like_text_color varchar(32) NOT NULL,
369
+ mas_comment_text_color varchar(32) NOT NULL,
370
+ mas_photo_caption_font_size varchar(32) NOT NULL,
371
+ mas_photo_caption_color varchar(32) NOT NULL,
372
+ mas_feed_item_margin varchar(32) NOT NULL,
373
+ mas_photo_caption_hover_color varchar(32) NOT NULL,
374
+ mas_like_comm_font_size varchar(32) NOT NULL,
375
+ mas_overlay_hover_color varchar(32) NOT NULL,
376
+ mas_overlay_hover_transparent varchar(32) NOT NULL,
377
+ mas_overlay_hover_icon_color varchar(32) NOT NULL,
378
+ mas_overlay_hover_icon_font_size varchar(32) NOT NULL,
379
+ mas_photo_img_hover_effect varchar(32) NOT NULL,
380
+
381
+ blog_style_photo_wrap_padding varchar(32) NOT NULL,
382
+ blog_style_photo_wrap_border_size varchar(32) NOT NULL,
383
+ blog_style_photo_wrap_border_color varchar(32) NOT NULL,
384
+ blog_style_photo_img_border_radius varchar(32) NOT NULL,
385
+ blog_style_photo_wrap_bg_color varchar(32) NOT NULL,
386
+ blog_style_photo_meta_bg_color varchar(32) NOT NULL,
387
+ blog_style_photo_meta_one_line varchar(32) NOT NULL,
388
+ blog_style_like_text_color varchar(32) NOT NULL,
389
+ blog_style_comment_text_color varchar(32) NOT NULL,
390
+ blog_style_photo_caption_font_size varchar(32) NOT NULL,
391
+ blog_style_photo_caption_color varchar(32) NOT NULL,
392
+ blog_style_feed_item_margin varchar(32) NOT NULL,
393
+ blog_style_photo_caption_hover_color varchar(32) NOT NULL,
394
+ blog_style_like_comm_font_size varchar(32) NOT NULL,
395
+
396
+ image_browser_photo_wrap_padding varchar(32) NOT NULL,
397
+ image_browser_photo_wrap_border_size varchar(32) NOT NULL,
398
+ image_browser_photo_wrap_border_color varchar(32) NOT NULL,
399
+ image_browser_photo_img_border_radius varchar(32) NOT NULL,
400
+ image_browser_photo_wrap_bg_color varchar(32) NOT NULL,
401
+ image_browser_photo_meta_bg_color varchar(32) NOT NULL,
402
+ image_browser_photo_meta_one_line varchar(32) NOT NULL,
403
+ image_browser_like_text_color varchar(32) NOT NULL,
404
+ image_browser_comment_text_color varchar(32) NOT NULL,
405
+ image_browser_photo_caption_font_size varchar(32) NOT NULL,
406
+ image_browser_photo_caption_color varchar(32) NOT NULL,
407
+ image_browser_feed_item_margin varchar(32) NOT NULL,
408
+ image_browser_photo_caption_hover_color varchar(32) NOT NULL,
409
+ image_browser_like_comm_font_size varchar(32) NOT NULL,
410
+
411
+ load_more_position varchar(32) NOT NULL,
412
+ load_more_padding varchar(32) NOT NULL,
413
+ load_more_bg_color varchar(32) NOT NULL,
414
+ load_more_border_radius varchar(32) NOT NULL,
415
+ load_more_height varchar(32) NOT NULL,
416
+ load_more_width varchar(32) NOT NULL,
417
+ load_more_border_size varchar(32) NOT NULL,
418
+ load_more_border_color varchar(32) NOT NULL,
419
+ load_more_text_color varchar(32) NOT NULL,
420
+ load_more_text_font_size varchar(32) NOT NULL,
421
+ load_more_wrap_hover_color varchar(32) NOT NULL,
422
+ pagination_ctrl_color varchar(32) NOT NULL,
423
+ pagination_size varchar(32) NOT NULL,
424
+ pagination_ctrl_margin varchar(32) NOT NULL,
425
+ pagination_ctrl_hover_color varchar(32) NOT NULL,
426
+ pagination_position varchar(32) NOT NULL,
427
+ pagination_position_vert varchar(32) NOT NULL,
428
+
429
+ /* since v1.0.6*/
430
+ /* keep order */
431
+ th_thumb_user_bg_color varchar(32) NOT NULL,
432
+ th_thumb_user_color varchar(32) NOT NULL,
433
+ mas_thumb_user_bg_color varchar(32) NOT NULL,
434
+ mas_thumb_user_color varchar(32) NOT NULL,
435
+
436
+ UNIQUE KEY id (id)
437
+ ) $charset_collate2;";
438
+ // dbDelta( $sql );
439
+ if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
440
+ //table is not created. you may create the table here.
441
+ $wpdb->query($sql);
442
+ wdi_install_default_themes();
443
+ }
444
+
445
+ if(!update_option('wdi_version',WDI_VERSION )){
446
+ add_option('wdi_version', WDI_VERSION);
447
+ }
448
+
449
+ /**
450
+ * add api update notice
451
+ * @since 1.1.0
452
+ */
453
+
454
+ $admin_notices_option = get_option('wdi_admin_notice', array());
455
+ $admin_notices_option['api_update_token_reset'] = array(
456
+ 'start' => current_time("n/j/Y"),
457
+ 'int' => 0,
458
+ 'dismissed' => 1, // dismissed on activate
459
+ );
460
+ update_option('wdi_admin_notice', $admin_notices_option);
461
+
462
+ }
463
+
464
+ function wdi_deactivate() {
465
+ wp_clear_scheduled_hook( 'wdi_schedule_event_hook' );
466
+ // Using this insted of flush_rewrite_rule() for better performance with multisite.
467
+ global $wp_rewrite;
468
+ $wp_rewrite->init();
469
+ $wp_rewrite->flush_rules();
470
+ }
471
+
472
+ //Callback function for Settings Configure Section
473
+ function wdi_configure_section_callback(){
474
+ $new_url = urlencode(admin_url('admin.php?page=wdi_settings')) . '&response_type=token';
475
+ $wdi_sample_feed_post_url = get_option('wdi_sample_feed_post_url');
476
+ $default_feed_permalink = null;
477
+ $options = get_option(WDI_OPT);
478
+
479
+ if ($wdi_sample_feed_post_url == '1') {
480
+ $wdi_sample_feed_post_id = get_option('wdi_sample_feed_post_id');
481
+ $wdi_sample_feed_id = get_option('wdi_sample_feed_id');
482
+ require_once(WDI_DIR . '/admin/models/WDIModelFeeds_wdi.php');
483
+ $feed_model = new WDIModelFeeds_wdi();
484
+ //getting all feed information from db
485
+ $feed_row = WDILibrary::objectToArray($feed_model->get_feed_row($wdi_sample_feed_id));
486
+ $demo_page_status = get_post_status($wdi_sample_feed_post_id);
487
+
488
+
489
+ if ($wdi_sample_feed_post_id !== false && $demo_page_status != false && $demo_page_status != 'trash') {
490
+ $default_feed_permalink = get_post_permalink($wdi_sample_feed_post_id);
491
+ if (!is_string($default_feed_permalink)) {
492
+ $default_feed_permalink = null;
493
+ }
494
+ }
495
+ }
496
+
497
+ ?>
498
+ <div id="login_with_instagram">
499
+ <?php if (!isset($options['wdi_access_token']) || $options['wdi_access_token'] == '') {
500
+ WDILibrary::add_auth_button();
501
+ }
502
+ if (isset($options['wdi_access_token']) && $options['wdi_access_token'] != '' && $default_feed_permalink !== null) { ?>
503
+ <a target="_blank" href="<?php echo $default_feed_permalink; ?>" class="wdi_default_feed_button"></a>
504
+ <?php }
505
+
506
+ if(isset($options['wdi_access_token']) && $options['wdi_access_token'] != '' && isset($feed_row)){
507
+ ?>
508
+ <a target="_blank" href="<?php echo esc_url(add_query_arg(array('page'=>'wdi_feeds',
509
+ 'task'=>'edit',
510
+ 'current_id' => $wdi_sample_feed_id,
511
+ 'nonce_wd' => wp_create_nonce('nonce_wd')
512
+ ), admin_url('admin.php'))); ?>" class="wdi_edit_default_feed_button"></a>
513
+ <?php } ?>
514
+ </div>
515
+
516
+ <div class="wdi_access_token_missing">
517
+ <?php
518
+
519
+ if (!isset($options['wdi_access_token']) || $options['wdi_access_token'] == '' || !isset($options['wdi_user_name']) || $options['wdi_user_name'] == '')
520
+ _e('You need Access Token for using Instagram API. Click sign in with Instagram button above to get yours. This will not show your Instagram media. After that you may create your feed.', "wd-instagram-feed");
521
+ ?>
522
+ </div>
523
+ <?php
524
+ }
525
+
526
+ //Callback function for Settings Customize Section
527
+ function wdi_customize_section_callback(){
528
+
529
+ }
530
+
531
+ //Callback function for Multiple accounts Section
532
+ function wdi_multiple_accounts_section_callback(){
533
+
534
+ }
535
+
536
+ //Settings field callback:
537
+ //receives settings element as parameter and checks it's type and displays proper form element
538
+ function wdi_field_callback($element){
539
+ $setting = $element[0];
540
+ $wdi_formBuilder = new WDI_admin_view();
541
+ switch($setting['type']) {
542
+ case 'input':{
543
+ $wdi_formBuilder->input($setting);
544
+ break;
545
+ }
546
+ case 'checkbox':{
547
+ $wdi_formBuilder->checkbox($setting);
548
+ break;
549
+ }
550
+ case 'color':{
551
+ $wdi_formBuilder->color($setting);
552
+ break;
553
+ }
554
+ case 'textarea':{
555
+ $wdi_formBuilder->textarea($setting);
556
+ break;
557
+ }
558
+ case 'select':{
559
+ $wdi_formBuilder->select($setting);
560
+ break;
561
+ }
562
+ case 'link_button':{
563
+ $wdi_formBuilder->link_button($setting);
564
+ break;
565
+ }
566
+ case 'users_list':{
567
+ $wdi_formBuilder->users_list($setting);
568
+ break;
569
+ }
570
+ }
571
+ }
572
+
573
+ //Validatates input form submit forms
574
+ function wdi_validate_options($input){
575
+ global $wdi_options;
576
+ foreach( $input as $key => $value ) {
577
+ if( isset( $input[$key] ) ) {
578
+ $wdi_options[$key] = strip_tags( stripslashes( $input[ $key ] ) );
579
+ }
580
+ }
581
+
582
+ return apply_filters( 'wdi_validate_options', $wdi_options, $input );
583
+ }
584
+
585
+ function wdi_sanitize_options( $input ) {
586
+ $output = array();
587
+ $elements = wdi_get_settings();
588
+ foreach ( $input as $key => $value ) {
589
+ if ( isset($elements[$key]['sanitize_type']) ) {
590
+ switch ( $elements[$key]['sanitize_type'] ) {
591
+ case 'text':
592
+ {
593
+ if ( isset($input[$key]) ) {
594
+ $output[$key] = strip_tags(stripslashes($input[$key]));
595
+ }
596
+ break;
597
+ }
598
+ case 'css':
599
+ {
600
+ $output[$key] = esc_js(str_replace(array( "\n", "\r" ), "", $input[$key]));
601
+ break;
602
+ }
603
+ case 'users_list':
604
+ {
605
+ global $wdi_options;
606
+ $users_list = array();
607
+ $option = $input['wdi_authenticated_users_list'];
608
+ //$saved_user_list = json_decode($wdi_options['wdi_authenticated_users_list'], true);
609
+ if ( !empty($option['access_token']) ) {
610
+
611
+ $user_count = count($option['access_token']);
612
+ for ( $i = 0; $i < $user_count; $i++ ) {
613
+
614
+ if ( !empty($option['access_token'][$i]) && !empty($option['user_name'][$i]) && !empty($option['user_id'][$i]) ) {
615
+
616
+ $user_name = $option['user_name'][$i];
617
+ if ( $wdi_options['wdi_user_name'] === $user_name ) {
618
+ continue;
619
+ }
620
+ $users_list[$user_name] = array(
621
+ 'access_token' => $option['access_token'][$i],
622
+ 'user_name' => $user_name,
623
+ 'user_id' => $option['user_id'][$i],
624
+ );
625
+ }
626
+ }
627
+ }
628
+ if ( isset($users_list[$input['wdi_user_name']]) ) {
629
+ unset($users_list[$input['wdi_user_name']]);
630
+ }
631
+ $output[$key] = json_encode($users_list);
632
+ break;
633
+ }
634
+ default:
635
+ {
636
+ if ( isset($input[$key]) ) {
637
+ if ( is_array($input[$key]) ) {
638
+ $output[$key] = strip_tags(stripslashes(json_encode($input[$key])));
639
+ }
640
+ else {
641
+ $output[$key] = strip_tags(stripslashes($input[$key]));
642
+ }
643
+ }
644
+ break;
645
+ }
646
+ }
647
+ }
648
+ }
649
+
650
+ return apply_filters('wdi_sanitize_options', $output, $input);
651
+ }
652
+ //Sets all settings for admin pages and returns associative array of settings
653
+ function wdi_get_settings(){
654
+ $opt = wdi_get_options();
655
+
656
+ if(empty($opt['fb_token']) || empty($opt['business_account_id'])) {
657
+ $fb_button_text = "Log In with Facebook";
658
+ } else {
659
+ $fb_button_text = "Reconnect";
660
+ }
661
+
662
+ $settings = array(
663
+ 'wdi_access_token' => array('name' => 'wdi_access_token','sanitize_type'=>'text','input_size'=>'53','type'=>'input','default'=>'','field_or_not'=>'field','section'=>'wdi_configure_section','title'=>__('Primary Access Token',"wd-instagram-feed")),
664
+ 'wdi_user_name' => array('name' => 'wdi_user_name','sanitize_type'=>'text', 'type'=>'input','input_size'=>'53','section'=>'wdi_configure_section','field_or_not'=>'field','default'=>'','title'=>__('Primary Username',"wd-instagram-feed")),
665
+ 'wdi_user_id' => array('name' => 'wdi_user_id','sanitize_type'=>'text','type'=>'input','section'=>'wdi_configure_section','readonly'=>'readonly','default'=>'','field_or_not'=>'no_field'),
666
+ 'wdi_fb_auth' => array('name'=>'wdi_fb_auth','sanitize_type'=>'','field_or_not'=>'','type'=>'link_button', 'section'=>'wdi_configure_section', 'href'=>wdi_get_graph_auth_url(), 'title'=>__('Log in for hashtag feed',"wd-instagram-feed"),'default'=>'', 'value'=>$fb_button_text, 'description' => 'Connect to Facebook Graph API to get hashtag feeds. See more in <a href="https://help.10web.io/hc/en-us/articles/360021344111?utm_source=instagram_feed&utm_medium=free_plugin" target="_blank">documentation</a>.'),
667
+ 'wdi_transient_time' => array('name'=>'wdi_transient_time','sanitize_type'=>'number','field_or_not'=>'','type'=>'input', 'input_type'=>'number', 'section'=>'wdi_customize_section', 'title'=>__('Check for new posts every (min)',"wd-instagram-feed"),'default'=>'' ,'value'=>60),
668
+ 'wdi_reset_cache' => array('name'=>'wdi_reset_cache','sanitize_type'=>'','field_or_not'=>'','type'=>'link_button', 'section'=>'wdi_customize_section', 'href'=>admin_url( 'admin.php?page=wdi_settings' ), 'title'=>__('Reset cache with Instagram data',"wd-instagram-feed"),'default'=>'', 'value'=>'Reset cache'),
669
+ /* @TODO temporarily closed for update․
670
+ 'wdi_authenticated_users_list' => array('name' => 'wdi_authenticated_users_list','sanitize_type'=>'users_list','input_size'=>'53','type'=>'users_list','default'=>'[]','field_or_not'=>'field','section'=>'wdi_customize_section','title'=>__('Multiple Instagram accounts ?',"wd-instagram-feed")),*/
671
+ 'wdi_feeds_min_capability' => array('name'=>'wdi_feeds_min_capability',"sanitize_type"=> "text",'title'=>__('Minimal role to add and manage Feeds or Themes',"wd-instagram-feed"),'type'=>'select','field_or_not'=>'field',"default"=>"manage_options",'section'=>'wdi_customize_section','valid_options'=>array('manage_options'=>__('Administrator', 'wd-instagram-feed'),'publish_posts'=>__('Author', 'wd-instagram-feed'), 'contributor'=>__('Contributor', 'wd-instagram-feed'))),
672
+ 'wdi_custom_css'=>array('name'=>'wdi_custom_css','sanitize_type'=>'css','type'=>'textarea','section'=>'wdi_customize_section','field_or_not'=>'field','default'=>'','title'=>__('Custom CSS',"wd-instagram-feed")),
673
+ 'wdi_custom_js'=>array('name'=>'wdi_custom_js','sanitize_type'=>'css','type'=>'textarea','section'=>'wdi_customize_section','field_or_not'=>'field','default'=>'','title'=>__('Custom JavaScript',"wd-instagram-feed")),
674
+ //'wdi_preserve_settings_when_remove'=>array('name'=>'wdi_preserve_settings_when_remove','field_or_not'=>'field','type'=>'checkbox','default'=>'1', 'section'=>'wdi_configure_section','title'=>__('Preserve Settings When Remove',"wd-instagram-feed")),
675
+ 'wdi_plugin_uninstalled' => array('name'=>'wdi_plugin_uninstalled','sanitize_type'=>'bool','field_or_not'=>'field','type'=>'input','input_type'=>'hidden','section'=>'wdi_customize_section','title'=>'','default'=>'false','value'=>'false'),
676
+ 'fb_token' => array('name'=>'fb_token','sanitize_type'=>'','field_or_not'=>'field','type'=>'input','input_type'=>'hidden','section'=>'wdi_customize_section','title'=>'','default'=>''),
677
+ 'business_account_id' => array('name'=>'business_account_id','sanitize_type'=>'','field_or_not'=>'field','type'=>'input','input_type'=>'hidden','section'=>'wdi_customize_section','title'=>'','default'=>''),
678
+ 'wdi_uninstall' => array('name'=>'wdi_uninstall','sanitize_type'=>'','field_or_not'=>'','type'=>'link_button', 'section'=>'wdi_customize_section', 'href'=>admin_url( 'admin.php?page=wdi_uninstall' ), 'title'=>__('Uninstall',"wd-instagram-feed"),'default'=>''),
679
+ //'wdi_version' => array('name'=>'wdi_version','field_or_not'=>'no_field','default'=>WDI_VERSION),
680
+ //'wdi_first_time'=>array('name'=>'wdi_first_time','field_or_not'=>'no_field','default'=>'1')
681
+ );
682
+ return $settings;
683
+ }
684
+
685
+ //Sets plugin default settings
686
+ function wdi_set_options_defaults(){
687
+ $db_options = array();
688
+ $options = get_option(WDI_OPT);
689
+
690
+ $settings = wdi_get_settings();
691
+ foreach ($settings as $setting) {
692
+ $settingDefault = isset($setting['default'])? $setting['default'] : '';
693
+ $db_options[$setting['name']]=$settingDefault;
694
+ }
695
+
696
+ $options = wp_parse_args( $options, $db_options );
697
+ if(isset($options['wdi_plugin_uninstalled']) && $options['wdi_plugin_uninstalled'] == 'true'){
698
+ $options['wdi_plugin_uninstalled'] = 'false';
699
+ }
700
+
701
+ if(empty($options['wdi_authenticated_users_list'])){
702
+ $options['wdi_authenticated_users_list'] = '[]';
703
+ }
704
+
705
+ add_option(WDI_OPT,$options,'','yes');
706
+ update_option(WDI_OPT,$options,'yes');
707
+ wdi_get_options();
708
+ }
709
+
710
+ function wdi_get_options() {
711
+ global $wdi_options;
712
+ $wdi_options = get_option(WDI_OPT);
713
+ return apply_filters('wdi_get_options', $wdi_options);
714
+ }
715
+
716
+ function wdi_install_default_themes(){
717
+ global $wdi_options;
718
+ global $wpdb;
719
+ require_once WDI_DIR . "/templates/default-themes.php";
720
+ $default_themes = wdi_get_default_themes();
721
+ foreach ($default_themes as $theme) {
722
+ $table_name = $wpdb->prefix . WDI_THEME_TABLE;
723
+ if ($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
724
+ require_once(WDI_DIR . '/framework/WDILibrary.php');
725
+ echo WDILibrary::message(__('Database error, please uninstall the plugin and install again', "wd-instagram-feed"), 'error');
726
+ }
727
+ else {
728
+ $wpdb->insert($table_name, $theme);
729
+ }
730
+ }
731
+ }
732
+
733
+ function wdi_get_create_feeds_cap(){
734
+ global $wdi_options;
735
+ $min_feeds_capability = isset($wdi_options['wdi_feeds_min_capability']) ? $wdi_options['wdi_feeds_min_capability'] : "manage_options";
736
+ if($min_feeds_capability == 'publish_posts') {
737
+ $min_feeds_capability = 'publish_posts';
738
+ } else if($min_feeds_capability == 'contributor') {
739
+ $min_feeds_capability = 'contributor';
740
+ } else {
741
+ $min_feeds_capability = 'manage_options';
742
+ }
743
+ return $min_feeds_capability;
744
+ }
745
+
746
+ function wdi_get_graph_auth_url(){
747
+ $app_id = '356432828483035';
748
+ $redirect_uri = 'https://api.web-dorado.com/wdi/';
749
+
750
+ $admin_url = admin_url('admin.php?page=wdi_settings');
751
+
752
+ $state = array(
753
+ 'wp_site_url' => $admin_url
754
+ );
755
+
756
+ $fb_url = add_query_arg(array(
757
+ 'client_id' => $app_id,
758
+ 'redirect_uri' => $redirect_uri,
759
+ 'scope' => 'manage_pages,instagram_basic',
760
+ ), "https://www.facebook.com/dialog/oauth");
761
+
762
+ $fb_url .= '&state=' . base64_encode(json_encode($state));
763
+ return $fb_url;
764
+ }
 
 
 
 
 
 
 
 
admin/controllers/WDIControllerEditorShortcode.php CHANGED
@@ -1,43 +1,43 @@
1
- <?php
2
-
3
- class WDIControllerEditorShortcode {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- $this->display();
23
- }
24
-
25
- public function display() {
26
- require_once WDI_DIR . "/admin/models/WDIModelEditorShortcode.php";
27
- $model = new WDIModelEditorShortcode();
28
-
29
- require_once WDI_DIR . "/admin/views/WDIViewEditorShortcode.php";
30
- $view = new WDIViewEditorShortcode($model);
31
- $view->display();
32
- }
33
-
34
- ////////////////////////////////////////////////////////////////////////////////////////
35
- // Getters & Setters //
36
- ////////////////////////////////////////////////////////////////////////////////////////
37
- ////////////////////////////////////////////////////////////////////////////////////////
38
- // Private Methods //
39
- ////////////////////////////////////////////////////////////////////////////////////////
40
- ////////////////////////////////////////////////////////////////////////////////////////
41
- // Listeners //
42
- ////////////////////////////////////////////////////////////////////////////////////////
43
  }
1
+ <?php
2
+
3
+ class WDIControllerEditorShortcode {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute() {
22
+ $this->display();
23
+ }
24
+
25
+ public function display() {
26
+ require_once WDI_DIR . "/admin/models/WDIModelEditorShortcode.php";
27
+ $model = new WDIModelEditorShortcode();
28
+
29
+ require_once WDI_DIR . "/admin/views/WDIViewEditorShortcode.php";
30
+ $view = new WDIViewEditorShortcode($model);
31
+ $view->display();
32
+ }
33
+
34
+ ////////////////////////////////////////////////////////////////////////////////////////
35
+ // Getters & Setters //
36
+ ////////////////////////////////////////////////////////////////////////////////////////
37
+ ////////////////////////////////////////////////////////////////////////////////////////
38
+ // Private Methods //
39
+ ////////////////////////////////////////////////////////////////////////////////////////
40
+ ////////////////////////////////////////////////////////////////////////////////////////
41
+ // Listeners //
42
+ ////////////////////////////////////////////////////////////////////////////////////////
43
  }
admin/controllers/WDIControllerFeeds_wdi.php CHANGED
@@ -1,575 +1,568 @@
1
- <?php
2
- class WDIControllerFeeds_wdi {
3
-
4
- private $dataFormat;
5
-
6
- public function __construct() {
7
- $this->setDataFormat();
8
- }
9
-
10
- public function execute() {
11
- $task = WDILibrary::get('task');
12
- $id = WDILibrary::get('current_id', 0);
13
- $message = WDILibrary::get('message');
14
- echo WDILibrary::message_id($message);
15
- $get_method_tasks = array(
16
- "add",
17
- "edit",
18
- "display"
19
- );
20
- if ( method_exists($this, $task) ) {
21
- if( !in_array($task , $get_method_tasks) ) {
22
- check_admin_referer('nonce_wd', 'nonce_wd');
23
- }
24
- $this->$task($id);
25
- }
26
- else {
27
- $search_value = WDILibrary::get('search_value', '');
28
- if( !empty($search_value) ) {
29
- WDILibrary::wdi_spider_redirect(add_query_arg(array(
30
- 'page' => WDILibrary::get('page'),
31
- 'task' => 'display',
32
- 'search' => $search_value,
33
- ), admin_url('admin.php')));
34
- }else{
35
- $this->display();
36
- }
37
- }
38
- }
39
-
40
- public function create_feed($settings = array()) {
41
- require_once WDI_DIR . "/admin/models/WDIModelFeeds_wdi.php";
42
- $model = new WDIModelFeeds_wdi();
43
-
44
- $defaults = $model->wdi_get_feed_defaults();
45
-
46
- if (!empty($settings)) {
47
- $settings = $this->sanitize_input($settings, $defaults);
48
- $settings = wp_parse_args($settings, $defaults);
49
- } else {
50
- $settings = $defaults;
51
- }
52
-
53
- global $wpdb;
54
-
55
- $wpdb->insert($wpdb->prefix . WDI_FEED_TABLE, $settings, $this->dataFormat);
56
- return $wpdb->insert_id;
57
- }
58
-
59
- private function setDataFormat(){
60
- $this->dataFormat = array(
61
- '%s',/*feed_name*/
62
- '%s',/*feed_thumb*/
63
- '%s',/*thumb_user*/
64
- '%d',/*published*/
65
- '%d',/*theme_id*/
66
-
67
- '%s',/*feed_users*/
68
- '%s',/*feed_display_view*/
69
- '%s',/*sort_images_by*/
70
- '%s',/*display_order*/
71
- '%d',/*follow_on_instagram_btn*/
72
-
73
- '%d',/*display_header*/
74
- '%d',/*number_of_photos*/
75
- '%d',/*load_more_number*/
76
- '%d',/*'pagination_per_page_number'*/
77
- '%d',/*'pagination_preload_number'*/
78
-
79
- '%d',/*image_browser_preload_number*/
80
- '%d',/*image_browser_load_number*/
81
- '%d',/*number_of_columns*/
82
- '%d',/*resort_after_load_more*/
83
- '%d',/*show_likes*/
84
-
85
- '%d',/*show_description*/
86
- '%d',/*show_comments*/
87
- '%d',/*show_usernames*/
88
- '%d',/*display_user_info*/
89
- '%d',//'display_user_post_follow_number'
90
-
91
- '%d',/*show_full_description*/
92
- '%d',/*disable_mobile_layout*/
93
- '%s',/*feed_type*/
94
- '%s',/*feed_item_onclick*/
95
-
96
- '%d',//'popup_fullscreen'=>'bool',
97
-
98
- '%d',//'popup_width'=>'number',
99
- '%d',//'popup_height'=>'number',
100
- '%s',//'popup_type'=>'string',
101
- '%d',//'popup_autoplay'=>'bool',
102
- '%d',//'popup_interval'=>'number',
103
-
104
- '%d',//'popup_enable_filmstrip'=>'bool',
105
- '%d',//'popup_filmstrip_height'=>'number',
106
- '%d',//'autohide_lightbox_navigation'=>'bool',
107
- '%d',//'popup_enable_ctrl_btn'=>'bool',
108
- '%d',//'popup_enable_fullscreen'=>'bool',
109
-
110
- '%d',//'popup_enable_info'=>'bool',
111
- '%d',//'popup_info_always_show'=>'bool',
112
- '%d',//'popup_info_full_width'=>'bool',
113
- '%d',//'popup_enable_comment'=>'bool',
114
- '%d',//'popup_enable_fullsize_image'=>'bool',
115
-
116
- '%d',//'popup_enable_download'=>'bool',
117
- '%d',//popup_enable_share_buttons=>'bool',
118
- '%d',//'popup_enable_facebook'=>'bool',
119
- '%d',//'popup_enable_twitter'=>'bool',
120
- '%d',//'popup_enable_google'=>'bool',
121
-
122
- '%d',//'popup_enable_pinterest'=>'bool',
123
- '%d',//'popup_enable_tumblr'=>'bool',
124
- '%d',//'show_image_counts'=>'bool',
125
- '%d',//'enable_loop'=>'bool'
126
- '%d',//popup_image_right_click=>'bool'
127
-
128
- '%s',//'conditional_filters' => 'string',
129
- '%s',//'conditional_filter_type' => 'string'
130
- '%d',/*show_username_on_thumb*/
131
- '%d',//'conditional_filter_enable'=>'0',
132
- '%s',//'liked_feed' => 'string'
133
- '%d',//'mobile_breakpoint'=>'640',
134
- '%s',//'redirect_url',
135
- '%s',//'feed_resolution',
136
-
137
- );
138
- }
139
- private function display() {
140
- require_once (WDI_DIR . "/admin/models/WDIModelFeeds_wdi.php");
141
- $model = new WDIModelFeeds_wdi();
142
-
143
- require_once (WDI_DIR . "/admin/views/WDIViewFeeds_wdi.php");
144
- $view = new WDIViewFeeds_wdi($model);
145
- $view->display();
146
- }
147
-
148
- private function add() {
149
- require_once WDI_DIR . "/admin/models/WDIModelFeeds_wdi.php";
150
- $model = new WDIModelFeeds_wdi();
151
-
152
- require_once WDI_DIR . "/admin/views/WDIViewFeeds_wdi.php";
153
- $view = new WDIViewFeeds_wdi($model);
154
- $view->edit(0);
155
- }
156
-
157
-
158
- private function edit($customId = '') {
159
-
160
- require_once WDI_DIR . "/admin/models/WDIModelFeeds_wdi.php";
161
- $model = new WDIModelFeeds_wdi();
162
-
163
- require_once WDI_DIR . "/admin/views/WDIViewFeeds_wdi.php";
164
- $view = new WDIViewFeeds_wdi($model);
165
- if($customId != ''){
166
- $id = $customId;
167
- }else{
168
- $id = (int) WDILibrary::get('current_id', 0);
169
- }
170
- $view->edit($id);
171
- }
172
-
173
- private function apply() {
174
- $this->save_slider_db();
175
- $this->save_slide_db();
176
- $this->edit();
177
- }
178
-
179
- private function save_feed(){
180
- require_once WDI_DIR . "/admin/models/WDIModelFeeds_wdi.php";
181
- $model = new WDIModelFeeds_wdi();
182
-
183
- $settings = isset($_POST[WDI_FSN]) ? (array) $_POST[WDI_FSN]: array();
184
- $defaults = $model->wdi_get_feed_defaults();
185
- $settings = $this->sanitize_input($settings,$defaults);
186
- $settings = wp_parse_args( $settings, $defaults );
187
- $settings = $this->check_settings($settings);
188
-
189
- global $wpdb;
190
- $action = WDILibrary::get('add_or_edit', '');
191
- if( $action=='' ){
192
- $wpdb->insert($wpdb->prefix. WDI_FEED_TABLE, $settings,$this->dataFormat);
193
- if($wpdb->insert_id == false){
194
- $this->message(__('Cannot Write on database. Check database permissions.',"wd-instagram-feed"),'error');
195
- }
196
- }else{
197
- $msg = $wpdb->update($wpdb->prefix. WDI_FEED_TABLE, $settings, array('id'=>$action), $this->dataFormat,array('%d'));
198
- if($msg == false){
199
- $this->message(__("You have not made new changes","wd-instagram-feed"),'notice');
200
- }else{
201
- $this->message(__("Successfully saved","wd-instagram-feed"),"updated");
202
- }
203
- }
204
- $this->display();
205
- }
206
-
207
- private function apply_changes(){
208
- require_once WDI_DIR . "/admin/models/WDIModelFeeds_wdi.php";
209
- global $wpdb;
210
- $model = new WDIModelFeeds_wdi();
211
- $settings = isset($_POST[WDI_FSN]) ? (array) $_POST[WDI_FSN] : array();
212
- $defaults = $model->wdi_get_feed_defaults();
213
- $settings = $this->sanitize_input($settings,$defaults);
214
- $settings = wp_parse_args( $settings, $defaults );
215
- $settings = $this->check_settings($settings);
216
- $action = WDILibrary::get('add_or_edit', '');
217
- if( $action == '' ){
218
- $wpdb->insert($wpdb->prefix. WDI_FEED_TABLE, $settings,$this->dataFormat);
219
- if($wpdb->insert_id == false){
220
- $message = 24;
221
- }else{
222
- $message = 23;
223
- }
224
- }else{
225
- $msg = $wpdb->update($wpdb->prefix. WDI_FEED_TABLE, $settings, array('id'=>$action), $this->dataFormat,array('%d'));
226
- if($msg == false){
227
- $message = 24;
228
- }else{
229
- $message = 23;
230
- }
231
- }
232
- $wdi_current_task = 'edit';
233
- if(!empty($action)){
234
- $wdi_current_id = $action;
235
- }elseif ($wpdb->insert_id != false){
236
- $wdi_current_id = $wpdb->insert_id;
237
- }else{
238
- $wdi_current_task = "display";
239
- $wdi_current_id = 0;
240
- }
241
-
242
- WDILibrary::wdi_spider_redirect(add_query_arg(array(
243
- 'page' => WDILibrary::get('page'),
244
- 'task' => $wdi_current_task,
245
- 'current_id' => $wdi_current_id,
246
- 'message' =>$message,
247
- ), admin_url('admin.php')));
248
-
249
-
250
- }
251
-
252
- private function cancel(){
253
- $this->display();
254
- }
255
-
256
- private function duplicate($id) {
257
- $message = 20;
258
- $duplicated = $this->duplicate_tabels($id);
259
- if($duplicated){
260
- $message = 18;
261
- }
262
- WDILibrary::wdi_spider_redirect(add_query_arg(array(
263
- 'page' => WDILibrary::get('page'),
264
- 'task' => 'display',
265
- 'message' => $message,
266
- ), admin_url('admin.php')));
267
-
268
- }
269
- private function duplicate_all($id) {
270
- global $wpdb;
271
- $message = 19;
272
- $flag = false;
273
-
274
- $feed_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . WDI_FEED_TABLE);
275
- foreach ($feed_ids_col as $slider_id) {
276
- $check_id = WDILibrary::get('check_' . $slider_id, '');
277
- if ( !empty($check_id) ) {
278
- if(!$flag){
279
- $flag = true;
280
- }
281
- $this->duplicate_tabels($slider_id);
282
- }
283
- }
284
- if(!$flag){
285
- $message = 6;
286
- }
287
-
288
- WDILibrary::wdi_spider_redirect(add_query_arg(array(
289
- 'page' => WDILibrary::get('page'),
290
- 'task' => 'display',
291
- 'message' => $message,
292
- ), admin_url('admin.php')));
293
-
294
- }
295
-
296
- private function duplicate_tabels($feed_id) {
297
- global $wpdb;
298
- if ($feed_id) {
299
- $feed_row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . WDI_FEED_TABLE.' where id="%d"', $feed_id));
300
- }
301
-
302
- if ($feed_row) {
303
- $duplicate_values = WDILibrary::objectToArray($feed_row);
304
- unset($duplicate_values['id']);
305
- $save = $wpdb->insert($wpdb->prefix . WDI_FEED_TABLE,$duplicate_values, $this->dataFormat);
306
- $new_slider_id = $wpdb->get_var('SELECT MAX(id) FROM ' . $wpdb->prefix . WDI_FEED_TABLE);
307
- }
308
- return $new_slider_id;
309
- }
310
-
311
- private function delete($id) {
312
- global $wpdb;
313
- $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . WDI_FEED_TABLE. ' WHERE id="%d"', $id);
314
- if ($wpdb->query($query)) {
315
- echo WDILibrary::message(__('Item Succesfully Deleted.',"wd-instagram-feed"), 'updated');
316
- }
317
- else {
318
- echo WDILibrary::message(__('Error. Please install plugin again.', "wd-instagram-feed"), 'error');
319
- }
320
- $this->display();
321
- }
322
-
323
- private function delete_all() {
324
- global $wpdb;
325
- $flag = FALSE;
326
- $feed_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . WDI_FEED_TABLE);
327
- foreach ($feed_ids_col as $slider_id) {
328
- $check_id = WDILibrary::get('check_' . $slider_id, '');
329
- $check_all_items = WDILibrary::get('check_all_items', '');
330
- if ( !empty($check_id) || !empty($check_all_items) ) {
331
- $flag = TRUE;
332
- $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . WDI_FEED_TABLE.' WHERE id="%d"', $slider_id);
333
- $wpdb->query($query);
334
- }
335
- }
336
- if ($flag) {
337
- $message = 5;
338
- }
339
- else {
340
- $message = 6;
341
- }
342
- WDILibrary::wdi_spider_redirect(add_query_arg(array(
343
- 'page' => WDILibrary::get('page'),
344
- 'task' => 'display',
345
- 'message' => $message,
346
- ), admin_url('admin.php')));
347
-
348
- }
349
-
350
- private function publish($id) {
351
- global $wpdb;
352
- $message = 20;
353
-
354
- $save = $wpdb->update($wpdb->prefix . WDI_FEED_TABLE, array('published' => 1), array('id' => $id));
355
- if ($save !== FALSE) {
356
- $message = 9;
357
- }
358
- WDILibrary::wdi_spider_redirect(add_query_arg(array(
359
- 'page' => WDILibrary::get('page'),
360
- 'task' => 'display',
361
- 'message' => $message,
362
- ), admin_url('admin.php')));
363
-
364
- }
365
-
366
- private function publish_all() {
367
- global $wpdb;
368
- $flag = FALSE;
369
- $check_all_items = WDILibrary::get('check_all_items', '');
370
- if ( isset($check_all_items) ) {
371
- $wpdb->query('UPDATE ' . $wpdb->prefix . WDI_FEED_TABLE .' SET published=1');
372
- $flag = TRUE;
373
- }
374
- else {
375
- $feed_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . WDI_FEED_TABLE);
376
- foreach ($feed_ids_col as $slider_id) {
377
- $check_id = WDILibrary::get('check_' . $slider_id, '');
378
- if ( !empty($check_id) ) {
379
- $flag = TRUE;
380
- $wpdb->update($wpdb->prefix . WDI_FEED_TABLE, array('published' => 1), array('id' => $slider_id));
381
- }
382
- }
383
- }
384
- if ($flag) {
385
- $message = 10;
386
- }
387
- else {
388
- $message = 6;
389
- }
390
- WDILibrary::wdi_spider_redirect(add_query_arg(array(
391
- 'page' => WDILibrary::get('page'),
392
- 'task' => 'display',
393
- 'message' => $message,
394
- ), admin_url('admin.php')));
395
-
396
- }
397
-
398
- private function unpublish($id) {
399
- global $wpdb;
400
- $message = 20;
401
- $save = $wpdb->update($wpdb->prefix . WDI_FEED_TABLE, array('published' => 0), array('id' => $id));
402
- if($save !== FALSE){
403
- $message = 11;
404
- }
405
- WDILibrary::wdi_spider_redirect(add_query_arg(array(
406
- 'page' => WDILibrary::get('page'),
407
- 'task' => 'display',
408
- 'message' => $message,
409
- ), admin_url('admin.php')));
410
-
411
- }
412
-
413
- private function unpublish_all() {
414
- global $wpdb;
415
- $flag = FALSE;
416
- $check_all_items = WDILibrary::get('check_all_items', '');
417
- if ( isset($check_all_items) ) {
418
- $wpdb->query('UPDATE ' . $wpdb->prefix . WDI_FEED_TABLE.' SET published=0');
419
- $flag = TRUE;
420
- }
421
- else {
422
- $feed_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . WDI_FEED_TABLE);
423
- foreach ($feed_ids_col as $slider_id) {
424
- $check_id = WDILibrary::get('check_' . $slider_id, '');
425
- if ( !empty($check_id) ) {
426
- $flag = TRUE;
427
- $wpdb->update($wpdb->prefix . WDI_FEED_TABLE, array('published' => 0), array('id' => $slider_id));
428
- }
429
- }
430
- }
431
- if ($flag) {
432
- $message = 12;
433
- }
434
- else {
435
- $message = 6;
436
- }
437
- WDILibrary::wdi_spider_redirect(add_query_arg(array(
438
- 'page' => WDILibrary::get('page'),
439
- 'task' => 'display',
440
- 'message' => $message,
441
- ), admin_url('admin.php')));
442
-
443
- }
444
-
445
- private function check_settings($settings){
446
- if($settings['feed_users']){
447
- $settings['feed_users'] = json_decode($settings['feed_users']);
448
- $settings['feed_users'] = json_encode(array($settings['feed_users'][0]));
449
- };
450
- if(intval($settings['theme_id']) > 1){
451
- $settings['theme_id'] = '1';
452
- };
453
- if($settings['feed_display_view'] === 'infinite_scroll'){
454
- $settings['feed_display_view'] = 'load_more_btn';
455
- }
456
- if($settings['feed_type'] === 'masonry' || $settings['feed_type'] === 'blog_style'){
457
- $settings['feed_type'] = 'thumbnails';
458
- }
459
- if($settings['popup_enable_filmstrip'] == '1'){
460
- $settings['popup_enable_filmstrip'] = '0';
461
- }
462
- if($settings['popup_filmstrip_height'] != '70'){
463
- $settings['popup_filmstrip_height'] = '70';
464
- }
465
- if($settings['popup_enable_comment'] == '1'){
466
- $settings['popup_enable_comment'] = '0';
467
- }
468
- if($settings['popup_enable_share_buttons'] == '1'){
469
- $settings['popup_enable_share_buttons'] = '0';
470
- }
471
-
472
- if($settings['popup_info_always_show'] == '1'){
473
- $settings['popup_info_always_show'] = '0';
474
- }
475
-
476
- if($settings['popup_info_full_width'] == '1'){
477
- $settings['popup_info_full_width'] = '0';
478
- }
479
-
480
- if($settings['popup_enable_info'] == '1'){
481
- $settings['popup_enable_info'] = '0';
482
- }
483
- if($settings['show_likes'] == '1'){
484
- $settings['show_likes'] = '0';
485
- }
486
-
487
- if($settings['show_description'] == '1'){
488
- $settings['show_description'] = '0';
489
- }
490
-
491
- if($settings['show_comments'] == '1'){
492
- $settings['show_comments'] = '0';
493
- }
494
-
495
- if($settings['show_username_on_thumb'] == '1'){
496
- $settings['show_username_on_thumb'] = '0';
497
- }
498
-
499
- if($settings['conditional_filter_enable'] == '1'){
500
- $settings['conditional_filter_enable'] = '0';
501
- }
502
- if($settings['liked_feed'] == 'liked'){
503
- $settings['liked_feed'] = 'userhash';
504
- }
505
- return $settings;
506
- }
507
-
508
- private function sanitize_input($settings,$defaults){
509
- require_once WDI_DIR . "/admin/models/WDIModelFeeds_wdi.php";
510
- $model = new WDIModelFeeds_wdi();
511
- $sanitize_types=$model->get_sanitize_types();
512
- $sanitized_output = array();
513
- foreach ($settings as $setting_name => $value) {
514
- switch($sanitize_types[$setting_name]){
515
- case 'string':{
516
- $sanitized_val=$this->sanitize_string($value,$defaults[$setting_name]);
517
- $sanitized_output[$setting_name] = $sanitized_val;
518
- break;
519
- }
520
- case 'number':{
521
- $sanitized_val=$this->sanitize_number($value,$defaults[$setting_name]);
522
- $sanitized_output[$setting_name] = $sanitized_val;
523
- break;
524
- }
525
- case 'bool':{
526
- $sanitized_val=$this->sanitize_bool($value,$defaults[$setting_name]);
527
- $sanitized_output[$setting_name] = $sanitized_val;
528
- break;
529
- }
530
- case 'url':{
531
- $sanitized_val=$this->sanitize_url($value,$defaults[$setting_name]);
532
- $sanitized_output[$setting_name] = $sanitized_val;
533
- break;
534
- }
535
- }
536
- }
537
- return $sanitized_output;
538
- }
539
-
540
- private function sanitize_bool($value,$default){
541
- if($value == 1 || $value == 0){
542
- return $value;
543
- }
544
- else{
545
- return $default;
546
- }
547
- }
548
- private function sanitize_string($value,$default){
549
- $sanitized_val = strip_tags(stripslashes($value));
550
- if($sanitized_val == ''){
551
- return $default;
552
- }else{
553
- return $sanitized_val;
554
- }
555
- }
556
- private function sanitize_number($value,$default){
557
- if(is_numeric($value) && $value>0){
558
- return $value;
559
- }else{
560
- return $default;
561
- }
562
- }
563
- private function sanitize_url($value,$default){
564
- if (function_exists('filter_var') && !filter_var($value, FILTER_VALIDATE_URL) === false) {
565
- return $value;
566
- } else {
567
- return $default;
568
- }
569
- }
570
-
571
- private function message($text,$type){
572
- require_once(WDI_DIR . '/framework/WDILibrary.php');
573
- echo WDILibrary::message($text, $type);
574
- }
575
- }
1
+ <?php
2
+ class WDIControllerFeeds_wdi {
3
+
4
+ private $dataFormat;
5
+
6
+ public function __construct() {
7
+ $this->setDataFormat();
8
+ }
9
+
10
+ public function execute() {
11
+ $task = WDILibrary::get('task');
12
+ $id = WDILibrary::get('current_id', 0);
13
+ $message = WDILibrary::get('message');
14
+ echo WDILibrary::message_id($message);
15
+ $get_method_tasks = array(
16
+ "add",
17
+ "edit",
18
+ "display"
19
+ );
20
+ if ( method_exists($this, $task) ) {
21
+ if( !in_array($task , $get_method_tasks) ) {
22
+ check_admin_referer('nonce_wd', 'nonce_wd');
23
+ }
24
+ $this->$task($id);
25
+ }
26
+ else {
27
+ $search_value = WDILibrary::get('search_value', '');
28
+ if( !empty($search_value) ) {
29
+ WDILibrary::wdi_spider_redirect(add_query_arg(array(
30
+ 'page' => WDILibrary::get('page'),
31
+ 'task' => 'display',
32
+ 'search' => $search_value,
33
+ ), admin_url('admin.php')));
34
+ }else{
35
+ $this->display();
36
+ }
37
+ }
38
+ }
39
+
40
+ public function create_feed($settings = array()) {
41
+ require_once WDI_DIR . "/admin/models/WDIModelFeeds_wdi.php";
42
+ $model = new WDIModelFeeds_wdi();
43
+
44
+ $defaults = $model->wdi_get_feed_defaults();
45
+
46
+ if (!empty($settings)) {
47
+ $settings = $this->sanitize_input($settings, $defaults);
48
+ $settings = wp_parse_args($settings, $defaults);
49
+ } else {
50
+ $settings = $defaults;
51
+ }
52
+
53
+ global $wpdb;
54
+
55
+ $wpdb->insert($wpdb->prefix . WDI_FEED_TABLE, $settings, $this->dataFormat);
56
+ return $wpdb->insert_id;
57
+ }
58
+
59
+ private function setDataFormat(){
60
+ $this->dataFormat = array(
61
+ '%s',/*feed_name*/
62
+ '%s',/*feed_thumb*/
63
+ '%s',/*thumb_user*/
64
+ '%d',/*published*/
65
+ '%d',/*theme_id*/
66
+
67
+ '%s',/*feed_users*/
68
+ '%s',/*feed_display_view*/
69
+ '%s',/*sort_images_by*/
70
+ '%s',/*display_order*/
71
+ '%d',/*follow_on_instagram_btn*/
72
+
73
+ '%d',/*display_header*/
74
+ '%d',/*number_of_photos*/
75
+ '%d',/*load_more_number*/
76
+ '%d',/*'pagination_per_page_number'*/
77
+ '%d',/*'pagination_preload_number'*/
78
+
79
+ '%d',/*image_browser_preload_number*/
80
+ '%d',/*image_browser_load_number*/
81
+ '%d',/*number_of_columns*/
82
+ '%d',/*resort_after_load_more*/
83
+ '%d',/*show_likes*/
84
+
85
+ '%d',/*show_description*/
86
+ '%d',/*show_comments*/
87
+ '%d',/*show_usernames*/
88
+ '%d',/*display_user_info*/
89
+ '%d',//'display_user_post_follow_number'
90
+
91
+ '%d',/*show_full_description*/
92
+ '%d',/*disable_mobile_layout*/
93
+ '%s',/*feed_type*/
94
+ '%s',/*feed_item_onclick*/
95
+
96
+ '%d',//'popup_fullscreen'=>'bool',
97
+
98
+ '%d',//'popup_width'=>'number',
99
+ '%d',//'popup_height'=>'number',
100
+ '%s',//'popup_type'=>'string',
101
+ '%d',//'popup_autoplay'=>'bool',
102
+ '%d',//'popup_interval'=>'number',
103
+
104
+ '%d',//'popup_enable_filmstrip'=>'bool',
105
+ '%d',//'popup_filmstrip_height'=>'number',
106
+ '%d',//'autohide_lightbox_navigation'=>'bool',
107
+ '%d',//'popup_enable_ctrl_btn'=>'bool',
108
+ '%d',//'popup_enable_fullscreen'=>'bool',
109
+
110
+ '%d',//'popup_enable_info'=>'bool',
111
+ '%d',//'popup_info_always_show'=>'bool',
112
+ '%d',//'popup_info_full_width'=>'bool',
113
+ '%d',//'popup_enable_comment'=>'bool',
114
+ '%d',//'popup_enable_fullsize_image'=>'bool',
115
+
116
+ '%d',//'popup_enable_download'=>'bool',
117
+ '%d',//popup_enable_share_buttons=>'bool',
118
+ '%d',//'popup_enable_facebook'=>'bool',
119
+ '%d',//'popup_enable_twitter'=>'bool',
120
+ '%d',//'popup_enable_google'=>'bool',
121
+
122
+ '%d',//'popup_enable_pinterest'=>'bool',
123
+ '%d',//'popup_enable_tumblr'=>'bool',
124
+ '%d',//'show_image_counts'=>'bool',
125
+ '%d',//'enable_loop'=>'bool'
126
+ '%d',//popup_image_right_click=>'bool'
127
+
128
+ '%s',//'conditional_filters' => 'string',
129
+ '%s',//'conditional_filter_type' => 'string'
130
+ '%d',/*show_username_on_thumb*/
131
+ '%d',//'conditional_filter_enable'=>'0',
132
+ '%s',//'liked_feed' => 'string'
133
+ '%d',//'mobile_breakpoint'=>'640',
134
+ '%s',//'redirect_url',
135
+ '%s',//'feed_resolution',
136
+
137
+ );
138
+ }
139
+ private function display() {
140
+ require_once (WDI_DIR . "/admin/models/WDIModelFeeds_wdi.php");
141
+ $model = new WDIModelFeeds_wdi();
142
+
143
+ require_once (WDI_DIR . "/admin/views/WDIViewFeeds_wdi.php");
144
+ $view = new WDIViewFeeds_wdi($model);
145
+ $view->display();
146
+ }
147
+
148
+ private function add() {
149
+ require_once WDI_DIR . "/admin/models/WDIModelFeeds_wdi.php";
150
+ $model = new WDIModelFeeds_wdi();
151
+
152
+ require_once WDI_DIR . "/admin/views/WDIViewFeeds_wdi.php";
153
+ $view = new WDIViewFeeds_wdi($model);
154
+ $view->edit(0);
155
+ }
156
+
157
+
158
+ private function edit($customId = '') {
159
+
160
+ require_once WDI_DIR . "/admin/models/WDIModelFeeds_wdi.php";
161
+ $model = new WDIModelFeeds_wdi();
162
+
163
+ require_once WDI_DIR . "/admin/views/WDIViewFeeds_wdi.php";
164
+ $view = new WDIViewFeeds_wdi($model);
165
+ if($customId != ''){
166
+ $id = $customId;
167
+ }else{
168
+ $id = (int) WDILibrary::get('current_id', 0);
169
+ }
170
+ $view->edit($id);
171
+ }
172
+
173
+ private function apply() {
174
+ $this->save_slider_db();
175
+ $this->save_slide_db();
176
+ $this->edit();
177
+ }
178
+
179
+ private function save_feed(){
180
+ require_once WDI_DIR . "/admin/models/WDIModelFeeds_wdi.php";
181
+ $model = new WDIModelFeeds_wdi();
182
+
183
+ $settings = isset($_POST[WDI_FSN]) ? (array) $_POST[WDI_FSN]: array();
184
+ $defaults = $model->wdi_get_feed_defaults();
185
+ $settings = $this->sanitize_input($settings,$defaults);
186
+ $settings = wp_parse_args( $settings, $defaults );
187
+ $settings = $this->check_settings($settings);
188
+
189
+ global $wpdb;
190
+ $action = WDILibrary::get('add_or_edit', '');
191
+ if( $action=='' ){
192
+ $wpdb->insert($wpdb->prefix. WDI_FEED_TABLE, $settings,$this->dataFormat);
193
+ if($wpdb->insert_id == false){
194
+ $this->message(__('Cannot Write on database. Check database permissions.',"wd-instagram-feed"),'error');
195
+ }
196
+ }else{
197
+ $msg = $wpdb->update($wpdb->prefix. WDI_FEED_TABLE, $settings, array('id'=>$action), $this->dataFormat,array('%d'));
198
+ if($msg == false){
199
+ $this->message(__("You have not made new changes","wd-instagram-feed"),'notice');
200
+ }else{
201
+ $this->message(__("Successfully saved","wd-instagram-feed"),"updated");
202
+ }
203
+ }
204
+ $this->display();
205
+ }
206
+
207
+ private function apply_changes(){
208
+ require_once WDI_DIR . "/admin/models/WDIModelFeeds_wdi.php";
209
+ global $wpdb;
210
+ $model = new WDIModelFeeds_wdi();
211
+ $settings = isset($_POST[WDI_FSN]) ? (array) $_POST[WDI_FSN] : array();
212
+ $defaults = $model->wdi_get_feed_defaults();
213
+ $settings = $this->sanitize_input($settings,$defaults);
214
+ $settings = wp_parse_args( $settings, $defaults );
215
+ $settings = $this->check_settings($settings);
216
+ $action = WDILibrary::get('add_or_edit', '');
217
+ if($action==''){
218
+ $wpdb->insert($wpdb->prefix. WDI_FEED_TABLE, $settings,$this->dataFormat);
219
+ if($wpdb->insert_id == false){
220
+ $message = 24;
221
+ }else{
222
+ $message = 23;
223
+ }
224
+ }else{
225
+ $msg = $wpdb->update($wpdb->prefix. WDI_FEED_TABLE, $settings, array('id'=>$action), $this->dataFormat,array('%d'));
226
+ if($msg == false){
227
+ $message = 24;
228
+ }else{
229
+ $message = 23;
230
+ }
231
+ }
232
+ $wdi_current_task = 'edit';
233
+ if(!empty($action)){
234
+ $wdi_current_id = $action;
235
+ }elseif ($wpdb->insert_id != false){
236
+ $wdi_current_id = $wpdb->insert_id;
237
+ }else{
238
+ $wdi_current_task = "display";
239
+ $wdi_current_id = 0;
240
+ }
241
+
242
+ WDILibrary::wdi_spider_redirect(add_query_arg(array(
243
+ 'page' => WDILibrary::get('page'),
244
+ 'task' => $wdi_current_task,
245
+ 'current_id' => $wdi_current_id,
246
+ 'message' =>$message,
247
+ ), admin_url('admin.php')));
248
+
249
+
250
+ }
251
+
252
+ private function cancel(){
253
+ $this->display();
254
+ }
255
+
256
+ private function duplicate($id) {
257
+ $message = 20;
258
+ $duplicated = $this->duplicate_tabels($id);
259
+ if($duplicated){
260
+ $message = 18;
261
+ }
262
+ WDILibrary::wdi_spider_redirect(add_query_arg(array(
263
+ 'page' => WDILibrary::get('page'),
264
+ 'task' => 'display',
265
+ 'message' => $message,
266
+ ), admin_url('admin.php')));
267
+ }
268
+ private function duplicate_all($id) {
269
+ global $wpdb;
270
+ $message = 19;
271
+ $flag = false;
272
+ $feed_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . WDI_FEED_TABLE);
273
+ foreach ($feed_ids_col as $slider_id) {
274
+ $check_id = WDILibrary::get('check_' . $slider_id, '');
275
+ if ( !empty($check_id) ) {
276
+ if(!$flag){
277
+ $flag = true;
278
+ }
279
+ $this->duplicate_tabels($slider_id);
280
+ }
281
+ }
282
+
283
+ if(!$flag){
284
+ $message = 6;
285
+ }
286
+
287
+ WDILibrary::wdi_spider_redirect(add_query_arg(array(
288
+ 'page' => WDILibrary::get('page'),
289
+ 'task' => 'display',
290
+ 'message' => $message,
291
+ ), admin_url('admin.php')));
292
+ }
293
+
294
+ private function duplicate_tabels($feed_id) {
295
+ global $wpdb;
296
+ if ($feed_id) {
297
+ $feed_row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . WDI_FEED_TABLE.' where id="%d"', $feed_id));
298
+ }
299
+
300
+ if ($feed_row) {
301
+ $duplicate_values = WDILibrary::objectToArray($feed_row);
302
+ unset($duplicate_values['id']);
303
+ $save = $wpdb->insert($wpdb->prefix . WDI_FEED_TABLE,$duplicate_values, $this->dataFormat);
304
+ $new_slider_id = $wpdb->get_var('SELECT MAX(id) FROM ' . $wpdb->prefix . WDI_FEED_TABLE);
305
+ }
306
+ return $new_slider_id;
307
+ }
308
+
309
+ private function delete($id) {
310
+ global $wpdb;
311
+ $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . WDI_FEED_TABLE. ' WHERE id="%d"', $id);
312
+ if ($wpdb->query($query)) {
313
+ echo WDILibrary::message(__('Item Succesfully Deleted.',"wd-instagram-feed"), 'updated');
314
+ }
315
+ else {
316
+ echo WDILibrary::message(__('Error. Please install plugin again.', "wd-instagram-feed"), 'error');
317
+ }
318
+ $this->display();
319
+ }
320
+
321
+ private function delete_all() {
322
+ global $wpdb;
323
+ $flag = FALSE;
324
+ $feed_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . WDI_FEED_TABLE);
325
+ foreach ($feed_ids_col as $slider_id) {
326
+ $check_id = WDILibrary::get('check_' . $slider_id, '');
327
+ $check_all_items = WDILibrary::get('check_all_items', '');
328
+ if ( !empty($check_id) || !empty($check_all_items) ) {
329
+ $flag = TRUE;
330
+ $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . WDI_FEED_TABLE.' WHERE id="%d"', $slider_id);
331
+ $wpdb->query($query);
332
+ }
333
+ }
334
+ if ($flag) {
335
+ $message = 5;
336
+ }
337
+ else {
338
+ $message = 6;
339
+ }
340
+ WDILibrary::wdi_spider_redirect(add_query_arg(array(
341
+ 'page' => WDILibrary::get('page'),
342
+ 'task' => 'display',
343
+ 'message' => $message,
344
+ ), admin_url('admin.php')));
345
+ }
346
+
347
+ private function publish($id) {
348
+ global $wpdb;
349
+ $message = 20;
350
+ $save = $wpdb->update($wpdb->prefix . WDI_FEED_TABLE, array('published' => 1), array('id' => $id));
351
+ if($save !== FALSE){
352
+ $message = 9;
353
+ }
354
+ WDILibrary::wdi_spider_redirect(add_query_arg(array(
355
+ 'page' => WDILibrary::get('page'),
356
+ 'task' => 'display',
357
+ 'message' => $message,
358
+ ), admin_url('admin.php')));
359
+
360
+ }
361
+
362
+ private function publish_all() {
363
+ global $wpdb;
364
+ $flag = FALSE;
365
+ $check_all_items = WDILibrary::get('check_all_items', '');
366
+ if ( isset($check_all_items) ) {
367
+ $wpdb->query('UPDATE ' . $wpdb->prefix . WDI_FEED_TABLE .' SET published=1');
368
+ $flag = TRUE;
369
+ }
370
+ else {
371
+ $feed_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . WDI_FEED_TABLE);
372
+ foreach ($feed_ids_col as $slider_id) {
373
+ $check_id = WDILibrary::get('check_' . $slider_id, '');
374
+ if ( !empty($check_id) ) {
375
+ $flag = TRUE;
376
+ $wpdb->update($wpdb->prefix . WDI_FEED_TABLE, array('published' => 1), array('id' => $slider_id));
377
+ }
378
+ }
379
+ }
380
+ if ($flag) {
381
+ $message = 10;
382
+ }
383
+ else {
384
+ $message = 6;
385
+ }
386
+ WDILibrary::wdi_spider_redirect(add_query_arg(array(
387
+ 'page' => WDILibrary::get('page'),
388
+ 'task' => 'display',
389
+ 'message' => $message,
390
+ ), admin_url('admin.php')));
391
+ }
392
+
393
+ private function unpublish($id) {
394
+ global $wpdb;
395
+ $message = 20;
396
+ $save = $wpdb->update($wpdb->prefix . WDI_FEED_TABLE, array('published' => 0), array('id' => $id));
397
+ if($save !== FALSE){
398
+ $message = 11;
399
+ }
400
+ WDILibrary::wdi_spider_redirect(add_query_arg(array(
401
+ 'page' => WDILibrary::get('page'),
402
+ 'task' => 'display',
403
+ 'message' => $message,
404
+ ), admin_url('admin.php')));
405
+ }
406
+
407
+ private function unpublish_all() {
408
+ global $wpdb;
409
+ $flag = FALSE;
410
+ $check_all_items = WDILibrary::get('check_all_items', '');
411
+ if ( isset($check_all_items) ) {
412
+ $wpdb->query('UPDATE ' . $wpdb->prefix . WDI_FEED_TABLE.' SET published=0');
413
+ $flag = TRUE;
414
+ }
415
+ else {
416
+ $feed_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . WDI_FEED_TABLE);
417
+ foreach ($feed_ids_col as $slider_id) {
418
+ $check_id = WDILibrary::get('check_' . $slider_id, '');
419
+ if ( !empty($check_id) ) {
420
+ $flag = TRUE;
421
+ $wpdb->update($wpdb->prefix . WDI_FEED_TABLE, array('published' => 0), array('id' => $slider_id));
422
+ }
423
+ }
424
+ }
425
+ if ($flag) {
426
+ $message = 12;
427
+ }
428
+ else {
429
+ $message = 6;
430
+ }
431
+ WDILibrary::wdi_spider_redirect(add_query_arg(array(
432
+ 'page' => WDILibrary::get('page'),
433
+ 'task' => 'display',
434
+ 'message' => $message,
435
+ ), admin_url('admin.php')));
436
+ }
437
+
438
+ private function check_settings($settings){
439
+ if($settings['feed_users']){
440
+ $settings['feed_users'] = json_decode($settings['feed_users']);
441
+ $settings['feed_users'] = json_encode(array($settings['feed_users'][0]));
442
+ };
443
+ if(intval($settings['theme_id']) > 1){
444
+ $settings['theme_id'] = '1';
445
+ };
446
+ if($settings['feed_display_view'] === 'infinite_scroll'){
447
+ $settings['feed_display_view'] = 'load_more_btn';
448
+ }
449
+ if($settings['feed_type'] === 'masonry' || $settings['feed_type'] === 'blog_style'){
450
+ $settings['feed_type'] = 'thumbnails';
451
+ }
452
+ if($settings['popup_enable_filmstrip'] == '1'){
453
+ $settings['popup_enable_filmstrip'] = '0';
454
+ }
455
+ if($settings['popup_filmstrip_height'] != '70'){
456
+ $settings['popup_filmstrip_height'] = '70';
457
+ }
458
+ if($settings['popup_enable_comment'] == '1'){
459
+ $settings['popup_enable_comment'] = '0';
460
+ }
461
+ if($settings['popup_enable_share_buttons'] == '1'){
462
+ $settings['popup_enable_share_buttons'] = '0';
463
+ }
464
+
465
+ if($settings['popup_info_always_show'] == '1'){
466
+ $settings['popup_info_always_show'] = '0';
467
+ }
468
+
469
+ if($settings['popup_info_full_width'] == '1'){
470
+ $settings['popup_info_full_width'] = '0';
471
+ }
472
+
473
+ if($settings['popup_enable_info'] == '1'){
474
+ $settings['popup_enable_info'] = '0';
475
+ }
476
+ if($settings['show_likes'] == '1'){
477
+ $settings['show_likes'] = '0';
478
+ }
479
+
480
+ if($settings['show_description'] == '1'){
481
+ $settings['show_description'] = '0';
482
+ }
483
+
484
+ if($settings['show_comments'] == '1'){
485
+ $settings['show_comments'] = '0';
486
+ }
487
+
488
+ if($settings['show_username_on_thumb'] == '1'){
489
+ $settings['show_username_on_thumb'] = '0';
490
+ }
491
+
492
+ if($settings['conditional_filter_enable'] == '1'){
493
+ $settings['conditional_filter_enable'] = '0';
494
+ }
495
+ if($settings['liked_feed'] == 'liked'){
496
+ $settings['liked_feed'] = 'userhash';
497
+ }
498
+ return $settings;
499
+ }
500
+
501
+ private function sanitize_input($settings,$defaults){
502
+ require_once WDI_DIR . "/admin/models/WDIModelFeeds_wdi.php";
503
+ $model = new WDIModelFeeds_wdi();
504
+ $sanitize_types=$model->get_sanitize_types();
505
+ $sanitized_output = array();
506
+ foreach ($settings as $setting_name => $value) {
507
+ switch($sanitize_types[$setting_name]){
508
+ case 'string':{
509
+ $sanitized_val=$this->sanitize_string($value,$defaults[$setting_name]);
510
+ $sanitized_output[$setting_name] = $sanitized_val;
511
+ break;
512
+ }
513
+ case 'number':{
514
+ $sanitized_val=$this->sanitize_number($value,$defaults[$setting_name]);
515
+ $sanitized_output[$setting_name] = $sanitized_val;
516
+ break;
517
+ }
518
+ case 'bool':{
519
+ $sanitized_val=$this->sanitize_bool($value,$defaults[$setting_name]);
520
+ $sanitized_output[$setting_name] = $sanitized_val;
521
+ break;
522
+ }
523
+ case 'url':{
524
+ $sanitized_val=$this->sanitize_url($value,$defaults[$setting_name]);
525
+ $sanitized_output[$setting_name] = $sanitized_val;
526
+ break;
527
+ }
528
+ }
529
+ }
530
+ return $sanitized_output;
531
+ }
532
+
533
+ private function sanitize_bool($value,$default){
534
+ if($value == 1 || $value == 0){
535
+ return $value;
536
+ }
537
+ else{
538
+ return $default;
539
+ }
540
+ }
541
+ private function sanitize_string($value,$default){
542
+ $sanitized_val = strip_tags(stripslashes($value));
543
+ if($sanitized_val == ''){
544
+ return $default;
545
+ }else{
546
+ return $sanitized_val;
547
+ }
548
+ }
549
+ private function sanitize_number($value,$default){
550
+ if(is_numeric($value) && $value>0){
551
+ return $value;
552
+ }else{
553
+ return $default;
554
+ }
555
+ }
556
+ private function sanitize_url($value,$default){
557
+ if (function_exists('filter_var') && !filter_var($value, FILTER_VALIDATE_URL) === false) {
558
+ return $value;
559
+ } else {
560
+ return $default;
561
+ }
562
+ }
563
+
564
+ private function message($text,$type){
565
+ require_once(WDI_DIR . '/framework/WDILibrary.php');
566
+ echo WDILibrary::message($text, $type);
567
+ }
568
+ }
 
 
 
 
 
 
 
admin/controllers/WDIControllerLicensing_wdi.php CHANGED
@@ -1,31 +1,31 @@
1
- <?php
2
-
3
- class WDIControllerLicensing_wdi {
4
-
5
- public function __construct() {
6
- }
7
-
8
- public function execute() {
9
- $task = WDILibrary::get('task', '');
10
- if ( $task != '' ) {
11
- if(!WDWLibrary::verify_nonce('licensing_bwg')){
12
- die('Sorry, your nonce did not verify.');
13
- }
14
- }
15
- if (method_exists($this, $task)) {
16
- $this->$task($id);
17
- }
18
- else {
19
- $this->display();
20
- }
21
- }
22
-
23
- public function display() {
24
- require_once WDI_DIR . "/admin/models/WDIModelLicensing_wdi.php";
25
- $model = new WDIModelLicensing_wdi();
26
-
27
- require_once WDI_DIR . "/admin/views/WDIViewLicensing_wdi.php";
28
- $view = new WDIViewLicensing_wdi($model);
29
- $view->display();
30
- }
31
  }
1
+ <?php
2
+
3
+ class WDIControllerLicensing_wdi {
4
+
5
+ public function __construct() {
6
+ }
7
+
8
+ public function execute() {
9
+ $task = WDILibrary::get('task', '');
10
+ if ( $task != '' ) {
11
+ if(!WDWLibrary::verify_nonce('licensing_bwg')){
12
+ die('Sorry, your nonce did not verify.');
13
+ }
14
+ }
15
+ if (method_exists($this, $task)) {
16
+ $this->$task($id);
17
+ }
18
+ else {
19
+ $this->display();
20
+ }
21
+ }
22
+
23
+ public function display() {
24
+ require_once WDI_DIR . "/admin/models/WDIModelLicensing_wdi.php";
25
+ $model = new WDIModelLicensing_wdi();
26
+
27
+ require_once WDI_DIR . "/admin/views/WDIViewLicensing_wdi.php";
28
+ $view = new WDIViewLicensing_wdi($model);
29
+ $view->display();
30
+ }
31
  }
admin/controllers/WDIControllerSettings_wdi.php CHANGED
@@ -1,21 +1,61 @@
1
- <?php
2
-
3
- class WDIControllerSettings_wdi{
4
-
5
- function __construct(){
6
-
7
- }
8
-
9
- public function execute() {
10
-
11
- $this->display();
12
- }
13
- public function display(){
14
- require_once(WDI_DIR . '/admin/models/WDIModelSettings_wdi.php');
15
- $model = new WDIModelSettings_wdi();
16
-
17
- require_once(WDI_DIR . '/admin/views/WDIViewSettings_wdi.php');
18
- $view = new WDIViewSettings_wdi($model);
19
- $view->display();
20
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  }
1
+ <?php
2
+
3
+ class WDIControllerSettings_wdi {
4
+
5
+ function __construct() {
6
+
7
+ }
8
+
9
+ public function execute() {
10
+
11
+ $this->display();
12
+ }
13
+
14
+ public function display() {
15
+ global $wdi_options;
16
+ if ( !empty($_REQUEST['wdi_access_token']) ) {
17
+ $access = WDILibrary::get_instagram_access($_REQUEST['wdi_access_token']);
18
+ if ( !empty($access['error']) && !empty($access['error']['message']) ) {
19
+ WDILibrary::redirect(add_query_arg(array(
20
+ 'page' => 'wdi_settings',
21
+ 'message' => $access['error']['message'],
22
+ ), admin_url('admin.php')));
23
+ }
24
+ if ( !empty($access['access_token']) ) {
25
+ $user = WDILibrary::get_instagram_user($access['access_token']);
26
+ $wdi_options['wdi_start_in'] = time();
27
+ $wdi_options['wdi_expires_in'] = $access['expires_in'];
28
+ $wdi_options['wdi_user_id'] = $_REQUEST['user_id'];
29
+ $wdi_options['wdi_user_name'] = $user['username'];
30
+ $wdi_options['wdi_access_token'] = $access['access_token'];
31
+
32
+ update_option(WDI_OPT, $wdi_options);
33
+ WDILibrary::redirect(add_query_arg(array(
34
+ 'page' => 'wdi_settings',
35
+ ), admin_url('admin.php')));
36
+ exit;
37
+ }
38
+ }
39
+ else {
40
+ $data = WDILibrary::get_instagram_user($wdi_options['wdi_access_token']);
41
+ if ( !empty($wdi_options['wdi_access_token']) && !empty($data['error']) && !empty($data['error']['message']) && !WDILibrary::get('wdi_reset_access_token_input', 0) ) {
42
+ $wdi_options['wdi_user_id'] = '';
43
+ $wdi_options['wdi_user_name'] = '';
44
+ $wdi_options['wdi_access_token'] = '';
45
+ update_option(WDI_OPT, $wdi_options);
46
+ WDILibrary::wdi_spider_redirect(admin_url('admin.php?page=wdi_settings&message=' . $data['error']['message']));
47
+ }
48
+ }
49
+
50
+ require_once(WDI_DIR . '/admin/models/WDIModelSettings_wdi.php');
51
+ $model = new WDIModelSettings_wdi();
52
+ require_once(WDI_DIR . '/admin/views/WDIViewSettings_wdi.php');
53
+ $view = new WDIViewSettings_wdi($model);
54
+ $message = WDILibrary::get('message', '');
55
+ if ( !empty($message) ) {
56
+ echo WDILibrary::message($message, 'error');
57
+ }
58
+ $view->display();
59
+ }
60
+
61
  }
admin/controllers/WDIControllerThemes_wdi.php CHANGED
@@ -1,700 +1,680 @@
1
- <?php
2
- class WDIControllerThemes_wdi {
3
- ////////////////////////////////////////////////////////////////////////////////////////
4
- // Events //
5
- ////////////////////////////////////////////////////////////////////////////////////////
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- // Constants //
8
- ////////////////////////////////////////////////////////////////////////////////////////
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- // Variables //
11
- ////////////////////////////////////////////////////////////////////////////////////////
12
- private $data_format;
13
- private $view,$model;
14
- ////////////////////////////////////////////////////////////////////////////////////////
15
- // Constructor & Destructor //
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
- public function __construct() {
18
- $this->setDataFormat();
19
- require_once (WDI_DIR . "/admin/models/WDIModelThemes_wdi.php");
20
- $this->model = new WDIModelThemes_wdi();
21
-
22
- require_once (WDI_DIR . "/admin/views/WDIViewThemes_wdi.php");
23
- $this->view = new WDIViewThemes_wdi($this->model);
24
- }
25
- ////////////////////////////////////////////////////////////////////////////////////////
26
- // Public Methods //
27
- ////////////////////////////////////////////////////////////////////////////////////////
28
- public function execute() {
29
- $task = WDILibrary::get('task');
30
- $id = WDILibrary::get('current_id', 0);
31
- $message = WDILibrary::get('message');
32
- echo WDILibrary::message_id($message);
33
- if (method_exists($this, $task)) {
34
- check_admin_referer('nonce_wd', 'nonce_wd');
35
- $this->$task($id);
36
- }
37
- else {
38
- $this->display();
39
- }
40
- }
41
-
42
- public function display() {
43
- require_once (WDI_DIR . "/admin/models/WDIModelThemes_wdi.php");
44
- $model = new WDIModelThemes_wdi();
45
-
46
- require_once (WDI_DIR . "/admin/views/WDIViewThemes_wdi.php");
47
- $view = new WDIViewThemes_wdi($model);
48
- $view->display();
49
- }
50
-
51
- ////////////////////////////////////////////////////////////////////////////////////////
52
- // Private Methods //
53
- ////////////////////////////////////////////////////////////////////////////////////////
54
- private function setDataFormat(){
55
- $this->data_format = array(
56
- '%s',/*theme_name*/
57
- '%s',/*default_theme*/
58
- '%s',/*feed_container_bg_color*/
59
- '%s',/*feed_wrapper_width*/
60
- '%s',/*feed_container_width*/
61
- '%s',/*feed_wrapper_bg_color*/
62
- '%s',/*active_filter_bg_color*/
63
- '%s',/*header_margin*/
64
- '%s',/*header_padding*/
65
- '%s',/*header_border_size*/
66
- '%s',/*header_border_color*/
67
- '%s',/*header_position*/
68
- '%s',/*header_img_width*/
69
- '%s',/*header_border_radius*/
70
- '%s',/*header_text_padding*/
71
- '%s',/*header_text_color*/
72
- '%d',/*header_font_weight*/
73
- '%s',/*header_text_font_size*/
74
- '%s',/*header_text_font_style*/
75
- '%s',/*'follow_btn_border_radius'=>'number'*/
76
- '%s',/*'follow_btn_padding'=>'number'*/
77
- '%d',/*'follow_btn_margin'=>'number'*/
78
- '%s',//'follow_btn_bg_color'=>'color',
79
- '%s',//'follow_btn_border_color'=>'color',
80
- '%s',//'follow_btn_text_color'=>'color',
81
- '%d',//'follow_btn_font_size'=>'number',
82
- '%s',//'follow_btn_border_hover_color'=>'color',
83
- '%s',//'follow_btn_text_hover_color'=>'color',
84
- '%s',//'follow_btn_background_hover_color'=>'color',
85
-
86
- '%s',/*user_horizontal_margin*/
87
- '%s',/*user_padding*/
88
- '%s',/*user_border_size*/
89
- '%s',/*user_border_color*/
90
- '%d',//'user_img_width'
91
- '%d',/*user_border_radius*/
92
- '%s',/*user_background_color*/
93
- '%s',/*users_border_size*/
94
- '%s',/*users_border_color*/
95
- '%s',/*users_background_color*/
96
- '%s',//users_text_color
97
- '%d',//users_font_weight
98
- '%s',//users_text_font_size
99
- '%s',//users_text_font_style
100
- '%s',//user_description_font_size
101
- '%s',//'lightbox_overlay_bg_color'=>'color',
102
- '%d',//'lightbox_overlay_bg_transparent'=>'number_max_100',
103
- '%s',//'lightbox_bg_color'=>'color',
104
- '%d',//'lightbox_ctrl_btn_height'=>'number',
105
- '%d',//'lightbox_ctrl_btn_margin_top'=>'number',
106
- '%d',//'lightbox_ctrl_btn_margin_left'=>'number',
107
- '%s',//'lightbox_ctrl_btn_pos'=>'string',
108
- '%s',//'lightbox_ctrl_cont_bg_color'=>'color',
109
- '%d',//'lightbox_ctrl_cont_border_radius'=>'number',
110
- '%d',//'lightbox_ctrl_cont_transparent'=>'number_max_100',
111
- '%s',//'lightbox_ctrl_btn_align'=>'position',
112
- '%s',//'lightbox_ctrl_btn_color'=>'color',
113
- '%d',//'lightbox_ctrl_btn_transparent'=>'number_max_100',
114
- '%d',//'lightbox_toggle_btn_height'=>'number',
115
- '%d',//'lightbox_toggle_btn_width'=>'number',
116
- '%d',//'lightbox_close_btn_border_radius'=>'number',
117
- '%d',//'lightbox_close_btn_border_width'=>'number',
118
- '%s',//'lightbox_close_btn_border_style'=>'string',
119
- '%s',//'lightbox_close_btn_border_color'=>'color',
120
- '%s',//'lightbox_close_btn_box_shadow'=>'css_box_shadow',
121
- '%s',//'lightbox_close_btn_bg_color'=>'color',
122
- '%d',//'lightbox_close_btn_transparent'=>'number_max_100',
123
- '%d',//'lightbox_close_btn_width'=>'number',
124
- '%d',//'lightbox_close_btn_height'=>'number',
125
- '%d',//'lightbox_close_btn_top'=>'number_neg',
126
- '%d',//'lightbox_close_btn_right'=>'number_neg',
127
- '%d',//'lightbox_close_btn_size'=>'number',
128
- '%s',//'lightbox_close_btn_color'=>'color',
129
- '%s',//'lightbox_close_btn_full_color'=>'color',
130
- '%s',//'lightbox_close_btn_hover_color'=>'color'
131
- '%s',//'lightbox_comment_share_button_color'=>'color',
132
- '%s',//'lightbox_rl_btn_style'=>'string',
133
- '%s',//'lightbox_rl_btn_bg_color'=>'color',
134
- '%d',//'lightbox_rl_btn_transparent'=>'number_max_100',
135
- '%s',//'lightbox_rl_btn_box_shadow'=>'css_box_shadow',
136
- '%d',//'lightbox_rl_btn_height'=>'number',
137
- '%d',//'lightbox_rl_btn_width'=>'number',
138
- '%d',//'lightbox_rl_btn_size'=>'number',
139
- '%s',//'lightbox_close_rl_btn_hover_color'=>'color',
140
- '%s',//'lightbox_rl_btn_color'=>'color',
141
- '%d',//'lightbox_rl_btn_border_radius'=>'number',
142
- '%d',//'lightbox_rl_btn_border_width'=>'number',
143
- '%s',//'lightbox_rl_btn_border_style'=>'string',
144
- '%s',//'lightbox_rl_btn_border_color'=>'color',
145
- '%s',//'lightbox_filmstrip_pos'=>'position',
146
- '%s',//'lightbox_filmstrip_thumb_margin'=>'length_multi',
147
- '%d',//'lightbox_filmstrip_thumb_border_width'=>'number',
148
- '%s',//'lightbox_filmstrip_thumb_border_style'=>'string',
149
- '%s',//'lightbox_filmstrip_thumb_border_color'=>'color',
150
- '%d',//'lightbox_filmstrip_thumb_border_radius'=>'number',
151
- '%d',//'lightbox_filmstrip_thumb_active_border_width'=>'number',
152
- '%s',//'lightbox_filmstrip_thumb_active_border_color'=>'color',
153
- '%s',//'lightbox_filmstrip_thumb_deactive_transparent'=>'number_max_100',
154
- '%d',//'lightbox_filmstrip_rl_btn_size'=>'number',
155
- '%s',//'lightbox_filmstrip_rl_btn_color'=>'color',
156
- '%s',//'lightbox_filmstrip_rl_bg_color'=>'color',
157
- '%s',//'lightbox_info_pos'=>'position',
158
- '%s',//'lightbox_info_align'=>'string',
159
- '%s',//'lightbox_info_bg_color'=>'color',
160
- '%d',//'lightbox_info_bg_transparent'=>'number_max_100',
161
- '%d',//'lightbox_info_border_width'=>'number',
162
- '%s',//'lightbox_info_border_style'=>'string',
163
- '%s',//'lightbox_info_border_color'=>'color',
164
- '%d',//'lightbox_info_border_radius'=>'number',
165
- '%s',//'lightbox_info_padding'=>'length_multi',
166
- '%s',//'lightbox_info_margin'=>'length_multi',
167
- '%s',//'lightbox_title_color'=>'color',
168
- '%s',//'lightbox_title_font_style'=>'string',
169
- '%s',//'lightbox_title_font_weight'=>'string',
170
- '%d',//'lightbox_title_font_size'=>'number',
171
- '%s',//'lightbox_description_color'=>'color',
172
- '%s',//'lightbox_description_font_style'=>'string',
173
- '%s',//'lightbox_description_font_weight'=>'string',
174
- '%d',//'lightbox_description_font_size'=>'number',
175
- '%d',//'lightbox_info_height'=>'number_max_100'
176
- '%d',//'lightbox_comment_width'=>'number',
177
- '%s',//'lightbox_comment_pos'=>'string',
178
- '%s',//'lightbox_comment_bg_color'=>'color',
179
- '%d',//'lightbox_comment_font_size'=>'number',
180
- '%s',//'lightbox_comment_font_color'=>'color',
181
- '%s',//'lightbox_comment_font_style'=>'string',
182
- '%d',//'lightbox_comment_author_font_size'=>'number',
183
- '%s',//'lightbox_comment_author_font_color'=>'color',
184
- '%s',//'lightbox_comment_author_font_color_hover'=>'color'
185
- '%d',//'lightbox_comment_date_font_size'=>'number',
186
- '%d',//'lightbox_comment_body_font_size'=>'number',
187
- '%d',//'lightbox_comment_input_border_width'=>'number',
188
- '%s',//'lightbox_comment_input_border_style'=>'string',
189
- '%s',//'lightbox_comment_input_border_color'=>'color',
190
- '%d',//'lightbox_comment_input_border_radius'=>'number',
191
- '%s',//'lightbox_comment_input_padding'=>'length_multi',
192
- '%s',//'lightbox_comment_input_bg_color'=>'color',
193
- '%s',//'lightbox_comment_button_bg_color'=>'color',
194
- '%s',//'lightbox_comment_button_padding'=>'length_multi',
195
- '%d',//'lightbox_comment_button_border_width'=>'number',
196
- '%s',//'lightbox_comment_button_border_style'=>'string',
197
- '%s',//'lightbox_comment_button_border_color'=>'color',
198
- '%d',//'lightbox_comment_button_border_radius'=>'number',
199
- '%d',//'lightbox_comment_separator_width'=>'number',
200
- '%s',//'lightbox_comment_separator_style'=>'string',
201
- '%s',//'lightbox_comment_separator_color'=>'color',
202
- '%s',//'lightbox_comment_load_more_color' =>'color',
203
- '%s',//'lightbox_comment_load_more_color_hover' =>'color',
204
-
205
- '%s',/*th_photo_wrap_padding*/
206
- '%s',/*th_photo_wrap_border_size*/
207
- '%s',/*th_photo_wrap_border_color*/
208
- '%s',/*th_photo_img_border_radius*/
209
- '%s',/*th_photo_wrap_bg_color*/
210
- '%s',/*th_photo_meta_bg_color*/
211
- '%s',/*th_photo_meta_one_line*/
212
- '%s',/*th_like_text_color*/
213
- '%s',/*th_comment_text_color*/
214
- '%s',/*th_photo_caption_font_size*/
215
- '%s',/*th_photo_caption_color*/
216
- '%s',/*th_feed_item_margin*/
217
- '%s',/*th_photo_caption_hover_color*/
218
- '%s',/*th_like_comm_font_size*/
219
- '%s',//'th_overlay_hover_color'=>'color',
220
- '%d',//'th_overlay_hover_transparent'=>'number',
221
- '%s',//'th_overlay_hover_icon_color'=>'color',
222
- '%s',//'th_overlay_hover_icon_font_size'=>'length',
223
-
224
- '%s',//th_photo_img_hover_effect
225
-
226
- '%s',/*mas_photo_wrap_padding*/
227
- '%s',/*mas_photo_wrap_border_size*/
228
- '%s',/*mas_photo_wrap_border_color*/
229
- '%s',/*mas_photo_img_border_radius*/
230
- '%s',/*mas_photo_wrap_bg_color*/
231
- '%s',/*mas_photo_meta_bg_color*/
232
- '%s',/*mas_photo_meta_one_line*/
233
- '%s',/*mas_like_text_color*/
234
- '%s',/*mas_comment_text_color*/
235
- '%s',/*mas_photo_caption_font_size*/
236
- '%s',/*mas_photo_caption_color*/
237
- '%s',/*mas_feed_item_margin*/
238
- '%s',/*mas_photo_caption_hover_color*/
239
- '%s',/*mas_like_comm_font_size*/
240
- '%s',//'mas_overlay_hover_color'=>'color',
241
- '%d',//'mas_overlay_hover_transparent'=>'number',
242
- '%s',//'mas_overlay_hover_icon_color'=>'color',
243
- '%s',//'mas_overlay_hover_icon_font_size'=>'length',
244
-
245
- '%s',//mas_photo_img_hover_effect
246
-
247
- '%s',/*blog_style_photo_wrap_padding*/
248
- '%s',/*blog_style_photo_wrap_border_size*/
249
- '%s',/*blog_style_photo_wrap_border_color*/
250
- '%s',/*blog_style_photo_img_border_radius*/
251
- '%s',/*blog_style_photo_wrap_bg_color*/
252
- '%s',/*blog_style_photo_meta_bg_color*/
253
- '%s',/*blog_style_photo_meta_one_line*/
254
- '%s',/*blog_style_like_text_color*/
255
- '%s',/*blog_style_comment_text_color*/
256
- '%s',/*blog_style_photo_caption_font_size*/
257
- '%s',/*blog_style_photo_caption_color*/
258
- '%s',/*blog_style_feed_item_margin*/
259
- '%s',/*blog_style_photo_caption_hover_color*/
260
- '%s',/*blog_style_like_comm_font_size*/
261
-
262
-
263
- '%s',/*image_browser_photo_wrap_padding*/
264
- '%s',/*image_browser_photo_wrap_border_size*/
265
- '%s',/*image_browser_photo_wrap_border_color*/
266
- '%s',/*image_browser_photo_img_border_radius*/
267
- '%s',/*image_browser_photo_wrap_bg_color*/
268
- '%s',/*image_browser_photo_meta_bg_color*/
269
- '%s',/*image_browser_photo_meta_one_line*/
270
- '%s',/*image_browser_like_text_color*/
271
- '%s',/*image_browser_comment_text_color*/
272
- '%s',/*image_browser_photo_caption_font_size*/
273
- '%s',/*image_browser_photo_caption_color*/
274
- '%s',/*image_browser_feed_item_margin*/
275
- '%s',/*image_browser_photo_caption_hover_color*/
276
- '%s',/*image_browser_like_comm_font_size*/
277
-
278
- '%s',/*load_more_position*/
279
- '%s',/*load_more_padding*/
280
- '%s',/*load_more_bg_color*/
281
- '%s',/*load_more_border_radius*/
282
- '%s',/*load_more_height*/
283
- '%s',/*load_more_width*/
284
- '%s',/*load_more_border_size*/
285
- '%s',/*load_more_border_color*/
286
- '%s',/*load_more_text_color*/
287
- '%s',/*load_more_text_font_size*/
288
- '%s',/*load_more_wrap_hover_color*/
289
- '%s',// 'pagination_ctrl_color' => 'color',
290
- '%s',// 'pagination_size' => 'length',
291
- '%s',// 'pagination_ctrl_margin' => 'length_multi',
292
- '%s',// 'pagination_ctrl_hover_color' => 'color'
293
- '%s',//'pagination_position'=>'position'
294
- '%s',//'pagination_position_vert'=>'position'
295
-
296
- /* since v1.0.6. keep order, defaults*/
297
-
298
- '%s',//'th_thumb_user_bg_color'=>'color',
299
- '%s',//'th_thumb_user_color'=>'color'
300
- '%s',//'mas_thumb_user_bg_color'=>'color',
301
- '%s',//'mas_thumb_user_color'=>'color'
302
- );
303
- }
304
-
305
- private function add() {
306
- require_once WDI_DIR . "/admin/models/WDIModelThemes_wdi.php";
307
- $model = new WDIModelThemes_wdi();
308
-
309
- require_once WDI_DIR . "/admin/views/WDIViewThemes_wdi.php";
310
- $view = new WDIViewThemes_wdi($model);
311
- $view->edit(0);
312
- }
313
-
314
-
315
- private function edit($customId = '') {
316
-
317
- require_once WDI_DIR . "/admin/models/WDIModelThemes_wdi.php";
318
- $model = new WDIModelThemes_wdi();
319
-
320
- require_once WDI_DIR . "/admin/views/WDIViewThemes_wdi.php";
321
- $view = new WDIViewThemes_wdi($model);
322
- if($customId != ''){
323
- $id = $customId;
324
- }else{
325
- $id = (int) WDILibrary::get('current_id', 0);
326
- }
327
- $view->edit($id);
328
- }
329
-
330
- private function apply() {
331
- $this->save_slider_db();
332
- $this->save_slide_db();
333
- $this->edit();
334
- }
335
- private function duplicate_all($id) {
336
-
337
- global $wpdb;
338
- $sliders_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . WDI_THEME_TABLE);
339
- foreach ($sliders_ids_col as $theme_id) {
340
- $check_id = WDILibrary::get('check_' . $theme_id, '');
341
- if ( !empty($check_id) ) {
342
- $msg = $this->duplicate_tabels($theme_id);
343
- }
344
- }
345
- if(!isset($msg)){
346
- echo WDILibrary::message(__('Please select at least one item',"wd-instagram-feed"), 'error');
347
- }
348
- elseif($msg['msg'] == false){
349
- echo WDILibrary::message(__('Cannot Write on database. Check database permissions.',"wd-instagram-feed"), 'error');
350
- }else{
351
- echo WDILibrary::message(__('Items Succesfully Duplicated.', "wd-instagram-feed"), 'updated');
352
- }
353
-
354
- $this->display();
355
- }
356
-
357
- private function duplicate_tabels($theme_id) {
358
- global $wpdb;
359
- if ($theme_id) {
360
- $theme_row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . WDI_THEME_TABLE.' where id="%d"', $theme_id));
361
- }
362
-
363
- if ($theme_row) {
364
- $duplicate_values = WDILibrary::objectToArray($theme_row);
365
- unset($duplicate_values['id']);
366
- $duplicate_values['default_theme'] = 0;
367
- $save = $wpdb->insert($wpdb->prefix . WDI_THEME_TABLE,$duplicate_values, $this->data_format);
368
- $new_theme_id = $wpdb->get_var('SELECT MAX(id) FROM ' . $wpdb->prefix . WDI_THEME_TABLE);
369
- }
370
- return array('id'=>$new_theme_id,"msg"=>$save);
371
- }
372
-
373
-
374
- private function delete($id) {
375
- global $wpdb;
376
- //checking for default
377
- $theme_row = $wpdb->get_row($wpdb->prepare("SELECT * FROM ".$wpdb->prefix . WDI_THEME_TABLE." WHERE id = %d",$id));
378
- if($theme_row->default_theme == '0'){
379
-
380
- $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . WDI_THEME_TABLE. ' WHERE id="%d"', $id);
381
-
382
- if ($wpdb->query($query)) {
383
- echo WDILibrary::message(__('Item Succesfully Deleted.',"wd-instagram-feed"), 'updated');
384
- }
385
- else {
386
- echo WDILibrary::message(__('Error. Please install plugin again.',"wd-instagram-feed"), 'error');
387
- }
388
- }else{
389
- echo WDILibrary::message(__('You cannot delete default theme.',"wd-instagram-feed"), 'error');
390
- }
391
- $this->display();
392
- }
393
-
394
- private function delete_all() {
395
- global $wpdb;
396
- $flag = FALSE;
397
- $defaultFalg = false;
398
- $sliders_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . WDI_THEME_TABLE);
399
- foreach ($sliders_ids_col as $theme_id) {
400
- $defaulFlag = false;
401
- $theme_row = $wpdb->get_row($wpdb->prepare("SELECT * FROM ".$wpdb->prefix . WDI_THEME_TABLE." WHERE id = %d",$theme_id));
402
- $check_id = WDILibrary::get('check_' . $theme_id, '');
403
- $check_all_items = WDILibrary::get('check_all_items', '');
404
- if ( !empty($check_id) || !empty($check_all_items) ) {
405
- if( $theme_row->default_theme == '0' ) {
406
- $flag = TRUE;
407
- $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . WDI_THEME_TABLE.' WHERE id="%d"', $theme_id);
408
- $wpdb->query($query);
409
- }
410
- else {
411
- $defaulFlag = true;
412
- echo WDILibrary::message(__('You cannot delete default theme.',"wd-instagram-feed"), 'error');
413
- }
414
- }
415
- }
416
- if ($flag) {
417
- echo WDILibrary::message(__('Items Succesfully Deleted.',"wd-instagram-feed"), 'updated');
418
- }
419
- else {
420
- if($defaulFlag==false){
421
- echo WDILibrary::message(__('You must select at least one item.',"wd-instagram-feed"), 'error');
422
- }
423
-
424
- }
425
- $this->display();
426
- }
427
-
428
- private function set_default($id) {
429
- global $wpdb;
430
- $reset =$wpdb->update($wpdb->prefix . WDI_THEME_TABLE, array('default_theme' => 0), array('default_theme' => '1'));
431
- $save = $wpdb->update($wpdb->prefix . WDI_THEME_TABLE, array('default_theme' => 1), array('id' => $id));
432
- $this->display();
433
- }
434
-
435
-
436
-
437
-
438
-
439
- private function sanitize_input($settings,$defaults){
440
-
441
- require_once WDI_DIR . "/admin/models/WDIModelThemes_wdi.php";
442
- $model = new WDIModelThemes_wdi();
443
- $sanitize_types=$model->get_sanitize_types();
444
- $sanitized_output = array();
445
- foreach ($settings as $setting_name => $value) {
446
-
447
- switch($sanitize_types[$setting_name]){
448
- case 'string':{
449
- $sanitized_val=$this->sanitize_string($value,$defaults[$setting_name]);
450
- $sanitized_output[$setting_name] = $sanitized_val;
451
- break;
452
- }
453
- case 'number':{
454
- $sanitized_val=$this->sanitize_number($value,$defaults[$setting_name]);
455
- $sanitized_output[$setting_name] = $sanitized_val;
456
- break;
457
- }
458
- case 'bool':{
459
- $sanitized_val=$this->sanitize_bool($value,$defaults[$setting_name]);
460
- $sanitized_output[$setting_name] = $sanitized_val;
461
- break;
462
- }
463
- case 'url':{
464
- $sanitized_val=$this->sanitize_url($value,$defaults[$setting_name]);
465
- $sanitized_output[$setting_name] = $sanitized_val;
466
- break;
467
- }
468
- case 'length':{
469
- $sanitized_val=$this->sanitize_length($value,$defaults[$setting_name]);
470
- $sanitized_output[$setting_name] = $sanitized_val;
471
- break;
472
- }
473
- case 'length_multi':{
474
- $sanitized_val=$this->sanitize_length_multi($value,$defaults[$setting_name]);
475
- $sanitized_output[$setting_name] = $sanitized_val;
476
- break;
477
- }
478
- case 'color':{
479
- $sanitized_val=$this->sanitize_color($value,$defaults[$setting_name]);
480
- $sanitized_output[$setting_name] = $sanitized_val;
481
- break;
482
- }
483
- case 'position':{
484
- $sanitized_val=$this->sanitize_position($value,$defaults[$setting_name]);
485
- $sanitized_output[$setting_name] = $sanitized_val;
486
- break;
487
- }
488
- case 'css_box_shadow':{
489
- $sanitized_val=$this->sanitize_css_box_shadow($value,$defaults[$setting_name]);
490
- $sanitized_output[$setting_name] = $sanitized_val;
491
- break;
492
- }
493
- case 'number_max_100':{
494
- $sanitized_val=$this->sanitize_number_max_100($value,$defaults[$setting_name]);
495
- $sanitized_output[$setting_name] = $sanitized_val;
496
- break;
497
- }
498
- case 'number_neg':{
499
- $sanitized_val=$this->sanitize_number_neg($value,$defaults[$setting_name]);
500
- $sanitized_output[$setting_name] = $sanitized_val;
501
- break;
502
- }
503
- }
504
- }
505
- return $sanitized_output;
506
- }
507
-
508
- private function sanitize_bool($value,$default){
509
- if($value == 1 || $value == 0){
510
- return $value;
511
- }
512
- else{
513
- return $default;
514
- }
515
- }
516
- private function sanitize_string($value,$default){
517
- $sanitized_val = strip_tags(stripslashes($value));
518
- if($sanitized_val == ''){
519
- return $default;
520
- }else{
521
- return $sanitized_val;
522
- }
523
- }
524
- private function sanitize_number($value,$default){
525
- if(is_numeric($value) && $value>=0){
526
- return $value;
527
- }else{
528
- return $default;
529
- }
530
- }
531
- private function sanitize_number_neg($value,$default){
532
- if(is_numeric($value)){
533
- return $value;
534
- }else{
535
- return $default;
536
- }
537
- }
538
- private function sanitize_number_max_100($value,$default){
539
- if(is_numeric($value) && $value>=0 && $value<=100){
540
- return $value;
541
- }else{
542
- return $default;
543
- }
544
- }
545
- private function sanitize_css_box_shadow($value,$default){
546
- $value = trim($value);
547
- $values = explode(' ',$value);
548
-
549
- if($value === 'none' || $value === 'initial' || $value =="0"){
550
- return $value;
551
- }
552
- if(count($values)<3) {return $default;}
553
- //first check test
554
- $first_check_flag = false;
555
- for($i=0;$i<count($values);$i++){
556
- if($i != 2){
557
- if($this->sanitize_length($values[$i], 'error') === 'error'){
558
- $first_check_flag = true;
559
- }
560
- }else{
561
- if($this->sanitize_color($values[$i], 'error') === 'error'){
562
- $first_check_flag = true;
563
- }
564
- }
565
- }
566
- if($first_check_flag == false) {return $value;}
567
-
568
- //second check test
569
- //if(count($values) < 4) {return $default;}
570
- $second_check_flag = false;
571
- for($i=0;$i<count($values);$i++){
572
- if($i != 3){
573
- if($this->sanitize_length($values[$i], 'error') === 'error'){
574
- $second_check_flag = true;
575
- }
576
- }else{
577
- if($this->sanitize_color($values[$i], 'error') === 'error'){
578
- $second_check_flag = true;
579
- }
580
- }
581
- }
582
- if($second_check_flag == false) {return $value;}
583
- $third_check_flag = false;
584
- for($i=0;$i<count($values);$i++){
585
- if($i != 4){
586
- if($this->sanitize_length($values[$i], 'error') === 'error'){
587
- $third_check_flag = true;
588
- }
589
- }else{
590
- if($this->sanitize_color($values[$i], 'error') === 'error'){
591
- $third_check_flag = true;
592
- }
593
- }
594
- }
595
- if($third_check_flag === false) {
596
- return $value;
597
- }
598
- return $default;
599
-
600
- }
601
- private function sanitize_url($value,$default){
602
- if (function_exists('filter_var') && !filter_var($value, FILTER_VALIDATE_URL) === false) {
603
- return $value;
604
- } else {
605
- return $default;
606
- }
607
- }
608
-
609
- private function sanitize_length($value,$default){
610
-
611
- $value = trim($value);
612
-
613
- if($value == 0){
614
- return $value;
615
- }
616
-
617
- $opt1 = substr($value,strlen($value)-2,strlen($value));
618
- $opt2 = substr($value,strlen($value)-1,strlen($value));
619
- $val = floatval($value);
620
- $val1 = substr($value,0,strlen($value)-2);
621
- $val2 = substr($value,0,strlen($value)-1);
622
- if(is_numeric($val)){
623
- if( is_numeric(substr($val1,-1)) && ($opt1=='px' || $opt1=='em')){
624
- return $value;
625
- }else if(is_numeric(substr($val2,-1)) && $opt2=='%'){
626
- return $value;
627
- }
628
- else{
629
- return $default;
630
- }
631
- }else{
632
- return $default;
633
- }
634
- }
635
- private function sanitize_color($value,$default){
636
- $val = WDILibrary::regexColor($value,1);
637
-
638
- if($val == false){
639
- return $default;
640
- }else{
641
- return $val;
642
- }
643
-
644
- }
645
- private function sanitize_position($value,$default){
646
- $value = strtolower(trim($value));
647
- if($value == 'left' || $value == 'right' || $value == 'center' || $value == 'top' || $value == 'bottom'){
648
- return $value;
649
- }else{
650
- return $default;
651
- }
652
- }
653
-
654
- private function sanitize_length_multi($value1,$default){
655
- $value1 = trim($value1);
656
- $output = '';
657
- $values = explode(' ',$value1);
658
- $flag = false;
659
- $counter = 0;
660
- foreach ($values as $value) {
661
- if($value == '')
662
- continue;
663
- $counter++;
664
- $value = trim($value);
665
- $opt1 = substr($value,strlen($value)-2,strlen($value));
666
- $opt2 = substr($value,strlen($value)-1,strlen($value));
667
- $val = floatval($value);
668
- $val1 = substr($value,0,strlen($value)-2);
669
- $val2 = substr($value,0,strlen($value)-1);
670
- if(is_numeric($val)){
671
- if( is_numeric(substr($val1,-1)) && ($opt1=='px' || $opt1=='em')){
672
- $output.=' '.$value.' ';
673
- }else if((is_numeric(substr($val2,-1)) && $opt2=='%') || ($val == 0)){
674
- $output.=' '.$value .' ';
675
- }
676
- else{
677
- $flag = true;
678
- }
679
- }else{
680
- $flag = true;
681
- }
682
- }
683
- $output = trim($output);
684
- if($flag == false && $counter<=4){
685
- return $output;
686
- }else{
687
- return $default;
688
- }
689
-
690
- }
691
-
692
- private function message($text,$type){
693
- require_once WDI_DIR . "/admin/models/WDIModelThemes_wdi.php";
694
- $model = new WDIModelThemes_wdi();
695
- require_once WDI_DIR . "/admin/views/WDIViewThemes_wdi.php";
696
- $view = new WDIViewThemes_wdi($model);
697
- echo WDILibrary::message($text, $type);
698
- }
699
- }
700
  ?>
1
+ <?php
2
+ class WDIControllerThemes_wdi {
3
+
4
+ private $data_format;
5
+ private $view,$model;
6
+
7
+ public function __construct() {
8
+ $this->setDataFormat();
9
+ require_once (WDI_DIR . "/admin/models/WDIModelThemes_wdi.php");
10
+ $this->model = new WDIModelThemes_wdi();
11
+
12
+ require_once (WDI_DIR . "/admin/views/WDIViewThemes_wdi.php");
13
+ $this->view = new WDIViewThemes_wdi($this->model);
14
+ }
15
+
16
+ public function execute() {
17
+ $task = WDILibrary::get('task');
18
+ $id = WDILibrary::get('current_id', 0);
19
+ $message = WDILibrary::get('message');
20
+ echo WDILibrary::message_id($message);
21
+ if (method_exists($this, $task)) {
22
+ check_admin_referer('nonce_wd', 'nonce_wd');
23
+ $this->$task($id);
24
+ }
25
+ else {
26
+ $this->display();
27
+ }
28
+ }
29
+
30
+ public function display() {
31
+ require_once (WDI_DIR . "/admin/models/WDIModelThemes_wdi.php");
32
+ $model = new WDIModelThemes_wdi();
33
+
34
+ require_once (WDI_DIR . "/admin/views/WDIViewThemes_wdi.php");
35
+ $view = new WDIViewThemes_wdi($model);
36
+ $view->display();
37
+ }
38
+
39
+
40
+ private function setDataFormat(){
41
+ $this->data_format = array(
42
+ '%s',/*theme_name*/
43
+ '%s',/*default_theme*/
44
+ '%s',/*feed_container_bg_color*/
45
+ '%s',/*feed_wrapper_width*/
46
+ '%s',/*feed_container_width*/
47
+ '%s',/*feed_wrapper_bg_color*/
48
+ '%s',/*active_filter_bg_color*/
49
+ '%s',/*header_margin*/
50
+ '%s',/*header_padding*/
51
+ '%s',/*header_border_size*/
52
+ '%s',/*header_border_color*/
53
+ '%s',/*header_position*/
54
+ '%s',/*header_img_width*/
55
+ '%s',/*header_border_radius*/
56
+ '%s',/*header_text_padding*/
57
+ '%s',/*header_text_color*/
58
+ '%d',/*header_font_weight*/
59
+ '%s',/*header_text_font_size*/
60
+ '%s',/*header_text_font_style*/
61
+ '%s',/*'follow_btn_border_radius'=>'number'*/
62
+ '%s',/*'follow_btn_padding'=>'number'*/
63
+ '%d',/*'follow_btn_margin'=>'number'*/
64
+ '%s',//'follow_btn_bg_color'=>'color',
65
+ '%s',//'follow_btn_border_color'=>'color',
66
+ '%s',//'follow_btn_text_color'=>'color',
67
+ '%d',//'follow_btn_font_size'=>'number',
68
+ '%s',//'follow_btn_border_hover_color'=>'color',
69
+ '%s',//'follow_btn_text_hover_color'=>'color',
70
+ '%s',//'follow_btn_background_hover_color'=>'color',
71
+
72
+ '%s',/*user_horizontal_margin*/
73
+ '%s',/*user_padding*/
74
+ '%s',/*user_border_size*/
75
+ '%s',/*user_border_color*/
76
+ '%d',//'user_img_width'
77
+ '%d',/*user_border_radius*/
78
+ '%s',/*user_background_color*/
79
+ '%s',/*users_border_size*/
80
+ '%s',/*users_border_color*/
81
+ '%s',/*users_background_color*/
82
+ '%s',//users_text_color
83
+ '%d',//users_font_weight
84
+ '%s',//users_text_font_size
85
+ '%s',//users_text_font_style
86
+ '%s',//user_description_font_size
87
+ '%s',//'lightbox_overlay_bg_color'=>'color',
88
+ '%d',//'lightbox_overlay_bg_transparent'=>'number_max_100',
89
+ '%s',//'lightbox_bg_color'=>'color',
90
+ '%d',//'lightbox_ctrl_btn_height'=>'number',
91
+ '%d',//'lightbox_ctrl_btn_margin_top'=>'number',
92
+ '%d',//'lightbox_ctrl_btn_margin_left'=>'number',
93
+ '%s',//'lightbox_ctrl_btn_pos'=>'string',
94
+ '%s',//'lightbox_ctrl_cont_bg_color'=>'color',
95
+ '%d',//'lightbox_ctrl_cont_border_radius'=>'number',
96
+ '%d',//'lightbox_ctrl_cont_transparent'=>'number_max_100',
97
+ '%s',//'lightbox_ctrl_btn_align'=>'position',
98
+ '%s',//'lightbox_ctrl_btn_color'=>'color',
99
+ '%d',//'lightbox_ctrl_btn_transparent'=>'number_max_100',
100
+ '%d',//'lightbox_toggle_btn_height'=>'number',
101
+ '%d',//'lightbox_toggle_btn_width'=>'number',
102
+ '%d',//'lightbox_close_btn_border_radius'=>'number',
103
+ '%d',//'lightbox_close_btn_border_width'=>'number',
104
+ '%s',//'lightbox_close_btn_border_style'=>'string',
105
+ '%s',//'lightbox_close_btn_border_color'=>'color',
106
+ '%s',//'lightbox_close_btn_box_shadow'=>'css_box_shadow',
107
+ '%s',//'lightbox_close_btn_bg_color'=>'color',
108
+ '%d',//'lightbox_close_btn_transparent'=>'number_max_100',
109
+ '%d',//'lightbox_close_btn_width'=>'number',
110
+ '%d',//'lightbox_close_btn_height'=>'number',
111
+ '%d',//'lightbox_close_btn_top'=>'number_neg',
112
+ '%d',//'lightbox_close_btn_right'=>'number_neg',
113
+ '%d',//'lightbox_close_btn_size'=>'number',
114
+ '%s',//'lightbox_close_btn_color'=>'color',
115
+ '%s',//'lightbox_close_btn_full_color'=>'color',
116
+ '%s',//'lightbox_close_btn_hover_color'=>'color'
117
+ '%s',//'lightbox_comment_share_button_color'=>'color',
118
+ '%s',//'lightbox_rl_btn_style'=>'string',
119
+ '%s',//'lightbox_rl_btn_bg_color'=>'color',
120
+ '%d',//'lightbox_rl_btn_transparent'=>'number_max_100',
121
+ '%s',//'lightbox_rl_btn_box_shadow'=>'css_box_shadow',
122
+ '%d',//'lightbox_rl_btn_height'=>'number',
123
+ '%d',//'lightbox_rl_btn_width'=>'number',
124
+ '%d',//'lightbox_rl_btn_size'=>'number',
125
+ '%s',//'lightbox_close_rl_btn_hover_color'=>'color',
126
+ '%s',//'lightbox_rl_btn_color'=>'color',
127
+ '%d',//'lightbox_rl_btn_border_radius'=>'number',
128
+ '%d',//'lightbox_rl_btn_border_width'=>'number',
129
+ '%s',//'lightbox_rl_btn_border_style'=>'string',
130
+ '%s',//'lightbox_rl_btn_border_color'=>'color',
131
+ '%s',//'lightbox_filmstrip_pos'=>'position',
132
+ '%s',//'lightbox_filmstrip_thumb_margin'=>'length_multi',
133
+ '%d',//'lightbox_filmstrip_thumb_border_width'=>'number',
134
+ '%s',//'lightbox_filmstrip_thumb_border_style'=>'string',
135
+ '%s',//'lightbox_filmstrip_thumb_border_color'=>'color',
136
+ '%d',//'lightbox_filmstrip_thumb_border_radius'=>'number',
137
+ '%d',//'lightbox_filmstrip_thumb_active_border_width'=>'number',
138
+ '%s',//'lightbox_filmstrip_thumb_active_border_color'=>'color',
139
+ '%s',//'lightbox_filmstrip_thumb_deactive_transparent'=>'number_max_100',
140
+ '%d',//'lightbox_filmstrip_rl_btn_size'=>'number',
141
+ '%s',//'lightbox_filmstrip_rl_btn_color'=>'color',
142
+ '%s',//'lightbox_filmstrip_rl_bg_color'=>'color',
143
+ '%s',//'lightbox_info_pos'=>'position',
144
+ '%s',//'lightbox_info_align'=>'string',
145
+ '%s',//'lightbox_info_bg_color'=>'color',
146
+ '%d',//'lightbox_info_bg_transparent'=>'number_max_100',
147
+ '%d',//'lightbox_info_border_width'=>'number',
148
+ '%s',//'lightbox_info_border_style'=>'string',
149
+ '%s',//'lightbox_info_border_color'=>'color',
150
+ '%d',//'lightbox_info_border_radius'=>'number',
151
+ '%s',//'lightbox_info_padding'=>'length_multi',
152
+ '%s',//'lightbox_info_margin'=>'length_multi',
153
+ '%s',//'lightbox_title_color'=>'color',
154
+ '%s',//'lightbox_title_font_style'=>'string',
155
+ '%s',//'lightbox_title_font_weight'=>'string',
156
+ '%d',//'lightbox_title_font_size'=>'number',
157
+ '%s',//'lightbox_description_color'=>'color',
158
+ '%s',//'lightbox_description_font_style'=>'string',
159
+ '%s',//'lightbox_description_font_weight'=>'string',
160
+ '%d',//'lightbox_description_font_size'=>'number',
161
+ '%d',//'lightbox_info_height'=>'number_max_100'
162
+ '%d',//'lightbox_comment_width'=>'number',
163
+ '%s',//'lightbox_comment_pos'=>'string',
164
+ '%s',//'lightbox_comment_bg_color'=>'color',
165
+ '%d',//'lightbox_comment_font_size'=>'number',
166
+ '%s',//'lightbox_comment_font_color'=>'color',
167
+ '%s',//'lightbox_comment_font_style'=>'string',
168
+ '%d',//'lightbox_comment_author_font_size'=>'number',
169
+ '%s',//'lightbox_comment_author_font_color'=>'color',
170
+ '%s',//'lightbox_comment_author_font_color_hover'=>'color'
171
+ '%d',//'lightbox_comment_date_font_size'=>'number',
172
+ '%d',//'lightbox_comment_body_font_size'=>'number',
173
+ '%d',//'lightbox_comment_input_border_width'=>'number',
174
+ '%s',//'lightbox_comment_input_border_style'=>'string',
175
+ '%s',//'lightbox_comment_input_border_color'=>'color',
176
+ '%d',//'lightbox_comment_input_border_radius'=>'number',
177
+ '%s',//'lightbox_comment_input_padding'=>'length_multi',
178
+ '%s',//'lightbox_comment_input_bg_color'=>'color',
179
+ '%s',//'lightbox_comment_button_bg_color'=>'color',
180
+ '%s',//'lightbox_comment_button_padding'=>'length_multi',
181
+ '%d',//'lightbox_comment_button_border_width'=>'number',
182
+ '%s',//'lightbox_comment_button_border_style'=>'string',
183
+ '%s',//'lightbox_comment_button_border_color'=>'color',
184
+ '%d',//'lightbox_comment_button_border_radius'=>'number',
185
+ '%d',//'lightbox_comment_separator_width'=>'number',
186
+ '%s',//'lightbox_comment_separator_style'=>'string',
187
+ '%s',//'lightbox_comment_separator_color'=>'color',
188
+ '%s',//'lightbox_comment_load_more_color' =>'color',
189
+ '%s',//'lightbox_comment_load_more_color_hover' =>'color',
190
+
191
+ '%s',/*th_photo_wrap_padding*/
192
+ '%s',/*th_photo_wrap_border_size*/
193
+ '%s',/*th_photo_wrap_border_color*/
194
+ '%s',/*th_photo_img_border_radius*/
195
+ '%s',/*th_photo_wrap_bg_color*/
196
+ '%s',/*th_photo_meta_bg_color*/
197
+ '%s',/*th_photo_meta_one_line*/
198
+ '%s',/*th_like_text_color*/
199
+ '%s',/*th_comment_text_color*/
200
+ '%s',/*th_photo_caption_font_size*/
201
+ '%s',/*th_photo_caption_color*/
202
+ '%s',/*th_feed_item_margin*/
203
+ '%s',/*th_photo_caption_hover_color*/
204
+ '%s',/*th_like_comm_font_size*/
205
+ '%s',//'th_overlay_hover_color'=>'color',
206
+ '%d',//'th_overlay_hover_transparent'=>'number',
207
+ '%s',//'th_overlay_hover_icon_color'=>'color',
208
+ '%s',//'th_overlay_hover_icon_font_size'=>'length',
209
+
210
+ '%s',//th_photo_img_hover_effect
211
+
212
+ '%s',/*mas_photo_wrap_padding*/
213
+ '%s',/*mas_photo_wrap_border_size*/
214
+ '%s',/*mas_photo_wrap_border_color*/
215
+ '%s',/*mas_photo_img_border_radius*/
216
+ '%s',/*mas_photo_wrap_bg_color*/
217
+ '%s',/*mas_photo_meta_bg_color*/
218
+ '%s',/*mas_photo_meta_one_line*/
219
+ '%s',/*mas_like_text_color*/
220
+ '%s',/*mas_comment_text_color*/
221
+ '%s',/*mas_photo_caption_font_size*/
222
+ '%s',/*mas_photo_caption_color*/
223
+ '%s',/*mas_feed_item_margin*/
224
+ '%s',/*mas_photo_caption_hover_color*/
225
+ '%s',/*mas_like_comm_font_size*/
226
+ '%s',//'mas_overlay_hover_color'=>'color',
227
+ '%d',//'mas_overlay_hover_transparent'=>'number',
228
+ '%s',//'mas_overlay_hover_icon_color'=>'color',
229
+ '%s',//'mas_overlay_hover_icon_font_size'=>'length',
230
+ '%s',//mas_photo_img_hover_effect
231
+
232
+ '%s',/*blog_style_photo_wrap_padding*/
233
+ '%s',/*blog_style_photo_wrap_border_size*/
234
+ '%s',/*blog_style_photo_wrap_border_color*/
235
+ '%s',/*blog_style_photo_img_border_radius*/
236
+ '%s',/*blog_style_photo_wrap_bg_color*/
237
+ '%s',/*blog_style_photo_meta_bg_color*/
238
+ '%s',/*blog_style_photo_meta_one_line*/
239
+ '%s',/*blog_style_like_text_color*/
240
+ '%s',/*blog_style_comment_text_color*/
241
+ '%s',/*blog_style_photo_caption_font_size*/
242
+ '%s',/*blog_style_photo_caption_color*/
243
+ '%s',/*blog_style_feed_item_margin*/
244
+ '%s',/*blog_style_photo_caption_hover_color*/
245
+ '%s',/*blog_style_like_comm_font_size*/
246
+
247
+ '%s',/*image_browser_photo_wrap_padding*/
248
+ '%s',/*image_browser_photo_wrap_border_size*/
249
+ '%s',/*image_browser_photo_wrap_border_color*/
250
+ '%s',/*image_browser_photo_img_border_radius*/
251
+ '%s',/*image_browser_photo_wrap_bg_color*/
252
+ '%s',/*image_browser_photo_meta_bg_color*/
253
+ '%s',/*image_browser_photo_meta_one_line*/
254
+ '%s',/*image_browser_like_text_color*/
255
+ '%s',/*image_browser_comment_text_color*/
256
+ '%s',/*image_browser_photo_caption_font_size*/
257
+ '%s',/*image_browser_photo_caption_color*/
258
+ '%s',/*image_browser_feed_item_margin*/
259
+ '%s',/*image_browser_photo_caption_hover_color*/
260
+ '%s',/*image_browser_like_comm_font_size*/
261
+
262
+ '%s',/*load_more_position*/
263
+ '%s',/*load_more_padding*/
264
+ '%s',/*load_more_bg_color*/
265
+ '%s',/*load_more_border_radius*/
266
+ '%s',/*load_more_height*/
267
+ '%s',/*load_more_width*/
268
+ '%s',/*load_more_border_size*/
269
+ '%s',/*load_more_border_color*/
270
+ '%s',/*load_more_text_color*/
271
+ '%s',/*load_more_text_font_size*/
272
+ '%s',/*load_more_wrap_hover_color*/
273
+ '%s',// 'pagination_ctrl_color' => 'color',
274
+ '%s',// 'pagination_size' => 'length',
275
+ '%s',// 'pagination_ctrl_margin' => 'length_multi',
276
+ '%s',// 'pagination_ctrl_hover_color' => 'color'
277
+ '%s',//'pagination_position'=>'position'
278
+ '%s',//'pagination_position_vert'=>'position'
279
+
280
+ /* since v1.0.6. keep order, defaults*/
281
+
282
+ '%s',//'th_thumb_user_bg_color'=>'color',
283
+ '%s',//'th_thumb_user_color'=>'color'
284
+ '%s',//'mas_thumb_user_bg_color'=>'color',
285
+ '%s',//'mas_thumb_user_color'=>'color'
286
+ );
287
+ }
288
+
289
+ private function add() {
290
+ require_once WDI_DIR . "/admin/models/WDIModelThemes_wdi.php";
291
+ $model = new WDIModelThemes_wdi();
292
+
293
+ require_once WDI_DIR . "/admin/views/WDIViewThemes_wdi.php";
294
+ $view = new WDIViewThemes_wdi($model);
295
+ $view->edit(0);
296
+ }
297
+
298
+
299
+ private function edit($customId = '') {
300
+
301
+ require_once WDI_DIR . "/admin/models/WDIModelThemes_wdi.php";
302
+ $model = new WDIModelThemes_wdi();
303
+
304
+ require_once WDI_DIR . "/admin/views/WDIViewThemes_wdi.php";
305
+ $view = new WDIViewThemes_wdi($model);
306
+ if($customId != ''){
307
+ $id = $customId;
308
+ }else{
309
+ $id = (int) WDILibrary::get('current_id', 0);
310
+ }
311
+ $view->edit($id);
312
+ }
313
+
314
+ private function apply() {
315
+ $this->save_slider_db();
316
+ $this->save_slide_db();
317
+ $this->edit();
318
+ }
319
+ private function duplicate_all($id) {
320
+
321
+ global $wpdb;
322
+ $sliders_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . WDI_THEME_TABLE);
323
+ foreach ($sliders_ids_col as $theme_id) {
324
+ $check_id = WDILibrary::get('check_' . $theme_id, '');
325
+ if ( !empty($check_id) ) {
326
+ $msg = $this->duplicate_tabels($theme_id);
327
+ }
328
+ }
329
+ if(!isset($msg)){
330
+ echo WDILibrary::message(__('Please select at least one item',"wd-instagram-feed"), 'error');
331
+ }
332
+ elseif($msg['msg'] == false){
333
+ echo WDILibrary::message(__('Cannot Write on database. Check database permissions.',"wd-instagram-feed"), 'error');
334
+ }else{
335
+ echo WDILibrary::message(__('Items Succesfully Duplicated.', "wd-instagram-feed"), 'updated');
336
+ }
337
+
338
+ $this->display();
339
+ }
340
+
341
+ private function duplicate_tabels($theme_id) {
342
+ global $wpdb;
343
+ if ($theme_id) {
344
+ $theme_row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . WDI_THEME_TABLE.' where id="%d"', $theme_id));
345
+ }
346
+
347
+ if ($theme_row) {
348
+ $duplicate_values = WDILibrary::objectToArray($theme_row);
349
+ unset($duplicate_values['id']);
350
+ $duplicate_values['default_theme'] = 0;
351
+ $save = $wpdb->insert($wpdb->prefix . WDI_THEME_TABLE,$duplicate_values, $this->data_format);
352
+ $new_theme_id = $wpdb->get_var('SELECT MAX(id) FROM ' . $wpdb->prefix . WDI_THEME_TABLE);
353
+ }
354
+ return array('id'=>$new_theme_id,"msg"=>$save);
355
+ }
356
+
357
+
358
+ private function delete($id) {
359
+ global $wpdb;
360
+ //checking for default
361
+ $theme_row = $wpdb->get_row($wpdb->prepare("SELECT * FROM ".$wpdb->prefix . WDI_THEME_TABLE." WHERE id = %d",$id));
362
+ if($theme_row->default_theme == '0'){
363
+
364
+ $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . WDI_THEME_TABLE. ' WHERE id="%d"', $id);
365
+
366
+ if ($wpdb->query($query)) {
367
+ echo WDILibrary::message(__('Item Succesfully Deleted.',"wd-instagram-feed"), 'updated');
368
+ }
369
+ else {
370
+ echo WDILibrary::message(__('Error. Please install plugin again.',"wd-instagram-feed"), 'error');
371
+ }
372
+ }else{
373
+ echo WDILibrary::message(__('You cannot delete default theme.',"wd-instagram-feed"), 'error');
374
+ }
375
+ $this->display();
376
+ }
377
+
378
+ private function delete_all() {
379
+ global $wpdb;
380
+ $flag = FALSE;
381
+ $defaultFalg = false;
382
+ $sliders_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . WDI_THEME_TABLE);
383
+ foreach ($sliders_ids_col as $theme_id) {
384
+ $defaulFlag = false;
385
+ $theme_row = $wpdb->get_row($wpdb->prepare("SELECT * FROM ".$wpdb->prefix . WDI_THEME_TABLE." WHERE id = %d",$theme_id));
386
+ $check_id = WDILibrary::get('check_' . $theme_id, '');
387
+ $check_all_items = WDILibrary::get('check_all_items', '');
388
+ if ( !empty($check_id) || !empty($check_all_items) ) {
389
+ if( $theme_row->default_theme == '0' ) {
390
+ $flag = TRUE;
391
+ $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . WDI_THEME_TABLE.' WHERE id="%d"', $theme_id);
392
+ $wpdb->query($query);
393
+ }
394
+ else {
395
+ $defaulFlag = true;
396
+ echo WDILibrary::message(__('You cannot delete default theme.',"wd-instagram-feed"), 'error');
397
+ }
398
+ }
399
+ }
400
+ if ($flag) {
401
+ echo WDILibrary::message(__('Items Succesfully Deleted.',"wd-instagram-feed"), 'updated');
402
+ }
403
+ else {
404
+ if($defaulFlag==false){
405
+ echo WDILibrary::message(__('You must select at least one item.',"wd-instagram-feed"), 'error');
406
+ }
407
+
408
+ }
409
+ $this->display();
410
+ }
411
+
412
+ private function set_default($id) {
413
+ global $wpdb;
414
+ $reset =$wpdb->update($wpdb->prefix . WDI_THEME_TABLE, array('default_theme' => 0), array('default_theme' => '1'));
415
+ $save = $wpdb->update($wpdb->prefix . WDI_THEME_TABLE, array('default_theme' => 1), array('id' => $id));
416
+ $this->display();
417
+ }
418
+
419
+ private function sanitize_input($settings,$defaults){
420
+
421
+ require_once WDI_DIR . "/admin/models/WDIModelThemes_wdi.php";
422
+ $model = new WDIModelThemes_wdi();
423
+ $sanitize_types=$model->get_sanitize_types();
424
+ $sanitized_output = array();
425
+ foreach ($settings as $setting_name => $value) {
426
+
427
+ switch($sanitize_types[$setting_name]){
428
+ case 'string':{
429
+ $sanitized_val=$this->sanitize_string($value,$defaults[$setting_name]);
430
+ $sanitized_output[$setting_name] = $sanitized_val;
431
+ break;
432
+ }
433
+ case 'number':{
434
+ $sanitized_val=$this->sanitize_number($value,$defaults[$setting_name]);
435
+ $sanitized_output[$setting_name] = $sanitized_val;
436
+ break;
437
+ }
438
+ case 'bool':{
439
+ $sanitized_val=$this->sanitize_bool($value,$defaults[$setting_name]);
440
+ $sanitized_output[$setting_name] = $sanitized_val;
441
+ break;
442
+ }
443
+ case 'url':{
444
+ $sanitized_val=$this->sanitize_url($value,$defaults[$setting_name]);
445
+ $sanitized_output[$setting_name] = $sanitized_val;
446
+ break;
447
+ }
448
+ case 'length':{
449
+ $sanitized_val=$this->sanitize_length($value,$defaults[$setting_name]);
450
+ $sanitized_output[$setting_name] = $sanitized_val;
451
+ break;
452
+ }
453
+ case 'length_multi':{
454
+ $sanitized_val=$this->sanitize_length_multi($value,$defaults[$setting_name]);
455
+ $sanitized_output[$setting_name] = $sanitized_val;
456
+ break;
457
+ }
458
+ case 'color':{
459
+ $sanitized_val=$this->sanitize_color($value,$defaults[$setting_name]);
460
+ $sanitized_output[$setting_name] = $sanitized_val;
461
+ break;
462
+ }
463
+ case 'position':{
464
+ $sanitized_val=$this->sanitize_position($value,$defaults[$setting_name]);
465
+ $sanitized_output[$setting_name] = $sanitized_val;
466
+ break;
467
+ }
468
+ case 'css_box_shadow':{
469
+ $sanitized_val=$this->sanitize_css_box_shadow($value,$defaults[$setting_name]);
470
+ $sanitized_output[$setting_name] = $sanitized_val;
471
+ break;
472
+ }
473
+ case 'number_max_100':{
474
+ $sanitized_val=$this->sanitize_number_max_100($value,$defaults[$setting_name]);
475
+ $sanitized_output[$setting_name] = $sanitized_val;
476
+ break;
477
+ }
478
+ case 'number_neg':{
479
+ $sanitized_val=$this->sanitize_number_neg($value,$defaults[$setting_name]);
480
+ $sanitized_output[$setting_name] = $sanitized_val;
481
+ break;
482
+ }
483
+ }
484
+ }
485
+ return $sanitized_output;
486
+ }
487
+
488
+ private function sanitize_bool($value,$default){
489
+ if($value == 1 || $value == 0){
490
+ return $value;
491
+ }
492
+ else{
493
+ return $default;
494
+ }
495
+ }
496
+ private function sanitize_string($value,$default){
497
+ $sanitized_val = strip_tags(stripslashes($value));
498
+ if($sanitized_val == ''){
499
+ return $default;
500
+ }else{
501
+ return $sanitized_val;
502
+ }
503
+ }
504
+ private function sanitize_number($value,$default){
505
+ if(is_numeric($value) && $value>=0){
506
+ return $value;
507
+ }else{
508
+ return $default;
509
+ }
510
+ }
511
+ private function sanitize_number_neg($value,$default){
512
+ if(is_numeric($value)){
513
+ return $value;
514
+ }else{
515
+ return $default;
516
+ }
517
+ }
518
+ private function sanitize_number_max_100($value,$default){
519
+ if(is_numeric($value) && $value>=0 && $value<=100){
520
+ return $value;
521
+ }else{
522
+ return $default;
523
+ }
524
+ }
525
+ private function sanitize_css_box_shadow($value,$default){
526
+ $value = trim($value);
527
+ $values = explode(' ',$value);
528
+
529
+ if($value === 'none' || $value === 'initial' || $value =="0"){
530
+ return $value;
531
+ }
532
+ if(count($values)<3) {return $default;}
533
+ //first check test
534
+ $first_check_flag = false;
535
+ for($i=0;$i<count($values);$i++){
536
+ if($i != 2){
537
+ if($this->sanitize_length($values[$i], 'error') === 'error'){
538
+ $first_check_flag = true;
539
+ }
540
+ }else{
541
+ if($this->sanitize_color($values[$i], 'error') === 'error'){
542
+ $first_check_flag = true;
543
+ }
544
+ }
545
+ }
546
+ if($first_check_flag == false) {return $value;}
547
+
548
+ //second check test
549
+ //if(count($values) < 4) {return $default;}
550
+ $second_check_flag = false;
551
+ for($i=0;$i<count($values);$i++){
552
+ if($i != 3){
553
+ if($this->sanitize_length($values[$i], 'error') === 'error'){
554
+ $second_check_flag = true;
555
+ }
556
+ }else{
557
+ if($this->sanitize_color($values[$i], 'error') === 'error'){
558
+ $second_check_flag = true;
559
+ }
560
+ }
561
+ }
562
+ if($second_check_flag == false) {return $value;}
563
+ $third_check_flag = false;
564
+ for($i=0;$i<count($values);$i++){
565
+ if($i != 4){
566
+ if($this->sanitize_length($values[$i], 'error') === 'error'){
567
+ $third_check_flag = true;
568
+ }
569
+ }else{
570
+ if($this->sanitize_color($values[$i], 'error') === 'error'){
571
+ $third_check_flag = true;
572
+ }
573
+ }
574
+ }
575
+ if($third_check_flag === false) {
576
+ return $value;
577
+ }
578
+ return $default;
579
+
580
+ }
581
+ private function sanitize_url($value,$default){
582
+ if (function_exists('filter_var') && !filter_var($value, FILTER_VALIDATE_URL) === false) {
583
+ return $value;
584
+ } else {
585
+ return $default;
586
+ }
587
+ }
588
+
589
+ private function sanitize_length($value,$default){
590
+
591
+ $value = trim($value);
592
+
593
+ if($value == 0){
594
+ return $value;
595
+ }
596
+
597
+ $opt1 = substr($value,strlen($value)-2,strlen($value));
598
+ $opt2 = substr($value,strlen($value)-1,strlen($value));
599
+ $val = floatval($value);
600
+ $val1 = substr($value,0,strlen($value)-2);
601
+ $val2 = substr($value,0,strlen($value)-1);
602
+ if(is_numeric($val)){
603
+ if( is_numeric(substr($val1,-1)) && ($opt1=='px' || $opt1=='em')){
604
+ return $value;
605
+ }else if(is_numeric(substr($val2,-1)) && $opt2=='%'){
606
+ return $value;
607
+ }
608
+ else{
609
+ return $default;
610
+ }
611
+ }else{
612
+ return $default;
613
+ }
614
+ }
615
+ private function sanitize_color($value,$default){
616
+ $val = WDILibrary::regexColor($value,1);
617
+
618
+ if($val == false){
619
+ return $default;
620
+ }else{
621
+ return $val;
622
+ }
623
+
624
+ }
625
+ private function sanitize_position($value,$default){
626
+ $value = strtolower(trim($value));
627
+ if($value == 'left' || $value == 'right' || $value == 'center' || $value == 'top' || $value == 'bottom'){
628
+ return $value;
629
+ }else{
630
+ return $default;
631
+ }
632
+ }
633
+
634
+ private function sanitize_length_multi($value1,$default){
635
+ $value1 = trim($value1);
636
+ $output = '';
637
+ $values = explode(' ',$value1);
638
+ $flag = false;
639
+ $counter = 0;
640
+ foreach ($values as $value) {
641
+ if($value == '')
642
+ continue;
643
+ $counter++;
644
+ $value = trim($value);
645
+ $opt1 = substr($value,strlen($value)-2,strlen($value));
646
+ $opt2 = substr($value,strlen($value)-1,strlen($value));
647
+ $val = floatval($value);
648
+ $val1 = substr($value,0,strlen($value)-2);
649
+ $val2 = substr($value,0,strlen($value)-1);
650
+ if(is_numeric($val)){
651
+ if( is_numeric(substr($val1,-1)) && ($opt1=='px' || $opt1=='em')){
652
+ $output.=' '.$value.' ';
653
+ }else if((is_numeric(substr($val2,-1)) && $opt2=='%') || ($val == 0)){
654
+ $output.=' '.$value .' ';
655
+ }
656
+ else{
657
+ $flag = true;
658
+ }
659
+ }else{
660
+ $flag = true;
661
+ }
662
+ }
663
+ $output = trim($output);
664
+ if($flag == false && $counter<=4){
665
+ return $output;
666
+ }else{
667
+ return $default;
668
+ }
669
+
670
+ }
671
+
672
+ private function message($text,$type){
673
+ require_once WDI_DIR . "/admin/models/WDIModelThemes_wdi.php";
674
+ $model = new WDIModelThemes_wdi();
675
+ require_once WDI_DIR . "/admin/views/WDIViewThemes_wdi.php";
676
+ $view = new WDIViewThemes_wdi($model);
677
+ echo WDILibrary::message($text, $type);
678
+ }
679
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
680
  ?>
admin/controllers/WDIControllerUninstall_wdi.php CHANGED
@@ -1,144 +1,141 @@
1
- <?php
2
-
3
- class WDIControllerUninstall_wdi{
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Constructor & Destructor //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- function __construct(){
8
-
9
- global $wdi_wd_plugin_options;
10
- if(!class_exists("TenWebLibConfig")){
11
- include_once (WDI_DIR . "/wd/config.php");
12
- }
13
-
14
- if(!class_exists("TenWebLibDeactivate")) {
15
- include_once(WDI_DIR . "/wd/includes/deactivate.php");
16
- }
17
- $config = new TenWebLibConfig();
18
-
19
- $config->set_options( $wdi_wd_plugin_options );
20
- $deactivate_reasons = new TenWebLibDeactivate($config);
21
- //$deactivate_reasons->add_deactivation_feedback_dialog_box();
22
- $deactivate_reasons->submit_and_deactivate();
23
-
24
-
25
- }
26
- ////////////////////////////////////////////////////////////////////////////////////////
27
- // Public Methods //
28
- ////////////////////////////////////////////////////////////////////////////////////////
29
- public function execute() {
30
- $task = WDILibrary::get('task');
31
- if (method_exists($this, $task)) {
32
- check_admin_referer('nonce_wd', 'nonce_wd');
33
- $this->$task();
34
- }
35
- else {
36
- if($this->is_uninstalled()){
37
- $this->already_uninstalled();
38
- }else{
39
- $this->display();
40
- }
41
-
42
- }
43
- }
44
- public function display(){
45
- require_once(WDI_DIR . '/admin/models/WDIModelUninstall_wdi.php');
46
- $model = new WDIModelUninstall_wdi();
47
-
48
- require_once(WDI_DIR . '/admin/views/WDIViewUninstall_wdi.php');
49
- $view = new WDIViewUninstall_wdi($model);
50
- $view->display();
51
- }
52
-
53
- public function already_uninstalled(){
54
- require_once(WDI_DIR . '/admin/models/WDIModelUninstall_wdi.php');
55
- $model = new WDIModelUninstall_wdi();
56
-
57
- require_once(WDI_DIR . '/admin/views/WDIViewUninstall_wdi.php');
58
- $view = new WDIViewUninstall_wdi($model);
59
- $view->already_uninstalled();
60
- }
61
-
62
-
63
-
64
- public function succesfully_uninstalled(){
65
- require_once(WDI_DIR . '/admin/models/WDIModelUninstall_wdi.php');
66
- $model = new WDIModelUninstall_wdi();
67
-
68
- require_once(WDI_DIR . '/admin/views/WDIViewUninstall_wdi.php');
69
- $view = new WDIViewUninstall_wdi($model);
70
- $view->successfully_uninstalled();
71
- }
72
-
73
- private function uninstall(){
74
- $verify = WDILibrary::get('wdi_verify', 0);
75
- if ( !$this->is_uninstalled() ) {
76
- if( $verify == '1' ) {
77
- global $wpdb;
78
- $removed = false;
79
- $table_name = $wpdb->prefix.WDI_FEED_TABLE;
80
- $checktable = $wpdb->query("SHOW TABLES LIKE '$table_name'");
81
- $table_exists = $checktable > 0;
82
- if($table_exists){
83
- $sql = "DROP TABLE ". $table_name;
84
- $wpdb->query($sql);
85
- $removed = true;
86
- }
87
- $table_name = $wpdb->prefix.WDI_THEME_TABLE;
88
- $checktable = $wpdb->query("SHOW TABLES LIKE '$table_name'");
89
- $table_exists = $checktable > 0;
90
- if($table_exists){
91
- $sql = "DROP TABLE ". $table_name;
92
- $wpdb->query($sql);
93
- $removed = true;
94
- }
95
- if($removed == true) {
96
- $this->succesfully_uninstalled();
97
- }
98
- else{
99
- $this->already_uninstalled();
100
- };
101
- delete_option(WDI_OPT);
102
-
103
- $sample_post_id = get_option('wdi_sample_feed_post_id');
104
- if($sample_post_id !== false){
105
- wp_delete_post( $sample_post_id, true );
106
- }
107
-
108
- delete_option('wdi_sample_feed_id');
109
- delete_option('wdi_sample_feed_post_id');
110
- delete_option('wdi_sample_feed_post_url');
111
- delete_option('wdi_first_user_username');
112
- delete_option('tenweb_notice_status');
113
-
114
- $default_option=array();
115
- $default_option['wdi_plugin_uninstalled'] = 'true';
116
-
117
- add_option(WDI_OPT,$default_option);
118
- delete_option('wdi_version');
119
- $row = get_posts(array( 'post_type' => "wdi_instagram" ));
120
- if ( !empty($row[0]) ) {
121
- wp_delete_post( $row[0]->ID, true );
122
- }
123
- }else{
124
- $this->display();
125
- }
126
- }
127
- else{
128
- $this->already_uninstalled();
129
- }
130
- delete_option('wdi_subscribe_done');
131
- delete_option('wdi_redirect_to_settings');
132
- delete_option('wdi_do_activation_set_up_redirect');
133
- delete_option('tenweb_notice_version');
134
- }
135
-
136
- private function is_uninstalled(){
137
- global $wdi_options;
138
- if(isset($wdi_options['wdi_plugin_uninstalled']) && $wdi_options['wdi_plugin_uninstalled']=='true') {
139
- return true;
140
- }else{
141
- return false;
142
- }
143
- }
144
  }
1
+ <?php
2
+
3
+ class WDIControllerUninstall_wdi {
4
+
5
+ function __construct(){
6
+
7
+ global $wdi_wd_plugin_options;
8
+ if(!class_exists("TenWebLibConfig")){
9
+ include_once (WDI_DIR . "/wd/config.php");
10
+ }
11
+
12
+ if(!class_exists("TenWebLibDeactivate")) {
13
+ include_once(WDI_DIR . "/wd/includes/deactivate.php");
14
+ }
15
+ $config = new TenWebLibConfig();
16
+
17
+ $config->set_options( $wdi_wd_plugin_options );
18
+ $deactivate_reasons = new TenWebLibDeactivate($config);
19
+ //$deactivate_reasons->add_deactivation_feedback_dialog_box();
20
+ $deactivate_reasons->submit_and_deactivate();
21
+
22
+
23
+ }
24
+
25
+ public function execute() {
26
+ $task = WDILibrary::get('task');
27
+ if (method_exists($this, $task)) {
28
+ check_admin_referer('nonce_wd', 'nonce_wd');
29
+ $this->$task();
30
+ }
31
+ else {
32
+ if($this->is_uninstalled()){
33
+ $this->already_uninstalled();
34
+ }else{
35
+ $this->display();
36
+ }
37
+
38
+ }
39
+ }
40
+ public function display(){
41
+ require_once(WDI_DIR . '/admin/models/WDIModelUninstall_wdi.php');
42
+ $model = new WDIModelUninstall_wdi();
43
+
44
+ require_once(WDI_DIR . '/admin/views/WDIViewUninstall_wdi.php');
45
+ $view = new WDIViewUninstall_wdi($model);
46
+ $view->display();
47
+ }
48
+
49
+ public function already_uninstalled(){
50
+ require_once(WDI_DIR . '/admin/models/WDIModelUninstall_wdi.php');
51
+ $model = new WDIModelUninstall_wdi();
52
+
53
+ require_once(WDI_DIR . '/admin/views/WDIViewUninstall_wdi.php');
54
+ $view = new WDIViewUninstall_wdi($model);
55
+ $view->already_uninstalled();
56
+ }
57
+
58
+
59
+
60
+ public function succesfully_uninstalled(){
61
+ require_once(WDI_DIR . '/admin/models/WDIModelUninstall_wdi.php');
62
+ $model = new WDIModelUninstall_wdi();
63
+
64
+ require_once(WDI_DIR . '/admin/views/WDIViewUninstall_wdi.php');
65
+ $view = new WDIViewUninstall_wdi($model);
66
+ $view->successfully_uninstalled();
67
+ }
68
+
69
+ private function uninstall(){
70
+ $verify = WDILibrary::get('wdi_verify', 0);
71
+ if ( !$this->is_uninstalled() ) {
72
+ if( $verify == '1' ) {
73
+ global $wpdb;
74
+ $removed = false;
75
+ $table_name = $wpdb->prefix.WDI_FEED_TABLE;
76
+ $checktable = $wpdb->query("SHOW TABLES LIKE '$table_name'");
77
+ $table_exists = $checktable > 0;
78
+ if($table_exists){
79
+ $sql = "DROP TABLE ". $table_name;
80
+ $wpdb->query($sql);
81
+ $removed = true;
82
+ }
83
+ $table_name = $wpdb->prefix.WDI_THEME_TABLE;
84
+ $checktable = $wpdb->query("SHOW TABLES LIKE '$table_name'");
85
+ $table_exists = $checktable > 0;
86
+ if($table_exists){
87
+ $sql = "DROP TABLE ". $table_name;
88
+ $wpdb->query($sql);
89
+ $removed = true;
90
+ }
91
+ if($removed == true) {
92
+ $this->succesfully_uninstalled();
93
+ }
94
+ else{
95
+ $this->already_uninstalled();
96
+ };
97
+
98
+ delete_option(WDI_OPT);
99
+
100
+ $sample_post_id = get_option('wdi_sample_feed_post_id');
101
+ if($sample_post_id !== false){
102
+ wp_delete_post( $sample_post_id, true );
103
+ }
104
+
105
+ delete_option('wdi_sample_feed_id');
106
+ delete_option('wdi_sample_feed_post_id');
107
+ delete_option('wdi_sample_feed_post_url');
108
+ delete_option('wdi_first_user_username');
109
+ delete_option('tenweb_notice_status');
110
+
111
+ $default_option=array();
112
+ $default_option['wdi_plugin_uninstalled'] = 'true';
113
+
114
+ add_option(WDI_OPT,$default_option);
115
+ delete_option('wdi_version');
116
+ $row = get_posts(array( 'post_type' => "wdi_instagram" ));
117
+ if ( !empty($row[0]) ) {
118
+ wp_delete_post( $row[0]->ID, true );
119
+ }
120
+ }else{
121
+ $this->display();
122
+ }
123
+ }
124
+ else{
125
+ $this->already_uninstalled();
126
+ }
127
+ delete_option('wdi_subscribe_done');
128
+ delete_option('wdi_redirect_to_settings');
129
+ delete_option('wdi_do_activation_set_up_redirect');
130
+ delete_option('tenweb_notice_version');
131
+ }
132
+
133
+ private function is_uninstalled(){
134
+ global $wdi_options;
135
+ if(isset($wdi_options['wdi_plugin_uninstalled']) && $wdi_options['wdi_plugin_uninstalled']=='true') {
136
+ return true;
137
+ }else{
138
+ return false;
139
+ }
140
+ }
 
 
 
141
  }
admin/controllers/WDIControllerWidget.php CHANGED
@@ -1,81 +1,58 @@
1
- <?php
2
-
3
- class WDIControllerWidget extends WP_Widget {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $view;
14
- private $model;
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- // Constructor & Destructor //
17
- ////////////////////////////////////////////////////////////////////////////////////////
18
- public function __construct() {
19
-
20
- $widget_ops = array(
21
- 'classname' => 'wdi_instagram_widget',
22
- 'description' => __('Show your instagram feeds in your widget area',"wd-instagram-feed")
23
- );
24
- // Widget Control Settings.
25
- $control_ops = array('id_base' => 'wdi_instagram_widget');
26
- // Create the widget.
27
- parent::__construct('wdi_instagram_widget', __('Instagram WD Widget',"wd-instagram-feed"), $widget_ops, $control_ops);
28
- require_once WDI_DIR . "/admin/models/WDIModelWidget.php";
29
- $this->model = new WDIModelWidget();
30
- require_once WDI_DIR . "/admin/views/WDIViewWidget.php";
31
- $this->view = new WDIViewWidget($this->model);
32
- }
33
- ////////////////////////////////////////////////////////////////////////////////////////
34
- // Public Methods //
35
- ////////////////////////////////////////////////////////////////////////////////////////
36
-
37
- public function widget($args, $instance) {
38
-
39
- $this->view->widget($args, $instance);
40
- }
41
-
42
- public function form( $instance ) {
43
-
44
- $this->view->form(
45
- $instance,
46
- parent::get_field_id('title'),
47
- parent::get_field_name('title'),
48
- parent::get_field_id('feed_id'),
49
- parent::get_field_name('feed_id'),
50
- parent::get_field_id('img_number'),
51
- parent::get_field_name('img_number'),
52
- parent::get_field_id('show_likes_comments'),
53
- parent::get_field_name('show_likes_comments'),
54
- parent::get_field_id('number_of_columns'),
55
- parent::get_field_name('number_of_columns'),
56
- parent::get_field_id('enable_loading_buttons'),
57
- parent::get_field_name('enable_loading_buttons')
58
- );
59
- }
60
-
61
- // Update Settings.
62
- public function update($new_instance, $old_instance) {
63
- $instance['title'] = wp_filter_nohtml_kses($new_instance['title']);
64
- $instance['feed_id'] = intval($new_instance['feed_id']);
65
- $instance['img_number'] = intval($new_instance['img_number']) ? intval($new_instance['img_number']) : 4;
66
- $instance['show_likes_comments'] = isset($new_instance['show_likes_comments']) ? 1 : 0;
67
- $instance['number_of_columns'] = intval($new_instance['number_of_columns']) ? intval($new_instance['number_of_columns']) : 1;
68
- $instance['enable_loading_buttons'] = isset($new_instance['enable_loading_buttons']) ? 1 : 0;
69
- return $instance;
70
- }
71
-
72
- ////////////////////////////////////////////////////////////////////////////////////////
73
- // Getters & Setters //
74
- ////////////////////////////////////////////////////////////////////////////////////////
75
- ////////////////////////////////////////////////////////////////////////////////////////
76
- // Private Methods //
77
- ////////////////////////////////////////////////////////////////////////////////////////
78
- ////////////////////////////////////////////////////////////////////////////////////////
79
- // Listeners //
80
- ////////////////////////////////////////////////////////////////////////////////////////
81
  }
1
+ <?php
2
+
3
+ class WDIControllerWidget extends WP_Widget {
4
+
5
+ private $view;
6
+ private $model;
7
+
8
+ public function __construct() {
9
+
10
+ $widget_ops = array(
11
+ 'classname' => 'wdi_instagram_widget',
12
+ 'description' => __('Show your instagram feeds in your widget area',"wd-instagram-feed")
13
+ );
14
+ // Widget Control Settings.
15
+ $control_ops = array('id_base' => 'wdi_instagram_widget');
16
+ // Create the widget.
17
+ parent::__construct('wdi_instagram_widget', __('Instagram WD Widget',"wd-instagram-feed"), $widget_ops, $control_ops);
18
+ require_once WDI_DIR . "/admin/models/WDIModelWidget.php";
19
+ $this->model = new WDIModelWidget();
20
+ require_once WDI_DIR . "/admin/views/WDIViewWidget.php";
21
+ $this->view = new WDIViewWidget($this->model);
22
+ }
23
+
24
+ public function widget($args, $instance) {
25
+
26
+ $this->view->widget($args, $instance);
27
+ }
28
+
29
+ public function form( $instance ) {
30
+
31
+ $this->view->form(
32
+ $instance,
33
+ parent::get_field_id('title'),
34
+ parent::get_field_name('title'),
35
+ parent::get_field_id('feed_id'),
36
+ parent::get_field_name('feed_id'),
37
+ parent::get_field_id('img_number'),
38
+ parent::get_field_name('img_number'),
39
+ parent::get_field_id('show_likes_comments'),
40
+ parent::get_field_name('show_likes_comments'),
41
+ parent::get_field_id('number_of_columns'),
42
+ parent::get_field_name('number_of_columns'),
43
+ parent::get_field_id('enable_loading_buttons'),
44
+ parent::get_field_name('enable_loading_buttons')
45
+ );
46
+ }
47
+
48
+ // Update Settings.
49
+ public function update($new_instance, $old_instance) {
50
+ $instance['title'] = wp_filter_nohtml_kses($new_instance['title']);
51
+ $instance['feed_id'] = intval($new_instance['feed_id']);
52
+ $instance['img_number'] = intval($new_instance['img_number']) ? intval($new_instance['img_number']) : 4;
53
+ $instance['show_likes_comments'] = isset($new_instance['show_likes_comments']) ? 1 : 0;
54
+ $instance['number_of_columns'] = intval($new_instance['number_of_columns']) ? intval($new_instance['number_of_columns']) : 1;
55
+ $instance['enable_loading_buttons'] = isset($new_instance['enable_loading_buttons']) ? 1 : 0;
56
+ return $instance;
57
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  }
admin/models/WDIModelEditorShortcode.php CHANGED
@@ -1,43 +1,19 @@
1
- <?php
2
-
3
- class WDIModelEditorShortcode {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
-
22
- public function get_row_data() {
23
- global $wpdb;
24
- $row = $wpdb->get_results("SELECT id, feed_name, feed_thumb FROM " . $wpdb->prefix . WDI_FEED_TABLE." WHERE published=1 ORDER BY `feed_name` ASC");
25
- return $row;
26
- }
27
-
28
- public function get_first_feed_id(){
29
- global $wpdb;
30
- $min_id = $wpdb->get_var('SELECT MIN(id) FROM ' . $wpdb->prefix . WDI_FEED_TABLE.' WHERE published=1');
31
- return $min_id;
32
- }
33
-
34
- ////////////////////////////////////////////////////////////////////////////////////////
35
- // Getters & Setters //
36
- ////////////////////////////////////////////////////////////////////////////////////////
37
- ////////////////////////////////////////////////////////////////////////////////////////
38
- // Private Methods //
39
- ////////////////////////////////////////////////////////////////////////////////////////
40
- ////////////////////////////////////////////////////////////////////////////////////////
41
- // Listeners //
42
- ////////////////////////////////////////////////////////////////////////////////////////
43
  }
1
+ <?php
2
+
3
+ class WDIModelEditorShortcode {
4
+
5
+ public function __construct() {
6
+ }
7
+
8
+ public function get_row_data() {
9
+ global $wpdb;
10
+ $row = $wpdb->get_results("SELECT id, feed_name, feed_thumb FROM " . $wpdb->prefix . WDI_FEED_TABLE." WHERE published=1 ORDER BY `feed_name` ASC");
11
+ return $row;
12
+ }
13
+
14
+ public function get_first_feed_id(){
15
+ global $wpdb;
16
+ $min_id = $wpdb->get_var('SELECT MIN(id) FROM ' . $wpdb->prefix . WDI_FEED_TABLE.' WHERE published=1');
17
+ return $min_id;
18
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  }
admin/models/WDIModelFeeds_wdi.php CHANGED
@@ -1,313 +1,315 @@
1
- <?php
2
-
3
- class WDIModelFeeds_wdi {
4
-
5
- private $page_number = null;
6
-
7
- private $search_text = "";
8
-
9
- public function __construct() {
10
- $this->page_number = WDILibrary::get('paged', '');
11
- if( empty($this->page_number) ){
12
- $this->page_number = WDILibrary::get('page_number', '');
13
- }
14
- $this->search_text = WDILibrary::get('search_value', '');
15
- if( empty($this->search_text) ){
16
- $this->search_text = WDILibrary::get('search', '');
17
- }
18
- }
19
-
20
- public function get_slides_row_data($slider_id) {
21
- global $wpdb;
22
- $row = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . WDI_FEED_TABLE. " WHERE slider_id='%d' ORDER BY `order` ASC", $slider_id));
23
-
24
- return $row;
25
- }
26
-
27
-
28
- public function get_rows_data() {
29
- global $wpdb;
30
-
31
- $where = ((!empty($this->search_text)) ? 'WHERE feed_name LIKE "%' . esc_html(stripslashes($this->search_text)) . '%"' : '');
32
- $order = WDILibrary::get('order', 'desc');
33
-
34
- $order_by_arr = array('id', 'feed_name', 'published');
35
- $order_by = WDILibrary::get('order_by', 'id');
36
- $order_by = ( in_array($order_by, $order_by_arr) ) ? $order_by : 'id';
37
- $order_by = ' ORDER BY `' . $order_by . '` ' . $order;
38
-
39
- if (isset($this->page_number) && $this->page_number) {
40
- $limit = ((int) $this->page_number - 1) * 20;
41
- }
42
- else {
43
- $limit = 0;
44
- }
45
-
46
- $query_limit = " LIMIT " . $limit . ",20";
47
- $query = "SELECT * FROM " . $wpdb->prefix . WDI_FEED_TABLE .' '. $where . $order_by.$query_limit;
48
- $rows = $wpdb->get_results($query);
49
- return $rows;
50
- }
51
-
52
- public function get_slider_prev_img($slider_id) {
53
- global $wpdb;
54
- $prev_img_url = $wpdb->get_var($wpdb->prepare("SELECT `feed_thumb` FROM " . $wpdb->prefix . WDI_FEED_TABLE . " WHERE id='%d'", $slider_id));
55
- $prev_img_url = $prev_img_url ? $prev_img_url : WDI_URL . '/images/no-image.png';
56
- return $prev_img_url;
57
- }
58
-
59
- public function page_nav() {
60
- global $wpdb;
61
- $where = ((isset($this->search_text) && !empty($this->search_text) && (esc_html(stripslashes($this->search_text)) != '')) ? 'WHERE feed_name LIKE "%' . esc_html(stripslashes($this->search_text)) . '%"' : '');
62
- $total = $wpdb->get_var("SELECT COUNT(*) FROM " . $wpdb->prefix . WDI_FEED_TABLE. ' ' . $where);
63
- $page_nav['total'] = $total;
64
- if (isset($this->page_number) && $this->page_number) {
65
- $limit = ((int) $this->page_number - 1) * 20;
66
- }
67
- else {
68
- $limit = 0;
69
- }
70
- $page_nav['limit'] = (int) ($limit / 20 + 1);
71
- return $page_nav;
72
- }
73
-
74
- public static function wdi_get_feed_defaults() {
75
- global $wdi_options;
76
- global $wpdb;
77
- $query = $wpdb->prepare("SELECT id FROM " . $wpdb->prefix . WDI_THEME_TABLE . " WHERE default_theme='%d'", 1);
78
- $default_theme = WDILibrary::objectToArray($wpdb->get_results($query));
79
- $default_user = new stdClass();
80
- $default_user->username = $wdi_options['wdi_user_name'];
81
- $default_user->id = $wdi_options['wdi_user_id'];
82
- $settings = array(
83
- 'thumb_user' => $wdi_options['wdi_user_name'],
84
- 'feed_name' => 'Sample Feed',
85
- 'feed_thumb' => WDI_URL . '/images/no-image.png',
86
- 'published' => '1',
87
- 'theme_id' => $default_theme[0]['id'],
88
- 'feed_users' => json_encode(array( $default_user )),
89
- 'feed_display_view' => 'load_more_btn',
90
- 'sort_images_by' => 'date',
91
- 'display_order' => 'desc',
92
- 'follow_on_instagram_btn' => '1', /* @TODO API Changes 2020. */
93
- 'display_header' => '0',
94
- 'number_of_photos' => '20',
95
- 'load_more_number' => '4',
96
- 'pagination_per_page_number' => '12',
97
- 'pagination_preload_number' => '10',
98
- 'image_browser_preload_number' => '10',
99
- 'image_browser_load_number' => '10',
100
- 'number_of_columns' => '4',
101
- 'resort_after_load_more' => '0',
102
- 'show_likes' => '0',
103
- 'show_description' => '0',
104
- 'show_comments' => '1', /* @TODO API Changes 2020. */
105
- 'show_usernames' => '1', /* @TODO API Changes 2020. */
106
- 'display_user_info' => '1', /* @TODO API Changes 2020. */
107
- 'display_user_post_follow_number' => '1', /* @TODO API Changes 2020. */
108
- 'show_full_description' => '1', /* @TODO API Changes 2020. */
109
- 'disable_mobile_layout' => '0',
110
- 'feed_type' => 'thumbnails',
111
- 'feed_item_onclick' => 'lightbox',
112
- //lightbox defaults
113
- 'popup_fullscreen' => '0',
114
- 'popup_width' => '640',
115
- 'popup_height' => '640',
116
- 'popup_type' => 'none',
117
- 'popup_autoplay' => '0',
118
- 'popup_interval' => '5',
119
- 'popup_enable_filmstrip' => '0',
120
- 'popup_filmstrip_height' => '70',
121
- 'autohide_lightbox_navigation' => '1',
122
- 'popup_enable_ctrl_btn' => '1',
123
- 'popup_enable_fullscreen' => '1',
124
- 'popup_enable_info' => '0',
125
- 'popup_info_always_show' => '0',
126
- 'popup_info_full_width' => '0',
127
- 'popup_enable_comment' => '0',
128
- 'popup_enable_fullsize_image' => '1',
129
- 'popup_enable_download' => '0',
130
- 'popup_enable_share_buttons' => '0',
131
- 'popup_enable_facebook' => '0',
132
- 'popup_enable_twitter' => '0',
133
- 'popup_enable_google' => '0',
134
- 'popup_enable_pinterest' => '0',
135
- 'popup_enable_tumblr' => '0',
136
- 'show_image_counts' => '0',
137
- 'enable_loop' => '1',
138
- 'popup_image_right_click' => '1',
139
- 'conditional_filters' => '',
140
- 'conditional_filter_type' => 'none',
141
- 'show_username_on_thumb' => '0',
142
- 'conditional_filter_enable' => '0',
143
- 'liked_feed' => 'userhash',
144
- 'mobile_breakpoint' => '640',
145
- 'redirect_url' => '',
146
- 'feed_resolution' => 'optimal',
147
- 'hashtag_top_recent' => '1',
148
- );
149
- return $settings;
150
- }
151
-
152
- public function get_sanitize_types(){
153
- $sanitize_types = array(
154
- 'thumb_user'=>'string',
155
- 'feed_name' => 'string',
156
- 'feed_thumb'=> 'url',
157
- 'published' => 'bool',
158
- 'theme_id'=> 'number'/*$options['wdi_default_theme']*/,
159
- 'feed_users'=> 'string',
160
- 'feed_display_view' =>'string',
161
- 'sort_images_by' => 'string',
162
- 'display_order'=> 'string',
163
- 'follow_on_instagram_btn' => 'bool',
164
- 'display_header'=> 'bool',
165
- 'number_of_photos'=> 'number',
166
- 'load_more_number' => 'number',
167
- 'pagination_per_page_number'=>'number',
168
- 'pagination_preload_number'=>'number',
169
- 'image_browser_preload_number'=>'number',
170
- 'image_browser_load_number'=>'number',
171
- 'number_of_columns'=> 'number',
172
- 'resort_after_load_more'=>'bool',
173
- 'show_likes'=> 'bool',
174
- 'show_description'=> 'bool' ,
175
- 'show_comments'=> 'bool',
176
- 'show_username_on_thumb'=>'bool',
177
- 'show_usernames'=>'bool',
178
- 'display_user_info'=>'bool',
179
- 'display_user_post_follow_number'=>'bool',
180
- 'show_full_description'=>'bool',
181
- 'disable_mobile_layout'=>'bool',
182
- 'feed_type' => 'string',
183
- 'feed_item_onclick' => 'string',
184
- //lightbox defaults
185
- 'popup_fullscreen'=>'bool',
186
- 'popup_width'=>'number',
187
- 'popup_height'=>'number',
188
- 'popup_type'=>'string',
189
- 'popup_autoplay'=>'bool',
190
- 'popup_interval'=>'number',
191
- 'popup_enable_filmstrip'=>'bool',
192
- 'popup_filmstrip_height'=>'number',
193
- 'autohide_lightbox_navigation'=>'bool',
194
- 'popup_enable_ctrl_btn'=>'bool',
195
- 'popup_enable_fullscreen'=>'bool',
196
- 'popup_enable_info'=>'bool',
197
- 'popup_info_always_show'=>'bool',
198
- 'popup_info_full_width'=>'bool',
199
- 'popup_enable_comment'=>'bool',
200
- 'popup_enable_fullsize_image'=>'bool',
201
- 'popup_enable_download'=>'bool',
202
- 'popup_enable_share_buttons'=>'bool',
203
- 'popup_enable_facebook'=>'bool',
204
- 'popup_enable_twitter'=>'bool',
205
- 'popup_enable_google'=>'bool',
206
- 'popup_enable_pinterest'=>'bool',
207
- 'popup_enable_tumblr'=>'bool',
208
- 'show_image_counts'=>'bool',
209
- 'enable_loop'=>'bool',
210
- 'popup_image_right_click'=>'bool',
211
- 'conditional_filters' => 'string',
212
- 'conditional_filter_enable'=>'number',
213
- 'conditional_filter_type' => 'string',
214
- 'liked_feed' => 'string',
215
- 'mobile_breakpoint' => 'number',
216
- 'redirect_url' => 'string',
217
- 'feed_resolution' => 'string',
218
- 'hashtag_top_recent' => 'bool',
219
- );
220
- return $sanitize_types;
221
- }
222
-
223
- public function get_feed_row($current_id){
224
- global $wpdb;
225
- $settings = $wpdb->get_row($wpdb->prepare("SELECT * FROM ". $wpdb->prefix.WDI_FEED_TABLE. " WHERE id ='%d' ",$current_id));
226
-
227
- $feed_row = $this->check_settings( $settings );
228
- return $feed_row;
229
- }
230
-
231
- private function check_settings($settings){
232
- $settings = WDILibrary::objectToArray($settings);
233
-
234
- if(isset($settings['feed_users'])){
235
- $settings['feed_users'] = json_decode($settings['feed_users']);
236
- $settings['feed_users'] = json_encode(array($settings['feed_users'][0]));
237
- };
238
- if(isset($settings['theme_id']) && intval($settings['theme_id']) > 1){
239
- $settings['theme_id'] = '1';
240
- };
241
- if(isset($settings['feed_display_view']) && $settings['feed_display_view'] === 'infinite_scroll'){
242
- $settings['feed_display_view'] = 'load_more_btn';
243
- }
244
- if(isset($settings['feed_type']) && $settings['feed_type'] === 'masonry' || $settings['feed_type'] === 'blog_style'){
245
- $settings['feed_type'] = 'thumbnails';
246
- }
247
- if(isset($settings['popup_enable_filmstrip']) && $settings['popup_enable_filmstrip'] == '1'){
248
- $settings['popup_enable_filmstrip'] = '0';
249
- }
250
-
251
- if(isset($settings['show_username_on_thumb']) && $settings['show_username_on_thumb'] == '1'){
252
- $settings['show_username_on_thumb'] = '0';
253
- }
254
-
255
- if(isset($settings['conditional_filter_enable']) && $settings['conditional_filter_enable'] == '1'){
256
- $settings['conditional_filter_enable'] = '0';
257
- }
258
-
259
- if(isset($settings['popup_filmstrip_height']) && $settings['popup_filmstrip_height'] != '70'){
260
- $settings['popup_filmstrip_height'] = '70';
261
- }
262
- if(isset($settings['popup_enable_comment']) && $settings['popup_enable_comment'] == '1'){
263
- $settings['popup_enable_comment'] = '0';
264
- }
265
- if(isset($settings['popup_enable_share_buttons']) && $settings['popup_enable_share_buttons'] == '1'){
266
- $settings['popup_enable_share_buttons'] = '0';
267
- }
268
- $settings = WDILibrary::arrayToObject($settings);
269
- return $settings;
270
- }
271
- /**
272
- * Create Preview Instagram post.
273
- *
274
- * @return string $guid
275
- */
276
- public function get_instagram_preview_post() {
277
- global $wpdb;
278
- $post_type = 'wdi_instagram';
279
- $args = array(
280
- 'post_type' => $post_type,
281
- 'post_status' => 'private'
282
- );
283
- $row = get_posts($args);
284
-
285
- if ( !empty($row[0]) ) {
286
- return get_permalink($row[0]->ID);
287
- }
288
- else {
289
- $post_params = array(
290
- 'post_author' => 1,
291
- 'post_status' => 'private',
292
- 'post_content' => '[wdi_preview]',
293
- 'post_title' => 'Preview',
294
- 'post_type' => $post_type,
295
- 'comment_status' => 'closed',
296
- 'ping_status' => 'closed',
297
- 'post_parent' => 0,
298
- 'menu_order' => 0,
299
- 'import_id' => 0,
300
- );
301
- // Create new post by fmformpreview type.
302
- if ( wp_insert_post($post_params) ) {
303
- flush_rewrite_rules();
304
-
305
- return get_the_guid($wpdb->insert_id);
306
- }
307
- else {
308
- return "";
309
- }
310
- }
311
- }
312
- }
313
- ?>
 
 
1
+ <?php
2
+
3
+ class WDIModelFeeds_wdi {
4
+
5
+ private $page_number = null;
6
+
7
+ private $search_text = "";
8
+
9
+ public function __construct() {
10
+ $this->page_number = WDILibrary::get('paged', '');
11
+ if( empty($this->page_number) ){
12
+ $this->page_number = WDILibrary::get('page_number', '');
13
+ }
14
+ $this->search_text = WDILibrary::get('search_value', '');
15
+ if( empty($this->search_text) ){
16
+ $this->search_text = WDILibrary::get('search', '');
17
+ }
18
+ }
19
+
20
+ public function get_slides_row_data($slider_id) {
21
+ global $wpdb;
22
+ $row = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . WDI_FEED_TABLE. " WHERE slider_id='%d' ORDER BY `order` ASC", $slider_id));
23
+
24
+ return $row;
25
+ }
26
+
27
+
28
+ public function get_rows_data() {
29
+ global $wpdb;
30
+
31
+ $where = ((!empty($this->search_text)) ? 'WHERE feed_name LIKE "%' . esc_html(stripslashes($this->search_text)) . '%"' : '');
32
+ $order = WDILibrary::get('order', 'desc');
33
+
34
+ $order_by_arr = array('id', 'feed_name', 'published');
35
+ $order_by = WDILibrary::get('order_by', 'id');
36
+ $order_by = ( in_array($order_by, $order_by_arr) ) ? $order_by : 'id';
37
+ $order_by = ' ORDER BY `' . $order_by . '` ' . $order;
38
+ if (isset($this->page_number) && $this->page_number) {
39
+ $limit = ((int) $this->page_number - 1) * 20;
40
+ }
41
+ else {
42
+ $limit = 0;
43
+ }
44
+
45
+ $query_limit = " LIMIT " . $limit . ",20";
46
+ $query = "SELECT * FROM " . $wpdb->prefix . WDI_FEED_TABLE .' '. $where . $order_by.$query_limit;
47
+ $rows = $wpdb->get_results($query);
48
+ return $rows;
49
+ }
50
+
51
+ public function get_slider_prev_img($slider_id) {
52
+ global $wpdb;
53
+ $prev_img_url = $wpdb->get_var($wpdb->prepare("SELECT `feed_thumb` FROM " . $wpdb->prefix . WDI_FEED_TABLE . " WHERE id='%d'", $slider_id));
54
+ $prev_img_url = $prev_img_url ? $prev_img_url : WDI_URL . '/images/no-image.png';
55
+ return $prev_img_url;
56
+ }
57
+
58
+ public function page_nav() {
59
+ global $wpdb;
60
+ $where = ((isset($this->search_text) && !empty($this->search_text) && (esc_html(stripslashes($this->search_text)) != '')) ? 'WHERE feed_name LIKE "%' . esc_html(stripslashes($this->search_text)) . '%"' : '');
61
+ $total = $wpdb->get_var("SELECT COUNT(*) FROM " . $wpdb->prefix . WDI_FEED_TABLE. ' ' . $where);
62
+ $page_nav['total'] = $total;
63
+ if (isset($this->page_number) && $this->page_number) {
64
+ $limit = ((int) $this->page_number - 1) * 20;
65
+ }
66
+ else {
67
+ $limit = 0;
68
+ }
69
+ $page_nav['limit'] = (int) ($limit / 20 + 1);
70
+ return $page_nav;
71
+ }
72
+
73
+ public static function wdi_get_feed_defaults() {
74
+ global $wdi_options;
75
+ global $wpdb;
76
+ $query = $wpdb->prepare("SELECT id FROM " . $wpdb->prefix . WDI_THEME_TABLE . " WHERE default_theme='%d'", 1);
77
+ $default_theme = WDILibrary::objectToArray($wpdb->get_results($query));
78
+ $default_user = new stdClass();
79
+ $default_user->username = $wdi_options['wdi_user_name'];
80
+ $default_user->id = $wdi_options['wdi_user_id'];
81
+ $settings = array(
82
+ 'thumb_user' => $wdi_options['wdi_user_name'],
83
+ 'feed_name' => 'Sample Feed',
84
+ 'feed_thumb' => WDI_URL . '/images/no-image.png',
85
+ 'published' => '1',
86
+ 'theme_id' => $default_theme[0]['id'],
87
+ 'feed_users' => json_encode(array( $default_user )),
88
+ 'feed_display_view' => 'load_more_btn',
89
+ 'sort_images_by' => 'date',
90
+ 'display_order' => 'desc',
91
+ 'follow_on_instagram_btn' => '1', /* @TODO API Changes 2020. */
92
+ 'display_header' => '0',
93
+ 'number_of_photos' => '20',
94
+ 'load_more_number' => '4',
95
+ 'pagination_per_page_number' => '12',
96
+ 'pagination_preload_number' => '10',
97
+ 'image_browser_preload_number' => '10',
98
+ 'image_browser_load_number' => '10',
99
+ 'number_of_columns' => '4',
100
+ 'resort_after_load_more' => '0',
101
+ 'show_likes' => '0',
102
+ 'show_description' => '0',
103
+ 'show_comments' => '1', /* @TODO API Changes 2020. */
104
+ 'show_usernames' => '1', /* @TODO API Changes 2020. */
105
+ 'display_user_info' => '1', /* @TODO API Changes 2020. */
106
+ 'display_user_post_follow_number' => '1', /* @TODO API Changes 2020. */
107
+ 'show_full_description' => '1', /* @TODO API Changes 2020. */
108
+ 'disable_mobile_layout' => '0',
109
+ 'feed_type' => 'thumbnails',
110
+ 'feed_item_onclick' => 'lightbox',
111
+ //lightbox defaults
112
+ 'popup_fullscreen' => '0',
113
+ 'popup_width' => '640',
114
+ 'popup_height' => '640',
115
+ 'popup_type' => 'none',
116
+ 'popup_autoplay' => '0',
117
+ 'popup_interval' => '5',
118
+ 'popup_enable_filmstrip' => '0',
119
+ 'popup_filmstrip_height' => '70',
120
+ 'autohide_lightbox_navigation' => '1',
121
+ 'popup_enable_ctrl_btn' => '1',
122
+ 'popup_enable_fullscreen' => '1',
123
+ 'popup_enable_info' => '0',
124
+ 'popup_info_always_show' => '0',
125
+ 'popup_info_full_width' => '0',
126
+ 'popup_enable_comment' => '0',
127
+ 'popup_enable_fullsize_image' => '1',
128
+ 'popup_enable_download' => '0',
129
+ 'popup_enable_share_buttons' => '0',
130
+ 'popup_enable_facebook' => '0',
131
+ 'popup_enable_twitter' => '0',
132
+ 'popup_enable_google' => '0',
133
+ 'popup_enable_pinterest' => '0',
134
+ 'popup_enable_tumblr' => '0',
135
+ 'show_image_counts' => '0',
136
+ 'enable_loop' => '1',
137
+ 'popup_image_right_click' => '1',
138
+ 'conditional_filters' => '',
139
+ 'conditional_filter_type' => 'none',
140
+ 'show_username_on_thumb' => '0',
141
+ 'conditional_filter_enable' => '0',
142
+ 'liked_feed' => 'userhash',
143
+ 'mobile_breakpoint' => '640',
144
+ 'redirect_url' => '',
145
+ 'feed_resolution' => 'optimal',
146
+ 'hashtag_top_recent' => '1',
147
+ );
148
+ return $settings;
149
+ }
150
+
151
+ public function get_sanitize_types(){
152
+ $sanitize_types = array(
153
+ 'thumb_user'=>'string',
154
+ 'feed_name' => 'string',
155
+ 'feed_thumb'=> 'url',
156
+ 'published' => 'bool',
157
+ 'theme_id'=> 'number'/*$options['wdi_default_theme']*/,
158
+ 'feed_users'=> 'string',
159
+ 'feed_display_view' =>'string',
160
+ 'sort_images_by' => 'string',
161
+ 'display_order'=> 'string',
162
+ 'follow_on_instagram_btn' => 'bool',
163
+ 'display_header'=> 'bool',
164
+ 'number_of_photos'=> 'number',
165
+ 'load_more_number' => 'number',
166
+ 'pagination_per_page_number'=>'number',
167
+ 'pagination_preload_number'=>'number',
168
+ 'image_browser_preload_number'=>'number',
169
+ 'image_browser_load_number'=>'number',
170
+ 'number_of_columns'=> 'number',
171
+ 'resort_after_load_more'=>'bool',
172
+ 'show_likes'=> 'bool',
173
+ 'show_description'=> 'bool' ,
174
+ 'show_comments'=> 'bool',
175
+ 'show_username_on_thumb'=>'bool',
176
+ 'show_usernames'=>'bool',
177
+ 'display_user_info'=>'bool',
178
+ 'display_user_post_follow_number'=>'bool',
179
+ 'show_full_description'=>'bool',
180
+ 'disable_mobile_layout'=>'bool',
181
+ 'feed_type' => 'string',
182
+ 'feed_item_onclick' => 'string',
183
+
184
+ //lightbox defaults
185
+
186
+ 'popup_fullscreen'=>'bool',
187
+ 'popup_width'=>'number',
188
+ 'popup_height'=>'number',
189
+ 'popup_type'=>'string',
190
+ 'popup_autoplay'=>'bool',
191
+ 'popup_interval'=>'number',
192
+ 'popup_enable_filmstrip'=>'bool',
193
+ 'popup_filmstrip_height'=>'number',
194
+ 'autohide_lightbox_navigation'=>'bool',
195
+ 'popup_enable_ctrl_btn'=>'bool',
196
+ 'popup_enable_fullscreen'=>'bool',
197
+ 'popup_enable_info'=>'bool',
198
+ 'popup_info_always_show'=>'bool',
199
+ 'popup_info_full_width'=>'bool',
200
+ 'popup_enable_comment'=>'bool',
201
+ 'popup_enable_fullsize_image'=>'bool',
202
+ 'popup_enable_download'=>'bool',
203
+ 'popup_enable_share_buttons'=>'bool',
204
+ 'popup_enable_facebook'=>'bool',
205
+ 'popup_enable_twitter'=>'bool',
206
+ 'popup_enable_google'=>'bool',
207
+ 'popup_enable_pinterest'=>'bool',
208
+ 'popup_enable_tumblr'=>'bool',
209
+ 'show_image_counts'=>'bool',
210
+ 'enable_loop'=>'bool',
211
+ 'popup_image_right_click'=>'bool',
212
+
213
+ 'conditional_filters' => 'string',
214
+ 'conditional_filter_enable'=>'number',
215
+ 'conditional_filter_type' => 'string',
216
+
217
+ 'liked_feed' => 'string',
218
+ 'mobile_breakpoint' => 'number',
219
+ 'redirect_url' => 'string',
220
+ 'feed_resolution' => 'string',
221
+ 'hashtag_top_recent' => 'bool',
222
+ );
223
+ return $sanitize_types;
224
+ }
225
+
226
+ public function get_feed_row($current_id){
227
+ global $wpdb;
228
+ $settings = $wpdb->get_row($wpdb->prepare("SELECT * FROM ". $wpdb->prefix.WDI_FEED_TABLE. " WHERE id ='%d' ",$current_id));
229
+
230
+ $feed_row = $this->check_settings( $settings );
231
+ return $feed_row;
232
+ }
233
+
234
+ private function check_settings($settings){
235
+ $settings = WDILibrary::objectToArray($settings);
236
+
237
+ if(isset($settings['feed_users'])){
238
+ $settings['feed_users'] = json_decode($settings['feed_users']);
239
+ $settings['feed_users'] = json_encode(array($settings['feed_users'][0]));
240
+ };
241
+ if(isset($settings['theme_id']) && intval($settings['theme_id']) > 1){
242
+ $settings['theme_id'] = '1';
243
+ };
244
+ if(isset($settings['feed_display_view']) && $settings['feed_display_view'] === 'infinite_scroll'){
245
+ $settings['feed_display_view'] = 'load_more_btn';
246
+ }
247
+ if(isset($settings['feed_type']) && $settings['feed_type'] === 'masonry' || $settings['feed_type'] === 'blog_style'){
248
+ $settings['feed_type'] = 'thumbnails';
249
+ }
250
+ if(isset($settings['popup_enable_filmstrip']) && $settings['popup_enable_filmstrip'] == '1'){
251
+ $settings['popup_enable_filmstrip'] = '0';
252
+ }
253
+
254
+ if(isset($settings['show_username_on_thumb']) && $settings['show_username_on_thumb'] == '1'){
255
+ $settings['show_username_on_thumb'] = '0';
256
+ }
257
+
258
+ if(isset($settings['conditional_filter_enable']) && $settings['conditional_filter_enable'] == '1'){
259
+ $settings['conditional_filter_enable'] = '0';
260
+ }
261
+
262
+ if(isset($settings['popup_filmstrip_height']) && $settings['popup_filmstrip_height'] != '70'){
263
+ $settings['popup_filmstrip_height'] = '70';
264
+ }
265
+ if(isset($settings['popup_enable_comment']) && $settings['popup_enable_comment'] == '1'){
266
+ $settings['popup_enable_comment'] = '0';
267
+ }
268
+ if(isset($settings['popup_enable_share_buttons']) && $settings['popup_enable_share_buttons'] == '1'){
269
+ $settings['popup_enable_share_buttons'] = '0';
270
+ }
271
+ $settings = WDILibrary::arrayToObject($settings);
272
+ return $settings;
273
+ }
274
+ /**
275
+ * Create Preview Instagram post.
276
+ *
277
+ * @return string $guid
278
+ */
279
+ public function get_instagram_preview_post() {
280
+ global $wpdb;
281
+ $post_type = 'wdi_instagram';
282
+ $args = array(
283
+ 'post_type' => $post_type,
284
+ 'post_status' => 'private'
285
+ );
286
+ $row = get_posts($args);
287
+
288
+ if ( !empty($row[0]) ) {
289
+ return get_permalink($row[0]->ID);
290
+ }
291
+ else {
292
+ $post_params = array(
293
+ 'post_author' => 1,
294
+ 'post_status' => 'private',
295
+ 'post_content' => '[wdi_preview]',
296
+ 'post_title' => 'Preview',
297
+ 'post_type' => $post_type,
298
+ 'comment_status' => 'closed',
299
+ 'ping_status' => 'closed',
300
+ 'post_parent' => 0,
301
+ 'menu_order' => 0,
302
+ 'import_id' => 0,
303
+ );
304
+ // Create new post by wdi_preview preview type.
305
+ if ( wp_insert_post($post_params) ) {
306
+ flush_rewrite_rules();
307
+
308
+ return get_the_guid($wpdb->insert_id);
309
+ }
310
+ else {
311
+ return "";
312
+ }
313
+ }
314
+ }
315
+ }
admin/models/WDIModelLicensing_wdi.php CHANGED
@@ -1,30 +1,30 @@
1
- <?php
2
-
3
- class WDIModelLicensing_wdi {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- ////////////////////////////////////////////////////////////////////////////////////////
22
- // Getters & Setters //
23
- ////////////////////////////////////////////////////////////////////////////////////////
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- // Private Methods //
26
- ////////////////////////////////////////////////////////////////////////////////////////
27
- ////////////////////////////////////////////////////////////////////////////////////////
28
- // Listeners //
29
- ////////////////////////////////////////////////////////////////////////////////////////
30
  }
1
+ <?php
2
+
3
+ class WDIModelLicensing_wdi {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ ////////////////////////////////////////////////////////////////////////////////////////
22
+ // Getters & Setters //
23
+ ////////////////////////////////////////////////////////////////////////////////////////
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+ // Private Methods //
26
+ ////////////////////////////////////////////////////////////////////////////////////////
27
+ ////////////////////////////////////////////////////////////////////////////////////////
28
+ // Listeners //
29
+ ////////////////////////////////////////////////////////////////////////////////////////
30
  }
admin/models/WDIModelSettings_wdi.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
-
3
- class WDIModelSettings_wdi{
4
-
5
- public $active_tab = 'configure';
6
-
7
- public function __construct(){
8
- $this->activeTab = WDILibrary::get('form_action', 'configure');
9
- }
10
  }
1
+ <?php
2
+
3
+ class WDIModelSettings_wdi {
4
+
5
+ public $active_tab = 'configure';
6
+
7
+ public function __construct() {
8
+ $this->activeTab = WDILibrary::get('form_action', 'configure');
9
+ }
10
  }
admin/models/WDIModelThemes_wdi.php CHANGED
@@ -1,600 +1,578 @@
1
- <?php
2
-
3
- class WDIModelThemes_wdi {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
-
22
- public function get_rows_data() {
23
- global $wpdb;
24
- $search_value = WDILibrary::get('search_value', '');
25
- $where = ( !empty($search_value) ) ? 'WHERE theme_name LIKE "%' . esc_html(stripslashes($search_value)) . '%"' : '';
26
-
27
- $order = WDILibrary::get('asc_or_desc', 'asc');
28
- $order_by_arr = array('id', 'theme_name', 'default_theme');
29
- $order_by = WDILibrary::get('order_by', 'id');
30
- $order_by = ( in_array($order_by, $order_by_arr) ) ? $order_by : 'id';
31
- $order_by = ' ORDER BY `' . $order_by . '` ' . $order;
32
- $page_number = (int) WDILibrary::get('page_number');
33
- if (isset($page_number) && $page_number) {
34
- $limit = ( $page_number - 1 ) * 20;
35
- }
36
- else {
37
- $limit = 0;
38
- }
39
- $query = "SELECT * FROM " . $wpdb->prefix . WDI_THEME_TABLE .' '. $where . $order_by . " LIMIT " . $limit . ",20";
40
-
41
- $rows = $wpdb->get_results($query);
42
- return $rows;
43
- }
44
-
45
- public function page_nav() {
46
- global $wpdb;
47
- $search_value = WDILibrary::get('search_value', '');
48
- $where = ( !empty($search_value) ) ? 'WHERE theme_name LIKE "%' . esc_html(stripslashes($search_value)) . '%"' : '';
49
- $total = $wpdb->get_var("SELECT COUNT(*) FROM " . $wpdb->prefix . WDI_THEME_TABLE. ' ' . $where);
50
- $page_nav['total'] = $total;
51
- $page_number = (int) WDILibrary::get('page_number');
52
- if ( isset($page_number) && $page_number ) {
53
- $limit = ( $page_number - 1 ) * 20;
54
- }
55
- else {
56
- $limit = 0;
57
- }
58
- $page_nav['limit'] = (int) ($limit / 20 + 1);
59
- return $page_nav;
60
- }
61
-
62
- public static function get_theme_defaults(){
63
- global $wdi_options;
64
- $settings = array(
65
- 'theme_name' => 'Instagram Design',
66
- 'default_theme'=> '0',
67
- 'feed_container_bg_color' => '#FFFFFF',
68
- 'feed_wrapper_width' => '100%',
69
- 'feed_container_width' => '100%',
70
- 'feed_wrapper_bg_color' => '#FFFFFF',
71
- 'active_filter_bg_color' => '#429fff',
72
- 'header_margin' => '0px',
73
- 'header_padding' => '5px',
74
- 'header_border_size' => '0px',
75
- 'header_border_color' => '#DDDDDD',
76
- 'header_position' => 'left',
77
- 'header_img_width' => '40',
78
- 'header_border_radius' => 0,
79
- 'header_text_padding' => '5px',
80
- 'header_text_color' => '#0f4973',
81
- 'header_font_weight' => '400',
82
- 'header_text_font_size' => '18px',
83
- 'header_text_font_style' => 'normal',
84
- 'follow_btn_border_radius'=>'3',
85
- 'follow_btn_padding'=>'25',
86
- 'follow_btn_margin'=>'10',
87
- 'follow_btn_bg_color'=>'#ffffff',
88
- 'follow_btn_border_color'=>'#0f4973',
89
- 'follow_btn_text_color'=>'#0f4973',
90
- 'follow_btn_font_size'=>'18',
91
- 'follow_btn_border_hover_color'=>'#0f4973',
92
- 'follow_btn_text_hover_color'=>'#0f4973',
93
- 'follow_btn_background_hover_color'=>'#ffffff',
94
-
95
-
96
- 'user_padding' => '5px',
97
- /////////////////////////disabled////////////////////////
98
- 'user_horizontal_margin' => '',//*
99
- 'user_border_size' => '0px',//*
100
- 'user_border_color' => '',//*
101
- 'user_img_width' => '40px',//enabled
102
-
103
- 'user_border_radius' => '0',//enabled
104
- 'user_background_color' => '',//*
105
- 'users_border_size' => '0px',//*
106
- 'users_border_color' => '',//*
107
- 'users_background_color' => '',//*
108
- //////////////////////////////////////////////////////////
109
- //////////////////////lightbox////////////////////////////
110
- 'users_text_color' => '#0f4973',
111
- 'users_font_weight' => '400',
112
- 'users_text_font_size' => '18px',
113
- 'users_text_font_style' => 'normal',
114
- 'user_description_font_size' => '18px',
115
- 'lightbox_overlay_bg_color'=>'#25292c',
116
- 'lightbox_overlay_bg_transparent'=>'90',
117
- 'lightbox_bg_color'=>'#ffffff',
118
- 'lightbox_ctrl_btn_height'=>'20',
119
- 'lightbox_ctrl_btn_margin_top'=>'10',
120
- 'lightbox_ctrl_btn_margin_left'=>'7',
121
- 'lightbox_ctrl_btn_pos'=>'bottom',
122
- 'lightbox_ctrl_cont_bg_color'=>'#2a5b83',
123
- 'lightbox_ctrl_cont_border_radius'=>'4',
124
- 'lightbox_ctrl_cont_transparent'=>'80',
125
- 'lightbox_ctrl_btn_align'=>'center',
126
- 'lightbox_ctrl_btn_color'=>'#FFFFFF',
127
- 'lightbox_ctrl_btn_transparent'=>'100',
128
- 'lightbox_toggle_btn_height'=>'14',
129
- 'lightbox_toggle_btn_width'=>'100',
130
- 'lightbox_close_btn_border_radius'=>'16',
131
- 'lightbox_close_btn_border_width'=>'2',
132
- 'lightbox_close_btn_border_style'=>'none',
133
- 'lightbox_close_btn_border_color'=>'#FFFFFF',
134
- 'lightbox_close_btn_box_shadow'=>'none',
135
- 'lightbox_close_btn_bg_color'=>'#2a5b83',
136
- 'lightbox_close_btn_transparent'=>'100',
137
- 'lightbox_close_btn_width'=>'20',
138
- 'lightbox_close_btn_height'=>'20',
139
- 'lightbox_close_btn_top'=>'-10',
140
- 'lightbox_close_btn_right'=>'-10',
141
- 'lightbox_close_btn_size'=>'15',
142
- 'lightbox_close_btn_color'=>'#FFFFFF',
143
- 'lightbox_close_btn_full_color'=>'#000000',
144
- 'lightbox_close_btn_hover_color'=>'#000000',
145
- 'lightbox_comment_share_button_color'=>'#ffffff',
146
- 'lightbox_rl_btn_style'=>'tenweb-i-chevron',
147
- 'lightbox_rl_btn_bg_color'=>'#2a5b83',
148
- 'lightbox_rl_btn_transparent'=>'80',
149
- 'lightbox_rl_btn_box_shadow'=>'none',
150
- 'lightbox_rl_btn_height'=>'40',
151
- 'lightbox_rl_btn_width'=>'40',
152
- 'lightbox_rl_btn_size'=>'20',
153
- 'lightbox_close_rl_btn_hover_color'=>'#25292c',
154
- 'lightbox_rl_btn_color'=>'#FFFFFF',
155
- 'lightbox_rl_btn_border_radius'=>'20',
156
- 'lightbox_rl_btn_border_width'=>'0',
157
- 'lightbox_rl_btn_border_style'=>'none',
158
- 'lightbox_rl_btn_border_color'=>'#FFFFFF',
159
- 'lightbox_filmstrip_pos'=>'top',
160
- 'lightbox_filmstrip_thumb_margin'=>'0 1px',
161
- 'lightbox_filmstrip_thumb_border_width'=>'1',
162
- 'lightbox_filmstrip_thumb_border_style'=>'solid',
163
- 'lightbox_filmstrip_thumb_border_color'=>'#25292c',
164
- 'lightbox_filmstrip_thumb_border_radius'=>'0',
165
- 'lightbox_filmstrip_thumb_active_border_width'=>'0',
166
- 'lightbox_filmstrip_thumb_active_border_color'=>'#FFFFFF',
167
- 'lightbox_filmstrip_thumb_deactive_transparent'=>'70',
168
- 'lightbox_filmstrip_rl_btn_size'=>'20',
169
- 'lightbox_filmstrip_rl_btn_color'=>'#FFFFFF',
170
- 'lightbox_filmstrip_rl_bg_color'=>'#3B3B3B',
171
- 'lightbox_info_pos'=>'top',
172
- 'lightbox_info_align'=>'right',
173
- 'lightbox_info_bg_color'=>'#3b3b3b',
174
- 'lightbox_info_bg_transparent'=>'80',
175
- 'lightbox_info_border_width'=>'1',
176
- 'lightbox_info_border_style'=>'none',
177
- 'lightbox_info_border_color'=>'#3b3b3b',
178
- 'lightbox_info_border_radius'=>'5',
179
- 'lightbox_info_padding'=>'5px',
180
- 'lightbox_info_margin'=>'15px',
181
- 'lightbox_title_color'=>'#FFFFFF',
182
- 'lightbox_title_font_style'=>'segoe ui',
183
- 'lightbox_title_font_weight'=>'bold',
184
- 'lightbox_title_font_size'=>'13',
185
- 'lightbox_description_color'=>'#FFFFFF',
186
- 'lightbox_description_font_style'=>'segoe ui',
187
- 'lightbox_description_font_weight'=>'normal',
188
- 'lightbox_description_font_size'=>'14',
189
- 'lightbox_info_height'=>'30',
190
- 'lightbox_comment_width'=>'400',
191
- 'lightbox_comment_pos'=>'right',
192
- 'lightbox_comment_bg_color'=>'#ffffff',
193
- 'lightbox_comment_font_size'=>'12',
194
- 'lightbox_comment_font_color'=>'#000000',
195
- 'lightbox_comment_font_style'=>'segoe ui',
196
- 'lightbox_comment_author_font_size'=>'14',
197
- 'lightbox_comment_author_font_color'=>'#125688',
198
- 'lightbox_comment_author_font_color_hover'=>'#002160',
199
- 'lightbox_comment_date_font_size'=>'10',
200
- 'lightbox_comment_body_font_size'=>'12',
201
- 'lightbox_comment_input_border_width'=>'1',
202
- 'lightbox_comment_input_border_style'=>'none',
203
- 'lightbox_comment_input_border_color'=>'#666666',
204
- 'lightbox_comment_input_border_radius'=>'0',
205
- 'lightbox_comment_input_padding'=>'2px',
206
- 'lightbox_comment_input_bg_color'=>'#333333',
207
- 'lightbox_comment_button_bg_color'=>'#616161',
208
- 'lightbox_comment_button_padding'=>'3px 10px',
209
- 'lightbox_comment_button_border_width'=>'1',
210
- 'lightbox_comment_button_border_style'=>'none',
211
- 'lightbox_comment_button_border_color'=>'#666666',
212
- 'lightbox_comment_button_border_radius'=>'3',
213
- 'lightbox_comment_separator_width'=>'1',
214
- 'lightbox_comment_separator_style'=>'solid',
215
- 'lightbox_comment_separator_color'=>'#125688',
216
- 'lightbox_comment_load_more_color' =>"#125688",
217
- 'lightbox_comment_load_more_color_hover' =>"#000000",
218
- //////////////////////////////////////////////////////////
219
- 'th_photo_wrap_padding' => '10px',
220
- 'th_photo_wrap_border_size' => '10px',
221
- 'th_photo_wrap_border_color' => '#ffffff',
222
- 'th_photo_img_border_radius' => '0px',
223
- 'th_photo_wrap_bg_color' => '#FFFFFF',
224
- 'th_photo_meta_bg_color' => '#FFFFFF',
225
- 'th_photo_meta_one_line' => '1',
226
- 'th_like_text_color' => '#8a8d8e',
227
- 'th_comment_text_color' => '#8a8d8e',
228
- 'th_photo_caption_font_size' => '14px',
229
- 'th_photo_caption_color' => '#125688',
230
- 'th_feed_item_margin' => '0',
231
- 'th_photo_caption_hover_color' =>'#8e8e8e',
232
- 'th_like_comm_font_size' => '13px',
233
- 'th_overlay_hover_color'=>'#125688',
234
- 'th_overlay_hover_transparent'=>'50',
235
- 'th_overlay_hover_icon_color'=>'#FFFFFF',
236
- 'th_overlay_hover_icon_font_size'=>'25px',
237
-
238
- 'th_photo_img_hover_effect' => 'none',
239
- //////////////////////////////////////////////////////////
240
- 'mas_photo_wrap_padding' => '10px',
241
- 'mas_photo_wrap_border_size' => '0px',
242
- 'mas_photo_wrap_border_color' => 'gray',
243
- 'mas_photo_img_border_radius' => '0px',
244
- 'mas_photo_wrap_bg_color' => '#FFFFFF',
245
- 'mas_photo_meta_bg_color' => '#FFFFFF',
246
- 'mas_photo_meta_one_line' => '1',
247
- 'mas_like_text_color' => '#8a8d8e',
248
- 'mas_comment_text_color' => '#8a8d8e',
249
- 'mas_photo_caption_font_size' => '14px',
250
- 'mas_photo_caption_color' => '#125688',
251
- 'mas_feed_item_margin' => '0',
252
- 'mas_photo_caption_hover_color' =>'#8e8e8e',
253
- 'mas_like_comm_font_size' => '13px',
254
- 'mas_overlay_hover_color'=>'#125688',
255
- 'mas_overlay_hover_transparent'=>'50',
256
- 'mas_overlay_hover_icon_color'=>'#FFFFFF',
257
- 'mas_overlay_hover_icon_font_size'=>'25px',
258
-
259
- 'mas_photo_img_hover_effect' => 'none',
260
- /////////////////////////////////////////////////////////
261
- //////////////////////////////////////////////////////////
262
- 'blog_style_photo_wrap_padding' => '10px',
263
- 'blog_style_photo_wrap_border_size' => '0px',
264
- 'blog_style_photo_wrap_border_color' => 'gray',
265
- 'blog_style_photo_img_border_radius' => '0px',
266
- 'blog_style_photo_wrap_bg_color' => '#FFFFFF',
267
- 'blog_style_photo_meta_bg_color' => '#FFFFFF',
268
- 'blog_style_photo_meta_one_line' => '1',
269
- 'blog_style_like_text_color' => '#8a8d8e',
270
- 'blog_style_comment_text_color' => '#8a8d8e',
271
- 'blog_style_photo_caption_font_size' => '16px',
272
- 'blog_style_photo_caption_color' => '#125688',
273
- 'blog_style_feed_item_margin' => '0',
274
- 'blog_style_photo_caption_hover_color' =>'#8e8e8e',
275
- 'blog_style_like_comm_font_size' => '20px',
276
-
277
-
278
- ////////////////////////////////////////////////////////
279
- /////////////////////////////////////////////////////////
280
- 'image_browser_photo_wrap_padding' => '10px',
281
- 'image_browser_photo_wrap_border_size' => '0px',
282
- 'image_browser_photo_wrap_border_color' => 'gray',
283
- 'image_browser_photo_img_border_radius' => '0px',
284
- 'image_browser_photo_wrap_bg_color' => '#FFFFFF',
285
- 'image_browser_photo_meta_bg_color' => '#FFFFFF',
286
- 'image_browser_photo_meta_one_line' => '1',
287
- 'image_browser_like_text_color' => '#8a8d8e',
288
- 'image_browser_comment_text_color' => '#8a8d8e',
289
- 'image_browser_photo_caption_font_size' => '16px',
290
- 'image_browser_photo_caption_color' => '#125688',
291
- 'image_browser_feed_item_margin' => '0',
292
- 'image_browser_photo_caption_hover_color' =>'#8e8e8e',
293
- 'image_browser_like_comm_font_size' => '20px',
294
-
295
- 'load_more_position' => 'center',
296
- 'load_more_padding' => '4px',
297
- 'load_more_bg_color' => '#ffffff',
298
- 'load_more_border_radius' => '500px',
299
- 'load_more_height' => '90px',
300
- 'load_more_width' => '90px',
301
- 'load_more_border_size' => '1px',
302
- 'load_more_border_color' => '#0f4973',
303
- 'load_more_text_color' => '#1e73be',
304
- /*load more icon*/
305
- 'load_more_text_font_size' => '14px',
306
- 'load_more_wrap_hover_color' => 'transparent',
307
- 'pagination_ctrl_color' => '#0f4973',
308
- 'pagination_size' => '40px',
309
- 'pagination_ctrl_margin' => '15px',
310
- 'pagination_ctrl_hover_color' => '#25292c',
311
- 'pagination_position' => 'center',
312
- 'pagination_position_vert' => 'top',
313
-
314
- /* since v1.0.6*/
315
- /* keep order */
316
- 'th_thumb_user_bg_color'=>'#429FFF',
317
- 'th_thumb_user_color'=>'#FFFFFF',
318
- 'mas_thumb_user_bg_color'=>'#429FFF',
319
- 'mas_thumb_user_color'=>'#FFFFFF',
320
- );
321
- return $settings;
322
- }
323
-
324
- public function get_sanitize_types(){
325
- $sanitize_types = array(
326
- 'theme_name' => 'string',
327
- 'default_theme'=> 'number',
328
- 'feed_container_bg_color' => 'color',//*
329
- 'feed_wrapper_width' => 'length',//
330
- 'feed_container_width' => 'length',
331
- 'feed_wrapper_bg_color' => 'color',//*
332
- 'active_filter_bg_color' => 'color',
333
- 'header_margin' => 'length_multi',//*
334
- 'header_padding' => 'length_multi',//*
335
- 'header_border_size' => 'length',//*
336
- 'header_border_color' => 'color',//*
337
- 'header_position' => 'position',//*
338
- 'header_img_width' => 'number',//*
339
- 'header_border_radius' => 'number',////////////////////////////*
340
- 'header_text_padding' => 'length',//*
341
- 'header_text_color' => 'color',//*
342
- 'header_font_weight' => 'number',//*
343
- 'header_text_font_size' => 'length',///////////*
344
- 'header_text_font_style' => 'string',///////////////////
345
- 'follow_btn_border_radius'=>'number',
346
- 'follow_btn_padding'=>'number',
347
- 'follow_btn_margin'=>'number',
348
- 'follow_btn_bg_color'=>'color',
349
- 'follow_btn_border_color'=>'color',
350
- 'follow_btn_text_color'=>'color',
351
- 'follow_btn_font_size'=>'number',
352
- 'follow_btn_border_hover_color'=>'color',
353
- 'follow_btn_text_hover_color'=>'color',
354
- 'follow_btn_background_hover_color'=>'color',
355
-
356
- 'user_padding' => 'length_multi',//*
357
-
358
- 'user_horizontal_margin' => 'length',//*
359
- 'user_border_size' => 'length',//*
360
- 'user_border_color' => 'color',//*
361
- 'user_img_width' => 'number',
362
- 'user_border_radius' => 'number',
363
- 'user_background_color' => 'color',//*
364
-
365
- 'users_border_size' => 'length',//*
366
- 'users_border_color' => 'color',//*
367
- 'users_background_color' => 'color',//*
368
- /////////////////////////LightBox////////////////////////
369
- 'users_text_color' => 'color',
370
- 'users_font_weight' => 'number',
371
- 'users_text_font_size' => 'length',
372
- 'users_text_font_style' => 'string',
373
- 'user_description_font_size' => 'length',
374
-
375
- 'lightbox_overlay_bg_color'=>'color',
376
- 'lightbox_overlay_bg_transparent'=>'number_max_100',
377
- 'lightbox_bg_color'=>'color',
378
- 'lightbox_ctrl_btn_height'=>'number',
379
- 'lightbox_ctrl_btn_margin_top'=>'number',
380
- 'lightbox_ctrl_btn_margin_left'=>'number',
381
- 'lightbox_ctrl_btn_pos'=>'string',
382
- 'lightbox_ctrl_cont_bg_color'=>'color',
383
- 'lightbox_ctrl_cont_border_radius'=>'number',
384
- 'lightbox_ctrl_cont_transparent'=>'number_max_100',
385
- 'lightbox_ctrl_btn_align'=>'position',
386
- 'lightbox_ctrl_btn_color'=>'color',
387
- 'lightbox_ctrl_btn_transparent'=>'number_max_100',
388
- 'lightbox_toggle_btn_height'=>'number',
389
- 'lightbox_toggle_btn_width'=>'number',
390
- 'lightbox_close_btn_border_radius'=>'number',
391
- 'lightbox_close_btn_border_width'=>'number',
392
- 'lightbox_close_btn_border_style'=>'string',
393
- 'lightbox_close_btn_border_color'=>'color',
394
- 'lightbox_close_btn_box_shadow'=>'css_box_shadow',
395
- 'lightbox_close_btn_bg_color'=>'color',
396
- 'lightbox_close_btn_transparent'=>'number_max_100',
397
- 'lightbox_close_btn_width'=>'number',
398
- 'lightbox_close_btn_height'=>'number',
399
- 'lightbox_close_btn_top'=>'number_neg',
400
- 'lightbox_close_btn_right'=>'number_neg',
401
- 'lightbox_close_btn_size'=>'number',
402
- 'lightbox_close_btn_color'=>'color',
403
- 'lightbox_close_btn_full_color'=>'color',
404
- 'lightbox_close_btn_hover_color'=>'color',
405
- 'lightbox_comment_share_button_color'=>'color',
406
- 'lightbox_rl_btn_style'=>'string',
407
- 'lightbox_rl_btn_bg_color'=>'color',
408
- 'lightbox_rl_btn_transparent'=>'number_max_100',
409
- 'lightbox_rl_btn_box_shadow'=>'css_box_shadow',
410
- 'lightbox_rl_btn_height'=>'number',
411
- 'lightbox_rl_btn_width'=>'number',
412
- 'lightbox_rl_btn_size'=>'number',
413
- 'lightbox_close_rl_btn_hover_color'=>'color',
414
- 'lightbox_rl_btn_color'=>'color',
415
- 'lightbox_rl_btn_border_radius'=>'number',
416
- 'lightbox_rl_btn_border_width'=>'number',
417
- 'lightbox_rl_btn_border_style'=>'string',
418
- 'lightbox_rl_btn_border_color'=>'color',
419
- 'lightbox_filmstrip_pos'=>'position',
420
- 'lightbox_filmstrip_thumb_margin'=>'length_multi',
421
- 'lightbox_filmstrip_thumb_border_width'=>'number',
422
- 'lightbox_filmstrip_thumb_border_style'=>'string',
423
- 'lightbox_filmstrip_thumb_border_color'=>'color',
424
- 'lightbox_filmstrip_thumb_border_radius'=>'number',
425
- 'lightbox_filmstrip_thumb_active_border_width'=>'number',
426
- 'lightbox_filmstrip_thumb_active_border_color'=>'color',
427
- 'lightbox_filmstrip_thumb_deactive_transparent'=>'number_max_100',
428
- 'lightbox_filmstrip_rl_btn_size'=>'number',
429
- 'lightbox_filmstrip_rl_btn_color'=>'color',
430
- 'lightbox_filmstrip_rl_bg_color'=>'color',
431
- 'lightbox_info_pos'=>'position',
432
- 'lightbox_info_align'=>'string',
433
- 'lightbox_info_bg_color'=>'color',
434
- 'lightbox_info_bg_transparent'=>'number_max_100',
435
- 'lightbox_info_border_width'=>'number',
436
- 'lightbox_info_border_style'=>'string',
437
- 'lightbox_info_border_color'=>'color',
438
- 'lightbox_info_border_radius'=>'number',
439
- 'lightbox_info_padding'=>'length_multi',
440
- 'lightbox_info_margin'=>'length_multi',
441
- 'lightbox_title_color'=>'color',
442
- 'lightbox_title_font_style'=>'string',
443
- 'lightbox_title_font_weight'=>'string',
444
- 'lightbox_title_font_size'=>'number',
445
- 'lightbox_description_color'=>'color',
446
- 'lightbox_description_font_style'=>'string',
447
- 'lightbox_description_font_weight'=>'string',
448
- 'lightbox_description_font_size'=>'number',
449
- 'lightbox_info_height'=>'number_max_100',
450
- 'lightbox_comment_width'=>'number',
451
- 'lightbox_comment_pos'=>'string',
452
- 'lightbox_comment_bg_color'=>'color',
453
- 'lightbox_comment_font_size'=>'number',
454
- 'lightbox_comment_font_color'=>'color',
455
- 'lightbox_comment_font_style'=>'string',
456
- 'lightbox_comment_author_font_size'=>'number',
457
- 'lightbox_comment_author_font_color'=>'color',
458
- 'lightbox_comment_author_font_color_hover'=>'color',
459
- 'lightbox_comment_date_font_size'=>'number',
460
- 'lightbox_comment_body_font_size'=>'number',
461
- 'lightbox_comment_input_border_width'=>'number',
462
- 'lightbox_comment_input_border_style'=>'string',
463
- 'lightbox_comment_input_border_color'=>'color',
464
- 'lightbox_comment_input_border_radius'=>'number',
465
- 'lightbox_comment_input_padding'=>'length_multi',
466
- 'lightbox_comment_input_bg_color'=>'color',
467
- 'lightbox_comment_button_bg_color'=>'color',
468
- 'lightbox_comment_button_padding'=>'length_multi',
469
- 'lightbox_comment_button_border_width'=>'number',
470
- 'lightbox_comment_button_border_style'=>'string',
471
- 'lightbox_comment_button_border_color'=>'color',
472
- 'lightbox_comment_button_border_radius'=>'number',
473
- 'lightbox_comment_separator_width'=>'number',
474
- 'lightbox_comment_separator_style'=>'string',
475
- 'lightbox_comment_separator_color'=>'color',
476
- 'lightbox_comment_load_more_color' =>'color',
477
- 'lightbox_comment_load_more_color_hover' =>'color',
478
- /////////////////////////////////////////////////////////
479
- 'th_photo_wrap_padding' => 'length',
480
- 'th_photo_wrap_border_size' => 'length',
481
- 'th_photo_wrap_border_color' => 'color',
482
- 'th_photo_img_border_radius' => 'length',
483
- 'th_photo_wrap_bg_color' => 'color',
484
- 'th_photo_meta_bg_color' => 'color',
485
- 'th_photo_meta_one_line' => 'bool',
486
- 'th_like_text_color' => 'color',
487
- 'th_comment_text_color' => 'color',
488
- 'th_photo_caption_font_size' => 'length',
489
- 'th_photo_caption_color' => 'color',
490
- 'th_feed_item_margin' => 'length',
491
- 'th_photo_caption_hover_color' =>'color',
492
- 'th_like_comm_font_size' => 'length',
493
- 'th_overlay_hover_color'=>'color',
494
- 'th_overlay_hover_transparent'=>'number',
495
- 'th_overlay_hover_icon_color'=>'color',
496
- 'th_overlay_hover_icon_font_size'=>'length',
497
- 'th_thumb_user_bg_color'=>'color',
498
- 'th_thumb_user_color'=>'color',
499
- 'th_photo_img_hover_effect' =>'string',
500
- /////////////////////////////////////////////////////////
501
- 'mas_photo_wrap_padding' => 'length',
502
- 'mas_photo_wrap_border_size' => 'length',
503
- 'mas_photo_wrap_border_color' => 'color',
504
- 'mas_photo_img_border_radius' => 'length',
505
- 'mas_photo_wrap_bg_color' => 'color',
506
- 'mas_photo_meta_bg_color' => 'color',
507
- 'mas_photo_meta_one_line' => 'bool',
508
- 'mas_like_text_color' => 'color',
509
- 'mas_comment_text_color' => 'color',
510
- 'mas_photo_caption_font_size' => 'length',
511
- 'mas_photo_caption_color' => 'color',
512
- 'mas_feed_item_margin' => 'length',
513
- 'mas_photo_caption_hover_color' =>'color',
514
- 'mas_like_comm_font_size' => 'length',
515
- 'mas_overlay_hover_color'=>'color',
516
- 'mas_overlay_hover_transparent'=>'number',
517
- 'mas_overlay_hover_icon_color'=>'color',
518
- 'mas_overlay_hover_icon_font_size'=>'length',
519
- 'mas_thumb_user_bg_color'=>'color',
520
- 'mas_thumb_user_color'=>'color',
521
- 'mas_photo_img_hover_effect' => 'string',
522
- /////////////////////////////////////////////////
523
-
524
- 'blog_style_photo_wrap_padding' => 'length',
525
- 'blog_style_photo_wrap_border_size' => 'length',
526
- 'blog_style_photo_wrap_border_color' => 'color',
527
- 'blog_style_photo_img_border_radius' => 'length',
528
- 'blog_style_photo_wrap_bg_color' => 'color',
529
- 'blog_style_photo_meta_bg_color' => 'color',
530
- 'blog_style_photo_meta_one_line' => 'bool',
531
- 'blog_style_like_text_color' => 'color',
532
- 'blog_style_comment_text_color' => 'color',
533
- 'blog_style_photo_caption_font_size' => 'length',
534
- 'blog_style_photo_caption_color' => 'color',
535
- 'blog_style_feed_item_margin' => 'length',
536
- 'blog_style_photo_caption_hover_color' =>'color',
537
- 'blog_style_like_comm_font_size' => 'length',
538
- //////////////////////////////////////////
539
-
540
- /////////////////////////////////////////////////
541
-
542
- 'image_browser_photo_wrap_padding' => 'length',
543
- 'image_browser_photo_wrap_border_size' => 'length',
544
- 'image_browser_photo_wrap_border_color' => 'color',
545
- 'image_browser_photo_img_border_radius' => 'length',
546
- 'image_browser_photo_wrap_bg_color' => 'color',
547
- 'image_browser_photo_meta_bg_color' => 'color',
548
- 'image_browser_photo_meta_one_line' => 'bool',
549
- 'image_browser_like_text_color' => 'color',
550
- 'image_browser_comment_text_color' => 'color',
551
- 'image_browser_photo_caption_font_size' => 'length',
552
- 'image_browser_photo_caption_color' => 'color',
553
- 'image_browser_feed_item_margin' => 'length',
554
- 'image_browser_photo_caption_hover_color' =>'color',
555
- 'image_browser_like_comm_font_size' => 'length',
556
- //////////////////////////////////////////
557
-
558
- 'load_more_position' => 'position',//*
559
- 'load_more_padding' => 'length',//*
560
- 'load_more_bg_color' => 'color',//*
561
- 'load_more_border_radius' => 'length',//*
562
- 'load_more_height' => 'length',//*
563
- 'load_more_width' => 'length',//*
564
- 'load_more_border_size' => 'length',//*
565
- 'load_more_border_color' => 'color',//*
566
- 'load_more_text_color' => 'color',//*
567
- /*load more icon*/
568
- 'load_more_text_font_size' => 'length',//*
569
- 'load_more_wrap_hover_color' => 'color',//*
570
- 'pagination_ctrl_color' => 'color',
571
- 'pagination_size' => 'length',
572
- 'pagination_ctrl_margin' => 'length_multi',
573
- 'pagination_ctrl_hover_color' => 'color',
574
- 'pagination_position' => 'position',
575
- 'pagination_position_vert'=>'position'
576
- );
577
- return $sanitize_types;
578
- }
579
-
580
- public static function get_theme_row($current_id){
581
- global $wpdb;
582
- $theme_row = $wpdb->get_row($wpdb->prepare("SELECT * FROM ". $wpdb->prefix.WDI_THEME_TABLE. " WHERE id ='%d' ",$current_id));
583
- return $theme_row;
584
- }
585
- public static function get_themes(){
586
- global $wpdb;
587
- $themes = WDILibrary::objectToArray($wpdb->get_results("SELECT `id`, `theme_name` FROM " . $wpdb->prefix.WDI_THEME_TABLE));
588
- foreach ($themes as $theme) {
589
- $output[$theme['id']] = $theme['theme_name'];
590
- }
591
- return $output;
592
- }
593
- public function check_default($current_id){
594
- global $wpdb;
595
- $query = $wpdb->prepare("SELECT `default_theme`FROM " . $wpdb->prefix.WDI_THEME_TABLE . " WHERE id='%d'",$current_id);
596
- $row = WDILibrary::objectToArray($wpdb->get_row($query));
597
- return ($row['default_theme']);
598
- }
599
- }
600
  ?>
1
+ <?php
2
+
3
+ class WDIModelThemes_wdi {
4
+
5
+ private $page_number = null;
6
+ private $search_text = "";
7
+ public function __construct() {
8
+ }
9
+
10
+ public function get_rows_data() {
11
+ global $wpdb;
12
+ $search_value = WDILibrary::get('search_value', '');
13
+ $where = ( !empty($search_value) ) ? 'WHERE theme_name LIKE "%' . esc_html(stripslashes($search_value)) . '%"' : '';
14
+
15
+ $order = WDILibrary::get('asc_or_desc', 'asc');
16
+ $order_by_arr = array('id', 'theme_name', 'default_theme');
17
+ $order_by = WDILibrary::get('order_by', 'id');
18
+ $order_by = ( in_array($order_by, $order_by_arr) ) ? $order_by : 'id';
19
+ $order_by = ' ORDER BY `' . $order_by . '` ' . $order;
20
+ $page_number = (int) WDILibrary::get('page_number');
21
+ if (isset($page_number) && $page_number) {
22
+ $limit = ( $page_number - 1 ) * 20;
23
+ }
24
+ else {
25
+ $limit = 0;
26
+ }
27
+ $query = "SELECT * FROM " . $wpdb->prefix . WDI_THEME_TABLE .' '. $where . $order_by . " LIMIT " . $limit . ",20";
28
+
29
+ $rows = $wpdb->get_results($query);
30
+ return $rows;
31
+ }
32
+
33
+ public function page_nav() {
34
+ global $wpdb;
35
+ $search_value = WDILibrary::get('search_value', '');
36
+ $where = ( !empty($search_value) ) ? 'WHERE theme_name LIKE "%' . esc_html(stripslashes($search_value)) . '%"' : '';
37
+ $total = $wpdb->get_var("SELECT COUNT(*) FROM " . $wpdb->prefix . WDI_THEME_TABLE. ' ' . $where);
38
+ $page_nav['total'] = $total;
39
+ $page_number = (int) WDILibrary::get('page_number');
40
+ if ( isset($page_number) && $page_number ) {
41
+ $limit = ( $page_number - 1 ) * 20;
42
+ }
43
+ else {
44
+ $limit = 0;
45
+ }
46
+ $page_nav['limit'] = (int) ($limit / 20 + 1);
47
+ return $page_nav;
48
+ }
49
+
50
+ public static function get_theme_defaults(){
51
+ global $wdi_options;
52
+ $settings = array(
53
+ 'theme_name' => 'Instagram Design',
54
+ 'default_theme'=> '0',
55
+ 'feed_container_bg_color' => '#FFFFFF',
56
+ 'feed_wrapper_width' => '100%',
57
+ 'feed_container_width' => '100%',
58
+ 'feed_wrapper_bg_color' => '#FFFFFF',
59
+ 'active_filter_bg_color' => '#429fff',
60
+ 'header_margin' => '0px',
61
+ 'header_padding' => '5px',
62
+ 'header_border_size' => '0px',
63
+ 'header_border_color' => '#DDDDDD',
64
+ 'header_position' => 'left',
65
+ 'header_img_width' => '40',
66
+ 'header_border_radius' => 0,
67
+ 'header_text_padding' => '5px',
68
+ 'header_text_color' => '#0f4973',
69
+ 'header_font_weight' => '400',
70
+ 'header_text_font_size' => '18px',
71
+ 'header_text_font_style' => 'normal',
72
+ 'follow_btn_border_radius'=>'3',
73
+ 'follow_btn_padding'=>'25',
74
+ 'follow_btn_margin'=>'10',
75
+ 'follow_btn_bg_color'=>'#ffffff',
76
+ 'follow_btn_border_color'=>'#0f4973',
77
+ 'follow_btn_text_color'=>'#0f4973',
78
+ 'follow_btn_font_size'=>'18',
79
+ 'follow_btn_border_hover_color'=>'#0f4973',
80
+ 'follow_btn_text_hover_color'=>'#0f4973',
81
+ 'follow_btn_background_hover_color'=>'#ffffff',
82
+
83
+ 'user_padding' => '5px',
84
+ /////////////////////////disabled////////////////////////
85
+ 'user_horizontal_margin' => '',//*
86
+ 'user_border_size' => '0px',//*
87
+ 'user_border_color' => '',//*
88
+ 'user_img_width' => '40px',//enabled
89
+ 'user_border_radius' => '0',//enabled
90
+ 'user_background_color' => '',//*
91
+ 'users_border_size' => '0px',//*
92
+ 'users_border_color' => '',//*
93
+ 'users_background_color' => '',//*
94
+ //////////////////////////////////////////////////////////
95
+ //////////////////////lightbox////////////////////////////
96
+ 'users_text_color' => '#0f4973',
97
+ 'users_font_weight' => '400',
98
+ 'users_text_font_size' => '18px',
99
+ 'users_text_font_style' => 'normal',
100
+ 'user_description_font_size' => '18px',
101
+
102
+ 'lightbox_overlay_bg_color'=>'#25292c',
103
+ 'lightbox_overlay_bg_transparent'=>'90',
104
+ 'lightbox_bg_color'=>'#ffffff',
105
+ 'lightbox_ctrl_btn_height'=>'20',
106
+ 'lightbox_ctrl_btn_margin_top'=>'10',
107
+ 'lightbox_ctrl_btn_margin_left'=>'7',
108
+ 'lightbox_ctrl_btn_pos'=>'bottom',
109
+ 'lightbox_ctrl_cont_bg_color'=>'#2a5b83',
110
+ 'lightbox_ctrl_cont_border_radius'=>'4',
111
+ 'lightbox_ctrl_cont_transparent'=>'80',
112
+ 'lightbox_ctrl_btn_align'=>'center',
113
+ 'lightbox_ctrl_btn_color'=>'#FFFFFF',
114
+ 'lightbox_ctrl_btn_transparent'=>'100',
115
+ 'lightbox_toggle_btn_height'=>'14',
116
+ 'lightbox_toggle_btn_width'=>'100',
117
+ 'lightbox_close_btn_border_radius'=>'16',
118
+ 'lightbox_close_btn_border_width'=>'2',
119
+ 'lightbox_close_btn_border_style'=>'none',
120
+ 'lightbox_close_btn_border_color'=>'#FFFFFF',
121
+ 'lightbox_close_btn_box_shadow'=>'none',
122
+ 'lightbox_close_btn_bg_color'=>'#2a5b83',
123
+ 'lightbox_close_btn_transparent'=>'100',
124
+ 'lightbox_close_btn_width'=>'20',
125
+ 'lightbox_close_btn_height'=>'20',
126
+ 'lightbox_close_btn_top'=>'-10',
127
+ 'lightbox_close_btn_right'=>'-10',
128
+ 'lightbox_close_btn_size'=>'15',
129
+ 'lightbox_close_btn_color'=>'#FFFFFF',
130
+ 'lightbox_close_btn_full_color'=>'#000000',
131
+ 'lightbox_close_btn_hover_color'=>'#000000',
132
+ 'lightbox_comment_share_button_color'=>'#ffffff',
133
+ 'lightbox_rl_btn_style'=>'tenweb-i-chevron',
134
+ 'lightbox_rl_btn_bg_color'=>'#2a5b83',
135
+ 'lightbox_rl_btn_transparent'=>'80',
136
+ 'lightbox_rl_btn_box_shadow'=>'none',
137
+ 'lightbox_rl_btn_height'=>'40',
138
+ 'lightbox_rl_btn_width'=>'40',
139
+ 'lightbox_rl_btn_size'=>'20',
140
+ 'lightbox_close_rl_btn_hover_color'=>'#25292c',
141
+ 'lightbox_rl_btn_color'=>'#FFFFFF',
142
+ 'lightbox_rl_btn_border_radius'=>'20',
143
+ 'lightbox_rl_btn_border_width'=>'0',
144
+ 'lightbox_rl_btn_border_style'=>'none',
145
+ 'lightbox_rl_btn_border_color'=>'#FFFFFF',
146
+ 'lightbox_filmstrip_pos'=>'top',
147
+ 'lightbox_filmstrip_thumb_margin'=>'0 1px',
148
+ 'lightbox_filmstrip_thumb_border_width'=>'1',
149
+ 'lightbox_filmstrip_thumb_border_style'=>'solid',
150
+ 'lightbox_filmstrip_thumb_border_color'=>'#25292c',
151
+ 'lightbox_filmstrip_thumb_border_radius'=>'0',
152
+ 'lightbox_filmstrip_thumb_active_border_width'=>'0',
153
+ 'lightbox_filmstrip_thumb_active_border_color'=>'#FFFFFF',
154
+ 'lightbox_filmstrip_thumb_deactive_transparent'=>'70',
155
+ 'lightbox_filmstrip_rl_btn_size'=>'20',
156
+ 'lightbox_filmstrip_rl_btn_color'=>'#FFFFFF',
157
+ 'lightbox_filmstrip_rl_bg_color'=>'#3B3B3B',
158
+ 'lightbox_info_pos'=>'top',
159
+ 'lightbox_info_align'=>'right',
160
+ 'lightbox_info_bg_color'=>'#3b3b3b',
161
+ 'lightbox_info_bg_transparent'=>'80',
162
+ 'lightbox_info_border_width'=>'1',
163
+ 'lightbox_info_border_style'=>'none',
164
+ 'lightbox_info_border_color'=>'#3b3b3b',
165
+ 'lightbox_info_border_radius'=>'5',
166
+ 'lightbox_info_padding'=>'5px',
167
+ 'lightbox_info_margin'=>'15px',
168
+ 'lightbox_title_color'=>'#FFFFFF',
169
+ 'lightbox_title_font_style'=>'segoe ui',
170
+ 'lightbox_title_font_weight'=>'bold',
171
+ 'lightbox_title_font_size'=>'13',
172
+ 'lightbox_description_color'=>'#FFFFFF',
173
+ 'lightbox_description_font_style'=>'segoe ui',
174
+ 'lightbox_description_font_weight'=>'normal',
175
+ 'lightbox_description_font_size'=>'14',
176
+ 'lightbox_info_height'=>'30',
177
+ 'lightbox_comment_width'=>'400',
178
+ 'lightbox_comment_pos'=>'right',
179
+ 'lightbox_comment_bg_color'=>'#ffffff',
180
+ 'lightbox_comment_font_size'=>'12',
181
+ 'lightbox_comment_font_color'=>'#000000',
182
+ 'lightbox_comment_font_style'=>'segoe ui',
183
+ 'lightbox_comment_author_font_size'=>'14',
184
+ 'lightbox_comment_author_font_color'=>'#125688',
185
+ 'lightbox_comment_author_font_color_hover'=>'#002160',
186
+ 'lightbox_comment_date_font_size'=>'10',
187
+ 'lightbox_comment_body_font_size'=>'12',
188
+ 'lightbox_comment_input_border_width'=>'1',
189
+ 'lightbox_comment_input_border_style'=>'none',
190
+ 'lightbox_comment_input_border_color'=>'#666666',
191
+ 'lightbox_comment_input_border_radius'=>'0',
192
+ 'lightbox_comment_input_padding'=>'2px',
193
+ 'lightbox_comment_input_bg_color'=>'#333333',
194
+ 'lightbox_comment_button_bg_color'=>'#616161',
195
+ 'lightbox_comment_button_padding'=>'3px 10px',
196
+ 'lightbox_comment_button_border_width'=>'1',
197
+ 'lightbox_comment_button_border_style'=>'none',
198
+ 'lightbox_comment_button_border_color'=>'#666666',
199
+ 'lightbox_comment_button_border_radius'=>'3',
200
+ 'lightbox_comment_separator_width'=>'1',
201
+ 'lightbox_comment_separator_style'=>'solid',
202
+ 'lightbox_comment_separator_color'=>'#125688',
203
+ 'lightbox_comment_load_more_color' =>"#125688",
204
+ 'lightbox_comment_load_more_color_hover' =>"#000000",
205
+ //////////////////////////////////////////////////////////
206
+ 'th_photo_wrap_padding' => '10px',
207
+ 'th_photo_wrap_border_size' => '10px',
208
+ 'th_photo_wrap_border_color' => '#ffffff',
209
+ 'th_photo_img_border_radius' => '0px',
210
+ 'th_photo_wrap_bg_color' => '#FFFFFF',
211
+ 'th_photo_meta_bg_color' => '#FFFFFF',
212
+ 'th_photo_meta_one_line' => '1',
213
+ 'th_like_text_color' => '#8a8d8e',
214
+ 'th_comment_text_color' => '#8a8d8e',
215
+ 'th_photo_caption_font_size' => '14px',
216
+ 'th_photo_caption_color' => '#125688',
217
+ 'th_feed_item_margin' => '0',
218
+ 'th_photo_caption_hover_color' =>'#8e8e8e',
219
+ 'th_like_comm_font_size' => '13px',
220
+ 'th_overlay_hover_color'=>'#125688',
221
+ 'th_overlay_hover_transparent'=>'50',
222
+ 'th_overlay_hover_icon_color'=>'#FFFFFF',
223
+ 'th_overlay_hover_icon_font_size'=>'25px',
224
+ 'th_photo_img_hover_effect' => 'none',
225
+ //////////////////////////////////////////////////////////
226
+ 'mas_photo_wrap_padding' => '10px',
227
+ 'mas_photo_wrap_border_size' => '0px',
228
+ 'mas_photo_wrap_border_color' => 'gray',
229
+ 'mas_photo_img_border_radius' => '0px',
230
+ 'mas_photo_wrap_bg_color' => '#FFFFFF',
231
+ 'mas_photo_meta_bg_color' => '#FFFFFF',
232
+ 'mas_photo_meta_one_line' => '1',
233
+ 'mas_like_text_color' => '#8a8d8e',
234
+ 'mas_comment_text_color' => '#8a8d8e',
235
+ 'mas_photo_caption_font_size' => '14px',
236
+ 'mas_photo_caption_color' => '#125688',
237
+ 'mas_feed_item_margin' => '0',
238
+ 'mas_photo_caption_hover_color' =>'#8e8e8e',
239
+ 'mas_like_comm_font_size' => '13px',
240
+ 'mas_overlay_hover_color'=>'#125688',
241
+ 'mas_overlay_hover_transparent'=>'50',
242
+ 'mas_overlay_hover_icon_color'=>'#FFFFFF',
243
+ 'mas_overlay_hover_icon_font_size'=>'25px',
244
+ 'mas_photo_img_hover_effect'=>'none',
245
+
246
+ 'blog_style_photo_wrap_padding' => '10px',
247
+ 'blog_style_photo_wrap_border_size' => '0px',
248
+ 'blog_style_photo_wrap_border_color' => 'gray',
249
+ 'blog_style_photo_img_border_radius' => '0px',
250
+ 'blog_style_photo_wrap_bg_color' => '#FFFFFF',
251
+ 'blog_style_photo_meta_bg_color' => '#FFFFFF',
252
+ 'blog_style_photo_meta_one_line' => '1',
253
+ 'blog_style_like_text_color' => '#8a8d8e',
254
+ 'blog_style_comment_text_color' => '#8a8d8e',
255
+ 'blog_style_photo_caption_font_size' => '16px',
256
+ 'blog_style_photo_caption_color' => '#125688',
257
+ 'blog_style_feed_item_margin' => '0',
258
+ 'blog_style_photo_caption_hover_color' =>'#8e8e8e',
259
+ 'blog_style_like_comm_font_size' => '20px',
260
+
261
+ 'image_browser_photo_wrap_padding' => '10px',
262
+ 'image_browser_photo_wrap_border_size' => '0px',
263
+ 'image_browser_photo_wrap_border_color' => 'gray',
264
+ 'image_browser_photo_img_border_radius' => '0px',
265
+ 'image_browser_photo_wrap_bg_color' => '#FFFFFF',
266
+ 'image_browser_photo_meta_bg_color' => '#FFFFFF',
267
+ 'image_browser_photo_meta_one_line' => '1',
268
+ 'image_browser_like_text_color' => '#8a8d8e',
269
+ 'image_browser_comment_text_color' => '#8a8d8e',
270
+ 'image_browser_photo_caption_font_size' => '16px',
271
+ 'image_browser_photo_caption_color' => '#125688',
272
+ 'image_browser_feed_item_margin' => '0',
273
+ 'image_browser_photo_caption_hover_color' =>'#8e8e8e',
274
+ 'image_browser_like_comm_font_size' => '20px',
275
+
276
+ 'load_more_position' => 'center',
277
+ 'load_more_padding' => '4px',
278
+ 'load_more_bg_color' => '#ffffff',
279
+ 'load_more_border_radius' => '500px',
280
+ 'load_more_height' => '90px',
281
+ 'load_more_width' => '90px',
282
+ 'load_more_border_size' => '1px',
283
+ 'load_more_border_color' => '#0f4973',
284
+ 'load_more_text_color' => '#1e73be',
285
+ /*load more icon*/
286
+ 'load_more_text_font_size' => '14px',
287
+ 'load_more_wrap_hover_color' => 'transparent',
288
+ 'pagination_ctrl_color' => '#0f4973',
289
+ 'pagination_size' => '40px',
290
+ 'pagination_ctrl_margin' => '15px',
291
+ 'pagination_ctrl_hover_color' => '#25292c',
292
+ 'pagination_position' => 'center',
293
+ 'pagination_position_vert' => 'top',
294
+
295
+ /* since v1.0.6*/
296
+ /* keep order */
297
+ 'th_thumb_user_bg_color'=>'#429FFF',
298
+ 'th_thumb_user_color'=>'#FFFFFF',
299
+ 'mas_thumb_user_bg_color'=>'#429FFF',
300
+ 'mas_thumb_user_color'=>'#FFFFFF',
301
+ );
302
+ return $settings;
303
+ }
304
+
305
+ public function get_sanitize_types(){
306
+ $sanitize_types = array(
307
+ 'theme_name' => 'string',
308
+ 'default_theme'=> 'number',
309
+ 'feed_container_bg_color' => 'color',//*
310
+ 'feed_wrapper_width' => 'length',//
311
+ 'feed_container_width' => 'length',
312
+ 'feed_wrapper_bg_color' => 'color',//*
313
+ 'active_filter_bg_color' => 'color',
314
+ 'header_margin' => 'length_multi',//*
315
+ 'header_padding' => 'length_multi',//*
316
+ 'header_border_size' => 'length',//*
317
+ 'header_border_color' => 'color',//*
318
+ 'header_position' => 'position',//*
319
+ 'header_img_width' => 'number',//*
320
+ 'header_border_radius' => 'number',////////////////////////////*
321
+ 'header_text_padding' => 'length',//*
322
+ 'header_text_color' => 'color',//*
323
+ 'header_font_weight' => 'number',//*
324
+ 'header_text_font_size' => 'length',///////////*
325
+ 'header_text_font_style' => 'string',///////////////////
326
+ 'follow_btn_border_radius'=>'number',
327
+ 'follow_btn_padding'=>'number',
328
+ 'follow_btn_margin'=>'number',
329
+ 'follow_btn_bg_color'=>'color',
330
+ 'follow_btn_border_color'=>'color',
331
+ 'follow_btn_text_color'=>'color',
332
+ 'follow_btn_font_size'=>'number',
333
+ 'follow_btn_border_hover_color'=>'color',
334
+ 'follow_btn_text_hover_color'=>'color',
335
+ 'follow_btn_background_hover_color'=>'color',
336
+
337
+ 'user_padding' => 'length_multi',//*
338
+ 'user_horizontal_margin' => 'length',//*
339
+ 'user_border_size' => 'length',//*
340
+ 'user_border_color' => 'color',//*
341
+ 'user_img_width' => 'number',
342
+ 'user_border_radius' => 'number',
343
+ 'user_background_color' => 'color',//*
344
+ 'users_border_size' => 'length',//*
345
+ 'users_border_color' => 'color',//*
346
+ 'users_background_color' => 'color',//*
347
+
348
+ /////////////////////////LightBox////////////////////////
349
+ 'users_text_color' => 'color',
350
+ 'users_font_weight' => 'number',
351
+ 'users_text_font_size' => 'length',
352
+ 'users_text_font_style' => 'string',
353
+ 'user_description_font_size' => 'length',
354
+ 'lightbox_overlay_bg_color'=>'color',
355
+ 'lightbox_overlay_bg_transparent'=>'number_max_100',
356
+ 'lightbox_bg_color'=>'color',
357
+ 'lightbox_ctrl_btn_height'=>'number',
358
+ 'lightbox_ctrl_btn_margin_top'=>'number',
359
+ 'lightbox_ctrl_btn_margin_left'=>'number',
360
+ 'lightbox_ctrl_btn_pos'=>'string',
361
+ 'lightbox_ctrl_cont_bg_color'=>'color',
362
+ 'lightbox_ctrl_cont_border_radius'=>'number',
363
+ 'lightbox_ctrl_cont_transparent'=>'number_max_100',
364
+ 'lightbox_ctrl_btn_align'=>'position',
365
+ 'lightbox_ctrl_btn_color'=>'color',
366
+ 'lightbox_ctrl_btn_transparent'=>'number_max_100',
367
+ 'lightbox_toggle_btn_height'=>'number',
368
+ 'lightbox_toggle_btn_width'=>'number',
369
+ 'lightbox_close_btn_border_radius'=>'number',
370
+ 'lightbox_close_btn_border_width'=>'number',
371
+ 'lightbox_close_btn_border_style'=>'string',
372
+ 'lightbox_close_btn_border_color'=>'color',
373
+ 'lightbox_close_btn_box_shadow'=>'css_box_shadow',
374
+ 'lightbox_close_btn_bg_color'=>'color',
375
+ 'lightbox_close_btn_transparent'=>'number_max_100',
376
+ 'lightbox_close_btn_width'=>'number',
377
+ 'lightbox_close_btn_height'=>'number',
378
+ 'lightbox_close_btn_top'=>'number_neg',
379
+ 'lightbox_close_btn_right'=>'number_neg',
380
+ 'lightbox_close_btn_size'=>'number',
381
+ 'lightbox_close_btn_color'=>'color',
382
+ 'lightbox_close_btn_full_color'=>'color',
383
+ 'lightbox_close_btn_hover_color'=>'color',
384
+ 'lightbox_comment_share_button_color'=>'color',
385
+ 'lightbox_rl_btn_style'=>'string',
386
+ 'lightbox_rl_btn_bg_color'=>'color',
387
+ 'lightbox_rl_btn_transparent'=>'number_max_100',
388
+ 'lightbox_rl_btn_box_shadow'=>'css_box_shadow',
389
+ 'lightbox_rl_btn_height'=>'number',
390
+ 'lightbox_rl_btn_width'=>'number',
391
+ 'lightbox_rl_btn_size'=>'number',
392
+ 'lightbox_close_rl_btn_hover_color'=>'color',
393
+ 'lightbox_rl_btn_color'=>'color',
394
+ 'lightbox_rl_btn_border_radius'=>'number',
395
+ 'lightbox_rl_btn_border_width'=>'number',
396
+ 'lightbox_rl_btn_border_style'=>'string',
397
+ 'lightbox_rl_btn_border_color'=>'color',
398
+ 'lightbox_filmstrip_pos'=>'position',
399
+ 'lightbox_filmstrip_thumb_margin'=>'length_multi',
400
+ 'lightbox_filmstrip_thumb_border_width'=>'number',
401
+ 'lightbox_filmstrip_thumb_border_style'=>'string',
402
+ 'lightbox_filmstrip_thumb_border_color'=>'color',
403
+ 'lightbox_filmstrip_thumb_border_radius'=>'number',
404
+ 'lightbox_filmstrip_thumb_active_border_width'=>'number',
405
+ 'lightbox_filmstrip_thumb_active_border_color'=>'color',
406
+ 'lightbox_filmstrip_thumb_deactive_transparent'=>'number_max_100',
407
+ 'lightbox_filmstrip_rl_btn_size'=>'number',
408
+ 'lightbox_filmstrip_rl_btn_color'=>'color',
409
+ 'lightbox_filmstrip_rl_bg_color'=>'color',
410
+ 'lightbox_info_pos'=>'position',
411
+ 'lightbox_info_align'=>'string',
412
+ 'lightbox_info_bg_color'=>'color',
413
+ 'lightbox_info_bg_transparent'=>'number_max_100',
414
+ 'lightbox_info_border_width'=>'number',
415
+ 'lightbox_info_border_style'=>'string',
416
+ 'lightbox_info_border_color'=>'color',
417
+ 'lightbox_info_border_radius'=>'number',
418
+ 'lightbox_info_padding'=>'length_multi',
419
+ 'lightbox_info_margin'=>'length_multi',
420
+ 'lightbox_title_color'=>'color',
421
+ 'lightbox_title_font_style'=>'string',
422
+ 'lightbox_title_font_weight'=>'string',
423
+ 'lightbox_title_font_size'=>'number',
424
+ 'lightbox_description_color'=>'color',
425
+ 'lightbox_description_font_style'=>'string',
426
+ 'lightbox_description_font_weight'=>'string',
427
+ 'lightbox_description_font_size'=>'number',
428
+ 'lightbox_info_height'=>'number_max_100',
429
+ 'lightbox_comment_width'=>'number',
430
+ 'lightbox_comment_pos'=>'string',
431
+ 'lightbox_comment_bg_color'=>'color',
432
+ 'lightbox_comment_font_size'=>'number',
433
+ 'lightbox_comment_font_color'=>'color',
434
+ 'lightbox_comment_font_style'=>'string',
435
+ 'lightbox_comment_author_font_size'=>'number',
436
+ 'lightbox_comment_author_font_color'=>'color',
437
+ 'lightbox_comment_author_font_color_hover'=>'color',
438
+ 'lightbox_comment_date_font_size'=>'number',
439
+ 'lightbox_comment_body_font_size'=>'number',
440
+ 'lightbox_comment_input_border_width'=>'number',
441
+ 'lightbox_comment_input_border_style'=>'string',
442
+ 'lightbox_comment_input_border_color'=>'color',
443
+ 'lightbox_comment_input_border_radius'=>'number',
444
+ 'lightbox_comment_input_padding'=>'length_multi',
445
+ 'lightbox_comment_input_bg_color'=>'color',
446
+ 'lightbox_comment_button_bg_color'=>'color',
447
+ 'lightbox_comment_button_padding'=>'length_multi',
448
+ 'lightbox_comment_button_border_width'=>'number',
449
+ 'lightbox_comment_button_border_style'=>'string',
450
+ 'lightbox_comment_button_border_color'=>'color',
451
+ 'lightbox_comment_button_border_radius'=>'number',
452
+ 'lightbox_comment_separator_width'=>'number',
453
+ 'lightbox_comment_separator_style'=>'string',
454
+ 'lightbox_comment_separator_color'=>'color',
455
+ 'lightbox_comment_load_more_color' =>'color',
456
+ 'lightbox_comment_load_more_color_hover' =>'color',
457
+ /////////////////////////////////////////////////////////
458
+ 'th_photo_wrap_padding' => 'length',
459
+ 'th_photo_wrap_border_size' => 'length',
460
+ 'th_photo_wrap_border_color' => 'color',
461
+ 'th_photo_img_border_radius' => 'length',
462
+ 'th_photo_wrap_bg_color' => 'color',
463
+ 'th_photo_meta_bg_color' => 'color',
464
+ 'th_photo_meta_one_line' => 'bool',
465
+ 'th_like_text_color' => 'color',
466
+ 'th_comment_text_color' => 'color',
467
+ 'th_photo_caption_font_size' => 'length',
468
+ 'th_photo_caption_color' => 'color',
469
+ 'th_feed_item_margin' => 'length',
470
+ 'th_photo_caption_hover_color' =>'color',
471
+ 'th_like_comm_font_size' => 'length',
472
+ 'th_overlay_hover_color'=>'color',
473
+ 'th_overlay_hover_transparent'=>'number',
474
+ 'th_overlay_hover_icon_color'=>'color',
475
+ 'th_overlay_hover_icon_font_size'=>'length',
476
+ 'th_thumb_user_bg_color'=>'color',
477
+ 'th_thumb_user_color'=>'color',
478
+ 'th_photo_img_hover_effect' =>'string',
479
+
480
+ /////////////////////////////////////////////////////////
481
+ 'mas_photo_wrap_padding' => 'length',
482
+ 'mas_photo_wrap_border_size' => 'length',
483
+ 'mas_photo_wrap_border_color' => 'color',
484
+ 'mas_photo_img_border_radius' => 'length',
485
+ 'mas_photo_wrap_bg_color' => 'color',
486
+ 'mas_photo_meta_bg_color' => 'color',
487
+ 'mas_photo_meta_one_line' => 'bool',
488
+ 'mas_like_text_color' => 'color',
489
+ 'mas_comment_text_color' => 'color',
490
+ 'mas_photo_caption_font_size' => 'length',
491
+ 'mas_photo_caption_color' => 'color',
492
+ 'mas_feed_item_margin' => 'length',
493
+ 'mas_photo_caption_hover_color' =>'color',
494
+ 'mas_like_comm_font_size' => 'length',
495
+ 'mas_overlay_hover_color'=>'color',
496
+ 'mas_overlay_hover_transparent'=>'number',
497
+ 'mas_overlay_hover_icon_color'=>'color',
498
+ 'mas_overlay_hover_icon_font_size'=>'length',
499
+ 'mas_thumb_user_bg_color'=>'color',
500
+ 'mas_thumb_user_color'=>'color',
501
+ 'mas_photo_img_hover_effect' => 'string',
502
+
503
+ /////////////////////////////////////////////////
504
+ 'blog_style_photo_wrap_padding' => 'length',
505
+ 'blog_style_photo_wrap_border_size' => 'length',
506
+ 'blog_style_photo_wrap_border_color' => 'color',
507
+ 'blog_style_photo_img_border_radius' => 'length',
508
+ 'blog_style_photo_wrap_bg_color' => 'color',
509
+ 'blog_style_photo_meta_bg_color' => 'color',
510
+ 'blog_style_photo_meta_one_line' => 'bool',
511
+ 'blog_style_like_text_color' => 'color',
512
+ 'blog_style_comment_text_color' => 'color',
513
+ 'blog_style_photo_caption_font_size' => 'length',
514
+ 'blog_style_photo_caption_color' => 'color',
515
+ 'blog_style_feed_item_margin' => 'length',
516
+ 'blog_style_photo_caption_hover_color' =>'color',
517
+ 'blog_style_like_comm_font_size' => 'length',
518
+
519
+ /////////////////////////////////////////////////
520
+ 'image_browser_photo_wrap_padding' => 'length',
521
+ 'image_browser_photo_wrap_border_size' => 'length',
522
+ 'image_browser_photo_wrap_border_color' => 'color',
523
+ 'image_browser_photo_img_border_radius' => 'length',
524
+ 'image_browser_photo_wrap_bg_color' => 'color',
525
+ 'image_browser_photo_meta_bg_color' => 'color',
526
+ 'image_browser_photo_meta_one_line' => 'bool',
527
+ 'image_browser_like_text_color' => 'color',
528
+ 'image_browser_comment_text_color' => 'color',
529
+ 'image_browser_photo_caption_font_size' => 'length',
530
+ 'image_browser_photo_caption_color' => 'color',
531
+ 'image_browser_feed_item_margin' => 'length',
532
+ 'image_browser_photo_caption_hover_color' =>'color',
533
+ 'image_browser_like_comm_font_size' => 'length',
534
+
535
+ //////////////////////////////////////////
536
+ 'load_more_position' => 'position',//*
537
+ 'load_more_padding' => 'length',//*
538
+ 'load_more_bg_color' => 'color',//*
539
+ 'load_more_border_radius' => 'length',//*
540
+ 'load_more_height' => 'length',//*
541
+ 'load_more_width' => 'length',//*
542
+ 'load_more_border_size' => 'length',//*
543
+ 'load_more_border_color' => 'color',//*
544
+ 'load_more_text_color' => 'color',//*
545
+ /*load more icon*/
546
+ 'load_more_text_font_size' => 'length',//*
547
+ 'load_more_wrap_hover_color' => 'color',//*
548
+ 'pagination_ctrl_color' => 'color',
549
+ 'pagination_size' => 'length',
550
+ 'pagination_ctrl_margin' => 'length_multi',
551
+ 'pagination_ctrl_hover_color' => 'color',
552
+ 'pagination_position' => 'position',
553
+ 'pagination_position_vert'=>'position'
554
+ );
555
+ return $sanitize_types;
556
+ }
557
+
558
+ public static function get_theme_row($current_id){
559
+ global $wpdb;
560
+ $theme_row = $wpdb->get_row($wpdb->prepare("SELECT * FROM ". $wpdb->prefix.WDI_THEME_TABLE. " WHERE id ='%d' ",$current_id));
561
+ return $theme_row;
562
+ }
563
+ public static function get_themes(){
564
+ global $wpdb;
565
+ $themes = WDILibrary::objectToArray($wpdb->get_results("SELECT `id`, `theme_name` FROM " . $wpdb->prefix.WDI_THEME_TABLE));
566
+ foreach ($themes as $theme) {
567
+ $output[$theme['id']] = $theme['theme_name'];
568
+ }
569
+ return $output;
570
+ }
571
+ public function check_default($current_id){
572
+ global $wpdb;
573
+ $query = $wpdb->prepare("SELECT `default_theme`FROM " . $wpdb->prefix.WDI_THEME_TABLE . " WHERE id='%d'",$current_id);
574
+ $row = WDILibrary::objectToArray($wpdb->get_row($query));
575
+ return ($row['default_theme']);
576
+ }
577
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
578
  ?>
admin/models/WDIModelUninstall_wdi.php CHANGED
@@ -1,13 +1,13 @@
1
- <?php
2
- class WDIModelUninstall_wdi{
3
- ////////////////////////////////////////////////////////////////////////////////////////
4
- // Variables //
5
- ////////////////////////////////////////////////////////////////////////////////////////
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- // Constructor and Destructor //
8
- ////////////////////////////////////////////////////////////////////////////////////////
9
- public function __construct(){
10
-
11
- }
12
-
13
  }
1
+ <?php
2
+ class WDIModelUninstall_wdi{
3
+ ////////////////////////////////////////////////////////////////////////////////////////
4
+ // Variables //
5
+ ////////////////////////////////////////////////////////////////////////////////////////
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ // Constructor and Destructor //
8
+ ////////////////////////////////////////////////////////////////////////////////////////
9
+ public function __construct(){
10
+
11
+ }
12
+
13
  }
admin/models/WDIModelWidget.php CHANGED
@@ -1,41 +1,14 @@
1
- <?php
2
-
3
- class WDIModelWidget {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
-
22
- public function get_feeds() {
23
- global $wpdb;
24
- $query = "SELECT id,feed_name,feed_type FROM " . $wpdb->prefix . WDI_FEED_TABLE." WHERE published=1";
25
- $rows = $wpdb->get_results($query);
26
- return $rows;
27
- }
28
-
29
-
30
-
31
-
32
- ////////////////////////////////////////////////////////////////////////////////////////
33
- // Getters & Setters //
34
- ////////////////////////////////////////////////////////////////////////////////////////
35
- ////////////////////////////////////////////////////////////////////////////////////////
36
- // Private Methods //
37
- ////////////////////////////////////////////////////////////////////////////////////////
38
- ////////////////////////////////////////////////////////////////////////////////////////
39
- // Listeners //
40
- ////////////////////////////////////////////////////////////////////////////////////////
41
  }
1
+ <?php
2
+
3
+ class WDIModelWidget {
4
+
5
+ public function __construct() {
6
+ }
7
+
8
+ public function get_feeds() {
9
+ global $wpdb;
10
+ $query = "SELECT id,feed_name,feed_type FROM " . $wpdb->prefix . WDI_FEED_TABLE." WHERE published=1";
11
+ $rows = $wpdb->get_results($query);
12
+ return $rows;
13
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  }
admin/views/WDIViewEditorShortcode.php CHANGED
@@ -1,155 +1,125 @@
1
- <?php
2
-
3
- class WDIViewEditorShortcode {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $model;
14
-
15
-
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
- // Constructor & Destructor //
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- public function __construct($model) {
20
- $this->model = $model;
21
- }
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Public Methods //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- public function display() {
26
- $rows = WDILibrary::objectToArray($this->model->get_row_data());
27
- wp_print_scripts('jquery');
28
- wp_print_scripts('wdi-shortcode');
29
- wp_print_styles('wp-admin');
30
- wp_print_styles('buttons');
31
-
32
- ?>
33
- <style type="text/css">
34
- .editor_popup_container{
35
- font-family:'Open Sans', sans-serif;
36
- }
37
- .styled-select select {
38
- background: transparent;
39
- width: 200px;
40
- padding: 5px;
41
- font-size: 14px;
42
- color:rgb(68, 68, 68);
43
- border-radius: 0;
44
- height: 34px;
45
- -webkit-appearance: none;
46
- }
47
- .wdi_editor_label{
48
- color:rgb(68, 68, 68);
49
- font-size:14px;
50
- font-weight:600;
51
- font-family:'Open Sans', sans-serif;
52
- }
53
- .wdi_feed_info{
54
- color:rgb(68, 68, 68);
55
- font-size:14px;
56
- font-weight:600;
57
- text-align: center;
58
- font-family:'Open Sans', sans-serif;
59
- width: 30%;
60
- margin-top: 10px;
61
- margin:0 auto;
62
- }
63
- .wdi_feed_thumb img{
64
- max-height: 40px;
65
- max-width: 40px;
66
- width: auto;
67
- height: auto;
68
- }
69
- .wdi_feed_select{
70
- float: left;
71
- padding: 8px;
72
- }
73
- .table-cell{
74
- display: table-cell;
75
- vertical-align: middle;
76
- }
77
- .table-row{
78
- display: table-row;
79
- }
80
- .wdi_feed_thumb,
81
- .wdi_feed_name{
82
- padding: 5px;
83
- }
84
- #wdi_editor_insert_btn{
85
- padding: 0 12px 2px;
86
- margin-right: 5px;
87
- }
88
- </style>
89
- <body class="wp-core-ui" data-width="400" data-height="140">
90
- <div id="wdi_editor_popup">
91
- <div class="editor_popup_container styled-select">
92
- <div class="wdi_feed_select table-row">
93
- <label for="wdi_feed_select" class="wdi_editor_label table-cell"><?php _e('Select Feed:', 'wd-instagram-feed'); ?></label>
94
- <span class="wdi_feed_thumb table-cell"></span>
95
- <span class="table-cell"><select name="wdi_feed_select" onchange="wdi_selectChange()" id="wdi_feed_select">
96
- <?php foreach ($rows as $row) {
97
- ?>
98
- <option value="<?php echo $row['id']?>"><?php echo $row["feed_name"]?></option>
99
- <?php
100
- }?>
101
- </select>
102
-
103
- <button id="wdi_editor_insert_btn" class="wdi_editor_insert wd-button button-primary">Insert</button>
104
-
105
- </span>
106
- </div>
107
- <!-- <div style="text-align:right">
108
- <button id="wdi_editor_insert_btn" class="wdi_editor_insert wd-button button-primary">Insert</button>
109
- </div>-->
110
- </div>
111
- </div>
112
- <script>
113
- <?php echo 'var wdi_feed_rows =' . json_encode($rows);?>;
114
- jQuery(document).ready(function(){
115
- wdi_selectChange(jQuery('#wdi_feed_select'));
116
- jQuery('#wdi_editor_insert_btn').on('click',wdi_insert_shortcode);
117
- });
118
- function wdi_selectChange(){
119
- var current = jQuery("#wdi_feed_select").val();
120
- for(var i = 0; i < wdi_feed_rows.length; i++){
121
- if(wdi_feed_rows[i]['id'] == current){
122
- var currentRow = wdi_feed_rows[i];
123
- break;
124
- }
125
- }
126
- var thumbHtml = '<img src="'+currentRow['feed_thumb']+'">';
127
- //var nameHtml = currentRow['feed_name'];
128
- var id_elem = jQuery('<input id="wdi_id" name="wdi_id" type="hidden"/>');
129
- id_elem.val(currentRow['id']);
130
- jQuery('.wdi_feed_thumb').html(thumbHtml);
131
- jQuery('.wdi_feed_thumb').append(id_elem);
132
- //jQuery('.wdi_feed_info .wdi_feed_name').html(nameHtml);
133
- }
134
- function wdi_insert_shortcode() {
135
- if (document.getElementById("wdi_id").value) {
136
- window.parent.send_to_editor('[wdi_feed id="' + document.getElementById('wdi_id').value + '"]');
137
- }
138
- window.parent.tb_remove();
139
- }
140
- </script>
141
- </body>
142
- <?php
143
- die();
144
- }
145
-
146
- ////////////////////////////////////////////////////////////////////////////////////////
147
- // Getters & Setters //
148
- ////////////////////////////////////////////////////////////////////////////////////////
149
- ////////////////////////////////////////////////////////////////////////////////////////
150
- // Private Methods //
151
- ////////////////////////////////////////////////////////////////////////////////////////
152
- ////////////////////////////////////////////////////////////////////////////////////////
153
- // Listeners //
154
- ////////////////////////////////////////////////////////////////////////////////////////
155
  }
1
+ <?php
2
+
3
+ class WDIViewEditorShortcode {
4
+
5
+ private $model;
6
+
7
+ public function __construct($model) {
8
+ $this->model = $model;
9
+ }
10
+
11
+ public function display() {
12
+ $rows = WDILibrary::objectToArray($this->model->get_row_data());
13
+ wp_print_scripts('jquery');
14
+ wp_print_scripts('wdi-shortcode');
15
+ wp_print_styles('wp-admin');
16
+ wp_print_styles('buttons');
17
+
18
+ ?>
19
+ <style type="text/css">
20
+ .editor_popup_container{
21
+ font-family:'Open Sans', sans-serif;
22
+ }
23
+ .styled-select select {
24
+ background: transparent;
25
+ width: 200px;
26
+ padding: 5px;
27
+ font-size: 14px;
28
+ color:rgb(68, 68, 68);
29
+ border-radius: 0;
30
+ height: 34px;
31
+ -webkit-appearance: none;
32
+ }
33
+ .wdi_editor_label{
34
+ color:rgb(68, 68, 68);
35
+ font-size:14px;
36
+ font-weight:600;
37
+ font-family:'Open Sans', sans-serif;
38
+ }
39
+ .wdi_feed_info{
40
+ color:rgb(68, 68, 68);
41
+ font-size:14px;
42
+ font-weight:600;
43
+ text-align: center;
44
+ font-family:'Open Sans', sans-serif;
45
+ width: 30%;
46
+ margin-top: 10px;
47
+ margin:0 auto;
48
+ }
49
+ .wdi_feed_thumb img{
50
+ max-height: 40px;
51
+ max-width: 40px;
52
+ width: auto;
53
+ height: auto;
54
+ }
55
+ .wdi_feed_select{
56
+ float: left;
57
+ padding: 8px;
58
+ }
59
+ .table-cell{
60
+ display: table-cell;
61
+ vertical-align: middle;
62
+ }
63
+ .table-row{
64
+ display: table-row;
65
+ }
66
+ .wdi_feed_thumb,
67
+ .wdi_feed_name{
68
+ padding: 5px;
69
+ }
70
+ #wdi_editor_insert_btn{
71
+ padding: 0 12px 2px;
72
+ margin-right: 5px;
73
+ }
74
+ </style>
75
+ <body class="wp-core-ui" data-width="400" data-height="140">
76
+ <div id="wdi_editor_popup">
77
+ <div class="editor_popup_container styled-select">
78
+ <div class="wdi_feed_select table-row">
79
+ <label for="wdi_feed_select" class="wdi_editor_label table-cell"><?php _e('Select Feed:', 'wd-instagram-feed'); ?></label>
80
+ <span class="wdi_feed_thumb table-cell"></span>
81
+ <span class="table-cell">
82
+ <select name="wdi_feed_select" onchange="wdi_selectChange()" id="wdi_feed_select">
83
+ <?php foreach ($rows as $row) { ?>
84
+ <option value="<?php echo $row['id'] ?>"><?php echo $row["feed_name"]?></option>
85
+ <?php } ?>
86
+ </select>
87
+ <button id="wdi_editor_insert_btn" class="wdi_editor_insert wd-button button-primary">Insert</button>
88
+ </span>
89
+ </div>
90
+ </div>
91
+ </div>
92
+ <script>
93
+ <?php echo 'var wdi_feed_rows =' . json_encode($rows);?>;
94
+ jQuery(document).ready(function(){
95
+ wdi_selectChange(jQuery('#wdi_feed_select'));
96
+ jQuery('#wdi_editor_insert_btn').on('click',wdi_insert_shortcode);
97
+ });
98
+ function wdi_selectChange(){
99
+ var current = jQuery("#wdi_feed_select").val();
100
+ for(var i = 0; i < wdi_feed_rows.length; i++){
101
+ if(wdi_feed_rows[i]['id'] == current){
102
+ var currentRow = wdi_feed_rows[i];
103
+ break;
104
+ }
105
+ }
106
+ var thumbHtml = '<img src="'+currentRow['feed_thumb']+'">';
107
+ //var nameHtml = currentRow['feed_name'];
108
+ var id_elem = jQuery('<input id="wdi_id" name="wdi_id" type="hidden"/>');
109
+ id_elem.val(currentRow['id']);
110
+ jQuery('.wdi_feed_thumb').html(thumbHtml);
111
+ jQuery('.wdi_feed_thumb').append(id_elem);
112
+ //jQuery('.wdi_feed_info .wdi_feed_name').html(nameHtml);
113
+ }
114
+ function wdi_insert_shortcode() {
115
+ if (document.getElementById("wdi_id").value) {
116
+ window.parent.send_to_editor('[wdi_feed id="' + document.getElementById('wdi_id').value + '"]');
117
+ }
118
+ window.parent.tb_remove();
119
+ }
120
+ </script>
121
+ </body>
122
+ <?php
123
+ die();
124
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  }
admin/views/WDIViewFeeds_wdi.php CHANGED
@@ -1,674 +1,666 @@
1
- <?php
2
-
3
- class WDIViewFeeds_wdi
4
- {
5
-
6
- private $model;
7
-
8
- public function __construct($model)
9
- {
10
- $this->model = $model;
11
- }
12
-
13
- public function display()
14
- {
15
- /*My Edit*/
16
- global $wdi_options;
17
- $rows_data = $this->model->get_rows_data();
18
- $page_nav = $this->model->page_nav();
19
- $search_value = WDILibrary::get('search_value', '');
20
- if( empty($search_value) ){
21
- $search_value = WDILibrary::get('search', '');
22
- }
23
-
24
- $asc_or_desc = WDILibrary::get('order', 'asc');
25
- $order_by = WDILibrary::get('order_by', 'id');
26
- if($order_by==="feed_name"){
27
- $wdi_sort = " sorted ";
28
- }else{
29
- $wdi_sort = " sortable ";
30
- }
31
- $order_class = 'manage-column column-title '.$wdi_sort . $asc_or_desc;
32
- $ids_string = '';
33
- $wdi_button_array = array(
34
- 'publish_all' => __('Publish', 'wdi'),
35
- 'unpublish_all' => __('Unpublish', 'wdi'),
36
- 'duplicate_all' => __('Duplicate', 'wdi'),
37
- 'delete_all' => __('Delete', 'wdi'),
38
- );
39
-
40
- WDILibrary::topbar();
41
- ?>
42
- <div class="wrap">
43
- <form class="" id="wdi_feed_form" method="post" action="admin.php?page=wdi_feeds" >
44
- <?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
45
- <input type="hidden" id="wdi_access_token" name="access_token"
46
- value="<?php echo isset($wdi_options['wdi_access_token']) ? $wdi_options['wdi_access_token'] : ''; ?>">
47
- <div class="wd-page-title wd-header">
48
- <h1 class="wp-heading-inline"><?php _e('Feeds', "wd-instagram-feed"); ?></h1>
49
- <?php
50
- $add_page_data = array(
51
- 'task' => 'add'
52
- );
53
- ?>
54
- <a href="<?php echo WDILibrary::get_page_link($add_page_data);?>" class="add-new-h2"><?php _e('Add new', "wd-instagram-feed"); ?></a>
55
- </div>
56
- <?php
57
- WDILibrary::search(__('Name', "wd-instagram-feed"), $search_value, 'wdi_feed_form');
58
- ?>
59
-
60
- <div class="tablenav top">
61
- <div class="alignleft actions bulkactions">
62
- <select class="bulk_action">
63
- <option value=""><?php _e('Bulk Actions', 'wd-instagram-feed'); ?></option>
64
- <?php
65
- foreach ($wdi_button_array as $key => $value) {
66
- ?>
67
- <option value="<?php echo $key; ?>"><?php echo $value; ?></option>
68
- <?php
69
- }
70
- ?>
71
- </select>
72
- <input class="button action" type="button" title="<?php _e('Apply', 'wds'); ?>" onclick="if (!wdi_bulk_actions('.bulk_action')) {return false}" value="<?php _e('Apply', 'wds'); ?>" />
73
- </div>
74
- <?php
75
- WDILibrary::html_page_nav($page_nav['total'], $page_nav['limit'], 'wdi_feed_form');
76
- ?>
77
- </div>
78
-
79
- <table class="wp-list-table widefat fixed pages media">
80
- <thead>
81
- <td class="manage-column column-cb check-column"><input id="check_all" type="checkbox" onclick="wdi_spider_check_all(this)"/></td>
82
-
83
- <th class="column-primary table_large_col <?php
84
- echo $order_class;
85
- ?>">
86
- <?php
87
- if($asc_or_desc==="asc"){
88
- $wdi_order = 'desc';
89
- }else{
90
- $wdi_order = 'asc';
91
- }
92
- ?>
93
- <a href="<?php echo WDILibrary::get_page_link(array('order_by'=>'feed_name', 'order'=>$wdi_order));?>">
94
- <span><?php _e('Title', "wd-instagram-feed"); ?></span><span class="sorting-indicator"></span>
95
- </a>
96
- </th>
97
- <th class="table_big_col"><?php _e('Shortcode', "wd-instagram-feed"); ?></th>
98
- <th class="table_large_col"><?php _e('PHP function', "wd-instagram-feed"); ?></th>
99
- </thead>
100
- <tbody id="tbody_arr">
101
- <?php
102
- if ($rows_data) {
103
- $instagram_preview_post = $this->model->get_instagram_preview_post();
104
-
105
- foreach ($rows_data as $row_data) {
106
- $alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
107
- $published_image = (($row_data->published) ? 'publish' : 'unpublish');
108
- $published = (($row_data->published) ? 'unpublish' : 'publish');
109
- $prev_img_url = $this->model->get_slider_prev_img($row_data->id);
110
- $edit_page_data = array(
111
- 'task' => 'edit',
112
- 'current_id' => $row_data->id,
113
- );
114
- $wdi_nonce_wd = wp_create_nonce('nonce_wd');
115
- ?>
116
- <tr id="tr_<?php echo $row_data->id; ?>" <?php echo $alternate; ?>>
117
- <th class="table_small_col check-column"><input id="check_<?php echo $row_data->id; ?>"
118
- name="check_<?php echo $row_data->id; ?>"
119
- onclick="wdi_spider_check_all(this)" type="checkbox"/>
120
- </th>
121
- <td class="column-primary column-title" data-colname="Name">
122
- <strong>
123
- <a href="<?php echo WDILibrary::get_page_link($edit_page_data);?>"
124
- title="Edit">
125
- <span class="media-icon image-icon">
126
- <img title="<?php echo $row_data->feed_name; ?>"
127
- style="border: 1px solid #CCCCCC; max-width: 70px; max-height: 50px;"
128
- src="<?php echo $prev_img_url; ?>">
129
- </span>
130
- <?php echo $row_data->feed_name; ?>
131
- </a>
132
- <?php
133
- if ( !$row_data->published ) {
134
- ?>
135
-
136
- <span class="post-state"><?php _e('Unpublished', "wd-instagram-feed"); ?></span>
137
- <?php
138
- }
139
-
140
- ?>
141
- </strong>
142
- <div class="row-actions">
143
- <span>
144
- <a href="<?php echo WDILibrary::get_page_link($edit_page_data);?>"
145
- title="Edit"><?php _e('Edit', "wd-instagram-feed"); ?>
146
- </a>
147
- |
148
- </span>
149
- <span>
150
- <a href="<?php echo WDILibrary::get_page_link(array('task'=>'duplicate','current_id'=>$row_data->id, 'nonce_wd'=>$wdi_nonce_wd));?>"><?php _e('Duplicate', "wd-instagram-feed"); ?></a>
151
- |
152
- </span>
153
- <span>
154
- <a href="<?php echo WDILibrary::get_page_link(array('task'=>$published,'current_id'=>$row_data->id, 'nonce_wd'=>$wdi_nonce_wd));?>" ><?php echo ( $row_data->published ? __('Unpublish', "wd-instagram-feed") : __('Publish', "wd-instagram-feed")); ?></a>
155
- |
156
- </span>
157
- <span class="trash">
158
- <a onclick="if (!confirm('<?php esc_attr_e('Do you want to delete selected items?', "wd-instagram-feed"); ?>')){return false;}" href="<?php echo WDILibrary::get_page_link(array('task'=>"delete",'current_id'=>$row_data->id, 'nonce_wd'=>$wdi_nonce_wd));?>">Delete</a>
159
- |
160
- </span>
161
- <span>
162
- <a href="<?php echo add_query_arg( array('feed_id' => $row_data->id), $instagram_preview_post); ?>" target="_blank"><?php _e('Preview', "wd-instagram-feed"); ?></a>
163
- </span>
164
- </div>
165
- <button class="toggle-row" type="button">
166
- <span class="screen-reader-text"><?php _e('Show more details', "wd-instagram-feed"); ?></span>
167
- </button>
168
- </td>
169
- <td class="table_big_col" data-colname="Shortcode" >
170
- <input type="text" value='[wdi_feed id="<?php echo $row_data->id; ?>"]'
171
- onclick="wdi_spider_select_value(this)" size="12" readonly="readonly"
172
- style="padding-left: 1px; padding-right: 1px; text-align: center;"/>
173
- </td>
174
- <td class="table_large_col" data-colname="PHP function" >
175
- <input type="text" value="&#60;?php echo wdi_feed(array('id'=>'<?php echo $row_data->id; ?>')); ?&#62;"
176
- onclick="wdi_spider_select_value(this)" size="30" readonly="readonly"
177
- style="padding-left: 1px; padding-right: 1px; text-align: center;"/>
178
- </td>
179
- </tr>
180
- <?php
181
- $ids_string .= $row_data->id . ',';
182
- }
183
- }
184
- ?>
185
- </tbody>
186
- </table>
187
- <input id="task" name="task" type="hidden" value=""/>
188
- <input id="current_id" name="current_id" type="hidden" value=""/>
189
- <input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>"/>
190
- <input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc"/>
191
- <input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>"/>
192
- </form>
193
- </div>
194
- <?php
195
- }
196
-
197
- public function edit($type)
198
- {
199
- if ($type === 0) {
200
- $this->generateForm();
201
- ?>
202
- <script>jQuery(document).ready(function ()
203
- {
204
- wdi_controller.switchFeedTabs('feed_settings');
205
- });</script>
206
- <?php
207
- }
208
- else {
209
- global $wdi_new_feed;
210
- $wdi_new_feed = true;
211
- $current_id = $type;
212
- $feed_row = $this->model->get_feed_row($current_id);
213
- $view_id = $feed_row->feed_type;
214
- $this->generateForm($current_id);
215
- $tab = WDILibrary::get('wdi_refresh_tab', 'feed_settings');
216
- ?>
217
- <script>jQuery(document).ready(function ()
218
- {
219
- wdi_controller.switchFeedTabs("<?php echo $tab;?>", "<?php echo $view_id;?>");
220
- });</script>
221
- <?php
222
-
223
- }
224
-
225
-
226
- }
227
-
228
-
229
- public function getFormElements($current_id = ''){
230
- require_once(WDI_DIR . '/admin/models/WDIModelThemes_wdi.php');
231
- $themes = WDIModelThemes_wdi::get_themes();
232
-
233
- $tabs = array(
234
- "feed_settings" => array(
235
- "media" => array(
236
- "title" => "Media",
237
- "type" => "full",
238
- "column" => "two",
239
- "visibility" =>"show",
240
- "section_name"=>"wdi_media",
241
- "elements" => array(
242
- array(
243
- //'feed_name' => array('name' => 'feed_name', 'title' => __('Feed Title', "wd-instagram-feed"), 'type' => 'input', 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
244
- 'liked_feed' => array('disabled_options' => array('liked'), 'disabled' => array('text' => __("Feed of liked media is available only in premium version", "wd-instagram-feed")), 'name' => 'liked_feed', 'title' => __('Feed Media', "wd-instagram-feed"), 'type' => 'select', 'valid_options' => array('userhash' => __('Username/Hashtag', "wd-instagram-feed"), 'liked' => __('Media I liked', "wd-instagram-feed")), 'break' => 'false', 'hide_ids' => array(), 'tooltip' => __('Display media of User/Hashtag or the media I liked', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
245
- 'feed_users' => array('name' => 'feed_users', 'title' => __('Feed Username and Hashtags', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'hidden', 'tooltip' => sprintf('%s <span class="wdi_settings_notification">%s</span>', __('Add username or hashtags to your feed. Hashtags must start with #, username shouldn\'t start with @.', "wd-instagram-feed"), __('Note, that the more hashtags you add, the slower feed loading will be on front-end.', "wd-instagram-feed")), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
246
- 'hashtag_top_recent' => array('name' => 'hashtag_top_recent', 'title' => __('Hashtag Top/Recent', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Recent', "wd-instagram-feed"), '0' => __('Top', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings')), 'hide_ids' => array('1' => 'popup_width,popup_height')),
247
- ),
248
- array(
249
- 'sort_images_by' => array('name' => 'sort_images_by', 'title' => __('Sort Media 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' => "", 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
250
- 'display_order' => array('name' => 'display_order', 'title' => __('Sorting Order', "wd-instagram-feed"), 'valid_options' => array('asc' => 'Ascending', 'desc' => 'Descending '), 'type' => 'select', 'tooltip' => "", 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
251
- 'feed_item_onclick' => array('name' => 'feed_item_onclick', 'title' => __('Action OnClick', "wd-instagram-feed"), 'type' => 'select', 'valid_options' => array('lightbox' => __('Open Lightbox', "wd-instagram-feed"), 'instagram' => __('Redirect To Instagram', "wd-instagram-feed"), 'custom_redirect' => __('Custom Redirect', "wd-instagram-feed"), 'none' => __('Do Nothing', "wd-instagram-feed")), 'break' => 'true', 'hide_ids' => array('lightbox' => 'redirect_url', 'instagram' => 'redirect_url', 'none' => 'redirect_url'), 'tooltip' => __('Do this action when user clicks on image/video in the feed', 'wd-instagram-feed'), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
252
- 'redirect_url' => array('name' => 'redirect_url', 'title' => __('Redirect URL', "wd-instagram-feed"), 'type' => 'input', 'tooltip' => __('Absolute Url to redirect to.', 'wd-instagram-feed'), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
253
- )
254
- )
255
- ),
256
- "layout" => array(
257
- "title" => "Layout and Pagination",
258
- "type" => "half",
259
- "column" => "one",
260
- "section_name"=>"wdi_layout",
261
- "elements" => array(
262
- array(
263
- 'feed_display_view' => array('name' => 'feed_display_view', 'title' => __('New Media Loading', "wd-instagram-feed"), 'type' => 'select', 'valid_options' => array('pagination' => __('Pagination', "wd-instagram-feed"), 'load_more_btn' => __('Load More Button', "wd-instagram-feed"), 'infinite_scroll' => __('Infinite Scroll', "wd-instagram-feed"), 'none' => __('None', "wd-instagram-feed")),'disabled_options' => array('infinite_scroll'),'disabled' => array('text' => __("Infinite Scroll option is available only in premium version", "wd-instagram-feed")), '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', 'none' => 'pagination_preload_number,pagination_per_page_number,load_more_number,resort_after_load_more'), 'tooltip' => __('How to load and display new images/videos', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
264
- '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' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry'))),
265
- 'number_of_photos' => array('name' => 'number_of_photos', 'title' => __('Number of Images/Videos', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('Number of images/videos to show when feed is loaded first time', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
266
- 'load_more_number' => array('name' => 'load_more_number', 'title' => __('Number of New Media', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('Number of new media added to the feed, when user clicks on load more button or triggers infinite scroll', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
267
- 'pagination_per_page_number' => array('name' => 'pagination_per_page_number', 'title' => __('Number of Media 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'))),
268
- 'pagination_preload_number' => array('name' => 'pagination_preload_number', 'title' => __('Pages To Preload', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('Preload all the media of several first pages', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
269
- 'image_browser_preload_number' => array('name' => 'image_browser_preload_number', 'title' => __('Number of Media for Initial Preload', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('A number of first images/videos are preloaded', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'image_browser'))),
270
- 'image_browser_load_number' => array('name' => 'image_browser_load_number', 'title' => __('Number of Media for Pagination Preload', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => "", 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'image_browser'))),
271
- 'resort_after_load_more' => array('name' => 'resort_after_load_more', 'title' => __('Combine and Sort Again After Loading More', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('If this option is enabled, both newly loaded and existing media are mixed then resorted together', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
272
- 'disable_mobile_layout' => array('name' => 'disable_mobile_layout', 'title' => __('Make Layout Not Responsive', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('When checked, layout does not become single-column on mobile. Columns number stays the same', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry'))),
273
- )
274
- )
275
- ),
276
- "advanced" => array(
277
- "title" => "Advanced",
278
- "type" => "half",
279
- "column" => "one",
280
- "section_name"=>"wdi_advanced",
281
- "elements" => array(
282
- array(
283
- 'theme_id' => array('switched' => 'off', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("Changing Theme is available only in premium version", "wd-instagram-feed"), 'br' => 'true'), 'name' => 'theme_id', 'title' => __('Theme', "wd-instagram-feed"), 'valid_options' => $themes, 'type' => 'select', 'tooltip' => __('Styling theme of the 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'))),
284
- 'feed_resolution' => array('name' => 'feed_resolution', 'title' => __('Feed Media Resolution', "wd-instagram-feed"), 'type' => 'select', 'label' => array('text' => '', 'place' => 'after'), 'valid_options' => array('optimal' => 'Optimal', 'standard' => 'Standard (640 pixels)', 'low' => 'Low (320 pixels)', 'thumbnail' => 'Thumbnail (150 pixels)'), 'tooltip' => 'If set optimal, loaded media size is calculated according to container size. Fast loading and no stretched images.', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
285
- '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'))),
286
- 'display_header' => array('name' => 'display_header', 'title' => __('Show Feed Header', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('Header includes feed title and featured image', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
287
- /* @TODO API Changes 2020. */
288
- 'show_usernames' => array('name' => 'show_usernames', 'title' => __('Show User Data', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => '','hide_ids' => array('display_user_info','display_user_post_follow_number','follow_on_instagram_btn'), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
289
- 'follow_on_instagram_btn' => array('name' => 'follow_on_instagram_btn', 'title' => __('Show "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'))),
290
- 'display_user_post_follow_number' => array('name' => 'display_user_post_follow_number', 'title' => __('Show 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'))),
291
- 'display_user_info' => array('name' => 'display_user_info', 'title' => __('Show User Bio and Website', "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'))),
292
- 'show_description' => array('switched' => 'off', 'name' => 'show_description', 'title' => __('Show Media Caption', "wd-instagram-feed"), 'type' => 'checkbox', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium 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'))),
293
- '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'))),
294
- 'show_likes' => array('switched' => 'off', 'name' => 'show_likes', 'title' => __('Show Number of Likes', "wd-instagram-feed"), 'type' => 'checkbox', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium 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'))),
295
- 'show_comments' => array('switched' => 'off', 'name' => 'show_comments', 'title' => __('Show Number of Comments', "wd-instagram-feed"), 'type' => 'checkbox', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium 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'))),
296
- '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 premium version", "wd-instagram-feed"), 'br' => 'true'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry'))),
297
- )
298
- )
299
- ),
300
- ),
301
- "lightbox_settings" => array(
302
- "general" => array(
303
- "title" => "General",
304
- "type" => "full",
305
- "column" => "two",
306
- "visibility" =>"show",
307
- "section_name"=>"wdi_lightbox_general",
308
- "elements" => array(
309
- array(
310
- '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')), 'hide_ids' => array('1' => 'popup_width,popup_height')),
311
- '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'))),
312
- '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'))),
313
- 'popup_type' => array('name' => 'popup_type', 'title' => __('Lightbox Effect', "wd-instagram-feed"), 'valid_options' => array('none' => 'None', 'cubeH' => 'Cube Horizontal', 'cubeV' => 'Cube Vertical', 'fade' => 'Fade', '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'), 'disabled' => array('text' => __("Effects are available only in premium version", "wd-instagram-feed")), 'type' => 'select', 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
314
- ),
315
- array(
316
- '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'))),
317
- 'popup_interval' => array('name' => 'popup_interval', 'title' => __('Autoplay 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'))),
318
- )
319
- )
320
- ),
321
- "advanced" => array(
322
- "title" => "Advanced",
323
- "type" => "full",
324
- "column" => "two",
325
- "section_name"=>"wdi_lightbox_advanced",
326
- "elements" => array(
327
- array(
328
- 'popup_enable_filmstrip' => array('disabled_options' => array('1' => '', '0' => ''), 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium version", "wd-instagram-feed"), 'br' => 'true'), 'name' => 'popup_enable_filmstrip', 'title' => __('Enable Filmstrip', "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'))),
329
- 'popup_filmstrip_height' => array('name' => 'popup_filmstrip_height', 'title' => __('Filmstrip Thumbnail 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'))),
330
- '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'))),
331
- 'popup_info_always_show' => array('disabled_options' => array('1' => '', '0' => ''), 'name' => 'popup_info_always_show', 'title' => __('Caption Displayed by Default', "wd-instagram-feed"), 'type' => 'radio', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium 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'))),
332
- 'popup_info_full_width' => array('disabled_options' => array('1' => '', '0' => ''), 'name' => 'popup_info_full_width', 'title' => __('Full Width Caption', "wd-instagram-feed"), 'type' => 'radio', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium 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'))),
333
- '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'))),
334
- 'popup_image_right_click' => array('name' => 'popup_image_right_click', 'title' => __('Right Click Protection', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => __('Protect lightbox images from downloading', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
335
- ),
336
- array(
337
- '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'))),
338
- 'popup_enable_info' => array('disabled_options' => array('1' => '', '0' => ''), 'name' => 'popup_enable_info', 'title' => __('Enable Caption Control', "wd-instagram-feed"), 'type' => 'radio', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium version", "wd-instagram-feed"), 'br' => 'true'), 'valid_options' => array('1' => 'Yes', '0' => 'No'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
339
- 'popup_enable_fullscreen' => array('name' => 'popup_enable_fullscreen', 'title' => __('Show Fullscreen Control 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'))),
340
- /* @TODO API Changes 2020. */
341
- '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 premium version", "wd-instagram-feed"), 'br' => 'true'), 'name' => 'popup_enable_comment', 'title' => __('Enable Comments Control', "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'))),
342
- 'popup_enable_fullsize_image' => array('name' => 'popup_enable_fullsize_image', 'title' => __('Add Link to Instagram Post', "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'))),
343
- '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'))),
344
- '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 premium version", "wd-instagram-feed"), 'br' => 'true'), 'name' => 'popup_enable_share_buttons', 'title' => __('Show 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'))),
345
- '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'))),
346
- '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'))),
347
- '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'))),
348
- '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'))),
349
- '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'))),
350
- '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'))),
351
- )
352
- )
353
- ),
354
- ),
355
- "conditional_filters" => array(
356
- "" => array(
357
- "title" => __("This is free version, Conditional filters are available only in premium version", "wd-instagram-feed"),
358
- "type" => "full",
359
- "column" => "one",
360
- "visibility" =>"show",
361
- "section_name"=>"wdi_conditional_filters",
362
- "elements" => array(
363
- array(
364
- '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'))),
365
- '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'))),
366
- )
367
- )
368
- )
369
- ),
370
- "how_to_publish" => array(
371
- "" => array(
372
- "title" => __("How to Publish Feed", "wd-instagram-feed"),
373
- "type" => "full",
374
- "column" => "one",
375
- "visibility" =>"show",
376
- "section_name"=>"wdi_how_to_publish",
377
- "elements" => array(
378
- array(
379
- 'how_to_publish' => array(
380
- 'name' => 'how_to_publish',
381
- 'type' => 'how_to_publish',
382
- 'title' => "",
383
- 'tooltip' => ''
384
- )
385
- )
386
- )
387
- )
388
- )
389
- );
390
- $return = array('tabs' => $tabs, 'current_id' => $current_id);
391
- return $return;
392
- }
393
-
394
-
395
- public function genarateFeedViews()
396
- {
397
- ?>
398
- <div class="wdi_border_wrapper">
399
- <div id="wdi_layout_section" class="wdi_layout_section display_type_content wdi_section">
400
- <h3 data-section_name="wdi_layout_section" class="wdi_display_content wdi_section_name wdi_section_close">Select layout</h3>
401
- <div data-display="table" class="display_type_container wdi_clear_tag wdi_elements">
402
- <div class="display_type" tab="feed_settings">
403
- <div style="text-align:center;padding:2px;"><input type="radio" id="thumbnails" name="feed_type"
404
- value="thumbnails"><label for="thumbnails">Thumbnails</label>
405
- </div>
406
- <label for="thumbnails"><img src="<?php echo plugins_url('../../images/feed_views/thumbnails.png', __FILE__); ?>"></label>
407
- </div>
408
-
409
- <div class="display_type wdi_tooltip" wdi-tooltip="<?php _e('Available In Premium Version') ?>" tab="feed_settings">
410
- <div style="text-align:center;padding:2px;"><input type="radio" disabled id="masonry" name="feed_type"
411
- value="masonry"><label for="masonry" class="wdi_pro_only">Masonry</label>
412
- </div>
413
- <label for="masonry" class="wdi_pro_only_op"><img
414
- src="<?php echo plugins_url('../../images/feed_views/masonry.png', __FILE__); ?>"></label>
415
- </div>
416
-
417
- <div class="display_type wdi_tooltip" wdi-tooltip="<?php _e('Available In Premium Version') ?>" tab="feed_settings">
418
- <div style="text-align:center;padding:2px;"><input disabled type="radio" id="blog_style" name="feed_type"
419
- value="blog_style"><label for="blog_style"
420
- class="wdi_pro_only">Blog
421
- Style</label></div>
422
- <label for="blog_style" class="wdi_pro_only_op"><img
423
- src="<?php echo plugins_url('../../images/feed_views/blog_style.png', __FILE__); ?>"></label>
424
- </div>
425
-
426
- <div class="display_type" tab="feed_settings">
427
- <div style="text-align:center;padding:2px;"><input type="radio" id="image_browser" name="feed_type"
428
- value="image_browser"><label for="image_browser">Image
429
- Browser</label></div>
430
- <label for="image_browser"><img
431
- src="<?php echo plugins_url('../../images/feed_views/image_browser.png', __FILE__); ?>"></label>
432
- </div>
433
- </div>
434
- </div>
435
-
436
- <?php
437
- }
438
-
439
- public function generateTabs()
440
- {
441
- ?>
442
- <div id="wdi_feed_tabs">
443
- <div class="wdi_feed_tabs" id="wdi_feed_settings" onclick="wdi_controller.switchFeedTabs('feed_settings');">
444
- <span class="dashicons dashicons-before dashicons-admin-generic"></span>
445
- <span class="wdi_feed_tab_title"><?php _e('Feed Settings', "wd-instagram-feed") ?></span>
446
- </div>
447
- <div class="wdi_feed_tabs" id="wdi_lightbox_settings" onclick="wdi_controller.switchFeedTabs('lightbox_settings');">
448
- <span class="dashicons dashicons-before dashicons-admin-page"></span>
449
- <span class="wdi_feed_tab_title"><?php _e('Lightbox Settings', "wd-instagram-feed") ?></span>
450
- </div>
451
- <div class="wdi_feed_tabs" id="wdi_conditional_filters" onclick="wdi_controller.switchFeedTabs('conditional_filters');">
452
- <span class="dashicons dashicons-before dashicons-filter"></span>
453
- <span class="wdi_feed_tab_title"><?php _e('Conditional Filters', "wd-instagram-feed") ?></span>
454
- </div>
455
- <div class="wdi_feed_tabs" id="wdi_how_to_publish" onclick="wdi_controller.switchFeedTabs('how_to_publish');">
456
- <span class="dashicons dashicons-before dashicons-editor-help"></span>
457
- <span class="wdi_feed_tab_title"><?php _e('How To Publish Feed', "wd-instagram-feed") ?></span>
458
- </div>
459
- </div>
460
- <?php
461
- }
462
-
463
- public function generateForm($current_id = ''){
464
- if ( $current_id === "" ) {
465
- $wdi_preview_btn = false;
466
- $save_btn_name = __('Publish', "wd-instagram-feed");
467
- }
468
- else {
469
- $wdi_preview_btn = true;
470
- $save_btn_name = __('Update', "wd-instagram-feed");
471
- }
472
-
473
- $formInfo = $this->getFormElements($current_id);
474
- $tabs = $formInfo['tabs'];
475
- $wdi_preview_link = $this->model->get_instagram_preview_post();
476
-
477
- global $wdi_options;
478
- //for edit
479
- $edit = false;
480
- if ($current_id != '') {
481
- $feed_row = WDILibrary::objectToarray($this->model->get_feed_row($current_id));
482
- $edit = true;
483
- }
484
- else {
485
- $feed_row = '';
486
- }
487
- $feed_row_id = "";
488
- if(isset($feed_row["id"])){
489
- $feed_row_id = $feed_row["id"];
490
- }
491
-
492
- if(isset($feed_row['liked_feed'])) {
493
- $feed_row['liked_feed'] = 'userhash';
494
- }
495
-
496
- WDILibrary::topbar();
497
- ?>
498
- <div class="wrap">
499
- <h2 class="wdi-h2-message"></h2>
500
- <form method="post" action="admin.php?page=wdi_feeds" id='wdi_save_feed'>
501
- <div class="wdi-page-header">
502
- <h1 class="wp-heading-inline"><?php echo __('Feed Title', "wd-instagram-feed")?></h1>
503
- <input id="WDI_feed_name" class="WDI_title_input" name="wdi_feed_settings[feed_name]" type="text" value="<?php echo ($edit == true && isset($feed_row['feed_name'])) ? $feed_row['feed_name'] : "Sample Feed";?>">
504
- <div class="wdi_buttons">
505
- <div id="wdi_save_feed_apply" class="button button-primary"><?php echo $save_btn_name;?></div>
506
- <button class="button preview-button button-large"<?php if (!$wdi_preview_btn) echo ' disabled="disabled"' ?> <?php echo ($wdi_preview_btn) ? 'onclick="window.open(\''. add_query_arg( array('feed_id' => $feed_row_id), $wdi_preview_link ) .'\', \'_blank\'); return false;"' : ''; ?>><?php echo __('Preview', "wd-instagram-feed");?></button>
507
- </div>
508
- </div>
509
- <?php $this->generateTabs(); ?>
510
- <?php $this->genarateFeedViews(); ?>
511
- <?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
512
- <input type="hidden" id="wdi_feed_type" name='<?php echo WDI_FSN . '[feed_type]' ?>'>
513
- <input type="hidden" id="task" name='task'>
514
- <input type="hidden" id="wdi_feed_thumb" name="<?php echo WDI_FSN . '[feed_thumb]' ?>">
515
- <input type="hidden" id="wdi_access_token" name="access_token"
516
- value="<?php echo $wdi_options['wdi_access_token']; ?>">
517
- <input type="hidden" id="wdi_add_or_edit" name="add_or_edit" value="<?php echo $current_id; ?>">
518
- <input type="hidden" id="wdi_thumb_user"
519
- value="<?php echo isset($feed_row['thumb_user']) ? $feed_row['thumb_user'] : $wdi_options['wdi_user_name']; ?>">
520
- <input type="hidden" id="wdi_default_user" value="<?php echo $wdi_options['wdi_user_name']; ?>">
521
- <input type="hidden" id="wdi_default_user_id" value="<?php echo $wdi_options['wdi_user_id']; ?>">
522
- <input type="hidden" name="<?php echo WDI_FSN . '[published]' ?>"
523
- value="<?php echo isset($feed_row['published']) ? $feed_row['published'] : '1'; ?>">
524
- <input type="hidden" id="wdi_current_id" name="current_id" value=''>
525
- <input type="hidden" id="wdi_refresh_tab" name="wdi_refresh_tab">
526
- <div class="form-table">
527
- <?php foreach ($tabs as $key => $tab) { ?>
528
- <div id="<?php echo $key; ?>_tab" class="wdi_tab" style="<?php echo $key == "feed_settings" ? "display:block;" : ""; ?>">
529
- <?php foreach ($tab as $key => $section) {
530
- $section_class = "wdi_section_open";
531
- if(isset($section["visibility"]) && $section["visibility"]==="show"){
532
- $section_class = "wdi_section_close";
533
- }
534
- ?>
535
- <div id="<?php echo $key; ?>_section" class="wdi_section <?php echo $section["type"]; ?> <?php echo $section["column"]; ?>">
536
- <h3 data-section_name="<?php echo $section['section_name']?>" class="wdi_section_name <?php echo $section_class;?>"><?php echo $section["title"]; ?></h3>
537
- <div class="wdi_elements wdi_clear_tag">
538
- <?php foreach ($section["elements"] as $elements) { ?>
539
- <div class="section_col">
540
- <?php foreach ($elements as $key => $element) {
541
- if ($element['name'] == 'conditional_filter_enable') { ?>
542
- <div id="wdi-conditional-filters-ui" class="wdi_demo_img">
543
- <div class="wdi-pro-overlay"><img src="<?php echo WDI_URL . '/demo_images/filters.png'; ?>" alt=""></div>
544
- </div><?php
545
- continue;
546
- }
547
-
548
- if ($element['name'] == 'conditional_filter_type') {
549
- continue;
550
- }
551
-
552
- if (isset($element['status'])) {
553
- if ($element['status'] == 'disabled') {
554
- continue;
555
- }
556
- } ?>
557
-
558
- <div class="wdi_element wdi_element_name_<?php echo $element['name'] ; ?>">
559
- <div class="wdi_element_title">
560
- <span class="wdi_settings_link" ><?php echo $element['title']; ?></span>
561
- </div>
562
- <div class="wdi_element_content">
563
- <?php $this->buildField($element, $feed_row); ?>
564
- <!-- FEED USERS -->
565
- <?php if ($element['name'] == 'feed_users'): ?>
566
- <input type="text" id="wdi_add_user_ajax_input">
567
- <div id="wdi_add_user_ajax" class="button"><?php _e('Add', "wd-instagram-feed"); ?></div>
568
- <div id="wdi_feed_users">
569
- <?php $this->display_feed_users($feed_row); ?>
570
- </div>
571
- <?php endif; ?>
572
- <!-- END FEED USERS -->
573
- <?php
574
- if($element['tooltip'] && $element['tooltip']!=""){
575
- echo "<p class='wdi_about_filed'>".$element['tooltip']."</p>";
576
- }
577
- ?>
578
- </div>
579
- </div>
580
- <?php } ?>
581
- </div>
582
- <?php } ?>
583
- </div>
584
- </div>
585
- <?php } ?>
586
- </div><?php
587
- }
588
- ?>
589
- </div>
590
- </form>
591
- </div>
592
- </div>
593
- <?php
594
- }
595
-
596
- private function buildField($element, $feed_row = '')
597
- {
598
- require_once(WDI_DIR . '/framework/WDI_form_builder.php');
599
- $element['defaults'] = $this->model->wdi_get_feed_defaults();
600
- $element['CONST'] = WDI_FSN;
601
- $builder = new WDI_form_builder();
602
- switch ($element['type']) {
603
- case 'input': {
604
- $builder->input($element, $feed_row);
605
- break;
606
- }
607
- case 'select': {
608
- $builder->select($element, $feed_row);
609
- break;
610
- }
611
- case 'radio': {
612
- $builder->radio($element, $feed_row);
613
- break;
614
- }
615
- case 'checkbox': {
616
- $builder->checkbox($element, $feed_row);
617
- break;
618
- }
619
- case 'how_to_publish': {
620
- $builder->how_to_publish($element, $feed_row);
621
- break;
622
- }
623
- }
624
- }
625
-
626
-
627
- public function display_feed_users($feed_row){
628
- global $wdi_options;
629
-
630
- $users = isset($feed_row['feed_users']) ? $feed_row['feed_users'] : "";
631
- $users = json_decode($users);
632
-
633
- if ($users === null) {
634
- $users = array();
635
- }
636
- $token = WDILibrary::get_user_access_token($users);
637
- ?>
638
- <script>
639
- jQuery(document).ready(function ()
640
- {
641
- var users_list = JSON.parse(wdi_options.wdi_authenticated_users_list);
642
- if (typeof users_list !== 'object') {
643
- users_list = {};
644
- }
645
-
646
- var usersnames = [wdi_options.wdi_user_name];
647
- for(var i in users_list){
648
- usersnames.push(users_list[i].user_name);
649
- }
650
-
651
- wdi_controller.users_list = users_list;
652
- wdi_controller.usersnames = usersnames;
653
- wdi_controller.instagram = new WDIInstagram();
654
- wdi_controller.feed_users = [];
655
- wdi_controller.instagram.addToken(<?php echo '"' . $token . '"'; ?>);
656
-
657
- wdi_controller.updateFeaturedImageSelect(<?php echo '"' . $wdi_options['wdi_user_name'] . '"'; ?>, 'add', 'selected');
658
-
659
- <?php foreach ($users as $user) : ?>
660
- wdi_controller.makeInstagramUserRequest(<?php echo '"' . $user->username . '"'?>, true);
661
- <?php endforeach; ?>
662
- });
663
- </script>
664
- <?php
665
-
666
- }
667
-
668
-
669
- }
670
-
671
-
672
-
673
-
674
-
1
+ <?php
2
+
3
+ class WDIViewFeeds_wdi
4
+ {
5
+
6
+ private $model;
7
+
8
+ public function __construct($model)
9
+ {
10
+ $this->model = $model;
11
+ }
12
+
13
+ public function display()
14
+ {
15
+ /*My Edit*/
16
+ global $wdi_options;
17
+ $rows_data = $this->model->get_rows_data();
18
+ $page_nav = $this->model->page_nav();
19
+ $search_value = WDILibrary::get('search_value', '');
20
+ if( empty($search_value) ){
21
+ $search_value = WDILibrary::get('search', '');
22
+ }
23
+
24
+ $asc_or_desc = WDILibrary::get('order', 'asc');
25
+ $order_by = WDILibrary::get('order_by', 'id');
26
+ if($order_by==="feed_name"){
27
+ $wdi_sort = " sorted ";
28
+ }else{
29
+ $wdi_sort = " sortable ";
30
+ }
31
+ $order_class = 'manage-column column-title '.$wdi_sort . $asc_or_desc;
32
+ $ids_string = '';
33
+ $wdi_button_array = array(
34
+ 'publish_all' => __('Publish', 'wdi'),
35
+ 'unpublish_all' => __('Unpublish', 'wdi'),
36
+ 'duplicate_all' => __('Duplicate', 'wdi'),
37
+ 'delete_all' => __('Delete', 'wdi'),
38
+ );
39
+
40
+ WDILibrary::topbar();
41
+ ?>
42
+ <div class="wrap">
43
+ <form class="" id="wdi_feed_form" method="post" action="admin.php?page=wdi_feeds" >
44
+ <?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
45
+ <input type="hidden" id="wdi_access_token" name="access_token"
46
+ value="<?php echo isset($wdi_options['wdi_access_token']) ? $wdi_options['wdi_access_token'] : ''; ?>">
47
+ <div class="wd-page-title wd-header">
48
+ <h1 class="wp-heading-inline"><?php _e('Feeds', "wd-instagram-feed"); ?></h1>
49
+ <?php
50
+ $add_page_data = array(
51
+ 'task' => 'add'
52
+ );
53
+ ?>
54
+ <a href="<?php echo WDILibrary::get_page_link($add_page_data);?>" class="add-new-h2"><?php _e('Add new', "wd-instagram-feed"); ?></a>
55
+ </div>
56
+ <?php
57
+ WDILibrary::search(__('Name', "wd-instagram-feed"), $search_value, 'wdi_feed_form');
58
+ ?>
59
+
60
+ <div class="tablenav top">
61
+ <div class="alignleft actions bulkactions">
62
+ <select class="bulk_action">
63
+ <option value=""><?php _e('Bulk Actions', 'wd-instagram-feed'); ?></option>
64
+ <?php
65
+ foreach ($wdi_button_array as $key => $value) {
66
+ ?>
67
+ <option value="<?php echo $key; ?>"><?php echo $value; ?></option>
68
+ <?php
69
+ }
70
+ ?>
71
+ </select>
72
+ <input class="button action" type="button" title="<?php _e('Apply', 'wds'); ?>" onclick="if (!wdi_bulk_actions('.bulk_action')) {return false}" value="<?php _e('Apply', 'wds'); ?>" />
73
+ </div>
74
+ <?php
75
+ WDILibrary::html_page_nav($page_nav['total'], $page_nav['limit'], 'wdi_feed_form');
76
+ ?>
77
+ </div>
78
+
79
+ <table class="wp-list-table widefat fixed pages media">
80
+ <thead>
81
+ <td class="manage-column column-cb check-column"><input id="check_all" type="checkbox" onclick="wdi_spider_check_all(this)"/></td>
82
+
83
+ <th class="column-primary table_large_col <?php
84
+ echo $order_class;
85
+ ?>">
86
+ <?php
87
+ if($asc_or_desc==="asc"){
88
+ $wdi_order = 'desc';
89
+ }else{
90
+ $wdi_order = 'asc';
91
+ }
92
+ ?>
93
+ <a href="<?php echo WDILibrary::get_page_link(array('order_by'=>'feed_name', 'order'=>$wdi_order));?>">
94
+ <span><?php _e('Title', "wd-instagram-feed"); ?></span><span class="sorting-indicator"></span>
95
+ </a>
96
+ </th>
97
+ <th class="table_big_col"><?php _e('Shortcode', "wd-instagram-feed"); ?></th>
98
+ <th class="table_large_col"><?php _e('PHP function', "wd-instagram-feed"); ?></th>
99
+ </thead>
100
+ <tbody id="tbody_arr">
101
+ <?php
102
+ if ($rows_data) {
103
+ $instagram_preview_post = $this->model->get_instagram_preview_post();
104
+
105
+ foreach ($rows_data as $row_data) {
106
+ $alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
107
+ $published_image = (($row_data->published) ? 'publish' : 'unpublish');
108
+ $published = (($row_data->published) ? 'unpublish' : 'publish');
109
+ $prev_img_url = $this->model->get_slider_prev_img($row_data->id);
110
+ $edit_page_data = array(
111
+ 'task' => 'edit',
112
+ 'current_id' => $row_data->id,
113
+ );
114
+ $wdi_nonce_wd = wp_create_nonce('nonce_wd');
115
+ ?>
116
+ <tr id="tr_<?php echo $row_data->id; ?>" <?php echo $alternate; ?>>
117
+ <th class="table_small_col check-column"><input id="check_<?php echo $row_data->id; ?>"
118
+ name="check_<?php echo $row_data->id; ?>"
119
+ onclick="wdi_spider_check_all(this)" type="checkbox"/>
120
+ </th>
121
+ <td class="column-primary column-title" data-colname="Name">
122
+ <strong>
123
+ <a href="<?php echo WDILibrary::get_page_link($edit_page_data);?>"
124
+ title="Edit">
125
+ <span class="media-icon image-icon">
126
+ <img title="<?php echo $row_data->feed_name; ?>"
127
+ style="border: 1px solid #CCCCCC; max-width: 70px; max-height: 50px;"
128
+ src="<?php echo $prev_img_url; ?>">
129
+ </span>
130
+ <?php echo $row_data->feed_name; ?>
131
+ </a>
132
+ <?php
133
+ if ( !$row_data->published ) {
134
+ ?>
135
+
136
+ <span class="post-state"><?php _e('Unpublished', "wd-instagram-feed"); ?></span>
137
+ <?php
138
+ }
139
+
140
+ ?>
141
+ </strong>
142
+ <div class="row-actions">
143
+ <span>
144
+ <a href="<?php echo WDILibrary::get_page_link($edit_page_data);?>"
145
+ title="Edit"><?php _e('Edit', "wd-instagram-feed"); ?>
146
+ </a>
147
+ |
148
+ </span>
149
+ <span>
150
+ <a href="<?php echo WDILibrary::get_page_link(array('task'=>'duplicate','current_id'=>$row_data->id, 'nonce_wd'=>$wdi_nonce_wd));?>"><?php _e('Duplicate', "wd-instagram-feed"); ?></a>
151
+ |
152
+ </span>
153
+ <span>
154
+ <a href="<?php echo WDILibrary::get_page_link(array('task'=>$published,'current_id'=>$row_data->id, 'nonce_wd'=>$wdi_nonce_wd));?>" ><?php echo ( $row_data->published ? __('Unpublish', "wd-instagram-feed") : __('Publish', "wd-instagram-feed")); ?></a>
155
+ |
156
+ </span>
157
+ <span class="trash">
158
+ <a onclick="if (!confirm('<?php esc_attr_e('Do you want to delete selected items?', "wd-instagram-feed"); ?>')){return false;}" href="<?php echo WDILibrary::get_page_link(array('task'=>"delete",'current_id'=>$row_data->id, 'nonce_wd'=>$wdi_nonce_wd));?>">Delete</a>
159
+ |
160
+ </span>
161
+ <span>
162
+ <a href="<?php echo add_query_arg( array('feed_id' => $row_data->id), $instagram_preview_post); ?>" target="_blank"><?php _e('Preview', "wd-instagram-feed"); ?></a>
163
+ </span>
164
+ </div>
165
+ <button class="toggle-row" type="button">
166
+ <span class="screen-reader-text"><?php _e('Show more details', "wd-instagram-feed"); ?></span>
167
+ </button>
168
+ </td>
169
+ <td class="table_big_col" data-colname="Shortcode" >
170
+ <input type="text" value='[wdi_feed id="<?php echo $row_data->id; ?>"]'
171
+ onclick="wdi_spider_select_value(this)" size="12" readonly="readonly"
172
+ style="padding-left: 1px; padding-right: 1px; text-align: center;"/>
173
+ </td>
174
+ <td class="table_large_col" data-colname="PHP function" >
175
+ <input type="text" value="&#60;?php echo wdi_feed(array('id'=>'<?php echo $row_data->id; ?>')); ?&#62;"
176
+ onclick="wdi_spider_select_value(this)" size="30" readonly="readonly"
177
+ style="padding-left: 1px; padding-right: 1px; text-align: center;"/>
178
+ </td>
179
+ </tr>
180
+ <?php
181
+ $ids_string .= $row_data->id . ',';
182
+ }
183
+ }
184
+ ?>
185
+ </tbody>
186
+ </table>
187
+ <input id="task" name="task" type="hidden" value=""/>
188
+ <input id="current_id" name="current_id" type="hidden" value=""/>
189
+ <input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>"/>
190
+ <input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc"/>
191
+ <input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>"/>
192
+ </form>
193
+ </div>
194
+ <?php
195
+ }
196
+
197
+ public function edit($type)
198
+ {
199
+ if ($type === 0) {
200
+ $this->generateForm();
201
+ ?>
202
+ <script>jQuery(document).ready(function ()
203
+ {
204
+ wdi_controller.switchFeedTabs('feed_settings');
205
+ });</script>
206
+ <?php
207
+ }
208
+ else {
209
+ global $wdi_new_feed;
210
+ $wdi_new_feed = true;
211
+ $current_id = $type;
212
+ $feed_row = $this->model->get_feed_row($current_id);
213
+ $view_id = $feed_row->feed_type;
214
+ $this->generateForm($current_id);
215
+ $tab = WDILibrary::get('wdi_refresh_tab', 'feed_settings');
216
+ ?>
217
+ <script>jQuery(document).ready(function ()
218
+ {
219
+ wdi_controller.switchFeedTabs("<?php echo $tab;?>", "<?php echo $view_id;?>");
220
+ });</script>
221
+ <?php
222
+
223
+ }
224
+
225
+
226
+ }
227
+
228
+
229
+ public function getFormElements($current_id = ''){
230
+ require_once(WDI_DIR . '/admin/models/WDIModelThemes_wdi.php');
231
+ $themes = WDIModelThemes_wdi::get_themes();
232
+
233
+ $tabs = array(
234
+ "feed_settings" => array(
235
+ "media" => array(
236
+ "title" => "Media",
237
+ "type" => "full",
238
+ "column" => "two",
239
+ "visibility" =>"show",
240
+ "section_name"=>"wdi_media",
241
+ "elements" => array(
242
+ array(
243
+ //'feed_name' => array('name' => 'feed_name', 'title' => __('Feed Title', "wd-instagram-feed"), 'type' => 'input', 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
244
+ 'liked_feed' => array('disabled_options' => array('liked'), 'disabled' => array('text' => __("Feed of liked media is available only in premium version", "wd-instagram-feed")), 'name' => 'liked_feed', 'title' => __('Feed Media', "wd-instagram-feed"), 'type' => 'select', 'valid_options' => array('userhash' => __('Username/Hashtag', "wd-instagram-feed"), 'liked' => __('Media I liked', "wd-instagram-feed")), 'break' => 'false', 'hide_ids' => array(), 'tooltip' => __('Display media of User/Hashtag or the media I liked', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
245
+ 'feed_users' => array('name' => 'feed_users', 'title' => __('Feed Username and Hashtags', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'hidden', 'tooltip' => sprintf('%s <span class="wdi_settings_notification">%s</span>', __('Add username or hashtags to your feed. Hashtags must start with #, username shouldn\'t start with @.', "wd-instagram-feed"), __('Note, that the more hashtags you add, the slower feed loading will be on front-end.', "wd-instagram-feed")), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
246
+ 'hashtag_top_recent' => array('name' => 'hashtag_top_recent', 'title' => __('Hashtag Top/Recent', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Recent', "wd-instagram-feed"), '0' => __('Top', "wd-instagram-feed")), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings')), 'hide_ids' => array('1' => 'popup_width,popup_height')),
247
+ ),
248
+ array(
249
+ 'sort_images_by' => array('name' => 'sort_images_by', 'title' => __('Sort Media 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' => "", 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
250
+ 'display_order' => array('name' => 'display_order', 'title' => __('Sorting Order', "wd-instagram-feed"), 'valid_options' => array('asc' => 'Ascending', 'desc' => 'Descending '), 'type' => 'select', 'tooltip' => "", 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
251
+ 'feed_item_onclick' => array('name' => 'feed_item_onclick', 'title' => __('Action OnClick', "wd-instagram-feed"), 'type' => 'select', 'valid_options' => array('lightbox' => __('Open Lightbox', "wd-instagram-feed"), 'instagram' => __('Redirect To Instagram', "wd-instagram-feed"), 'custom_redirect' => __('Custom Redirect', "wd-instagram-feed"), 'none' => __('Do Nothing', "wd-instagram-feed")), 'break' => 'true', 'hide_ids' => array('lightbox' => 'redirect_url', 'instagram' => 'redirect_url', 'none' => 'redirect_url'), 'tooltip' => __('Do this action when user clicks on image/video in the feed', 'wd-instagram-feed'), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
252
+ 'redirect_url' => array('name' => 'redirect_url', 'title' => __('Redirect URL', "wd-instagram-feed"), 'type' => 'input', 'tooltip' => __('Absolute Url to redirect to.', 'wd-instagram-feed'), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
253
+ )
254
+ )
255
+ ),
256
+ "layout" => array(
257
+ "title" => "Layout and Pagination",
258
+ "type" => "half",
259
+ "column" => "one",
260
+ "section_name"=>"wdi_layout",
261
+ "elements" => array(
262
+ array(
263
+ 'feed_display_view' => array('name' => 'feed_display_view', 'title' => __('New Media Loading', "wd-instagram-feed"), 'type' => 'select', 'valid_options' => array('pagination' => __('Pagination', "wd-instagram-feed"), 'load_more_btn' => __('Load More Button', "wd-instagram-feed"), 'infinite_scroll' => __('Infinite Scroll', "wd-instagram-feed"), 'none' => __('None', "wd-instagram-feed")),'disabled_options' => array('infinite_scroll'),'disabled' => array('text' => __("Infinite Scroll option is available only in premium version", "wd-instagram-feed")), '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', 'none' => 'pagination_preload_number,pagination_per_page_number,load_more_number,resort_after_load_more'), 'tooltip' => __('How to load and display new images/videos', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
264
+ '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' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry'))),
265
+ 'number_of_photos' => array('name' => 'number_of_photos', 'title' => __('Number of Images/Videos', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('Number of images/videos to show when feed is loaded first time', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
266
+ 'load_more_number' => array('name' => 'load_more_number', 'title' => __('Number of New Media', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('Number of new media added to the feed, when user clicks on load more button or triggers infinite scroll', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
267
+ 'pagination_per_page_number' => array('name' => 'pagination_per_page_number', 'title' => __('Number of Media 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'))),
268
+ 'pagination_preload_number' => array('name' => 'pagination_preload_number', 'title' => __('Pages To Preload', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('Preload all the media of several first pages', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
269
+ 'image_browser_preload_number' => array('name' => 'image_browser_preload_number', 'title' => __('Number of Media for Initial Preload', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => __('A number of first images/videos are preloaded', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'image_browser'))),
270
+ 'image_browser_load_number' => array('name' => 'image_browser_load_number', 'title' => __('Number of Media for Pagination Preload', "wd-instagram-feed"), 'type' => 'input', 'input_type' => 'number', 'tooltip' => "", 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'image_browser'))),
271
+ 'resort_after_load_more' => array('name' => 'resort_after_load_more', 'title' => __('Combine and Sort Again After Loading More', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('If this option is enabled, both newly loaded and existing media are mixed then resorted together', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style'))),
272
+ 'disable_mobile_layout' => array('name' => 'disable_mobile_layout', 'title' => __('Make Layout Not Responsive', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('When checked, layout does not become single-column on mobile. Columns number stays the same', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry'))),
273
+ )
274
+ )
275
+ ),
276
+ "advanced" => array(
277
+ "title" => "Advanced",
278
+ "type" => "half",
279
+ "column" => "one",
280
+ "section_name"=>"wdi_advanced",
281
+ "elements" => array(
282
+ array(
283
+ 'theme_id' => array('switched' => 'off', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("Changing Theme is available only in premium version", "wd-instagram-feed"), 'br' => 'true'), 'name' => 'theme_id', 'title' => __('Theme', "wd-instagram-feed"), 'valid_options' => $themes, 'type' => 'select', 'tooltip' => __('Styling theme of the 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'))),
284
+ 'feed_resolution' => array('name' => 'feed_resolution', 'title' => __('Feed Media Resolution', "wd-instagram-feed"), 'type' => 'select', 'label' => array('text' => '', 'place' => 'after'), 'valid_options' => array('optimal' => 'Optimal', 'standard' => 'Standard (640 pixels)', 'low' => 'Low (320 pixels)', 'thumbnail' => 'Thumbnail (150 pixels)'), 'tooltip' => 'If set optimal, loaded media size is calculated according to container size. Fast loading and no stretched images.', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
285
+ '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'))),
286
+ 'display_header' => array('name' => 'display_header', 'title' => __('Show Feed Header', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => __('Header includes feed title and featured image', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
287
+ /* @TODO API Changes 2020. */
288
+ 'show_usernames' => array('name' => 'show_usernames', 'title' => __('Show User Data', "wd-instagram-feed"), 'type' => 'checkbox', 'tooltip' => '','hide_ids' => array('display_user_info','display_user_post_follow_number','follow_on_instagram_btn'), 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry,blog_style,image_browser'))),
289
+ 'follow_on_instagram_btn' => array('name' => 'follow_on_instagram_btn', 'title' => __('Show "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'))),
290
+ 'display_user_post_follow_number' => array('name' => 'display_user_post_follow_number', 'title' => __('Show 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'))),
291
+ 'display_user_info' => array('name' => 'display_user_info', 'title' => __('Show User Bio and Website', "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'))),
292
+ 'show_description' => array('switched' => 'off', 'name' => 'show_description', 'title' => __('Show Media Caption', "wd-instagram-feed"), 'type' => 'checkbox', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium 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'))),
293
+ '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'))),
294
+ 'show_likes' => array('switched' => 'off', 'name' => 'show_likes', 'title' => __('Show Number of Likes', "wd-instagram-feed"), 'type' => 'checkbox', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium 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'))),
295
+ 'show_comments' => array('switched' => 'off', 'name' => 'show_comments', 'title' => __('Show Number of Comments', "wd-instagram-feed"), 'type' => 'checkbox', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium 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'))),
296
+ '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 premium version", "wd-instagram-feed"), 'br' => 'true'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'feed_settings'), array('name' => 'section', 'value' => 'thumbnails,masonry'))),
297
+ )
298
+ )
299
+ ),
300
+ ),
301
+ "lightbox_settings" => array(
302
+ "general" => array(
303
+ "title" => "General",
304
+ "type" => "full",
305
+ "column" => "two",
306
+ "visibility" =>"show",
307
+ "section_name"=>"wdi_lightbox_general",
308
+ "elements" => array(
309
+ array(
310
+ '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')), 'hide_ids' => array('1' => 'popup_width,popup_height')),
311
+ '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'))),
312
+ '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'))),
313
+ 'popup_type' => array('name' => 'popup_type', 'title' => __('Lightbox Effect', "wd-instagram-feed"), 'valid_options' => array('none' => 'None', 'cubeH' => 'Cube Horizontal', 'cubeV' => 'Cube Vertical', 'fade' => 'Fade', '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'), 'disabled' => array('text' => __("Effects are available only in premium version", "wd-instagram-feed")), 'type' => 'select', 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
314
+ ),
315
+ array(
316
+ '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'))),
317
+ 'popup_interval' => array('name' => 'popup_interval', 'title' => __('Autoplay 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'))),
318
+ )
319
+ )
320
+ ),
321
+ "advanced" => array(
322
+ "title" => "Advanced",
323
+ "type" => "full",
324
+ "column" => "two",
325
+ "section_name"=>"wdi_lightbox_advanced",
326
+ "elements" => array(
327
+ array(
328
+ 'popup_enable_filmstrip' => array('disabled_options' => array('1' => '', '0' => ''), 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium version", "wd-instagram-feed"), 'br' => 'true'), 'name' => 'popup_enable_filmstrip', 'title' => __('Enable Filmstrip', "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'))),
329
+ 'popup_filmstrip_height' => array('name' => 'popup_filmstrip_height', 'title' => __('Filmstrip Thumbnail 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'))),
330
+ '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'))),
331
+ 'popup_info_always_show' => array('disabled_options' => array('1' => '', '0' => ''), 'name' => 'popup_info_always_show', 'title' => __('Caption Displayed by Default', "wd-instagram-feed"), 'type' => 'radio', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium 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'))),
332
+ 'popup_info_full_width' => array('disabled_options' => array('1' => '', '0' => ''), 'name' => 'popup_info_full_width', 'title' => __('Full Width Caption', "wd-instagram-feed"), 'type' => 'radio', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium 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'))),
333
+ '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'))),
334
+ 'popup_image_right_click' => array('name' => 'popup_image_right_click', 'title' => __('Right Click Protection', "wd-instagram-feed"), 'type' => 'radio', 'valid_options' => array('1' => __('Yes', "wd-instagram-feed"), '0' => __('No', "wd-instagram-feed")), 'tooltip' => __('Protect lightbox images from downloading', "wd-instagram-feed"), 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
335
+ ),
336
+ array(
337
+ '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'))),
338
+ 'popup_enable_info' => array('disabled_options' => array('1' => '', '0' => ''), 'name' => 'popup_enable_info', 'title' => __('Enable Caption Control', "wd-instagram-feed"), 'type' => 'radio', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("This feature is available only in premium version", "wd-instagram-feed"), 'br' => 'true'), 'valid_options' => array('1' => 'Yes', '0' => 'No'), 'tooltip' => '', 'attr' => array(array('name' => 'tab', 'value' => 'lightbox_settings'))),
339
+ 'popup_enable_fullscreen' => array('name' => 'popup_enable_fullscreen', 'title' => __('Show Fullscreen Control 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'))),
340
+ /* @TODO API Changes 2020. */
341
+ '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 premium version", "wd-instagram-feed"), 'br' => 'true'), 'name' => 'popup_enable_comment', 'title' => __('Enable Comments Control', "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'))),
342
+ 'popup_enable_fullsize_image' => array('name' => 'popup_enable_fullsize_image', 'title' => __('Add Link to Instagram Post', "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'))),
343
+ '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'))),
344
+ '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 premium version", "wd-instagram-feed"), 'br' => 'true'), 'name' => 'popup_enable_share_buttons', 'title' => __('Show 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'))),
345
+ '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'))),
346
+ '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'))),
347
+ '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'))),
348
+ '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'))),
349
+ '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'))),
350
+ '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'))),
351
+ )
352
+ )
353
+ ),
354
+ ),
355
+ "conditional_filters" => array(
356
+ "" => array(
357
+ "title" => __("This is free version, Conditional filters are available only in premium version", "wd-instagram-feed"),
358
+ "type" => "full",
359
+ "column" => "one",
360
+ "visibility" =>"show",
361
+ "section_name"=>"wdi_conditional_filters",
362
+ "elements" => array(
363
+ array(
364
+ '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'))),
365
+ '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'))),
366
+ )
367
+ )
368
+ )
369
+ ),
370
+ "how_to_publish" => array(
371
+ "" => array(
372
+ "title" => __("How to Publish Feed", "wd-instagram-feed"),
373
+ "type" => "full",
374
+ "column" => "one",
375
+ "visibility" =>"show",
376
+ "section_name"=>"wdi_how_to_publish",
377
+ "elements" => array(
378
+ array(
379
+ 'how_to_publish' => array(
380
+ 'name' => 'how_to_publish',
381
+ 'type' => 'how_to_publish',
382
+ 'title' => "",
383
+ 'tooltip' => ''
384
+ )
385
+ )
386
+ )
387
+ )
388
+ )
389
+ );
390
+ $return = array('tabs' => $tabs, 'current_id' => $current_id);
391
+ return $return;
392
+ }
393
+
394
+
395
+ public function genarateFeedViews()
396
+ {
397
+ ?>
398
+ <div class="wdi_border_wrapper">
399
+ <div id="wdi_layout_section" class="wdi_layout_section display_type_content wdi_section">
400
+ <h3 data-section_name="wdi_layout_section" class="wdi_display_content wdi_section_name wdi_section_close">Select layout</h3>
401
+ <div data-display="table" class="display_type_container wdi_clear_tag wdi_elements">
402
+ <div class="display_type" tab="feed_settings">
403
+ <div style="text-align:center;padding:2px;"><input type="radio" id="thumbnails" name="feed_type"
404
+ value="thumbnails"><label for="thumbnails">Thumbnails</label>
405
+ </div>
406
+ <label for="thumbnails"><img src="<?php echo plugins_url('../../images/feed_views/thumbnails.png', __FILE__); ?>"></label>
407
+ </div>
408
+
409
+ <div class="display_type wdi_tooltip" wdi-tooltip="<?php _e('Available In Premium Version') ?>" tab="feed_settings">
410
+ <div style="text-align:center;padding:2px;"><input type="radio" disabled id="masonry" name="feed_type"
411
+ value="masonry"><label for="masonry" class="wdi_pro_only">Masonry</label>
412
+ </div>
413
+ <label for="masonry" class="wdi_pro_only_op"><img
414
+ src="<?php echo plugins_url('../../images/feed_views/masonry.png', __FILE__); ?>"></label>
415
+ </div>
416
+
417
+ <div class="display_type wdi_tooltip" wdi-tooltip="<?php _e('Available In Premium Version') ?>" tab="feed_settings">
418
+ <div style="text-align:center;padding:2px;"><input disabled type="radio" id="blog_style" name="feed_type"
419
+ value="blog_style"><label for="blog_style"
420
+ class="wdi_pro_only">Blog
421
+ Style</label></div>
422
+ <label for="blog_style" class="wdi_pro_only_op"><img
423
+ src="<?php echo plugins_url('../../images/feed_views/blog_style.png', __FILE__); ?>"></label>
424
+ </div>
425
+
426
+ <div class="display_type" tab="feed_settings">
427
+ <div style="text-align:center;padding:2px;"><input type="radio" id="image_browser" name="feed_type"
428
+ value="image_browser"><label for="image_browser">Image
429
+ Browser</label></div>
430
+ <label for="image_browser"><img
431
+ src="<?php echo plugins_url('../../images/feed_views/image_browser.png', __FILE__); ?>"></label>
432
+ </div>
433
+ </div>
434
+ </div>
435
+
436
+ <?php
437
+ }
438
+
439
+ public function generateTabs()
440
+ {
441
+ ?>
442
+ <div id="wdi_feed_tabs">
443
+ <div class="wdi_feed_tabs" id="wdi_feed_settings" onclick="wdi_controller.switchFeedTabs('feed_settings');">
444
+ <span class="dashicons dashicons-before dashicons-admin-generic"></span>
445
+ <span class="wdi_feed_tab_title"><?php _e('Feed Settings', "wd-instagram-feed") ?></span>
446
+ </div>
447
+ <div class="wdi_feed_tabs" id="wdi_lightbox_settings" onclick="wdi_controller.switchFeedTabs('lightbox_settings');">
448
+ <span class="dashicons dashicons-before dashicons-admin-page"></span>
449
+ <span class="wdi_feed_tab_title"><?php _e('Lightbox Settings', "wd-instagram-feed") ?></span>
450
+ </div>
451
+ <div class="wdi_feed_tabs" id="wdi_conditional_filters" onclick="wdi_controller.switchFeedTabs('conditional_filters');">
452
+ <span class="dashicons dashicons-before dashicons-filter"></span>
453
+ <span class="wdi_feed_tab_title"><?php _e('Conditional Filters', "wd-instagram-feed") ?></span>
454
+ </div>
455
+ <div class="wdi_feed_tabs" id="wdi_how_to_publish" onclick="wdi_controller.switchFeedTabs('how_to_publish');">
456
+ <span class="dashicons dashicons-before dashicons-editor-help"></span>
457
+ <span class="wdi_feed_tab_title"><?php _e('How To Publish Feed', "wd-instagram-feed") ?></span>
458
+ </div>
459
+ </div>
460
+ <?php
461
+ }
462
+
463
+ public function generateForm($current_id = ''){
464
+ if ( $current_id === "" ) {
465
+ $wdi_preview_btn = false;
466
+ $save_btn_name = __('Publish', "wd-instagram-feed");
467
+ }
468
+ else {
469
+ $wdi_preview_btn = true;
470
+ $save_btn_name = __('Update', "wd-instagram-feed");
471
+ }
472
+
473
+ $formInfo = $this->getFormElements($current_id);
474
+ $tabs = $formInfo['tabs'];
475
+ $wdi_preview_link = $this->model->get_instagram_preview_post();
476
+
477
+ global $wdi_options;
478
+ //for edit
479
+ $edit = false;
480
+ if ($current_id != '') {
481
+ $feed_row = WDILibrary::objectToarray($this->model->get_feed_row($current_id));
482
+ $edit = true;
483
+ }
484
+ else {
485
+ $feed_row = '';
486
+ }
487
+ $feed_row_id = "";
488
+ if(isset($feed_row["id"])){
489
+ $feed_row_id = $feed_row["id"];
490
+ }
491
+
492
+ if(isset($feed_row['liked_feed'])) {
493
+ $feed_row['liked_feed'] = 'userhash';
494
+ }
495
+
496
+ WDILibrary::topbar();
497
+ ?>
498
+ <div class="wrap">
499
+ <h2 class="wdi-h2-message"></h2>
500
+ <form method="post" action="admin.php?page=wdi_feeds" id='wdi_save_feed'>
501
+ <div class="wdi-page-header">
502
+ <h1 class="wp-heading-inline"><?php echo __('Feed Title', "wd-instagram-feed")?></h1>
503
+ <input id="WDI_feed_name" class="WDI_title_input" name="wdi_feed_settings[feed_name]" type="text" value="<?php echo ($edit == true && isset($feed_row['feed_name'])) ? $feed_row['feed_name'] : "Sample Feed";?>">
504
+ <div class="wdi_buttons">
505
+ <div id="wdi_save_feed_apply" class="button button-primary"><?php echo $save_btn_name;?></div>
506
+ <button class="button preview-button button-large"<?php if (!$wdi_preview_btn) echo ' disabled="disabled"' ?> <?php echo ($wdi_preview_btn) ? 'onclick="window.open(\''. add_query_arg( array('feed_id' => $feed_row_id), $wdi_preview_link ) .'\', \'_blank\'); return false;"' : ''; ?>><?php echo __('Preview', "wd-instagram-feed");?></button>
507
+ </div>
508
+ </div>
509
+ <?php $this->generateTabs(); ?>
510
+ <?php $this->genarateFeedViews(); ?>
511
+ <?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
512
+ <input type="hidden" id="wdi_feed_type" name='<?php echo WDI_FSN . '[feed_type]' ?>'>
513
+ <input type="hidden" id="task" name='task'>
514
+ <input type="hidden" id="wdi_feed_thumb" name="<?php echo WDI_FSN . '[feed_thumb]' ?>">
515
+ <input type="hidden" id="wdi_access_token" name="access_token"
516
+ value="<?php echo $wdi_options['wdi_access_token']; ?>">
517
+ <input type="hidden" id="wdi_add_or_edit" name="add_or_edit" value="<?php echo $current_id; ?>">
518
+ <input type="hidden" id="wdi_thumb_user"
519
+ value="<?php echo isset($feed_row['thumb_user']) ? $feed_row['thumb_user'] : $wdi_options['wdi_user_name']; ?>">
520
+ <input type="hidden" id="wdi_default_user" value="<?php echo $wdi_options['wdi_user_name']; ?>">
521
+ <input type="hidden" id="wdi_default_user_id" value="<?php echo $wdi_options['wdi_user_id']; ?>">
522
+ <input type="hidden" name="<?php echo WDI_FSN . '[published]' ?>"
523
+ value="<?php echo isset($feed_row['published']) ? $feed_row['published'] : '1'; ?>">
524
+ <input type="hidden" id="wdi_current_id" name="current_id" value=''>
525
+ <input type="hidden" id="wdi_refresh_tab" name="wdi_refresh_tab">
526
+ <div class="form-table">
527
+ <?php foreach ($tabs as $key => $tab) { ?>
528
+ <div id="<?php echo $key; ?>_tab" class="wdi_tab" style="<?php echo $key == "feed_settings" ? "display:block;" : ""; ?>">
529
+ <?php foreach ($tab as $key => $section) {
530
+ $section_class = "wdi_section_open";
531
+ if(isset($section["visibility"]) && $section["visibility"]==="show"){
532
+ $section_class = "wdi_section_close";
533
+ }
534
+ ?>
535
+ <div id="<?php echo $key; ?>_section" class="wdi_section <?php echo $section["type"]; ?> <?php echo $section["column"]; ?>">
536
+ <h3 data-section_name="<?php echo $section['section_name']?>" class="wdi_section_name <?php echo $section_class;?>"><?php echo $section["title"]; ?></h3>
537
+ <div class="wdi_elements wdi_clear_tag">
538
+ <?php foreach ($section["elements"] as $elements) { ?>
539
+ <div class="section_col">
540
+ <?php foreach ($elements as $key => $element) {
541
+ if ($element['name'] == 'conditional_filter_enable') { ?>
542
+ <div id="wdi-conditional-filters-ui" class="wdi_demo_img">
543
+ <div class="wdi-pro-overlay"><img src="<?php echo WDI_URL . '/demo_images/filters.png'; ?>" alt=""></div>
544
+ </div><?php
545
+ continue;
546
+ }
547
+
548
+ if ($element['name'] == 'conditional_filter_type') {
549
+ continue;
550
+ }
551
+
552
+ if (isset($element['status'])) {
553
+ if ($element['status'] == 'disabled') {
554
+ continue;
555
+ }
556
+ } ?>
557
+
558
+ <div class="wdi_element wdi_element_name_<?php echo $element['name'] ; ?>">
559
+ <div class="wdi_element_title">
560
+ <span class="wdi_settings_link" ><?php echo $element['title']; ?></span>
561
+ </div>
562
+ <div class="wdi_element_content">
563
+ <?php $this->buildField($element, $feed_row); ?>
564
+ <!-- FEED USERS -->
565
+ <?php if ($element['name'] == 'feed_users'): ?>
566
+ <input type="text" id="wdi_add_user_ajax_input">
567
+ <div id="wdi_add_user_ajax" class="button"><?php _e('Add', "wd-instagram-feed"); ?></div>
568
+ <div id="wdi_feed_users">
569
+ <?php $this->display_feed_users($feed_row); ?>
570
+ </div>
571
+ <?php endif; ?>
572
+ <!-- END FEED USERS -->
573
+ <?php
574
+ if($element['tooltip'] && $element['tooltip']!=""){
575
+ echo "<p class='wdi_about_filed'>".$element['tooltip']."</p>";
576
+ }
577
+ ?>
578
+ </div>
579
+ </div>
580
+ <?php } ?>
581
+ </div>
582
+ <?php } ?>
583
+ </div>
584
+ </div>
585
+ <?php } ?>
586
+ </div><?php
587
+ }
588
+ ?>
589
+ </div>
590
+ </form>
591
+ </div>
592
+ </div>
593
+ <?php
594
+ }
595
+
596
+ private function buildField($element, $feed_row = '')
597
+ {
598
+ require_once(WDI_DIR . '/framework/WDI_form_builder.php');
599
+ $element['defaults'] = $this->model->wdi_get_feed_defaults();
600
+ $element['CONST'] = WDI_FSN;
601
+ $builder = new WDI_form_builder();
602
+ switch ($element['type']) {
603
+ case 'input': {
604
+ $builder->input($element, $feed_row);
605
+ break;
606
+ }
607
+ case 'select': {
608
+ $builder->select($element, $feed_row);
609
+ break;
610
+ }
611
+ case 'radio': {
612
+ $builder->radio($element, $feed_row);
613
+ break;
614
+ }
615
+ case 'checkbox': {
616
+ $builder->checkbox($element, $feed_row);
617
+ break;
618
+ }
619
+ case 'how_to_publish': {
620
+ $builder->how_to_publish($element, $feed_row);
621
+ break;
622
+ }
623
+ }
624
+ }
625
+
626
+
627
+ public function display_feed_users($feed_row){
628
+ global $wdi_options;
629
+
630
+ $users = isset($feed_row['feed_users']) ? $feed_row['feed_users'] : "";
631
+ $users = json_decode($users);
632
+
633
+ if ($users === null) {
634
+ $users = array();
635
+ }
636
+ $token = WDILibrary::get_user_access_token($users);
637
+ ?>
638
+ <script>
639
+ jQuery(document).ready(function ()
640
+ {
641
+ var users_list = JSON.parse(wdi_options.wdi_authenticated_users_list);
642
+ if (typeof users_list !== 'object') {
643
+ users_list = {};
644
+ }
645
+
646
+ var usersnames = [wdi_options.wdi_user_name];
647
+ for(var i in users_list){
648
+ usersnames.push(users_list[i].user_name);
649
+ }
650
+
651
+ wdi_controller.users_list = users_list;
652
+ wdi_controller.usersnames = usersnames;
653
+ wdi_controller.instagram = new WDIInstagram();
654
+ wdi_controller.feed_users = [];
655
+ wdi_controller.instagram.addToken(<?php echo '"' . $token . '"'; ?>);
656
+
657
+ wdi_controller.updateFeaturedImageSelect(<?php echo '"' . $wdi_options['wdi_user_name'] . '"'; ?>, 'add', 'selected');
658
+
659
+ <?php foreach ($users as $user) : ?>
660
+ wdi_controller.makeInstagramUserRequest(<?php echo '"' . $user->username . '"'?>, true);
661
+ <?php endforeach; ?>
662
+ });
663
+ </script>
664
+ <?php
665
+ }
666
+ }
 
 
 
 
 
 
 
 
admin/views/WDIViewLicensing_wdi.php CHANGED
@@ -1,151 +1,151 @@
1
- <?php
2
-
3
- class WDIViewLicensing_wdi {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $model;
14
-
15
-
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
- // Constructor & Destructor //
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- public function __construct($model) {
20
- $this->model = $model;
21
- }
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Public Methods //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- public function display() {
26
- ?>
27
-
28
- <div class="wrap">
29
-
30
- <div id="featurs_tables">
31
- <div id="featurs_table1">
32
- <span>WordPress 4.0+ <?php _e("ready", 'wd-instagram-feed'); ?></span>
33
-
34
- <span><?php _e("Responsive Design and Layout", 'wd-instagram-feed'); ?></span>
35
- <span><?php _e("SEO Friendly", 'wd-instagram-feed'); ?></span>
36
- <span><?php _e("Thumbnails layout", 'wd-instagram-feed'); ?></span>
37
- <span><?php _e("Image Browser layout", 'wd-instagram-feed'); ?></span>
38
- <span><?php _e("Lightbox", 'wd-instagram-feed'); ?></span>
39
- <span><?php _e("Load More Button / Classic Pagination", 'wd-instagram-feed'); ?></span>
40
- <span><?php _e("Image Sorting", 'wd-instagram-feed'); ?></span>
41
- <span><?php _e("Widget", 'wd-instagram-feed'); ?></span>
42
- <span><?php _e("Slideshow/Lightbox Effects", 'wd-instagram-feed'); ?></span>
43
-
44
-
45
- <span><?php _e("Conditional Filters", 'wd-instagram-feed'); ?></span>
46
- <span><?php _e("Feed based on liked media", 'wd-instagram-feed'); ?></span>
47
- <span><?php _e("Image On Hover Effects", 'wd-instagram-feed'); ?></span>
48
- <span><?php _e("Infinite Scroll Load More", 'wd-instagram-feed'); ?></span>
49
- <span><?php _e("Full Style Customization With Themes", 'wd-instagram-feed'); ?></span>
50
- <span><?php _e("Filmstrip", 'wd-instagram-feed'); ?></span>
51
- <span><?php _e("Instagram Comments in Lightbox", 'wd-instagram-feed'); ?></span>
52
- <span><?php _e("Blog Style layout", 'wd-instagram-feed'); ?></span>
53
- <span><?php _e("Masonry layout", 'wd-instagram-feed'); ?></span>
54
- <span><?php _e("Videos in BlogStyle, ImageBrowser and Lightbox", 'wd-instagram-feed'); ?></span>
55
- <span><?php _e("Social Share Buttons", 'wd-instagram-feed'); ?></span>
56
- <span><?php _e("Multiple User/Hashtag Feeds", 'wd-instagram-feed'); ?></span>
57
- <span><?php _e("Filtering Images Based on Users/Hashtags", 'wd-instagram-feed'); ?></span>
58
- <span><?php _e("Support / Updates", 'wd-instagram-feed'); ?></span>
59
- </div>
60
- <div id="featurs_table2">
61
- <span style="padding-top: 18px;height: 39px;"><?php _e("Free", 'wd-instagram-feed'); ?></span>
62
-
63
- <span class="yes"></span>
64
- <span class="yes"></span>
65
- <span class="yes"></span>
66
- <span class="yes"></span>
67
- <span class="yes"></span>
68
- <span class="yes"></span>
69
- <span class="yes"></span>
70
- <span class="yes"></span>
71
- <span class="yes"></span>
72
- <span>1</span>
73
- <span class="no"></span>
74
- <span class="no"></span>
75
- <span class="no"></span>
76
- <span class="no"></span>
77
- <span class="no"></span>
78
- <span class="no"></span>
79
- <span class="no"></span>
80
- <span class="no"></span>
81
- <span class="no"></span>
82
- <span class="no"></span>
83
- <span class="no"></span>
84
- <span class="no"></span>
85
- <span class="no"></span>
86
- <span> <?php _e('Only Bug Fixes',"wd-instagram-feed"); ?> </span>
87
- </div>
88
- <div id="featurs_table3">
89
- <span><?php _e("PREMIUM Version", 'wd-instagram-feed'); ?></span>
90
-
91
- <span class="yes"></span>
92
- <span class="yes"></span>
93
- <span class="yes"></span>
94
- <span class="yes"></span>
95
- <span class="yes"></span>
96
- <span class="yes"></span>
97
- <span class="yes"></span>
98
- <span class="yes"></span>
99
- <span class="yes"></span>
100
- <span>15</span>
101
- <span class="yes"></span>
102
- <span class="yes"></span>
103
- <span class="yes"></span>
104
- <span class="yes"></span>
105
- <span class="yes"></span>
106
- <span class="yes"></span>
107
- <span class="yes"></span>
108
- <span class="yes"></span>
109
- <span class="yes"></span>
110
- <span class="yes"></span>
111
- <span class="yes"></span>
112
- <span class="yes"></span>
113
- <span class="yes"></span>
114
- <span> <?php _e('Full Support',"wd-instagram-feed"); ?> </span>
115
- </div>
116
-
117
-
118
-
119
-
120
- </div>
121
-
122
- <div style="float: left; clear: both;">
123
- <p><?php _e("After purchasing the commercial version follow these steps:", 'wd-instagram-feed'); ?></p>
124
- <ol>
125
- <li><?php _e("Deactivate Instagram Feed plugin.", 'wd-instagram-feed'); ?></li>
126
- <li><?php _e("Delete Instagram Feed plugin.", 'wd-instagram-feed'); ?></li>
127
- <li><?php _e("Install the downloaded commercial version of the plugin.", 'wd-instagram-feed'); ?></li>
128
- </ol>
129
-
130
- <div class="wdi_hb_buy_pro">
131
- <a class="wdi_update_pro_link" target="_blank" href="https://10web.io/plugins/wordpress-instagram-feed/?utm_source=instagram_feed&utm_medium=free_plugin">
132
- <?php _e("UPGRADE TO PREMIUM VERSION", "wd-instagram-feed"); ?>
133
- </a>
134
- </div>
135
-
136
- </div>
137
-
138
-
139
- </div>
140
- <?php
141
- }
142
- ////////////////////////////////////////////////////////////////////////////////////////
143
- // Getters & Setters //
144
- ////////////////////////////////////////////////////////////////////////////////////////
145
- ////////////////////////////////////////////////////////////////////////////////////////
146
- // Private Methods //
147
- ////////////////////////////////////////////////////////////////////////////////////////
148
- ////////////////////////////////////////////////////////////////////////////////////////
149
- // Listeners //
150
- ////////////////////////////////////////////////////////////////////////////////////////
151
  }
1
+ <?php
2
+
3
+ class WDIViewLicensing_wdi {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ private $model;
14
+
15
+
16
+ ////////////////////////////////////////////////////////////////////////////////////////
17
+ // Constructor & Destructor //
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ public function __construct($model) {
20
+ $this->model = $model;
21
+ }
22
+ ////////////////////////////////////////////////////////////////////////////////////////
23
+ // Public Methods //
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+ public function display() {
26
+ ?>
27
+
28
+ <div class="wrap">
29
+
30
+ <div id="featurs_tables">
31
+ <div id="featurs_table1">
32
+ <span>WordPress 4.0+ <?php _e("ready", 'wd-instagram-feed'); ?></span>
33
+
34
+ <span><?php _e("Responsive Design and Layout", 'wd-instagram-feed'); ?></span>
35
+ <span><?php _e("SEO Friendly", 'wd-instagram-feed'); ?></span>
36
+ <span><?php _e("Thumbnails layout", 'wd-instagram-feed'); ?></span>
37
+ <span><?php _e("Image Browser layout", 'wd-instagram-feed'); ?></span>
38
+ <span><?php _e("Lightbox", 'wd-instagram-feed'); ?></span>
39
+ <span><?php _e("Load More Button / Classic Pagination", 'wd-instagram-feed'); ?></span>
40
+ <span><?php _e("Image Sorting", 'wd-instagram-feed'); ?></span>
41
+ <span><?php _e("Widget", 'wd-instagram-feed'); ?></span>
42
+ <span><?php _e("Slideshow/Lightbox Effects", 'wd-instagram-feed'); ?></span>
43
+
44
+
45
+ <span><?php _e("Conditional Filters", 'wd-instagram-feed'); ?></span>
46
+ <span><?php _e("Feed based on liked media", 'wd-instagram-feed'); ?></span>
47
+ <span><?php _e("Image On Hover Effects", 'wd-instagram-feed'); ?></span>
48
+ <span><?php _e("Infinite Scroll Load More", 'wd-instagram-feed'); ?></span>
49
+ <span><?php _e("Full Style Customization With Themes", 'wd-instagram-feed'); ?></span>
50
+ <span><?php _e("Filmstrip", 'wd-instagram-feed'); ?></span>
51
+ <span><?php _e("Instagram Comments in Lightbox", 'wd-instagram-feed'); ?></span>
52
+ <span><?php _e("Blog Style layout", 'wd-instagram-feed'); ?></span>
53
+ <span><?php _e("Masonry layout", 'wd-instagram-feed'); ?></span>
54
+ <span><?php _e("Videos in BlogStyle, ImageBrowser and Lightbox", 'wd-instagram-feed'); ?></span>
55
+ <span><?php _e("Social Share Buttons", 'wd-instagram-feed'); ?></span>
56
+ <span><?php _e("Multiple User/Hashtag Feeds", 'wd-instagram-feed'); ?></span>
57
+ <span><?php _e("Filtering Images Based on Users/Hashtags", 'wd-instagram-feed'); ?></span>
58
+ <span><?php _e("Support / Updates", 'wd-instagram-feed'); ?></span>
59
+ </div>
60
+ <div id="featurs_table2">
61
+ <span style="padding-top: 18px;height: 39px;"><?php _e("Free", 'wd-instagram-feed'); ?></span>
62
+
63
+ <span class="yes"></span>
64
+ <span class="yes"></span>
65
+ <span class="yes"></span>
66
+ <span class="yes"></span>
67
+ <span class="yes"></span>
68
+ <span class="yes"></span>
69
+ <span class="yes"></span>
70
+ <span class="yes"></span>
71
+ <span class="yes"></span>
72
+ <span>1</span>
73
+ <span class="no"></span>
74
+ <span class="no"></span>
75
+ <span class="no"></span>
76
+ <span class="no"></span>
77
+ <span class="no"></span>
78
+ <span class="no"></span>
79
+ <span class="no"></span>
80
+ <span class="no"></span>
81
+ <span class="no"></span>
82
+ <span class="no"></span>
83
+ <span class="no"></span>
84
+ <span class="no"></span>
85
+ <span class="no"></span>
86
+ <span> <?php _e('Only Bug Fixes',"wd-instagram-feed"); ?> </span>
87
+ </div>
88
+ <div id="featurs_table3">
89
+ <span><?php _e("PREMIUM Version", 'wd-instagram-feed'); ?></span>
90
+
91
+ <span class="yes"></span>
92
+ <span class="yes"></span>
93
+ <span class="yes"></span>
94
+ <span class="yes"></span>
95
+ <span class="yes"></span>
96
+ <span class="yes"></span>
97
+ <span class="yes"></span>
98
+ <span class="yes"></span>
99
+ <span class="yes"></span>
100
+ <span>15</span>
101
+ <span class="yes"></span>
102
+ <span class="yes"></span>
103
+ <span class="yes"></span>
104
+ <span class="yes"></span>
105
+ <span class="yes"></span>
106
+ <span class="yes"></span>
107
+ <span class="yes"></span>
108
+ <span class="yes"></span>
109
+ <span class="yes"></span>
110
+ <span class="yes"></span>
111
+ <span class="yes"></span>
112
+ <span class="yes"></span>
113
+ <span class="yes"></span>
114
+ <span> <?php _e('Full Support',"wd-instagram-feed"); ?> </span>
115
+ </div>
116
+
117
+
118
+
119
+
120
+ </div>
121
+
122
+ <div style="float: left; clear: both;">
123
+ <p><?php _e("After purchasing the commercial version follow these steps:", 'wd-instagram-feed'); ?></p>
124
+ <ol>
125
+ <li><?php _e("Deactivate Instagram Feed plugin.", 'wd-instagram-feed'); ?></li>
126
+ <li><?php _e("Delete Instagram Feed plugin.", 'wd-instagram-feed'); ?></li>
127
+ <li><?php _e("Install the downloaded commercial version of the plugin.", 'wd-instagram-feed'); ?></li>
128
+ </ol>
129
+
130
+ <div class="wdi_hb_buy_pro">
131
+ <a class="wdi_update_pro_link" target="_blank" href="https://10web.io/plugins/wordpress-instagram-feed/?utm_source=instagram_feed&utm_medium=free_plugin">
132
+ <?php _e("UPGRADE TO PREMIUM VERSION", "wd-instagram-feed"); ?>
133
+ </a>
134
+ </div>
135
+
136
+ </div>
137
+
138
+
139
+ </div>
140
+ <?php
141
+ }
142
+ ////////////////////////////////////////////////////////////////////////////////////////
143
+ // Getters & Setters //
144
+ ////////////////////////////////////////////////////////////////////////////////////////
145
+ ////////////////////////////////////////////////////////////////////////////////////////
146
+ // Private Methods //
147
+ ////////////////////////////////////////////////////////////////////////////////////////
148
+ ////////////////////////////////////////////////////////////////////////////////////////
149
+ // Listeners //
150
+ ////////////////////////////////////////////////////////////////////////////////////////
151
  }
admin/views/WDIViewSettings_wdi.php CHANGED
@@ -1,133 +1,134 @@
1
- <?php
2
- class WDIViewSettings_wdi{
3
-
4
- private $model;
5
-
6
- public function __construct($model){
7
- $this->model = $model;
8
- }
9
-
10
- public function display(){
11
- global $wdi_options;
12
- require_once(WDI_DIR . '/framework/WDI_admin_view.php');
13
- $access_token = WDILibrary::get('access_token', '');
14
- if( !empty($access_token) ) {
15
- /*dismiss api update notice*/
16
- $admin_notices_option = get_option('wdi_admin_notice', array());
17
- $admin_notices_option['api_update_token_reset'] = array(
18
- 'start' => current_time("n/j/Y"),
19
- 'int' => 0,
20
- 'dismissed' => 1,
21
- );
22
- update_option('wdi_admin_notice', $admin_notices_option);
23
- ?>
24
- <script>
25
- wdi_controller.instagram = new WDIInstagram();
26
- if(wdi_controller.getCookie('wdi_autofill') != 'false'){
27
- wdi_controller.apiRedirected();
28
- document.cookie = "wdi_autofill=false";
29
- jQuery(document).ready(function(){
30
- jQuery(document).on('wdi_settings_filled',function(){
31
- jQuery('#submit').trigger('click');
32
- })
33
- });
34
- }
35
- </script>
36
- <?php
37
- }
38
- WDILibrary::topbar();
39
- ?>
40
- <div class="wrap">
41
-
42
- <h1 id="settings_wdi_title"><?php _e('Instagram Settings', "wd-instagram-feed"); ?></h1>
43
- <form method="post" action="options.php" class="wdi_settings_form">
44
- <input type="hidden"id="wdi_user_id" name="<?php echo WDI_OPT.'[wdi_user_id]' ?>">
45
- <?php settings_fields('wdi_all_settings'); ?>
46
- <?php do_settings_sections('settings_wdi'); ?>
47
- <div id="wdi_options_page_buttons_wrapper">
48
- <div id="wdi_reset_access_token" class="button button-secondary"><?php _e("Reset Primary Access Token", "wd-instagram-feed") ?></div>
49
- <?php submit_button(); ?>
50
- </div>
51
- </form>
52
- <style>
53
- <?php if((!isset($wdi_options['wdi_access_token']) || empty($wdi_options['wdi_access_token'])) && empty($wdi_options['fb_token'])){ ?>
54
- body.instagram-feed_page_wdi_settings table:nth-of-type(2) {
55
- display: none;
56
- }
57
-
58
- body.toplevel_page_wdi_settings table:nth-of-type(2) {
59
- display: none;
60
- }
61
-
62
- body.instagram-feed_page_wdi_settings table:nth-of-type(3) {
63
- display: none;
64
- }
65
-
66
- body.toplevel_page_wdi_settings table:nth-of-type(3) {
67
- display: none;
68
- }
69
-
70
- <?php } ?>
71
- </style>
72
- <script>
73
- jQuery(document).ready(function(){
74
-
75
- jQuery(".wdi_settings_form").submit(function () {
76
- jQuery.ajax({
77
- type: "POST",
78
- url: wdi_ajax.ajax_url,
79
- dataType:"json",
80
- data: {
81
- wdi_nonce:wdi_ajax.wdi_nonce,
82
- action:"wdi_set_reset_cache"
83
- },
84
- success: function(data){
85
-
86
- }
87
- });
88
- });
89
-
90
- jQuery('#wdi_reset_access_token').on('click',function(){
91
- if(confirm("<?php _e('Are you sure that you want to reset access token and username, after resetting it you will need to log in with Instagram again for using plugin','wd-instagram-feed')?>")){
92
- jQuery.ajax({
93
- type: "POST",
94
- url: wdi_ajax.ajax_url,
95
- dataType:"json",
96
- data: {
97
- wdi_nonce:wdi_ajax.wdi_nonce,
98
- action:"wdi_set_reset_cache"
99
- },
100
- success: function(data){
101
-
102
- }
103
- });
104
-
105
-
106
- jQuery('#wdi_access_token').attr('value','');
107
- jQuery('#wdi_user_name').attr('value','');
108
- jQuery('#business_account_id').attr('value', '');
109
- jQuery('#fb_token').attr('value', '');
110
- document.cookie = "wdi_autofill=false";
111
- <?php if(get_option("wdi_token_error_flag") === "1"):?>
112
- jQuery.ajax({
113
- type: "POST",
114
- url: "<?php echo admin_url('admin-ajax.php');?>",
115
- dataType: 'json',
116
- data: {
117
- action: "wdi_delete_token_flag",
118
- wdi_token_flag_nonce: "<?php echo wp_create_nonce('');?>",
119
- },
120
- success: function(data){
121
-
122
- }
123
- });
124
- <?php endif; ?>
125
- jQuery(this).parent().parent().find('#submit').trigger('click');
126
- }
127
- });
128
- });
129
- </script>
130
- </div>
131
- <?php
132
- }
 
133
  }
1
+ <?php
2
+ class WDIViewSettings_wdi {
3
+
4
+ private $model;
5
+
6
+ public function __construct($model) {
7
+ $this->model = $model;
8
+ }
9
+
10
+ public function display(){
11
+ global $wdi_options;
12
+ require_once(WDI_DIR . '/framework/WDI_admin_view.php');
13
+ $access_token = WDILibrary::get('wdi_access_token', '');
14
+ if( !empty($access_token) ) {
15
+ /*dismiss api update notice*/
16
+ $admin_notices_option = get_option('wdi_admin_notice', array());
17
+ $admin_notices_option['api_update_token_reset'] = array(
18
+ 'start' => current_time("n/j/Y"),
19
+ 'int' => 0,
20
+ 'dismissed' => 1,
21
+ );
22
+ update_option('wdi_admin_notice', $admin_notices_option);
23
+ ?>
24
+ <script>
25
+ wdi_controller.instagram = new WDIInstagram();
26
+ if (wdi_controller.getCookie('wdi_autofill') != 'false') {
27
+ wdi_controller.apiRedirected();
28
+ document.cookie = "wdi_autofill=false";
29
+ jQuery(document).ready(function ()
30
+ {
31
+ jQuery(document).on('wdi_settings_filled', function ()
32
+ {
33
+ jQuery('#submit').trigger('click');
34
+ })
35
+ });
36
+ }
37
+ </script>
38
+ <?php
39
+ }
40
+ WDILibrary::topbar();
41
+ ?>
42
+
43
+
44
+ <h1 id="settings_wdi_title"><?php _e('Settings', "wd-instagram-feed"); ?></h1>
45
+ <form method="post" action="options.php" class="wdi_settings_form">
46
+ <input type="hidden" id="wdi_reset_access_token_input" name="wdi_reset_access_token_input" value="0">
47
+ <input type="hidden" id="wdi_user_id" name="<?php echo WDI_OPT . '[wdi_user_id]' ?>" value="<?php echo !empty($wdi_options['wdi_user_id']) ? $wdi_options['wdi_user_id'] : ''; ?>">
48
+ <?php settings_fields('wdi_all_settings'); ?>
49
+ <?php do_settings_sections('settings_wdi'); ?>
50
+ <div id="wdi_options_page_buttons_wrapper">
51
+ <div id="wdi_reset_access_token_button" class="button button-secondary"><?php _e("Reset Primary Access Token", "wd-instagram-feed") ?></div>
52
+ <?php submit_button(); ?>
53
+ </div>
54
+ </form>
55
+ <style>
56
+ <?php if((!isset($wdi_options['wdi_access_token']) || empty($wdi_options['wdi_access_token'])) && empty($wdi_options['fb_token'])){ ?>
57
+ body.instagram-feed_page_wdi_settings table:nth-of-type(2){
58
+ display:none;
59
+ }
60
+ body.toplevel_page_wdi_settings table:nth-of-type(2){
61
+ display:none;
62
+ }
63
+
64
+ body.instagram-feed_page_wdi_settings table:nth-of-type(3){
65
+ display:none;
66
+ }
67
+ body.toplevel_page_wdi_settings table:nth-of-type(3){
68
+ display:none;
69
+ }
70
+ <?php } ?>
71
+ </style>
72
+ <script>
73
+ jQuery(document).ready(function ()
74
+ {
75
+ jQuery(".wdi_settings_form").submit(function () {
76
+ jQuery.ajax({
77
+ type: "POST",
78
+ url: wdi_ajax.ajax_url,
79
+ dataType:"json",
80
+ data: {
81
+ wdi_nonce:wdi_ajax.wdi_nonce,
82
+ action:"wdi_set_reset_cache"
83
+ },
84
+ success: function(data){
85
+
86
+ }
87
+ });
88
+ });
89
+
90
+ jQuery('#wdi_reset_access_token_button').on('click', function ()
91
+ {
92
+ if (confirm("<?php _e('Are you sure that you want to reset access token and username, after resetting it you will need to log in with Instagram again for using plugin', 'wd-instagram-feed')?>")) {
93
+ jQuery.ajax({
94
+ type: "POST",
95
+ url: wdi_ajax.ajax_url,
96
+ dataType:"json",
97
+ data: {
98
+ wdi_nonce:wdi_ajax.wdi_nonce,
99
+ action:"wdi_set_reset_cache"
100
+ },
101
+ success: function(data){
102
+
103
+ }
104
+ });
105
+
106
+ jQuery('#wdi_reset_access_token_input').attr('value', '1');
107
+ jQuery('#wdi_user_id').attr('value', '');
108
+ jQuery('#wdi_user_name').attr('value', '');
109
+ jQuery('#wdi_access_token').attr('value', '');
110
+ jQuery('#business_account_id').attr('value', '');
111
+ jQuery('#fb_token').attr('value', '');
112
+ document.cookie = "wdi_autofill=false";
113
+ <?php if(get_option("wdi_token_error_flag") === "1"): ?>
114
+ jQuery.ajax({
115
+ type: "POST",
116
+ url: "<?php echo admin_url('admin-ajax.php');?>",
117
+ dataType: 'json',
118
+ data: {
119
+ action: "wdi_delete_token_flag",
120
+ wdi_token_flag_nonce: "<?php echo wp_create_nonce('');?>",
121
+ },
122
+ success: function(data){
123
+
124
+ }
125
+ });
126
+ <?php endif; ?>
127
+ jQuery(this).parent().parent().find('#submit').trigger('click');
128
+ }
129
+ });
130
+ });
131
+ </script>
132
+ <?php
133
+ }
134
  }
admin/views/WDIViewThemes_wdi.php CHANGED
@@ -1,42 +1,42 @@
1
- <?php
2
-
3
- class WDIViewThemes_wdi {
4
-
5
- private $model;
6
-
7
- public function __construct($model) {
8
- $this->model = $model;
9
- }
10
-
11
- public function display() {
12
- WDILibrary::topbar();
13
- ?>
14
- <div class="wrap">
15
- <div class="wdi_pro_notice"> <?php _e("This is free version, Customizing themes is available only in premium version","wd-instagram-feed"); ?> </div>
16
- <?php
17
- $this->buildFreeThemeDemo();
18
- ?>
19
- </div>
20
- <?php
21
- }
22
-
23
- public function buildFreeThemeDemo(){
24
- ?>
25
- <div class="wdi_demo_img" demo-tab="general"><img src="<?php echo WDI_URL . '/demo_images/1.png'; ?>" alt=""></div>
26
- <div class="wdi_demo_img" demo-tab="header"><img src="<?php echo WDI_URL . '/demo_images/2.png'; ?>" alt=""></div>
27
- <div class="wdi_demo_img" demo-tab="load_more"><img src="<?php echo WDI_URL . '/demo_images/3.png'; ?>" alt=""></div>
28
- <div class="wdi_demo_img" demo-tab="thumbnails"><img src="<?php echo WDI_URL . '/demo_images/4.png'; ?>" alt=""></div>
29
- <div class="wdi_demo_img" demo-tab="masonry"><img src="<?php echo WDI_URL . '/demo_images/5.png'; ?>" alt=""></div>
30
- <div class="wdi_demo_img" demo-tab="blog_style"><img src="<?php echo WDI_URL . '/demo_images/6.png'; ?>" alt=""></div>
31
- <div class="wdi_demo_img" demo-tab="image_browser"><img src="<?php echo WDI_URL . '/demo_images/7.png'; ?>" alt=""></div>
32
- <div class="wdi_demo_img" demo-tab="image_browser"><img src="<?php echo WDI_URL . '/demo_images/8.png'; ?>" alt=""></div>
33
- <div class="wdi_demo_img" demo-tab="lb_general"><img src="<?php echo WDI_URL . '/demo_images/l1.png'; ?>" alt=""></div>
34
- <div class="wdi_demo_img" demo-tab="lb_ctrl_btns"><img src="<?php echo WDI_URL . '/demo_images/l2.png'; ?>" alt=""></div>
35
- <div class="wdi_demo_img" demo-tab="lb_close_btn"><img src="<?php echo WDI_URL . '/demo_images/l3.png'; ?>" alt=""></div>
36
- <div class="wdi_demo_img" demo-tab="lb_nav_btns"><img src="<?php echo WDI_URL . '/demo_images/l4.png'; ?>" alt=""></div>
37
- <div class="wdi_demo_img" demo-tab="lb_filmstrip"><img src="<?php echo WDI_URL . '/demo_images/l5.png'; ?>" alt=""></div>
38
- <div class="wdi_demo_img" demo-tab="lb_info"><img src="<?php echo WDI_URL . '/demo_images/l6.png'; ?>" alt=""></div>
39
- <div class="wdi_demo_img" demo-tab="lb_comments"><img src="<?php echo WDI_URL . '/demo_images/l7.png'; ?>" alt=""></div>
40
- <?php
41
- }
42
  }
1
+ <?php
2
+
3
+ class WDIViewThemes_wdi {
4
+
5
+ private $model;
6
+
7
+ public function __construct($model) {
8
+ $this->model = $model;
9
+ }
10
+
11
+ public function display() {
12
+ WDILibrary::topbar();
13
+ ?>
14
+ <div class="wrap">
15
+ <div class="wdi_pro_notice"> <?php _e("This is free version, Customizing themes is available only in premium version","wd-instagram-feed"); ?> </div>
16
+ <?php
17
+ $this->buildFreeThemeDemo();
18
+ ?>
19
+ </div>
20
+ <?php
21
+ }
22
+
23
+ public function buildFreeThemeDemo(){
24
+ ?>
25
+ <div class="wdi_demo_img" demo-tab="general"><img src="<?php echo WDI_URL . '/demo_images/1.png'; ?>" alt=""></div>
26
+ <div class="wdi_demo_img" demo-tab="header"><img src="<?php echo WDI_URL . '/demo_images/2.png'; ?>" alt=""></div>
27
+ <div class="wdi_demo_img" demo-tab="load_more"><img src="<?php echo WDI_URL . '/demo_images/3.png'; ?>" alt=""></div>
28
+ <div class="wdi_demo_img" demo-tab="thumbnails"><img src="<?php echo WDI_URL . '/demo_images/4.png'; ?>" alt=""></div>
29
+ <div class="wdi_demo_img" demo-tab="masonry"><img src="<?php echo WDI_URL . '/demo_images/5.png'; ?>" alt=""></div>
30
+ <div class="wdi_demo_img" demo-tab="blog_style"><img src="<?php echo WDI_URL . '/demo_images/6.png'; ?>" alt=""></div>
31
+ <div class="wdi_demo_img" demo-tab="image_browser"><img src="<?php echo WDI_URL . '/demo_images/7.png'; ?>" alt=""></div>
32
+ <div class="wdi_demo_img" demo-tab="image_browser"><img src="<?php echo WDI_URL . '/demo_images/8.png'; ?>" alt=""></div>
33
+ <div class="wdi_demo_img" demo-tab="lb_general"><img src="<?php echo WDI_URL . '/demo_images/l1.png'; ?>" alt=""></div>
34
+ <div class="wdi_demo_img" demo-tab="lb_ctrl_btns"><img src="<?php echo WDI_URL . '/demo_images/l2.png'; ?>" alt=""></div>
35
+ <div class="wdi_demo_img" demo-tab="lb_close_btn"><img src="<?php echo WDI_URL . '/demo_images/l3.png'; ?>" alt=""></div>
36
+ <div class="wdi_demo_img" demo-tab="lb_nav_btns"><img src="<?php echo WDI_URL . '/demo_images/l4.png'; ?>" alt=""></div>
37
+ <div class="wdi_demo_img" demo-tab="lb_filmstrip"><img src="<?php echo WDI_URL . '/demo_images/l5.png'; ?>" alt=""></div>
38
+ <div class="wdi_demo_img" demo-tab="lb_info"><img src="<?php echo WDI_URL . '/demo_images/l6.png'; ?>" alt=""></div>
39
+ <div class="wdi_demo_img" demo-tab="lb_comments"><img src="<?php echo WDI_URL . '/demo_images/l7.png'; ?>" alt=""></div>
40
+ <?php
41
+ }
42
  }
admin/views/WDIViewUninstall_wdi.php CHANGED
@@ -1,139 +1,133 @@
1
- <?php
2
-
3
- class WDIViewUninstall_wdi
4
- {
5
- ////////////////////////////////////////////////////////////////////////////////////////
6
- // Variables //
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- private $model;
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- // Constructor and Destructor //
11
- ////////////////////////////////////////////////////////////////////////////////////////
12
- public function __construct($model)
13
- {
14
- $this->model = $model;
15
- }
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
- // Public Methods //
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- public function display()
20
- {
21
- global $wpdb;
22
- ?>
23
-
24
- <span class="uninstall-icon"></span>
25
- <h2 class="wdi_page_title">
26
- <?php _e('Uninstalling Instagram Feed', "wd-instagram-feed"); ?>
27
- </h2>
28
- <p
29
- style="color:red;font-size:15px"> <?php _e('Deactivating Instagram Feed plugin does not remove any data that may have been created. To completely remove this plugin, you can uninstall it here.', 'wd-instagram-feed') ?>
30
- <br>
31
- <?php _e('WARNING: Once uninstalled, this can\'t be undone. You should use a Database Backup plugin of WordPress to back up all the data first.', 'wd-instagram-feed') ?>
32
- </p>
33
- <p
34
- style="color:red;margin-top:10px;font-size:13px;"> <?php _e('The following Database Tables will be deleted:', 'wd-instagram-feed') ?> </p>
35
- <div style="background-color:white;border:1px solid #888888">
36
- <ul style="background-color:white;margin:0">
37
- <p style="background-color:#F3EFEF;margin: 0;border-bottom: 1px solid #888888;padding:2px;font-size:20px;">
38
- Database Tables</p>
39
- <li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">
40
- 1) <?php echo $wpdb->prefix . WDI_FEED_TABLE ?></li>
41
- <li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">
42
- 2) <?php echo $wpdb->prefix . WDI_THEME_TABLE ?></li>
43
- <p
44
- style="background-color:#F3EFEF;margin: 0;border-top: 1px solid #888888;border-bottom: 1px solid #888888;padding:2px;font-size:20px;">
45
- Options From <?php echo $wpdb->prefix, 'options' ?></p>
46
- <li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">3) wdi_user_name</li>
47
- <li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">4) wdi_access_token</li>
48
- <li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">6) wdi_custom_js</li>
49
- <li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">7) wdi_custom_css</li>
50
- <li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">8) wdi_feeds_min_capability</li>
51
- </ul>
52
- </div>
53
-
54
- <form action="admin.php?page=wdi_uninstall" id="wdi_uninstall_form" method="post">
55
- <?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
56
- <input type="hidden" name="task" value="uninstall">
57
- <div style="text-align:center">
58
- <p style="margin:0;font-size:15px;"><?php _e('Are you sure you want to uninstall plugin?', 'wd-instagram-feed') ?></p>
59
- <input type="checkbox" style="text-align: center;" id="wdi_verify" name="wdi_verify" value="1">
60
- <label for="wdi_verify" style="vertical-align:top">Yes</label>
61
- <br>
62
-
63
- <div id="wdi_submit" style="text-align:center;margin-top:10px" class="button button-primary">Uninstall</div>
64
- </div>
65
-
66
-
67
- </form>
68
- <script>
69
- jQuery(document).ready(function ()
70
- {
71
- jQuery('#wdi_submit').on('click', function ()
72
- {
73
- if (confirm("<?php _e('Are you sure you want to uninstall plugin?', 'wd-instagram-feed') ?>")) {
74
- jQuery('#wdi_uninstall_form').submit();
75
- }
76
- });
77
- });
78
- </script>
79
- <?php
80
- }
81
-
82
- public function already_uninstalled()
83
- {
84
- $deactivate_url = wp_nonce_url('plugins.php?action=deactivate&amp;plugin=wd-instagram-feed/wd-instagram-feed.php', 'deactivate-plugin_wd-instagram-feed/wd-instagram-feed.php');
85
- ?>
86
- <span class="uninstall-icon"></span>
87
- <h2>
88
- <?php _e('Uninstalling Instagram Feed', "wd-instagram-feed"); ?>
89
- </h2>
90
- <!--<p style="color:green;font-size:15px"> <?php /*_e('Instagram Feed WD is uninstalled','wd-instagram-feed') */
91
- ?><a style="text-decoration:none;padding:3px;" href="<?php /*echo $deactivate_url */
92
- ?>"> <?php /*_e('Click Here') */
93
- ?> </a><?php /*_e('to deactivate it','wd-instagram-feed') */
94
- ?></p>-->
95
- <p><strong><a href="#" class="wdi_deactivate_link"
96
- data-uninstall="1"><?php _e("Click Here", "wd-instagram-feed"); ?></a><?php _e(" To Finish the Uninstallation and Instagram Feed will be Deactivated Automatically.", "wd-instagram-feed"); ?>
97
- </strong></p>
98
-
99
- <?php
100
- }
101
-
102
- public function successfully_uninstalled()
103
- {
104
- global $wpdb;
105
- $deactivate_url = wp_nonce_url('plugins.php?action=deactivate&amp;plugin=wd-instagram-feed/wd-instagram-feed.php', 'deactivate-plugin_wd-instagram-feed/wd-instagram-feed.php');
106
- ?>
107
- <span class="uninstall-icon"></span>
108
- <h2>
109
- <?php _e('Uninstalling Instagram Feed', "wd-instagram-feed"); ?>
110
- </h2>
111
- <p
112
- style="color:green;margin-top:10px;font-size:13px;"> <?php _e('The following Database Tables has been successfully deleted:', 'wd-instagram-feed') ?> </p>
113
- <div style="background-color:white;border:1px solid #888888">
114
- <ul style="background-color:white;margin:0">
115
- <p style="background-color:#F3EFEF;margin: 0;border-bottom: 1px solid #888888;padding:2px;font-size:20px;">
116
- Database Tables</p>
117
- <li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">
118
- 1)<?php echo $wpdb->prefix . WDI_FEED_TABLE ?></li>
119
- <li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">
120
- 2)<?php echo $wpdb->prefix . WDI_THEME_TABLE ?></li>
121
- <p
122
- style="background-color:#F3EFEF;margin: 0;border-top: 1px solid #888888;border-bottom: 1px solid #888888;padding:2px;font-size:20px;">
123
- Options From <?php echo $wpdb->prefix, 'options' ?></p>
124
- <li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">3)wdi_user_name</li>
125
- <li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">4)wdi_access_token</li>
126
- </ul>
127
- </div>
128
- <!--<p style="color:green;font-size:15px"> <?php /*_e('Instagram Feed WD is successfully uninstalled','wd-instagram-feed') */
129
- ?><a style="text-decoration:none;padding:3px;" href="<?php /*echo $deactivate_url */
130
- ?>"> <?php /*_e('Click Here') */
131
- ?> </a><?php /*_e('to deactivate it','wd-instagram-feed') */
132
- ?></p>-->
133
- <p><strong><a href="#" class="wdi_deactivate_link"
134
- data-uninstall="1"><?php _e("Click Here", "wd-instagram-feed"); ?></a><?php _e(" To Finish the Uninstallation and Instagram Feed will be Deactivated Automatically.", "wd-instagram-feed"); ?>
135
- </strong></p>
136
-
137
- <?php
138
- }
139
  }
1
+ <?php
2
+
3
+ class WDIViewUninstall_wdi
4
+ {
5
+
6
+ private $model;
7
+
8
+ public function __construct($model)
9
+ {
10
+ $this->model = $model;
11
+ }
12
+
13
+ public function display()
14
+ {
15
+ global $wpdb;
16
+ ?>
17
+
18
+ <span class="uninstall-icon"></span>
19
+ <h2 class="wdi_page_title">
20
+ <?php _e('Uninstalling Instagram Feed', "wd-instagram-feed"); ?>
21
+ </h2>
22
+ <p
23
+ style="color:red;font-size:15px"> <?php _e('Deactivating Instagram Feed plugin does not remove any data that may have been created. To completely remove this plugin, you can uninstall it here.', 'wd-instagram-feed') ?>
24
+ <br>
25
+ <?php _e('WARNING: Once uninstalled, this can\'t be undone. You should use a Database Backup plugin of WordPress to back up all the data first.', 'wd-instagram-feed') ?>
26
+ </p>
27
+ <p
28
+ style="color:red;margin-top:10px;font-size:13px;"> <?php _e('The following Database Tables will be deleted:', 'wd-instagram-feed') ?> </p>
29
+ <div style="background-color:white;border:1px solid #888888">
30
+ <ul style="background-color:white;margin:0">
31
+ <p style="background-color:#F3EFEF;margin: 0;border-bottom: 1px solid #888888;padding:2px;font-size:20px;">
32
+ Database Tables</p>
33
+ <li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">
34
+ 1) <?php echo $wpdb->prefix . WDI_FEED_TABLE ?></li>
35
+ <li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">
36
+ 2) <?php echo $wpdb->prefix . WDI_THEME_TABLE ?></li>
37
+ <p
38
+ style="background-color:#F3EFEF;margin: 0;border-top: 1px solid #888888;border-bottom: 1px solid #888888;padding:2px;font-size:20px;">
39
+ Options From <?php echo $wpdb->prefix, 'options' ?></p>
40
+ <li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">3) wdi_user_name</li>
41
+ <li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">4) wdi_access_token</li>
42
+ <li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">6) wdi_custom_js</li>
43
+ <li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">7) wdi_custom_css</li>
44
+ <li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">8) wdi_feeds_min_capability</li>
45
+ </ul>
46
+ </div>
47
+
48
+ <form action="admin.php?page=wdi_uninstall" id="wdi_uninstall_form" method="post">
49
+ <?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
50
+ <input type="hidden" name="task" value="uninstall">
51
+ <div style="text-align:center">
52
+ <p style="margin:0;font-size:15px;"><?php _e('Are you sure you want to uninstall plugin?', 'wd-instagram-feed') ?></p>
53
+ <input type="checkbox" style="text-align: center;" id="wdi_verify" name="wdi_verify" value="1">
54
+ <label for="wdi_verify" style="vertical-align:top">Yes</label>
55
+ <br>
56
+
57
+ <div id="wdi_submit" style="text-align:center;margin-top:10px" class="button button-primary">Uninstall</div>
58
+ </div>
59
+
60
+
61
+ </form>
62
+ <script>
63
+ jQuery(document).ready(function ()
64
+ {
65
+ jQuery('#wdi_submit').on('click', function ()
66
+ {
67
+ if (confirm("<?php _e('Are you sure you want to uninstall plugin?', 'wd-instagram-feed') ?>")) {
68
+ jQuery('#wdi_uninstall_form').submit();
69
+ }
70
+ });
71
+ });
72
+ </script>
73
+ <?php
74
+ }
75
+
76
+ public function already_uninstalled()
77
+ {
78
+ $deactivate_url = wp_nonce_url('plugins.php?action=deactivate&amp;plugin=wd-instagram-feed/wd-instagram-feed.php', 'deactivate-plugin_wd-instagram-feed/wd-instagram-feed.php');
79
+ ?>
80
+ <span class="uninstall-icon"></span>
81
+ <h2>
82
+ <?php _e('Uninstalling Instagram Feed', "wd-instagram-feed"); ?>
83
+ </h2>
84
+ <!--<p style="color:green;font-size:15px"> <?php /*_e('Instagram Feed WD is uninstalled','wd-instagram-feed') */
85
+ ?><a style="text-decoration:none;padding:3px;" href="<?php /*echo $deactivate_url */
86
+ ?>"> <?php /*_e('Click Here') */
87
+ ?> </a><?php /*_e('to deactivate it','wd-instagram-feed') */
88
+ ?></p>-->
89
+ <p><strong><a href="<?php echo $deactivate_url ?>" class="wdi_deactivate_link"
90
+ data-uninstall="1"><?php _e("Click Here", "wd-instagram-feed"); ?></a><?php _e(" To Finish the Uninstallation and Instagram Feed will be Deactivated Automatically.", "wd-instagram-feed"); ?>
91
+ </strong></p>
92
+
93
+ <?php
94
+ }
95
+
96
+ public function successfully_uninstalled()
97
+ {
98
+ global $wpdb;
99
+ $deactivate_url = wp_nonce_url('plugins.php?action=deactivate&amp;plugin=wd-instagram-feed/wd-instagram-feed.php', 'deactivate-plugin_wd-instagram-feed/wd-instagram-feed.php');
100
+ ?>
101
+ <span class="uninstall-icon"></span>
102
+ <h2>
103
+ <?php _e('Uninstalling Instagram Feed', "wd-instagram-feed"); ?>
104
+ </h2>
105
+ <p
106
+ style="color:green;margin-top:10px;font-size:13px;"> <?php _e('The following Database Tables has been successfully deleted:', 'wd-instagram-feed') ?> </p>
107
+ <div style="background-color:white;border:1px solid #888888">
108
+ <ul style="background-color:white;margin:0">
109
+ <p style="background-color:#F3EFEF;margin: 0;border-bottom: 1px solid #888888;padding:2px;font-size:20px;">
110
+ Database Tables</p>
111
+ <li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">
112
+ 1)<?php echo $wpdb->prefix . WDI_FEED_TABLE ?></li>
113
+ <li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">
114
+ 2)<?php echo $wpdb->prefix . WDI_THEME_TABLE ?></li>
115
+ <p
116
+ style="background-color:#F3EFEF;margin: 0;border-top: 1px solid #888888;border-bottom: 1px solid #888888;padding:2px;font-size:20px;">
117
+ Options From <?php echo $wpdb->prefix, 'options' ?></p>
118
+ <li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">3)wdi_user_name</li>
119
+ <li style="padding-bottom:5px;padding-left:5px;font-weight: bold;margin:0;">4)wdi_access_token</li>
120
+ </ul>
121
+ </div>
122
+ <!--<p style="color:green;font-size:15px"> <?php /*_e('Instagram Feed WD is successfully uninstalled','wd-instagram-feed') */
123
+ ?><a style="text-decoration:none;padding:3px;" href="<?php /*echo $deactivate_url */
124
+ ?>"> <?php /*_e('Click Here') */
125
+ ?> </a><?php /*_e('to deactivate it','wd-instagram-feed') */
126
+ ?></p>-->
127
+ <p><strong><a href="<?php echo $deactivate_url; ?>" class="wdi_deactivate_link"
128
+ data-uninstall="1"><?php _e("Click Here", "wd-instagram-feed"); ?></a><?php _e(" To Finish the Uninstallation and Instagram Feed will be Deactivated Automatically.", "wd-instagram-feed"); ?>
129
+ </strong></p>
130
+
131
+ <?php
132
+ }
 
 
 
 
 
 
133
  }
admin/views/WDIViewWidget.php CHANGED
@@ -1,147 +1,123 @@
1
- <?php
2
-
3
- class WDIViewWidget {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
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
-
25
- public function display() {
26
- }
27
-
28
- function widget($args, $instance) {
29
- extract($args);
30
- $title = (isset($instance['title']) ? $instance['title'] : "");
31
- $feed_id = (isset($instance['feed_id']) ? $instance['feed_id'] : 0);
32
- $img_number = (isset($instance['img_number']) ? $instance['img_number'] : 4);
33
- $show_likes_comments = (isset($instance['show_likes_comments']) ? $instance['show_likes_comments'] : 0);
34
- $number_of_columns = (isset($instance['number_of_columns']) ? $instance['number_of_columns'] : 1);
35
- $enable_loading_buttons = (isset($instance['enable_loading_buttons']) ? $instance['enable_loading_buttons'] : 0);
36
- // Before widget.
37
- echo $before_widget;
38
- // Title of widget.
39
- if ($title) {
40
- echo $before_title . $title . $after_title;
41
- }
42
- // Widget output.
43
- $widget_params = array(
44
- 'widget' => true,
45
- 'widget_image_num' => $img_number,
46
- 'widget_show_likes_and_comments' => $show_likes_comments,
47
- 'number_of_columns'=>$number_of_columns,
48
- 'enable_loading_buttons' => $enable_loading_buttons,
49
- );
50
- echo wdi_feed(array('id'=>$feed_id),$widget_params);
51
-
52
- // After widget.
53
- echo $after_widget;
54
- }
55
-
56
- // Widget Control Panel.
57
- function form($instance,
58
- $id_title, $name_title,
59
- $id_feed_id, $name_feed_id,
60
- $id_img_number, $name_img_number,
61
- $id_show_likes_comments, $name_show_likes_comments,
62
- $id_number_of_columns,$name_number_of_columns,
63
- $id_enable_loading_buttons, $name_enable_loading_buttons) {
64
- $defaults = array(
65
- 'title' => 'Instagram Feed',
66
- 'feed_id' => 1,
67
- 'img_number' => 4,
68
- 'show_likes_comments' => 0,
69
- 'number_of_columns' => 1,
70
- 'enable_loading_buttons' => 0
71
- );
72
- require_once(WDI_DIR . '/framework/WDILibrary.php');
73
- $feeds = WDILibrary::objectToArray($this->model->get_feeds());
74
- $instance = wp_parse_args((array) $instance, $defaults);
75
- ?>
76
-
77
- <p>
78
- <label for="<?php echo $id_title; ?>"><?php _e("Title", 'wd-instagram-feed'); ?></label>
79
- <input class="widefat" id="<?php echo $id_title; ?>" name="<?php echo $name_title; ?>" type="text" value="<?php echo $instance['title']; ?>"/>
80
- </p>
81
- <p>
82
- <label for="<?php echo $id_feed_id; ?>"><?php _e("Feed", 'wd-instagram-feed'); ?></label>
83
- <select onchange="wdi_toggle(jQuery(this));" class="widefat" id="<?php echo $id_feed_id; ?>" name="<?php echo $name_feed_id; ?>">
84
- <?php foreach ($feeds as $feed) {
85
- ?>
86
- <option <?php if($instance['feed_id'] == $feed['id']) echo 'selected'?> value="<?php echo $feed['id'];?>"><?php echo $feed['feed_name'];?></option>
87
- <?php
88
- }?>
89
- </select>
90
- </p>
91
-
92
- <p class="wdi_number_of_columns">
93
- <label for="<?php echo $id_number_of_columns; ?>"><?php _e("Number of columns", 'wd-instagram-feed'); ?></label>
94
- <select class="widefat" id="<?php echo $id_number_of_columns; ?>" name="<?php echo $name_number_of_columns; ?>" >
95
- <?php for ($k = 1 ;$k <= 10; $k++) {
96
- ?>
97
- <option <?php if($instance['number_of_columns'] == $k) echo 'selected'?> value="<?php echo $k?>"><?php echo $k;?></option>
98
- <?php
99
- }?>
100
- </select>
101
- </p>
102
-
103
-
104
- <p>
105
- <label for="<?php echo $id_img_number; ?>"><?php _e("Number of images to show", 'wd-instagram-feed'); ?></label>
106
- <input class="widefat" id="<?php echo $id_img_number; ?>" name="<?php echo $name_img_number; ?>" type="text" value="<?php echo $instance['img_number']; ?>"/>
107
- </p>
108
- <p>
109
- <input <?php if($instance['show_likes_comments']=='1') echo "checked"?> class="widefat" id="<?php echo $id_show_likes_comments; ?>" name="<?php echo $name_show_likes_comments; ?>" type="checkbox" value="<?php echo $instance['show_likes_comments']; ?>"/>
110
- <label for="<?php echo $id_show_likes_comments; ?>"><?php _e("Show likes and comments", 'wd-instagram-feed'); ?></label>
111
- </p>
112
- <p>
113
- <input <?php if($instance['enable_loading_buttons']=='1') echo "checked"?> class="widefat" id="<?php echo $id_enable_loading_buttons; ?>" name="<?php echo $name_enable_loading_buttons; ?>" type="checkbox" value="<?php echo $instance['enable_loading_buttons']; ?>"/>
114
- <label for="<?php echo $id_enable_loading_buttons; ?>"><?php _e("Enable loading new images", 'wd-instagram-feed'); ?></label>
115
- </p>
116
- <script>
117
- jQuery(document).ready(function(){
118
- wdi_toggle(jQuery('#<?php echo $id_feed_id; ?>'));
119
- });
120
-
121
- function wdi_toggle(select){
122
- var feed_list = <?php echo json_encode($feeds);?>;
123
- var id = select.val();
124
- for(var i = 0 ; i < feed_list.length; i++){
125
- if(feed_list[i]['id'] == id){
126
- if(feed_list[i]['feed_type'] == 'blog_style'){
127
- select.parent().parent().find('.wdi_number_of_columns').css('display','none');
128
- }else{
129
- select.parent().parent().find('.wdi_number_of_columns').css('display','block');
130
- }
131
- }
132
- }
133
- }
134
- </script>
135
- <?php
136
- }
137
-
138
- ////////////////////////////////////////////////////////////////////////////////////////
139
- // Getters & Setters //
140
- ////////////////////////////////////////////////////////////////////////////////////////
141
- ////////////////////////////////////////////////////////////////////////////////////////
142
- // Private Methods //
143
- ////////////////////////////////////////////////////////////////////////////////////////
144
- ////////////////////////////////////////////////////////////////////////////////////////
145
- // Listeners //
146
- ////////////////////////////////////////////////////////////////////////////////////////
147
  }
1
+ <?php
2
+
3
+ class WDIViewWidget {
4
+
5
+ private $model;
6
+
7
+ public function __construct($model) {
8
+ $this->model = $model;
9
+ }
10
+
11
+ public function display() {
12
+ }
13
+
14
+ function widget($args, $instance) {
15
+ extract($args);
16
+ $title = (isset($instance['title']) ? $instance['title'] : "");
17
+ $feed_id = (isset($instance['feed_id']) ? $instance['feed_id'] : 0);
18
+ $img_number = (isset($instance['img_number']) ? $instance['img_number'] : 4);
19
+ $show_likes_comments = (isset($instance['show_likes_comments']) ? $instance['show_likes_comments'] : 0);
20
+ $number_of_columns = (isset($instance['number_of_columns']) ? $instance['number_of_columns'] : 1);
21
+ $enable_loading_buttons = (isset($instance['enable_loading_buttons']) ? $instance['enable_loading_buttons'] : 0);
22
+ // Before widget.
23
+ echo $before_widget;
24
+ // Title of widget.
25
+ if ($title) {
26
+ echo $before_title . $title . $after_title;
27
+ }
28
+ // Widget output.
29
+ $widget_params = array(
30
+ 'widget' => true,
31
+ 'widget_image_num' => $img_number,
32
+ 'widget_show_likes_and_comments' => $show_likes_comments,
33
+ 'number_of_columns'=>$number_of_columns,
34
+ 'enable_loading_buttons' => $enable_loading_buttons,
35
+ );
36
+ echo wdi_feed(array('id'=>$feed_id),$widget_params);
37
+
38
+ // After widget.
39
+ echo $after_widget;
40
+ }
41
+
42
+ // Widget Control Panel.
43
+ function form($instance,
44
+ $id_title, $name_title,
45
+ $id_feed_id, $name_feed_id,
46
+ $id_img_number, $name_img_number,
47
+ $id_show_likes_comments, $name_show_likes_comments,
48
+ $id_number_of_columns,$name_number_of_columns,
49
+ $id_enable_loading_buttons, $name_enable_loading_buttons) {
50
+ $defaults = array(
51
+ 'title' => 'Instagram Feed',
52
+ 'feed_id' => 1,
53
+ 'img_number' => 4,
54
+ 'show_likes_comments' => 0,
55
+ 'number_of_columns' => 1,
56
+ 'enable_loading_buttons' => 0
57
+ );
58
+ require_once(WDI_DIR . '/framework/WDILibrary.php');
59
+ $feeds = WDILibrary::objectToArray($this->model->get_feeds());
60
+ $instance = wp_parse_args((array) $instance, $defaults);
61
+ ?>
62
+
63
+ <p>
64
+ <label for="<?php echo $id_title; ?>"><?php _e("Title", 'wd-instagram-feed'); ?></label>
65
+ <input class="widefat" id="<?php echo $id_title; ?>" name="<?php echo $name_title; ?>" type="text" value="<?php echo $instance['title']; ?>"/>
66
+ </p>
67
+ <p>
68
+ <label for="<?php echo $id_feed_id; ?>"><?php _e("Feed", 'wd-instagram-feed'); ?></label>
69
+ <select onchange="wdi_toggle(jQuery(this));" class="widefat" id="<?php echo $id_feed_id; ?>" name="<?php echo $name_feed_id; ?>" >
70
+ <?php foreach ($feeds as $feed) {
71
+ ?>
72
+ <option <?php if($instance['feed_id'] == $feed['id']) echo 'selected'?> value="<?php echo $feed['id'];?>"><?php echo $feed['feed_name'];?></option>
73
+ <?php
74
+ }?>
75
+ </select>
76
+ </p>
77
+
78
+ <p class="wdi_number_of_columns">
79
+ <label for="<?php echo $id_number_of_columns; ?>"><?php _e("Number of columns", 'wd-instagram-feed'); ?></label>
80
+ <select class="widefat" id="<?php echo $id_number_of_columns; ?>" name="<?php echo $name_number_of_columns; ?>" >
81
+ <?php for ($k = 1 ;$k <= 10; $k++) {
82
+ ?>
83
+ <option <?php if($instance['number_of_columns'] == $k) echo 'selected'?> value="<?php echo $k?>"><?php echo $k;?></option>
84
+ <?php
85
+ }?>
86
+ </select>
87
+ </p>
88
+
89
+
90
+ <p>
91
+ <label for="<?php echo $id_img_number; ?>"><?php _e("Number of images to show", 'wd-instagram-feed'); ?></label>
92
+ <input class="widefat" id="<?php echo $id_img_number; ?>" name="<?php echo $name_img_number; ?>" type="text" value="<?php echo $instance['img_number']; ?>"/>
93
+ </p>
94
+ <p>
95
+ <input <?php if($instance['show_likes_comments']=='1') echo "checked"?> class="widefat" id="<?php echo $id_show_likes_comments; ?>" name="<?php echo $name_show_likes_comments; ?>" type="checkbox" value="<?php echo $instance['show_likes_comments']; ?>"/>
96
+ <label for="<?php echo $id_show_likes_comments; ?>"><?php _e("Show likes and comments", 'wd-instagram-feed'); ?></label>
97
+ </p>
98
+ <p>
99
+ <input <?php if($instance['enable_loading_buttons']=='1') echo "checked"?> class="widefat" id="<?php echo $id_enable_loading_buttons; ?>" name="<?php echo $name_enable_loading_buttons; ?>" type="checkbox" value="<?php echo $instance['enable_loading_buttons']; ?>"/>
100
+ <label for="<?php echo $id_enable_loading_buttons; ?>"><?php _e("Enable loading new images", 'wd-instagram-feed'); ?></label>
101
+ </p>
102
+ <script>
103
+ jQuery(document).ready(function(){
104
+ wdi_toggle(jQuery('#<?php echo $id_feed_id; ?>'));
105
+ });
106
+
107
+ function wdi_toggle(select){
108
+ var feed_list = <?php echo json_encode($feeds);?>;
109
+ var id = select.val();
110
+ for(var i = 0 ; i < feed_list.length; i++){
111
+ if(feed_list[i]['id'] == id){
112
+ if(feed_list[i]['feed_type'] == 'blog_style'){
113
+ select.parent().parent().find('.wdi_number_of_columns').css('display','none');
114
+ }else{
115
+ select.parent().parent().find('.wdi_number_of_columns').css('display','block');
116
+ }
117
+ }
118
+ }
119
+ }
120
+ </script>
121
+ <?php
122
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  }
css/block.css CHANGED
@@ -1,57 +1,57 @@
1
- /**
2
- * 10Web plugins Gutenberg integration
3
- * version 2.0.3
4
- */
5
- .tw-container {
6
- position: fixed;
7
- top: 0;
8
- left: 0;
9
- right: 0;
10
- bottom: 0;
11
- z-index: 9999999;
12
- background: rgba(0,0,0,0.7);
13
- }
14
-
15
- .tw-container .tw-container-wrap {
16
- background: #fff;
17
- height: 100%;
18
- width: 100%;
19
- position: absolute;
20
- top: 0;
21
- bottom: 0;
22
- margin: auto;
23
- right: 0;
24
- left: 0;
25
- padding-top: 40px;
26
- }
27
-
28
- .tw-container .tw-container-wrap-800-540 {
29
- max-width: 800px;
30
- max-height: 540px;
31
- }
32
-
33
- .tw-container .tw-container-wrap-520-400 {
34
- max-width: 520px;
35
- max-height: 400px;
36
- }
37
-
38
- .tw-container .tw-container-wrap-420-450 {
39
- max-width: 420px;
40
- max-height: 450px;
41
- }
42
-
43
- .tw-container .tw-container-wrap .media-modal-close{
44
- line-height: 34px;
45
- text-align: center;
46
- height: 40px;
47
- top: 10px;
48
- }
49
-
50
- .tw-container .tw-container-wrap iframe {
51
- height: 100%;
52
- width: 100%;
53
- }
54
- .tw-gb-select {
55
- width: 100%;
56
- height: auto !important;
57
- }
1
+ /**
2
+ * 10Web plugins Gutenberg integration
3
+ * version 2.0.3
4
+ */
5
+ .tw-container {
6
+ position: fixed;
7
+ top: 0;
8
+ left: 0;
9
+ right: 0;
10
+ bottom: 0;
11
+ z-index: 9999999;
12
+ background: rgba(0,0,0,0.7);
13
+ }
14
+
15
+ .tw-container .tw-container-wrap {
16
+ background: #fff;
17
+ height: 100%;
18
+ width: 100%;
19
+ position: absolute;
20
+ top: 0;
21
+ bottom: 0;
22
+ margin: auto;
23
+ right: 0;
24
+ left: 0;
25
+ padding-top: 40px;
26
+ }
27
+
28
+ .tw-container .tw-container-wrap-800-540 {
29
+ max-width: 800px;
30
+ max-height: 540px;
31
+ }
32
+
33
+ .tw-container .tw-container-wrap-520-400 {
34
+ max-width: 520px;
35
+ max-height: 400px;
36
+ }
37
+
38
+ .tw-container .tw-container-wrap-420-450 {
39
+ max-width: 420px;
40
+ max-height: 450px;
41
+ }
42
+
43
+ .tw-container .tw-container-wrap .media-modal-close{
44
+ line-height: 34px;
45
+ text-align: center;
46
+ height: 40px;
47
+ top: 10px;
48
+ }
49
+
50
+ .tw-container .tw-container-wrap iframe {
51
+ height: 100%;
52
+ width: 100%;
53
+ }
54
+ .tw-gb-select {
55
+ width: 100%;
56
+ height: auto !important;
57
+ }
css/gallerybox/jquery.mCustomScrollbar.css CHANGED
@@ -1,474 +1,474 @@
1
- /* basic scrollbar styling */
2
- /* vertical scrollbar */
3
- .mCSB_container{
4
- width: auto;
5
- margin-right: 15px;
6
- overflow: hidden;
7
- }
8
- .mCSB_container.mCS_no_scrollbar{
9
- margin-right: 0;
10
- }
11
- .mCS_disabled>.mCustomScrollBox>.mCSB_container.mCS_no_scrollbar,
12
- .mCS_destroyed>.mCustomScrollBox>.mCSB_container.mCS_no_scrollbar{
13
- margin-right:15px;
14
- }
15
- .mCustomScrollBox>.mCSB_scrollTools{
16
- width:16px;
17
- height:100%;
18
- top:0;
19
- right:0;
20
- }
21
- .mCSB_scrollTools .mCSB_draggerContainer{
22
- position:absolute;
23
- top:0;
24
- left:0;
25
- bottom:0;
26
- right:0;
27
- height:auto;
28
- }
29
- .mCSB_scrollTools a+.mCSB_draggerContainer{
30
- margin:20px 0;
31
- }
32
- .mCSB_scrollTools .mCSB_draggerRail{
33
- width:2px;
34
- height:100%;
35
- margin:0 auto;
36
- -webkit-border-radius:10px;
37
- -moz-border-radius:10px;
38
- border-radius:10px;
39
- }
40
- .mCSB_scrollTools .mCSB_dragger{
41
- cursor:pointer;
42
- width:100%;
43
- height:30px;
44
- }
45
- .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
46
- width:4px;
47
- height:100%;
48
- margin:0 auto;
49
- -webkit-border-radius:10px;
50
- -moz-border-radius:10px;
51
- border-radius:10px;
52
- text-align:center;
53
- }
54
- .mCSB_scrollTools .mCSB_buttonUp,
55
- .mCSB_scrollTools .mCSB_buttonDown{
56
- display:block;
57
- position:relative;
58
- height:20px;
59
- overflow:hidden;
60
- margin:0 auto;
61
- cursor:pointer;
62
- }
63
- .mCSB_scrollTools .mCSB_buttonDown{
64
- top:100%;
65
- margin-top:-40px;
66
- }
67
- /* horizontal scrollbar */
68
- .mCSB_horizontal>.mCSB_container{
69
- height:auto;
70
- margin-right:0;
71
- margin-bottom:30px;
72
- overflow:hidden;
73
- }
74
- .mCSB_horizontal>.mCSB_container.mCS_no_scrollbar{
75
- margin-bottom:0;
76
- }
77
- .mCS_disabled>.mCSB_horizontal>.mCSB_container.mCS_no_scrollbar,
78
- .mCS_destroyed>.mCSB_horizontal>.mCSB_container.mCS_no_scrollbar{
79
- margin-right:0;
80
- margin-bottom:30px;
81
- }
82
- .mCSB_horizontal.mCustomScrollBox>.mCSB_scrollTools{
83
- width:100%;
84
- height:16px;
85
- top:auto;
86
- right:auto;
87
- bottom:0;
88
- left:0;
89
- overflow:hidden;
90
- }
91
- .mCSB_horizontal>.mCSB_scrollTools a+.mCSB_draggerContainer{
92
- margin:0 20px;
93
- }
94
- .mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{
95
- width:100%;
96
- height:2px;
97
- margin:7px 0;
98
- -webkit-border-radius:10px;
99
- -moz-border-radius:10px;
100
- border-radius:10px;
101
- }
102
- .mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger{
103
- width:30px;
104
- height:100%;
105
- }
106
- .mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
107
- width:100%;
108
- height:4px;
109
- margin:6px auto;
110
- -webkit-border-radius:10px;
111
- -moz-border-radius:10px;
112
- border-radius:10px;
113
- }
114
- .mCSB_horizontal>.mCSB_scrollTools .mCSB_buttonLeft,
115
- .mCSB_horizontal>.mCSB_scrollTools .mCSB_buttonRight{
116
- display:block;
117
- position:relative;
118
- width:20px;
119
- height:100%;
120
- overflow:hidden;
121
- margin:0 auto;
122
- cursor:pointer;
123
- float:left;
124
- }
125
- .mCSB_horizontal>.mCSB_scrollTools .mCSB_buttonRight{
126
- margin-left:-40px;
127
- float:right;
128
- }
129
- .mCustomScrollBox{
130
- -ms-touch-action:none; /*MSPointer events - direct all pointer events to js*/
131
- }
132
-
133
- /* default scrollbar colors and backgrounds (default theme) */
134
- .mCustomScrollBox>.mCSB_scrollTools{
135
- opacity:0.75;
136
- filter:"alpha(opacity=75)"; -ms-filter:"alpha(opacity=75)"; /* old ie */
137
- }
138
- .mCustomScrollBox:hover>.mCSB_scrollTools{
139
- opacity:1;
140
- filter:"alpha(opacity=100)"; -ms-filter:"alpha(opacity=100)"; /* old ie */
141
- }
142
- .mCSB_scrollTools .mCSB_draggerRail{
143
- background:#000; /* rgba fallback */
144
- background:rgba(0,0,0,0.4);
145
- filter:"alpha(opacity=40)"; -ms-filter:"alpha(opacity=40)"; /* old ie */
146
- }
147
- .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
148
- background:#fff; /* rgba fallback */
149
- background:rgba(255,255,255,0.75);
150
- filter:"alpha(opacity=75)"; -ms-filter:"alpha(opacity=75)"; /* old ie */
151
- }
152
- .mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{
153
- background:rgba(255,255,255,0.85);
154
- filter:"alpha(opacity=85)"; -ms-filter:"alpha(opacity=85)"; /* old ie */
155
- }
156
- .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
157
- .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
158
- background:rgba(255,255,255,0.9);
159
- filter:"alpha(opacity=90)"; -ms-filter:"alpha(opacity=90)"; /* old ie */
160
- }
161
- .mCSB_scrollTools .mCSB_buttonUp,
162
- .mCSB_scrollTools .mCSB_buttonDown,
163
- .mCSB_scrollTools .mCSB_buttonLeft,
164
- .mCSB_scrollTools .mCSB_buttonRight{
165
- background-image:url(mCSB_buttons.png);
166
- background-repeat:no-repeat;
167
- opacity:0.4;
168
- filter:"alpha(opacity=40)"; -ms-filter:"alpha(opacity=40)"; /* old ie */
169
- }
170
- .mCSB_scrollTools .mCSB_buttonUp{
171
- background-position:0 0;
172
- /*
173
- sprites locations are 0 0/-16px 0/-32px 0/-48px 0 (light) and -80px 0/-96px 0/-112px 0/-128px 0 (dark)
174
- */
175
- }
176
- .mCSB_scrollTools .mCSB_buttonDown{
177
- background-position:0 -20px;
178
- /*
179
- sprites locations are 0 -20px/-16px -20px/-32px -20px/-48px -20px (light) and -80px -20px/-96px -20px/-112px -20px/-128px -20px (dark)
180
- */
181
- }
182
- .mCSB_scrollTools .mCSB_buttonLeft{
183
- background-position:0 -40px;
184
- /*
185
- sprites locations are 0 -40px/-20px -40px/-40px -40px/-60px -40px (light) and -80px -40px/-100px -40px/-120px -40px/-140px -40px (dark)
186
- */
187
- }
188
- .mCSB_scrollTools .mCSB_buttonRight{
189
- background-position:0 -56px;
190
- /*
191
- sprites locations are 0 -56px/-20px -56px/-40px -56px/-60px -56px (light) and -80px -56px/-100px -56px/-120px -56px/-140px -56px (dark)
192
- */
193
- }
194
- .mCSB_scrollTools .mCSB_buttonUp:hover,
195
- .mCSB_scrollTools .mCSB_buttonDown:hover,
196
- .mCSB_scrollTools .mCSB_buttonLeft:hover,
197
- .mCSB_scrollTools .mCSB_buttonRight:hover{
198
- opacity:0.75;
199
- filter:"alpha(opacity=75)"; -ms-filter:"alpha(opacity=75)"; /* old ie */
200
- }
201
- .mCSB_scrollTools .mCSB_buttonUp:active,
202
- .mCSB_scrollTools .mCSB_buttonDown:active,
203
- .mCSB_scrollTools .mCSB_buttonLeft:active,
204
- .mCSB_scrollTools .mCSB_buttonRight:active{
205
- opacity:0.9;
206
- filter:"alpha(opacity=90)"; -ms-filter:"alpha(opacity=90)"; /* old ie */
207
- }
208
-
209
- /*scrollbar themes*/
210
- /*dark (dark colored scrollbar)*/
211
- .mCS-dark>.mCSB_scrollTools .mCSB_draggerRail{
212
- background:#000; /* rgba fallback */
213
- background:rgba(0,0,0,0.15);
214
- }
215
- .mCS-dark>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
216
- background:#000; /* rgba fallback */
217
- background:rgba(0,0,0,0.75);
218
- }
219
- .mCS-dark>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{
220
- background:rgba(0,0,0,0.85);
221
- }
222
- .mCS-dark>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
223
- .mCS-dark>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
224
- background:rgba(0,0,0,0.9);
225
- }
226
- .mCS-dark>.mCSB_scrollTools .mCSB_buttonUp{
227
- background-position:-80px 0;
228
- }
229
- .mCS-dark>.mCSB_scrollTools .mCSB_buttonDown{
230
- background-position:-80px -20px;
231
- }
232
- .mCS-dark>.mCSB_scrollTools .mCSB_buttonLeft{
233
- background-position:-80px -40px;
234
- }
235
- .mCS-dark>.mCSB_scrollTools .mCSB_buttonRight{
236
- background-position:-80px -56px;
237
- }
238
- /*light-2*/
239
- .mCS-light-2>.mCSB_scrollTools .mCSB_draggerRail{
240
- width:4px;
241
- background:#fff; /* rgba fallback */
242
- background:rgba(255,255,255,0.1);
243
- -webkit-border-radius:1px;
244
- -moz-border-radius:1px;
245
- border-radius:1px;
246
- }
247
- .mCS-light-2>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
248
- width:4px;
249
- background:#fff; /* rgba fallback */
250
- background:rgba(255,255,255,0.75);
251
- -webkit-border-radius:1px;
252
- -moz-border-radius:1px;
253
- border-radius:1px;
254
- }
255
- .mCS-light-2.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{
256
- width:100%;
257
- height:4px;
258
- margin:6px 0;
259
- }
260
- .mCS-light-2.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
261
- width:100%;
262
- height:4px;
263
- margin:6px auto;
264
- }
265
- .mCS-light-2>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{
266
- background:rgba(255,255,255,0.85);
267
- }
268
- .mCS-light-2>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
269
- .mCS-light-2>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
270
- background:rgba(255,255,255,0.9);
271
- }
272
- .mCS-light-2>.mCSB_scrollTools .mCSB_buttonUp{
273
- background-position:-32px 0;
274
- }
275
- .mCS-light-2>.mCSB_scrollTools .mCSB_buttonDown{
276
- background-position:-32px -20px;
277
- }
278
- .mCS-light-2>.mCSB_scrollTools .mCSB_buttonLeft{
279
- background-position:-40px -40px;
280
- }
281
- .mCS-light-2>.mCSB_scrollTools .mCSB_buttonRight{
282
- background-position:-40px -56px;
283
- }
284
- /*dark-2*/
285
- .mCS-dark-2>.mCSB_scrollTools .mCSB_draggerRail{
286
- width:4px;
287
- background:#000; /* rgba fallback */
288
- background:rgba(0,0,0,0.1);
289
- -webkit-border-radius:1px;
290
- -moz-border-radius:1px;
291
- border-radius:1px;
292
- }
293
- .mCS-dark-2>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
294
- width:4px;
295
- background:#000; /* rgba fallback */
296
- background:rgba(0,0,0,0.75);
297
- -webkit-border-radius:1px;
298
- -moz-border-radius:1px;
299
- border-radius:1px;
300
- }
301
- .mCS-dark-2.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{
302
- width:100%;
303
- height:4px;
304
- margin:6px 0;
305
- }
306
- .mCS-dark-2.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
307
- width:100%;
308
- height:4px;
309
- margin:6px auto;
310
- }
311
- .mCS-dark-2>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{
312
- background:rgba(0,0,0,0.85);
313
- }
314
- .mCS-dark-2>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
315
- .mCS-dark-2>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
316
- background:rgba(0,0,0,0.9);
317
- }
318
- .mCS-dark-2>.mCSB_scrollTools .mCSB_buttonUp{
319
- background-position:-112px 0;
320
- }
321
- .mCS-dark-2>.mCSB_scrollTools .mCSB_buttonDown{
322
- background-position:-112px -20px;
323
- }
324
- .mCS-dark-2>.mCSB_scrollTools .mCSB_buttonLeft{
325
- background-position:-120px -40px;
326
- }
327
- .mCS-dark-2>.mCSB_scrollTools .mCSB_buttonRight{
328
- background-position:-120px -56px;
329
- }
330
- /*light-thick*/
331
- .mCS-light-thick>.mCSB_scrollTools .mCSB_draggerRail{
332
- width:4px;
333
- background:#fff; /* rgba fallback */
334
- background:rgba(255,255,255,0.1);
335
- -webkit-border-radius:2px;
336
- -moz-border-radius:2px;
337
- border-radius:2px;
338
- }
339
- .mCS-light-thick>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
340
- width:6px;
341
- background:#fff; /* rgba fallback */
342
- background:rgba(255,255,255,0.75);
343
- -webkit-border-radius:2px;
344
- -moz-border-radius:2px;
345
- border-radius:2px;
346
- }
347
- .mCS-light-thick.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{
348
- width:100%;
349
- height:4px;
350
- margin:6px 0;
351
- }
352
- .mCS-light-thick.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
353
- width:100%;
354
- height:6px;
355
- margin:5px auto;
356
- }
357
- .mCS-light-thick>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{
358
- background:rgba(255,255,255,0.85);
359
- }
360
- .mCS-light-thick>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
361
- .mCS-light-thick>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
362
- background:rgba(255,255,255,0.9);
363
- }
364
- .mCS-light-thick>.mCSB_scrollTools .mCSB_buttonUp{
365
- background-position:-16px 0;
366
- }
367
- .mCS-light-thick>.mCSB_scrollTools .mCSB_buttonDown{
368
- background-position:-16px -20px;
369
- }
370
- .mCS-light-thick>.mCSB_scrollTools .mCSB_buttonLeft{
371
- background-position:-20px -40px;
372
- }
373
- .mCS-light-thick>.mCSB_scrollTools .mCSB_buttonRight{
374
- background-position:-20px -56px;
375
- }
376
- /*dark-thick*/
377
- .mCS-dark-thick>.mCSB_scrollTools .mCSB_draggerRail{
378
- width:4px;
379
- background:#000; /* rgba fallback */
380
- background:rgba(0,0,0,0.1);
381
- -webkit-border-radius:2px;
382
- -moz-border-radius:2px;
383
- border-radius:2px;
384
- }
385
- .mCS-dark-thick>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
386
- width:6px;
387
- background:#000; /* rgba fallback */
388
- background:rgba(0,0,0,0.75);
389
- -webkit-border-radius:2px;
390
- -moz-border-radius:2px;
391
- border-radius:2px;
392
- }
393
- .mCS-dark-thick.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{
394
- width:100%;
395
- height:4px;
396
- margin:6px 0;
397
- }
398
- .mCS-dark-thick.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
399
- width:100%;
400
- height:6px;
401
- margin:5px auto;
402
- }
403
- .mCS-dark-thick>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{
404
- background:rgba(0,0,0,0.85);
405
- }
406
- .mCS-dark-thick>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
407
- .mCS-dark-thick>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
408
- background:rgba(0,0,0,0.9);
409
- }
410
- .mCS-dark-thick>.mCSB_scrollTools .mCSB_buttonUp{
411
- background-position:-96px 0;
412
- }
413
- .mCS-dark-thick>.mCSB_scrollTools .mCSB_buttonDown{
414
- background-position:-96px -20px;
415
- }
416
- .mCS-dark-thick>.mCSB_scrollTools .mCSB_buttonLeft{
417
- background-position:-100px -40px;
418
- }
419
- .mCS-dark-thick>.mCSB_scrollTools .mCSB_buttonRight{
420
- background-position:-100px -56px;
421
- }
422
- /*light-thin*/
423
- .mCS-light-thin>.mCSB_scrollTools .mCSB_draggerRail{
424
- background:#fff; /* rgba fallback */
425
- background:rgba(255,255,255,0.1);
426
- }
427
- .mCS-light-thin>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
428
- width:2px;
429
- }
430
- .mCS-light-thin.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{
431
- width:100%;
432
- }
433
- .mCS-light-thin.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
434
- width:100%;
435
- height:2px;
436
- margin:7px auto;
437
- }
438
- /*dark-thin*/
439
- .mCS-dark-thin>.mCSB_scrollTools .mCSB_draggerRail{
440
- background:#000; /* rgba fallback */
441
- background:rgba(0,0,0,0.15);
442
- }
443
- .mCS-dark-thin>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
444
- width:2px;
445
- background:#000; /* rgba fallback */
446
- background:rgba(0,0,0,0.75);
447
- }
448
- .mCS-dark-thin.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{
449
- width:100%;
450
- }
451
- .mCS-dark-thin.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
452
- width:100%;
453
- height:2px;
454
- margin:7px auto;
455
- }
456
- .mCS-dark-thin>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{
457
- background:rgba(0,0,0,0.85);
458
- }
459
- .mCS-dark-thin>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
460
- .mCS-dark-thin>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
461
- background:rgba(0,0,0,0.9);
462
- }
463
- .mCS-dark-thin>.mCSB_scrollTools .mCSB_buttonUp{
464
- background-position:-80px 0;
465
- }
466
- .mCS-dark-thin>.mCSB_scrollTools .mCSB_buttonDown{
467
- background-position:-80px -20px;
468
- }
469
- .mCS-dark-thin>.mCSB_scrollTools .mCSB_buttonLeft{
470
- background-position:-80px -40px;
471
- }
472
- .mCS-dark-thin>.mCSB_scrollTools .mCSB_buttonRight{
473
- background-position:-80px -56px;
474
  }
1
+ /* basic scrollbar styling */
2
+ /* vertical scrollbar */
3
+ .mCSB_container{
4
+ width: auto;
5
+ margin-right: 15px;
6
+ overflow: hidden;
7
+ }
8
+ .mCSB_container.mCS_no_scrollbar{
9
+ margin-right: 0;
10
+ }
11
+ .mCS_disabled>.mCustomScrollBox>.mCSB_container.mCS_no_scrollbar,
12
+ .mCS_destroyed>.mCustomScrollBox>.mCSB_container.mCS_no_scrollbar{
13
+ margin-right:15px;
14
+ }
15
+ .mCustomScrollBox>.mCSB_scrollTools{
16
+ width:16px;
17
+ height:100%;
18
+ top:0;
19
+ right:0;
20
+ }
21
+ .mCSB_scrollTools .mCSB_draggerContainer{
22
+ position:absolute;
23
+ top:0;
24
+ left:0;
25
+ bottom:0;
26
+ right:0;
27
+ height:auto;
28
+ }
29
+ .mCSB_scrollTools a+.mCSB_draggerContainer{
30
+ margin:20px 0;
31
+ }
32
+ .mCSB_scrollTools .mCSB_draggerRail{
33
+ width:2px;
34
+ height:100%;
35
+ margin:0 auto;
36
+ -webkit-border-radius:10px;
37
+ -moz-border-radius:10px;
38
+ border-radius:10px;
39
+ }
40
+ .mCSB_scrollTools .mCSB_dragger{
41
+ cursor:pointer;
42
+ width:100%;
43
+ height:30px;
44
+ }
45
+ .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
46
+ width:4px;
47
+ height:100%;
48
+ margin:0 auto;
49
+ -webkit-border-radius:10px;
50
+ -moz-border-radius:10px;
51
+ border-radius:10px;
52
+ text-align:center;
53
+ }
54
+ .mCSB_scrollTools .mCSB_buttonUp,
55
+ .mCSB_scrollTools .mCSB_buttonDown{
56
+ display:block;
57
+ position:relative;
58
+ height:20px;
59
+ overflow:hidden;
60
+ margin:0 auto;
61
+ cursor:pointer;
62
+ }
63
+ .mCSB_scrollTools .mCSB_buttonDown{
64
+ top:100%;
65
+ margin-top:-40px;
66
+ }
67
+ /* horizontal scrollbar */
68
+ .mCSB_horizontal>.mCSB_container{
69
+ height:auto;
70
+ margin-right:0;
71
+ margin-bottom:30px;
72
+ overflow:hidden;
73
+ }
74
+ .mCSB_horizontal>.mCSB_container.mCS_no_scrollbar{
75
+ margin-bottom:0;
76
+ }
77
+ .mCS_disabled>.mCSB_horizontal>.mCSB_container.mCS_no_scrollbar,
78
+ .mCS_destroyed>.mCSB_horizontal>.mCSB_container.mCS_no_scrollbar{
79
+ margin-right:0;
80
+ margin-bottom:30px;
81
+ }
82
+ .mCSB_horizontal.mCustomScrollBox>.mCSB_scrollTools{
83
+ width:100%;
84
+ height:16px;
85
+ top:auto;
86
+ right:auto;
87
+ bottom:0;
88
+ left:0;
89
+ overflow:hidden;
90
+ }
91
+ .mCSB_horizontal>.mCSB_scrollTools a+.mCSB_draggerContainer{
92
+ margin:0 20px;
93
+ }
94
+ .mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{
95
+ width:100%;
96
+ height:2px;
97
+ margin:7px 0;
98
+ -webkit-border-radius:10px;
99
+ -moz-border-radius:10px;
100
+ border-radius:10px;
101
+ }
102
+ .mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger{
103
+ width:30px;
104
+ height:100%;
105
+ }
106
+ .mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
107
+ width:100%;
108
+ height:4px;
109
+ margin:6px auto;
110
+ -webkit-border-radius:10px;
111
+ -moz-border-radius:10px;
112
+ border-radius:10px;
113
+ }
114
+ .mCSB_horizontal>.mCSB_scrollTools .mCSB_buttonLeft,
115
+ .mCSB_horizontal>.mCSB_scrollTools .mCSB_buttonRight{
116
+ display:block;
117
+ position:relative;
118
+ width:20px;
119
+ height:100%;
120
+ overflow:hidden;
121
+ margin:0 auto;
122
+ cursor:pointer;
123
+ float:left;
124
+ }
125
+ .mCSB_horizontal>.mCSB_scrollTools .mCSB_buttonRight{
126
+ margin-left:-40px;
127
+ float:right;
128
+ }
129
+ .mCustomScrollBox{
130
+ -ms-touch-action:none; /*MSPointer events - direct all pointer events to js*/
131
+ }
132
+
133
+ /* default scrollbar colors and backgrounds (default theme) */
134
+ .mCustomScrollBox>.mCSB_scrollTools{
135
+ opacity:0.75;
136
+ filter:"alpha(opacity=75)"; -ms-filter:"alpha(opacity=75)"; /* old ie */
137
+ }
138
+ .mCustomScrollBox:hover>.mCSB_scrollTools{
139
+ opacity:1;
140
+ filter:"alpha(opacity=100)"; -ms-filter:"alpha(opacity=100)"; /* old ie */
141
+ }
142
+ .mCSB_scrollTools .mCSB_draggerRail{
143
+ background:#000; /* rgba fallback */
144
+ background:rgba(0,0,0,0.4);
145
+ filter:"alpha(opacity=40)"; -ms-filter:"alpha(opacity=40)"; /* old ie */
146
+ }
147
+ .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
148
+ background:#fff; /* rgba fallback */
149
+ background:rgba(255,255,255,0.75);
150
+ filter:"alpha(opacity=75)"; -ms-filter:"alpha(opacity=75)"; /* old ie */
151
+ }
152
+ .mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{
153
+ background:rgba(255,255,255,0.85);
154
+ filter:"alpha(opacity=85)"; -ms-filter:"alpha(opacity=85)"; /* old ie */
155
+ }
156
+ .mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
157
+ .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
158
+ background:rgba(255,255,255,0.9);
159
+ filter:"alpha(opacity=90)"; -ms-filter:"alpha(opacity=90)"; /* old ie */
160
+ }
161
+ .mCSB_scrollTools .mCSB_buttonUp,
162
+ .mCSB_scrollTools .mCSB_buttonDown,
163
+ .mCSB_scrollTools .mCSB_buttonLeft,
164
+ .mCSB_scrollTools .mCSB_buttonRight{
165
+ background-image:url(mCSB_buttons.png);
166
+ background-repeat:no-repeat;
167
+ opacity:0.4;
168
+ filter:"alpha(opacity=40)"; -ms-filter:"alpha(opacity=40)"; /* old ie */
169
+ }
170
+ .mCSB_scrollTools .mCSB_buttonUp{
171
+ background-position:0 0;
172
+ /*
173
+ sprites locations are 0 0/-16px 0/-32px 0/-48px 0 (light) and -80px 0/-96px 0/-112px 0/-128px 0 (dark)
174
+ */
175
+ }
176
+ .mCSB_scrollTools .mCSB_buttonDown{
177
+ background-position:0 -20px;
178
+ /*
179
+ sprites locations are 0 -20px/-16px -20px/-32px -20px/-48px -20px (light) and -80px -20px/-96px -20px/-112px -20px/-128px -20px (dark)
180
+ */
181
+ }
182
+ .mCSB_scrollTools .mCSB_buttonLeft{
183
+ background-position:0 -40px;
184
+ /*
185
+ sprites locations are 0 -40px/-20px -40px/-40px -40px/-60px -40px (light) and -80px -40px/-100px -40px/-120px -40px/-140px -40px (dark)
186
+ */
187
+ }
188
+ .mCSB_scrollTools .mCSB_buttonRight{
189
+ background-position:0 -56px;
190
+ /*
191
+ sprites locations are 0 -56px/-20px -56px/-40px -56px/-60px -56px (light) and -80px -56px/-100px -56px/-120px -56px/-140px -56px (dark)
192
+ */
193
+ }
194
+ .mCSB_scrollTools .mCSB_buttonUp:hover,
195
+ .mCSB_scrollTools .mCSB_buttonDown:hover,
196
+ .mCSB_scrollTools .mCSB_buttonLeft:hover,
197
+ .mCSB_scrollTools .mCSB_buttonRight:hover{
198
+ opacity:0.75;
199
+ filter:"alpha(opacity=75)"; -ms-filter:"alpha(opacity=75)"; /* old ie */
200
+ }
201
+ .mCSB_scrollTools .mCSB_buttonUp:active,
202
+ .mCSB_scrollTools .mCSB_buttonDown:active,
203
+ .mCSB_scrollTools .mCSB_buttonLeft:active,
204
+ .mCSB_scrollTools .mCSB_buttonRight:active{
205
+ opacity:0.9;
206
+ filter:"alpha(opacity=90)"; -ms-filter:"alpha(opacity=90)"; /* old ie */
207
+ }
208
+
209
+ /*scrollbar themes*/
210
+ /*dark (dark colored scrollbar)*/
211
+ .mCS-dark>.mCSB_scrollTools .mCSB_draggerRail{
212
+ background:#000; /* rgba fallback */
213
+ background:rgba(0,0,0,0.15);
214
+ }
215
+ .mCS-dark>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
216
+ background:#000; /* rgba fallback */
217
+ background:rgba(0,0,0,0.75);
218
+ }
219
+ .mCS-dark>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{
220
+ background:rgba(0,0,0,0.85);
221
+ }
222
+ .mCS-dark>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
223
+ .mCS-dark>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
224
+ background:rgba(0,0,0,0.9);
225
+ }
226
+ .mCS-dark>.mCSB_scrollTools .mCSB_buttonUp{
227
+ background-position:-80px 0;
228
+ }
229
+ .mCS-dark>.mCSB_scrollTools .mCSB_buttonDown{
230
+ background-position:-80px -20px;
231
+ }
232
+ .mCS-dark>.mCSB_scrollTools .mCSB_buttonLeft{
233
+ background-position:-80px -40px;
234
+ }
235
+ .mCS-dark>.mCSB_scrollTools .mCSB_buttonRight{
236
+ background-position:-80px -56px;
237
+ }
238
+ /*light-2*/
239
+ .mCS-light-2>.mCSB_scrollTools .mCSB_draggerRail{
240
+ width:4px;
241
+ background:#fff; /* rgba fallback */
242
+ background:rgba(255,255,255,0.1);
243
+ -webkit-border-radius:1px;
244
+ -moz-border-radius:1px;
245
+ border-radius:1px;
246
+ }
247
+ .mCS-light-2>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
248
+ width:4px;
249
+ background:#fff; /* rgba fallback */
250
+ background:rgba(255,255,255,0.75);
251
+ -webkit-border-radius:1px;
252
+ -moz-border-radius:1px;
253
+ border-radius:1px;
254
+ }
255
+ .mCS-light-2.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{
256
+ width:100%;
257
+ height:4px;
258
+ margin:6px 0;
259
+ }
260
+ .mCS-light-2.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
261
+ width:100%;
262
+ height:4px;
263
+ margin:6px auto;
264
+ }
265
+ .mCS-light-2>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{
266
+ background:rgba(255,255,255,0.85);
267
+ }
268
+ .mCS-light-2>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
269
+ .mCS-light-2>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
270
+ background:rgba(255,255,255,0.9);
271
+ }
272
+ .mCS-light-2>.mCSB_scrollTools .mCSB_buttonUp{
273
+ background-position:-32px 0;
274
+ }
275
+ .mCS-light-2>.mCSB_scrollTools .mCSB_buttonDown{
276
+ background-position:-32px -20px;
277
+ }
278
+ .mCS-light-2>.mCSB_scrollTools .mCSB_buttonLeft{
279
+ background-position:-40px -40px;
280
+ }
281
+ .mCS-light-2>.mCSB_scrollTools .mCSB_buttonRight{
282
+ background-position:-40px -56px;
283
+ }
284
+ /*dark-2*/
285
+ .mCS-dark-2>.mCSB_scrollTools .mCSB_draggerRail{
286
+ width:4px;
287
+ background:#000; /* rgba fallback */
288
+ background:rgba(0,0,0,0.1);
289
+ -webkit-border-radius:1px;
290
+ -moz-border-radius:1px;
291
+ border-radius:1px;
292
+ }
293
+ .mCS-dark-2>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
294
+ width:4px;
295
+ background:#000; /* rgba fallback */
296
+ background:rgba(0,0,0,0.75);
297
+ -webkit-border-radius:1px;
298
+ -moz-border-radius:1px;
299
+ border-radius:1px;
300
+ }
301
+ .mCS-dark-2.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{
302
+ width:100%;
303
+ height:4px;
304
+ margin:6px 0;
305
+ }
306
+ .mCS-dark-2.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
307
+ width:100%;
308
+ height:4px;
309
+ margin:6px auto;
310
+ }
311
+ .mCS-dark-2>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{
312
+ background:rgba(0,0,0,0.85);
313
+ }
314
+ .mCS-dark-2>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
315
+ .mCS-dark-2>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
316
+ background:rgba(0,0,0,0.9);
317
+ }
318
+ .mCS-dark-2>.mCSB_scrollTools .mCSB_buttonUp{
319
+ background-position:-112px 0;
320
+ }
321
+ .mCS-dark-2>.mCSB_scrollTools .mCSB_buttonDown{
322
+ background-position:-112px -20px;
323
+ }
324
+ .mCS-dark-2>.mCSB_scrollTools .mCSB_buttonLeft{
325
+ background-position:-120px -40px;
326
+ }
327
+ .mCS-dark-2>.mCSB_scrollTools .mCSB_buttonRight{
328
+ background-position:-120px -56px;
329
+ }
330
+ /*light-thick*/
331
+ .mCS-light-thick>.mCSB_scrollTools .mCSB_draggerRail{
332
+ width:4px;
333
+ background:#fff; /* rgba fallback */
334
+ background:rgba(255,255,255,0.1);
335
+ -webkit-border-radius:2px;
336
+ -moz-border-radius:2px;
337
+ border-radius:2px;
338
+ }
339
+ .mCS-light-thick>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
340
+ width:6px;
341
+ background:#fff; /* rgba fallback */
342
+ background:rgba(255,255,255,0.75);
343
+ -webkit-border-radius:2px;
344
+ -moz-border-radius:2px;
345
+ border-radius:2px;
346
+ }
347
+ .mCS-light-thick.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{
348
+ width:100%;
349
+ height:4px;
350
+ margin:6px 0;
351
+ }
352
+ .mCS-light-thick.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
353
+ width:100%;
354
+ height:6px;
355
+ margin:5px auto;
356
+ }
357
+ .mCS-light-thick>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{
358
+ background:rgba(255,255,255,0.85);
359
+ }
360
+ .mCS-light-thick>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
361
+ .mCS-light-thick>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
362
+ background:rgba(255,255,255,0.9);
363
+ }
364
+ .mCS-light-thick>.mCSB_scrollTools .mCSB_buttonUp{
365
+ background-position:-16px 0;
366
+ }
367
+ .mCS-light-thick>.mCSB_scrollTools .mCSB_buttonDown{
368
+ background-position:-16px -20px;
369
+ }
370
+ .mCS-light-thick>.mCSB_scrollTools .mCSB_buttonLeft{
371
+ background-position:-20px -40px;
372
+ }
373
+ .mCS-light-thick>.mCSB_scrollTools .mCSB_buttonRight{
374
+ background-position:-20px -56px;
375
+ }
376
+ /*dark-thick*/
377
+ .mCS-dark-thick>.mCSB_scrollTools .mCSB_draggerRail{
378
+ width:4px;
379
+ background:#000; /* rgba fallback */
380
+ background:rgba(0,0,0,0.1);
381
+ -webkit-border-radius:2px;
382
+ -moz-border-radius:2px;
383
+ border-radius:2px;
384
+ }
385
+ .mCS-dark-thick>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
386
+ width:6px;
387
+ background:#000; /* rgba fallback */
388
+ background:rgba(0,0,0,0.75);
389
+ -webkit-border-radius:2px;
390
+ -moz-border-radius:2px;
391
+ border-radius:2px;
392
+ }
393
+ .mCS-dark-thick.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{
394
+ width:100%;
395
+ height:4px;
396
+ margin:6px 0;
397
+ }
398
+ .mCS-dark-thick.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
399
+ width:100%;
400
+ height:6px;
401
+ margin:5px auto;
402
+ }
403
+ .mCS-dark-thick>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{
404
+ background:rgba(0,0,0,0.85);
405
+ }
406
+ .mCS-dark-thick>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
407
+ .mCS-dark-thick>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
408
+ background:rgba(0,0,0,0.9);
409
+ }
410
+ .mCS-dark-thick>.mCSB_scrollTools .mCSB_buttonUp{
411
+ background-position:-96px 0;
412
+ }
413
+ .mCS-dark-thick>.mCSB_scrollTools .mCSB_buttonDown{
414
+ background-position:-96px -20px;
415
+ }
416
+ .mCS-dark-thick>.mCSB_scrollTools .mCSB_buttonLeft{
417
+ background-position:-100px -40px;
418
+ }
419
+ .mCS-dark-thick>.mCSB_scrollTools .mCSB_buttonRight{
420
+ background-position:-100px -56px;
421
+ }
422
+ /*light-thin*/
423
+ .mCS-light-thin>.mCSB_scrollTools .mCSB_draggerRail{
424
+ background:#fff; /* rgba fallback */
425
+ background:rgba(255,255,255,0.1);
426
+ }
427
+ .mCS-light-thin>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
428
+ width:2px;
429
+ }
430
+ .mCS-light-thin.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{
431
+ width:100%;
432
+ }
433
+ .mCS-light-thin.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
434
+ width:100%;
435
+ height:2px;
436
+ margin:7px auto;
437
+ }
438
+ /*dark-thin*/
439
+ .mCS-dark-thin>.mCSB_scrollTools .mCSB_draggerRail{
440
+ background:#000; /* rgba fallback */
441
+ background:rgba(0,0,0,0.15);
442
+ }
443
+ .mCS-dark-thin>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
444
+ width:2px;
445
+ background:#000; /* rgba fallback */
446
+ background:rgba(0,0,0,0.75);
447
+ }
448
+ .mCS-dark-thin.mCSB_horizontal>.mCSB_scrollTools .mCSB_draggerRail{
449
+ width:100%;
450
+ }
451
+ .mCS-dark-thin.mCSB_horizontal>.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
452
+ width:100%;
453
+ height:2px;
454
+ margin:7px auto;
455
+ }
456
+ .mCS-dark-thin>.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{
457
+ background:rgba(0,0,0,0.85);
458
+ }
459
+ .mCS-dark-thin>.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
460
+ .mCS-dark-thin>.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
461
+ background:rgba(0,0,0,0.9);
462
+ }
463
+ .mCS-dark-thin>.mCSB_scrollTools .mCSB_buttonUp{
464
+ background-position:-80px 0;
465
+ }
466
+ .mCS-dark-thin>.mCSB_scrollTools .mCSB_buttonDown{
467
+ background-position:-80px -20px;
468
+ }
469
+ .mCS-dark-thin>.mCSB_scrollTools .mCSB_buttonLeft{
470
+ background-position:-80px -40px;
471
+ }
472
+ .mCS-dark-thin>.mCSB_scrollTools .mCSB_buttonRight{
473
+ background-position:-80px -56px;
474
  }
css/pricing.css CHANGED
@@ -1,179 +1,179 @@
1
- .wrap h1.head-notice {
2
- height: 0;
3
- padding: 0;
4
- visibility: hidden;
5
- }
6
-
7
- /* Top bar start */
8
- .topbar-container * {
9
- font-family: Roboto;
10
- }
11
-
12
- .topbar-container {
13
- display: flex;
14
- flex-direction: row;
15
- justify-content: flex-end;
16
- margin: 20px 0 20px 0;
17
- font-family: Roboto;
18
- }
19
- .topbar-container * {
20
- box-sizing: border-box;
21
- }
22
- .topbar-container .topbar {
23
- background-color: #FFFFFF;
24
- border: 1px solid #D0D0D080;
25
- border-radius: 7px;
26
- color: #000000;
27
- padding: 10px;
28
- }
29
-
30
- .topbar_cont {
31
- display: flex;
32
- }
33
-
34
- .topbar-container .topbar.topbar_support_forum {
35
- background-color: #4786FF;
36
- margin-left: 20px;
37
- }
38
-
39
- .topbar-container .topbar.topbar_support_forum:hover {
40
- background-color: #3077FF;
41
- opacity:1
42
- }
43
-
44
- .topbar-content {
45
- display: flex;
46
- justify-content: space-between;
47
- flex: auto;
48
- margin: 0 20px 0 0;
49
- padding: 10px 15px;
50
- height: 60px;
51
- }
52
- .topbar-links {
53
- color: #000000;
54
- display: flex;
55
- flex-direction: column;
56
- justify-content: space-around;
57
- font-size: 18px;
58
- font-weight: 300;
59
- margin: 0 0 0 2px;
60
- height: 60px;
61
- }
62
- .topbar-links-container {
63
- display: flex;
64
- justify-content: space-around;
65
- height: 80%;
66
- }
67
- .topbar-links-item {
68
- display: flex;
69
- flex: 1;
70
- align-self: center;
71
- justify-content: center;
72
- width: 170px;
73
- line-height: 50px;
74
- }
75
- .topbar-links * {
76
- font-size: 18px;
77
- }
78
- .topbar-links a,
79
- .topbar-links a:focus {
80
- align-self: center;
81
- box-shadow: none;
82
- color: #000000;
83
- text-decoration: none;
84
- }
85
-
86
- .topbar-links a.topbar_support_forum {
87
- color: #fff;
88
- }
89
-
90
- .topbar-links a.topbar_support_forum .help_icon {
91
- margin-right: 10px;
92
- }
93
-
94
- .topbar-links a:hover {
95
- opacity: 0.5;
96
- text-decoration: none;
97
- }
98
- .topbar-separator {
99
- background-color: #C2C2C280;
100
- width: 1px;
101
- height: 100%;
102
- }
103
- .topbar-content-title {
104
- color: #0C4D68;
105
- font-size: 16px;
106
- font-weight: 700;
107
- line-height: 22px;
108
- text-transform: uppercase;
109
- }
110
- .topbar-content-body {
111
- font-size: 15px;
112
- font-weight: 300;
113
- line-height: 20px;
114
- }
115
- .topbar-content-container {
116
- display: flex;
117
- flex-direction: column;
118
- }
119
- .topbar-content-button-container,
120
- .free-message-button-container {
121
- align-self: center;
122
- }
123
- .topbar-upgrade-button,
124
- .topbar-upgrade-button:focus {
125
- background-color: #29B311;
126
- border-radius: 20px;
127
- box-shadow: none;
128
- color: #FFFFFF;
129
- font-size: 14px;
130
- padding: 5px 44px;
131
- text-decoration: none;
132
- text-transform: uppercase;
133
- }
134
- .topbar-upgrade-button:hover {
135
- text-decoration: none;
136
- color: #FFFFFFCC;
137
- }
138
- @media screen and (max-width: 1366px) {
139
- .topbar-links {
140
- font-size: 15px;
141
- }
142
- .topbar-content-title {
143
- font-size: 15px;
144
- }
145
- .topbar-content-body {
146
- font-size: 13px;
147
- }
148
- }
149
- @media screen and (max-width: 1285px) {
150
- .topbar-container {
151
- flex-direction: column;
152
- }
153
- .topbar-links,
154
- .topbar-content {
155
- margin: 0 0 10px 0;
156
- width: 100%;
157
- }
158
- .topbar-content {
159
- flex-direction: column;
160
- height: auto;
161
- }
162
- .topbar-content-container,
163
- .topbar-content-container * {
164
- align-self: center;
165
- padding-bottom: 4px;
166
- }
167
- }
168
-
169
- @media screen and (max-width: 450px) {
170
- .topbar_cont {
171
- display: block;
172
- }
173
-
174
- .topbar-container .topbar.topbar_support_forum {
175
- margin-left: 0px;
176
- }
177
- }
178
-
179
- /* Top bar end */
1
+ .wrap h1.head-notice {
2
+ height: 0;
3
+ padding: 0;
4
+ visibility: hidden;
5
+ }
6
+
7
+ /* Top bar start */
8
+ .topbar-container * {
9
+ font-family: Roboto;
10
+ }
11
+
12
+ .topbar-container {
13
+ display: flex;
14
+ flex-direction: row;
15
+ justify-content: flex-end;
16
+ margin: 20px 0 20px 0;
17
+ font-family: Roboto;
18
+ }
19
+ .topbar-container * {
20
+ box-sizing: border-box;
21
+ }
22
+ .topbar-container .topbar {
23
+ background-color: #FFFFFF;
24
+ border: 1px solid #D0D0D080;
25
+ border-radius: 7px;
26
+ color: #000000;
27
+ padding: 10px;
28
+ }
29
+
30
+ .topbar_cont {
31
+ display: flex;
32
+ }
33
+
34
+ .topbar-container .topbar.topbar_support_forum {
35
+ background-color: #4786FF;
36
+ margin-left: 20px;
37
+ }
38
+
39
+ .topbar-container .topbar.topbar_support_forum:hover {
40
+ background-color: #3077FF;
41
+ opacity:1
42
+ }
43
+
44
+ .topbar-content {
45
+ display: flex;
46
+ justify-content: space-between;
47
+ flex: auto;
48
+ margin: 0 20px 0 0;
49
+ padding: 10px 15px;
50
+ height: 60px;
51
+ }
52
+ .topbar-links {
53
+ color: #000000;
54
+ display: flex;
55
+ flex-direction: column;
56
+ justify-content: space-around;
57
+ font-size: 18px;
58
+ font-weight: 300;
59
+ margin: 0 0 0 2px;
60
+ height: 60px;
61
+ }
62
+ .topbar-links-container {
63
+ display: flex;
64
+ justify-content: space-around;
65
+ height: 80%;
66
+ }
67
+ .topbar-links-item {
68
+ display: flex;
69
+ flex: 1;
70
+ align-self: center;
71
+ justify-content: center;
72
+ width: 170px;
73
+ line-height: 50px;
74
+ }
75
+ .topbar-links * {
76
+ font-size: 18px;
77
+ }
78
+ .topbar-links a,
79
+ .topbar-links a:focus {
80
+ align-self: center;
81
+ box-shadow: none;
82
+ color: #000000;
83
+ text-decoration: none;
84
+ }
85
+
86
+ .topbar-links a.topbar_support_forum {
87
+ color: #fff;
88
+ }
89
+
90
+ .topbar-links a.topbar_support_forum .help_icon {
91
+ margin-right: 10px;
92
+ }
93
+
94
+ .topbar-links a:hover {
95
+ opacity: 0.5;
96
+ text-decoration: none;
97
+ }
98
+ .topbar-separator {
99
+ background-color: #C2C2C280;
100
+ width: 1px;
101
+ height: 100%;
102
+ }
103
+ .topbar-content-title {
104
+ color: #0C4D68;
105
+ font-size: 16px;
106
+ font-weight: 700;
107
+ line-height: 22px;
108
+ text-transform: uppercase;
109
+ }
110
+ .topbar-content-body {
111
+ font-size: 15px;
112
+ font-weight: 300;
113
+ line-height: 20px;
114
+ }
115
+ .topbar-content-container {
116
+ display: flex;
117
+ flex-direction: column;
118
+ }
119
+ .topbar-content-button-container,
120
+ .free-message-button-container {
121
+ align-self: center;
122
+ }
123
+ .topbar-upgrade-button,
124
+ .topbar-upgrade-button:focus {
125
+ background-color: #29B311;
126
+ border-radius: 20px;
127
+ box-shadow: none;
128
+ color: #FFFFFF;
129
+ font-size: 14px;
130
+ padding: 5px 44px;
131
+ text-decoration: none;
132
+ text-transform: uppercase;
133
+ }
134
+ .topbar-upgrade-button:hover {
135
+ text-decoration: none;
136
+ color: #FFFFFFCC;
137
+ }
138
+ @media screen and (max-width: 1366px) {
139
+ .topbar-links {
140
+ font-size: 15px;
141
+ }
142
+ .topbar-content-title {
143
+ font-size: 15px;
144
+ }
145
+ .topbar-content-body {
146
+ font-size: 13px;
147
+ }
148
+ }
149
+ @media screen and (max-width: 1285px) {
150
+ .topbar-container {
151
+ flex-direction: column;
152
+ }
153
+ .topbar-links,
154
+ .topbar-content {
155
+ margin: 0 0 10px 0;
156
+ width: 100%;
157
+ }
158
+ .topbar-content {
159
+ flex-direction: column;
160
+ height: auto;
161
+ }
162
+ .topbar-content-container,
163
+ .topbar-content-container * {
164
+ align-self: center;
165
+ padding-bottom: 4px;
166
+ }
167
+ }
168
+
169
+ @media screen and (max-width: 450px) {
170
+ .topbar_cont {
171
+ display: block;
172
+ }
173
+
174
+ .topbar-container .topbar.topbar_support_forum {
175
+ margin-left: 0px;
176
+ }
177
+ }
178
+
179
+ /* Top bar end */
css/tenweb-fonts/fonts.css CHANGED
@@ -1,132 +1,132 @@
1
- @font-face {
2
- font-family: 'tenweb';
3
- src: url('fonts/tenweb.eot?4znsty');
4
- src: url('fonts/tenweb.eot?4znsty#iefix') format('embedded-opentype'),
5
- url('fonts/tenweb.ttf?4znsty') format('truetype'),
6
- url('fonts/tenweb.woff?4znsty') format('woff'),
7
- url('fonts/tenweb.svg?4znsty#tenweb') format('svg');
8
- font-weight: normal;
9
- font-style: normal;
10
- font-display: block;
11
- }
12
-
13
- [class^="tenweb-i-"], [class*=" tenweb-i-"] {
14
- /* use !important to prevent issues with browser extensions that change fonts */
15
- font-family: 'tenweb' !important;
16
- speak: none;
17
- font-style: normal;
18
- font-weight: normal;
19
- font-variant: normal;
20
- text-transform: none;
21
- line-height: 1;
22
-
23
- /* Better Font Rendering =========== */
24
- -webkit-font-smoothing: antialiased;
25
- -moz-osx-font-smoothing: grayscale;
26
- }
27
-
28
- .tenweb-i-arrow-right:before {
29
- content: "\e904";
30
- }
31
- .tenweb-i-arrow-left:before {
32
- content: "\e905";
33
- }
34
- .tenweb-i-instagram:before {
35
- content: "\e938";
36
- }
37
- .tenweb-i-linkedin:before {
38
- content: "\e939";
39
- }
40
- .tenweb-i-spinner:before {
41
- content: "\e93a";
42
- }
43
- .tenweb-i-camera-retro:before {
44
- content: "\e93b";
45
- }
46
- .tenweb-i-share:before {
47
- content: "\e93c";
48
- }
49
- .tenweb-i-step-backward:before {
50
- content: "\e93d";
51
- }
52
- .tenweb-i-step-forward:before {
53
- content: "\e93e";
54
- }
55
- .tenweb-i-user:before {
56
- content: "\e93f";
57
- }
58
- .tenweb-i-clone:before {
59
- content: "\e940";
60
- }
61
- .tenweb-i-pinterest-square:before {
62
- content: "\e900";
63
- }
64
- .tenweb-i-play:before {
65
- content: "\e901";
66
- }
67
- .tenweb-i-refresh:before {
68
- content: "\e902";
69
- }
70
- .tenweb-i-search:before {
71
- content: "\e903";
72
- }
73
- .tenweb-i-star-o:before {
74
- content: "\e907";
75
- }
76
- .tenweb-i-times:before {
77
- content: "\e908";
78
- }
79
- .tenweb-i-tumblr-square:before {
80
- content: "\e90a";
81
- }
82
- .tenweb-i-twitter-square:before {
83
- content: "\e90b";
84
- }
85
- .tenweb-i-angle-down:before {
86
- content: "\e90c";
87
- }
88
- .tenweb-i-angle-left:before {
89
- content: "\e90e";
90
- }
91
- .tenweb-i-angle-right:before {
92
- content: "\e910";
93
- }
94
- .tenweb-i-angle-up:before {
95
- content: "\e912";
96
- }
97
- .tenweb-i-arrows-in:before {
98
- content: "\e917";
99
- }
100
- .tenweb-i-arrows-out:before {
101
- content: "\e918";
102
- }
103
- .tenweb-i-chevron-left-sm:before {
104
- content: "\e921";
105
- }
106
- .tenweb-i-chevron-right-sm:before {
107
- content: "\e923";
108
- }
109
- .tenweb-i-comment-square:before {
110
- content: "\e928";
111
- }
112
- .tenweb-i-compress:before {
113
- content: "\e929";
114
- }
115
- .tenweb-i-download:before {
116
- content: "\e92c";
117
- }
118
- .tenweb-i-expand:before {
119
- content: "\e92d";
120
- }
121
- .tenweb-i-facebook-square:before {
122
- content: "\e92e";
123
- }
124
- .tenweb-i-heart-o:before {
125
- content: "\e933";
126
- }
127
- .tenweb-i-info-circle:before {
128
- content: "\e934";
129
- }
130
- .tenweb-i-pause:before {
131
- content: "\e936";
132
- }
1
+ @font-face {
2
+ font-family: 'tenweb';
3
+ src: url('fonts/tenweb.eot?4znsty');
4
+ src: url('fonts/tenweb.eot?4znsty#iefix') format('embedded-opentype'),
5
+ url('fonts/tenweb.ttf?4znsty') format('truetype'),
6
+ url('fonts/tenweb.woff?4znsty') format('woff'),
7
+ url('fonts/tenweb.svg?4znsty#tenweb') format('svg');
8
+ font-weight: normal;
9
+ font-style: normal;
10
+ font-display: block;
11
+ }
12
+
13
+ [class^="tenweb-i-"], [class*=" tenweb-i-"] {
14
+ /* use !important to prevent issues with browser extensions that change fonts */
15
+ font-family: 'tenweb' !important;
16
+ speak: none;
17
+ font-style: normal;
18
+ font-weight: normal;
19
+ font-variant: normal;
20
+ text-transform: none;
21
+ line-height: 1;
22
+
23
+ /* Better Font Rendering =========== */
24
+ -webkit-font-smoothing: antialiased;
25
+ -moz-osx-font-smoothing: grayscale;
26
+ }
27
+
28
+ .tenweb-i-arrow-right:before {
29
+ content: "\e904";
30
+ }
31
+ .tenweb-i-arrow-left:before {
32
+ content: "\e905";
33
+ }
34
+ .tenweb-i-instagram:before {
35
+ content: "\e938";
36
+ }
37
+ .tenweb-i-linkedin:before {
38
+ content: "\e939";
39
+ }
40
+ .tenweb-i-spinner:before {
41
+ content: "\e93a";
42
+ }
43
+ .tenweb-i-camera-retro:before {
44
+ content: "\e93b";
45
+ }
46
+ .tenweb-i-share:before {
47
+ content: "\e93c";
48
+ }
49
+ .tenweb-i-step-backward:before {
50
+ content: "\e93d";
51
+ }
52
+ .tenweb-i-step-forward:before {
53
+ content: "\e93e";
54
+ }
55
+ .tenweb-i-user:before {
56
+ content: "\e93f";
57
+ }
58
+ .tenweb-i-clone:before {
59
+ content: "\e940";
60
+ }
61
+ .tenweb-i-pinterest-square:before {
62
+ content: "\e900";
63
+ }
64
+ .tenweb-i-play:before {
65
+ content: "\e901";
66
+ }
67
+ .tenweb-i-refresh:before {
68
+ content: "\e902";
69
+ }
70
+ .tenweb-i-search:before {
71
+ content: "\e903";
72
+ }
73
+ .tenweb-i-star-o:before {
74
+ content: "\e907";
75
+ }
76
+ .tenweb-i-times:before {
77
+ content: "\e908";
78
+ }
79
+ .tenweb-i-tumblr-square:before {
80
+ content: "\e90a";
81
+ }
82
+ .tenweb-i-twitter-square:before {
83
+ content: "\e90b";
84
+ }
85
+ .tenweb-i-angle-down:before {
86
+ content: "\e90c";
87
+ }
88
+ .tenweb-i-angle-left:before {
89
+ content: "\e90e";
90
+ }
91
+ .tenweb-i-angle-right:before {
92
+ content: "\e910";
93
+ }
94
+ .tenweb-i-angle-up:before {
95
+ content: "\e912";
96
+ }
97
+ .tenweb-i-arrows-in:before {
98
+ content: "\e917";
99
+ }
100
+ .tenweb-i-arrows-out:before {
101
+ content: "\e918";
102
+ }
103
+ .tenweb-i-chevron-left-sm:before {
104
+ content: "\e921";
105
+ }
106
+ .tenweb-i-chevron-right-sm:before {
107
+ content: "\e923";
108
+ }
109
+ .tenweb-i-comment-square:before {
110
+ content: "\e928";
111
+ }
112
+ .tenweb-i-compress:before {
113
+ content: "\e929";
114
+ }
115
+ .tenweb-i-download:before {
116
+ content: "\e92c";
117
+ }
118
+ .tenweb-i-expand:before {
119
+ content: "\e92d";
120
+ }
121
+ .tenweb-i-facebook-square:before {
122
+ content: "\e92e";
123
+ }
124
+ .tenweb-i-heart-o:before {
125
+ content: "\e933";
126
+ }
127
+ .tenweb-i-info-circle:before {
128
+ content: "\e934";
129
+ }
130
+ .tenweb-i-pause:before {
131
+ content: "\e936";
132
+ }
css/tenweb-fonts/fonts/tenweb.svg CHANGED
@@ -1,45 +1,45 @@
1
- <?xml version="1.0" standalone="no"?>
2
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
- <svg xmlns="http://www.w3.org/2000/svg">
4
- <metadata>Generated by IcoMoon</metadata>
5
- <defs>
6
- <font id="tenweb" horiz-adv-x="1024">
7
- <font-face units-per-em="1024" ascent="960" descent="-64" />
8
- <missing-glyph horiz-adv-x="1024" />
9
- <glyph unicode="&#x20;" horiz-adv-x="512" d="" />
10
- <glyph unicode="&#xe900;" glyph-name="pinterest-square" d="M853.333-64h-682.667c-94.506 1.152-170.674 78.032-170.674 172.703 0 0.57 0.003 1.139 0.008 1.708l-0.001-0.087v675.352c-0.005 0.482-0.008 1.051-0.008 1.621 0 94.67 76.168 171.55 170.565 172.702l0.109 0.001h682.667c94.506-1.152 170.674-78.032 170.674-172.703 0-0.57-0.003-1.139-0.008-1.708l0.001 0.087v-675.352c0.005-0.482 0.008-1.051 0.008-1.621 0-94.67-76.168-171.55-170.565-172.702l-0.109-0.001zM462.019 661.577c-41.545 0-74.021-44.568-74.021-101.474-0.006-0.517-0.010-1.127-0.010-1.739 0-21.792 4.505-42.531 12.635-61.338l-0.386 1.003-11.459-49.396c-12.971-56.271-33.061-143.214-38.181-164.279-4.442-23.301-6.983-50.102-6.983-77.496 0-24.671 2.061-48.861 6.019-72.406l-0.353 2.544v-1.56c0.279-2.452 2.343-4.34 4.847-4.34 0.010 0 0.021 0 0.031 0h-0.002c0 0 0 0 0 0 1.684 0 3.181 0.798 4.135 2.036l0.009 0.012 1.122 1.414c28.919 36.047 52.15 78.166 67.438 123.922l0.828 2.859c4.876 17.31 26.77 106.886 27.014 107.764 19.823-29.585 53.123-48.799 90.911-48.799 1.005 0 2.007 0.014 3.006 0.041l-0.147-0.003c121.905 0 207.141 110.494 207.141 268.727-2.474 65.097-30.892 123.106-75.147 164.344l-0.141 0.13c-40.316 37.536-94.566 60.574-154.197 60.574-4.748 0-9.461-0.146-14.136-0.434l0.641 0.032c-171.837 0-274.334-124.538-274.334-244.98-0.567-4.924-0.891-10.631-0.891-16.413 0-57.314 31.795-107.202 78.709-132.988l0.786-0.396c1.938-0.865 4.196-1.382 6.571-1.414h0.012c6.448 0.153 11.734 4.935 12.669 11.143l0.009 0.072c0.829 3.072 2.048 8.29 3.413 13.751 1.658 6.827 3.413 13.8 4.389 17.749 0.848 2.089 1.34 4.511 1.34 7.049 0 5.911-2.67 11.199-6.869 14.723l-0.030 0.024c-15.574 19.511-24.99 44.534-24.99 71.756 0 1.86 0.044 3.709 0.131 5.547l-0.010-0.26c-0.006 0.573-0.010 1.249-0.010 1.926 0 49.919 19.313 95.327 50.874 129.16l-0.103-0.112c33.685 35.048 80.958 56.822 133.317 56.822 1.697 0 3.388-0.023 5.074-0.068l-0.249 0.005c4.665 0.543 10.069 0.852 15.546 0.852 37.904 0 72.345-14.826 97.84-38.995l-0.064 0.060c28.652-27.173 46.479-65.517 46.479-108.024 0-1.452-0.021-2.898-0.062-4.34l0.005 0.212c0-118.882-52.517-208.506-121.905-208.506-0.344-0.007-0.75-0.011-1.156-0.011-19.798 0-37.45 9.189-48.923 23.535l-0.096 0.125c-7.711 10.079-12.356 22.86-12.356 36.726 0 5.386 0.701 10.608 2.016 15.581l-0.095-0.424c4.145 17.944 9.752 36.425 15.165 54.321 9.302 24.823 15.938 53.621 18.631 83.555l0.094 1.291c0.237 1.889 0.373 4.074 0.373 6.291 0 13.475-5.001 25.783-13.248 35.167l0.051-0.060c-9.39 10.725-23.109 17.46-38.4 17.46-0.214 0-0.428-0.001-0.642-0.004h0.032z" />
11
- <glyph unicode="&#xe901;" glyph-name="play" d="M190.513 928.987c7.091 4.169 15.619 6.632 24.722 6.632s17.632-2.463 24.955-6.758l-0.233 0.126 589.141-428.081c14.879-8.697 24.716-24.594 24.716-42.789s-9.837-34.091-24.483-42.662l-0.234-0.126-589.141-428.081c-7.092-4.165-15.62-6.624-24.722-6.624-27.305 0-49.44 22.133-49.445 49.437v0 856.113c0.003 18.202 9.841 34.106 24.489 42.687l0.233 0.126z" />
12
- <glyph unicode="&#xe902;" glyph-name="refresh" d="M934.619 369.981c-9.164 14.726-25.262 24.382-43.614 24.382-0.095 0-0.191 0-0.286-0.001h0.015c-2.618 0.371-5.641 0.583-8.714 0.583-32.168 0-58.91-23.228-64.37-53.826l-0.059-0.396c-24.056-142.706-145.282-250.522-292.255-253.557l-0.316-0.005h-4.876c-166.815 0.453-301.869 135.787-301.869 302.664 0 160.014 124.174 291.026 281.417 301.931l0.947 0.053v-97.524c-0.087-0.663-0.137-1.429-0.137-2.207 0-4.827 1.911-9.208 5.018-12.427l-0.005 0.005c4.876-14.629 24.381-14.629 34.133-9.752l214.552 160.914c4.876 0 4.876 4.876 9.752 9.752 4.876 14.629 4.876 29.257-9.752 34.133l-214.552 165.79c0 4.876-4.876 4.876-9.752 4.876-0.628 0.051-1.36 0.081-2.099 0.081-14.079 0-25.669-10.655-27.147-24.341l-0.011-0.121v-97.524c-216.127-6.907-391.569-172.24-414.31-383.32l-0.166-1.899c-1.993-15.616-3.131-33.682-3.131-52.015 0-221.815 166.544-404.731 381.407-430.526l2.066-0.202c14.629 0 34.133-4.876 48.762-4.876 215.652 0.135 394.577 157.206 428.758 363.181l0.347 2.533c1.371 4.942 2.159 10.616 2.159 16.475 0 13.944-4.464 26.845-12.041 37.352l0.13-0.189z" />
13
- <glyph unicode="&#xe903;" glyph-name="search" d="M971.776 43.471v0l-229.181 238.933c55.081 68.606 88.402 156.733 88.402 252.643 0 123.082-54.876 233.348-141.497 307.664l-0.543 0.455c-69.546 57.518-159.64 92.409-257.884 92.409-122.797 0-232.861-54.51-307.317-140.653l-0.437-0.517c-58.497-69.347-94.048-159.711-94.048-258.378 0-122.973 55.224-233.047 142.225-306.777l0.585-0.483c70.103-56.823 160.111-91.588 258.204-92.646l0.234-0.002c83.582 0.912 161.063 26.265 225.849 69.23l-1.544-0.963 229.181-238.933c9.827-10.813 23.459-18.017 38.766-19.486l0.244-0.019h4.876c0.442-0.013 0.961-0.020 1.482-0.020 14.496 0 27.692 5.568 37.565 14.683l-0.038-0.034c10.813 9.827 18.017 23.459 19.486 38.766l0.019 0.244c0.933 3.29 1.47 7.070 1.47 10.974 0 13.337-6.263 25.212-16.008 32.843l-0.091 0.069zM430.519 253.147c-156.197 0-282.819 126.622-282.819 282.819s126.622 282.819 282.819 282.819c156.197 0 282.819-126.622 282.819-282.819v0c0-156.197-126.622-282.819-282.819-282.819v0z" />
14
- <glyph unicode="&#xe904;" glyph-name="arrow-right" horiz-adv-x="1550" d="M1545.967 412.193c-0.2 0.888-0.314 1.907-0.314 2.953s0.115 2.066 0.332 3.046l-0.017-0.093c0.521 4.541 0.819 9.803 0.819 15.135s-0.297 10.594-0.877 15.771l0.058-0.636c0.521 4.431 0.818 9.563 0.818 14.766s-0.297 10.335-0.876 15.382l0.057-0.617c-0.158 0.888-0.248 1.91-0.248 2.953s0.090 2.065 0.263 3.059l-0.015-0.106c-2.399 8.922-4.92 16.292-7.854 23.448l0.472-1.299c-7.938 18.332-18.637 33.999-31.76 47.264l0.013-0.013-362.497 363.236c-27.142 27.051-64.59 43.775-105.944 43.775-82.892 0-150.088-67.197-150.088-150.088 0-41.537 16.874-79.134 44.14-106.309l105.579-105.579h-890.371c-83.587 0-151.348-67.761-151.348-151.348s67.761-151.348 151.348-151.348v0h885.941l-101.145-103.36c-27.113-27.113-43.883-64.57-43.883-105.944 0-82.747 67.080-149.827 149.827-149.827 41.374 0 78.83 16.77 105.944 43.883v0l362.497 361.759c13.109 13.251 23.809 28.918 31.366 46.269l0.381 0.981c2.953 8.121 5.168 15.504 7.383 22.887z" />
15
- <glyph unicode="&#xe905;" glyph-name="arrow-left" horiz-adv-x="1550" d="M1402.74 598.241h-885.941l101.145 105.575c27.271 27.179 44.145 64.775 44.145 106.313 0 82.892-67.197 150.088-150.088 150.088-41.354 0-78.802-16.725-105.948-43.78l-362.493-362.493c-13.109-13.251-23.809-28.918-31.366-46.269l-0.381-0.981c0-8.121-5.168-15.504-7.383-22.887 0.2-0.888 0.314-1.907 0.314-2.953s-0.115-2.066-0.332-3.046l0.017 0.093c-0.521-4.431-0.818-9.563-0.818-14.766s0.297-10.335 0.876-15.382l-0.057 0.617c-0.521-4.541-0.819-9.803-0.819-15.135s0.297-10.594 0.877-15.771l-0.058 0.636c0.153-0.777 0.24-1.67 0.24-2.584s-0.087-1.807-0.254-2.672l0.014 0.088c2.41-9.253 4.934-16.876 7.873-24.29l-0.491 1.403c7.749-18.656 18.478-34.594 31.757-48l-0.011 0.011 362.497-361.759c27.113-27.113 64.57-43.883 105.944-43.883 82.747 0 149.827 67.080 149.827 149.827 0 41.374-16.77 78.83-43.883 105.944v0l-105.575 103.36h890.371c83.587 0 151.348 67.761 151.348 151.348s-67.761 151.348-151.348 151.348v0z" />
16
- <glyph unicode="&#xe907;" glyph-name="star-o" d="M967.826 605.355c-16.528 15.79-37.705 26.845-61.274 30.912l-0.702 0.1-203.678 30.964-92.94 185.978c-12.756 25.216-34.682 44.237-61.285 52.893l-0.741 0.208c-10.017 2.967-21.526 4.674-33.433 4.674-16.677 0-32.571-3.349-47.048-9.41l0.804 0.299c-21.611-12.029-38.498-30.315-48.475-52.392l-0.287-0.709-92.891-181.541-203.63-31.013c-28.627-4.472-53.259-18.944-70.708-39.665l-0.143-0.174c-13.933-21.052-22.23-46.894-22.23-74.673 0-1.76 0.033-3.512 0.099-5.256l-0.008 0.251c4.167-24.271 15.222-45.448 31.055-62.022l-0.043 0.045 146.286-146.286-35.401-203.63c-0.598-4.635-0.939-9.996-0.939-15.436 0-27.382 8.641-52.745 23.344-73.513l-0.267 0.397c20.009-23.735 49.758-38.71 83.005-38.71 18.202 0 35.356 4.488 50.415 12.419l-0.592-0.284 181.492 97.524 181.492-97.524c13.32-8.338 29.504-13.284 46.843-13.284 0.675 0 1.348 0.007 2.019 0.022l-0.1-0.002c33.806 0.047 63.999 15.473 83.966 39.654l0.148 0.185c15.813 16.525 25.548 38.98 25.548 63.708 0 8.844-1.245 17.397-3.57 25.494l0.16-0.651-35.401 203.63 146.286 146.286c25.254 18.233 41.499 47.586 41.499 80.733 0 27.214-10.95 51.871-28.684 69.804l0.009-0.009zM901.413 516.803l-154.965-150.528c-14.125-12.647-22.973-30.938-22.973-51.295 0-3.771 0.304-7.471 0.888-11.076l-0.053 0.395 35.401-212.699c0.076-0.59 0.119-1.272 0.119-1.965 0-4.39-1.737-8.374-4.561-11.303l0.005 0.005c0-8.875-8.875-8.875-17.701-4.437l-190.171 101.815c-9.001 4.747-19.539 7.92-30.714 8.855l-0.299 0.020c-13.002-0.93-25.042-4.105-36.052-9.141l0.65 0.267-190.171-101.815c-8.875-4.437-17.701-4.437-22.138 4.437-2.819 2.924-4.556 6.908-4.556 11.298 0 0.693 0.043 1.375 0.127 2.045l-0.008-0.080 35.401 212.504c0.724 3.642 1.138 7.829 1.138 12.113 0 19.977-9.005 37.85-23.177 49.782l-0.099 0.081-150.723 150.723-8.972 8.777c0 8.875 0 13.263 4.437 13.263 0 4.437 4.437 4.437 13.263 8.875l212.504 31.013c23.656 3.768 43.119 18.844 52.919 39.412l0.183 0.427 92.989 194.706c0 4.437 4.437 4.437 8.875 8.875h17.701c4.702-0.444 8.408-4.167 8.823-8.837l0.003-0.037 92.989-190.171c9.983-20.994 29.445-36.071 52.699-39.785l0.403-0.053 212.504-31.013c3.5-0.495 6.557-2.098 8.873-4.436l0.001-0.001c13.263-13.263 13.263-22.235 4.437-31.013z" />
17
- <glyph unicode="&#xe908;" glyph-name="times" d="M633.71 448l365.129 365.129c14.672 15.409 23.699 36.31 23.699 59.32 0 47.546-38.543 86.089-86.089 86.089-23.009 0-43.911-9.027-59.355-23.733l0.035 0.033-365.129-365.129-365.056 365.129c-15.409 14.672-36.31 23.699-59.32 23.699-47.546 0-86.089-38.543-86.089-86.089 0-23.009 9.027-43.911 23.733-59.355l-0.033 0.035 365.056-365.129-365.056-365.056c-16.505-15.715-26.769-37.854-26.769-62.39 0-47.546 38.543-86.089 86.089-86.089 24.536 0 46.675 10.265 62.357 26.734l0.033 0.035 365.056 365.129 365.129-365.129c15.409-14.672 36.31-23.699 59.32-23.699 47.546 0 86.089 38.543 86.089 86.089 0 23.009-9.027 43.911-23.733 59.355l0.033-0.035z" />
18
- <glyph unicode="&#xe90a;" glyph-name="tumblr-square" d="M853.285-64h-682.667c-94.506 1.152-170.674 78.032-170.674 172.703 0 0.57 0.003 1.139 0.008 1.708l-0.001-0.087v675.352c-0.005 0.482-0.008 1.051-0.008 1.621 0 94.67 76.168 171.55 170.565 172.702l0.109 0.001h682.667c94.506-1.152 170.674-78.032 170.674-172.703 0-0.57-0.003-1.139-0.008-1.708l0.001 0.087v-675.352c0.005-0.482 0.008-1.051 0.008-1.621 0-94.67-76.168-171.55-170.565-172.702l-0.109-0.001zM393.46 532.358v0c0.245 0.034 0.528 0.054 0.816 0.054 1.557 0 2.98-0.575 4.068-1.523l-0.007 0.006c0.826-1.11 1.322-2.508 1.322-4.021 0-0.301-0.020-0.598-0.058-0.889l0.004 0.034c0-8.777 0-17.701 0-26.331q0.439-42.959 0.78-85.918v-0.975c0.439-52.712 0.926-107.276 1.609-160.914 0.922-25.072 10.816-47.67 26.546-64.831l-0.068 0.075c27.716-33.163 68.743-54.403 114.757-55.439l0.175-0.003c8.094-0.341 17.506-0.683 26.819-0.683 1.695-0.051 3.69-0.080 5.691-0.080 20.915 0 41.086 3.184 60.054 9.095l-1.428-0.383c23.176 7.583 42.529 15.589 61.158 24.837l-2.644-1.187c3.755 1.853 6.632 3.657 6.632 9.167v95.281c0.013 0.3 0.021 0.652 0.021 1.006 0 1.141-0.078 2.264-0.23 3.364l0.014-0.127v0.39c-4.535-2.292-9.021-4.876-13.361-7.168-7.537-4.465-16.572-9.036-25.907-13.044l-1.595-0.609c-13.436-5.752-29.053-9.205-45.446-9.459l-0.098-0.001c-0.023 0-0.050 0-0.077 0-11.625 0-22.762 2.092-33.054 5.919l0.656-0.214c-19.62 5.797-34.206 22.361-37.028 42.687l-0.031 0.272c-1.615 12.093-2.537 26.073-2.537 40.269 0 0.277 0 0.555 0.001 0.832v-0.043c-0.293 48.762-0.39 97.768-0.439 145.408v55.394h133.754c5.803 0 7.802 2.097 7.802 8.387-0.098 30.476-0.098 61.391-0.098 91.819 0 6.632-2.097 8.631-8.875 8.631h-132.876v29.94c-0.439 44.861-0.683 90.21-0.975 134.095v1.073c0.066 0.391 0.103 0.841 0.103 1.3 0 1.695-0.512 3.271-1.39 4.581l0.019-0.030c-1.014 0.865-2.339 1.391-3.788 1.391-0.194 0-0.387-0.009-0.576-0.028l0.024 0.002h-72.85c-5.169 0-6.68-2.731-7.509-7.461l-0.488-1.707c-2.536-14.629-5.169-30.184-8.728-45.056-7.774-32.558-23.086-60.797-44.023-83.829l0.138 0.154c-16.206-17.405-35.79-31.426-57.736-41.058l-1.12-0.438c-4.224-1.133-7.282-4.926-7.282-9.434 0-0.525 0.042-1.041 0.122-1.544l-0.007 0.055v-90.795h0.78c0.287 0.006 0.625 0.009 0.964 0.009 2.343 0 4.647-0.163 6.903-0.478l-0.26 0.030h50.42z" />
19
- <glyph unicode="&#xe90b;" glyph-name="twitter-square" d="M853.333-64h-682.667c-94.506 1.152-170.674 78.032-170.674 172.703 0 0.57 0.003 1.139 0.008 1.708l-0.001-0.087v675.352c-0.005 0.482-0.008 1.051-0.008 1.621 0 94.67 76.168 171.55 170.565 172.702l0.109 0.001h682.667c94.506-1.152 170.674-78.032 170.674-172.703 0-0.57-0.003-1.139-0.008-1.708l0.001 0.087v-675.352c0.005-0.482 0.008-1.051 0.008-1.621 0-94.67-76.168-171.55-170.565-172.702l-0.109-0.001zM200.509 263.192v0c51.345-33.931 114.353-54.132 182.078-54.132 92.957 0 177.026 38.056 237.477 99.438l0.041 0.042c60.332 61.855 97.547 146.502 97.547 239.841 0 1.395-0.008 2.789-0.025 4.18l0.002-0.211c0 4.632 0 9.46-0.439 15.604 23.369 17.211 43.001 37.899 58.545 61.518l0.555 0.897c-19.857-9.092-42.893-15.791-67.046-18.936l-1.221-0.13c24.558 15.174 42.934 38.342 51.651 65.811l0.232 0.846c-21.52-13.297-46.589-23.442-73.34-28.995l-1.509-0.262c-21.418 22.895-51.813 37.164-85.541 37.164-20.478 0-39.728-5.26-56.472-14.502l0.603 0.305c-37.657-21.231-62.67-60.968-62.67-106.546 0-9.349 1.052-18.451 3.045-27.196l-0.157 0.818c-98.854 5.533-185.536 53.332-242.946 125.468l-0.522 0.679c-10.080-17.388-16.029-38.257-16.029-60.515 0-41.419 20.599-78.028 52.112-100.139l0.391-0.26c-19.669 0.463-37.988 5.831-53.906 14.923l0.56-0.295v-1.365c-0.001-0.196-0.002-0.428-0.002-0.66 0-57.381 40.062-105.405 93.742-117.628l0.809-0.155c-8.998-2.541-19.332-4.002-30.007-4.002-0.319 0-0.638 0.001-0.957 0.004h0.049c-0.606-0.013-1.32-0.021-2.036-0.021-7.205 0-14.23 0.771-20.997 2.236l0.651-0.118c15.188-47.912 58.539-82.325 110.161-83.963l0.187-0.005c-39.718-31.943-90.727-51.314-146.257-51.444h-0.029c-0.419-0.003-0.914-0.005-1.41-0.005-9.473 0-18.802 0.622-27.946 1.827l1.074-0.116z" />
20
- <glyph unicode="&#xe90c;" glyph-name="angle-down" d="M463.726 199.168l-419.352 404.724c-12.331 11.733-20.001 28.267-20.001 46.592s7.67 34.859 19.974 46.567l0.027 0.025c12.544 11.952 29.563 19.305 48.299 19.305s35.755-7.354 48.327-19.332l-0.028 0.027 371.029-358.156 371.029 357.912c12.544 11.952 29.563 19.305 48.299 19.305s35.755-7.354 48.327-19.332l-0.028 0.027c12.331-11.733 20.001-28.267 20.001-46.592s-7.67-34.859-19.974-46.567l-0.027-0.025-419.352-404.724c-12.536-11.948-29.547-19.3-48.274-19.3s-35.738 7.352-48.302 19.327l0.028-0.027z" />
21
- <glyph unicode="&#xe90e;" glyph-name="angle-left" d="M263.851 496.274l419.352 419.352c12.359 12.365 29.436 20.013 48.299 20.013 37.714 0 68.287-30.573 68.287-68.287 0-18.851-7.638-35.918-19.989-48.275l-371.078-371.078 371.029-371.029c12.361-12.361 20.006-29.437 20.006-48.299 0-37.724-30.581-68.305-68.305-68.305-18.862 0-35.938 7.645-48.299 20.006l-419.352 419.352c-12.355 12.354-19.997 29.422-19.997 48.274s7.642 35.92 19.997 48.274v0z" />
22
- <glyph unicode="&#xe910;" glyph-name="angle-right" d="M760.149 399.726l-419.352-419.352c-12.359-12.365-29.436-20.013-48.299-20.013-37.714 0-68.287 30.573-68.287 68.287 0 18.851 7.638 35.918 19.989 48.275l371.078 371.078-371.029 371.029c-12.361 12.361-20.006 29.437-20.006 48.299 0 37.724 30.581 68.305 68.305 68.305 18.862 0 35.938-7.645 48.299-20.006l419.352-419.352c12.355-12.354 19.997-29.422 19.997-48.274s-7.642-35.92-19.997-48.274v0z" />
23
- <glyph unicode="&#xe912;" glyph-name="angle-up" d="M560.274 696.832l419.352-404.724c12.331-11.733 20.001-28.267 20.001-46.592s-7.67-34.859-19.974-46.567l-0.027-0.025c-12.544-11.952-29.563-19.305-48.299-19.305s-35.755 7.354-48.327 19.332l0.028-0.027-371.029 358.156-371.029-357.912c-12.544-11.952-29.563-19.305-48.299-19.305s-35.755 7.354-48.327 19.332l0.028-0.027c-12.331 11.733-20.001 28.267-20.001 46.592s7.67 34.859 19.974 46.567l0.027 0.025 419.352 404.724c12.536 11.948 29.547 19.3 48.274 19.3s35.738-7.352 48.302-19.327l-0.028 0.027z" />
24
- <glyph unicode="&#xe917;" glyph-name="arrows-in" d="M625.323 367.738h284.331c0.137 0.002 0.299 0.003 0.461 0.003 11.13 0 21.182-4.615 28.347-12.035l0.011-0.011c7.439-7.245 12.054-17.359 12.054-28.55s-4.615-21.305-12.045-28.542l-0.009-0.008-91.624-91.429 138.874-138.923c3.948-3.647 6.411-8.85 6.411-14.629s-2.464-10.982-6.398-14.616l-0.013-0.012-72.363-72.216c-3.658-3.899-8.829-6.342-14.571-6.388h-0.008c-0.006 0-0.014 0-0.022 0-5.767 0-10.962 2.454-14.595 6.375l-0.012 0.013-138.874 138.923-91.38-91.429c-7.245-7.439-17.359-12.054-28.55-12.054s-21.305 4.615-28.542 12.045l-0.008 0.009c-7.429 7.114-12.046 17.113-12.046 28.19 0 0.118 0.001 0.236 0.002 0.353v-0.018 284.379c0.272 22.296 18.274 40.298 40.544 40.57h0.026zM398.629 528.262h-284.233c-0.065 0-0.142-0.001-0.219-0.001-11.129 0-21.18 4.614-28.345 12.033l-0.011 0.011c-7.431 7.168-12.045 17.213-12.045 28.335 0 0.084 0 0.168 0.001 0.252v-0.013c-0.001 0.1-0.001 0.217-0.001 0.335 0 11.077 4.617 21.076 12.032 28.177l0.014 0.013 91.38 91.38-138.874 138.923c-3.934 3.653-6.388 8.854-6.388 14.628 0 0 0 0 0 0v0c0 0 0 0 0 0 0 5.774 2.454 10.975 6.375 14.617l0.013 0.011 72.363 72.314c3.669 3.911 8.86 6.357 14.623 6.388h0.006c0.006 0 0.014 0 0.022 0 5.767 0 10.962-2.454 14.595-6.375l0.012-0.013 138.923-138.923 91.38 91.429c7.114 7.429 17.113 12.046 28.191 12.046 0.135 0 0.27-0.001 0.404-0.002h-0.021c0.1 0.001 0.217 0.001 0.335 0.001 11.077 0 21.076-4.617 28.177-12.032l0.013-0.014c7.429-7.114 12.046-17.113 12.046-28.19 0-0.118-0.001-0.236-0.002-0.353v0.018-284.331c0.001-0.114 0.002-0.249 0.002-0.384 0-11.077-4.617-21.076-12.032-28.177l-0.014-0.013c-7.118-7.459-17.137-12.096-28.238-12.096-0.17 0-0.339 0.001-0.508 0.003h0.026zM431.738 334.677v-284.331c0.002-0.137 0.003-0.299 0.003-0.461 0-11.13-4.615-21.182-12.035-28.347l-0.011-0.011c-7.245-7.439-17.359-12.054-28.55-12.054s-21.305 4.615-28.542 12.045l-0.008 0.009-91.429 91.624-138.923-138.874c-3.647-3.948-8.85-6.411-14.629-6.411s-10.982 2.464-14.616 6.398l-0.012 0.013-72.216 72.363c-3.899 3.658-6.342 8.829-6.388 14.571v0.008c0 0.006 0 0.014 0 0.022 0 5.767 2.454 10.962 6.375 14.595l0.013 0.012 138.923 138.874-91.429 91.38c-7.439 7.245-12.054 17.359-12.054 28.55s4.615 21.305 12.045 28.542l0.009 0.008c7.114 7.429 17.113 12.046 28.19 12.046 0.118 0 0.236-0.001 0.353-0.002h284.361c22.296-0.272 40.298-18.274 40.57-40.544v-0.026zM592.262 561.371v284.331c-0.002 0.137-0.003 0.299-0.003 0.461 0 11.13 4.615 21.182 12.035 28.347l0.011 0.011c7.245 7.439 17.359 12.054 28.55 12.054s21.305-4.615 28.542-12.045l0.008-0.009 91.429-91.624 138.923 138.874c3.647 3.948 8.85 6.411 14.629 6.411s10.982-2.464 14.616-6.398l0.012-0.013 72.216-72.363c3.899-3.658 6.342-8.829 6.388-14.571v-0.008c0-0.006 0-0.014 0-0.022 0-5.767-2.454-10.962-6.375-14.595l-0.013-0.012-138.923-138.874 91.429-91.38c7.439-7.245 12.054-17.359 12.054-28.55s-4.615-21.305-12.045-28.542l-0.009-0.008c-7.114-7.429-17.113-12.046-28.19-12.046-0.118 0-0.236 0.001-0.353 0.002h-284.361c-22.296 0.272-40.298 18.274-40.57 40.544v0.026z" />
25
- <glyph unicode="&#xe918;" glyph-name="arrows-out" d="M431.933 274.554c0-0.006 0-0.014 0-0.022 0-5.767-2.454-10.962-6.375-14.595l-0.013-0.012-138.971-138.971 91.429-91.429c7.264-7.336 11.751-17.432 11.751-28.576 0-22.33-18.019-40.452-40.31-40.618h-284.444c-22.312 0.298-40.321 18.307-40.618 40.59v284.456c-0.001 0.088-0.001 0.193-0.001 0.298 0 22.298 18.076 40.375 40.375 40.375 11.284 0 21.487-4.629 28.813-12.092l91.435-91.435 138.971 138.971c3.647 3.948 8.85 6.411 14.629 6.411s10.982-2.464 14.616-6.398l0.012-0.013 72.411-72.411c3.905-3.642 6.339-8.818 6.339-14.562 0-0.023 0-0.047 0-0.070v0.004zM999.668 894.952v-284.428c0.001-0.088 0.001-0.193 0.001-0.298 0-22.298-18.076-40.375-40.375-40.375-11.284 0-21.487 4.629-28.813 12.092l-91.435 91.435-138.971-138.971c-3.647-3.948-8.85-6.411-14.629-6.411s-10.982 2.464-14.616 6.398l-0.012 0.013-72.411 72.411c-3.948 3.647-6.411 8.85-6.411 14.629s2.464 10.982 6.398 14.616l0.013 0.012 138.971 138.971-91.429 91.429c-7.264 7.336-11.751 17.432-11.751 28.576 0 22.33 18.019 40.452 40.31 40.618h284.444c22.312-0.298 40.321-18.307 40.618-40.59v-0.028zM338.603 528.067c-0.006 0-0.014 0-0.022 0-5.767 0-10.962 2.454-14.595 6.375l-0.012 0.013-138.679 138.923-91.672-91.331c-7.341-7.292-17.456-11.8-28.624-11.8-22.347 0-40.479 18.046-40.618 40.361v284.344c-0.001 0.114-0.002 0.249-0.002 0.384 0 11.077 4.617 21.076 12.032 28.177l0.014 0.013c7.115 7.429 17.114 12.047 28.191 12.047 0.152 0 0.304-0.001 0.455-0.003h284.454c0.114 0.001 0.249 0.002 0.384 0.002 11.077 0 21.076-4.617 28.177-12.032l0.013-0.014c7.4-7.111 11.998-17.091 11.998-28.144 0-0.151-0.001-0.302-0.003-0.453v0.023c0.001-0.114 0.002-0.249 0.002-0.384 0-11.077-4.617-21.076-12.032-28.177l-0.014-0.013-91.429-91.429 138.971-138.971c3.948-3.647 6.411-8.85 6.411-14.629s-2.464-10.982-6.398-14.616l-0.013-0.012-72.411-72.411c-3.639-3.876-8.796-6.291-14.517-6.291-0.039 0-0.079 0-0.118 0h0.006zM959-39.668h-284.428c-0.088-0.001-0.193-0.001-0.298-0.001-22.298 0-40.375 18.076-40.375 40.375 0 11.284 4.629 21.487 12.092 28.813l0.006 0.006 91.429 91.721-138.923 138.971c-3.948 3.647-6.411 8.85-6.411 14.629s2.464 10.982 6.398 14.616l0.013 0.012 72.46 72.070c3.647 3.948 8.85 6.411 14.629 6.411s10.982-2.464 14.616-6.398l0.012-0.013 138.971-138.971 91.234 91.429c7.114 7.429 17.113 12.046 28.191 12.046 0.135 0 0.27-0.001 0.404-0.002h-0.021c0.114 0.001 0.249 0.002 0.384 0.002 11.077 0 21.076-4.617 28.177-12.032l0.013-0.014c7.429-7.114 12.046-17.113 12.046-28.19 0-0.118-0.001-0.236-0.002-0.353v0.018-284.428c0.001-0.114 0.002-0.249 0.002-0.384 0-11.077-4.617-21.076-12.032-28.177l-0.014-0.013c-7.122-7.486-17.159-12.143-28.283-12.143-0.103 0-0.205 0-0.307 0.001h0.016z" />
26
- <glyph unicode="&#xe921;" glyph-name="chevron-left-sm" d="M466.651 424.692l202.167 202.216c9.010 9.819 14.532 22.965 14.532 37.4s-5.522 27.582-14.569 37.441l0.037-0.041c-9.819 9.010-22.965 14.532-37.4 14.532s-27.582-5.522-37.441-14.569l0.041 0.037-238.202-241.030c-9.010-9.819-14.532-22.965-14.532-37.4s5.522-27.582 14.569-37.441l-0.037 0.041 238.202-238.202c9.19-9.636 21.896-15.849 36.052-16.574l0.129-0.005c0.359-0.010 0.781-0.016 1.204-0.016 14.018 0 26.528 6.458 34.717 16.561l0.065 0.083c9.010 9.819 14.532 22.965 14.532 37.4s-5.522 27.582-14.569 37.441l0.037-0.041z" />
27
- <glyph unicode="&#xe923;" glyph-name="chevron-right-sm" d="M558.031 422.546l-202.167-202.216c-9.010-9.819-14.532-22.965-14.532-37.4s5.522-27.582 14.569-37.441l-0.037 0.041c9.819-9.010 22.965-14.532 37.4-14.532s27.582 5.522 37.441 14.569l-0.041-0.037 238.202 241.030c9.010 9.819 14.532 22.965 14.532 37.4s-5.522 27.582-14.569 37.441l0.037-0.041-238.202 238.202c-9.19 9.636-21.896 15.849-36.052 16.574l-0.129 0.005c-0.359 0.010-0.781 0.016-1.204 0.016-14.018 0-26.528-6.458-34.717-16.561l-0.065-0.083c-9.010-9.819-14.532-22.965-14.532-37.4s5.522-27.582 14.569-37.441l-0.037 0.041z" />
28
- <glyph unicode="&#xe928;" glyph-name="comment-square" d="M853.333 911.238h-682.667c-94.134-0.304-170.363-76.532-170.667-170.637v-426.696c0.304-94.134 76.532-170.363 170.637-170.667h0.029v-128.049c0.311-23.326 19.293-42.115 42.663-42.115 11.646 0 22.202 4.666 29.901 12.23l157.934 157.934h452.169c94.134 0.304 170.363 76.532 170.667 170.637v426.696c-0.304 94.134-76.532 170.363-170.637 170.667h-0.029z" />
29
- <glyph unicode="&#xe929;" glyph-name="compress" d="M431.982 342.089v-284.477c0.002-0.137 0.003-0.299 0.003-0.461 0-11.13-4.615-21.182-12.035-28.347l-0.011-0.011c-7.253-7.442-17.375-12.058-28.574-12.058s-21.321 4.616-28.566 12.049l-0.008 0.008-91.429 91.672-138.971-138.923c-3.653-3.934-8.854-6.388-14.629-6.388s-10.975 2.454-14.617 6.376l-0.012 0.013-72.363 72.363c-3.948 3.647-6.411 8.85-6.411 14.629s2.464 10.982 6.398 14.616l0.013 0.012 138.971 138.971-91.38 91.331c-7.442 7.253-12.058 17.375-12.058 28.574s4.616 21.321 12.049 28.566l0.008 0.008c7.114 7.429 17.113 12.046 28.19 12.046 0.118 0 0.236-0.001 0.353-0.002h284.41c22.333-0.271 40.369-18.29 40.667-40.59v-0.028zM592.018 568.832v284.331c0 0.065-0.001 0.142-0.001 0.219 0 11.129 4.614 21.18 12.033 28.345l0.011 0.011c7.176 7.431 17.227 12.045 28.356 12.045 0.077 0 0.154 0 0.231-0.001h-0.012c0.1 0.001 0.217 0.001 0.335 0.001 11.077 0 21.076-4.617 28.177-12.032l0.013-0.014 91.429-91.429 138.971 138.923c3.638 3.933 8.825 6.388 14.586 6.388 0.015 0 0.030 0 0.045 0h-0.002c0 0 0 0 0 0 5.774 0 10.975-2.454 14.617-6.375l0.011-0.013 72.363-72.363c3.911-3.669 6.357-8.86 6.388-14.623v-0.006c-0.019-5.771-2.468-10.966-6.376-14.618l-0.012-0.011-138.971-138.971 91.429-91.429c7.429-7.114 12.046-17.113 12.046-28.191 0-0.135-0.001-0.27-0.002-0.404v0.021c0.001-0.1 0.001-0.217 0.001-0.335 0-11.077-4.617-21.076-12.032-28.177l-0.014-0.013c-7.114-7.429-17.113-12.046-28.19-12.046-0.118 0-0.236 0.001-0.353 0.002h-284.41c-0.114-0.001-0.249-0.002-0.384-0.002-11.077 0-21.076 4.617-28.177 12.032l-0.013 0.014c-7.459 7.118-12.096 17.137-12.096 28.238 0 0.17 0.001 0.339 0.003 0.508v-0.026z" />
30
- <glyph unicode="&#xe92c;" glyph-name="download" d="M989.867 277.333c-9.835 9.080-23.031 14.648-37.527 14.648-0.521 0-1.041-0.007-1.559-0.022l0.076 0.002c-29.513-0.273-53.365-24.125-53.638-53.612v-185.321h-789.943v185.295c-0.273 29.513-24.125 53.365-53.612 53.638h-0.026c-29.513-0.273-53.365-24.125-53.638-53.612v-238.959c-0.013-0.447-0.020-0.973-0.020-1.501 0-14.49 5.569-27.68 14.683-37.546l-0.034 0.037c9.828-9.080 23.018-14.649 37.509-14.649 0.528 0 1.054 0.007 1.578 0.022l-0.077-0.002h902.095c29.513 0.273 53.365 24.125 53.638 53.612v238.959c-2.563 15.289-9.527 28.632-19.528 39.034l0.023-0.024zM477.867 218.819l9.752-9.752c5.542-2.141 11.954-3.382 18.657-3.382 13.424 0 25.686 4.977 35.042 13.186l-0.060-0.052 238.933 253.562c8.816 9.26 14.239 21.819 14.239 35.646 0 28.573-23.163 51.736-51.736 51.736-13.826 0-26.386-5.424-35.667-14.259l0.021 0.020-146.286-156.038v507.124c-0.273 29.513-24.125 53.365-53.612 53.638h-0.026c-0.954 0.059-2.070 0.092-3.193 0.092-29.998 0-54.422-23.867-55.319-53.648l-0.002-0.083v-502.248l-141.41 156.038c-10.891 9.006-23.985 15.765-38.334 19.361l-0.676 0.143c-13.309-0.611-25.236-6.073-34.151-14.645l0.017 0.017c-11.7-10.041-19.066-24.846-19.066-41.371 0-14.137 5.39-27.014 14.228-36.69l-0.038 0.042z" />
31
- <glyph unicode="&#xe92d;" glyph-name="expand" d="M24.381 15.482v284.477c-0.002 0.137-0.003 0.299-0.003 0.461 0 11.13 4.615 21.182 12.035 28.347l0.011 0.011c7.253 7.442 17.375 12.058 28.574 12.058s21.321-4.616 28.566-12.049l0.008-0.008 91.429-91.672 138.971 138.923c3.653 3.934 8.854 6.388 14.629 6.388s10.975-2.454 14.617-6.376l0.012-0.013 72.363-72.363c3.948-3.647 6.411-8.85 6.411-14.629s-2.464-10.982-6.398-14.616l-0.013-0.012-138.971-138.971 91.38-91.331c7.442-7.253 12.058-17.375 12.058-28.574s-4.616-21.321-12.049-28.566l-0.008-0.008c-7.114-7.429-17.113-12.046-28.19-12.046-0.118 0-0.236 0.001-0.353 0.002h-284.41c-22.333 0.271-40.369 18.29-40.667 40.59v0.028zM999.717 894.854v-284.331c0-0.065 0.001-0.142 0.001-0.219 0-11.129-4.614-21.18-12.033-28.345l-0.011-0.011c-7.176-7.431-17.227-12.045-28.356-12.045-0.077 0-0.154 0-0.231 0.001h0.012c-0.1-0.001-0.217-0.001-0.335-0.001-11.077 0-21.076 4.617-28.177 12.032l-0.013 0.014-91.429 91.429-138.971-138.923c-3.638-3.933-8.825-6.388-14.586-6.388-0.015 0-0.030 0-0.045 0h0.002c0 0 0 0 0 0-5.774 0-10.975 2.454-14.617 6.375l-0.011 0.013-72.363 72.363c-3.911 3.669-6.357 8.86-6.388 14.623v0.006c0.019 5.771 2.468 10.966 6.376 14.618l0.012 0.011 138.971 138.971-91.429 91.429c-7.429 7.114-12.046 17.113-12.046 28.191 0 0.135 0.001 0.27 0.002 0.404v-0.021c-0.001 0.1-0.001 0.217-0.001 0.335 0 11.077 4.617 21.076 12.032 28.177l0.014 0.013c7.114 7.429 17.113 12.046 28.19 12.046 0.118 0 0.236-0.001 0.353-0.002h284.41c0.114 0.001 0.249 0.002 0.384 0.002 11.077 0 21.076-4.617 28.177-12.032l0.013-0.014c7.459-7.118 12.096-17.137 12.096-28.238 0-0.17-0.001-0.339-0.003-0.508v0.026z" />
32
- <glyph unicode="&#xe92e;" glyph-name="facebook-square" d="M853.333-64h-218.405v325.339h146.578v149.699h-146.578v59.928c0 22.869 14.921 39.936 28.379 39.936h118.248v149.65h-118.004c-93.143-8.972-165.383-86.838-165.383-181.577 0-3.521 0.1-7.018 0.297-10.49l-0.022 0.481v-57.88h-107.618v-149.699h107.276v-325.388h-327.436c-94.506 1.152-170.675 78.032-170.675 172.703 0 0.587 0.003 1.174 0.009 1.759l-0.001-0.089v675.352c-0.005 0.482-0.008 1.051-0.008 1.621 0 94.66 76.174 171.53 170.568 172.653l0.106 0.001h682.667c94.506-1.152 170.674-78.032 170.674-172.703 0-0.553-0.003-1.105-0.008-1.657l0.001 0.084v-675.352c0.005-0.482 0.008-1.052 0.008-1.622 0-94.68-76.162-171.571-170.563-172.75l-0.111-0.001z" />
33
- <glyph unicode="&#xe933;" glyph-name="heart-o" d="M508.538 4.754c-1.051-0.062-2.281-0.097-3.519-0.097-18.072 0-34.391 7.511-46.003 19.581l-0.020 0.021-361.813 359.717c-20.49 18.818-38.472 39.837-53.733 62.819l-0.783 1.254c-26.677 42.911-42.492 94.985-42.492 150.754 0 105.182 56.254 197.225 140.317 247.684l1.307 0.728c43.607 26.818 96.43 42.705 152.963 42.705 86.613 0 164.516-37.288 218.533-96.688l0.215-0.24c54.237 59.523 131.622 97.145 217.813 98.545l0.25 0.003c0.131 0 0.287 0 0.442 0 160.843 0 291.327-129.988 292.129-290.643v-0.076c-0.117-87.94-38.259-166.947-98.862-221.481l-0.271-0.24-361.813-359.717c-15.729-9.027-34.544-14.429-54.604-14.628h-0.058zM290.475 822.735c-0.263 0.001-0.575 0.002-0.886 0.002-41.558 0-80.555-10.961-114.26-30.149l1.141 0.598c-63.376-39.716-104.896-109.178-104.896-188.338 0-41.379 11.345-80.108 31.095-113.247l-0.561 1.016c10.985-20.045 26.032-36.588 44.138-48.989l0.479-0.31 361.813-359.717 361.813 359.717c47.682 40.704 78.067 100.459 79.284 167.337l0.003 0.208c-1.478 119.578-98.381 216.036-217.99 216.795h-0.073c-78.751-0.346-147.907-41.107-187.835-102.599l-0.532-0.874-29.745-49.298-29.745 49.298c-45.612 57.889-114.672 95.543-192.617 98.533l-0.48 0.015z" />
34
- <glyph unicode="&#xe934;" glyph-name="info-circle" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512c282.77 0 512 229.23 512 512v0c0 282.77-229.23 512-512 512v0zM580.267 209.067c0-37.703-30.564-68.267-68.267-68.267s-68.267 30.564-68.267 68.267v0 238.933c0 37.703 30.564 68.267 68.267 68.267s68.267-30.564 68.267-68.267v0zM512 578.048c-41.284 0-74.752 33.468-74.752 74.752s33.468 74.752 74.752 74.752c41.284 0 74.752-33.468 74.752-74.752v0c0-41.284-33.468-74.752-74.752-74.752v0z" />
35
- <glyph unicode="&#xe936;" glyph-name="pause" d="M347.038 960h-203.191c-33.865-0.917-60.968-28.588-60.968-62.589 0-0.488 0.006-0.974 0.017-1.459l-0.001 0.072v-896.049c-0.010-0.413-0.015-0.899-0.015-1.387 0-34.001 27.103-61.672 60.883-62.587l0.085-0.002h203.191c33.865 0.917 60.968 28.588 60.968 62.589 0 0.488-0.006 0.974-0.017 1.459l0.001-0.072v896c0.010 0.427 0.016 0.931 0.016 1.436 0 34.002-27.104 61.673-60.884 62.587l-0.085 0.002zM875.276 960h-203.191c-33.865-0.917-60.968-28.588-60.968-62.589 0-0.488 0.006-0.974 0.017-1.459l-0.001 0.072v-896.049c-0.010-0.413-0.015-0.899-0.015-1.387 0-34.001 27.103-61.672 60.883-62.587l0.085-0.002h203.191c33.865 0.917 60.968 28.588 60.968 62.589 0 0.488-0.006 0.974-0.017 1.459l0.001-0.072v896c0.010 0.427 0.016 0.931 0.016 1.436 0 34.002-27.104 61.673-60.884 62.587l-0.085 0.002z" />
36
- <glyph unicode="&#xe938;" glyph-name="instagram" d="M1024 658.651c-0.862 44.894-9.552 87.508-24.755 126.882l0.862-2.539c-13.691 35.688-33.923 66.105-59.45 91.146l-0.040 0.039c-25.589 25.382-56.483 45.458-90.867 58.413l-1.78 0.588c-36.867 14.068-79.488 22.58-123.989 23.401l-0.354 0.005c-55.101 3.413-72.168 3.413-211.627 3.413s-156.038 0-210.651-2.926c-44.894-0.862-87.508-9.552-126.882-24.755l2.539 0.862c-35.605-13.713-65.992-33.76-91.181-58.998l-0.004-0.004c-25.025-25.165-45.032-55.35-58.374-88.908l-0.628-1.789c-14.068-36.867-22.58-79.488-23.401-123.989l-0.005-0.354c-3.413-55.101-3.413-72.168-3.413-211.139s0-156.526 2.926-211.139c0.862-44.894 9.552-87.508 24.755-126.882l-0.862 2.539c27.139-68.982 80.717-122.56 147.928-149.083l1.771-0.616c36.833-14.238 79.431-22.918 123.928-23.886l0.414-0.007c54.613 0 72.168-2.926 211.139-2.926s156.526 0 211.139 2.926c44.912 0.976 87.51 9.655 126.925 24.763l-2.582-0.87c68.949 27.192 122.507 80.75 149.081 147.926l0.618 1.773c14.294 36.834 22.98 79.44 23.887 123.956l0.006 0.387c0 54.613 2.926 71.68 2.926 211.139s0 156.038 0 210.651zM931.84 240.762c-0.376-34.274-6.963-66.9-18.685-96.958l0.643 1.872c-17.617-44.979-52.545-79.907-96.372-97.125l-1.152-0.399c-28.186-11.019-60.803-17.599-94.901-18.040l-0.185-0.002c-54.126 0-70.217-2.926-206.75-2.926s-153.112 0-206.75 2.926c-34.274 0.376-66.9 6.963-96.958 18.685l1.872-0.643c-23.201 8.346-42.953 21.349-58.955 37.985l-0.047 0.049c-16.685 16.049-29.689 35.801-37.699 57.942l-0.335 1.059c-11.277 28.181-17.886 60.84-18.042 95.022v0.063c-2.438 54.126-3.413 70.705-3.413 207.238s0 153.112 3.413 206.75c0.010 34.187 6.451 66.868 18.178 96.901l-0.624-1.815c8.466 23.158 21.449 42.887 37.997 58.966l0.037 0.036c16.329 16.246 35.985 29.164 57.854 37.643l1.148 0.391c27.876 10.177 60.058 16.071 93.614 16.091h0.009c54.126 2.438 70.217 2.926 206.75 2.926s153.112 0 207.238-2.926c34.061-0.324 66.528-6.734 96.5-18.193l-1.902 0.639c23.063-8.737 42.742-21.676 58.994-38.026l0.008-0.008c16.585-16.115 29.568-35.844 37.687-57.923l0.347-1.079c11.019-28.186 17.599-60.803 18.040-94.901l0.002-0.185c0-54.126 2.926-70.217 2.926-206.75s-0.975-151.162-2.926-205.288zM512 710.827c-145.424 0-263.314-117.89-263.314-263.314s117.89-263.314 263.314-263.314c145.424 0 263.314 117.89 263.314 263.314 0 0.171 0 0.343 0 0.514v-0.027c-0.278 145.215-118.061 262.827-263.314 262.827 0 0 0 0 0 0v0zM512 277.333c-94.257 0-170.667 76.41-170.667 170.667s76.41 170.667 170.667 170.667c94.257 0 170.667-76.41 170.667-170.667v0c0-94.257-76.41-170.667-170.667-170.667v0zM846.994 721.067c0-33.932-27.508-61.44-61.44-61.44s-61.44 27.508-61.44 61.44c0 33.932 27.508 61.44 61.44 61.44v0c0.145 0.001 0.317 0.002 0.49 0.002 33.663 0 60.952-27.289 60.952-60.952 0-0.172-0.001-0.344-0.002-0.516v0.026z" />
37
- <glyph unicode="&#xe939;" glyph-name="linkedin" d="M560.274 500.663v0 0zM853.333 960h-682.667c-94.494-1.098-170.673-77.956-170.673-172.606 0-0.518 0.002-1.036 0.007-1.553l-0.001 0.079v-675.352c-0.007-0.583-0.011-1.272-0.011-1.961 0-94.652 76.182-171.511 170.574-172.605l0.103-0.001h682.667c94.496 1.096 170.678 77.954 170.678 172.606 0 0.69-0.004 1.378-0.012 2.066l0.001-0.105v675.352c0.004 0.438 0.006 0.956 0.006 1.474 0 94.65-76.179 171.508-170.569 172.605l-0.104 0.001zM320.366 105.204h-155.063v464.701h155.063zM243.81 630.857v0c-44.166 0-79.97 35.804-79.97 79.97s35.804 79.97 79.97 79.97v0c2.654 0.31 5.729 0.488 8.845 0.488 44.435 0 80.457-36.022 80.457-80.457s-36.022-80.457-80.457-80.457c-3.116 0-6.191 0.177-9.214 0.522l0.37-0.034zM877.714 105.204h-154.575v247.71c0 61.928-22.43 104.35-78.019 104.35-36.404-0.15-67.385-23.202-79.292-55.488l-0.19-0.588c-3.488-9.621-5.505-20.726-5.505-32.302 0-1.845 0.051-3.678 0.152-5.497l-0.011 0.253v-258.438h-154.575s0 419.352 0 462.75h154.575v-65.829c27.186 46.18 76.648 76.682 133.234 76.682 2.189 0 4.368-0.046 6.535-0.136l-0.31 0.010c101.912 0 178.469-66.316 178.469-208.213z" />
38
- <glyph unicode="&#xe93a;" glyph-name="spinner" horiz-adv-x="1026" d="M1026.444 633.493c0-70.186-56.897-127.084-127.084-127.084s-127.084 56.897-127.084 127.084c0 70.186 56.897 127.084 127.084 127.084s127.084-56.897 127.084-127.084zM200.89 211.674c0-42.112-34.138-76.25-76.25-76.25s-76.25 34.138-76.25 76.25c0 42.112 34.138 76.25 76.25 76.25s76.25-34.138 76.25-76.25zM751.259 845.625c0-63.168-51.208-114.375-114.375-114.375s-114.375 51.208-114.375 114.375c0 63.168 51.208 114.375 114.375 114.375s114.375-51.208 114.375-114.375zM450.658-0.458c0-35.093-28.449-63.542-63.542-63.542s-63.542 28.449-63.542 63.542c0 35.093 28.449 63.542 63.542 63.542s63.542-28.449 63.542-63.542zM402.757 810.432c0-56.149-45.518-101.667-101.667-101.667s-101.667 45.518-101.667 101.667c0 56.149 45.518 101.667 101.667 101.667s101.667-45.518 101.667-101.667zM773.743 35.223c0-28.075-22.759-50.833-50.833-50.833s-50.833 22.759-50.833 50.833c0 28.075 22.759 50.833 50.833 50.833s50.833-22.759 50.833-50.833zM113.886 633.004c-7.344 2.186-15.783 3.445-24.515 3.445-49.13 0-88.958-39.828-88.958-88.958s39.828-88.958 88.958-88.958c39.339 0 72.715 25.535 84.455 60.935l0.181 0.628c2.741 8.182 4.323 17.604 4.323 27.395 0 40.398-26.928 74.507-63.814 85.355l-0.629 0.159zM973.167 297.699c0-21.056-17.069-38.125-38.125-38.125s-38.125 17.069-38.125 38.125c0 21.056 17.069 38.125 38.125 38.125s38.125-17.069 38.125-38.125z" />
39
- <glyph unicode="&#xe93b;" glyph-name="camera-retro" d="M1002.545 865.402c-12.94 13.245-30.981 21.459-50.941 21.459-0.263 0-0.525-0.001-0.787-0.004h-877.674c-0.222 0.002-0.484 0.004-0.747 0.004-19.959 0-38-8.214-50.927-21.445l-0.013-0.014c-13.245-12.94-21.459-30.981-21.459-50.941 0-0.263 0.001-0.525 0.004-0.787v0.040-731.429c-0.002-0.222-0.004-0.484-0.004-0.747 0-19.959 8.214-38 21.445-50.927l0.014-0.013c12.94-13.245 30.981-21.459 50.941-21.459 0.263 0 0.525 0.001 0.787 0.004h877.674c40.396 0 73.143 32.747 73.143 73.143v0 731.429c0.002 0.222 0.004 0.484 0.004 0.747 0 19.959-8.214 38-21.445 50.927l-0.014 0.013zM146.286 850.286h219.429v-73.143h-219.429zM950.857 82.286h-877.714v73.143h877.714v-73.143zM292.571 410.453c-0.016 0.969-0.025 2.113-0.025 3.258 0 59.562 24.663 113.363 64.333 151.749l0.058 0.056c38.442 39.728 92.243 64.391 151.805 64.391 1.146 0 2.289-0.009 3.43-0.027l-0.172 0.002c0.969 0.016 2.113 0.025 3.258 0.025 59.562 0 113.363-24.663 151.749-64.333l0.056-0.058c39.728-38.442 64.391-92.243 64.391-151.805 0-1.146-0.009-2.289-0.027-3.43l0.002 0.172c0-0.145 0.001-0.316 0.001-0.488 0-120.918-98.023-218.941-218.941-218.941-0.172 0-0.343 0-0.515 0.001h0.026c-0.145 0-0.316-0.001-0.488-0.001-120.918 0-218.941 98.023-218.941 218.941 0 0.172 0 0.343 0.001 0.515v-0.026zM950.857 734.72v-67.291h-877.714v73.143h368.152l36.571 73.143h472.99v-78.994zM615.375 307.078c26.482 25.424 42.937 61.12 42.937 100.659 0 0.955-0.010 1.908-0.029 2.858l0.002-0.142c0 80.791-65.494 146.286-146.286 146.286v0c-80.791 0-146.286-65.494-146.286-146.286v0c0-80.791 65.494-146.286 146.286-146.286v0c0.808-0.017 1.761-0.026 2.716-0.026 39.539 0 75.235 16.455 100.614 42.889l0.045 0.047zM472.99 448c-9.935-9.668-16.099-23.168-16.099-38.107 0-0.317 0.003-0.634 0.008-0.95l-0.001 0.047c-0.193-10.084-8.414-18.185-18.526-18.185-4.911 0-9.375 1.91-12.691 5.028l0.010-0.009c-3.314 3.273-5.367 7.816-5.367 12.839 0 0.115 0.001 0.229 0.003 0.343v-0.017c-0.003 0.291-0.005 0.636-0.005 0.98 0 50.827 40.929 92.094 91.626 92.642h0.052c0.297 0.018 0.645 0.028 0.995 0.028 4.728 0 9.020-1.869 12.176-4.91l-0.005 0.005c3.391-3.359 5.491-8.018 5.491-13.166 0-10.234-8.296-18.53-18.53-18.53-0.045 0-0.090 0-0.134 0h0.007c-15.54-0.272-29.415-7.171-38.96-17.984l-0.050-0.057z" />
40
- <glyph unicode="&#xe93c;" glyph-name="share" d="M1013.272 607.939l-292.571 292.571c-6.617 6.609-15.753 10.695-25.844 10.695s-19.227-4.087-25.844-10.696v0c-6.623-6.47-10.73-15.491-10.73-25.47 0-0.131 0.001-0.262 0.002-0.393v0.020-146.286h-127.756c-272.091 0-438.857-76.556-500.297-230.156-19.277-52.494-30.428-113.11-30.428-176.331 0-5.039 0.071-10.061 0.212-15.065l-0.016 0.737c7.824-95.17 33.801-182.655 74.466-261.316l-1.811 3.853c0-2.926 2.926-7.314 5.851-13.653l7.802-17.067c2.377-4.909 4.811-9.063 7.528-13.006l-0.214 0.328c3.478-5.476 9.298-9.195 16.016-9.747l0.075-0.005c0.231-0.011 0.502-0.018 0.774-0.018 5.131 0 9.734 2.265 12.862 5.849l0.017 0.020c2.75 3.681 4.403 8.32 4.403 13.346 0 0.279-0.005 0.558-0.015 0.835l0.001-0.040c0.187 2.263 0.293 4.898 0.293 7.558s-0.107 5.295-0.315 7.902l0.022-0.343c-0.126 2.040-0.198 4.425-0.198 6.827s0.072 4.786 0.213 7.152l-0.016-0.326q-2.926 39.010-2.926 70.217c-0.010 1.198-0.016 2.614-0.016 4.031 0 35.153 3.556 69.476 10.329 102.628l-0.56-3.284c6.451 29.862 16.034 56.251 28.649 80.827l-0.855-1.833c11.954 22.514 27.291 41.586 45.58 57.324l0.256 0.215c17.296 15.566 37.039 28.918 58.476 39.327l1.501 0.658c20.949 10.018 45.387 18.419 70.89 23.97l2.253 0.411c24.629 5.178 54.813 9.496 85.509 12.009l2.751 0.181c29.257 2.438 62.903 3.413 100.45 3.413h128.244v-146.286c0.018-20.184 16.385-36.539 36.571-36.539 10.091 0 19.227 4.087 25.844 10.696v0l292.571 292.571c6.609 6.617 10.695 15.753 10.695 25.844s-4.087 19.227-10.696 25.844v0z" />
41
- <glyph unicode="&#xe93d;" glyph-name="step-backward" horiz-adv-x="875" d="M48.762-64h97.524c26.93 0 48.762 21.831 48.762 48.762v0 926.476c0 26.93-21.831 48.762-48.762 48.762v0h-97.524c-26.93 0-48.762-21.831-48.762-48.762v0-926.476c0-26.93 21.831-48.762 48.762-48.762v0zM325.242 482.621c-8.909-8.838-14.424-21.085-14.424-34.621s5.515-25.783 14.42-34.618l0.003-0.003 464.213-462.75c8.938-12.585 23.46-20.698 39.876-20.698 26.93 0 48.762 21.831 48.762 48.762 0 2.139-0.138 4.247-0.405 6.313l0.026-0.244v926.476c0.241 1.822 0.379 3.93 0.379 6.069 0 26.93-21.831 48.762-48.762 48.762-16.416 0-30.938-8.112-39.775-20.547l-0.102-0.15z" />
42
- <glyph unicode="&#xe93e;" glyph-name="step-forward" horiz-adv-x="875" d="M826.027 960h-97.524c-26.93 0-48.762-21.831-48.762-48.762v0-926.476c0-26.93 21.831-48.762 48.762-48.762v0h97.524c26.93 0 48.762 21.831 48.762 48.762v0 926.476c0 26.93-21.831 48.762-48.762 48.762v0zM550.034 413.379c8.909 8.838 14.424 21.085 14.424 34.621s-5.515 25.783-14.42 34.618l-0.003 0.003-464.213 462.75c-8.999 10.521-22.288 17.147-37.124 17.147-26.93 0-48.762-21.831-48.762-48.762 0-0.886 0.024-1.766 0.070-2.64l-0.005 0.122v-926.476c-0.083-1.069-0.131-2.314-0.131-3.571 0-26.93 21.831-48.762 48.762-48.762 14.872 0 28.189 6.658 37.133 17.156l0.057 0.068z" />
43
- <glyph unicode="&#xe93f;" glyph-name="user" horiz-adv-x="971" d="M487.619 960c-140.379-6.020-251.905-121.286-251.905-262.6 0-4.368 0.107-8.71 0.317-13.026l-0.024 0.608c-0.187-3.701-0.293-8.037-0.293-12.398 0-141.216 111.579-256.372 251.384-262.114l0.52-0.017c139.459 6.793 249.958 121.515 249.958 262.047 0 4.391-0.108 8.756-0.321 13.093l0.024-0.611c0.19 3.734 0.298 8.107 0.298 12.506 0 140.629-110.448 255.462-249.331 262.486l-0.627 0.025zM709.973 410.453c-62.38-43.101-138.983-69.864-221.665-72.637l-0.689-0.018c-84.047 2.48-161.368 29.286-225.722 73.577l1.417-0.922c-145.31 0-263.314-35.596-263.314-181.882v-195.048c133.154-61.929 289.047-98.058 453.379-98.058 12.041 0 24.036 0.194 35.983 0.579l-1.743-0.044c10.292-0.347 22.391-0.544 34.535-0.544 164.232 0 320.025 36.133 459.862 100.884l-6.778-2.816v195.048c-3.901 146.286-121.905 181.882-265.265 181.882z" />
44
- <glyph unicode="&#xe940;" glyph-name="clone" d="M731.429 960h-585.143c-0.006 0-0.013 0-0.020 0-80.791 0-146.286-65.494-146.286-146.286 0-0.857 0.007-1.713 0.022-2.566l-0.002 0.128v-577.341c-0.063-1.6-0.098-3.478-0.098-5.364 0-80.791 65.494-146.286 146.286-146.286 0.035 0 0.069 0 0.104 0h585.137c0.009 0 0.019 0 0.029 0 80.791 0 146.286 65.494 146.286 146.286 0 1.029-0.011 2.055-0.032 3.079l0.002-0.153v579.779c0.013 0.725 0.020 1.581 0.020 2.438 0 80.791-65.494 146.286-146.286 146.286-0.007 0-0.014 0-0.021 0h0.001zM934.766 799.086c1.861-8.869 2.926-19.061 2.926-29.501 0-0.086 0-0.171 0-0.257v0.013-576.853c0.004-0.438 0.006-0.956 0.006-1.474 0-92.496-74.433-167.607-166.668-168.704l-0.104-0.001h-585.143c-9.646 0.248-18.882 1.301-27.85 3.098l1.031-0.172c22.675-52.558 73.856-88.772 133.549-89.234h585.202c0.009 0 0.019 0 0.029 0 80.791 0 146.286 65.494 146.286 146.286 0 1.029-0.011 2.055-0.032 3.079l0.002-0.153v576.853c0.012 0.687 0.018 1.498 0.018 2.311 0 60.192-36.354 111.894-88.304 134.345l-0.948 0.365z" />
45
  </font></defs></svg>
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Generated by IcoMoon</metadata>
5
+ <defs>
6
+ <font id="tenweb" horiz-adv-x="1024">
7
+ <font-face units-per-em="1024" ascent="960" descent="-64" />
8
+ <missing-glyph horiz-adv-x="1024" />
9
+ <glyph unicode="&#x20;" horiz-adv-x="512" d="" />
10
+ <glyph unicode="&#xe900;" glyph-name="pinterest-square" d="M853.333-64h-682.667c-94.506 1.152-170.674 78.032-170.674 172.703 0 0.57 0.003 1.139 0.008 1.708l-0.001-0.087v675.352c-0.005 0.482-0.008 1.051-0.008 1.621 0 94.67 76.168 171.55 170.565 172.702l0.109 0.001h682.667c94.506-1.152 170.674-78.032 170.674-172.703 0-0.57-0.003-1.139-0.008-1.708l0.001 0.087v-675.352c0.005-0.482 0.008-1.051 0.008-1.621 0-94.67-76.168-171.55-170.565-172.702l-0.109-0.001zM462.019 661.577c-41.545 0-74.021-44.568-74.021-101.474-0.006-0.517-0.010-1.127-0.010-1.739 0-21.792 4.505-42.531 12.635-61.338l-0.386 1.003-11.459-49.396c-12.971-56.271-33.061-143.214-38.181-164.279-4.442-23.301-6.983-50.102-6.983-77.496 0-24.671 2.061-48.861 6.019-72.406l-0.353 2.544v-1.56c0.279-2.452 2.343-4.34 4.847-4.34 0.010 0 0.021 0 0.031 0h-0.002c0 0 0 0 0 0 1.684 0 3.181 0.798 4.135 2.036l0.009 0.012 1.122 1.414c28.919 36.047 52.15 78.166 67.438 123.922l0.828 2.859c4.876 17.31 26.77 106.886 27.014 107.764 19.823-29.585 53.123-48.799 90.911-48.799 1.005 0 2.007 0.014 3.006 0.041l-0.147-0.003c121.905 0 207.141 110.494 207.141 268.727-2.474 65.097-30.892 123.106-75.147 164.344l-0.141 0.13c-40.316 37.536-94.566 60.574-154.197 60.574-4.748 0-9.461-0.146-14.136-0.434l0.641 0.032c-171.837 0-274.334-124.538-274.334-244.98-0.567-4.924-0.891-10.631-0.891-16.413 0-57.314 31.795-107.202 78.709-132.988l0.786-0.396c1.938-0.865 4.196-1.382 6.571-1.414h0.012c6.448 0.153 11.734 4.935 12.669 11.143l0.009 0.072c0.829 3.072 2.048 8.29 3.413 13.751 1.658 6.827 3.413 13.8 4.389 17.749 0.848 2.089 1.34 4.511 1.34 7.049 0 5.911-2.67 11.199-6.869 14.723l-0.030 0.024c-15.574 19.511-24.99 44.534-24.99 71.756 0 1.86 0.044 3.709 0.131 5.547l-0.010-0.26c-0.006 0.573-0.010 1.249-0.010 1.926 0 49.919 19.313 95.327 50.874 129.16l-0.103-0.112c33.685 35.048 80.958 56.822 133.317 56.822 1.697 0 3.388-0.023 5.074-0.068l-0.249 0.005c4.665 0.543 10.069 0.852 15.546 0.852 37.904 0 72.345-14.826 97.84-38.995l-0.064 0.060c28.652-27.173 46.479-65.517 46.479-108.024 0-1.452-0.021-2.898-0.062-4.34l0.005 0.212c0-118.882-52.517-208.506-121.905-208.506-0.344-0.007-0.75-0.011-1.156-0.011-19.798 0-37.45 9.189-48.923 23.535l-0.096 0.125c-7.711 10.079-12.356 22.86-12.356 36.726 0 5.386 0.701 10.608 2.016 15.581l-0.095-0.424c4.145 17.944 9.752 36.425 15.165 54.321 9.302 24.823 15.938 53.621 18.631 83.555l0.094 1.291c0.237 1.889 0.373 4.074 0.373 6.291 0 13.475-5.001 25.783-13.248 35.167l0.051-0.060c-9.39 10.725-23.109 17.46-38.4 17.46-0.214 0-0.428-0.001-0.642-0.004h0.032z" />
11
+ <glyph unicode="&#xe901;" glyph-name="play" d="M190.513 928.987c7.091 4.169 15.619 6.632 24.722 6.632s17.632-2.463 24.955-6.758l-0.233 0.126 589.141-428.081c14.879-8.697 24.716-24.594 24.716-42.789s-9.837-34.091-24.483-42.662l-0.234-0.126-589.141-428.081c-7.092-4.165-15.62-6.624-24.722-6.624-27.305 0-49.44 22.133-49.445 49.437v0 856.113c0.003 18.202 9.841 34.106 24.489 42.687l0.233 0.126z" />
12
+ <glyph unicode="&#xe902;" glyph-name="refresh" d="M934.619 369.981c-9.164 14.726-25.262 24.382-43.614 24.382-0.095 0-0.191 0-0.286-0.001h0.015c-2.618 0.371-5.641 0.583-8.714 0.583-32.168 0-58.91-23.228-64.37-53.826l-0.059-0.396c-24.056-142.706-145.282-250.522-292.255-253.557l-0.316-0.005h-4.876c-166.815 0.453-301.869 135.787-301.869 302.664 0 160.014 124.174 291.026 281.417 301.931l0.947 0.053v-97.524c-0.087-0.663-0.137-1.429-0.137-2.207 0-4.827 1.911-9.208 5.018-12.427l-0.005 0.005c4.876-14.629 24.381-14.629 34.133-9.752l214.552 160.914c4.876 0 4.876 4.876 9.752 9.752 4.876 14.629 4.876 29.257-9.752 34.133l-214.552 165.79c0 4.876-4.876 4.876-9.752 4.876-0.628 0.051-1.36 0.081-2.099 0.081-14.079 0-25.669-10.655-27.147-24.341l-0.011-0.121v-97.524c-216.127-6.907-391.569-172.24-414.31-383.32l-0.166-1.899c-1.993-15.616-3.131-33.682-3.131-52.015 0-221.815 166.544-404.731 381.407-430.526l2.066-0.202c14.629 0 34.133-4.876 48.762-4.876 215.652 0.135 394.577 157.206 428.758 363.181l0.347 2.533c1.371 4.942 2.159 10.616 2.159 16.475 0 13.944-4.464 26.845-12.041 37.352l0.13-0.189z" />
13
+ <glyph unicode="&#xe903;" glyph-name="search" d="M971.776 43.471v0l-229.181 238.933c55.081 68.606 88.402 156.733 88.402 252.643 0 123.082-54.876 233.348-141.497 307.664l-0.543 0.455c-69.546 57.518-159.64 92.409-257.884 92.409-122.797 0-232.861-54.51-307.317-140.653l-0.437-0.517c-58.497-69.347-94.048-159.711-94.048-258.378 0-122.973 55.224-233.047 142.225-306.777l0.585-0.483c70.103-56.823 160.111-91.588 258.204-92.646l0.234-0.002c83.582 0.912 161.063 26.265 225.849 69.23l-1.544-0.963 229.181-238.933c9.827-10.813 23.459-18.017 38.766-19.486l0.244-0.019h4.876c0.442-0.013 0.961-0.020 1.482-0.020 14.496 0 27.692 5.568 37.565 14.683l-0.038-0.034c10.813 9.827 18.017 23.459 19.486 38.766l0.019 0.244c0.933 3.29 1.47 7.070 1.47 10.974 0 13.337-6.263 25.212-16.008 32.843l-0.091 0.069zM430.519 253.147c-156.197 0-282.819 126.622-282.819 282.819s126.622 282.819 282.819 282.819c156.197 0 282.819-126.622 282.819-282.819v0c0-156.197-126.622-282.819-282.819-282.819v0z" />
14
+ <glyph unicode="&#xe904;" glyph-name="arrow-right" horiz-adv-x="1550" d="M1545.967 412.193c-0.2 0.888-0.314 1.907-0.314 2.953s0.115 2.066 0.332 3.046l-0.017-0.093c0.521 4.541 0.819 9.803 0.819 15.135s-0.297 10.594-0.877 15.771l0.058-0.636c0.521 4.431 0.818 9.563 0.818 14.766s-0.297 10.335-0.876 15.382l0.057-0.617c-0.158 0.888-0.248 1.91-0.248 2.953s0.090 2.065 0.263 3.059l-0.015-0.106c-2.399 8.922-4.92 16.292-7.854 23.448l0.472-1.299c-7.938 18.332-18.637 33.999-31.76 47.264l0.013-0.013-362.497 363.236c-27.142 27.051-64.59 43.775-105.944 43.775-82.892 0-150.088-67.197-150.088-150.088 0-41.537 16.874-79.134 44.14-106.309l105.579-105.579h-890.371c-83.587 0-151.348-67.761-151.348-151.348s67.761-151.348 151.348-151.348v0h885.941l-101.145-103.36c-27.113-27.113-43.883-64.57-43.883-105.944 0-82.747 67.080-149.827 149.827-149.827 41.374 0 78.83 16.77 105.944 43.883v0l362.497 361.759c13.109 13.251 23.809 28.918 31.366 46.269l0.381 0.981c2.953 8.121 5.168 15.504 7.383 22.887z" />
15
+ <glyph unicode="&#xe905;" glyph-name="arrow-left" horiz-adv-x="1550" d="M1402.74 598.241h-885.941l101.145 105.575c27.271 27.179 44.145 64.775 44.145 106.313 0 82.892-67.197 150.088-150.088 150.088-41.354 0-78.802-16.725-105.948-43.78l-362.493-362.493c-13.109-13.251-23.809-28.918-31.366-46.269l-0.381-0.981c0-8.121-5.168-15.504-7.383-22.887 0.2-0.888 0.314-1.907 0.314-2.953s-0.115-2.066-0.332-3.046l0.017 0.093c-0.521-4.431-0.818-9.563-0.818-14.766s0.297-10.335 0.876-15.382l-0.057 0.617c-0.521-4.541-0.819-9.803-0.819-15.135s0.297-10.594 0.877-15.771l-0.058 0.636c0.153-0.777 0.24-1.67 0.24-2.584s-0.087-1.807-0.254-2.672l0.014 0.088c2.41-9.253 4.934-16.876 7.873-24.29l-0.491 1.403c7.749-18.656 18.478-34.594 31.757-48l-0.011 0.011 362.497-361.759c27.113-27.113 64.57-43.883 105.944-43.883 82.747 0 149.827 67.080 149.827 149.827 0 41.374-16.77 78.83-43.883 105.944v0l-105.575 103.36h890.371c83.587 0 151.348 67.761 151.348 151.348s-67.761 151.348-151.348 151.348v0z" />
16
+ <glyph unicode="&#xe907;" glyph-name="star-o" d="M967.826 605.355c-16.528 15.79-37.705 26.845-61.274 30.912l-0.702 0.1-203.678 30.964-92.94 185.978c-12.756 25.216-34.682 44.237-61.285 52.893l-0.741 0.208c-10.017 2.967-21.526 4.674-33.433 4.674-16.677 0-32.571-3.349-47.048-9.41l0.804 0.299c-21.611-12.029-38.498-30.315-48.475-52.392l-0.287-0.709-92.891-181.541-203.63-31.013c-28.627-4.472-53.259-18.944-70.708-39.665l-0.143-0.174c-13.933-21.052-22.23-46.894-22.23-74.673 0-1.76 0.033-3.512 0.099-5.256l-0.008 0.251c4.167-24.271 15.222-45.448 31.055-62.022l-0.043 0.045 146.286-146.286-35.401-203.63c-0.598-4.635-0.939-9.996-0.939-15.436 0-27.382 8.641-52.745 23.344-73.513l-0.267 0.397c20.009-23.735 49.758-38.71 83.005-38.71 18.202 0 35.356 4.488 50.415 12.419l-0.592-0.284 181.492 97.524 181.492-97.524c13.32-8.338 29.504-13.284 46.843-13.284 0.675 0 1.348 0.007 2.019 0.022l-0.1-0.002c33.806 0.047 63.999 15.473 83.966 39.654l0.148 0.185c15.813 16.525 25.548 38.98 25.548 63.708 0 8.844-1.245 17.397-3.57 25.494l0.16-0.651-35.401 203.63 146.286 146.286c25.254 18.233 41.499 47.586 41.499 80.733 0 27.214-10.95 51.871-28.684 69.804l0.009-0.009zM901.413 516.803l-154.965-150.528c-14.125-12.647-22.973-30.938-22.973-51.295 0-3.771 0.304-7.471 0.888-11.076l-0.053 0.395 35.401-212.699c0.076-0.59 0.119-1.272 0.119-1.965 0-4.39-1.737-8.374-4.561-11.303l0.005 0.005c0-8.875-8.875-8.875-17.701-4.437l-190.171 101.815c-9.001 4.747-19.539 7.92-30.714 8.855l-0.299 0.020c-13.002-0.93-25.042-4.105-36.052-9.141l0.65 0.267-190.171-101.815c-8.875-4.437-17.701-4.437-22.138 4.437-2.819 2.924-4.556 6.908-4.556 11.298 0 0.693 0.043 1.375 0.127 2.045l-0.008-0.080 35.401 212.504c0.724 3.642 1.138 7.829 1.138 12.113 0 19.977-9.005 37.85-23.177 49.782l-0.099 0.081-150.723 150.723-8.972 8.777c0 8.875 0 13.263 4.437 13.263 0 4.437 4.437 4.437 13.263 8.875l212.504 31.013c23.656 3.768 43.119 18.844 52.919 39.412l0.183 0.427 92.989 194.706c0 4.437 4.437 4.437 8.875 8.875h17.701c4.702-0.444 8.408-4.167 8.823-8.837l0.003-0.037 92.989-190.171c9.983-20.994 29.445-36.071 52.699-39.785l0.403-0.053 212.504-31.013c3.5-0.495 6.557-2.098 8.873-4.436l0.001-0.001c13.263-13.263 13.263-22.235 4.437-31.013z" />
17
+ <glyph unicode="&#xe908;" glyph-name="times" d="M633.71 448l365.129 365.129c14.672 15.409 23.699 36.31 23.699 59.32 0 47.546-38.543 86.089-86.089 86.089-23.009 0-43.911-9.027-59.355-23.733l0.035 0.033-365.129-365.129-365.056 365.129c-15.409 14.672-36.31 23.699-59.32 23.699-47.546 0-86.089-38.543-86.089-86.089 0-23.009 9.027-43.911 23.733-59.355l-0.033 0.035 365.056-365.129-365.056-365.056c-16.505-15.715-26.769-37.854-26.769-62.39 0-47.546 38.543-86.089 86.089-86.089 24.536 0 46.675 10.265 62.357 26.734l0.033 0.035 365.056 365.129 365.129-365.129c15.409-14.672 36.31-23.699 59.32-23.699 47.546 0 86.089 38.543 86.089 86.089 0 23.009-9.027 43.911-23.733 59.355l0.033-0.035z" />
18
+ <glyph unicode="&#xe90a;" glyph-name="tumblr-square" d="M853.285-64h-682.667c-94.506 1.152-170.674 78.032-170.674 172.703 0 0.57 0.003 1.139 0.008 1.708l-0.001-0.087v675.352c-0.005 0.482-0.008 1.051-0.008 1.621 0 94.67 76.168 171.55 170.565 172.702l0.109 0.001h682.667c94.506-1.152 170.674-78.032 170.674-172.703 0-0.57-0.003-1.139-0.008-1.708l0.001 0.087v-675.352c0.005-0.482 0.008-1.051 0.008-1.621 0-94.67-76.168-171.55-170.565-172.702l-0.109-0.001zM393.46 532.358v0c0.245 0.034 0.528 0.054 0.816 0.054 1.557 0 2.98-0.575 4.068-1.523l-0.007 0.006c0.826-1.11 1.322-2.508 1.322-4.021 0-0.301-0.020-0.598-0.058-0.889l0.004 0.034c0-8.777 0-17.701 0-26.331q0.439-42.959 0.78-85.918v-0.975c0.439-52.712 0.926-107.276 1.609-160.914 0.922-25.072 10.816-47.67 26.546-64.831l-0.068 0.075c27.716-33.163 68.743-54.403 114.757-55.439l0.175-0.003c8.094-0.341 17.506-0.683 26.819-0.683 1.695-0.051 3.69-0.080 5.691-0.080 20.915 0 41.086 3.184 60.054 9.095l-1.428-0.383c23.176 7.583 42.529 15.589 61.158 24.837l-2.644-1.187c3.755 1.853 6.632 3.657 6.632 9.167v95.281c0.013 0.3 0.021 0.652 0.021 1.006 0 1.141-0.078 2.264-0.23 3.364l0.014-0.127v0.39c-4.535-2.292-9.021-4.876-13.361-7.168-7.537-4.465-16.572-9.036-25.907-13.044l-1.595-0.609c-13.436-5.752-29.053-9.205-45.446-9.459l-0.098-0.001c-0.023 0-0.050 0-0.077 0-11.625 0-22.762 2.092-33.054 5.919l0.656-0.214c-19.62 5.797-34.206 22.361-37.028 42.687l-0.031 0.272c-1.615 12.093-2.537 26.073-2.537 40.269 0 0.277 0 0.555 0.001 0.832v-0.043c-0.293 48.762-0.39 97.768-0.439 145.408v55.394h133.754c5.803 0 7.802 2.097 7.802 8.387-0.098 30.476-0.098 61.391-0.098 91.819 0 6.632-2.097 8.631-8.875 8.631h-132.876v29.94c-0.439 44.861-0.683 90.21-0.975 134.095v1.073c0.066 0.391 0.103 0.841 0.103 1.3 0 1.695-0.512 3.271-1.39 4.581l0.019-0.030c-1.014 0.865-2.339 1.391-3.788 1.391-0.194 0-0.387-0.009-0.576-0.028l0.024 0.002h-72.85c-5.169 0-6.68-2.731-7.509-7.461l-0.488-1.707c-2.536-14.629-5.169-30.184-8.728-45.056-7.774-32.558-23.086-60.797-44.023-83.829l0.138 0.154c-16.206-17.405-35.79-31.426-57.736-41.058l-1.12-0.438c-4.224-1.133-7.282-4.926-7.282-9.434 0-0.525 0.042-1.041 0.122-1.544l-0.007 0.055v-90.795h0.78c0.287 0.006 0.625 0.009 0.964 0.009 2.343 0 4.647-0.163 6.903-0.478l-0.26 0.030h50.42z" />
19
+ <glyph unicode="&#xe90b;" glyph-name="twitter-square" d="M853.333-64h-682.667c-94.506 1.152-170.674 78.032-170.674 172.703 0 0.57 0.003 1.139 0.008 1.708l-0.001-0.087v675.352c-0.005 0.482-0.008 1.051-0.008 1.621 0 94.67 76.168 171.55 170.565 172.702l0.109 0.001h682.667c94.506-1.152 170.674-78.032 170.674-172.703 0-0.57-0.003-1.139-0.008-1.708l0.001 0.087v-675.352c0.005-0.482 0.008-1.051 0.008-1.621 0-94.67-76.168-171.55-170.565-172.702l-0.109-0.001zM200.509 263.192v0c51.345-33.931 114.353-54.132 182.078-54.132 92.957 0 177.026 38.056 237.477 99.438l0.041 0.042c60.332 61.855 97.547 146.502 97.547 239.841 0 1.395-0.008 2.789-0.025 4.18l0.002-0.211c0 4.632 0 9.46-0.439 15.604 23.369 17.211 43.001 37.899 58.545 61.518l0.555 0.897c-19.857-9.092-42.893-15.791-67.046-18.936l-1.221-0.13c24.558 15.174 42.934 38.342 51.651 65.811l0.232 0.846c-21.52-13.297-46.589-23.442-73.34-28.995l-1.509-0.262c-21.418 22.895-51.813 37.164-85.541 37.164-20.478 0-39.728-5.26-56.472-14.502l0.603 0.305c-37.657-21.231-62.67-60.968-62.67-106.546 0-9.349 1.052-18.451 3.045-27.196l-0.157 0.818c-98.854 5.533-185.536 53.332-242.946 125.468l-0.522 0.679c-10.080-17.388-16.029-38.257-16.029-60.515 0-41.419 20.599-78.028 52.112-100.139l0.391-0.26c-19.669 0.463-37.988 5.831-53.906 14.923l0.56-0.295v-1.365c-0.001-0.196-0.002-0.428-0.002-0.66 0-57.381 40.062-105.405 93.742-117.628l0.809-0.155c-8.998-2.541-19.332-4.002-30.007-4.002-0.319 0-0.638 0.001-0.957 0.004h0.049c-0.606-0.013-1.32-0.021-2.036-0.021-7.205 0-14.23 0.771-20.997 2.236l0.651-0.118c15.188-47.912 58.539-82.325 110.161-83.963l0.187-0.005c-39.718-31.943-90.727-51.314-146.257-51.444h-0.029c-0.419-0.003-0.914-0.005-1.41-0.005-9.473 0-18.802 0.622-27.946 1.827l1.074-0.116z" />
20
+ <glyph unicode="&#xe90c;" glyph-name="angle-down" d="M463.726 199.168l-419.352 404.724c-12.331 11.733-20.001 28.267-20.001 46.592s7.67 34.859 19.974 46.567l0.027 0.025c12.544 11.952 29.563 19.305 48.299 19.305s35.755-7.354 48.327-19.332l-0.028 0.027 371.029-358.156 371.029 357.912c12.544 11.952 29.563 19.305 48.299 19.305s35.755-7.354 48.327-19.332l-0.028 0.027c12.331-11.733 20.001-28.267 20.001-46.592s-7.67-34.859-19.974-46.567l-0.027-0.025-419.352-404.724c-12.536-11.948-29.547-19.3-48.274-19.3s-35.738 7.352-48.302 19.327l0.028-0.027z" />
21
+ <glyph unicode="&#xe90e;" glyph-name="angle-left" d="M263.851 496.274l419.352 419.352c12.359 12.365 29.436 20.013 48.299 20.013 37.714 0 68.287-30.573 68.287-68.287 0-18.851-7.638-35.918-19.989-48.275l-371.078-371.078 371.029-371.029c12.361-12.361 20.006-29.437 20.006-48.299 0-37.724-30.581-68.305-68.305-68.305-18.862 0-35.938 7.645-48.299 20.006l-419.352 419.352c-12.355 12.354-19.997 29.422-19.997 48.274s7.642 35.92 19.997 48.274v0z" />
22
+ <glyph unicode="&#xe910;" glyph-name="angle-right" d="M760.149 399.726l-419.352-419.352c-12.359-12.365-29.436-20.013-48.299-20.013-37.714 0-68.287 30.573-68.287 68.287 0 18.851 7.638 35.918 19.989 48.275l371.078 371.078-371.029 371.029c-12.361 12.361-20.006 29.437-20.006 48.299 0 37.724 30.581 68.305 68.305 68.305 18.862 0 35.938-7.645 48.299-20.006l419.352-419.352c12.355-12.354 19.997-29.422 19.997-48.274s-7.642-35.92-19.997-48.274v0z" />
23
+ <glyph unicode="&#xe912;" glyph-name="angle-up" d="M560.274 696.832l419.352-404.724c12.331-11.733 20.001-28.267 20.001-46.592s-7.67-34.859-19.974-46.567l-0.027-0.025c-12.544-11.952-29.563-19.305-48.299-19.305s-35.755 7.354-48.327 19.332l0.028-0.027-371.029 358.156-371.029-357.912c-12.544-11.952-29.563-19.305-48.299-19.305s-35.755 7.354-48.327 19.332l0.028-0.027c-12.331 11.733-20.001 28.267-20.001 46.592s7.67 34.859 19.974 46.567l0.027 0.025 419.352 404.724c12.536 11.948 29.547 19.3 48.274 19.3s35.738-7.352 48.302-19.327l-0.028 0.027z" />
24
+ <glyph unicode="&#xe917;" glyph-name="arrows-in" d="M625.323 367.738h284.331c0.137 0.002 0.299 0.003 0.461 0.003 11.13 0 21.182-4.615 28.347-12.035l0.011-0.011c7.439-7.245 12.054-17.359 12.054-28.55s-4.615-21.305-12.045-28.542l-0.009-0.008-91.624-91.429 138.874-138.923c3.948-3.647 6.411-8.85 6.411-14.629s-2.464-10.982-6.398-14.616l-0.013-0.012-72.363-72.216c-3.658-3.899-8.829-6.342-14.571-6.388h-0.008c-0.006 0-0.014 0-0.022 0-5.767 0-10.962 2.454-14.595 6.375l-0.012 0.013-138.874 138.923-91.38-91.429c-7.245-7.439-17.359-12.054-28.55-12.054s-21.305 4.615-28.542 12.045l-0.008 0.009c-7.429 7.114-12.046 17.113-12.046 28.19 0 0.118 0.001 0.236 0.002 0.353v-0.018 284.379c0.272 22.296 18.274 40.298 40.544 40.57h0.026zM398.629 528.262h-284.233c-0.065 0-0.142-0.001-0.219-0.001-11.129 0-21.18 4.614-28.345 12.033l-0.011 0.011c-7.431 7.168-12.045 17.213-12.045 28.335 0 0.084 0 0.168 0.001 0.252v-0.013c-0.001 0.1-0.001 0.217-0.001 0.335 0 11.077 4.617 21.076 12.032 28.177l0.014 0.013 91.38 91.38-138.874 138.923c-3.934 3.653-6.388 8.854-6.388 14.628 0 0 0 0 0 0v0c0 0 0 0 0 0 0 5.774 2.454 10.975 6.375 14.617l0.013 0.011 72.363 72.314c3.669 3.911 8.86 6.357 14.623 6.388h0.006c0.006 0 0.014 0 0.022 0 5.767 0 10.962-2.454 14.595-6.375l0.012-0.013 138.923-138.923 91.38 91.429c7.114 7.429 17.113 12.046 28.191 12.046 0.135 0 0.27-0.001 0.404-0.002h-0.021c0.1 0.001 0.217 0.001 0.335 0.001 11.077 0 21.076-4.617 28.177-12.032l0.013-0.014c7.429-7.114 12.046-17.113 12.046-28.19 0-0.118-0.001-0.236-0.002-0.353v0.018-284.331c0.001-0.114 0.002-0.249 0.002-0.384 0-11.077-4.617-21.076-12.032-28.177l-0.014-0.013c-7.118-7.459-17.137-12.096-28.238-12.096-0.17 0-0.339 0.001-0.508 0.003h0.026zM431.738 334.677v-284.331c0.002-0.137 0.003-0.299 0.003-0.461 0-11.13-4.615-21.182-12.035-28.347l-0.011-0.011c-7.245-7.439-17.359-12.054-28.55-12.054s-21.305 4.615-28.542 12.045l-0.008 0.009-91.429 91.624-138.923-138.874c-3.647-3.948-8.85-6.411-14.629-6.411s-10.982 2.464-14.616 6.398l-0.012 0.013-72.216 72.363c-3.899 3.658-6.342 8.829-6.388 14.571v0.008c0 0.006 0 0.014 0 0.022 0 5.767 2.454 10.962 6.375 14.595l0.013 0.012 138.923 138.874-91.429 91.38c-7.439 7.245-12.054 17.359-12.054 28.55s4.615 21.305 12.045 28.542l0.009 0.008c7.114 7.429 17.113 12.046 28.19 12.046 0.118 0 0.236-0.001 0.353-0.002h284.361c22.296-0.272 40.298-18.274 40.57-40.544v-0.026zM592.262 561.371v284.331c-0.002 0.137-0.003 0.299-0.003 0.461 0 11.13 4.615 21.182 12.035 28.347l0.011 0.011c7.245 7.439 17.359 12.054 28.55 12.054s21.305-4.615 28.542-12.045l0.008-0.009 91.429-91.624 138.923 138.874c3.647 3.948 8.85 6.411 14.629 6.411s10.982-2.464 14.616-6.398l0.012-0.013 72.216-72.363c3.899-3.658 6.342-8.829 6.388-14.571v-0.008c0-0.006 0-0.014 0-0.022 0-5.767-2.454-10.962-6.375-14.595l-0.013-0.012-138.923-138.874 91.429-91.38c7.439-7.245 12.054-17.359 12.054-28.55s-4.615-21.305-12.045-28.542l-0.009-0.008c-7.114-7.429-17.113-12.046-28.19-12.046-0.118 0-0.236 0.001-0.353 0.002h-284.361c-22.296 0.272-40.298 18.274-40.57 40.544v0.026z" />
25
+ <glyph unicode="&#xe918;" glyph-name="arrows-out" d="M431.933 274.554c0-0.006 0-0.014 0-0.022 0-5.767-2.454-10.962-6.375-14.595l-0.013-0.012-138.971-138.971 91.429-91.429c7.264-7.336 11.751-17.432 11.751-28.576 0-22.33-18.019-40.452-40.31-40.618h-284.444c-22.312 0.298-40.321 18.307-40.618 40.59v284.456c-0.001 0.088-0.001 0.193-0.001 0.298 0 22.298 18.076 40.375 40.375 40.375 11.284 0 21.487-4.629 28.813-12.092l91.435-91.435 138.971 138.971c3.647 3.948 8.85 6.411 14.629 6.411s10.982-2.464 14.616-6.398l0.012-0.013 72.411-72.411c3.905-3.642 6.339-8.818 6.339-14.562 0-0.023 0-0.047 0-0.070v0.004zM999.668 894.952v-284.428c0.001-0.088 0.001-0.193 0.001-0.298 0-22.298-18.076-40.375-40.375-40.375-11.284 0-21.487 4.629-28.813 12.092l-91.435 91.435-138.971-138.971c-3.647-3.948-8.85-6.411-14.629-6.411s-10.982 2.464-14.616 6.398l-0.012 0.013-72.411 72.411c-3.948 3.647-6.411 8.85-6.411 14.629s2.464 10.982 6.398 14.616l0.013 0.012 138.971 138.971-91.429 91.429c-7.264 7.336-11.751 17.432-11.751 28.576 0 22.33 18.019 40.452 40.31 40.618h284.444c22.312-0.298 40.321-18.307 40.618-40.59v-0.028zM338.603 528.067c-0.006 0-0.014 0-0.022 0-5.767 0-10.962 2.454-14.595 6.375l-0.012 0.013-138.679 138.923-91.672-91.331c-7.341-7.292-17.456-11.8-28.624-11.8-22.347 0-40.479 18.046-40.618 40.361v284.344c-0.001 0.114-0.002 0.249-0.002 0.384 0 11.077 4.617 21.076 12.032 28.177l0.014 0.013c7.115 7.429 17.114 12.047 28.191 12.047 0.152 0 0.304-0.001 0.455-0.003h284.454c0.114 0.001 0.249 0.002 0.384 0.002 11.077 0 21.076-4.617 28.177-12.032l0.013-0.014c7.4-7.111 11.998-17.091 11.998-28.144 0-0.151-0.001-0.302-0.003-0.453v0.023c0.001-0.114 0.002-0.249 0.002-0.384 0-11.077-4.617-21.076-12.032-28.177l-0.014-0.013-91.429-91.429 138.971-138.971c3.948-3.647 6.411-8.85 6.411-14.629s-2.464-10.982-6.398-14.616l-0.013-0.012-72.411-72.411c-3.639-3.876-8.796-6.291-14.517-6.291-0.039 0-0.079 0-0.118 0h0.006zM959-39.668h-284.428c-0.088-0.001-0.193-0.001-0.298-0.001-22.298 0-40.375 18.076-40.375 40.375 0 11.284 4.629 21.487 12.092 28.813l0.006 0.006 91.429 91.721-138.923 138.971c-3.948 3.647-6.411 8.85-6.411 14.629s2.464 10.982 6.398 14.616l0.013 0.012 72.46 72.070c3.647 3.948 8.85 6.411 14.629 6.411s10.982-2.464 14.616-6.398l0.012-0.013 138.971-138.971 91.234 91.429c7.114 7.429 17.113 12.046 28.191 12.046 0.135 0 0.27-0.001 0.404-0.002h-0.021c0.114 0.001 0.249 0.002 0.384 0.002 11.077 0 21.076-4.617 28.177-12.032l0.013-0.014c7.429-7.114 12.046-17.113 12.046-28.19 0-0.118-0.001-0.236-0.002-0.353v0.018-284.428c0.001-0.114 0.002-0.249 0.002-0.384 0-11.077-4.617-21.076-12.032-28.177l-0.014-0.013c-7.122-7.486-17.159-12.143-28.283-12.143-0.103 0-0.205 0-0.307 0.001h0.016z" />
26
+ <glyph unicode="&#xe921;" glyph-name="chevron-left-sm" d="M466.651 424.692l202.167 202.216c9.010 9.819 14.532 22.965 14.532 37.4s-5.522 27.582-14.569 37.441l0.037-0.041c-9.819 9.010-22.965 14.532-37.4 14.532s-27.582-5.522-37.441-14.569l0.041 0.037-238.202-241.030c-9.010-9.819-14.532-22.965-14.532-37.4s5.522-27.582 14.569-37.441l-0.037 0.041 238.202-238.202c9.19-9.636 21.896-15.849 36.052-16.574l0.129-0.005c0.359-0.010 0.781-0.016 1.204-0.016 14.018 0 26.528 6.458 34.717 16.561l0.065 0.083c9.010 9.819 14.532 22.965 14.532 37.4s-5.522 27.582-14.569 37.441l0.037-0.041z" />
27
+ <glyph unicode="&#xe923;" glyph-name="chevron-right-sm" d="M558.031 422.546l-202.167-202.216c-9.010-9.819-14.532-22.965-14.532-37.4s5.522-27.582 14.569-37.441l-0.037 0.041c9.819-9.010 22.965-14.532 37.4-14.532s27.582 5.522 37.441 14.569l-0.041-0.037 238.202 241.030c9.010 9.819 14.532 22.965 14.532 37.4s-5.522 27.582-14.569 37.441l0.037-0.041-238.202 238.202c-9.19 9.636-21.896 15.849-36.052 16.574l-0.129 0.005c-0.359 0.010-0.781 0.016-1.204 0.016-14.018 0-26.528-6.458-34.717-16.561l-0.065-0.083c-9.010-9.819-14.532-22.965-14.532-37.4s5.522-27.582 14.569-37.441l-0.037 0.041z" />
28
+ <glyph unicode="&#xe928;" glyph-name="comment-square" d="M853.333 911.238h-682.667c-94.134-0.304-170.363-76.532-170.667-170.637v-426.696c0.304-94.134 76.532-170.363 170.637-170.667h0.029v-128.049c0.311-23.326 19.293-42.115 42.663-42.115 11.646 0 22.202 4.666 29.901 12.23l157.934 157.934h452.169c94.134 0.304 170.363 76.532 170.667 170.637v426.696c-0.304 94.134-76.532 170.363-170.637 170.667h-0.029z" />
29
+ <glyph unicode="&#xe929;" glyph-name="compress" d="M431.982 342.089v-284.477c0.002-0.137 0.003-0.299 0.003-0.461 0-11.13-4.615-21.182-12.035-28.347l-0.011-0.011c-7.253-7.442-17.375-12.058-28.574-12.058s-21.321 4.616-28.566 12.049l-0.008 0.008-91.429 91.672-138.971-138.923c-3.653-3.934-8.854-6.388-14.629-6.388s-10.975 2.454-14.617 6.376l-0.012 0.013-72.363 72.363c-3.948 3.647-6.411 8.85-6.411 14.629s2.464 10.982 6.398 14.616l0.013 0.012 138.971 138.971-91.38 91.331c-7.442 7.253-12.058 17.375-12.058 28.574s4.616 21.321 12.049 28.566l0.008 0.008c7.114 7.429 17.113 12.046 28.19 12.046 0.118 0 0.236-0.001 0.353-0.002h284.41c22.333-0.271 40.369-18.29 40.667-40.59v-0.028zM592.018 568.832v284.331c0 0.065-0.001 0.142-0.001 0.219 0 11.129 4.614 21.18 12.033 28.345l0.011 0.011c7.176 7.431 17.227 12.045 28.356 12.045 0.077 0 0.154 0 0.231-0.001h-0.012c0.1 0.001 0.217 0.001 0.335 0.001 11.077 0 21.076-4.617 28.177-12.032l0.013-0.014 91.429-91.429 138.971 138.923c3.638 3.933 8.825 6.388 14.586 6.388 0.015 0 0.030 0 0.045 0h-0.002c0 0 0 0 0 0 5.774 0 10.975-2.454 14.617-6.375l0.011-0.013 72.363-72.363c3.911-3.669 6.357-8.86 6.388-14.623v-0.006c-0.019-5.771-2.468-10.966-6.376-14.618l-0.012-0.011-138.971-138.971 91.429-91.429c7.429-7.114 12.046-17.113 12.046-28.191 0-0.135-0.001-0.27-0.002-0.404v0.021c0.001-0.1 0.001-0.217 0.001-0.335 0-11.077-4.617-21.076-12.032-28.177l-0.014-0.013c-7.114-7.429-17.113-12.046-28.19-12.046-0.118 0-0.236 0.001-0.353 0.002h-284.41c-0.114-0.001-0.249-0.002-0.384-0.002-11.077 0-21.076 4.617-28.177 12.032l-0.013 0.014c-7.459 7.118-12.096 17.137-12.096 28.238 0 0.17 0.001 0.339 0.003 0.508v-0.026z" />
30
+ <glyph unicode="&#xe92c;" glyph-name="download" d="M989.867 277.333c-9.835 9.080-23.031 14.648-37.527 14.648-0.521 0-1.041-0.007-1.559-0.022l0.076 0.002c-29.513-0.273-53.365-24.125-53.638-53.612v-185.321h-789.943v185.295c-0.273 29.513-24.125 53.365-53.612 53.638h-0.026c-29.513-0.273-53.365-24.125-53.638-53.612v-238.959c-0.013-0.447-0.020-0.973-0.020-1.501 0-14.49 5.569-27.68 14.683-37.546l-0.034 0.037c9.828-9.080 23.018-14.649 37.509-14.649 0.528 0 1.054 0.007 1.578 0.022l-0.077-0.002h902.095c29.513 0.273 53.365 24.125 53.638 53.612v238.959c-2.563 15.289-9.527 28.632-19.528 39.034l0.023-0.024zM477.867 218.819l9.752-9.752c5.542-2.141 11.954-3.382 18.657-3.382 13.424 0 25.686 4.977 35.042 13.186l-0.060-0.052 238.933 253.562c8.816 9.26 14.239 21.819 14.239 35.646 0 28.573-23.163 51.736-51.736 51.736-13.826 0-26.386-5.424-35.667-14.259l0.021 0.020-146.286-156.038v507.124c-0.273 29.513-24.125 53.365-53.612 53.638h-0.026c-0.954 0.059-2.070 0.092-3.193 0.092-29.998 0-54.422-23.867-55.319-53.648l-0.002-0.083v-502.248l-141.41 156.038c-10.891 9.006-23.985 15.765-38.334 19.361l-0.676 0.143c-13.309-0.611-25.236-6.073-34.151-14.645l0.017 0.017c-11.7-10.041-19.066-24.846-19.066-41.371 0-14.137 5.39-27.014 14.228-36.69l-0.038 0.042z" />
31
+ <glyph unicode="&#xe92d;" glyph-name="expand" d="M24.381 15.482v284.477c-0.002 0.137-0.003 0.299-0.003 0.461 0 11.13 4.615 21.182 12.035 28.347l0.011 0.011c7.253 7.442 17.375 12.058 28.574 12.058s21.321-4.616 28.566-12.049l0.008-0.008 91.429-91.672 138.971 138.923c3.653 3.934 8.854 6.388 14.629 6.388s10.975-2.454 14.617-6.376l0.012-0.013 72.363-72.363c3.948-3.647 6.411-8.85 6.411-14.629s-2.464-10.982-6.398-14.616l-0.013-0.012-138.971-138.971 91.38-91.331c7.442-7.253 12.058-17.375 12.058-28.574s-4.616-21.321-12.049-28.566l-0.008-0.008c-7.114-7.429-17.113-12.046-28.19-12.046-0.118 0-0.236 0.001-0.353 0.002h-284.41c-22.333 0.271-40.369 18.29-40.667 40.59v0.028zM999.717 894.854v-284.331c0-0.065 0.001-0.142 0.001-0.219 0-11.129-4.614-21.18-12.033-28.345l-0.011-0.011c-7.176-7.431-17.227-12.045-28.356-12.045-0.077 0-0.154 0-0.231 0.001h0.012c-0.1-0.001-0.217-0.001-0.335-0.001-11.077 0-21.076 4.617-28.177 12.032l-0.013 0.014-91.429 91.429-138.971-138.923c-3.638-3.933-8.825-6.388-14.586-6.388-0.015 0-0.030 0-0.045 0h0.002c0 0 0 0 0 0-5.774 0-10.975 2.454-14.617 6.375l-0.011 0.013-72.363 72.363c-3.911 3.669-6.357 8.86-6.388 14.623v0.006c0.019 5.771 2.468 10.966 6.376 14.618l0.012 0.011 138.971 138.971-91.429 91.429c-7.429 7.114-12.046 17.113-12.046 28.191 0 0.135 0.001 0.27 0.002 0.404v-0.021c-0.001 0.1-0.001 0.217-0.001 0.335 0 11.077 4.617 21.076 12.032 28.177l0.014 0.013c7.114 7.429 17.113 12.046 28.19 12.046 0.118 0 0.236-0.001 0.353-0.002h284.41c0.114 0.001 0.249 0.002 0.384 0.002 11.077 0 21.076-4.617 28.177-12.032l0.013-0.014c7.459-7.118 12.096-17.137 12.096-28.238 0-0.17-0.001-0.339-0.003-0.508v0.026z" />
32
+ <glyph unicode="&#xe92e;" glyph-name="facebook-square" d="M853.333-64h-218.405v325.339h146.578v149.699h-146.578v59.928c0 22.869 14.921 39.936 28.379 39.936h118.248v149.65h-118.004c-93.143-8.972-165.383-86.838-165.383-181.577 0-3.521 0.1-7.018 0.297-10.49l-0.022 0.481v-57.88h-107.618v-149.699h107.276v-325.388h-327.436c-94.506 1.152-170.675 78.032-170.675 172.703 0 0.587 0.003 1.174 0.009 1.759l-0.001-0.089v675.352c-0.005 0.482-0.008 1.051-0.008 1.621 0 94.66 76.174 171.53 170.568 172.653l0.106 0.001h682.667c94.506-1.152 170.674-78.032 170.674-172.703 0-0.553-0.003-1.105-0.008-1.657l0.001 0.084v-675.352c0.005-0.482 0.008-1.052 0.008-1.622 0-94.68-76.162-171.571-170.563-172.75l-0.111-0.001z" />
33
+ <glyph unicode="&#xe933;" glyph-name="heart-o" d="M508.538 4.754c-1.051-0.062-2.281-0.097-3.519-0.097-18.072 0-34.391 7.511-46.003 19.581l-0.020 0.021-361.813 359.717c-20.49 18.818-38.472 39.837-53.733 62.819l-0.783 1.254c-26.677 42.911-42.492 94.985-42.492 150.754 0 105.182 56.254 197.225 140.317 247.684l1.307 0.728c43.607 26.818 96.43 42.705 152.963 42.705 86.613 0 164.516-37.288 218.533-96.688l0.215-0.24c54.237 59.523 131.622 97.145 217.813 98.545l0.25 0.003c0.131 0 0.287 0 0.442 0 160.843 0 291.327-129.988 292.129-290.643v-0.076c-0.117-87.94-38.259-166.947-98.862-221.481l-0.271-0.24-361.813-359.717c-15.729-9.027-34.544-14.429-54.604-14.628h-0.058zM290.475 822.735c-0.263 0.001-0.575 0.002-0.886 0.002-41.558 0-80.555-10.961-114.26-30.149l1.141 0.598c-63.376-39.716-104.896-109.178-104.896-188.338 0-41.379 11.345-80.108 31.095-113.247l-0.561 1.016c10.985-20.045 26.032-36.588 44.138-48.989l0.479-0.31 361.813-359.717 361.813 359.717c47.682 40.704 78.067 100.459 79.284 167.337l0.003 0.208c-1.478 119.578-98.381 216.036-217.99 216.795h-0.073c-78.751-0.346-147.907-41.107-187.835-102.599l-0.532-0.874-29.745-49.298-29.745 49.298c-45.612 57.889-114.672 95.543-192.617 98.533l-0.48 0.015z" />
34
+ <glyph unicode="&#xe934;" glyph-name="info-circle" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512c282.77 0 512 229.23 512 512v0c0 282.77-229.23 512-512 512v0zM580.267 209.067c0-37.703-30.564-68.267-68.267-68.267s-68.267 30.564-68.267 68.267v0 238.933c0 37.703 30.564 68.267 68.267 68.267s68.267-30.564 68.267-68.267v0zM512 578.048c-41.284 0-74.752 33.468-74.752 74.752s33.468 74.752 74.752 74.752c41.284 0 74.752-33.468 74.752-74.752v0c0-41.284-33.468-74.752-74.752-74.752v0z" />
35
+ <glyph unicode="&#xe936;" glyph-name="pause" d="M347.038 960h-203.191c-33.865-0.917-60.968-28.588-60.968-62.589 0-0.488 0.006-0.974 0.017-1.459l-0.001 0.072v-896.049c-0.010-0.413-0.015-0.899-0.015-1.387 0-34.001 27.103-61.672 60.883-62.587l0.085-0.002h203.191c33.865 0.917 60.968 28.588 60.968 62.589 0 0.488-0.006 0.974-0.017 1.459l0.001-0.072v896c0.010 0.427 0.016 0.931 0.016 1.436 0 34.002-27.104 61.673-60.884 62.587l-0.085 0.002zM875.276 960h-203.191c-33.865-0.917-60.968-28.588-60.968-62.589 0-0.488 0.006-0.974 0.017-1.459l-0.001 0.072v-896.049c-0.010-0.413-0.015-0.899-0.015-1.387 0-34.001 27.103-61.672 60.883-62.587l0.085-0.002h203.191c33.865 0.917 60.968 28.588 60.968 62.589 0 0.488-0.006 0.974-0.017 1.459l0.001-0.072v896c0.010 0.427 0.016 0.931 0.016 1.436 0 34.002-27.104 61.673-60.884 62.587l-0.085 0.002z" />
36
+ <glyph unicode="&#xe938;" glyph-name="instagram" d="M1024 658.651c-0.862 44.894-9.552 87.508-24.755 126.882l0.862-2.539c-13.691 35.688-33.923 66.105-59.45 91.146l-0.040 0.039c-25.589 25.382-56.483 45.458-90.867 58.413l-1.78 0.588c-36.867 14.068-79.488 22.58-123.989 23.401l-0.354 0.005c-55.101 3.413-72.168 3.413-211.627 3.413s-156.038 0-210.651-2.926c-44.894-0.862-87.508-9.552-126.882-24.755l2.539 0.862c-35.605-13.713-65.992-33.76-91.181-58.998l-0.004-0.004c-25.025-25.165-45.032-55.35-58.374-88.908l-0.628-1.789c-14.068-36.867-22.58-79.488-23.401-123.989l-0.005-0.354c-3.413-55.101-3.413-72.168-3.413-211.139s0-156.526 2.926-211.139c0.862-44.894 9.552-87.508 24.755-126.882l-0.862 2.539c27.139-68.982 80.717-122.56 147.928-149.083l1.771-0.616c36.833-14.238 79.431-22.918 123.928-23.886l0.414-0.007c54.613 0 72.168-2.926 211.139-2.926s156.526 0 211.139 2.926c44.912 0.976 87.51 9.655 126.925 24.763l-2.582-0.87c68.949 27.192 122.507 80.75 149.081 147.926l0.618 1.773c14.294 36.834 22.98 79.44 23.887 123.956l0.006 0.387c0 54.613 2.926 71.68 2.926 211.139s0 156.038 0 210.651zM931.84 240.762c-0.376-34.274-6.963-66.9-18.685-96.958l0.643 1.872c-17.617-44.979-52.545-79.907-96.372-97.125l-1.152-0.399c-28.186-11.019-60.803-17.599-94.901-18.040l-0.185-0.002c-54.126 0-70.217-2.926-206.75-2.926s-153.112 0-206.75 2.926c-34.274 0.376-66.9 6.963-96.958 18.685l1.872-0.643c-23.201 8.346-42.953 21.349-58.955 37.985l-0.047 0.049c-16.685 16.049-29.689 35.801-37.699 57.942l-0.335 1.059c-11.277 28.181-17.886 60.84-18.042 95.022v0.063c-2.438 54.126-3.413 70.705-3.413 207.238s0 153.112 3.413 206.75c0.010 34.187 6.451 66.868 18.178 96.901l-0.624-1.815c8.466 23.158 21.449 42.887 37.997 58.966l0.037 0.036c16.329 16.246 35.985 29.164 57.854 37.643l1.148 0.391c27.876 10.177 60.058 16.071 93.614 16.091h0.009c54.126 2.438 70.217 2.926 206.75 2.926s153.112 0 207.238-2.926c34.061-0.324 66.528-6.734 96.5-18.193l-1.902 0.639c23.063-8.737 42.742-21.676 58.994-38.026l0.008-0.008c16.585-16.115 29.568-35.844 37.687-57.923l0.347-1.079c11.019-28.186 17.599-60.803 18.040-94.901l0.002-0.185c0-54.126 2.926-70.217 2.926-206.75s-0.975-151.162-2.926-205.288zM512 710.827c-145.424 0-263.314-117.89-263.314-263.314s117.89-263.314 263.314-263.314c145.424 0 263.314 117.89 263.314 263.314 0 0.171 0 0.343 0 0.514v-0.027c-0.278 145.215-118.061 262.827-263.314 262.827 0 0 0 0 0 0v0zM512 277.333c-94.257 0-170.667 76.41-170.667 170.667s76.41 170.667 170.667 170.667c94.257 0 170.667-76.41 170.667-170.667v0c0-94.257-76.41-170.667-170.667-170.667v0zM846.994 721.067c0-33.932-27.508-61.44-61.44-61.44s-61.44 27.508-61.44 61.44c0 33.932 27.508 61.44 61.44 61.44v0c0.145 0.001 0.317 0.002 0.49 0.002 33.663 0 60.952-27.289 60.952-60.952 0-0.172-0.001-0.344-0.002-0.516v0.026z" />
37
+ <glyph unicode="&#xe939;" glyph-name="linkedin" d="M560.274 500.663v0 0zM853.333 960h-682.667c-94.494-1.098-170.673-77.956-170.673-172.606 0-0.518 0.002-1.036 0.007-1.553l-0.001 0.079v-675.352c-0.007-0.583-0.011-1.272-0.011-1.961 0-94.652 76.182-171.511 170.574-172.605l0.103-0.001h682.667c94.496 1.096 170.678 77.954 170.678 172.606 0 0.69-0.004 1.378-0.012 2.066l0.001-0.105v675.352c0.004 0.438 0.006 0.956 0.006 1.474 0 94.65-76.179 171.508-170.569 172.605l-0.104 0.001zM320.366 105.204h-155.063v464.701h155.063zM243.81 630.857v0c-44.166 0-79.97 35.804-79.97 79.97s35.804 79.97 79.97 79.97v0c2.654 0.31 5.729 0.488 8.845 0.488 44.435 0 80.457-36.022 80.457-80.457s-36.022-80.457-80.457-80.457c-3.116 0-6.191 0.177-9.214 0.522l0.37-0.034zM877.714 105.204h-154.575v247.71c0 61.928-22.43 104.35-78.019 104.35-36.404-0.15-67.385-23.202-79.292-55.488l-0.19-0.588c-3.488-9.621-5.505-20.726-5.505-32.302 0-1.845 0.051-3.678 0.152-5.497l-0.011 0.253v-258.438h-154.575s0 419.352 0 462.75h154.575v-65.829c27.186 46.18 76.648 76.682 133.234 76.682 2.189 0 4.368-0.046 6.535-0.136l-0.31 0.010c101.912 0 178.469-66.316 178.469-208.213z" />
38
+ <glyph unicode="&#xe93a;" glyph-name="spinner" horiz-adv-x="1026" d="M1026.444 633.493c0-70.186-56.897-127.084-127.084-127.084s-127.084 56.897-127.084 127.084c0 70.186 56.897 127.084 127.084 127.084s127.084-56.897 127.084-127.084zM200.89 211.674c0-42.112-34.138-76.25-76.25-76.25s-76.25 34.138-76.25 76.25c0 42.112 34.138 76.25 76.25 76.25s76.25-34.138 76.25-76.25zM751.259 845.625c0-63.168-51.208-114.375-114.375-114.375s-114.375 51.208-114.375 114.375c0 63.168 51.208 114.375 114.375 114.375s114.375-51.208 114.375-114.375zM450.658-0.458c0-35.093-28.449-63.542-63.542-63.542s-63.542 28.449-63.542 63.542c0 35.093 28.449 63.542 63.542 63.542s63.542-28.449 63.542-63.542zM402.757 810.432c0-56.149-45.518-101.667-101.667-101.667s-101.667 45.518-101.667 101.667c0 56.149 45.518 101.667 101.667 101.667s101.667-45.518 101.667-101.667zM773.743 35.223c0-28.075-22.759-50.833-50.833-50.833s-50.833 22.759-50.833 50.833c0 28.075 22.759 50.833 50.833 50.833s50.833-22.759 50.833-50.833zM113.886 633.004c-7.344 2.186-15.783 3.445-24.515 3.445-49.13 0-88.958-39.828-88.958-88.958s39.828-88.958 88.958-88.958c39.339 0 72.715 25.535 84.455 60.935l0.181 0.628c2.741 8.182 4.323 17.604 4.323 27.395 0 40.398-26.928 74.507-63.814 85.355l-0.629 0.159zM973.167 297.699c0-21.056-17.069-38.125-38.125-38.125s-38.125 17.069-38.125 38.125c0 21.056 17.069 38.125 38.125 38.125s38.125-17.069 38.125-38.125z" />
39
+ <glyph unicode="&#xe93b;" glyph-name="camera-retro" d="M1002.545 865.402c-12.94 13.245-30.981 21.459-50.941 21.459-0.263 0-0.525-0.001-0.787-0.004h-877.674c-0.222 0.002-0.484 0.004-0.747 0.004-19.959 0-38-8.214-50.927-21.445l-0.013-0.014c-13.245-12.94-21.459-30.981-21.459-50.941 0-0.263 0.001-0.525 0.004-0.787v0.040-731.429c-0.002-0.222-0.004-0.484-0.004-0.747 0-19.959 8.214-38 21.445-50.927l0.014-0.013c12.94-13.245 30.981-21.459 50.941-21.459 0.263 0 0.525 0.001 0.787 0.004h877.674c40.396 0 73.143 32.747 73.143 73.143v0 731.429c0.002 0.222 0.004 0.484 0.004 0.747 0 19.959-8.214 38-21.445 50.927l-0.014 0.013zM146.286 850.286h219.429v-73.143h-219.429zM950.857 82.286h-877.714v73.143h877.714v-73.143zM292.571 410.453c-0.016 0.969-0.025 2.113-0.025 3.258 0 59.562 24.663 113.363 64.333 151.749l0.058 0.056c38.442 39.728 92.243 64.391 151.805 64.391 1.146 0 2.289-0.009 3.43-0.027l-0.172 0.002c0.969 0.016 2.113 0.025 3.258 0.025 59.562 0 113.363-24.663 151.749-64.333l0.056-0.058c39.728-38.442 64.391-92.243 64.391-151.805 0-1.146-0.009-2.289-0.027-3.43l0.002 0.172c0-0.145 0.001-0.316 0.001-0.488 0-120.918-98.023-218.941-218.941-218.941-0.172 0-0.343 0-0.515 0.001h0.026c-0.145 0-0.316-0.001-0.488-0.001-120.918 0-218.941 98.023-218.941 218.941 0 0.172 0 0.343 0.001 0.515v-0.026zM950.857 734.72v-67.291h-877.714v73.143h368.152l36.571 73.143h472.99v-78.994zM615.375 307.078c26.482 25.424 42.937 61.12 42.937 100.659 0 0.955-0.010 1.908-0.029 2.858l0.002-0.142c0 80.791-65.494 146.286-146.286 146.286v0c-80.791 0-146.286-65.494-146.286-146.286v0c0-80.791 65.494-146.286 146.286-146.286v0c0.808-0.017 1.761-0.026 2.716-0.026 39.539 0 75.235 16.455 100.614 42.889l0.045 0.047zM472.99 448c-9.935-9.668-16.099-23.168-16.099-38.107 0-0.317 0.003-0.634 0.008-0.95l-0.001 0.047c-0.193-10.084-8.414-18.185-18.526-18.185-4.911 0-9.375 1.91-12.691 5.028l0.010-0.009c-3.314 3.273-5.367 7.816-5.367 12.839 0 0.115 0.001 0.229 0.003 0.343v-0.017c-0.003 0.291-0.005 0.636-0.005 0.98 0 50.827 40.929 92.094 91.626 92.642h0.052c0.297 0.018 0.645 0.028 0.995 0.028 4.728 0 9.020-1.869 12.176-4.91l-0.005 0.005c3.391-3.359 5.491-8.018 5.491-13.166 0-10.234-8.296-18.53-18.53-18.53-0.045 0-0.090 0-0.134 0h0.007c-15.54-0.272-29.415-7.171-38.96-17.984l-0.050-0.057z" />
40
+ <glyph unicode="&#xe93c;" glyph-name="share" d="M1013.272 607.939l-292.571 292.571c-6.617 6.609-15.753 10.695-25.844 10.695s-19.227-4.087-25.844-10.696v0c-6.623-6.47-10.73-15.491-10.73-25.47 0-0.131 0.001-0.262 0.002-0.393v0.020-146.286h-127.756c-272.091 0-438.857-76.556-500.297-230.156-19.277-52.494-30.428-113.11-30.428-176.331 0-5.039 0.071-10.061 0.212-15.065l-0.016 0.737c7.824-95.17 33.801-182.655 74.466-261.316l-1.811 3.853c0-2.926 2.926-7.314 5.851-13.653l7.802-17.067c2.377-4.909 4.811-9.063 7.528-13.006l-0.214 0.328c3.478-5.476 9.298-9.195 16.016-9.747l0.075-0.005c0.231-0.011 0.502-0.018 0.774-0.018 5.131 0 9.734 2.265 12.862 5.849l0.017 0.020c2.75 3.681 4.403 8.32 4.403 13.346 0 0.279-0.005 0.558-0.015 0.835l0.001-0.040c0.187 2.263 0.293 4.898 0.293 7.558s-0.107 5.295-0.315 7.902l0.022-0.343c-0.126 2.040-0.198 4.425-0.198 6.827s0.072 4.786 0.213 7.152l-0.016-0.326q-2.926 39.010-2.926 70.217c-0.010 1.198-0.016 2.614-0.016 4.031 0 35.153 3.556 69.476 10.329 102.628l-0.56-3.284c6.451 29.862 16.034 56.251 28.649 80.827l-0.855-1.833c11.954 22.514 27.291 41.586 45.58 57.324l0.256 0.215c17.296 15.566 37.039 28.918 58.476 39.327l1.501 0.658c20.949 10.018 45.387 18.419 70.89 23.97l2.253 0.411c24.629 5.178 54.813 9.496 85.509 12.009l2.751 0.181c29.257 2.438 62.903 3.413 100.45 3.413h128.244v-146.286c0.018-20.184 16.385-36.539 36.571-36.539 10.091 0 19.227 4.087 25.844 10.696v0l292.571 292.571c6.609 6.617 10.695 15.753 10.695 25.844s-4.087 19.227-10.696 25.844v0z" />
41
+ <glyph unicode="&#xe93d;" glyph-name="step-backward" horiz-adv-x="875" d="M48.762-64h97.524c26.93 0 48.762 21.831 48.762 48.762v0 926.476c0 26.93-21.831 48.762-48.762 48.762v0h-97.524c-26.93 0-48.762-21.831-48.762-48.762v0-926.476c0-26.93 21.831-48.762 48.762-48.762v0zM325.242 482.621c-8.909-8.838-14.424-21.085-14.424-34.621s5.515-25.783 14.42-34.618l0.003-0.003 464.213-462.75c8.938-12.585 23.46-20.698 39.876-20.698 26.93 0 48.762 21.831 48.762 48.762 0 2.139-0.138 4.247-0.405 6.313l0.026-0.244v926.476c0.241 1.822 0.379 3.93 0.379 6.069 0 26.93-21.831 48.762-48.762 48.762-16.416 0-30.938-8.112-39.775-20.547l-0.102-0.15z" />
42
+ <glyph unicode="&#xe93e;" glyph-name="step-forward" horiz-adv-x="875" d="M826.027 960h-97.524c-26.93 0-48.762-21.831-48.762-48.762v0-926.476c0-26.93 21.831-48.762 48.762-48.762v0h97.524c26.93 0 48.762 21.831 48.762 48.762v0 926.476c0 26.93-21.831 48.762-48.762 48.762v0zM550.034 413.379c8.909 8.838 14.424 21.085 14.424 34.621s-5.515 25.783-14.42 34.618l-0.003 0.003-464.213 462.75c-8.999 10.521-22.288 17.147-37.124 17.147-26.93 0-48.762-21.831-48.762-48.762 0-0.886 0.024-1.766 0.070-2.64l-0.005 0.122v-926.476c-0.083-1.069-0.131-2.314-0.131-3.571 0-26.93 21.831-48.762 48.762-48.762 14.872 0 28.189 6.658 37.133 17.156l0.057 0.068z" />
43
+ <glyph unicode="&#xe93f;" glyph-name="user" horiz-adv-x="971" d="M487.619 960c-140.379-6.020-251.905-121.286-251.905-262.6 0-4.368 0.107-8.71 0.317-13.026l-0.024 0.608c-0.187-3.701-0.293-8.037-0.293-12.398 0-141.216 111.579-256.372 251.384-262.114l0.52-0.017c139.459 6.793 249.958 121.515 249.958 262.047 0 4.391-0.108 8.756-0.321 13.093l0.024-0.611c0.19 3.734 0.298 8.107 0.298 12.506 0 140.629-110.448 255.462-249.331 262.486l-0.627 0.025zM709.973 410.453c-62.38-43.101-138.983-69.864-221.665-72.637l-0.689-0.018c-84.047 2.48-161.368 29.286-225.722 73.577l1.417-0.922c-145.31 0-263.314-35.596-263.314-181.882v-195.048c133.154-61.929 289.047-98.058 453.379-98.058 12.041 0 24.036 0.194 35.983 0.579l-1.743-0.044c10.292-0.347 22.391-0.544 34.535-0.544 164.232 0 320.025 36.133 459.862 100.884l-6.778-2.816v195.048c-3.901 146.286-121.905 181.882-265.265 181.882z" />
44
+ <glyph unicode="&#xe940;" glyph-name="clone" d="M731.429 960h-585.143c-0.006 0-0.013 0-0.020 0-80.791 0-146.286-65.494-146.286-146.286 0-0.857 0.007-1.713 0.022-2.566l-0.002 0.128v-577.341c-0.063-1.6-0.098-3.478-0.098-5.364 0-80.791 65.494-146.286 146.286-146.286 0.035 0 0.069 0 0.104 0h585.137c0.009 0 0.019 0 0.029 0 80.791 0 146.286 65.494 146.286 146.286 0 1.029-0.011 2.055-0.032 3.079l0.002-0.153v579.779c0.013 0.725 0.020 1.581 0.020 2.438 0 80.791-65.494 146.286-146.286 146.286-0.007 0-0.014 0-0.021 0h0.001zM934.766 799.086c1.861-8.869 2.926-19.061 2.926-29.501 0-0.086 0-0.171 0-0.257v0.013-576.853c0.004-0.438 0.006-0.956 0.006-1.474 0-92.496-74.433-167.607-166.668-168.704l-0.104-0.001h-585.143c-9.646 0.248-18.882 1.301-27.85 3.098l1.031-0.172c22.675-52.558 73.856-88.772 133.549-89.234h585.202c0.009 0 0.019 0 0.029 0 80.791 0 146.286 65.494 146.286 146.286 0 1.029-0.011 2.055-0.032 3.079l0.002-0.153v576.853c0.012 0.687 0.018 1.498 0.018 2.311 0 60.192-36.354 111.894-88.304 134.345l-0.948 0.365z" />
45
  </font></defs></svg>
css/wd_bp_install.css CHANGED
@@ -1,46 +1,46 @@
1
- @media only screen and (max-width: 500px) {
2
- body #wd_backup_logo {
3
- max-width: 100%;
4
- }
5
- body #wd_bp_notice_cont p {
6
- padding-right: 25px !important;
7
- }
8
- }
9
-
10
- #wd_bp_logo_notice {
11
- width: 50px;
12
- float: left;
13
- margin-right: 10px;
14
- }
15
-
16
- #wd_bp_notice_cont {
17
- position: relative;
18
- }
19
-
20
- .wds_backup_install p {
21
- padding-top: 0px;
22
- margin-top: 0px;
23
- }
24
-
25
- #wd_bp_notice_cont a {
26
- margin: 0 5px;
27
- }
28
-
29
- #wd_bp_notice_cont .dashicons-dismiss:before {
30
- content: "\f153";
31
- background: 0 0;
32
- color: #72777c;
33
- display: block;
34
- font: 400 16px/20px dashicons;
35
- speak: none;
36
- height: 20px;
37
- text-align: center;
38
- width: 20px;
39
- -webkit-font-smoothing: antialiased;
40
- -moz-osx-font-smoothing: grayscale;
41
- }
42
-
43
- .wd_bp_notice_dissmiss {
44
- margin-top: 5px;
45
- }
46
-
1
+ @media only screen and (max-width: 500px) {
2
+ body #wd_backup_logo {
3
+ max-width: 100%;
4
+ }
5
+ body #wd_bp_notice_cont p {
6
+ padding-right: 25px !important;
7
+ }
8
+ }
9
+
10
+ #wd_bp_logo_notice {
11
+ width: 50px;
12
+ float: left;
13
+ margin-right: 10px;
14
+ }
15
+
16
+ #wd_bp_notice_cont {
17
+ position: relative;
18
+ }
19
+
20
+ .wds_backup_install p {
21
+ padding-top: 0px;
22
+ margin-top: 0px;
23
+ }
24
+
25
+ #wd_bp_notice_cont a {
26
+ margin: 0 5px;
27
+ }
28
+
29
+ #wd_bp_notice_cont .dashicons-dismiss:before {
30
+ content: "\f153";
31
+ background: 0 0;
32
+ color: #72777c;
33
+ display: block;
34
+ font: 400 16px/20px dashicons;
35
+ speak: none;
36
+ height: 20px;
37
+ text-align: center;
38
+ width: 20px;
39
+ -webkit-font-smoothing: antialiased;
40
+ -moz-osx-font-smoothing: grayscale;
41
+ }
42
+
43
+ .wd_bp_notice_dissmiss {
44
+ margin-top: 5px;
45
+ }
46
+
css/wdi_backend.css CHANGED
@@ -1,1806 +1,1806 @@
1
- .wdi_clear{
2
- clear: both;
3
- }
4
- .wdi_clear_tag:after{
5
- content:"";
6
- display:table;
7
- clear: both;
8
- }
9
- #wdi_unistall{
10
- background-color: #D82121;
11
- border-color: #D31818;
12
- box-shadow: inset 0 1px 0 rgba(230, 120, 120, 0.5),0 1px 0 rgba(0,0,0,.15);
13
- }
14
- #wdi_unistall:hover{
15
- background-color: #DA1313;
16
- }
17
- #wdi_unistall_table th{
18
- width: 45%;
19
- }
20
-
21
- .display_type_content {
22
- background: #fff;
23
- border: 1px solid #dedede;
24
- margin-bottom: 15px;
25
- }
26
-
27
- /*tooltip css*/
28
- .wdi_tooltip,
29
- .wdi_settings_link {
30
- display: block;
31
- font-size: 14px !important;
32
- font-weight: bold;
33
- line-height: 20px;
34
- margin-bottom: 5px;
35
- color: #444;
36
- text-decoration: none;
37
- }
38
- p.wdi_about_filed {
39
- font-size: 13px;
40
- font-style: italic;
41
- }
42
- .wdi_tooltip:hover,.wdi_settings_link:hover {
43
- color: rgb(35, 40, 45);
44
- position: relative;
45
- }
46
- .wdi_tooltip:hover:after {
47
- content: attr(wdi-tooltip);
48
- padding: 4px 8px;
49
- color: #dbdbe0;
50
- position: absolute;
51
- left: 0;
52
- top: 100%;
53
- white-space: nowrap;
54
- z-index: 20;
55
- -moz-border-radius: 3px;
56
- -webkit-border-radius: 3px;
57
- border-radius: 2px;
58
- -moz-box-shadow: 0px 0px 4px #222;
59
- -webkit-box-shadow: 0px 0px 4px #222;
60
- box-shadow: 0px 0px 4px rgba(0,0,0,0.5);
61
- background-color: rgba(0,0,0,0.75);
62
- font-size: 12px;
63
- }
64
- .wdi_pro_only{
65
- font-style: italic;
66
- color: #4E4E4E !important;
67
- background-color: #cccccc !important;
68
- text-decoration: none;
69
- }
70
- .wdi_pro_only_op{
71
- opacity: 0.6;
72
- }
73
- .wdi_pro_notice{
74
- text-align: right;
75
- color: #15699F;
76
- font-size: 20px !important;
77
- padding: 10px;
78
- }
79
- .wdi_pro_only_btn{
80
- background-color: #c5c0c0 !important;
81
- border-top-color: #c5c0c0 !important;
82
- }
83
- .wdi-pro-overlay img{
84
- opacity: 0.7;
85
- }
86
-
87
-
88
-
89
- /*feeds page*/
90
- #wdi_feed_users{
91
- width: 100%;
92
- margin-top: 2px;
93
- }
94
-
95
- #wdi_feed_tabs .wdi_feed_tabs {
96
- border: 1px solid #F1F1F1;
97
- color: #444;
98
- cursor: pointer;
99
- font-size: 13px;
100
- font-weight: bold;
101
- padding: 12px;
102
- background: #fff;
103
- text-decoration: none;
104
- display: inline-block;
105
- }
106
- #wdi_feed_tabs {
107
- margin: 16px 0;
108
- }
109
- #wdi_feed_tabs .wdi_feed_tab_active,
110
- #wdi_feed_tabs .wdi_feed_tabs:hover {
111
- background: none repeat scroll 0 0 #FFFFFF;
112
- /*border: 1px solid #46ACC3;*/
113
- color: #9a2465;
114
- }
115
-
116
- #how_to_publish_tab .wdi_howto_container .wdi_howto_content .wdi_howto_wrapper{
117
- max-width: 270px;
118
- margin: 0 auto;
119
- }
120
-
121
- #how_to_publish_tab .wdi_howto_container .wdi_howto_content .wdi_howto_wrapper img{
122
- max-width: 100%;
123
- }
124
-
125
- #wdi_feed_tabs .wdi_feed_tab_title{
126
- margin-top: 1px;
127
- display: inline-block;
128
- }
129
-
130
- .wdi_border_wrapper [scope='row'] + td, .wdi_border_wrapper [scope='row'] {
131
- padding: 8px;
132
- }
133
- .display_type_container.wdi_clear_tag {
134
- display: table;
135
- margin: 10px auto;
136
- }
137
- .display_type_container > div {
138
- float: left;
139
- margin-right: 15px;
140
- }
141
-
142
- .wdi_user {
143
- border: 1px solid rgb(185, 185, 185);
144
- background-color: rgba(0, 0, 0, .05);
145
- margin: 0px 4px 0 0;
146
- border-radius: 5px;
147
- height: 28px;
148
- position: relative;
149
- display: inline-block;
150
- }
151
- .wdi_user:hover{
152
- background-color: rgba(0, 0, 0, .08);
153
- }
154
- .wdi_user a{
155
- text-decoration: none;
156
- color: black;
157
- line-height: 28px;
158
- width:70%;
159
- margin-left: 12%;
160
- margin-right: 18%;
161
- height: 100%;
162
- display: table-row;
163
- padding-right: 3px;
164
- }
165
- .wdi_user .wdi_profile_pic{
166
- width: 20px;
167
- height: 20px;
168
- top: 4px;
169
- left: 30px;
170
- padding: 5px;
171
- vertical-align: middle;
172
- display: table-cell;
173
- }
174
- .wdi_user span{
175
- display: table-cell;
176
- vertical-align: middle;
177
- left: 55px;
178
- font-weight: bold;
179
- font-size: 14px;
180
- }
181
- .wdi_user .wdi_remove_user,.wdi_user .wdi_check_thumb_user{
182
- position: absolute;
183
- right: 4px;
184
- width: 15px;
185
- height: 15px;
186
- top: 6.5px;
187
- transition: all 0.1s ease;
188
- }
189
- .wdi_user .wdi_remove_user:hover {
190
- cursor: pointer;
191
- transform: rotate(180deg);
192
- /*top: 6px;*/
193
- }
194
- .wdi_user .wdi_check_thumb_user:hover{
195
- cursor: pointer;
196
- }
197
- .wdi_user .wdi_check_thumb_user{
198
- left: 4px;
199
- }
200
-
201
- .wdi_border_wrapper [scope='row'] {
202
- padding: 2px;
203
- font-size: 13px;
204
- min-width: 250px;
205
- }
206
- .wdi_border_wrapper [scope='row'] + td, .wdi_border_wrapper [scope='row'] {
207
- padding: 2px;
208
- }
209
-
210
- /*.notice {*/
211
- /*display: inline-block;*/
212
- /*line-height: 19px;*/
213
- /*font-size: 14px;*/
214
- /*text-align: left;*/
215
- /*background-color: #fff;*/
216
- /*border-left: 4px solid #ffba00;*/
217
- /*-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);*/
218
- /*box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);*/
219
- /*}*/
220
-
221
-
222
- .small_input{
223
- width: 60px;
224
- text-align: center;
225
- }
226
- .display_type{
227
- text-align: center;
228
- }
229
-
230
- .wdi_access_token_missing{
231
- font-size: 14px;
232
- color: #000000;
233
- clear: both;
234
- max-width: 720px;
235
- }
236
-
237
- .instagram-feed_page_wdi_settings form{
238
- width: 65%;
239
- }
240
-
241
- .instagram-feed_page_wdi_settings table td{
242
- padding-left: 0;
243
- padding-right: 0;
244
- }
245
-
246
- .instagram-feed_page_wdi_settings table th{
247
- padding-left: 4px;
248
- }
249
-
250
- .instagram-feed_page_wdi_settings table input
251
- /*.instagram-feed_page_wdi_settings table textarea,*/
252
- /*.instagram-feed_page_wdi_settings table select*/
253
- {
254
- float: right;
255
- }
256
-
257
- #login_with_instagram {
258
- height: 43px;
259
- }
260
-
261
- #login_with_instagram .wdi_sign_in_button{
262
- background-image: url('../images/sign_in_with_instagram.png');
263
- background-repeat: no-repeat;
264
- background-position: left top;
265
- width: 234px;
266
- height: 43px;
267
- display:inline-block;
268
- float: left;
269
- }
270
-
271
- #login_with_instagram .wdi_sign_in_button:hover {
272
- /*background-image: url('../images/sign_in_with_instagram_hover.png');*/
273
- }
274
-
275
-
276
- #login_with_instagram .wdi_default_feed_button,
277
- #login_with_instagram .wdi_edit_default_feed_button{
278
-
279
- width: 234px;
280
- height: 43px;
281
- background-repeat: no-repeat;
282
- background-position: center top;
283
- display:inline-block;
284
-
285
- }
286
- #login_with_instagram .wdi_default_feed_button{
287
- background-image: url('../images/default_feed_button.png');
288
- float: left;
289
- margin-right: 10px;
290
- }
291
- #login_with_instagram .wdi_edit_default_feed_button{
292
- background-image: url('../images/edit_feed_button.png');
293
- float: left;
294
-
295
- }
296
-
297
- #wdwt_wrap_wdi_authenticated_users_list{
298
- display: inline-block;
299
- width: 100%;
300
- }
301
-
302
- #wdwt_wrap_wdi_authenticated_users_list .wdi_sign_in_button{
303
- background-image: url(../images/multiple_accounts.png);
304
- background-repeat: no-repeat;
305
- background-position: left top;
306
- width: 228px;
307
- height: 36px;
308
- display: inline-block;
309
- float: right;
310
- margin-top: 2px;
311
- padding-bottom: 5px;
312
- }
313
-
314
- .wdi_element_name_hashtag_top_recent{
315
- display: none;
316
- }
317
-
318
-
319
- /*
320
- .wdi_multiple_accounts_section tr:not(:first-child) th{
321
- font-style: italic;
322
- }
323
-
324
- .wdi_multiple_accounts_section tr:not(:first-child) th,
325
- .wdi_multiple_accounts_section tr:not(:first-child) td{
326
- padding-top: 2px;
327
- padding-bottom: 0;
328
- font-weight: 400;
329
- }
330
-
331
- .wdi_multiple_accounts_section tr:first-child th{
332
- padding-bottom: 20px;
333
- }
334
-
335
- .wdi_multiple_accounts_section .wdi_username_tr td{
336
- padding-bottom: 5px !important;
337
- }
338
-
339
- .wdi_multiple_accounts_section .wdi_input_wrapper{
340
- width: 100%;
341
- display: inline-block;
342
- }
343
-
344
- .wdi_multiple_accounts_section .wdi_remove_auth_user{
345
- display: inline-block;
346
- float: right;
347
- color: #0075A5;
348
- cursor: pointer;
349
- font-weight: 300;
350
- font-size: 14px;
351
- margin-right: 3px;
352
- }
353
- */
354
-
355
- .wdi_advanced_option_open tr:nth-child(9),
356
- .wdi_advanced_option_open tr:nth-child(10),
357
- .wdi_advanced_option_open tr:nth-child(11){
358
- display: none;
359
- }
360
-
361
- .instagram-feed_page_wdi_settings table #wdwt_wrap_wdi_fb_auth{
362
- margin-left: 115px;
363
- }
364
-
365
- #wdwt_wrap_wdi_fb_auth .block a{
366
- background-color: #4267b2;
367
- color: #FFFFff;
368
- }
369
-
370
- .wdi_advanced_option .optioninput,
371
- #wdwt_wrap_wdi_reset_cache .block,
372
- #wdwt_wrap_wdi_authenticated_users_list .block{
373
- display: inline-block;
374
- }
375
- #wdi_options_page_buttons_wrapper .submit {
376
- display: inline;
377
- margin-left: 15px;
378
- }
379
-
380
- #wdi_reset_access_token {
381
- margin-top: 0;
382
- float: left;
383
- width: 232px;
384
- text-align: center;
385
- }
386
-
387
- .wdi_advanced_option {
388
- width: 100%;
389
- position: relative;
390
- font-weight: 600;
391
- }
392
-
393
- .wdi_advanced_option {
394
- background-color: #fff;
395
- cursor: pointer;
396
- border: 1px solid rgb(227, 227, 227);
397
- border-radius: 10px;
398
- border-collapse: separate;
399
- border-spacing: 0;
400
- }
401
-
402
- .wdi_advanced_option .wdi_advanced_option_head {
403
- border-bottom: 1px solid rgb(227, 227, 227);
404
- }
405
-
406
- .wdi_advanced_option .wdi_advanced_option_head th {
407
- padding-top: 10px;
408
- padding-bottom: 10px;
409
- }
410
-
411
- .wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_head th {
412
- border-bottom: 1px solid rgb(227, 227, 227);
413
- border-bottom-left-radius: 10px;
414
- }
415
-
416
- .wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_head td {
417
- border-bottom: 1px solid rgb(227, 227, 227);
418
- border-bottom-right-radius: 10px;
419
- }
420
-
421
- .instagram-feed_page_wdi_settings table.wdi_advanced_option th {
422
- padding-left: 12px;
423
- }
424
-
425
- .instagram-feed_page_wdi_settings table.wdi_advanced_option td .wdwt_param{
426
- margin-left: 15px;
427
- }
428
-
429
- .instagram-feed_page_wdi_settings #wdwt_wrap_wdi_disable_fa .optioninput{
430
- display: inline-block;
431
- }
432
-
433
- .wdi_advanced_option .wdi_advanced_option_icon {
434
- background-repeat: no-repeat;
435
- background-position: left top;
436
- width: 20px;
437
- height: 20px;
438
- display: inline-block;
439
- position: absolute;
440
- top: 16px;
441
- right: 10px;
442
- }
443
-
444
- .wdi_advanced_option.wdi_advanced_option_close .wdi_advanced_option_icon {
445
- background-image: url('../images/arrow_1.png');
446
- }
447
-
448
- .wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_icon {
449
- background-image: url('../images/arrow_2.png');
450
- }
451
-
452
- .wdi_advanced_option.wdi_advanced_option_close tbody tr:not(.wdi_advanced_option_head) {
453
- display: none;
454
- }
455
-
456
- .instagram-feed_page_wdi_settings form h2 {
457
- display: none;
458
- }
459
-
460
- #wdi_options_page_buttons_wrapper{
461
- margin-top: 10px;
462
- width: 700px;
463
- }
464
-
465
-
466
- .wdi_hide{
467
- display: none;
468
- }
469
-
470
-
471
- /*---------------------------------------------------------
472
- ------------------Conditional Filters Ui-------------------
473
- ---------------------------------------------------------*/
474
- .wdi_hidden{
475
- display: none !important;
476
- }
477
- .selectoff{
478
- -webkit-user-select: none; /* Chrome/Safari */
479
- -moz-user-select: none; /* Firefox */
480
- -ms-user-select: none; /* IE10+ */
481
-
482
- /* Rules below not implemented in browsers yet */
483
- -o-user-select: none;
484
- user-select: none;
485
- }
486
- .wdi_filter_radio {
487
- margin: 5px;
488
- display: inline-block;
489
- }
490
-
491
- .wdi_filter_radio label {
492
- vertical-align: text-bottom;
493
- }
494
-
495
- .wdi_filter_input {
496
- margin-top: 10px;
497
- }
498
-
499
- .wdi_filter_input input {
500
- height: 28px;
501
- width: 250px;
502
- margin-right: 0;
503
- padding-right: 0;
504
- line-height: 28px;
505
- }
506
- #wdi_filter_type{
507
- line-height: 28px;
508
- margin: 0;
509
- padding: 0;
510
- position: relative;
511
- right: 2px;
512
- top: -1px;
513
- font-weight: 400;
514
- }
515
- .wdi_filter_item {
516
- display: inline-block;
517
- padding: 6px;
518
- margin-top: 5px;
519
- border-radius: 5px;
520
- }
521
-
522
- .wdi_filter_by_username {
523
- background-color: #00A0D2;
524
- color: white;
525
- }
526
-
527
- .wdi_filter_by_hashtag {
528
- background-color: #E08D11;
529
- color: white;
530
- }
531
- .wdi_logic{
532
- display: inline-block;
533
- padding: 5px;
534
- font-weight: bold;
535
- }
536
- .wdi_filter_by_location {
537
- background-color: #509833;
538
- color: white;
539
- }
540
-
541
- .wdi_filter_by_mention {
542
- background-color: #833888;
543
- color: white;
544
- }
545
-
546
- .wdi_filter_by_description {
547
- background-color: #BD242B;
548
- color: white;
549
- }
550
- .wdi_filter_by_url {
551
- background-color: #004EFF;
552
- color: white;
553
- }
554
-
555
- .wdi_remove_filter{
556
- padding-left: 5px;
557
- color: white;
558
- font-size: 13px;
559
- }
560
- .wdi_remove_filter:hover{
561
- cursor: pointer;
562
- }
563
-
564
-
565
- .wdi_source_user{
566
- display: inline-block;
567
- padding: 5px;
568
- }
569
- .wdi_source_img{
570
- display: inline-block;
571
- }
572
- .wdi_source_img img{
573
- width: 30px;
574
- height: 30px;
575
- border-radius: 15px;
576
- display: block;
577
- }
578
- .wdi_source_username{
579
- display: inline-block;
580
- line-height: 25px;
581
- font-size: 15px !important;
582
- height: 30px;
583
- vertical-align: bottom;
584
- padding: 0 5px;
585
- font-weight: bold;
586
- }
587
-
588
- #login_with_instagram > a:focus{
589
- -webkit-box-shadow:none;
590
- box-shadow:none;
591
- }
592
-
593
-
594
-
595
- .wdi_help_bar_wrap {
596
- background-color: #ffffff;
597
- border: none;
598
- box-sizing: border-box;
599
- clear: both;
600
- color: #6e7990;
601
- font-size: 14px;
602
- font-weight: bold;
603
- line-height: 30px;
604
- padding: 15px;
605
- vertical-align: middle;
606
- width: 100%;
607
- margin: 20px 0 0 0;
608
-
609
- }
610
- .wdi_help_bar_text{
611
- float:left;
612
- }
613
- .wdi_help_bar_text > a{
614
- color:#0073aa;
615
- text-decoration: none;
616
- }
617
- .wdi_hb_buy_pro{
618
- padding:0;
619
- margin-top: 50px;
620
- }
621
-
622
- .wdi_hb_buy_pro a,
623
- .wdi_hb_buy_pro a:active,
624
- .wdi_hb_buy_pro a:visited,
625
- .wdi_hb_buy_pro a:hover {
626
- display: inline-block;
627
- font-weight: bold;
628
- font-size: 14px;
629
- vertical-align: middle;
630
- border: none;
631
- box-shadow: none !important;
632
- text-decoration: none;
633
- }
634
-
635
- .wdi_hb_buy_pro .wdi_support_link{
636
- color: #72777c !important;
637
- padding: 0 10px;
638
- }
639
- .wdi_hb_buy_pro .wdi_update_pro_link{
640
- background: #45A6B7;
641
- font-weight: bold;
642
- line-height: 30px;
643
- padding: 0 18px 0 18px;
644
- color: #fff !important;
645
- }
646
-
647
- .wdi_hb_buy_pro img {
648
- border: none;
649
- display: inline-block;
650
- vertical-align: middle;
651
- }
652
-
653
- #bullets_images_type,
654
- #bullets_images_color,
655
- #bull_style,
656
- #rl_butt_type,
657
- #rl_butt_color,
658
- #rl_butt_style {
659
- margin: 0 10px 0 0;
660
- width: 100px;
661
- }
662
-
663
- .wds_ctrl_btn_upload {
664
- display: block !important;
665
- margin: 5px 0 !important;
666
- text-align: center;
667
- vertical-align: middle;
668
- width: 95%;
669
- }
670
-
671
- .wds_reverse {
672
- margin: 0 5px !important;
673
- }
674
-
675
- .wds_free_button,
676
- .wds_free_button:hover {
677
- background: linear-gradient(to bottom, #E5E5E5, #E5E5E5) repeat scroll 0 0 #f3f3f3 !important;
678
- border-color: #bbb !important;
679
- color: #888888 !important;
680
- }
681
-
682
- .wdi_spider_free_version_label,
683
- .wdi_spider_free_version_label * {
684
- color: #808080 !important;
685
- }
686
-
687
- .wdi_spider_free_version {
688
- background-color: #DFDFDF;
689
- border: 1px solid #797979;
690
- border-radius: 2px;
691
- padding: 2px;
692
- width: 210px;
693
- }
694
-
695
- .wds_more {
696
- font-size: 12px;
697
- }
698
-
699
- .wrap .button {
700
- border-radius: 3px !important;
701
- text-shadow: none !important;
702
- }
703
-
704
- .wdi_spider_message_cont {
705
- display: none;
706
- width: 99%;
707
- }
708
-
709
- .wdi_spider_load {
710
- display: none;
711
- }
712
-
713
- .wdi_spider_load_cont {
714
- background-color: rgba(0, 0, 0, 0.2);
715
- left: 0;
716
- height: 100%;
717
- position: fixed;
718
- top: 0;
719
- width: 100%;
720
- z-index: 99998;
721
- }
722
-
723
- .wdi_spider_load_icon {
724
- left: 0;
725
- height: 100%;
726
- position: fixed;
727
- text-align: center;
728
- top: 0;
729
- width: 100%;
730
- z-index: 99999;
731
- }
732
-
733
- .wdi_spider_ajax_loading {
734
- border: none !important;
735
- margin-top: 200px;
736
- width: 50px;
737
- -webkit-animation: spin 2.5s infinite linear;
738
- -moz-animation: spin 2.5s infinite linear;
739
- -o-animation: spin 2.5s infinite linear;
740
- animation: spin 2.5s infinite linear;
741
- }
742
-
743
- @-moz-keyframes spin {
744
- 0% {
745
- -moz-transform: rotate(0deg);
746
- }
747
- 100% {
748
- -moz-transform: rotate(359deg);
749
- }
750
- }
751
- @-webkit-keyframes spin {
752
- 0% {
753
- -webkit-transform: rotate(0deg);
754
- }
755
- 100% {
756
- -webkit-transform: rotate(359deg);
757
- }
758
- }
759
- @-o-keyframes spin {
760
- 0% {
761
- -o-transform: rotate(0deg);
762
- }
763
- 100% {
764
- -o-transform: rotate(359deg);
765
- }
766
- }
767
- @-ms-keyframes spin {
768
- 0% {
769
- -ms-transform: rotate(0deg);
770
- }
771
- 100% {
772
- -ms-transform: rotate(359deg);
773
- }
774
- }
775
- @keyframes spin {
776
- 0% {
777
- transform: rotate(0deg);
778
- }
779
- 100% {
780
- transform: rotate(359deg);
781
- }
782
- }
783
-
784
- #TB_window,
785
- #TB_iframeContent {
786
- width: 800px !important;
787
- height: 500px !important;
788
- }
789
-
790
- #TB_window {
791
- margin-left: -400px !important;
792
- }
793
-
794
-
795
- .input_th {
796
- margin-left: 0px !important;
797
- width: 160px !important;
798
- font-family: sans-serif;
799
- }
800
- .input_th2 {
801
- margin-left: 0px !important;
802
- width: 160px !important;
803
- margin-top:5px;
804
- height: 19px;
805
- }
806
-
807
- .edit_input {
808
- height: 28px !important;
809
- padding-bottom: 7px !important;
810
- }
811
-
812
- .add_tag_th {
813
- padding-left: 21px;
814
- font-size: 12px;
815
- font-family: sans-serif;
816
- }
817
-
818
- .pointer{
819
- cursor: pointer;
820
- }
821
-
822
- .non_selectable {
823
- -webkit-touch-callout: none;
824
- -webkit-user-select: none;
825
- -khtml-user-select: none;
826
- -moz-user-select: none;
827
- -ms-user-select: none;
828
- user-select: none;
829
- }
830
-
831
- .wds_position_table td,
832
- .wds_position_table input{
833
- border: 1px solid #CCCCCC;
834
- margin: 2px;
835
- }
836
-
837
- .wds_position_table .wds_position_td {
838
- background-color: #f4f4f4;
839
- display: inline-block;
840
- line-height: 1;
841
- padding: 0 !important;
842
- }
843
-
844
- .wdi_spider_div_options {
845
- background: none repeat scroll 0 0 #F4F4F4;
846
- border: 1px solid #8F8D8D;
847
- border-radius: 8px 8px 8px 8px;
848
- display: none;
849
- margin: 2px 0 0 190px;
850
- padding: 13px;
851
- min-height: 300px;
852
- min-width: 600px;
853
- vertical-align: top;
854
- }
855
-
856
-
857
-
858
- .table_medium_col {
859
- text-align: center !important;
860
- width: 70px;
861
- }
862
-
863
-
864
- .table_medium_col_uncenter {
865
- width: 80px;
866
- }
867
-
868
- .table_extra_large_col {
869
- padding: 4px !important;
870
- width: 150px !important;
871
- }
872
-
873
- .first-page,
874
- .prev-page,
875
- .next-page,
876
- .last-page,
877
- .table_extra_large_col a,
878
- .table_medium_col a,
879
- .table_big_col a,
880
- .table_small_col a {
881
- cursor: pointer;
882
- }
883
-
884
- .wdi_spider_word_wrap {
885
- word-wrap: normal;
886
- }
887
-
888
- .wdi_spider_description {
889
- color: #666666;
890
- font-size: 0.923em;
891
- line-height: 1.231em;
892
- }
893
-
894
- .handle {
895
- background: url("../images/draggable.png") no-repeat transparent;
896
- border: none;
897
- cursor: move;
898
- display: inline-block;
899
- height: 15px;
900
- margin: 0 auto;
901
- vertical-align: middle;
902
- width: 15px;
903
- }
904
-
905
- .slider-icon {
906
- background-image: url("../images/slider-icon.png");
907
- background-repeat: no-repeat;
908
- border: none;
909
- float: left;
910
- height: 32px;
911
- margin: 7px 8px 0 0;
912
- width: 32px;
913
- }
914
- .uninstall-icon {
915
- background-image: url("../images/uninstall-icon.png");
916
- background-repeat: no-repeat;
917
- border: none;
918
- float: left;
919
- height: 32px;
920
- margin: 7px 8px 0 0;
921
- width: 32px;
922
- }
923
-
924
- .wdi_spider_label {
925
- font-weight: bold;
926
- width: 100px;
927
- }
928
-
929
- .wdi_spider_label_top {
930
- font-weight: bold;
931
- padding-top: 3px;
932
- vertical-align: top;
933
- width: 100px;
934
- }
935
-
936
- .wdi_spider_fieldset .wdi_spider_label {
937
- font-weight: bold;
938
- vertical-align: top;
939
- width: 150px;
940
- }
941
-
942
- .wdi_spider_label_options {
943
- font-weight: bold;
944
- vertical-align: top;
945
- width: 150px;
946
- }
947
-
948
- .wdi_spider_choose_option {
949
- display: table;
950
- box-shadow: 0px 0px 1px 1px #D2D2D2;
951
- margin-bottom: 5px;
952
- border-radius: 2px;
953
- padding: 2px;
954
- box-sizing: border-box;
955
- cursor: pointer;
956
- width: 100%;
957
- }
958
-
959
- .wdi_spider_options_cont,
960
- .wdi_spider_bull_options_cont,
961
- .wdi_spider_pp_options_cont,
962
- .wdi_spider_options_color_cont,
963
- .wdi_spider_bull_options_color_cont,
964
- .wdi_spider_pp_options_color_cont {
965
- display: none;
966
- width: 180px;
967
- height: 150px;
968
- overflow: scroll;
969
- overflow-x: hidden;
970
- overflow-y: scroll;
971
- }
972
-
973
- .wdi_spider_option_cont {
974
- display: block;
975
- border-bottom: 1px solid #D3D3D3;
976
- padding: 3px 0px 3px 0px;
977
- box-sizing: content-box;
978
- width: 98%;
979
- border-radius: 0px;
980
- cursor: pointer;
981
- }
982
-
983
- .wdi_spider_option_cont_title {
984
- display: table-cell;
985
- vertical-align: middle;
986
- padding: 0px 0px 0px 4px;
987
- }
988
-
989
- .wdi_spider_option_cont_img {
990
- display: table-cell;
991
- width: 23%;
992
- height: 15px;
993
- text-align: right;
994
- padding: 5px 4px 0px 0px;
995
- box-sizing: border-box;
996
- background-color: #EEEEEE;
997
- }
998
-
999
- .wdi_spider_option_main_title {
1000
- display: table-cell;
1001
- width: 65%;
1002
- vertical-align: middle;
1003
- padding: 0px 0px 0px 4px;
1004
- color: #555;
1005
- }
1006
-
1007
- .wdi_spider_sel_option_ic {
1008
- display: table-cell;
1009
- width: 20%;
1010
- height: 15px;
1011
- text-align: right;
1012
- padding: 0px 6px 0px 0px;
1013
- box-sizing: border-box;
1014
- }
1015
-
1016
- .wdi_spider_int_input {
1017
- width: 45px;
1018
- }
1019
-
1020
- .wdi_spider_char_input {
1021
- width: 115px;
1022
- }
1023
-
1024
- .wdi_spider_text_input {
1025
- width: 190px;
1026
- }
1027
-
1028
- .wdi_spider_slider_div {
1029
- display: inline-block;
1030
- vertical-align: middle;
1031
- width: 140px;
1032
- }
1033
-
1034
- .wdi_spider_slider_percentage,
1035
- .wdi_spider_slider_percentage input,
1036
- .wdi_spider_slider_percentage input :focus {
1037
- background: transparent;
1038
- border: none;
1039
- color: #00AEEF;
1040
- display: inline;
1041
- font-weight: bold;
1042
- text-align: right;
1043
- vertical-align: middle;
1044
- width: 30px;
1045
- }
1046
-
1047
- .updated,
1048
- .error {
1049
- margin: 5px 0 2px !important;
1050
- }
1051
-
1052
- .buttons_div {
1053
- clear: both;
1054
- float: right;
1055
- margin: 5px 0;
1056
- }
1057
-
1058
- .buttons_div_left {
1059
- float: left;
1060
- margin: 5px 0;
1061
- }
1062
-
1063
- .buttons_div_right {
1064
- float: right;
1065
- margin: 5px 0;
1066
- }
1067
-
1068
- .wdi_spider_delete_img {
1069
- background-image: url("../images/delete.png");
1070
- border: none;
1071
- cursor: pointer;
1072
- display: inline-block;
1073
- vertical-align: middle;
1074
- height: 14px;
1075
- width: 14px;
1076
- }
1077
-
1078
- .wdi_spider_delete_img_small {
1079
- background-image: url("../images/delete.png");
1080
- background-size: 10px auto;
1081
- border: medium none;
1082
- cursor: pointer;
1083
- display: inline-block;
1084
- height: 10px;
1085
- margin-top: 2px;
1086
- vertical-align: middle;
1087
- width: 10px;
1088
- }
1089
-
1090
- .wdi_spider_fieldset {
1091
- background: none repeat scroll 0 0 #F4F4F4;
1092
- border: 1px solid #8F8D8D;
1093
- border-radius: 8px 8px 8px 8px;
1094
- display: none;
1095
- float: left;
1096
- margin: 4px;
1097
- padding: 13px;
1098
- width: 97%;
1099
- }
1100
-
1101
- .wdi_spider_type_fieldset {
1102
- background: none repeat scroll 0 0 #F4F4F4;
1103
- border-radius: 8px 8px 8px 8px;
1104
- display: none;
1105
- float: left;
1106
- width: 100%;
1107
- }
1108
-
1109
- .wdi_spider_child_fieldset {
1110
- background: none repeat scroll 0 0 #F4F4F4;
1111
- border: 1px solid #8F8D8D;
1112
- border-radius: 8px 8px 8px 8px;
1113
- float: left;
1114
- margin: 4px;
1115
- width: 30%;
1116
- padding: 13px;
1117
- display: block;
1118
- }
1119
-
1120
- .wdi_spider_table td {
1121
- padding: 0;
1122
- vertical-align: middle;
1123
- }
1124
-
1125
- .wdi_spider_ctrls {
1126
- padding: 4px;
1127
- text-align: center;
1128
- width: 40px;
1129
- }
1130
-
1131
- .theme_type {
1132
- background-color: #F4F4F4;
1133
- border: 1px solid #8F8D8D;
1134
- border-radius: 8px 8px 8px 8px;
1135
- cursor: pointer;
1136
- display: inline-block;
1137
- font-size: 16px;
1138
- height: 24px;
1139
- padding-top: 5px;
1140
- text-align: center;
1141
- vertical-align: middle;
1142
- width: 123px;
1143
- margin: 2px 0px 2px 0px;
1144
- }
1145
-
1146
- .ui-slider-handle {
1147
- cursor: pointer !important;
1148
- }
1149
-
1150
- .thumb {
1151
- border: 1px solid #CCCCCC;
1152
- max-height: 120px;
1153
- max-width: 120px;
1154
- }
1155
-
1156
- .fileDescription {
1157
- color: #666666;
1158
- cursor: pointer;
1159
- font-family: sans-serif;
1160
- font-size: 12px;
1161
- }
1162
-
1163
- .filename {
1164
- font-size: 13px;
1165
- }
1166
-
1167
- .tag_div {
1168
- background-clip: padding-box;
1169
- background-color: #F3F3F3;
1170
- border: 1px solid #AAAAAA;
1171
- border-radius: 3px 3px 3px 3px;
1172
- box-shadow: 0 0 2px #FFFFFF inset, 0 1px 0 rgba(0, 0, 0, 0.05);
1173
- color: #666666;
1174
- line-height: 13px;
1175
- margin: 2px 0;
1176
- padding: 2px 5px 2px 5px;
1177
- width: 132px;
1178
- }
1179
-
1180
- .tags_div {
1181
- overflow-y: auto;
1182
- height: 65px;
1183
- }
1184
-
1185
- .tag_name {
1186
- width: 118px;
1187
- }
1188
-
1189
- .edit_thumb {
1190
- cursor: pointer;
1191
- }
1192
-
1193
- .wdi_spider_rotate {
1194
- border-radius: 2px;
1195
- border: 1px solid #FFFFFF;
1196
- height: 30px;
1197
- }
1198
-
1199
- .wdi_spider_search_value {
1200
- height: 2em;
1201
- margin: 0 0 4px;
1202
- }
1203
-
1204
- #th_order,
1205
- .wdi_spider_order {
1206
- display: none;
1207
- }
1208
-
1209
- .wds_add_video,
1210
- .wds_resize_image,
1211
- .wds_import,
1212
- .wds_exports {
1213
- display: none;
1214
- padding: 10px;
1215
- height: 60px;
1216
- background-color: #FFFFFF;
1217
- border: 1px solid #999999;
1218
- top: 50%;
1219
- position: fixed;
1220
- left: 50%;
1221
- text-align: left;
1222
- z-index: 100000;
1223
- border-radius: 3px;
1224
- margin-top: -45px;
1225
- }
1226
-
1227
- .wds_add_video,
1228
- .wds_resize_image {
1229
- margin-left: -340px;
1230
- }
1231
-
1232
- .wds_exports {
1233
- margin-left: -240px;
1234
- }
1235
-
1236
- .wds_import {
1237
- margin-left: -185px;
1238
- }
1239
-
1240
- .wds_add_video input[type="text"],
1241
- .wds_resize_image input[type="text"] {
1242
- width: 500px;
1243
- }
1244
-
1245
-
1246
- .wds_opacity_video,
1247
- .wds_opacity_import,
1248
- .wds_opacity_export {
1249
- background-color: #000000;
1250
- display: none;
1251
- opacity: 0.75;
1252
- filter: Alpha(opacity=75);
1253
- position: fixed;
1254
- top: 0;
1255
- left: 0;
1256
- width: 100%;
1257
- height: 100%;
1258
- z-index: 99998;
1259
- }
1260
-
1261
-
1262
- .wds_tabs {
1263
- clear: both;
1264
- display: none;
1265
- position: relative;
1266
- z-index: 1;
1267
- }
1268
-
1269
- .wds_tabs a.wds_sub_active,
1270
- .wds_tabs a.wds_active {
1271
- background-color: #F5F5F5;
1272
- border-bottom: 1px solid #F5F5F5;
1273
- color: #333;
1274
- }
1275
-
1276
- .wds_tabs a {
1277
- background-color: #f9f9f9;
1278
- border: 1px solid #dfdfdf;
1279
- border-top-left-radius: 3px;
1280
- border-top-right-radius: 3px;
1281
- color: #c7c7c7;
1282
- display: block !important;
1283
- float: left;
1284
- font: bold 17px/32px Arial,serif;
1285
- height: 30px;
1286
- margin: 3px 3px 0 0;
1287
- padding: 0 10px;
1288
- position: relative;
1289
- text-decoration: none;
1290
- width: 130px;
1291
- }
1292
-
1293
- .wbs_subtab a {
1294
- font: bold 14px/26px Arial,serif;
1295
- height: 26px;
1296
- padding: 0 5px;
1297
- width: 105px;
1298
- }
1299
-
1300
- .wds_add_layer {
1301
- font: normal 20px/28px Arial,serif !important;
1302
- width: initial !important;
1303
- padding: 0 9px !important;
1304
- }
1305
-
1306
- .wds_tab_title {
1307
- background: none repeat scroll 0 0 transparent !important;
1308
- border: none !important;
1309
- cursor: pointer;
1310
- opacity: 0.5;
1311
- filter: Alpha(opacity=50);
1312
- padding: 1px;
1313
- vertical-align: middle;
1314
- width: 50px;
1315
- }
1316
-
1317
- .wds_sub_active .wds_tab_title,
1318
- .wds_layer_title {
1319
- background-color: #FFFFFF !important;
1320
- border-color: #DFDFDF !important;
1321
- border-radius: 3px !important;
1322
- border-style: solid !important;
1323
- border-width: 1px !important;
1324
- cursor: pointer;
1325
- opacity: 1;
1326
- filter: Alpha(opacity=100);
1327
- }
1328
-
1329
- .wds_tab_remove {
1330
- background-image: url("../images/close.png");
1331
- background-repeat: no-repeat;
1332
- background-size: 100% 100%;
1333
- display: inline-block;
1334
- width: 9px;
1335
- height: 9px;
1336
- opacity: 0.5;
1337
- filter: Alpha(opacity=50);
1338
- vertical-align: middle;
1339
- }
1340
-
1341
- .wds_layer_remove {
1342
- background-image: url("../images/close.png");
1343
- background-repeat: no-repeat;
1344
- background-size: 100% 100%;
1345
- display: inline-block;
1346
- width: 15px;
1347
- height: 15px;
1348
- margin: 5px;
1349
- float: right;
1350
- }
1351
-
1352
- .wds_layer_dublicate {
1353
- background-image: url("../images/duplicate.png");
1354
- background-repeat: no-repeat;
1355
- background-size: 100% 100%;
1356
- display: inline-block;
1357
- width: 15px;
1358
- height: 15px;
1359
- margin: 5px;
1360
- float: right;
1361
- }
1362
-
1363
- .wds_slide_dublicate {
1364
- background-image: url("../images/duplicate.png");
1365
- background-repeat: no-repeat;
1366
- background-size: 100% 100%;
1367
- display: inline-block;
1368
- width: 12px;
1369
- height: 12px;
1370
- vertical-align: middle;
1371
- }
1372
-
1373
- .wds_layer_depth {
1374
- float: right;
1375
- font-size: 13px;
1376
- line-height: 15px;
1377
- margin: 1px 5px;
1378
- text-align: left;
1379
- width: 40px;
1380
- }
1381
-
1382
- .wds_layer_label {
1383
- display: inline-block;
1384
- font-size: 13px;
1385
- width: 80%;
1386
- }
1387
-
1388
- .wds_sub_active .wds_tab_remove {
1389
- cursor: pointer !important;
1390
- opacity: 1;
1391
- filter: Alpha(opacity=100);
1392
- }
1393
-
1394
- .wds_box.wds_sub_active,
1395
- .wds_box.wds_active {
1396
- display: block;
1397
- }
1398
-
1399
- .wds_tab_label {
1400
- display: block;
1401
- width: inherit;
1402
- }
1403
-
1404
- .wds_box {
1405
- display: none;
1406
- margin-top: 0 !important;
1407
- position: relative;
1408
- top: -1px;
1409
- }
1410
-
1411
- .wds_box {
1412
- border: 1px solid #dfdfdf;
1413
- border-radius: 3px;
1414
- box-shadow: 0 0 10px #f2f2f2;
1415
- margin-top: 15px;
1416
- position: relative;
1417
- }
1418
-
1419
- .wds_clear {
1420
- clear: both;
1421
- float: none !important;
1422
- }
1423
-
1424
- .wds_box thead td {
1425
- border-bottom: 0 none !important;
1426
- }
1427
-
1428
- .wds_box tbody {
1429
- background-color: #FFFFFF;
1430
- border-top: 0 none;
1431
- padding-left: 10px;
1432
- }
1433
-
1434
- .wds_box thead {
1435
- background: -webkit-linear-gradient(#F5F5F5, #FFFFFF);
1436
- background: -o-linear-gradient(#F5F5F5, #FFFFFF);
1437
- background: -moz-linear-gradient(#F5F5F5, #FFFFFF);
1438
- background: linear-gradient(#F5F5F5, #FFFFFF);
1439
- border-top: 0 none;
1440
- border-bottom: 0 none;
1441
- color: #333;
1442
- font: bold 12px/29px Arial,serif;
1443
- height: 29px;
1444
- margin: 0;
1445
- padding: 0 10px;
1446
- text-align: left;
1447
- text-shadow: 0 1px 0 #fff;
1448
- }
1449
-
1450
- .wds_box table {
1451
- border-collapse: collapse;
1452
- border-spacing: 0;
1453
- width: 100%;
1454
- }
1455
-
1456
- .wds_nav_tabs {
1457
- background-color: #F5F5F5;
1458
- border-right: 1px solid #DFDFDF;
1459
- float: left;
1460
- height: 640px;
1461
- margin: 0;
1462
- width: 150px;
1463
- }
1464
-
1465
- .wds_nav_tabs ul {
1466
- list-style: none outside none;
1467
- margin: 10px 0;
1468
- padding: 0;
1469
- }
1470
-
1471
- .wds_nav_tabs .wds_sub_active,
1472
- .wds_nav_tabs .wds_sub_active a,
1473
- .wds_nav_tabs .wds_sub_active a:hover,
1474
- .wds_nav_tabs .wds_active,
1475
- .wds_nav_tabs .wds_active a,
1476
- .wds_nav_tabs .wds_active a:hover {
1477
- background: none repeat scroll 0 0 #fff;
1478
- color: #333;
1479
- }
1480
-
1481
- .wds_nav_tabs .wds_active {
1482
- border-color: #DFDFDF;
1483
- border-width: 1px 0 1px 1px;
1484
- border-style: solid;
1485
- margin: 0 -1px 0 -4px;
1486
- padding: 0;
1487
- }
1488
-
1489
- .wds_nav_tabs li {
1490
- border-color: transparent;
1491
- border-style: solid;
1492
- border-width: 1px 0;
1493
- list-style-type: none;
1494
- margin-bottom: 0;
1495
- }
1496
-
1497
- .wds_nav_tabs a {
1498
- display: block;
1499
- line-height: 18px;
1500
- padding: 5px 5px 5px 12px;
1501
- text-decoration: none;
1502
- }
1503
-
1504
- .wds_nav_box {
1505
- background: none repeat scroll 0 0 #fff;
1506
- display: none;
1507
- height: 610px;
1508
- overflow: auto;
1509
- padding: 15px;
1510
- }
1511
-
1512
- .wds_nav_box.wds_active {
1513
- display: block;
1514
- }
1515
-
1516
- .wds_layer_head {
1517
- background-color: #F5F5F5;
1518
- border-bottom: 1px solid #DFDFDF;
1519
- border-top: 1px solid #DFDFDF;
1520
- cursor: pointer;
1521
- padding: 5px;
1522
- }
1523
-
1524
- .wds_layer_head .handle {
1525
- cursor: move;
1526
- display: inline-block;
1527
- margin: 5px;
1528
- }
1529
-
1530
- .wds_box td {
1531
- padding: 10px !important;
1532
- }
1533
-
1534
- .wds_draggable {
1535
- box-sizing: border-box;
1536
- cursor: move;
1537
- }
1538
-
1539
- .wds_box .color {
1540
- width: 60px;
1541
- }
1542
-
1543
- .wds_active_layer {
1544
- box-shadow: rgb(44, 36, 36) 0px 0px 5px;
1545
- border-radius: 3px;
1546
- }
1547
-
1548
- .wds_draggable a,
1549
- .wds_draggable a:hover {
1550
- color: inherit !important;
1551
- font-size: inherit !important;
1552
- font-style: inherit !important;
1553
- font-weight: inherit !important;
1554
- text-decoration: none;
1555
- }
1556
-
1557
- #add_embed_help {
1558
- height: 200px;
1559
- width: 672px;
1560
- top: 40%;
1561
- }
1562
-
1563
- #add_embed input[type="text"] {
1564
- width: 500px;
1565
- }
1566
-
1567
- .wds_buttons {
1568
- float: right;
1569
- font-weight: normal;
1570
- position: relative;
1571
- }
1572
-
1573
- .wds_reset_button {
1574
- display: none;
1575
- font-weight: normal;
1576
- margin: 10px 0;
1577
- position: absolute;
1578
- right: 40px;
1579
- z-index: 1;
1580
- }
1581
-
1582
- #wdi_save_feed .two .section_col {
1583
- width: 47%;
1584
- float: left;
1585
- margin: 0 1.5% 18px;
1586
- }
1587
- #wdi_save_feed .wdi_element {
1588
- margin: 0 0 18px;
1589
- }
1590
-
1591
- #wdi_save_feed .half .wdi_element,
1592
- #wdi_save_feed .one .wdi_element {
1593
- width: 96%;
1594
- float: none;
1595
- margin: 0 2% 20px;
1596
- }
1597
-
1598
- .wdi_element_name_liked_feed{
1599
- display: none !important;
1600
- }
1601
-
1602
-
1603
- #wdi_save_feed .wdi_element p {
1604
- margin: 2px 0 0;
1605
- }
1606
- .wdi_section_name {
1607
- font-size: 19px;
1608
- margin: 0 auto 15px;
1609
- width: 100%;
1610
- box-sizing: border-box;
1611
- padding: 15px;
1612
- border-bottom: 1px solid #f1f1f1;
1613
- color: #444;
1614
- cursor: pointer;
1615
- }
1616
- .wdi_section {
1617
- border: 1px solid #dedede;
1618
- margin-bottom: 20px;
1619
- background:#fff;
1620
- }
1621
- .wdi_section .optioninput * {
1622
- text-align: left;
1623
- }
1624
- .wdi_section.half {
1625
- width: 49%;
1626
- float: left;
1627
- -webkit-box-sizing:border-box;
1628
- -moz-box-sizing:border-box;
1629
- box-sizing:border-box;
1630
- }
1631
- .wdi_buttons{
1632
- text-align:right;
1633
- margin-top: 7px;
1634
- }
1635
- .wdi_tab .wdi_section.half:last-child{
1636
- margin-left:2%;
1637
- }
1638
-
1639
- /*wdi how to publish*/
1640
- #how_to_publish_tab .wdi_howto_container{
1641
- display: flex;
1642
- flex-wrap: wrap;
1643
- }
1644
-
1645
- #how_to_publish_tab .wdi_howto_content{
1646
- border: 1px rgb(221, 221, 221) solid;
1647
- display: flex;
1648
- flex: 1;
1649
- flex-direction: column;
1650
- margin: 5px;
1651
- min-width: 250px;
1652
- max-width: calc(25% - 20px);
1653
- padding: 20px 10px;
1654
- text-align: center;
1655
- }
1656
-
1657
- #how_to_publish_tab .wdi_howto_container h2{
1658
- font-size: 23px;
1659
- font-weight: normal;
1660
- line-height: 29px;
1661
- margin: 0;
1662
- padding: 11px 15px 4px 0;
1663
- }
1664
-
1665
- #how_to_publish_tab .wdi_howto_container .wdi_howto_content input{
1666
- margin: 0 auto;
1667
- text-align: center;
1668
- width: 100%;
1669
- }
1670
- .wdi_buttons button.button.preview-button {
1671
- height: 28px;
1672
- }
1673
- @media (max-width: 782px) {
1674
- .wdi_buttons button.button.preview-button {
1675
- height: auto;
1676
- }
1677
- }
1678
-
1679
- @media (min-width: 768px) {
1680
- .wdi_border_wrapper .wdi_element_content{
1681
- width: 100%;
1682
- display: block;
1683
- }
1684
- .wdi_border_wrapper .wdi_element_title{
1685
- display: block;
1686
- }
1687
- .wdi_border_wrapper .wdi_element_content input[type=text]:not(.wp-color-picker){
1688
- width: calc(100% - 30px);
1689
- height: 28px;
1690
- }
1691
- .wdi_border_wrapper .wdi_element_content input#wdi_add_user_ajax_input{
1692
- width: calc(100% - 78px);
1693
- }
1694
- .wdi_border_wrapper .wdi_element_content input[type=number]{
1695
- width: calc(100% - 30px);
1696
- }
1697
- .wdi_border_wrapper .wdi_element_content select{
1698
- width: calc(100% - 30px);
1699
- }
1700
- }
1701
- @media (max-width: 768px) {
1702
- #wdi_save_feed .two .section_col {
1703
- width: 96%;
1704
- float: none;
1705
- margin: 0 2% 18px;
1706
- }
1707
- .wdi_section.half {
1708
- width: 100%;
1709
- float: none;
1710
- margin:0 0 20px 0 !important;
1711
- }
1712
- }
1713
-
1714
- .wdi_section_close::before{
1715
- content: "\f142";
1716
- display: inline-block;
1717
- font: 400 20px/1 dashicons;
1718
- speak: none;
1719
- float: right;
1720
- cursor: pointer;
1721
- }
1722
- .wdi_section_open::before{
1723
- content: "\f140";
1724
- display: inline-block;
1725
- font: 400 20px/1 dashicons;
1726
- speak: none;
1727
- float: right;
1728
- cursor: pointer;
1729
- }
1730
- .wdi-page-header{
1731
- width: 98%;
1732
- padding: 10px;
1733
- }
1734
- .wdi-page-header .wdi_buttons{
1735
- float: right;
1736
- }
1737
- .wdi-page-header .WDI_title_input{
1738
- padding: 3px 8px;
1739
- font-size: 1.7em;
1740
- line-height: 100%;
1741
- height: 1.5em;
1742
- width: 30%;
1743
- outline: 0;
1744
- margin: 0 0 3px;
1745
- background-color: #fff;
1746
- }
1747
-
1748
-
1749
- .wdi_demo_img{
1750
- margin-top: 20px;
1751
- }
1752
-
1753
-
1754
-
1755
-
1756
- #wdi_feed_form .wd-page-title.wd-header {
1757
- width: 100%;
1758
- padding: 10px 0;
1759
- }
1760
- @media screen and (max-width: 782px){
1761
- #wdi_feed_form p.search-box {
1762
- margin-bottom: 0;
1763
- }
1764
- #wdi_feed_form p.search-box input[type="search"]{
1765
- width:100%;
1766
- height: auto !important;
1767
- }
1768
- #wdi_feed_form p.search-box input[type="button"]{
1769
- margin-bottom: 10px;
1770
- padding: 6px 14px;
1771
- line-height: normal;
1772
- font-size: 14px;
1773
- height: auto;
1774
- }
1775
- .wdi-page-header .WDI_title_input {
1776
- width: 60%;
1777
- }
1778
- .wdi-page-header .wdi_buttons {
1779
- float: none;
1780
- text-align: center;
1781
- }
1782
- }
1783
- .wdi_reset_cache_success{
1784
- float: right;
1785
- }
1786
- #wdi_reset_cache{
1787
- float: right;
1788
- }
1789
-
1790
-
1791
- /*body.toplevel_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(3),*/
1792
- body.toplevel_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(4),
1793
- body.toplevel_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(5){
1794
- display: none;
1795
- }
1796
-
1797
- body.instagram-feed_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(3){
1798
- display: table-row !important;
1799
- }
1800
- body.instagram-feed_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(4){
1801
- display: table-row !important;
1802
- }
1803
-
1804
- #wpbody-content>div:not(.wrap):not(.wd_topic), .wrap .notice:not(.wd-notice), .notice:not(.wd-notice) {
1805
- display: none;
1806
- }
1
+ .wdi_clear{
2
+ clear: both;
3
+ }
4
+ .wdi_clear_tag:after{
5
+ content:"";
6
+ display:table;
7
+ clear: both;
8
+ }
9
+ #wdi_unistall{
10
+ background-color: #D82121;
11
+ border-color: #D31818;
12
+ box-shadow: inset 0 1px 0 rgba(230, 120, 120, 0.5),0 1px 0 rgba(0,0,0,.15);
13
+ }
14
+ #wdi_unistall:hover{
15
+ background-color: #DA1313;
16
+ }
17
+ #wdi_unistall_table th{
18
+ width: 45%;
19
+ }
20
+
21
+ .display_type_content {
22
+ background: #fff;
23
+ border: 1px solid #dedede;
24
+ margin-bottom: 15px;
25
+ }
26
+
27
+ /*tooltip css*/
28
+ .wdi_tooltip,
29
+ .wdi_settings_link {
30
+ display: block;
31
+ font-size: 14px !important;
32
+ font-weight: bold;
33
+ line-height: 20px;
34
+ margin-bottom: 5px;
35
+ color: #444;
36
+ text-decoration: none;
37
+ }
38
+ p.wdi_about_filed {
39
+ font-size: 13px;
40
+ font-style: italic;
41
+ }
42
+ .wdi_tooltip:hover,.wdi_settings_link:hover {
43
+ color: rgb(35, 40, 45);
44
+ position: relative;
45
+ }
46
+ .wdi_tooltip:hover:after {
47
+ content: attr(wdi-tooltip);
48
+ padding: 4px 8px;
49
+ color: #dbdbe0;
50
+ position: absolute;
51
+ left: 0;
52
+ top: 100%;
53
+ white-space: nowrap;
54
+ z-index: 20;
55
+ -moz-border-radius: 3px;
56
+ -webkit-border-radius: 3px;
57
+ border-radius: 2px;
58
+ -moz-box-shadow: 0px 0px 4px #222;
59
+ -webkit-box-shadow: 0px 0px 4px #222;
60
+ box-shadow: 0px 0px 4px rgba(0,0,0,0.5);
61
+ background-color: rgba(0,0,0,0.75);
62
+ font-size: 12px;
63
+ }
64
+ .wdi_pro_only{
65
+ font-style: italic;
66
+ color: #4E4E4E !important;
67
+ background-color: #cccccc !important;
68
+ text-decoration: none;
69
+ }
70
+ .wdi_pro_only_op{
71
+ opacity: 0.6;
72
+ }
73
+ .wdi_pro_notice{
74
+ text-align: right;
75
+ color: #15699F;
76
+ font-size: 20px !important;
77
+ padding: 10px;
78
+ }
79
+ .wdi_pro_only_btn{
80
+ background-color: #c5c0c0 !important;
81
+ border-top-color: #c5c0c0 !important;
82
+ }
83
+ .wdi-pro-overlay img{
84
+ opacity: 0.7;
85
+ }
86
+
87
+
88
+
89
+ /*feeds page*/
90
+ #wdi_feed_users{
91
+ width: 100%;
92
+ margin-top: 2px;
93
+ }
94
+
95
+ #wdi_feed_tabs .wdi_feed_tabs {
96
+ border: 1px solid #F1F1F1;
97
+ color: #444;
98
+ cursor: pointer;
99
+ font-size: 13px;
100
+ font-weight: bold;
101
+ padding: 12px;
102
+ background: #fff;
103
+ text-decoration: none;
104
+ display: inline-block;
105
+ }
106
+ #wdi_feed_tabs {
107
+ margin: 16px 0;
108
+ }
109
+ #wdi_feed_tabs .wdi_feed_tab_active,
110
+ #wdi_feed_tabs .wdi_feed_tabs:hover {
111
+ background: none repeat scroll 0 0 #FFFFFF;
112
+ /*border: 1px solid #46ACC3;*/
113
+ color: #9a2465;
114
+ }
115
+
116
+ #how_to_publish_tab .wdi_howto_container .wdi_howto_content .wdi_howto_wrapper{
117
+ max-width: 270px;
118
+ margin: 0 auto;
119
+ }
120
+
121
+ #how_to_publish_tab .wdi_howto_container .wdi_howto_content .wdi_howto_wrapper img{
122
+ max-width: 100%;
123
+ }
124
+
125
+ #wdi_feed_tabs .wdi_feed_tab_title{
126
+ margin-top: 1px;
127
+ display: inline-block;
128
+ }
129
+
130
+ .wdi_border_wrapper [scope='row'] + td, .wdi_border_wrapper [scope='row'] {
131
+ padding: 8px;
132
+ }
133
+ .display_type_container.wdi_clear_tag {
134
+ display: table;
135
+ margin: 10px auto;
136
+ }
137
+ .display_type_container > div {
138
+ float: left;
139
+ margin-right: 15px;
140
+ }
141
+
142
+ .wdi_user {
143
+ border: 1px solid rgb(185, 185, 185);
144
+ background-color: rgba(0, 0, 0, .05);
145
+ margin: 0px 4px 0 0;
146
+ border-radius: 5px;
147
+ height: 28px;
148
+ position: relative;
149
+ display: inline-block;
150
+ }
151
+ .wdi_user:hover{
152
+ background-color: rgba(0, 0, 0, .08);
153
+ }
154
+ .wdi_user a{
155
+ text-decoration: none;
156
+ color: black;
157
+ line-height: 28px;
158
+ width:70%;
159
+ margin-left: 12%;
160
+ margin-right: 18%;
161
+ height: 100%;
162
+ display: table-row;
163
+ padding-right: 3px;
164
+ }
165
+ .wdi_user .wdi_profile_pic{
166
+ width: 20px;
167
+ height: 20px;
168
+ top: 4px;
169
+ left: 30px;
170
+ padding: 5px;
171
+ vertical-align: middle;
172
+ display: table-cell;
173
+ }
174
+ .wdi_user span{
175
+ display: table-cell;
176
+ vertical-align: middle;
177
+ left: 55px;
178
+ font-weight: bold;
179
+ font-size: 14px;
180
+ }
181
+ .wdi_user .wdi_remove_user,.wdi_user .wdi_check_thumb_user{
182
+ position: absolute;
183
+ right: 4px;
184
+ width: 15px;
185
+ height: 15px;
186
+ top: 6.5px;
187
+ transition: all 0.1s ease;
188
+ }
189
+ .wdi_user .wdi_remove_user:hover {
190
+ cursor: pointer;
191
+ transform: rotate(180deg);
192
+ /*top: 6px;*/
193
+ }
194
+ .wdi_user .wdi_check_thumb_user:hover{
195
+ cursor: pointer;
196
+ }
197
+ .wdi_user .wdi_check_thumb_user{
198
+ left: 4px;
199
+ }
200
+
201
+ .wdi_border_wrapper [scope='row'] {
202
+ padding: 2px;
203
+ font-size: 13px;
204
+ min-width: 250px;
205
+ }
206
+ .wdi_border_wrapper [scope='row'] + td, .wdi_border_wrapper [scope='row'] {
207
+ padding: 2px;
208
+ }
209
+
210
+ /*.notice {*/
211
+ /*display: inline-block;*/
212
+ /*line-height: 19px;*/
213
+ /*font-size: 14px;*/
214
+ /*text-align: left;*/
215
+ /*background-color: #fff;*/
216
+ /*border-left: 4px solid #ffba00;*/
217
+ /*-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);*/
218
+ /*box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);*/
219
+ /*}*/
220
+
221
+
222
+ .small_input{
223
+ width: 60px;
224
+ text-align: center;
225
+ }
226
+ .display_type{
227
+ text-align: center;
228
+ }
229
+
230
+ .wdi_access_token_missing{
231
+ font-size: 14px;
232
+ color: #000000;
233
+ clear: both;
234
+ max-width: 720px;
235
+ }
236
+
237
+ .instagram-feed_page_wdi_settings form{
238
+ width: 65%;
239
+ }
240
+
241
+ .instagram-feed_page_wdi_settings table td{
242
+ padding-left: 0;
243
+ padding-right: 0;
244
+ }
245
+
246
+ .instagram-feed_page_wdi_settings table th{
247
+ padding-left: 4px;
248
+ }
249
+
250
+ .instagram-feed_page_wdi_settings table input
251
+ /*.instagram-feed_page_wdi_settings table textarea,*/
252
+ /*.instagram-feed_page_wdi_settings table select*/
253
+ {
254
+ float: right;
255
+ }
256
+
257
+ #login_with_instagram {
258
+ height: 43px;
259
+ }
260
+
261
+ #login_with_instagram .wdi_sign_in_button{
262
+ background-image: url('../images/sign_in_with_instagram.png');
263
+ background-repeat: no-repeat;
264
+ background-position: left top;
265
+ width: 234px;
266
+ height: 43px;
267
+ display:inline-block;
268
+ float: left;
269
+ }
270
+
271
+ #login_with_instagram .wdi_sign_in_button:hover {
272
+ /*background-image: url('../images/sign_in_with_instagram_hover.png');*/
273
+ }
274
+
275
+
276
+ #login_with_instagram .wdi_default_feed_button,
277
+ #login_with_instagram .wdi_edit_default_feed_button{
278
+
279
+ width: 234px;
280
+ height: 43px;
281
+ background-repeat: no-repeat;
282
+ background-position: center top;
283
+ display:inline-block;
284
+
285
+ }
286
+ #login_with_instagram .wdi_default_feed_button{
287
+ background-image: url('../images/default_feed_button.png');
288
+ float: left;
289
+ margin-right: 10px;
290
+ }
291
+ #login_with_instagram .wdi_edit_default_feed_button{
292
+ background-image: url('../images/edit_feed_button.png');
293
+ float: left;
294
+
295
+ }
296
+
297
+ #wdwt_wrap_wdi_authenticated_users_list{
298
+ display: inline-block;
299
+ width: 100%;
300
+ }
301
+
302
+ #wdwt_wrap_wdi_authenticated_users_list .wdi_sign_in_button{
303
+ background-image: url(../images/multiple_accounts.png);
304
+ background-repeat: no-repeat;
305
+ background-position: left top;
306
+ width: 228px;
307
+ height: 36px;
308
+ display: inline-block;
309
+ float: right;
310
+ margin-top: 2px;
311
+ padding-bottom: 5px;
312
+ }
313
+
314
+ .wdi_element_name_hashtag_top_recent{
315
+ display: none;
316
+ }
317
+
318
+
319
+ /*
320
+ .wdi_multiple_accounts_section tr:not(:first-child) th{
321
+ font-style: italic;
322
+ }
323
+
324
+ .wdi_multiple_accounts_section tr:not(:first-child) th,
325
+ .wdi_multiple_accounts_section tr:not(:first-child) td{
326
+ padding-top: 2px;
327
+ padding-bottom: 0;
328
+ font-weight: 400;
329
+ }
330
+
331
+ .wdi_multiple_accounts_section tr:first-child th{
332
+ padding-bottom: 20px;
333
+ }
334
+
335
+ .wdi_multiple_accounts_section .wdi_username_tr td{
336
+ padding-bottom: 5px !important;
337
+ }
338
+
339
+ .wdi_multiple_accounts_section .wdi_input_wrapper{
340
+ width: 100%;
341
+ display: inline-block;
342
+ }
343
+
344
+ .wdi_multiple_accounts_section .wdi_remove_auth_user{
345
+ display: inline-block;
346
+ float: right;
347
+ color: #0075A5;
348
+ cursor: pointer;
349
+ font-weight: 300;
350
+ font-size: 14px;
351
+ margin-right: 3px;
352
+ }
353
+ */
354
+
355
+ .wdi_advanced_option_open tr:nth-child(9),
356
+ .wdi_advanced_option_open tr:nth-child(10),
357
+ .wdi_advanced_option_open tr:nth-child(11){
358
+ display: none;
359
+ }
360
+
361
+ .instagram-feed_page_wdi_settings table #wdwt_wrap_wdi_fb_auth{
362
+ margin-left: 115px;
363
+ }
364
+
365
+ #wdwt_wrap_wdi_fb_auth .block a{
366
+ background-color: #4267b2;
367
+ color: #FFFFff;
368
+ }
369
+
370
+ .wdi_advanced_option .optioninput,
371
+ #wdwt_wrap_wdi_reset_cache .block,
372
+ #wdwt_wrap_wdi_authenticated_users_list .block{
373
+ display: inline-block;
374
+ }
375
+ #wdi_options_page_buttons_wrapper .submit {
376
+ display: inline;
377
+ margin-left: 15px;
378
+ }
379
+
380
+ #wdi_reset_access_token {
381
+ margin-top: 0;
382
+ float: left;
383
+ width: 232px;
384
+ text-align: center;
385
+ }
386
+
387
+ .wdi_advanced_option {
388
+ width: 100%;
389
+ position: relative;
390
+ font-weight: 600;
391
+ }
392
+
393
+ .wdi_advanced_option {
394
+ background-color: #fff;
395
+ cursor: pointer;
396
+ border: 1px solid rgb(227, 227, 227);
397
+ border-radius: 10px;
398
+ border-collapse: separate;
399
+ border-spacing: 0;
400
+ }
401
+
402
+ .wdi_advanced_option .wdi_advanced_option_head {
403
+ border-bottom: 1px solid rgb(227, 227, 227);
404
+ }
405
+
406
+ .wdi_advanced_option .wdi_advanced_option_head th {
407
+ padding-top: 10px;
408
+ padding-bottom: 10px;
409
+ }
410
+
411
+ .wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_head th {
412
+ border-bottom: 1px solid rgb(227, 227, 227);
413
+ border-bottom-left-radius: 10px;
414
+ }
415
+
416
+ .wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_head td {
417
+ border-bottom: 1px solid rgb(227, 227, 227);
418
+ border-bottom-right-radius: 10px;
419
+ }
420
+
421
+ .instagram-feed_page_wdi_settings table.wdi_advanced_option th {
422
+ padding-left: 12px;
423
+ }
424
+
425
+ .instagram-feed_page_wdi_settings table.wdi_advanced_option td .wdwt_param{
426
+ margin-left: 15px;
427
+ }
428
+
429
+ .instagram-feed_page_wdi_settings #wdwt_wrap_wdi_disable_fa .optioninput{
430
+ display: inline-block;
431
+ }
432
+
433
+ .wdi_advanced_option .wdi_advanced_option_icon {
434
+ background-repeat: no-repeat;
435
+ background-position: left top;
436
+ width: 20px;
437
+ height: 20px;
438
+ display: inline-block;
439
+ position: absolute;
440
+ top: 16px;
441
+ right: 10px;
442
+ }
443
+
444
+ .wdi_advanced_option.wdi_advanced_option_close .wdi_advanced_option_icon {
445
+ background-image: url('../images/arrow_1.png');
446
+ }
447
+
448
+ .wdi_advanced_option.wdi_advanced_option_open .wdi_advanced_option_icon {
449
+ background-image: url('../images/arrow_2.png');
450
+ }
451
+
452
+ .wdi_advanced_option.wdi_advanced_option_close tbody tr:not(.wdi_advanced_option_head) {
453
+ display: none;
454
+ }
455
+
456
+ .instagram-feed_page_wdi_settings form h2 {
457
+ display: none;
458
+ }
459
+
460
+ #wdi_options_page_buttons_wrapper{
461
+ margin-top: 10px;
462
+ width: 700px;
463
+ }
464
+
465
+
466
+ .wdi_hide{
467
+ display: none;
468
+ }
469
+
470
+
471
+ /*---------------------------------------------------------
472
+ ------------------Conditional Filters Ui-------------------
473
+ ---------------------------------------------------------*/
474
+ .wdi_hidden{
475
+ display: none !important;
476
+ }
477
+ .selectoff{
478
+ -webkit-user-select: none; /* Chrome/Safari */
479
+ -moz-user-select: none; /* Firefox */
480
+ -ms-user-select: none; /* IE10+ */
481
+
482
+ /* Rules below not implemented in browsers yet */
483
+ -o-user-select: none;
484
+ user-select: none;
485
+ }
486
+ .wdi_filter_radio {
487
+ margin: 5px;
488
+ display: inline-block;
489
+ }
490
+
491
+ .wdi_filter_radio label {
492
+ vertical-align: text-bottom;
493
+ }
494
+
495
+ .wdi_filter_input {
496
+ margin-top: 10px;
497
+ }
498
+
499
+ .wdi_filter_input input {
500
+ height: 28px;
501
+ width: 250px;
502
+ margin-right: 0;
503
+ padding-right: 0;
504
+ line-height: 28px;
505
+ }
506
+ #wdi_filter_type{
507
+ line-height: 28px;
508
+ margin: 0;
509
+ padding: 0;
510
+ position: relative;
511
+ right: 2px;
512
+ top: -1px;
513
+ font-weight: 400;
514
+ }
515
+ .wdi_filter_item {
516
+ display: inline-block;
517
+ padding: 6px;
518
+ margin-top: 5px;
519
+ border-radius: 5px;
520
+ }
521
+
522
+ .wdi_filter_by_username {
523
+ background-color: #00A0D2;
524
+ color: white;
525
+ }
526
+
527
+ .wdi_filter_by_hashtag {
528
+ background-color: #E08D11;
529
+ color: white;
530
+ }
531
+ .wdi_logic{
532
+ display: inline-block;
533
+ padding: 5px;
534
+ font-weight: bold;
535
+ }
536
+ .wdi_filter_by_location {
537
+ background-color: #509833;
538
+ color: white;
539
+ }
540
+
541
+ .wdi_filter_by_mention {
542
+ background-color: #833888;
543
+ color: white;
544
+ }
545
+
546
+ .wdi_filter_by_description {
547
+ background-color: #BD242B;
548
+ color: white;
549
+ }
550
+ .wdi_filter_by_url {
551
+ background-color: #004EFF;
552
+ color: white;
553
+ }
554
+
555
+ .wdi_remove_filter{
556
+ padding-left: 5px;
557
+ color: white;
558
+ font-size: 13px;
559
+ }
560
+ .wdi_remove_filter:hover{
561
+ cursor: pointer;
562
+ }
563
+
564
+
565
+ .wdi_source_user{
566
+ display: inline-block;
567
+ padding: 5px;
568
+ }
569
+ .wdi_source_img{
570
+ display: inline-block;
571
+ }
572
+ .wdi_source_img img{
573
+ width: 30px;
574
+ height: 30px;
575
+ border-radius: 15px;
576
+ display: block;
577
+ }
578
+ .wdi_source_username{
579
+ display: inline-block;
580
+ line-height: 25px;
581
+ font-size: 15px !important;
582
+ height: 30px;
583
+ vertical-align: bottom;
584
+ padding: 0 5px;
585
+ font-weight: bold;
586
+ }
587
+
588
+ #login_with_instagram > a:focus{
589
+ -webkit-box-shadow:none;
590
+ box-shadow:none;
591
+ }
592
+
593
+
594
+
595
+ .wdi_help_bar_wrap {
596
+ background-color: #ffffff;
597
+ border: none;
598
+ box-sizing: border-box;
599
+ clear: both;
600
+ color: #6e7990;
601
+ font-size: 14px;
602
+ font-weight: bold;
603
+ line-height: 30px;
604
+ padding: 15px;
605
+ vertical-align: middle;
606
+ width: 100%;
607
+ margin: 20px 0 0 0;
608
+
609
+ }
610
+ .wdi_help_bar_text{
611
+ float:left;
612
+ }
613
+ .wdi_help_bar_text > a{
614
+ color:#0073aa;
615
+ text-decoration: none;
616
+ }
617
+ .wdi_hb_buy_pro{
618
+ padding:0;
619
+ margin-top: 50px;
620
+ }
621
+
622
+ .wdi_hb_buy_pro a,
623
+ .wdi_hb_buy_pro a:active,
624
+ .wdi_hb_buy_pro a:visited,
625
+ .wdi_hb_buy_pro a:hover {
626
+ display: inline-block;
627
+ font-weight: bold;
628
+ font-size: 14px;
629
+ vertical-align: middle;
630
+ border: none;
631
+ box-shadow: none !important;
632
+ text-decoration: none;
633
+ }
634
+
635
+ .wdi_hb_buy_pro .wdi_support_link{
636
+ color: #72777c !important;
637
+ padding: 0 10px;
638
+ }
639
+ .wdi_hb_buy_pro .wdi_update_pro_link{
640
+ background: #45A6B7;
641
+ font-weight: bold;
642
+ line-height: 30px;
643
+ padding: 0 18px 0 18px;
644
+ color: #fff !important;
645
+ }
646
+
647
+ .wdi_hb_buy_pro img {
648
+ border: none;
649
+ display: inline-block;
650
+ vertical-align: middle;
651
+ }
652
+
653
+ #bullets_images_type,
654
+ #bullets_images_color,
655
+ #bull_style,
656
+ #rl_butt_type,
657
+ #rl_butt_color,
658
+ #rl_butt_style {
659
+ margin: 0 10px 0 0;
660
+ width: 100px;
661
+ }
662
+
663
+ .wds_ctrl_btn_upload {
664
+ display: block !important;
665
+ margin: 5px 0 !important;
666
+ text-align: center;
667
+ vertical-align: middle;
668
+ width: 95%;
669
+ }
670
+
671
+ .wds_reverse {
672
+ margin: 0 5px !important;
673
+ }
674
+
675
+ .wds_free_button,
676
+ .wds_free_button:hover {
677
+ background: linear-gradient(to bottom, #E5E5E5, #E5E5E5) repeat scroll 0 0 #f3f3f3 !important;
678
+ border-color: #bbb !important;
679
+ color: #888888 !important;
680
+ }
681
+
682
+ .wdi_spider_free_version_label,
683
+ .wdi_spider_free_version_label * {
684
+ color: #808080 !important;
685
+ }
686
+
687
+ .wdi_spider_free_version {
688
+ background-color: #DFDFDF;
689
+ border: 1px solid #797979;
690
+ border-radius: 2px;
691
+ padding: 2px;
692
+ width: 210px;
693
+ }
694
+
695
+ .wds_more {
696
+ font-size: 12px;
697
+ }
698
+
699
+ .wrap .button {
700
+ border-radius: 3px !important;
701
+ text-shadow: none !important;
702
+ }
703
+
704
+ .wdi_spider_message_cont {
705
+ display: none;
706
+ width: 99%;
707
+ }
708
+
709
+ .wdi_spider_load {
710
+ display: none;
711
+ }
712
+
713
+ .wdi_spider_load_cont {
714
+ background-color: rgba(0, 0, 0, 0.2);
715
+ left: 0;
716
+ height: 100%;
717
+ position: fixed;
718
+ top: 0;
719
+ width: 100%;
720
+ z-index: 99998;
721
+ }
722
+
723
+ .wdi_spider_load_icon {
724
+ left: 0;
725
+ height: 100%;
726
+ position: fixed;
727
+ text-align: center;
728
+ top: 0;
729
+ width: 100%;
730
+ z-index: 99999;
731
+ }
732
+
733
+ .wdi_spider_ajax_loading {
734
+ border: none !important;
735
+ margin-top: 200px;
736
+ width: 50px;
737
+ -webkit-animation: spin 2.5s infinite linear;
738
+ -moz-animation: spin 2.5s infinite linear;
739
+ -o-animation: spin 2.5s infinite linear;
740
+ animation: spin 2.5s infinite linear;
741
+ }
742
+
743
+ @-moz-keyframes spin {
744
+ 0% {
745
+ -moz-transform: rotate(0deg);
746
+ }
747
+ 100% {
748
+ -moz-transform: rotate(359deg);
749
+ }
750
+ }
751
+ @-webkit-keyframes spin {
752
+ 0% {
753
+ -webkit-transform: rotate(0deg);
754
+ }
755
+ 100% {
756
+ -webkit-transform: rotate(359deg);
757
+ }
758
+ }
759
+ @-o-keyframes spin {
760
+ 0% {
761
+ -o-transform: rotate(0deg);
762
+ }
763
+ 100% {
764
+ -o-transform: rotate(359deg);
765
+ }
766
+ }
767
+ @-ms-keyframes spin {
768
+ 0% {
769
+ -ms-transform: rotate(0deg);
770
+ }
771
+ 100% {
772
+ -ms-transform: rotate(359deg);
773
+ }
774
+ }
775
+ @keyframes spin {
776
+ 0% {
777
+ transform: rotate(0deg);
778
+ }
779
+ 100% {
780
+ transform: rotate(359deg);
781
+ }
782
+ }
783
+
784
+ #TB_window,
785
+ #TB_iframeContent {
786
+ width: 800px !important;
787
+ height: 500px !important;
788
+ }
789
+
790
+ #TB_window {
791
+ margin-left: -400px !important;
792
+ }
793
+
794
+
795
+ .input_th {
796
+ margin-left: 0px !important;
797
+ width: 160px !important;
798
+ font-family: sans-serif;
799
+ }
800
+ .input_th2 {
801
+ margin-left: 0px !important;
802
+ width: 160px !important;
803
+ margin-top:5px;
804
+ height: 19px;
805
+ }
806
+
807
+ .edit_input {
808
+ height: 28px !important;
809
+ padding-bottom: 7px !important;
810
+ }
811
+
812
+ .add_tag_th {
813
+ padding-left: 21px;
814
+ font-size: 12px;
815
+ font-family: sans-serif;
816
+ }
817
+
818
+ .pointer{
819
+ cursor: pointer;
820
+ }
821
+
822
+ .non_selectable {
823
+ -webkit-touch-callout: none;
824
+ -webkit-user-select: none;
825
+ -khtml-user-select: none;
826
+ -moz-user-select: none;
827
+ -ms-user-select: none;
828
+ user-select: none;
829
+ }
830
+
831
+ .wds_position_table td,
832
+ .wds_position_table input{
833
+ border: 1px solid #CCCCCC;
834
+ margin: 2px;
835
+ }
836
+
837
+ .wds_position_table .wds_position_td {
838
+ background-color: #f4f4f4;
839
+ display: inline-block;
840
+ line-height: 1;
841
+ padding: 0 !important;
842
+ }
843
+
844
+ .wdi_spider_div_options {
845
+ background: none repeat scroll 0 0 #F4F4F4;
846
+ border: 1px solid #8F8D8D;
847
+ border-radius: 8px 8px 8px 8px;
848
+ display: none;
849
+ margin: 2px 0 0 190px;
850
+ padding: 13px;
851
+ min-height: 300px;
852
+ min-width: 600px;
853
+ vertical-align: top;
854
+ }
855
+
856
+
857
+
858
+ .table_medium_col {
859
+ text-align: center !important;
860
+ width: 70px;
861
+ }
862
+
863
+
864
+ .table_medium_col_uncenter {
865
+ width: 80px;
866
+ }
867
+
868
+ .table_extra_large_col {
869
+ padding: 4px !important;
870
+ width: 150px !important;
871
+ }
872
+
873
+ .first-page,
874
+ .prev-page,
875
+ .next-page,
876
+ .last-page,
877
+ .table_extra_large_col a,
878
+ .table_medium_col a,
879
+ .table_big_col a,
880
+ .table_small_col a {
881
+ cursor: pointer;
882
+ }
883
+
884
+ .wdi_spider_word_wrap {
885
+ word-wrap: normal;
886
+ }
887
+
888
+ .wdi_spider_description {
889
+ color: #666666;
890
+ font-size: 0.923em;
891
+ line-height: 1.231em;
892
+ }
893
+
894
+ .handle {
895
+ background: url("../images/draggable.png") no-repeat transparent;
896
+ border: none;
897
+ cursor: move;
898
+ display: inline-block;
899
+ height: 15px;
900
+ margin: 0 auto;
901
+ vertical-align: middle;
902
+ width: 15px;
903
+ }
904
+
905
+ .slider-icon {
906
+ background-image: url("../images/slider-icon.png");
907
+ background-repeat: no-repeat;
908
+ border: none;
909
+ float: left;
910
+ height: 32px;
911
+ margin: 7px 8px 0 0;
912
+ width: 32px;
913
+ }
914
+ .uninstall-icon {
915
+ background-image: url("../images/uninstall-icon.png");
916
+ background-repeat: no-repeat;
917
+ border: none;
918
+ float: left;
919
+ height: 32px;
920
+ margin: 7px 8px 0 0;
921
+ width: 32px;
922
+ }
923
+
924
+ .wdi_spider_label {
925
+ font-weight: bold;
926
+ width: 100px;
927
+ }
928
+
929
+ .wdi_spider_label_top {
930
+ font-weight: bold;
931
+ padding-top: 3px;
932
+ vertical-align: top;
933
+ width: 100px;
934
+ }
935
+
936
+ .wdi_spider_fieldset .wdi_spider_label {
937
+ font-weight: bold;
938
+ vertical-align: top;
939
+ width: 150px;
940
+ }
941
+
942
+ .wdi_spider_label_options {
943
+ font-weight: bold;
944
+ vertical-align: top;
945
+ width: 150px;
946
+ }
947
+
948
+ .wdi_spider_choose_option {
949
+ display: table;
950
+ box-shadow: 0px 0px 1px 1px #D2D2D2;
951
+ margin-bottom: 5px;
952
+ border-radius: 2px;
953
+ padding: 2px;
954
+ box-sizing: border-box;
955
+ cursor: pointer;
956
+ width: 100%;
957
+ }
958
+
959
+ .wdi_spider_options_cont,
960
+ .wdi_spider_bull_options_cont,
961
+ .wdi_spider_pp_options_cont,
962
+ .wdi_spider_options_color_cont,
963
+ .wdi_spider_bull_options_color_cont,
964
+ .wdi_spider_pp_options_color_cont {
965
+ display: none;
966
+ width: 180px;
967
+ height: 150px;
968
+ overflow: scroll;
969
+ overflow-x: hidden;
970
+ overflow-y: scroll;
971
+ }
972
+
973
+ .wdi_spider_option_cont {
974
+ display: block;
975
+ border-bottom: 1px solid #D3D3D3;
976
+ padding: 3px 0px 3px 0px;
977
+ box-sizing: content-box;
978
+ width: 98%;
979
+ border-radius: 0px;
980
+ cursor: pointer;
981
+ }
982
+
983
+ .wdi_spider_option_cont_title {
984
+ display: table-cell;
985
+ vertical-align: middle;
986
+ padding: 0px 0px 0px 4px;
987
+ }
988
+
989
+ .wdi_spider_option_cont_img {
990
+ display: table-cell;
991
+ width: 23%;
992
+ height: 15px;
993
+ text-align: right;
994
+ padding: 5px 4px 0px 0px;
995
+ box-sizing: border-box;
996
+ background-color: #EEEEEE;
997
+ }
998
+
999
+ .wdi_spider_option_main_title {
1000
+ display: table-cell;
1001
+ width: 65%;
1002
+ vertical-align: middle;
1003
+ padding: 0px 0px 0px 4px;
1004
+ color: #555;
1005
+ }
1006
+
1007
+ .wdi_spider_sel_option_ic {
1008
+ display: table-cell;
1009
+ width: 20%;
1010
+ height: 15px;
1011
+ text-align: right;
1012
+ padding: 0px 6px 0px 0px;
1013
+ box-sizing: border-box;
1014
+ }
1015
+
1016
+ .wdi_spider_int_input {
1017
+ width: 45px;
1018
+ }
1019
+
1020
+ .wdi_spider_char_input {
1021
+ width: 115px;
1022
+ }
1023
+
1024
+ .wdi_spider_text_input {
1025
+ width: 190px;
1026
+ }
1027
+
1028
+ .wdi_spider_slider_div {
1029
+ display: inline-block;
1030
+ vertical-align: middle;
1031
+ width: 140px;
1032
+ }
1033
+
1034
+ .wdi_spider_slider_percentage,
1035
+ .wdi_spider_slider_percentage input,
1036
+ .wdi_spider_slider_percentage input :focus {
1037
+ background: transparent;
1038
+ border: none;
1039
+ color: #00AEEF;
1040
+ display: inline;
1041
+ font-weight: bold;
1042
+ text-align: right;
1043
+ vertical-align: middle;
1044
+ width: 30px;
1045
+ }
1046
+
1047
+ .updated,
1048
+ .error {
1049
+ margin: 5px 0 2px !important;
1050
+ }
1051
+
1052
+ .buttons_div {
1053
+ clear: both;
1054
+ float: right;
1055
+ margin: 5px 0;
1056
+ }
1057
+
1058
+ .buttons_div_left {
1059
+ float: left;
1060
+ margin: 5px 0;
1061
+ }
1062
+
1063
+ .buttons_div_right {
1064
+ float: right;
1065
+ margin: 5px 0;
1066
+ }
1067
+
1068
+ .wdi_spider_delete_img {
1069
+ background-image: url("../images/delete.png");
1070
+ border: none;
1071
+ cursor: pointer;
1072
+ display: inline-block;
1073
+ vertical-align: middle;
1074
+ height: 14px;
1075
+ width: 14px;
1076
+ }
1077
+
1078
+ .wdi_spider_delete_img_small {
1079
+ background-image: url("../images/delete.png");
1080
+ background-size: 10px auto;
1081
+ border: medium none;
1082
+ cursor: pointer;
1083
+ display: inline-block;
1084
+ height: 10px;
1085
+ margin-top: 2px;
1086
+ vertical-align: middle;
1087
+ width: 10px;
1088
+ }
1089
+
1090
+ .wdi_spider_fieldset {
1091
+ background: none repeat scroll 0 0 #F4F4F4;
1092
+ border: 1px solid #8F8D8D;
1093
+ border-radius: 8px 8px 8px 8px;
1094
+ display: none;
1095
+ float: left;
1096
+ margin: 4px;
1097
+ padding: 13px;
1098
+ width: 97%;
1099
+ }
1100
+
1101
+ .wdi_spider_type_fieldset {
1102
+ background: none repeat scroll 0 0 #F4F4F4;
1103
+ border-radius: 8px 8px 8px 8px;
1104
+ display: none;
1105
+ float: left;
1106
+ width: 100%;
1107
+ }
1108
+
1109
+ .wdi_spider_child_fieldset {
1110
+ background: none repeat scroll 0 0 #F4F4F4;
1111
+ border: 1px solid #8F8D8D;
1112
+ border-radius: 8px 8px 8px 8px;
1113
+ float: left;
1114
+ margin: 4px;
1115
+ width: 30%;
1116
+ padding: 13px;
1117
+ display: block;
1118
+ }
1119
+
1120
+ .wdi_spider_table td {
1121
+ padding: 0;
1122
+ vertical-align: middle;
1123
+ }
1124
+
1125
+ .wdi_spider_ctrls {
1126
+ padding: 4px;
1127
+ text-align: center;
1128
+ width: 40px;
1129
+ }
1130
+
1131
+ .theme_type {
1132
+ background-color: #F4F4F4;
1133
+ border: 1px solid #8F8D8D;
1134
+ border-radius: 8px 8px 8px 8px;
1135
+ cursor: pointer;
1136
+ display: inline-block;
1137
+ font-size: 16px;
1138
+ height: 24px;
1139
+ padding-top: 5px;
1140
+ text-align: center;
1141
+ vertical-align: middle;
1142
+ width: 123px;
1143
+ margin: 2px 0px 2px 0px;
1144
+ }
1145
+
1146
+ .ui-slider-handle {
1147
+ cursor: pointer !important;
1148
+ }
1149
+
1150
+ .thumb {
1151
+ border: 1px solid #CCCCCC;
1152
+ max-height: 120px;
1153
+ max-width: 120px;
1154
+ }
1155
+
1156
+ .fileDescription {
1157
+ color: #666666;
1158
+ cursor: pointer;
1159
+ font-family: sans-serif;
1160
+ font-size: 12px;
1161
+ }
1162
+
1163
+ .filename {
1164
+ font-size: 13px;
1165
+ }
1166
+
1167
+ .tag_div {
1168
+ background-clip: padding-box;
1169
+ background-color: #F3F3F3;
1170
+ border: 1px solid #AAAAAA;
1171
+ border-radius: 3px 3px 3px 3px;
1172
+ box-shadow: 0 0 2px #FFFFFF inset, 0 1px 0 rgba(0, 0, 0, 0.05);
1173
+ color: #666666;
1174
+ line-height: 13px;
1175
+ margin: 2px 0;
1176
+ padding: 2px 5px 2px 5px;
1177
+ width: 132px;
1178
+ }
1179
+
1180
+ .tags_div {
1181
+ overflow-y: auto;
1182
+ height: 65px;
1183
+ }
1184
+
1185
+ .tag_name {
1186
+ width: 118px;
1187
+ }
1188
+
1189
+ .edit_thumb {
1190
+ cursor: pointer;
1191
+ }
1192
+
1193
+ .wdi_spider_rotate {
1194
+ border-radius: 2px;
1195
+ border: 1px solid #FFFFFF;
1196
+ height: 30px;
1197
+ }
1198
+
1199
+ .wdi_spider_search_value {
1200
+ height: 2em;
1201
+ margin: 0 0 4px;
1202
+ }
1203
+
1204
+ #th_order,
1205
+ .wdi_spider_order {
1206
+ display: none;
1207
+ }
1208
+
1209
+ .wds_add_video,
1210
+ .wds_resize_image,
1211
+ .wds_import,
1212
+ .wds_exports {
1213
+ display: none;
1214
+ padding: 10px;
1215
+ height: 60px;
1216
+ background-color: #FFFFFF;
1217
+ border: 1px solid #999999;
1218
+ top: 50%;
1219
+ position: fixed;
1220
+ left: 50%;
1221
+ text-align: left;
1222
+ z-index: 100000;
1223
+ border-radius: 3px;
1224
+ margin-top: -45px;
1225
+ }
1226
+
1227
+ .wds_add_video,
1228
+ .wds_resize_image {
1229
+ margin-left: -340px;
1230
+ }
1231
+
1232
+ .wds_exports {
1233
+ margin-left: -240px;
1234
+ }
1235
+
1236
+ .wds_import {
1237
+ margin-left: -185px;
1238
+ }
1239
+
1240
+ .wds_add_video input[type="text"],
1241
+ .wds_resize_image input[type="text"] {
1242
+ width: 500px;
1243
+ }
1244
+
1245
+
1246
+ .wds_opacity_video,
1247
+ .wds_opacity_import,
1248
+ .wds_opacity_export {
1249
+ background-color: #000000;
1250
+ display: none;
1251
+ opacity: 0.75;
1252
+ filter: Alpha(opacity=75);
1253
+ position: fixed;
1254
+ top: 0;
1255
+ left: 0;
1256
+ width: 100%;
1257
+ height: 100%;
1258
+ z-index: 99998;
1259
+ }
1260
+
1261
+
1262
+ .wds_tabs {
1263
+ clear: both;
1264
+ display: none;
1265
+ position: relative;
1266
+ z-index: 1;
1267
+ }
1268
+
1269
+ .wds_tabs a.wds_sub_active,
1270
+ .wds_tabs a.wds_active {
1271
+ background-color: #F5F5F5;
1272
+ border-bottom: 1px solid #F5F5F5;
1273
+ color: #333;
1274
+ }
1275
+
1276
+ .wds_tabs a {
1277
+ background-color: #f9f9f9;
1278
+ border: 1px solid #dfdfdf;
1279
+ border-top-left-radius: 3px;
1280
+ border-top-right-radius: 3px;
1281
+ color: #c7c7c7;
1282
+ display: block !important;
1283
+ float: left;
1284
+ font: bold 17px/32px Arial,serif;
1285
+ height: 30px;
1286
+ margin: 3px 3px 0 0;
1287
+ padding: 0 10px;
1288
+ position: relative;
1289
+ text-decoration: none;
1290
+ width: 130px;
1291
+ }
1292
+
1293
+ .wbs_subtab a {
1294
+ font: bold 14px/26px Arial,serif;
1295
+ height: 26px;
1296
+ padding: 0 5px;
1297
+ width: 105px;
1298
+ }
1299
+
1300
+ .wds_add_layer {
1301
+ font: normal 20px/28px Arial,serif !important;
1302
+ width: initial !important;
1303
+ padding: 0 9px !important;
1304
+ }
1305
+
1306
+ .wds_tab_title {
1307
+ background: none repeat scroll 0 0 transparent !important;
1308
+ border: none !important;
1309
+ cursor: pointer;
1310
+ opacity: 0.5;
1311
+ filter: Alpha(opacity=50);
1312
+ padding: 1px;
1313
+ vertical-align: middle;
1314
+ width: 50px;
1315
+ }
1316
+
1317
+ .wds_sub_active .wds_tab_title,
1318
+ .wds_layer_title {
1319
+ background-color: #FFFFFF !important;
1320
+ border-color: #DFDFDF !important;
1321
+ border-radius: 3px !important;
1322
+ border-style: solid !important;
1323
+ border-width: 1px !important;
1324
+ cursor: pointer;
1325
+ opacity: 1;
1326
+ filter: Alpha(opacity=100);
1327
+ }
1328
+
1329
+ .wds_tab_remove {
1330
+ background-image: url("../images/close.png");
1331
+ background-repeat: no-repeat;
1332
+ background-size: 100% 100%;
1333
+ display: inline-block;
1334
+ width: 9px;
1335
+ height: 9px;
1336
+ opacity: 0.5;
1337
+ filter: Alpha(opacity=50);
1338
+ vertical-align: middle;
1339
+ }
1340
+
1341
+ .wds_layer_remove {
1342
+ background-image: url("../images/close.png");
1343
+ background-repeat: no-repeat;
1344
+ background-size: 100% 100%;
1345
+ display: inline-block;
1346
+ width: 15px;
1347
+ height: 15px;
1348
+ margin: 5px;
1349
+ float: right;
1350
+ }
1351
+
1352
+ .wds_layer_dublicate {
1353
+ background-image: url("../images/duplicate.png");
1354
+ background-repeat: no-repeat;
1355
+ background-size: 100% 100%;
1356
+ display: inline-block;
1357
+ width: 15px;
1358
+ height: 15px;
1359
+ margin: 5px;
1360
+ float: right;
1361
+ }
1362
+
1363
+ .wds_slide_dublicate {
1364
+ background-image: url("../images/duplicate.png");
1365
+ background-repeat: no-repeat;
1366
+ background-size: 100% 100%;
1367
+ display: inline-block;
1368
+ width: 12px;
1369
+ height: 12px;
1370
+ vertical-align: middle;
1371
+ }
1372
+
1373
+ .wds_layer_depth {
1374
+ float: right;
1375
+ font-size: 13px;
1376
+ line-height: 15px;
1377
+ margin: 1px 5px;
1378
+ text-align: left;
1379
+ width: 40px;
1380
+ }
1381
+
1382
+ .wds_layer_label {
1383
+ display: inline-block;
1384
+ font-size: 13px;
1385
+ width: 80%;
1386
+ }
1387
+
1388
+ .wds_sub_active .wds_tab_remove {
1389
+ cursor: pointer !important;
1390
+ opacity: 1;
1391
+ filter: Alpha(opacity=100);
1392
+ }
1393
+
1394
+ .wds_box.wds_sub_active,
1395
+ .wds_box.wds_active {
1396
+ display: block;
1397
+ }
1398
+
1399
+ .wds_tab_label {
1400
+ display: block;
1401
+ width: inherit;
1402
+ }
1403
+
1404
+ .wds_box {
1405
+ display: none;
1406
+ margin-top: 0 !important;
1407
+ position: relative;
1408
+ top: -1px;
1409
+ }
1410
+
1411
+ .wds_box {
1412
+ border: 1px solid #dfdfdf;
1413
+ border-radius: 3px;
1414
+ box-shadow: 0 0 10px #f2f2f2;
1415
+ margin-top: 15px;
1416
+ position: relative;
1417
+ }
1418
+
1419
+ .wds_clear {
1420
+ clear: both;
1421
+ float: none !important;
1422
+ }
1423
+
1424
+ .wds_box thead td {
1425
+ border-bottom: 0 none !important;
1426
+ }
1427
+
1428
+ .wds_box tbody {
1429
+ background-color: #FFFFFF;
1430
+ border-top: 0 none;
1431
+ padding-left: 10px;
1432
+ }
1433
+
1434
+ .wds_box thead {
1435
+ background: -webkit-linear-gradient(#F5F5F5, #FFFFFF);
1436
+ background: -o-linear-gradient(#F5F5F5, #FFFFFF);
1437
+ background: -moz-linear-gradient(#F5F5F5, #FFFFFF);
1438
+ background: linear-gradient(#F5F5F5, #FFFFFF);
1439
+ border-top: 0 none;
1440
+ border-bottom: 0 none;
1441
+ color: #333;
1442
+ font: bold 12px/29px Arial,serif;
1443
+ height: 29px;
1444
+ margin: 0;
1445
+ padding: 0 10px;
1446
+ text-align: left;
1447
+ text-shadow: 0 1px 0 #fff;
1448
+ }
1449
+
1450
+ .wds_box table {
1451
+ border-collapse: collapse;
1452
+ border-spacing: 0;
1453
+ width: 100%;
1454
+ }
1455
+
1456
+ .wds_nav_tabs {
1457
+ background-color: #F5F5F5;
1458
+ border-right: 1px solid #DFDFDF;
1459
+ float: left;
1460
+ height: 640px;
1461
+ margin: 0;
1462
+ width: 150px;
1463
+ }
1464
+
1465
+ .wds_nav_tabs ul {
1466
+ list-style: none outside none;
1467
+ margin: 10px 0;
1468
+ padding: 0;
1469
+ }
1470
+
1471
+ .wds_nav_tabs .wds_sub_active,
1472
+ .wds_nav_tabs .wds_sub_active a,
1473
+ .wds_nav_tabs .wds_sub_active a:hover,
1474
+ .wds_nav_tabs .wds_active,
1475
+ .wds_nav_tabs .wds_active a,
1476
+ .wds_nav_tabs .wds_active a:hover {
1477
+ background: none repeat scroll 0 0 #fff;
1478
+ color: #333;
1479
+ }
1480
+
1481
+ .wds_nav_tabs .wds_active {
1482
+ border-color: #DFDFDF;
1483
+ border-width: 1px 0 1px 1px;
1484
+ border-style: solid;
1485
+ margin: 0 -1px 0 -4px;
1486
+ padding: 0;
1487
+ }
1488
+
1489
+ .wds_nav_tabs li {
1490
+ border-color: transparent;
1491
+ border-style: solid;
1492
+ border-width: 1px 0;
1493
+ list-style-type: none;
1494
+ margin-bottom: 0;
1495
+ }
1496
+
1497
+ .wds_nav_tabs a {
1498
+ display: block;
1499
+ line-height: 18px;
1500
+ padding: 5px 5px 5px 12px;
1501
+ text-decoration: none;
1502
+ }
1503
+
1504
+ .wds_nav_box {
1505
+ background: none repeat scroll 0 0 #fff;
1506
+ display: none;
1507
+ height: 610px;
1508
+ overflow: auto;
1509
+ padding: 15px;
1510
+ }
1511
+
1512
+ .wds_nav_box.wds_active {
1513
+ display: block;
1514
+ }
1515
+
1516
+ .wds_layer_head {
1517
+ background-color: #F5F5F5;
1518
+ border-bottom: 1px solid #DFDFDF;
1519
+ border-top: 1px solid #DFDFDF;
1520
+ cursor: pointer;
1521
+ padding: 5px;
1522
+ }
1523
+
1524
+ .wds_layer_head .handle {
1525
+ cursor: move;
1526
+ display: inline-block;
1527
+ margin: 5px;
1528
+ }
1529
+
1530
+ .wds_box td {
1531
+ padding: 10px !important;
1532
+ }
1533
+
1534
+ .wds_draggable {
1535
+ box-sizing: border-box;
1536
+ cursor: move;
1537
+ }
1538
+
1539
+ .wds_box .color {
1540
+ width: 60px;
1541
+ }
1542
+
1543
+ .wds_active_layer {
1544
+ box-shadow: rgb(44, 36, 36) 0px 0px 5px;
1545
+ border-radius: 3px;
1546
+ }
1547
+
1548
+ .wds_draggable a,
1549
+ .wds_draggable a:hover {
1550
+ color: inherit !important;
1551
+ font-size: inherit !important;
1552
+ font-style: inherit !important;
1553
+ font-weight: inherit !important;
1554
+ text-decoration: none;
1555
+ }
1556
+
1557
+ #add_embed_help {
1558
+ height: 200px;
1559
+ width: 672px;
1560
+ top: 40%;
1561
+ }
1562
+
1563
+ #add_embed input[type="text"] {
1564
+ width: 500px;
1565
+ }
1566
+
1567
+ .wds_buttons {
1568
+ float: right;
1569
+ font-weight: normal;
1570
+ position: relative;
1571
+ }
1572
+
1573
+ .wds_reset_button {
1574
+ display: none;
1575
+ font-weight: normal;
1576
+ margin: 10px 0;
1577
+ position: absolute;
1578
+ right: 40px;
1579
+ z-index: 1;
1580
+ }
1581
+
1582
+ #wdi_save_feed .two .section_col {
1583
+ width: 47%;
1584
+ float: left;
1585
+ margin: 0 1.5% 18px;
1586
+ }
1587
+ #wdi_save_feed .wdi_element {
1588
+ margin: 0 0 18px;
1589
+ }
1590
+
1591
+ #wdi_save_feed .half .wdi_element,
1592
+ #wdi_save_feed .one .wdi_element {
1593
+ width: 96%;
1594
+ float: none;
1595
+ margin: 0 2% 20px;
1596
+ }
1597
+
1598
+ .wdi_element_name_liked_feed{
1599
+ display: none !important;
1600
+ }
1601
+
1602
+
1603
+ #wdi_save_feed .wdi_element p {
1604
+ margin: 2px 0 0;
1605
+ }
1606
+ .wdi_section_name {
1607
+ font-size: 19px;
1608
+ margin: 0 auto 15px;
1609
+ width: 100%;
1610
+ box-sizing: border-box;
1611
+ padding: 15px;
1612
+ border-bottom: 1px solid #f1f1f1;
1613
+ color: #444;
1614
+ cursor: pointer;
1615
+ }
1616
+ .wdi_section {
1617
+ border: 1px solid #dedede;
1618
+ margin-bottom: 20px;
1619
+ background:#fff;
1620
+ }
1621
+ .wdi_section .optioninput * {
1622
+ text-align: left;
1623
+ }
1624
+ .wdi_section.half {
1625
+ width: 49%;
1626
+ float: left;
1627
+ -webkit-box-sizing:border-box;
1628
+ -moz-box-sizing:border-box;
1629
+ box-sizing:border-box;
1630
+ }
1631
+ .wdi_buttons{
1632
+ text-align:right;
1633
+ margin-top: 7px;
1634
+ }
1635
+ .wdi_tab .wdi_section.half:last-child{
1636
+ margin-left:2%;
1637
+ }
1638
+
1639
+ /*wdi how to publish*/
1640
+ #how_to_publish_tab .wdi_howto_container{
1641
+ display: flex;
1642
+ flex-wrap: wrap;
1643
+ }
1644
+
1645
+ #how_to_publish_tab .wdi_howto_content{
1646
+ border: 1px rgb(221, 221, 221) solid;
1647
+ display: flex;
1648
+ flex: 1;
1649
+ flex-direction: column;
1650
+ margin: 5px;
1651
+ min-width: 250px;
1652
+ max-width: calc(25% - 20px);
1653
+ padding: 20px 10px;
1654
+ text-align: center;
1655
+ }
1656
+
1657
+ #how_to_publish_tab .wdi_howto_container h2{
1658
+ font-size: 23px;
1659
+ font-weight: normal;
1660
+ line-height: 29px;
1661
+ margin: 0;
1662
+ padding: 11px 15px 4px 0;
1663
+ }
1664
+
1665
+ #how_to_publish_tab .wdi_howto_container .wdi_howto_content input{
1666
+ margin: 0 auto;
1667
+ text-align: center;
1668
+ width: 100%;
1669
+ }
1670
+ .wdi_buttons button.button.preview-button {
1671
+ height: 28px;
1672
+ }
1673
+ @media (max-width: 782px) {
1674
+ .wdi_buttons button.button.preview-button {
1675
+ height: auto;
1676
+ }
1677
+ }
1678
+
1679
+ @media (min-width: 768px) {
1680
+ .wdi_border_wrapper .wdi_element_content{
1681
+ width: 100%;
1682
+ display: block;
1683
+ }
1684
+ .wdi_border_wrapper .wdi_element_title{
1685
+ display: block;
1686
+ }
1687
+ .wdi_border_wrapper .wdi_element_content input[type=text]:not(.wp-color-picker){
1688
+ width: calc(100% - 30px);
1689
+ height: 28px;
1690
+ }
1691
+ .wdi_border_wrapper .wdi_element_content input#wdi_add_user_ajax_input{
1692
+ width: calc(100% - 78px);
1693
+ }
1694
+ .wdi_border_wrapper .wdi_element_content input[type=number]{
1695
+ width: calc(100% - 30px);
1696
+ }
1697
+ .wdi_border_wrapper .wdi_element_content select{
1698
+ width: calc(100% - 30px);
1699
+ }
1700
+ }
1701
+ @media (max-width: 768px) {
1702
+ #wdi_save_feed .two .section_col {
1703
+ width: 96%;
1704
+ float: none;
1705
+ margin: 0 2% 18px;
1706
+ }
1707
+ .wdi_section.half {
1708
+ width: 100%;
1709
+ float: none;
1710
+ margin:0 0 20px 0 !important;
1711
+ }
1712
+ }
1713
+
1714
+ .wdi_section_close::before{
1715
+ content: "\f142";
1716
+ display: inline-block;
1717
+ font: 400 20px/1 dashicons;
1718
+ speak: none;
1719
+ float: right;
1720
+ cursor: pointer;
1721
+ }
1722
+ .wdi_section_open::before{
1723
+ content: "\f140";
1724
+ display: inline-block;
1725
+ font: 400 20px/1 dashicons;
1726
+ speak: none;
1727
+ float: right;
1728
+ cursor: pointer;
1729
+ }
1730
+ .wdi-page-header{
1731
+ width: 98%;
1732
+ padding: 10px;
1733
+ }
1734
+ .wdi-page-header .wdi_buttons{
1735
+ float: right;
1736
+ }
1737
+ .wdi-page-header .WDI_title_input{
1738
+ padding: 3px 8px;
1739
+ font-size: 1.7em;
1740
+ line-height: 100%;
1741
+ height: 1.5em;
1742
+ width: 30%;
1743
+ outline: 0;
1744
+ margin: 0 0 3px;
1745
+ background-color: #fff;
1746
+ }
1747
+
1748
+
1749
+ .wdi_demo_img{
1750
+ margin-top: 20px;
1751
+ }
1752
+
1753
+
1754
+
1755
+
1756
+ #wdi_feed_form .wd-page-title.wd-header {
1757
+ width: 100%;
1758
+ padding: 10px 0;
1759
+ }
1760
+ @media screen and (max-width: 782px){
1761
+ #wdi_feed_form p.search-box {
1762
+ margin-bottom: 0;
1763
+ }
1764
+ #wdi_feed_form p.search-box input[type="search"]{
1765
+ width:100%;
1766
+ height: auto !important;
1767
+ }
1768
+ #wdi_feed_form p.search-box input[type="button"]{
1769
+ margin-bottom: 10px;
1770
+ padding: 6px 14px;
1771
+ line-height: normal;
1772
+ font-size: 14px;
1773
+ height: auto;
1774
+ }
1775
+ .wdi-page-header .WDI_title_input {
1776
+ width: 60%;
1777
+ }
1778
+ .wdi-page-header .wdi_buttons {
1779
+ float: none;
1780
+ text-align: center;
1781
+ }
1782
+ }
1783
+ .wdi_reset_cache_success{
1784
+ float: right;
1785
+ }
1786
+ #wdi_reset_cache{
1787
+ float: right;
1788
+ }
1789
+
1790
+
1791
+ /*body.toplevel_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(3),*/
1792
+ body.toplevel_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(4),
1793
+ body.toplevel_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(5){
1794
+ display: none;
1795
+ }
1796
+
1797
+ body.instagram-feed_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(3){
1798
+ display: table-row !important;
1799
+ }
1800
+ body.instagram-feed_page_wdi_settings table:nth-of-type(1) tr:nth-of-type(4){
1801
+ display: table-row !important;
1802
+ }
1803
+
1804
+ #wpbody-content>div:not(.wrap):not(.wd_topic), .wrap .notice:not(.wd-notice), .notice:not(.wd-notice) {
1805
+ display: none;
1806
+ }
css/wdi_frontend.css CHANGED
@@ -1,975 +1,975 @@
1
- .wdi_clear {
2
- clear: both;
3
- }
4
-
5
- .wdi_feed_main_container .table {
6
- display: table;
7
- }
8
-
9
- .wdi_feed_main_container .table-cell {
10
- display: table-cell;
11
- }
12
-
13
- .wdi_feed_main_container .table-row {
14
- display: table-row;
15
- }
16
-
17
- .wdi_feed_main_container {
18
- -webkit-user-select: none; /* Chrome/Safari */
19
- -moz-user-select: none; /* Firefox */
20
- -ms-user-select: none; /* IE10+ */
21
-
22
- /* Rules below not implemented in browsers yet */
23
- -o-user-select: none;
24
- user-select: none;
25
- }
26
-
27
- .wdi_follow_button:hover {
28
- cursor: pointer;
29
- }
30
-
31
- .wdi_hidden {
32
- display: none !important;
33
- }
34
-
35
- .wdi_hover_off:hover {
36
- background-color: transparent !important;
37
- }
38
-
39
- .wdi_cursor_off:hover {
40
- cursor: auto !important;
41
- }
42
-
43
- .wdi_filter_active span {
44
- color: white;
45
- }
46
-
47
- .wdi_disabled {
48
- visibility: hidden;
49
- }
50
-
51
- /*=========================================================*/
52
-
53
- .wdi_ajax_loading {
54
- position: absolute;
55
- width: 50px;
56
- height: 50px;
57
- left: 0;
58
- right: 0;
59
- bottom: -50px;
60
- margin: auto;
61
- z-index: 100;
62
-
63
- }
64
-
65
- .wdi_feed_main_container {
66
- width: 100%;
67
- position: relative;
68
- }
69
-
70
- .wdi_feed_main_container .wdi_img {
71
- margin: 0; /*reset style*/
72
- }
73
-
74
- .wdi_feed_main_container .wdi_follow_btn {
75
- display: inline-block;
76
- background: 0 0;
77
- border-style: solid;
78
- border-width: 1px;
79
- font-weight: 500;
80
- outline: none;
81
- overflow: hidden;
82
- text-overflow: ellipsis;
83
- white-space: nowrap;
84
- -webkit-appearance: none;
85
- vertical-align: text-bottom;
86
- }
87
-
88
- .wdi_feed_main_container .wdi_follow_btn:hover {
89
- cursor: pointer;
90
- }
91
-
92
- .wdi_feed_main_container .wdi_pagination {
93
- -webkit-user-select: none; /* Chrome/Safari */
94
- -moz-user-select: none; /* Firefox */
95
- -ms-user-select: none; /* IE10+ */
96
-
97
- /* Rules below not implemented in browsers yet */
98
- -o-user-select: none;
99
- user-select: none;
100
- }
101
-
102
- .wdi_feed_main_container .wdi_pagination_ctrl {
103
- display: inline-block;
104
- }
105
-
106
- .wdi_feed_main_container .wdi_pagination_ctrl:hover {
107
- cursor: pointer;
108
- }
109
-
110
- .wdi_feed_main_container .wdi_filter_icon span {
111
- display: block;
112
- font-size: 25px;
113
- color: white;
114
- }
115
-
116
- .wdi_feed_main_container .wdi_filter_icon span::before {
117
- width: 20px;
118
- height: 20px;
119
- position: absolute;
120
- opacity: 1;
121
- right: 0;
122
- left: 0;
123
- top: 0;
124
- bottom: 0;
125
- margin: auto;
126
- }
127
-
128
- .wdi_photo_img {
129
- position: relative;
130
- overflow: hidden;
131
-
132
- }
133
-
134
- .wdi_photo_overlay {
135
- width: 100%;
136
- height: 100%;
137
- position: absolute;
138
- top: 0;
139
- left: 0;
140
- background-color: transparent;
141
- transition: all 0.1s ease;
142
- }
143
-
144
- .wdi_thumb_icon i {
145
- display: none;
146
- transition: all 0.1s ease;
147
- }
148
-
149
- .wdi_photo_overlay:hover .wdi_thumb_icon i {
150
- display: block;
151
- }
152
-
153
- .wdi_feed_main_container .tenweb {
154
- font-family: 'tenweb' !important;
155
- font-style: normal;
156
- width: auto;/*for Hueman theme*/
157
- speak: none;
158
- display:inline-block;
159
- line-height: 1;
160
- font-weight: normal;
161
- font-variant: normal;
162
- text-transform: none;
163
- vertical-align: top;
164
- -webkit-font-smoothing: antialiased;
165
- -moz-osx-font-smoothing: grayscale;
166
- }
167
- .wdi_media_info .tenweb-i:before {
168
- margin-right: 6px;
169
- }
170
-
171
-
172
- /**************************************************************/
173
-
174
- /**
175
- * lightbox styles
176
- */
177
-
178
- .wdi_spider_popup_loading {
179
- /*background: url("../images/ajax_loader.gif") no-repeat scroll 0 0 / 50px 50px rgba(0, 0, 0, 0);*/
180
- background-image: url("../images/ajax_loader.png");
181
- background-color: rgba(0, 0, 0, 0);
182
- background-repeat: no-repeat;
183
- background-position: 0 0;
184
- background-size: 50px 50px;
185
- border: none !important;
186
- display: none;
187
- height: 50px;
188
- left: 50%;
189
- margin-left: -20px;
190
- margin-top: -20px;
191
- overflow: hidden;
192
- position: fixed;
193
- top: 50%;
194
- width: 50px;
195
- z-index: 10102;
196
- -moz-animation: spin 2.5s infinite linear;
197
- -o-animation: spin 2.5s infinite linear;
198
- -webkit-animation: spin 2.5s infinite linear;
199
- animation: spin 2.5s infinite linear;
200
- }
201
-
202
- .wdi_spider_popup_overlay {
203
- cursor: pointer;
204
- background-color: rgba(0, 0, 0, 0.5);
205
- display: none;
206
- height: 100%;
207
- left: 0;
208
- position: fixed;
209
- top: 0;
210
- width: 100%;
211
- z-index: 10100;
212
- }
213
-
214
- div[id^="wdi_container"] p {
215
- padding: 0 !important;
216
- margin: 0 !important;
217
- }
218
-
219
- .wdi_spider_popup_loading,
220
- .footer-list-block .bwp_gallery .wdi_spider_popup_loading,
221
- .footer-list-block .bwp_gallery_tags .wdi_spider_popup_loading {
222
- /*background: url("../images/ajax_loader.gif") no-repeat scroll 0 0 / 50px 50px rgba(0, 0, 0, 0);*/
223
- background-image: url("../images/ajax_loader.png");
224
- background-color: rgba(0, 0, 0, 0);
225
- background-repeat: no-repeat;
226
- background-position: 0 0;
227
- background-size: 50px 50px;
228
- border: none !important;
229
- display: none;
230
- height: 50px;
231
- left: 50%;
232
- margin-left: -20px;
233
- margin-top: -20px;
234
- overflow: hidden;
235
- position: fixed;
236
- top: 50%;
237
- width: 50px;
238
- z-index: 10102;
239
-
240
- -moz-animation: spin 2.5s infinite linear;
241
- -o-animation: spin 2.5s infinite linear;
242
- -webkit-animation: spin 2.5s infinite linear;
243
- animation: spin 2.5s infinite linear;
244
- }
245
-
246
- .wdi_spider_ajax_loading {
247
- border: none !important;
248
-
249
- -moz-animation: spin 2.5s infinite linear;
250
- -o-animation: spin 2.5s infinite linear;
251
- -webkit-animation: spin 2.5s infinite linear;
252
- animation: spin 2.5s infinite linear;
253
- }
254
-
255
- .wdi_spider_popup_overlay,
256
- .footer-list-block .bwp_gallery .wdi_spider_popup_overlay,
257
- .footer-list-block .bwp_gallery_tags .wdi_spider_popup_overlay {
258
- cursor: pointer;
259
- display: none;
260
- height: 100%;
261
- left: 0;
262
- position: fixed;
263
- top: 0;
264
- width: 100%;
265
- z-index: 10100;
266
- }
267
-
268
- .wdi_spider_popup_close,
269
- .wdi_spider_popup_close_fullscreen {
270
- -moz-box-sizing: content-box !important;
271
- box-sizing: content-box !important;
272
- cursor: pointer;
273
- display: table;
274
- line-height: 0;
275
- position: absolute;
276
- z-index: 11100;
277
- }
278
-
279
- #wdi_spider_popup_left {
280
- left: 0;
281
- }
282
-
283
- #wdi_spider_popup_right {
284
- right: 0;
285
- }
286
-
287
- #wdi_spider_popup_left:hover,
288
- #wdi_spider_popup_right:hover {
289
- visibility: visible;
290
- }
291
-
292
- #wdi_spider_popup_left:hover span {
293
- left: 20px;
294
- }
295
-
296
- #wdi_spider_popup_right:hover span {
297
- left: auto;
298
- right: 20px;
299
- }
300
-
301
- #wdi_spider_popup_left,
302
- #wdi_spider_popup_right {
303
- background: transparent url("../images/blank.gif") repeat scroll 0 0;
304
- bottom: 35%;
305
- cursor: pointer;
306
- display: inline;
307
- height: 30%;
308
- outline: medium none;
309
- position: absolute;
310
- width: 35%;
311
- z-index: 10130;
312
- }
313
-
314
- #wdi_spider_popup_left-ico,
315
- #wdi_spider_popup_right-ico {
316
- -moz-box-sizing: border-box;
317
- box-sizing: border-box;
318
- cursor: pointer;
319
- display: table;
320
- left: -9999px;
321
- line-height: 0;
322
- margin-top: -15px;
323
- position: absolute;
324
- top: 50%;
325
- z-index: 10135;
326
- }
327
-
328
- .wdi_image_info_container1 {
329
- height: 100%;
330
- margin: 0 auto;
331
- position: absolute;
332
- width: 100%;
333
- }
334
-
335
- .wdi_image_info_container2 {
336
- display: table;
337
- height: 100%;
338
- margin: 0 auto;
339
- position: absolute;
340
- width: 100%;
341
- }
342
-
343
- .wdi_image_info_spun {
344
- display: table-cell;
345
- height: 100%;
346
- left: 0;
347
- top: 0;
348
- width: 100%;
349
- overflow: hidden;
350
- position: relative;
351
- }
352
-
353
- .wdi_image_info {
354
- display: inline-block;
355
- position: relative;
356
- text-decoration: none;
357
- word-wrap: break-word;
358
- z-index: 11;
359
- }
360
-
361
- .wdi_photo_wrap_inner {
362
- text-align: center;
363
- }
364
-
365
- .wdi_feed_item[wdi_type="slideshow"] .tenweb-i-clone {
366
-
367
- -webkit-transform: rotate(180deg);
368
- -moz-transform: rotate(180deg);
369
- -o-transform: rotate(180deg);
370
- -ms-transform: rotate(180deg);
371
- transform: rotate(180deg);
372
- }
373
- .wdi_js_error_no_animate,.wdi_token_error{
374
- text-align: center;
375
- font-size: 14px;
376
- }
377
- .wdi_js_error {
378
- text-align: center;
379
-
380
- -webkit-animation-name: wdi_js_error;
381
- -moz-animation-name: wdi_js_error;
382
- -o-animation-name: wdi_js_error;
383
- animation-name: wdi_js_error;
384
-
385
- -webkit-animation-duration: 0.5s;
386
- -moz-animation-duration: 0.5s;
387
- -o-animation-duration: 0.5s;
388
- animation-duration: 0.5s;
389
-
390
- -webkit-animation-delay: 20s;
391
- -moz-animation-delay: 20s;
392
- -o-animation-delay: 20s;
393
- animation-delay: 20s;
394
-
395
- -webkit-animation-fill-mode: forwards;
396
- -moz-animation-fill-mode: forwards;
397
- -o-animation-fill-mode: forwards;
398
- animation-fill-mode: forwards;
399
-
400
- color: #cc0000;
401
- -webkit-transform: scale(0);
402
- -moz-transform: scale(0);
403
- -ms-transform: scale(0);
404
- -o-transform: scale(0);
405
- transform: scale(0);
406
-
407
- font-size: 12px;
408
- }
409
-
410
- @keyframes wdi_js_error {
411
- from {
412
- visibility: hidden;
413
- -webkit-transform: scale(0);
414
- -moz-transform: scale(0);
415
- -ms-transform: scale(0);
416
- -o-transform: scale(0);
417
- transform: scale(0);
418
- }
419
- to {
420
- visibility: visible;
421
- -webkit-transform: scale(1);
422
- -moz-transform: scale(1);
423
- -ms-transform: scale(1);
424
- -o-transform: scale(1);
425
- transform: scale(1);
426
- }
427
- }
428
-
429
- /* layout specific styles */
430
-
431
- /* thumbnails */
432
- /* .wdi_layout_th */
433
-
434
- .wdi_layout_th .wdi_feed_container {
435
- min-width: 160px;
436
- margin: 0 auto;
437
- }
438
-
439
- .wdi_layout_th .wdi_feed_wrapper {
440
- margin: 0 auto;
441
- }
442
-
443
- .wdi_layout_th .wdi_header_wrapper {
444
- display: inline-table;
445
- }
446
-
447
- .wdi_layout_th .wdi_header_img_wrap, .wdi_users_img_wrap {
448
- overflow: hidden;
449
- }
450
-
451
- .wdi_layout_th .wdi_header_text {
452
- display: table-cell;
453
- vertical-align: middle;
454
- }
455
-
456
- .wdi_layout_th .wdi_single_user {
457
- display: inline-block;
458
- float: left;
459
- }
460
-
461
- .wdi_layout_th .wdi_user_img_wrap {
462
- display: inline-block;
463
- float: left;
464
- /*margin: 0 0 0 -100% !important;*/
465
- position: relative;
466
- }
467
-
468
- .wdi_layout_th .wdi_header_user_text {
469
- display: inline-block;
470
- float: left;
471
- width: 100%;
472
-
473
- }
474
-
475
- .wdi_layout_th .wdi_followers,
476
- .wdi_layout_th .wdi_posts {
477
- display: inline-block;
478
- }
479
-
480
- .wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3 {
481
- display: inline-block;
482
- text-transform: none;
483
- }
484
-
485
- .wdi_layout_th .wdi_header_user_text h3:hover {
486
- cursor: pointer;
487
- }
488
-
489
- .wdi_layout_th .wdi_user_img_wrap img {
490
- overflow: hidden;
491
- display: block;
492
- margin:0;
493
- }
494
-
495
- .wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3 {
496
- margin-left: 10px;
497
- margin-bottom: 0px;
498
- padding:0;
499
- }
500
-
501
- .wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_media_info p {
502
- margin-top: 0px;
503
- margin-bottom: 0px;
504
- }
505
-
506
- .wdi_layout_th .wdi_user_controls {
507
- margin-left: 0;
508
- display: inline-block;
509
- vertical-align: middle;
510
- }
511
-
512
- .wdi_layout_th .wdi_bio {
513
- float: left;
514
- }
515
-
516
- .wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_header_user_text .wdi_followers {
517
- margin-left: 10px;
518
- }
519
-
520
- .wdi_layout_th .wdi_filter_overlay {
521
- position: absolute;
522
- z-index: 2;
523
- top: 0;
524
- left: 0;
525
- opacity: 0;
526
- transition: opacity 0.1s ease;
527
- }
528
-
529
- .wdi_layout_th .wdi_filter_overlay:hover {
530
- opacity: 0.9;
531
- cursor: pointer;
532
- }
533
-
534
- .wdi_layout_th .wdi_photo_wrap {
535
- position: relative;
536
- display: inline-block;
537
- overflow: hidden;
538
- box-sizing: content-box;
539
- }
540
-
541
- .wdi_layout_th .wdi_photo_wrap:after {
542
- padding-top: 100%;
543
- display: block;
544
- content: "";
545
- }
546
-
547
- .wdi_layout_th .wdi_photo_wrap_inner {
548
- position: absolute;
549
- top: 0;
550
- bottom: 0;
551
- left: 0;
552
- right: 0;
553
- }
554
-
555
- .wdi_layout_th .wdi_photo_img {
556
- width: 100%;
557
- height: 100%;
558
- }
559
-
560
- .wdi_layout_th .wdi_img {
561
- display: block;
562
- position: absolute;
563
- top: 50%;
564
- left: 50%;
565
- max-width: none;
566
- -webkit-transform: translateX(-50%) translateY(-50%);
567
- -moz-transform: translateX(-50%) translateY(-50%);
568
- -ms-transform: translateX(-50%) translateY(-50%);
569
- -o-transform: translateX(-50%) translateY(-50%);
570
- transform: translateX(-50%) translateY(-50%);
571
- }
572
-
573
- .wdi_layout_th .wdi_shape_portrait .wdi_img,
574
- .wdi_layout_th .wdi_shape_square .wdi_img {
575
- width: 100%;
576
- height: auto;
577
- }
578
-
579
- .wdi_layout_th .wdi_shape_landscape .wdi_img {
580
- height: 100% !important; /*overwrite some themes styles*/
581
- width: auto;
582
- }
583
-
584
- .wdi_layout_th .wdi_feed_item {
585
- display: inline-block;
586
- vertical-align: top;
587
- overflow: hidden;
588
- }
589
-
590
- .wdi_layout_th .wdi_photo_meta {
591
- text-align: center;
592
- padding-bottom: 10px;
593
- line-height: 1.4;
594
- }
595
-
596
- .wdi_layout_th .wdi_thumb_comments i,
597
- .wdi_layout_th .wdi_thumb_likes i {
598
- width: 100%;
599
- }
600
-
601
- .wdi_layout_th .wdi_photo_title {
602
- text-overflow: ellipsis;
603
- overflow: hidden;
604
- white-space: nowrap;
605
- width: 90%;
606
- margin-left: 5%;
607
- margin-right: 5%;
608
- text-align: center;
609
- }
610
-
611
- .wdi_layout_th .wdi_photo_title:hover {
612
- cursor: pointer;
613
- }
614
-
615
- @-moz-keyframes wdi_rotate {
616
- from {
617
- transform: rotate(0deg);
618
- }
619
- to {
620
- transform: rotate(360deg);
621
- }
622
- }
623
-
624
- @-o-keyframes wdi_rotate {
625
- from {
626
- transform: rotate(0deg);
627
- }
628
- to {
629
- transform: rotate(360deg);
630
- }
631
- }
632
-
633
- @-ms-keyframes wdi_rotate {
634
- from {
635
- transform: rotate(0deg);
636
- }
637
- to {
638
- transform: rotate(360deg);
639
- }
640
- }
641
-
642
- @-webkit-keyframes wdi_rotate {
643
- from {
644
- transform: rotate(0deg);
645
- }
646
- to {
647
- transform: rotate(360deg);
648
- }
649
- }
650
-
651
- @keyframes wdi_rotate {
652
- from {
653
- transform: rotate(0deg);
654
- }
655
- to {
656
- transform: rotate(360deg);
657
- }
658
- }
659
-
660
- .wdi_layout_th .wdi_load_more_spinner {
661
- display: table-cell;
662
- vertical-align: middle;
663
-
664
- -webkit-animation: wdi_rotate 1.5s infinite;
665
- -moz-animation: wdi_rotate 1.5s infinite;
666
- -o-animation: wdi_rotate 1.5s infinite;
667
- animation: wdi_rotate 1.5s infinite;
668
- }
669
-
670
- .wdi_layout_th .wdi_load_more,
671
- .wdi_layout_th .wdi_spinner {
672
- padding: 10px;
673
- transition: all 0.2s ease;
674
- }
675
-
676
- .wdi_layout_th .wdi_load_more_wrap,
677
- .wdi_layout_th .wdi_spinner_wrap {
678
- display: inline-table;
679
- box-sizing: border-box;
680
- }
681
-
682
- .wdi_layout_th .wdi_load_more_wrap_inner,
683
- .wdi_layout_th .wdi_spinner_wrap_inner {
684
- display: table-row;
685
- text-align: center;
686
- }
687
-
688
- .wdi_layout_th .wdi_load_more_text {
689
- display: table-cell;
690
- vertical-align: middle;
691
- }
692
-
693
- .wdi_layout_th .wdi_load_more_text img {
694
- float: left;
695
- }
696
-
697
- .wdi_layout_th .wdi_load_more_wrap:hover {
698
- cursor: pointer;
699
- }
700
-
701
- .wdi_layout_th .wdi_photo_overlay:hover {
702
- cursor: pointer;
703
- }
704
-
705
- .wdi_layout_th .wdi_photo_overlay i {
706
- opacity: 1;
707
- }
708
-
709
- .wdi_layout_th .wdi_load_more_container {
710
- display: inline-block;
711
- }
712
-
713
- /* masonry */
714
- /* .wdi_layout_ms */
715
-
716
- /* image browser */
717
- /* .wdi_layout_ib */
718
-
719
- .wdi_layout_ib .wdi_feed_container {
720
- min-width: 160px;
721
- margin: 0 auto;
722
- }
723
-
724
- .wdi_layout_ib .wdi_feed_wrapper {
725
- margin: 0 auto;
726
- }
727
-
728
- .wdi_layout_ib .wdi_header_wrapper {
729
- display: inline-table;
730
- }
731
-
732
- .wdi_layout_ib .wdi_header_img_wrap,
733
- .wdi_layout_ib .wdi_users_img_wrap {
734
- overflow: hidden;
735
- }
736
-
737
- .wdi_layout_ib .wdi_header_text {
738
- display: table-cell;
739
- vertical-align: middle;
740
- }
741
-
742
- .wdi_layout_ib .wdi_single_user {
743
- display: inline-block;
744
- float: left;
745
- }
746
-
747
- .wdi_layout_ib .wdi_user_img_wrap {
748
- display: inline-block;
749
- float: left;
750
- /*margin: 0 0 0 -100% !important;*/
751
- position: relative;
752
- }
753
-
754
- .wdi_layout_ib .wdi_header_user_text {
755
- display: inline-block;
756
- float: left;
757
- width: 100%;
758
-
759
- }
760
-
761
- .wdi_layout_ib .wdi_followers,
762
- .wdi_layout_ib .wdi_posts {
763
- display: inline-block;
764
- }
765
-
766
- .wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3 {
767
- display: inline-block;
768
- text-transform: none;
769
- }
770
-
771
- .wdi_layout_ib .wdi_header_user_text h3:hover {
772
- cursor: pointer;
773
- }
774
-
775
- .wdi_layout_ib .wdi_user_img_wrap img {
776
- overflow: hidden;
777
- display: block;
778
- margin:0;
779
- }
780
-
781
- .wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3 {
782
- margin-left: 10px;
783
- margin-bottom: 0;
784
- padding: 0;
785
- }
786
-
787
- .wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_media_info p {
788
- margin-top: 0px;
789
- margin-bottom: 0px;
790
- }
791
-
792
- .wdi_layout_ib .wdi_user_controls {
793
- margin-left: 0;
794
- display: inline-block;
795
- vertical-align: middle;
796
- }
797
-
798
- .wdi_layout_ib .wdi_bio {
799
- float: left;
800
- }
801
-
802
- .wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_header_user_text .wdi_followers {
803
- margin-left: 10px;
804
- }
805
-
806
- .wdi_layout_ib .wdi_filter_overlay {
807
- position: absolute;
808
- z-index: 2;
809
- top: 0;
810
- left: 0;
811
- opacity: 0;
812
- transition: opacity 0.1s ease;
813
- }
814
-
815
- .wdi_layout_ib .wdi_filter_overlay:hover {
816
- opacity: 0.9;
817
- cursor: pointer;
818
- }
819
-
820
- .wdi_layout_ib .wdi_photo_wrap {
821
-
822
- overflow: hidden;
823
- box-sizing: content-box;
824
- }
825
-
826
- .wdi_layout_ib .wdi_img {
827
- width: 100%;
828
- display: block;
829
- }
830
-
831
- .wdi_layout_ib .wdi_feed_item {
832
- display: inline-block;
833
- overflow: hidden;
834
- }
835
-
836
- .wdi_layout_ib .wdi_photo_meta {
837
- text-align: center;
838
- padding-bottom: 10px;
839
- }
840
-
841
- .wdi_layout_ib .wdi_thumb_comments i,
842
- .wdi_layout_ib .wdi_thumb_likes i {
843
- width: 100%;
844
- }
845
-
846
- .wdi_layout_ib .wdi_photo_title {
847
- text-overflow: ellipsis;
848
- overflow: hidden;
849
- white-space: nowrap;
850
- width: 90%;
851
- margin-left: 5%;
852
- margin-right: 5%;
853
- text-align: center;
854
- }
855
-
856
- .wdi_layout_ib .wdi_photo_title:hover {
857
- cursor: pointer;
858
- }
859
-
860
- .wdi_layout_ib .wdi_load_more {
861
- padding: 10px;
862
- transition: all 0.2s ease;
863
- }
864
-
865
- .wdi_layout_ib .wdi_load_more_wrap {
866
- display: inline-table;
867
- box-sizing: border-box;
868
- }
869
-
870
- .wdi_layout_ib .wdi_load_more_wrap_inner {
871
- display: table-row;
872
- text-align: center;
873
- }
874
-
875
- .wdi_layout_ib .wdi_load_more_text {
876
- display: table-cell;
877
- vertical-align: middle;
878
- }
879
-
880
- .wdi_layout_ib .wdi_load_more_text img {
881
- float: left;
882
- }
883
-
884
- .wdi_layout_ib .wdi_load_more_wrap:hover {
885
- cursor: pointer;
886
- }
887
-
888
- .wdi_layout_ib .wdi_photo_overlay:hover {
889
- cursor: pointer;
890
- }
891
-
892
- .wdi_layout_ib .wdi_load_more_container {
893
- display: inline-block;
894
- }
895
-
896
- /* blog style*/
897
- /* .wdi_layout_bs */
898
-
899
- .wdi_embed_frame video{
900
- display: inline-block;
901
- }
902
-
903
- /*reset style */
904
- .wdi_image_container img{
905
- display:inline;
906
- }
907
-
908
-
909
- /*Carousel*/
910
- .wdi_carousel_btn_container {
911
- height: 20px;
912
- position: absolute;
913
- width: 100%;
914
- bottom: 65px;
915
- z-index: 10150;
916
- font-size: 0;
917
- }
918
- .wdi_carousel_btn_container span {
919
- background:rgba(255, 255, 255, 0.5);
920
- width: 10px;
921
- height: 10px;
922
- display: inline-block;
923
- border-radius: 5px;
924
- cursor: pointer;
925
- margin-right: 9px;
926
- position:relative;
927
- left:0;
928
- transition:left .3s;
929
- -webkit-transition:left .3s;
930
- -moz-transition:left .3s;
931
- }
932
- .wdi_carousel_btn_container span:last-child {
933
- margin-right: 0;
934
- }
935
- .wdi_carousel_btn_container span.active {
936
- background: #ffffff;
937
- }
938
- .wdi_carousel_btn_container span.small {
939
- width: 7px;
940
- height: 7px;
941
- margin-right: 12px;
942
- top: -2px;
943
- }
944
- .wdi_carousel_btn_content {
945
- display: inline-block;
946
- /*width: 250px;*/
947
- overflow: hidden;
948
- white-space: nowrap;
949
- position:relative;
950
- padding: 8px 9px;
951
- background: rgba(0, 0, 0, 0.17);
952
- border-radius: 21px;
953
- }
954
- .wdi_image_container .carousel_media:not(.active){
955
- display:none;
956
- }
957
- .wdi_website{
958
- width: 100%;
959
- display: block;
960
- float: left;
961
- }
962
- .wdi_website a{
963
- box-shadow:none !important;
964
- color: #003569;
965
- text-decoration: none;
966
- }
967
-
968
- .elementor-editor-active .wdi_front_overlay{
969
- position: absolute;
970
- top:0;
971
- left: 0;
972
- width: 100%;
973
- height: 100%;
974
- background-color: rgba(0,0,0,0.2);
975
- }
1
+ .wdi_clear {
2
+ clear: both;
3
+ }
4
+
5
+ .wdi_feed_main_container .table {
6
+ display: table;
7
+ }
8
+
9
+ .wdi_feed_main_container .table-cell {
10
+ display: table-cell;
11
+ }
12
+
13
+ .wdi_feed_main_container .table-row {
14
+ display: table-row;
15
+ }
16
+
17
+ .wdi_feed_main_container {
18
+ -webkit-user-select: none; /* Chrome/Safari */
19
+ -moz-user-select: none; /* Firefox */
20
+ -ms-user-select: none; /* IE10+ */
21
+
22
+ /* Rules below not implemented in browsers yet */
23
+ -o-user-select: none;
24
+ user-select: none;
25
+ }
26
+
27
+ .wdi_follow_button:hover {
28
+ cursor: pointer;
29
+ }
30
+
31
+ .wdi_hidden {
32
+ display: none !important;
33
+ }
34
+
35
+ .wdi_hover_off:hover {
36
+ background-color: transparent !important;
37
+ }
38
+
39
+ .wdi_cursor_off:hover {
40
+ cursor: auto !important;
41
+ }
42
+
43
+ .wdi_filter_active span {
44
+ color: white;
45
+ }
46
+
47
+ .wdi_disabled {
48
+ visibility: hidden;
49
+ }
50
+
51
+ /*=========================================================*/
52
+
53
+ .wdi_ajax_loading {
54
+ position: absolute;
55
+ width: 50px;
56
+ height: 50px;
57
+ left: 0;
58
+ right: 0;
59
+ bottom: -50px;
60
+ margin: auto;
61
+ z-index: 100;
62
+
63
+ }
64
+
65
+ .wdi_feed_main_container {
66
+ width: 100%;
67
+ position: relative;
68
+ }
69
+
70
+ .wdi_feed_main_container .wdi_img {
71
+ margin: 0; /*reset style*/
72
+ }
73
+
74
+ .wdi_feed_main_container .wdi_follow_btn {
75
+ display: inline-block;
76
+ background: 0 0;
77
+ border-style: solid;
78
+ border-width: 1px;
79
+ font-weight: 500;
80
+ outline: none;
81
+ overflow: hidden;
82
+ text-overflow: ellipsis;
83
+ white-space: nowrap;
84
+ -webkit-appearance: none;
85
+ vertical-align: text-bottom;
86
+ }
87
+
88
+ .wdi_feed_main_container .wdi_follow_btn:hover {
89
+ cursor: pointer;
90
+ }
91
+
92
+ .wdi_feed_main_container .wdi_pagination {
93
+ -webkit-user-select: none; /* Chrome/Safari */
94
+ -moz-user-select: none; /* Firefox */
95
+ -ms-user-select: none; /* IE10+ */
96
+
97
+ /* Rules below not implemented in browsers yet */
98
+ -o-user-select: none;
99
+ user-select: none;
100
+ }
101
+
102
+ .wdi_feed_main_container .wdi_pagination_ctrl {
103
+ display: inline-block;
104
+ }
105
+
106
+ .wdi_feed_main_container .wdi_pagination_ctrl:hover {
107
+ cursor: pointer;
108
+ }
109
+
110
+ .wdi_feed_main_container .wdi_filter_icon span {
111
+ display: block;
112
+ font-size: 25px;
113
+ color: white;
114
+ }
115
+
116
+ .wdi_feed_main_container .wdi_filter_icon span::before {
117
+ width: 20px;
118
+ height: 20px;
119
+ position: absolute;
120
+ opacity: 1;
121
+ right: 0;
122
+ left: 0;
123
+ top: 0;
124
+ bottom: 0;
125
+ margin: auto;
126
+ }
127
+
128
+ .wdi_photo_img {
129
+ position: relative;
130
+ overflow: hidden;
131
+
132
+ }
133
+
134
+ .wdi_photo_overlay {
135
+ width: 100%;
136
+ height: 100%;
137
+ position: absolute;
138
+ top: 0;
139
+ left: 0;
140
+ background-color: transparent;
141
+ transition: all 0.1s ease;
142
+ }
143
+
144
+ .wdi_thumb_icon i {
145
+ display: none;
146
+ transition: all 0.1s ease;
147
+ }
148
+
149
+ .wdi_photo_overlay:hover .wdi_thumb_icon i {
150
+ display: block;
151
+ }
152
+
153
+ .wdi_feed_main_container .tenweb {
154
+ font-family: 'tenweb' !important;
155
+ font-style: normal;
156
+ width: auto;/*for Hueman theme*/
157
+ speak: none;
158
+ display:inline-block;
159
+ line-height: 1;
160
+ font-weight: normal;
161
+ font-variant: normal;
162
+ text-transform: none;
163
+ vertical-align: top;
164
+ -webkit-font-smoothing: antialiased;
165
+ -moz-osx-font-smoothing: grayscale;
166
+ }
167
+ .wdi_media_info .tenweb-i:before {
168
+ margin-right: 6px;
169
+ }
170
+
171
+
172
+ /**************************************************************/
173
+
174
+ /**
175
+ * lightbox styles
176
+ */
177
+
178
+ .wdi_spider_popup_loading {
179
+ /*background: url("../images/ajax_loader.gif") no-repeat scroll 0 0 / 50px 50px rgba(0, 0, 0, 0);*/
180
+ background-image: url("../images/ajax_loader.png");
181
+ background-color: rgba(0, 0, 0, 0);
182
+ background-repeat: no-repeat;
183
+ background-position: 0 0;
184
+ background-size: 50px 50px;
185
+ border: none !important;
186
+ display: none;
187
+ height: 50px;
188
+ left: 50%;
189
+ margin-left: -20px;
190
+ margin-top: -20px;
191
+ overflow: hidden;
192
+ position: fixed;
193
+ top: 50%;
194
+ width: 50px;
195
+ z-index: 10102;
196
+ -moz-animation: spin 2.5s infinite linear;
197
+ -o-animation: spin 2.5s infinite linear;
198
+ -webkit-animation: spin 2.5s infinite linear;
199
+ animation: spin 2.5s infinite linear;
200
+ }
201
+
202
+ .wdi_spider_popup_overlay {
203
+ cursor: pointer;
204
+ background-color: rgba(0, 0, 0, 0.5);
205
+ display: none;
206
+ height: 100%;
207
+ left: 0;
208
+ position: fixed;
209
+ top: 0;
210
+ width: 100%;
211
+ z-index: 10100;
212
+ }
213
+
214
+ div[id^="wdi_container"] p {
215
+ padding: 0 !important;
216
+ margin: 0 !important;
217
+ }
218
+
219
+ .wdi_spider_popup_loading,
220
+ .footer-list-block .bwp_gallery .wdi_spider_popup_loading,
221
+ .footer-list-block .bwp_gallery_tags .wdi_spider_popup_loading {
222
+ /*background: url("../images/ajax_loader.gif") no-repeat scroll 0 0 / 50px 50px rgba(0, 0, 0, 0);*/
223
+ background-image: url("../images/ajax_loader.png");
224
+ background-color: rgba(0, 0, 0, 0);
225
+ background-repeat: no-repeat;
226
+ background-position: 0 0;
227
+ background-size: 50px 50px;
228
+ border: none !important;
229
+ display: none;
230
+ height: 50px;
231
+ left: 50%;
232
+ margin-left: -20px;
233
+ margin-top: -20px;
234
+ overflow: hidden;
235
+ position: fixed;
236
+ top: 50%;
237
+ width: 50px;
238
+ z-index: 10102;
239
+
240
+ -moz-animation: spin 2.5s infinite linear;
241
+ -o-animation: spin 2.5s infinite linear;
242
+ -webkit-animation: spin 2.5s infinite linear;
243
+ animation: spin 2.5s infinite linear;
244
+ }
245
+
246
+ .wdi_spider_ajax_loading {
247
+ border: none !important;
248
+
249
+ -moz-animation: spin 2.5s infinite linear;
250
+ -o-animation: spin 2.5s infinite linear;
251
+ -webkit-animation: spin 2.5s infinite linear;
252
+ animation: spin 2.5s infinite linear;
253
+ }
254
+
255
+ .wdi_spider_popup_overlay,
256
+ .footer-list-block .bwp_gallery .wdi_spider_popup_overlay,
257
+ .footer-list-block .bwp_gallery_tags .wdi_spider_popup_overlay {
258
+ cursor: pointer;
259
+ display: none;
260
+ height: 100%;
261
+ left: 0;
262
+ position: fixed;
263
+ top: 0;
264
+ width: 100%;
265
+ z-index: 10100;
266
+ }
267
+
268
+ .wdi_spider_popup_close,
269
+ .wdi_spider_popup_close_fullscreen {
270
+ -moz-box-sizing: content-box !important;
271
+ box-sizing: content-box !important;
272
+ cursor: pointer;
273
+ display: table;
274
+ line-height: 0;
275
+ position: absolute;
276
+ z-index: 11100;
277
+ }
278
+
279
+ #wdi_spider_popup_left {
280
+ left: 0;
281
+ }
282
+
283
+ #wdi_spider_popup_right {
284
+ right: 0;
285
+ }
286
+
287
+ #wdi_spider_popup_left:hover,
288
+ #wdi_spider_popup_right:hover {
289
+ visibility: visible;
290
+ }
291
+
292
+ #wdi_spider_popup_left:hover span {
293
+ left: 20px;
294
+ }
295
+
296
+ #wdi_spider_popup_right:hover span {
297
+ left: auto;
298
+ right: 20px;
299
+ }
300
+
301
+ #wdi_spider_popup_left,
302
+ #wdi_spider_popup_right {
303
+ background: transparent url("../images/blank.gif") repeat scroll 0 0;
304
+ bottom: 35%;
305
+ cursor: pointer;
306
+ display: inline;
307
+ height: 30%;
308
+ outline: medium none;
309
+ position: absolute;
310
+ width: 35%;
311
+ z-index: 10130;
312
+ }
313
+
314
+ #wdi_spider_popup_left-ico,
315
+ #wdi_spider_popup_right-ico {
316
+ -moz-box-sizing: border-box;
317
+ box-sizing: border-box;
318
+ cursor: pointer;
319
+ display: table;
320
+ left: -9999px;
321
+ line-height: 0;
322
+ margin-top: -15px;
323
+ position: absolute;
324
+ top: 50%;
325
+ z-index: 10135;
326
+ }
327
+
328
+ .wdi_image_info_container1 {
329
+ height: 100%;
330
+ margin: 0 auto;
331
+ position: absolute;
332
+ width: 100%;
333
+ }
334
+
335
+ .wdi_image_info_container2 {
336
+ display: table;
337
+ height: 100%;
338
+ margin: 0 auto;
339
+ position: absolute;
340
+ width: 100%;
341
+ }
342
+
343
+ .wdi_image_info_spun {
344
+ display: table-cell;
345
+ height: 100%;
346
+ left: 0;
347
+ top: 0;
348
+ width: 100%;
349
+ overflow: hidden;
350
+ position: relative;
351
+ }
352
+
353
+ .wdi_image_info {
354
+ display: inline-block;
355
+ position: relative;
356
+ text-decoration: none;
357
+ word-wrap: break-word;
358
+ z-index: 11;
359
+ }
360
+
361
+ .wdi_photo_wrap_inner {
362
+ text-align: center;
363
+ }
364
+
365
+ .wdi_feed_item[wdi_type="slideshow"] .tenweb-i-clone {
366
+
367
+ -webkit-transform: rotate(180deg);
368
+ -moz-transform: rotate(180deg);
369
+ -o-transform: rotate(180deg);
370
+ -ms-transform: rotate(180deg);
371
+ transform: rotate(180deg);
372
+ }
373
+ .wdi_js_error_no_animate,.wdi_token_error{
374
+ text-align: center;
375
+ font-size: 14px;
376
+ }
377
+ .wdi_js_error {
378
+ text-align: center;
379
+
380
+ -webkit-animation-name: wdi_js_error;
381
+ -moz-animation-name: wdi_js_error;
382
+ -o-animation-name: wdi_js_error;
383
+ animation-name: wdi_js_error;
384
+
385
+ -webkit-animation-duration: 0.5s;
386
+ -moz-animation-duration: 0.5s;
387
+ -o-animation-duration: 0.5s;
388
+ animation-duration: 0.5s;
389
+
390
+ -webkit-animation-delay: 20s;
391
+ -moz-animation-delay: 20s;
392
+ -o-animation-delay: 20s;
393
+ animation-delay: 20s;
394
+
395
+ -webkit-animation-fill-mode: forwards;
396
+ -moz-animation-fill-mode: forwards;
397
+ -o-animation-fill-mode: forwards;
398
+ animation-fill-mode: forwards;
399
+
400
+ color: #cc0000;
401
+ -webkit-transform: scale(0);
402
+ -moz-transform: scale(0);
403
+ -ms-transform: scale(0);
404
+ -o-transform: scale(0);
405
+ transform: scale(0);
406
+
407
+ font-size: 12px;
408
+ }
409
+
410
+ @keyframes wdi_js_error {
411
+ from {
412
+ visibility: hidden;
413
+ -webkit-transform: scale(0);
414
+ -moz-transform: scale(0);
415
+ -ms-transform: scale(0);
416
+ -o-transform: scale(0);
417
+ transform: scale(0);
418
+ }
419
+ to {
420
+ visibility: visible;
421
+ -webkit-transform: scale(1);
422
+ -moz-transform: scale(1);
423
+ -ms-transform: scale(1);
424
+ -o-transform: scale(1);
425
+ transform: scale(1);
426
+ }
427
+ }
428
+
429
+ /* layout specific styles */
430
+
431
+ /* thumbnails */
432
+ /* .wdi_layout_th */
433
+
434
+ .wdi_layout_th .wdi_feed_container {
435
+ min-width: 160px;
436
+ margin: 0 auto;
437
+ }
438
+
439
+ .wdi_layout_th .wdi_feed_wrapper {
440
+ margin: 0 auto;
441
+ }
442
+
443
+ .wdi_layout_th .wdi_header_wrapper {
444
+ display: inline-table;
445
+ }
446
+
447
+ .wdi_layout_th .wdi_header_img_wrap, .wdi_users_img_wrap {
448
+ overflow: hidden;
449
+ }
450
+
451
+ .wdi_layout_th .wdi_header_text {
452
+ display: table-cell;
453
+ vertical-align: middle;
454
+ }
455
+
456
+ .wdi_layout_th .wdi_single_user {
457
+ display: inline-block;
458
+ float: left;
459
+ }
460
+
461
+ .wdi_layout_th .wdi_user_img_wrap {
462
+ display: inline-block;
463
+ float: left;
464
+ /*margin: 0 0 0 -100% !important;*/
465
+ position: relative;
466
+ }
467
+
468
+ .wdi_layout_th .wdi_header_user_text {
469
+ display: inline-block;
470
+ float: left;
471
+ width: 100%;
472
+
473
+ }
474
+
475
+ .wdi_layout_th .wdi_followers,
476
+ .wdi_layout_th .wdi_posts {
477
+ display: inline-block;
478
+ }
479
+
480
+ .wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3 {
481
+ display: inline-block;
482
+ text-transform: none;
483
+ }
484
+
485
+ .wdi_layout_th .wdi_header_user_text h3:hover {
486
+ cursor: pointer;
487
+ }
488
+
489
+ .wdi_layout_th .wdi_user_img_wrap img {
490
+ overflow: hidden;
491
+ display: block;
492
+ margin:0;
493
+ }
494
+
495
+ .wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3 {
496
+ margin-left: 10px;
497
+ margin-bottom: 0px;
498
+ padding:0;
499
+ }
500
+
501
+ .wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_media_info p {
502
+ margin-top: 0px;
503
+ margin-bottom: 0px;
504
+ }
505
+
506
+ .wdi_layout_th .wdi_user_controls {
507
+ margin-left: 0;
508
+ display: inline-block;
509
+ vertical-align: middle;
510
+ }
511
+
512
+ .wdi_layout_th .wdi_bio {
513
+ float: left;
514
+ }
515
+
516
+ .wdi_layout_th .wdi_feed_container .wdi_feed_info .wdi_header_user_text .wdi_followers {
517
+ margin-left: 10px;
518
+ }
519
+
520
+ .wdi_layout_th .wdi_filter_overlay {
521
+ position: absolute;
522
+ z-index: 2;
523
+ top: 0;
524
+ left: 0;
525
+ opacity: 0;
526
+ transition: opacity 0.1s ease;
527
+ }
528
+
529
+ .wdi_layout_th .wdi_filter_overlay:hover {
530
+ opacity: 0.9;
531
+ cursor: pointer;
532
+ }
533
+
534
+ .wdi_layout_th .wdi_photo_wrap {
535
+ position: relative;
536
+ display: inline-block;
537
+ overflow: hidden;
538
+ box-sizing: content-box;
539
+ }
540
+
541
+ .wdi_layout_th .wdi_photo_wrap:after {
542
+ padding-top: 100%;
543
+ display: block;
544
+ content: "";
545
+ }
546
+
547
+ .wdi_layout_th .wdi_photo_wrap_inner {
548
+ position: absolute;
549
+ top: 0;
550
+ bottom: 0;
551
+ left: 0;
552
+ right: 0;
553
+ }
554
+
555
+ .wdi_layout_th .wdi_photo_img {
556
+ width: 100%;
557
+ height: 100%;
558
+ }
559
+
560
+ .wdi_layout_th .wdi_img {
561
+ display: block;
562
+ position: absolute;
563
+ top: 50%;
564
+ left: 50%;
565
+ max-width: none;
566
+ -webkit-transform: translateX(-50%) translateY(-50%);
567
+ -moz-transform: translateX(-50%) translateY(-50%);
568
+ -ms-transform: translateX(-50%) translateY(-50%);
569
+ -o-transform: translateX(-50%) translateY(-50%);
570
+ transform: translateX(-50%) translateY(-50%);
571
+ }
572
+
573
+ .wdi_layout_th .wdi_shape_portrait .wdi_img,
574
+ .wdi_layout_th .wdi_shape_square .wdi_img {
575
+ width: 100%;
576
+ height: auto;
577
+ }
578
+
579
+ .wdi_layout_th .wdi_shape_landscape .wdi_img {
580
+ height: 100% !important; /*overwrite some themes styles*/
581
+ width: auto;
582
+ }
583
+
584
+ .wdi_layout_th .wdi_feed_item {
585
+ display: inline-block;
586
+ vertical-align: top;
587
+ overflow: hidden;
588
+ }
589
+
590
+ .wdi_layout_th .wdi_photo_meta {
591
+ text-align: center;
592
+ padding-bottom: 10px;
593
+ line-height: 1.4;
594
+ }
595
+
596
+ .wdi_layout_th .wdi_thumb_comments i,
597
+ .wdi_layout_th .wdi_thumb_likes i {
598
+ width: 100%;
599
+ }
600
+
601
+ .wdi_layout_th .wdi_photo_title {
602
+ text-overflow: ellipsis;
603
+ overflow: hidden;
604
+ white-space: nowrap;
605
+ width: 90%;
606
+ margin-left: 5%;
607
+ margin-right: 5%;
608
+ text-align: center;
609
+ }
610
+
611
+ .wdi_layout_th .wdi_photo_title:hover {
612
+ cursor: pointer;
613
+ }
614
+
615
+ @-moz-keyframes wdi_rotate {
616
+ from {
617
+ transform: rotate(0deg);
618
+ }
619
+ to {
620
+ transform: rotate(360deg);
621
+ }
622
+ }
623
+
624
+ @-o-keyframes wdi_rotate {
625
+ from {
626
+ transform: rotate(0deg);
627
+ }
628
+ to {
629
+ transform: rotate(360deg);
630
+ }
631
+ }
632
+
633
+ @-ms-keyframes wdi_rotate {
634
+ from {
635
+ transform: rotate(0deg);
636
+ }
637
+ to {
638
+ transform: rotate(360deg);
639
+ }
640
+ }
641
+
642
+ @-webkit-keyframes wdi_rotate {
643
+ from {
644
+ transform: rotate(0deg);
645
+ }
646
+ to {
647
+ transform: rotate(360deg);
648
+ }
649
+ }
650
+
651
+ @keyframes wdi_rotate {
652
+ from {
653
+ transform: rotate(0deg);
654
+ }
655
+ to {
656
+ transform: rotate(360deg);
657
+ }
658
+ }
659
+
660
+ .wdi_layout_th .wdi_load_more_spinner {
661
+ display: table-cell;
662
+ vertical-align: middle;
663
+
664
+ -webkit-animation: wdi_rotate 1.5s infinite;
665
+ -moz-animation: wdi_rotate 1.5s infinite;
666
+ -o-animation: wdi_rotate 1.5s infinite;
667
+ animation: wdi_rotate 1.5s infinite;
668
+ }
669
+
670
+ .wdi_layout_th .wdi_load_more,
671
+ .wdi_layout_th .wdi_spinner {
672
+ padding: 10px;
673
+ transition: all 0.2s ease;
674
+ }
675
+
676
+ .wdi_layout_th .wdi_load_more_wrap,
677
+ .wdi_layout_th .wdi_spinner_wrap {
678
+ display: inline-table;
679
+ box-sizing: border-box;
680
+ }
681
+
682
+ .wdi_layout_th .wdi_load_more_wrap_inner,
683
+ .wdi_layout_th .wdi_spinner_wrap_inner {
684
+ display: table-row;
685
+ text-align: center;
686
+ }
687
+
688
+ .wdi_layout_th .wdi_load_more_text {
689
+ display: table-cell;
690
+ vertical-align: middle;
691
+ }
692
+
693
+ .wdi_layout_th .wdi_load_more_text img {
694
+ float: left;
695
+ }
696
+
697
+ .wdi_layout_th .wdi_load_more_wrap:hover {
698
+ cursor: pointer;
699
+ }
700
+
701
+ .wdi_layout_th .wdi_photo_overlay:hover {
702
+ cursor: pointer;
703
+ }
704
+
705
+ .wdi_layout_th .wdi_photo_overlay i {
706
+ opacity: 1;
707
+ }
708
+
709
+ .wdi_layout_th .wdi_load_more_container {
710
+ display: inline-block;
711
+ }
712
+
713
+ /* masonry */
714
+ /* .wdi_layout_ms */
715
+
716
+ /* image browser */
717
+ /* .wdi_layout_ib */
718
+
719
+ .wdi_layout_ib .wdi_feed_container {
720
+ min-width: 160px;
721
+ margin: 0 auto;
722
+ }
723
+
724
+ .wdi_layout_ib .wdi_feed_wrapper {
725
+ margin: 0 auto;
726
+ }
727
+
728
+ .wdi_layout_ib .wdi_header_wrapper {
729
+ display: inline-table;
730
+ }
731
+
732
+ .wdi_layout_ib .wdi_header_img_wrap,
733
+ .wdi_layout_ib .wdi_users_img_wrap {
734
+ overflow: hidden;
735
+ }
736
+
737
+ .wdi_layout_ib .wdi_header_text {
738
+ display: table-cell;
739
+ vertical-align: middle;
740
+ }
741
+
742
+ .wdi_layout_ib .wdi_single_user {
743
+ display: inline-block;
744
+ float: left;
745
+ }
746
+
747
+ .wdi_layout_ib .wdi_user_img_wrap {
748
+ display: inline-block;
749
+ float: left;
750
+ /*margin: 0 0 0 -100% !important;*/
751
+ position: relative;
752
+ }
753
+
754
+ .wdi_layout_ib .wdi_header_user_text {
755
+ display: inline-block;
756
+ float: left;
757
+ width: 100%;
758
+
759
+ }
760
+
761
+ .wdi_layout_ib .wdi_followers,
762
+ .wdi_layout_ib .wdi_posts {
763
+ display: inline-block;
764
+ }
765
+
766
+ .wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3 {
767
+ display: inline-block;
768
+ text-transform: none;
769
+ }
770
+
771
+ .wdi_layout_ib .wdi_header_user_text h3:hover {
772
+ cursor: pointer;
773
+ }
774
+
775
+ .wdi_layout_ib .wdi_user_img_wrap img {
776
+ overflow: hidden;
777
+ display: block;
778
+ margin:0;
779
+ }
780
+
781
+ .wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_header_user_text h3 {
782
+ margin-left: 10px;
783
+ margin-bottom: 0;
784
+ padding: 0;
785
+ }
786
+
787
+ .wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_media_info p {
788
+ margin-top: 0px;
789
+ margin-bottom: 0px;
790
+ }
791
+
792
+ .wdi_layout_ib .wdi_user_controls {
793
+ margin-left: 0;
794
+ display: inline-block;
795
+ vertical-align: middle;
796
+ }
797
+
798
+ .wdi_layout_ib .wdi_bio {
799
+ float: left;
800
+ }
801
+
802
+ .wdi_layout_ib .wdi_feed_container .wdi_feed_info .wdi_header_user_text .wdi_followers {
803
+ margin-left: 10px;
804
+ }
805
+
806
+ .wdi_layout_ib .wdi_filter_overlay {
807
+ position: absolute;
808
+ z-index: 2;
809
+ top: 0;
810
+ left: 0;
811
+ opacity: 0;
812
+ transition: opacity 0.1s ease;
813
+ }
814
+
815
+ .wdi_layout_ib .wdi_filter_overlay:hover {
816
+ opacity: 0.9;
817
+ cursor: pointer;
818
+ }
819
+
820
+ .wdi_layout_ib .wdi_photo_wrap {
821
+
822
+ overflow: hidden;
823
+ box-sizing: content-box;
824
+ }
825
+
826
+ .wdi_layout_ib .wdi_img {
827
+ width: 100%;
828
+ display: block;
829
+ }
830
+
831
+ .wdi_layout_ib .wdi_feed_item {
832
+ display: inline-block;
833
+ overflow: hidden;
834
+ }
835
+
836
+ .wdi_layout_ib .wdi_photo_meta {
837
+ text-align: center;
838
+ padding-bottom: 10px;
839
+ }
840
+
841
+ .wdi_layout_ib .wdi_thumb_comments i,
842
+ .wdi_layout_ib .wdi_thumb_likes i {
843
+ width: 100%;
844
+ }
845
+
846
+ .wdi_layout_ib .wdi_photo_title {
847
+ text-overflow: ellipsis;
848
+ overflow: hidden;
849
+ white-space: nowrap;
850
+ width: 90%;
851
+ margin-left: 5%;
852
+ margin-right: 5%;
853
+ text-align: center;
854
+ }
855
+
856
+ .wdi_layout_ib .wdi_photo_title:hover {
857
+ cursor: pointer;
858
+ }
859
+
860
+ .wdi_layout_ib .wdi_load_more {
861
+ padding: 10px;
862
+ transition: all 0.2s ease;
863
+ }
864
+
865
+ .wdi_layout_ib .wdi_load_more_wrap {
866
+ display: inline-table;
867
+ box-sizing: border-box;
868
+ }
869
+
870
+ .wdi_layout_ib .wdi_load_more_wrap_inner {
871
+ display: table-row;
872
+ text-align: center;
873
+ }
874
+
875
+ .wdi_layout_ib .wdi_load_more_text {
876
+ display: table-cell;
877
+ vertical-align: middle;
878
+ }
879
+
880
+ .wdi_layout_ib .wdi_load_more_text img {
881
+ float: left;
882
+ }
883
+
884
+ .wdi_layout_ib .wdi_load_more_wrap:hover {
885
+ cursor: pointer;
886
+ }
887
+
888
+ .wdi_layout_ib .wdi_photo_overlay:hover {
889
+ cursor: pointer;
890
+ }
891
+
892
+ .wdi_layout_ib .wdi_load_more_container {
893
+ display: inline-block;
894
+ }
895
+
896
+ /* blog style*/
897
+ /* .wdi_layout_bs */
898
+
899
+ .wdi_embed_frame video{
900
+ display: inline-block;
901
+ }
902
+
903
+ /*reset style */
904
+ .wdi_image_container img{
905
+ display:inline;
906
+ }
907
+
908
+
909
+ /*Carousel*/
910
+ .wdi_carousel_btn_container {
911
+ height: 20px;
912
+ position: absolute;
913
+ width: 100%;
914
+ bottom: 65px;
915
+ z-index: 10150;
916
+ font-size: 0;
917
+ }
918
+ .wdi_carousel_btn_container span {
919
+ background:rgba(255, 255, 255, 0.5);
920
+ width: 10px;
921
+ height: 10px;
922
+ display: inline-block;
923
+ border-radius: 5px;
924
+ cursor: pointer;
925
+ margin-right: 9px;
926
+ position:relative;
927
+ left:0;
928
+ transition:left .3s;
929
+ -webkit-transition:left .3s;
930
+ -moz-transition:left .3s;
931
+ }
932
+ .wdi_carousel_btn_container span:last-child {
933
+ margin-right: 0;
934
+ }
935
+ .wdi_carousel_btn_container span.active {
936
+ background: #ffffff;
937
+ }
938
+ .wdi_carousel_btn_container span.small {
939
+ width: 7px;
940
+ height: 7px;
941
+ margin-right: 12px;
942
+ top: -2px;
943
+ }
944
+ .wdi_carousel_btn_content {
945
+ display: inline-block;
946
+ /*width: 250px;*/
947
+ overflow: hidden;
948
+ white-space: nowrap;
949
+ position:relative;
950
+ padding: 8px 9px;
951
+ background: rgba(0, 0, 0, 0.17);
952
+ border-radius: 21px;
953
+ }
954
+ .wdi_image_container .carousel_media:not(.active){
955
+ display:none;
956
+ }
957
+ .wdi_website{
958
+ width: 100%;
959
+ display: block;
960
+ float: left;
961
+ }
962
+ .wdi_website a{
963
+ box-shadow:none !important;
964
+ color: #003569;
965
+ text-decoration: none;
966
+ }
967
+
968
+ .elementor-editor-active .wdi_front_overlay{
969
+ position: absolute;
970
+ top:0;
971
+ left: 0;
972
+ width: 100%;
973
+ height: 100%;
974
+ background-color: rgba(0,0,0,0.2);
975
+ }
css/wdi_licensing.css CHANGED
@@ -1,159 +1,159 @@
1
- div#featurs_tables {
2
- display: inline-block;
3
- font-size: 13px;
4
- padding-top: 95px;
5
- text-align: left;
6
- float: left;
7
- }
8
-
9
- div#featurs_tables div {
10
- vertical-align: top;
11
- }
12
-
13
- div#featurs_table1 {
14
- background-color: rgb(254, 254, 254);
15
- display: inline-block;
16
- position: relative;
17
- vertical-align: top;
18
- width: 380px;
19
- z-index: 10;
20
- }
21
-
22
- div#featurs_table1 span::after {
23
- background-image: url("../images/arrow3.png");
24
- background-position: center center;
25
- background-repeat: no-repeat;
26
- content: "";
27
- display: inline-block;
28
- float: right;
29
- height: 37px;
30
- position: relative;
31
- right: -21px;
32
- top: -8px;
33
- width: 26px;
34
- }
35
-
36
- div#featurs_table1 span {
37
- border-left: 1px solid #e5e5e5;
38
- border-right: 1px solid #e5e5e5;
39
- border-top: 1px solid #e5e5e5;
40
- color: #545454;
41
- background-color: white;
42
- display: block;
43
- height: 21px;
44
- padding: 8px;
45
- text-align: left;
46
- }
47
-
48
- div#featurs_table1 span:last-child,
49
- div#featurs_table2 span:last-child,
50
- div#featurs_table3 span:last-child {
51
- border-bottom: 1px solid #e5e5e5;
52
- }
53
-
54
- div#featurs_table2 {
55
- background-color: rgba(255, 255, 255, 0.9);
56
- display: inline-block;
57
- position: relative;
58
- top: -72px;
59
- width: 180px;
60
- }
61
-
62
- div#featurs_table2 span:first-child,
63
- div#featurs_table3 span:first-child {
64
- color: #000;
65
- font-size: 22px;
66
- font-weight: bold;
67
- padding-bottom: 14px;
68
- padding-top: 2px;
69
- border-top: 1px solid #e5e5e5;
70
- border-left: 1px solid #e5e5e5;
71
- border-right: 1px solid #e5e5e5;
72
- height: 39px;
73
- padding-top: 18px;
74
- }
75
-
76
- div#featurs_table2 span:first-child {
77
- border-left: 1px solid #e5e5e5 !important;
78
- }
79
-
80
- div#featurs_table2 span {
81
- border-left: none !important;
82
- }
83
-
84
- div#featurs_table2 span,
85
- div#featurs_table3 span {
86
- border-top: 1px solid #e5e5e5;
87
- border-right: 1px solid #e5e5e5;
88
- border-left: 1px solid #e5e5e5;
89
- color: #545454;
90
- display: block;
91
- height: 21px;
92
- padding: 8px;
93
- text-align: center;
94
- }
95
-
96
- .download a {
97
- background-color: #fff;
98
- border: 6px solid #dddddd;
99
- border-radius: 50%;
100
- box-shadow: 0 0 0 7px #eeeeee;
101
- color: #21439c;
102
- cursor: pointer;
103
- display: inline-block;
104
- font-size: 14px;
105
- font-style: italic;
106
- font-weight: bold;
107
- margin-top: -4px;
108
- outline: 0 none;
109
- padding: 32px 9px 32px 2px;
110
- text-align: center;
111
- text-decoration: none;
112
- transition-duration: 0.6s;
113
- transition-property: border-color;
114
- transition-timing-function: linear;
115
- width: 72px;
116
- }
117
-
118
- div#featurs_table3 {
119
- background-color: rgba(255, 255, 255, 0.6);
120
- display: inline-block;
121
- position: relative;
122
- top: -72px;
123
- width: 180px;
124
- }
125
-
126
- div#featurs_table2 span.yes,
127
- div#featurs_table3 span.yes {
128
- background-image: url("../images/plus.png");
129
- background-position: center center;
130
- background-repeat: no-repeat;
131
- }
132
-
133
- span.no {
134
- background-image: url("../images/minus.png");
135
- background-position: center center;
136
- background-repeat: no-repeat;
137
- }
138
-
139
- .download input[type="submit"]:hover,
140
- .download a:hover {
141
- border-color: #F4762A;
142
- }
143
-
144
- #featurs_tables span.download {
145
- height: 40px !important;
146
- border-bottom: 1px solid #e5e5e5 !important;
147
- border-left: 1px solid #e5e5e5 !important;
148
- }
149
-
150
- .price_big {
151
- color: #F47629;
152
- font-size: 22px;
153
- }
154
-
155
- .price {
156
- display: block;
157
- color: #F47629;
158
- }
159
-
1
+ div#featurs_tables {
2
+ display: inline-block;
3
+ font-size: 13px;
4
+ padding-top: 95px;
5
+ text-align: left;
6
+ float: left;
7
+ }
8
+
9
+ div#featurs_tables div {
10
+ vertical-align: top;
11
+ }
12
+
13
+ div#featurs_table1 {
14
+ background-color: rgb(254, 254, 254);
15
+ display: inline-block;
16
+ position: relative;
17
+ vertical-align: top;
18
+ width: 380px;
19
+ z-index: 10;
20
+ }
21
+
22
+ div#featurs_table1 span::after {
23
+ background-image: url("../images/arrow3.png");
24
+ background-position: center center;
25
+ background-repeat: no-repeat;
26
+ content: "";
27
+ display: inline-block;
28
+ float: right;
29
+ height: 37px;
30
+ position: relative;
31
+ right: -21px;
32
+ top: -8px;
33
+ width: 26px;
34
+ }
35
+
36
+ div#featurs_table1 span {
37
+ border-left: 1px solid #e5e5e5;
38
+ border-right: 1px solid #e5e5e5;
39
+ border-top: 1px solid #e5e5e5;
40
+ color: #545454;
41
+ background-color: white;
42
+ display: block;
43
+ height: 21px;
44
+ padding: 8px;
45
+ text-align: left;
46
+ }
47
+
48
+ div#featurs_table1 span:last-child,
49
+ div#featurs_table2 span:last-child,
50
+ div#featurs_table3 span:last-child {
51
+ border-bottom: 1px solid #e5e5e5;
52
+ }
53
+
54
+ div#featurs_table2 {
55
+ background-color: rgba(255, 255, 255, 0.9);
56
+ display: inline-block;
57
+ position: relative;
58
+ top: -72px;
59
+ width: 180px;
60
+ }
61
+
62
+ div#featurs_table2 span:first-child,
63
+ div#featurs_table3 span:first-child {
64
+ color: #000;
65
+ font-size: 22px;
66
+ font-weight: bold;
67
+ padding-bottom: 14px;
68
+ padding-top: 2px;
69
+ border-top: 1px solid #e5e5e5;
70
+ border-left: 1px solid #e5e5e5;
71
+ border-right: 1px solid #e5e5e5;
72
+ height: 39px;
73
+ padding-top: 18px;
74
+ }
75
+
76
+ div#featurs_table2 span:first-child {
77
+ border-left: 1px solid #e5e5e5 !important;
78
+ }
79
+
80
+ div#featurs_table2 span {
81
+ border-left: none !important;
82
+ }
83
+
84
+ div#featurs_table2 span,
85
+ div#featurs_table3 span {
86
+ border-top: 1px solid #e5e5e5;
87
+ border-right: 1px solid #e5e5e5;
88
+ border-left: 1px solid #e5e5e5;
89
+ color: #545454;
90
+ display: block;
91
+ height: 21px;
92
+ padding: 8px;
93
+ text-align: center;
94
+ }
95
+
96
+ .download a {
97
+ background-color: #fff;
98
+ border: 6px solid #dddddd;
99
+ border-radius: 50%;
100
+ box-shadow: 0 0 0 7px #eeeeee;
101
+ color: #21439c;
102
+ cursor: pointer;
103
+ display: inline-block;
104
+ font-size: 14px;
105
+ font-style: italic;
106
+ font-weight: bold;
107
+ margin-top: -4px;
108
+ outline: 0 none;
109
+ padding: 32px 9px 32px 2px;
110
+ text-align: center;
111
+ text-decoration: none;
112
+ transition-duration: 0.6s;
113
+ transition-property: border-color;
114
+ transition-timing-function: linear;
115
+ width: 72px;
116
+ }
117
+
118
+ div#featurs_table3 {
119
+ background-color: rgba(255, 255, 255, 0.6);
120
+ display: inline-block;
121
+ position: relative;
122
+ top: -72px;
123
+ width: 180px;
124
+ }
125
+
126
+ div#featurs_table2 span.yes,
127
+ div#featurs_table3 span.yes {
128
+ background-image: url("../images/plus.png");
129
+ background-position: center center;
130
+ background-repeat: no-repeat;
131
+ }
132
+
133
+ span.no {
134
+ background-image: url("../images/minus.png");
135
+ background-position: center center;
136
+ background-repeat: no-repeat;
137
+ }
138
+
139
+ .download input[type="submit"]:hover,
140
+ .download a:hover {
141
+ border-color: #F4762A;
142
+ }
143
+
144
+ #featurs_tables span.download {
145
+ height: 40px !important;
146
+ border-bottom: 1px solid #e5e5e5 !important;
147
+ border-left: 1px solid #e5e5e5 !important;
148
+ }
149
+
150
+ .price_big {
151
+ color: #F47629;
152
+ font-size: 22px;
153
+ }
154
+
155
+ .price {
156
+ display: block;
157
+ color: #F47629;
158
+ }
159
+
elementor/elementor.php CHANGED
@@ -1,58 +1,58 @@
1
- <?php
2
- /**
3
- * Created by PhpStorm.
4
- * User: mher
5
- * Date: 10/19/18
6
- * Time: 4:41 PM
7
- */
8
-
9
- class WDIElementor {
10
-
11
- protected static $instance = null;
12
-
13
- private function __construct(){
14
- // Register widget for Elementor builder.
15
- add_action('elementor/widgets/widgets_registered', array($this, 'register_elementor_widgets'));
16
- add_action('elementor/editor/after_enqueue_scripts', array($this, 'enqueue_elementor_widget_scripts'));
17
-
18
- if(!defined('TWBB_VERSION')) {
19
- //fires after elementor editor styles and scripts are enqueued.
20
- add_action('elementor/editor/after_enqueue_styles', array($this, 'enqueue_editor_styles'), 1);
21
-
22
- // Register 10Web category for Elementor widget if 10Web builder doesn't installed.
23
- add_action('elementor/elements/categories_registered', array($this, 'register_widget_category'), 1, 1);
24
- }
25
-
26
- }
27
-
28
- public function register_elementor_widgets(){
29
- if(defined('ELEMENTOR_PATH') && class_exists('Elementor\Widget_Base')) {
30
- $file_path = plugin_dir_path(__FILE__) . '/widget.php';
31
- if(is_file($file_path)) {
32
- include_once $file_path;
33
- }
34
- }
35
- }
36
-
37
- public function enqueue_editor_styles(){
38
- wp_enqueue_style('twbb-editor-styles', plugin_dir_url(__FILE__) . 'styles/editor.css', array(), '1.0.0');
39
- }
40
- public function enqueue_elementor_widget_scripts(){
41
- wp_enqueue_script('twbb_editor_widget_js', plugin_dir_url(__FILE__) . 'js/wdi_elementor_widget.js', array('jquery'));
42
- }
43
-
44
- public function register_widget_category($elements_manager){
45
- $elements_manager->add_category('tenweb-plugins-widgets', array(
46
- 'title' => __('10WEB', 'tenweb-builder'),
47
- 'icon' => 'fa fa-plug',
48
- ));
49
- }
50
-
51
- public static function get_instance(){
52
- if(self::$instance === null) {
53
- self::$instance = new self();
54
- }
55
- return self::$instance;
56
- }
57
-
58
  }
1
+ <?php
2
+ /**
3
+ * Created by PhpStorm.
4
+ * User: mher
5
+ * Date: 10/19/18
6
+ * Time: 4:41 PM
7
+ */
8
+
9
+ class WDIElementor {
10
+
11
+ protected static $instance = null;
12
+
13
+ private function __construct(){
14
+ // Register widget for Elementor builder.
15
+ add_action('elementor/widgets/widgets_registered', array($this, 'register_elementor_widgets'));
16
+ add_action('elementor/editor/after_enqueue_scripts', array($this, 'enqueue_elementor_widget_scripts'));
17
+
18
+ if(!defined('TWBB_VERSION')) {
19
+ //fires after elementor editor styles and scripts are enqueued.
20
+ add_action('elementor/editor/after_enqueue_styles', array($this, 'enqueue_editor_styles'), 1);
21
+
22
+ // Register 10Web category for Elementor widget if 10Web builder doesn't installed.
23
+ add_action('elementor/elements/categories_registered', array($this, 'register_widget_category'), 1, 1);
24
+ }
25
+
26
+ }
27
+
28
+ public function register_elementor_widgets(){
29
+ if(defined('ELEMENTOR_PATH') && class_exists('Elementor\Widget_Base')) {
30
+ $file_path = plugin_dir_path(__FILE__) . '/widget.php';
31
+ if(is_file($file_path)) {
32
+ include_once $file_path;
33
+ }
34
+ }
35
+ }
36
+
37
+ public function enqueue_editor_styles(){
38
+ wp_enqueue_style('twbb-editor-styles', plugin_dir_url(__FILE__) . 'styles/editor.css', array(), '1.0.0');
39
+ }
40
+ public function enqueue_elementor_widget_scripts(){
41
+ wp_enqueue_script('twbb_editor_widget_js', plugin_dir_url(__FILE__) . 'js/wdi_elementor_widget.js', array('jquery'));
42
+ }
43
+
44
+ public function register_widget_category($elements_manager){
45
+ $elements_manager->add_category('tenweb-plugins-widgets', array(
46
+ 'title' => __('10WEB', 'tenweb-builder'),
47
+ 'icon' => 'fa fa-plug',
48
+ ));
49
+ }
50
+
51
+ public static function get_instance(){
52
+ if(self::$instance === null) {
53
+ self::$instance = new self();
54
+ }
55
+ return self::$instance;
56
+ }
57
+
58
  }
elementor/js/wdi_elementor_widget.js CHANGED
@@ -1,22 +1,22 @@
1
- jQuery("document").ready(function () {
2
- elementor.hooks.addAction( 'panel/open_editor/widget/wdi-elementor', function( panel, model, view ) {
3
- var wdi_el = jQuery('select[data-setting="wdi_feeds"]',window.parent.document);
4
- wdi_add_edit_link(wdi_el);
5
- });
6
- jQuery('body').on('change', 'select[data-setting="wdi_feeds"]',window.parent.document, function (){
7
- wdi_add_edit_link(jQuery(this));
8
- });
9
- });
10
-
11
- function wdi_add_edit_link(el) {
12
- var wdi_el = el;
13
- var wdi_id = wdi_el.val();
14
- var a_link = wdi_el.closest('.elementor-control-content').find('.elementor-control-field-description').find('a');
15
- var new_link = 'admin.php?page=wdi_feeds';
16
- if(wdi_id !== '0'){
17
- new_link = 'admin.php?page=wdi_feeds&task=edit&current_id='+wdi_el.val();
18
- }
19
- a_link.attr( 'href', new_link);
20
- }
21
-
22
-
1
+ jQuery("document").ready(function () {
2
+ elementor.hooks.addAction( 'panel/open_editor/widget/wdi-elementor', function( panel, model, view ) {
3
+ var wdi_el = jQuery('select[data-setting="wdi_feeds"]',window.parent.document);
4
+ wdi_add_edit_link(wdi_el);
5
+ });
6
+ jQuery('body').on('change', 'select[data-setting="wdi_feeds"]',window.parent.document, function (){
7
+ wdi_add_edit_link(jQuery(this));
8
+ });
9
+ });
10
+
11
+ function wdi_add_edit_link(el) {
12
+ var wdi_el = el;
13
+ var wdi_id = wdi_el.val();
14
+ var a_link = wdi_el.closest('.elementor-control-content').find('.elementor-control-field-description').find('a');
15
+ var new_link = 'admin.php?page=wdi_feeds';
16
+ if(wdi_id !== '0'){
17
+ new_link = 'admin.php?page=wdi_feeds&task=edit&current_id='+wdi_el.val();
18
+ }
19
+ a_link.attr( 'href', new_link);
20
+ }
21
+
22
+
elementor/styles/editor.css CHANGED
@@ -1,84 +1,84 @@
1
- @font-face {
2
- font-family: 'twbb-icons';
3
- src: url('fonts/twbb-icons.eot');
4
- src: url('fonts/twbb-icons.eot') format('embedded-opentype'),
5
- url('fonts/twbb-icons.ttf') format('truetype'),
6
- url('fonts/twbb-icons.woff') format('woff'),
7
- url('fonts/twbb-icons.svg') format('svg');
8
- font-weight: normal;
9
- font-style: normal;
10
- }
11
-
12
- .twbb-widget-icon {
13
- /* use !important to prevent issues with browser extensions that change fonts */
14
- font-family: 'twbb-icons' !important;
15
- speak: none;
16
- font-style: normal;
17
- font-weight: normal;
18
- font-variant: normal;
19
- text-transform: none;
20
- line-height: 1;
21
-
22
- /* Better Font Rendering =========== */
23
- -webkit-font-smoothing: antialiased;
24
- -moz-osx-font-smoothing: grayscale;
25
- }
26
-
27
- .twbb-widget-icon:before {
28
- color: #556068;
29
- }
30
-
31
- .elementor-element:hover .twbb-widget-icon:before {
32
- color: #d30c5c;
33
- }
34
-
35
- /*ICONS*/
36
-
37
- .twbb-wd-facebook-feed.twbb-widget-icon:before {
38
- content: "\e909";
39
- color: #556068;
40
- }
41
-
42
- .twbb-wd-instagram-feed.twbb-widget-icon:before {
43
- content: "\e90a";
44
- color: #556068;
45
- }
46
-
47
- .twbb-photo-gallery.twbb-widget-icon:before {
48
- content: "\e906";
49
- color: #556068;
50
- }
51
-
52
- .twbb-slider-wd.twbb-widget-icon:before {
53
- content: "\e907";
54
- color: #556068;
55
- }
56
-
57
- .twbb-form-maker.twbb-widget-icon:before {
58
- content: "\e908";
59
- color: #556068;
60
- }
61
-
62
- .twbb-share-buttons.twbb-widget-icon:before {
63
- content: "\e900";
64
- }
65
-
66
- .twbb-pricing-table.twbb-widget-icon:before {
67
- content: "\e901";
68
- }
69
-
70
- .twbb-posts.twbb-widget-icon:before {
71
- content: "\e902";
72
- }
73
-
74
- .twbb-flip-box.twbb-widget-icon:before {
75
- content: "\e903";
76
- }
77
-
78
- .twbb-countdown.twbb-widget-icon:before {
79
- content: "\e904";
80
- }
81
-
82
- .twbb-call-to-action.twbb-widget-icon:before {
83
- content: "\e905";
84
- }
1
+ @font-face {
2
+ font-family: 'twbb-icons';
3
+ src: url('fonts/twbb-icons.eot');
4
+ src: url('fonts/twbb-icons.eot') format('embedded-opentype'),
5
+ url('fonts/twbb-icons.ttf') format('truetype'),
6
+ url('fonts/twbb-icons.woff') format('woff'),
7
+ url('fonts/twbb-icons.svg') format('svg');
8
+ font-weight: normal;
9
+ font-style: normal;
10
+ }
11
+
12
+ .twbb-widget-icon {
13
+ /* use !important to prevent issues with browser extensions that change fonts */
14
+ font-family: 'twbb-icons' !important;
15
+ speak: none;
16
+ font-style: normal;
17
+ font-weight: normal;
18
+ font-variant: normal;
19
+ text-transform: none;
20
+ line-height: 1;
21
+
22
+ /* Better Font Rendering =========== */
23
+ -webkit-font-smoothing: antialiased;
24
+ -moz-osx-font-smoothing: grayscale;
25
+ }
26
+
27
+ .twbb-widget-icon:before {
28
+ color: #556068;
29
+ }
30
+
31
+ .elementor-element:hover .twbb-widget-icon:before {
32
+ color: #d30c5c;
33
+ }
34
+
35
+ /*ICONS*/
36
+
37
+ .twbb-wd-facebook-feed.twbb-widget-icon:before {
38
+ content: "\e909";
39
+ color: #556068;
40
+ }
41
+
42
+ .twbb-wd-instagram-feed.twbb-widget-icon:before {
43
+ content: "\e90a";
44
+ color: #556068;
45
+ }
46
+
47
+ .twbb-photo-gallery.twbb-widget-icon:before {
48
+ content: "\e906";
49
+ color: #556068;
50
+ }
51
+
52
+ .twbb-slider-wd.twbb-widget-icon:before {
53
+ content: "\e907";
54
+ color: #556068;
55
+ }
56
+
57
+ .twbb-form-maker.twbb-widget-icon:before {
58
+ content: "\e908";
59
+ color: #556068;
60
+ }
61
+
62
+ .twbb-share-buttons.twbb-widget-icon:before {
63
+ content: "\e900";
64
+ }
65
+
66
+ .twbb-pricing-table.twbb-widget-icon:before {
67
+ content: "\e901";
68
+ }
69
+
70
+ .twbb-posts.twbb-widget-icon:before {
71
+ content: "\e902";
72
+ }
73
+
74
+ .twbb-flip-box.twbb-widget-icon:before {
75
+ content: "\e903";
76
+ }
77
+
78
+ .twbb-countdown.twbb-widget-icon:before {
79
+ content: "\e904";
80
+ }
81
+
82
+ .twbb-call-to-action.twbb-widget-icon:before {
83
+ content: "\e905";
84
+ }
elementor/styles/fonts/twbb-icons.svg CHANGED
@@ -1,21 +1,21 @@
1
- <?xml version="1.0" standalone="no"?>
2
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
- <svg xmlns="http://www.w3.org/2000/svg">
4
- <metadata>Generated by IcoMoon</metadata>
5
- <defs>
6
- <font id="twbb-icons" horiz-adv-x="1024">
7
- <font-face units-per-em="1024" ascent="960" descent="-64" />
8
- <missing-glyph horiz-adv-x="1024" />
9
- <glyph unicode="&#x20;" horiz-adv-x="512" d="" />
10
- <glyph unicode="&#xe900;" glyph-name="share-buttons" horiz-adv-x="663" d="M420.793 222.473c-7.286 3.871-15.914 6.184-25.074 6.285h-0.032c-15.75-1.033-29.684-8.054-39.692-18.785l-0.032-0.035-50.176 29.272c3.967 7.634 6.293 16.668 6.293 26.245 0 0.332-0.003 0.663-0.008 0.994l0.001-0.050c-0.199 8.291-1.709 16.165-4.33 23.512l0.163-0.525 50.176 29.272c9.006-11.070 22.431-18.245 37.547-18.818l0.094-0.003c9.191 0.104 17.819 2.417 25.409 6.431l-0.303-0.146c10.769 6.738 18.873 16.877 22.877 28.89l0.11 0.382c1.319 4.179 2.078 8.986 2.078 13.969 0 8.704-2.317 16.866-6.368 23.904l0.124-0.233c-8.559 14.651-23.969 24.485-41.722 25.103l-0.086 0.002c-9.191-0.099-17.82-2.413-25.408-6.431l0.302 0.146c-10.771-6.736-18.876-16.876-22.877-28.891l-0.11-0.382c-0.933-3.708-1.468-7.965-1.468-12.347 0-6.838 1.304-13.371 3.676-19.365l-0.124 0.356-50.176-29.272c-11.552 16.494-30.468 27.145-51.872 27.145-34.716 0-62.888-28.021-63.133-62.679v-0.023c0.864-34.301 28.445-61.883 62.665-62.745l0.081-0.002c20.353 0.442 38.361 10.106 50.070 24.966l0.106 0.139 52.259-29.272c-2.081-5.29-3.287-11.416-3.287-17.824 0-18.073 9.596-33.906 23.971-42.679l0.22-0.125c7.285-3.872 15.914-6.186 25.074-6.285h0.031c18.32 1.091 34.186 10.709 43.798 24.906l0.128 0.2c2.599 5.983 4.111 12.952 4.111 20.275 0 18.78-9.947 35.237-24.859 44.39l-0.227 0.129zM362.249 358.382c2.498 9.148 8.557 16.567 16.557 20.816l0.18 0.087c4.899 2.247 10.593 3.739 16.582 4.158l0.155 0.009c0.139 0.002 0.304 0.003 0.469 0.003 12.875 0 24.208-6.6 30.801-16.602l0.086-0.138c3.139-5.567 4.988-12.222 4.988-19.309 0-2.789-0.286-5.511-0.831-8.138l0.045 0.258c-2.493-9.15-8.554-16.571-16.557-20.817l-0.18-0.087c-5.137-3.229-11.382-5.145-18.075-5.145-12.847 0-24.045 7.058-29.928 17.508l-0.089 0.172c-3.896 4.559-6.267 10.524-6.267 17.043 0 3.689 0.759 7.201 2.131 10.388l-0.065-0.171zM247.243 216.188c-27.711 0-50.176 22.465-50.176 50.176s22.465 50.176 50.176 50.176c27.711 0 50.176-22.465 50.176-50.176v0c-0.411-27.537-22.636-49.749-50.139-50.14h-0.037zM427.079 161.81c-5.972-10.622-17.171-17.68-30.017-17.68-6.693 0-12.939 1.916-18.218 5.229l0.143-0.084c-10.538 6.1-17.514 17.321-17.514 30.171 0 6.62 1.852 12.808 5.065 18.074l-0.087-0.153c6.678 10.14 18.012 16.74 30.887 16.74 0.165 0 0.33-0.001 0.494-0.003h-0.025c0.104 0.001 0.228 0.002 0.351 0.002 18.858 0 34.145-15.287 34.145-34.145 0-6.729-1.946-13.003-5.307-18.29l0.082 0.139zM496.040 960h-496.040v-1024h662.599v836.22zM499.571 928.221l131.107-155.895h-131.072zM646.638-42.814h-628.983v985.159h460.694v-187.78h159.462l5.332-797.237zM46.045 758.060h325.985v-21.257h-325.985v21.257zM46.045 843.087h191.347v-21.257h-191.347v21.257zM46.045 683.626h435.836v-21.257h-435.836v21.257zM46.045 612.793h566.908v-21.257h-566.908v21.257zM46.045 474.589v-418.11h566.908v418.11zM591.695 453.402v-375.596h-524.465v375.596z" />
11
- <glyph unicode="&#xe901;" glyph-name="pricing-table" horiz-adv-x="1439" d="M1439.214 175.298v0 721.355h-457.587v63.347h-524.182v-66.842h-457.446v-890.315h457.446v-66.842h524.182v66.842h457.587zM28.142 175.298h429.303v-147.809h-429.197zM1414.603 200.015h-432.975v668.495h429.444v-668.601zM482.092 935.283h475.065v-756.489h-475.065v756.489zM457.375 199.839h-429.127v668.672h429.197v-668.601zM482.092 2.772v0 151.411h475.065v-193.465h-475.065zM981.628 175.298h429.444v-147.809h-429.444zM70.374 769.995h337.814v-21.116h-337.814v21.116zM87.993 678.471h302.61v-21.116h-302.61v21.116zM133.72 590.513h211.121v-21.116h-211.121v21.116zM1027.531 769.995h337.814v-21.116h-337.814v21.116zM1045.116 678.471h302.61v-21.116h-302.61v21.116zM1090.878 590.513h211.121v-21.116h-211.121v21.116zM548.935 850.926h337.814v-21.116h-337.814v21.116zM566.554 759.437h302.61v-21.116h-302.61v21.116zM612.281 674.975h211.121v-21.116h-211.121v21.116zM1104.967 122.509h182.978v-45.762h-182.978v45.762zM147.809 122.509h182.978v-45.762h-182.978v45.762zM626.37 69.72h182.978v-45.762h-182.978v45.762zM711.362 382.146c1.126-0.11 2.433-0.173 3.756-0.173 7.739 0 14.975 2.152 21.143 5.89l-0.182-0.102c4.305 3.206 7.063 8.281 7.063 14 0 0.044 0 0.087 0 0.13v-0.007c0.005 0.17 0.008 0.369 0.008 0.569 0 3.871-1.149 7.474-3.125 10.485l0.045-0.073c-2.221 3.186-4.958 5.844-8.115 7.911l-0.112 0.069c-3.405 2.27-7.31 4.343-11.419 6.019l-0.446 0.161q-6.744 2.754-13.806 5.261t-13.594 5.614c-4.586 2.096-8.538 4.623-12.082 7.619l0.076-0.063c-3.471 2.929-6.341 6.441-8.487 10.404l-0.094 0.189c-2.104 4.202-3.336 9.155-3.336 14.396 0 0.364 0.006 0.726 0.018 1.088l-0.001-0.053c-0.018 0.43-0.028 0.935-0.028 1.442 0 9.712 3.699 18.56 9.765 25.212l-0.027-0.030c7.375 7.25 17.167 12.062 28.058 13.12l0.19 0.015v26.271h18.962v-25.6c6.794-0.274 13.226-1.173 19.437-2.644l-0.687 0.137c5.548-1.249 10.131-2.585 14.602-4.161l-0.901 0.277-4.343-17.655q-5.473 2.048-13.7 4.237c-5.638 1.381-12.111 2.173-18.769 2.173-0.627 0-1.252-0.007-1.875-0.021l0.093 0.002c-0.678 0.045-1.47 0.071-2.267 0.071-6.999 0-13.534-1.985-19.073-5.422l0.155 0.089c-4.513-3.129-7.432-8.283-7.432-14.118 0-0.263 0.006-0.525 0.018-0.785l-0.001 0.037c-0.006-0.166-0.009-0.362-0.009-0.558 0-3.062 0.802-5.937 2.207-8.426l-0.044 0.086c1.635-2.617 3.738-4.786 6.209-6.449l0.076-0.048c2.797-1.93 5.994-3.66 9.373-5.034l0.337-0.121q5.614-2.295 12.465-4.802 8.898-3.531 16.914-7.062c5.396-2.429 10.047-5.372 14.218-8.869l-0.094 0.076c3.959-3.364 7.214-7.42 9.606-11.997l0.105-0.22c2.243-4.63 3.554-10.070 3.554-15.817 0-0.46-0.008-0.919-0.025-1.375l0.002 0.066c0.022-0.473 0.035-1.027 0.035-1.584 0-9.54-3.753-18.204-9.864-24.595l0.013 0.013c-8.107-7.183-18.642-11.791-30.233-12.458l-0.134-0.006v-29.484h-18.962v28.778c-9.285 0.037-18.254 1.324-26.768 3.7l0.709-0.169c-5.813 1.654-10.817 3.638-15.566 6.051l0.488-0.225 5.72 17.126c4.552-2.129 10.018-4.152 15.666-5.742l0.789-0.19c6.458-1.7 13.872-2.676 21.514-2.676 0.779 0 1.555 0.010 2.329 0.030l-0.114-0.002zM233.225 346.165c0.881-0.087 1.905-0.136 2.941-0.136 6.005 0 11.62 1.665 16.41 4.559l-0.142-0.080c3.358 2.497 5.51 6.453 5.51 10.912 0 0.074-0.001 0.148-0.002 0.222v-0.011c0.004 0.126 0.006 0.275 0.006 0.425 0 3.020-0.898 5.829-2.442 8.177l0.035-0.056c-1.726 2.48-3.851 4.549-6.304 6.161l-0.087 0.054c-2.655 1.765-5.7 3.377-8.904 4.677l-0.348 0.125q-5.261 2.119-10.593 4.096t-10.593 4.343c-3.575 1.625-6.655 3.586-9.418 5.912l0.061-0.050c-2.709 2.313-4.944 5.088-6.6 8.217l-0.073 0.152c-1.634 3.269-2.59 7.121-2.59 11.197 0 0.284 0.005 0.568 0.014 0.85l-0.001-0.041c-0.014 0.333-0.021 0.723-0.021 1.116 0 7.562 2.878 14.452 7.599 19.635l-0.021-0.023c5.735 5.641 13.346 9.391 21.813 10.228l0.15 0.012v20.48h14.76v-19.915c5.283-0.211 10.286-0.908 15.118-2.049l-0.535 0.106c4.297-0.982 7.839-2.026 11.294-3.254l-0.701 0.217-3.531-13.877q-4.273 1.589-10.593 3.284c-4.412 1.086-9.478 1.709-14.689 1.709-0.472 0-0.942-0.005-1.412-0.015l0.070 0.001c-0.514 0.033-1.114 0.052-1.718 0.052-5.451 0-10.541-1.544-14.857-4.218l0.121 0.070c-3.524-2.438-5.803-6.458-5.803-11.011 0-0.201 0.004-0.401 0.013-0.599l-0.001 0.028c-0.007-0.157-0.010-0.34-0.010-0.525 0-2.401 0.632-4.655 1.74-6.603l-0.035 0.066c1.275-2.049 2.917-3.747 4.849-5.047l0.059-0.037c2.176-1.493 4.664-2.833 7.293-3.896l0.263-0.094q4.343-1.766 9.71-3.743 7.062-2.684 13.171-5.508c4.182-1.896 7.786-4.188 11.017-6.909l-0.071 0.058c3.082-2.625 5.616-5.79 7.475-9.362l0.081-0.172c1.812-3.664 2.871-7.978 2.871-12.539 0-0.284-0.004-0.567-0.012-0.85l0.001 0.041c0.017-0.362 0.027-0.787 0.027-1.213 0-7.438-2.93-14.192-7.698-19.171l0.009 0.010c-6.315-5.597-14.523-9.187-23.554-9.706l-0.104-0.005v-22.952h-14.76v22.422c-7.235 0.030-14.222 1.033-20.856 2.886l0.552-0.132c-4.521 1.333-8.408 2.918-12.093 4.836l0.37-0.175 4.449 13.347c3.546-1.66 7.804-3.237 12.203-4.478l0.615-0.148c5.053-1.336 10.853-2.104 16.833-2.104 0.587 0 1.173 0.007 1.756 0.022l-0.086-0.002zM1197.374 346.165c0.881-0.087 1.905-0.136 2.941-0.136 6.005 0 11.62 1.665 16.41 4.559l-0.142-0.080c3.358 2.497 5.51 6.453 5.51 10.912 0 0.074-0.001 0.148-0.002 0.222v-0.011c0.004 0.126 0.006 0.275 0.006 0.425 0 3.020-0.898 5.829-2.442 8.177l0.035-0.056c-1.726 2.48-3.851 4.549-6.304 6.161l-0.087 0.054c-2.655 1.765-5.7 3.377-8.904 4.677l-0.348 0.125q-5.261 2.119-10.593 4.096t-10.593 4.343c-3.575 1.625-6.655 3.586-9.418 5.912l0.061-0.050c-2.709 2.313-4.944 5.088-6.6 8.217l-0.073 0.152c-1.634 3.269-2.59 7.121-2.59 11.197 0 0.284 0.005 0.568 0.014 0.85l-0.001-0.041c-0.014 0.333-0.021 0.723-0.021 1.116 0 7.562 2.878 14.452 7.599 19.635l-0.021-0.023c5.735 5.641 13.346 9.391 21.813 10.228l0.15 0.012v20.48h14.76v-19.915c5.283-0.211 10.286-0.908 15.118-2.049l-0.535 0.106c4.297-0.982 7.839-2.026 11.294-3.254l-0.701 0.217-3.531-13.877q-4.273 1.589-10.593 3.284c-4.412 1.086-9.478 1.709-14.689 1.709-0.472 0-0.942-0.005-1.412-0.015l0.070 0.001c-0.514 0.033-1.114 0.052-1.718 0.052-5.451 0-10.541-1.544-14.857-4.218l0.121 0.070c-3.524-2.438-5.803-6.458-5.803-11.011 0-0.201 0.004-0.401 0.013-0.599l-0.001 0.028c-0.007-0.157-0.010-0.34-0.010-0.525 0-2.401 0.632-4.655 1.74-6.603l-0.035 0.066c1.275-2.049 2.917-3.747 4.849-5.047l0.059-0.037c2.176-1.493 4.664-2.833 7.293-3.896l0.263-0.094q4.343-1.766 9.71-3.743 7.062-2.684 13.171-5.508c4.182-1.896 7.786-4.188 11.017-6.909l-0.071 0.058c3.082-2.625 5.616-5.79 7.475-9.362l0.081-0.172c1.812-3.664 2.871-7.978 2.871-12.539 0-0.284-0.004-0.567-0.012-0.85l0.001 0.041c0.017-0.362 0.027-0.787 0.027-1.213 0-7.438-2.93-14.192-7.698-19.171l0.009 0.010c-6.315-5.597-14.523-9.187-23.554-9.706l-0.104-0.005v-22.952h-14.76v22.422c-7.235 0.030-14.222 1.033-20.856 2.886l0.552-0.132c-4.521 1.333-8.408 2.918-12.093 4.836l0.37-0.175 4.449 13.347c3.546-1.66 7.804-3.237 12.203-4.478l0.615-0.148c5.053-1.336 10.853-2.104 16.833-2.104 0.587 0 1.173 0.007 1.756 0.022l-0.086-0.002z" />
12
- <glyph unicode="&#xe902;" glyph-name="posts" horiz-adv-x="670" d="M496.040 573.775h173.621v-46.045h-173.621v46.045zM248.020 605.661h226.763v-21.257h-226.763v21.257zM248.020 665.9h421.641v-21.257h-421.641v21.257zM248.020 548.988h226.763v-21.257h-226.763v21.257zM3.531 662.369v0l-3.531-138.169h152.364v138.169zM24.717 545.457v95.726h109.85v-95.656zM496.040 867.875h173.621v-46.045h-173.621v46.045zM248.020 903.292h226.763v-21.257h-226.763v21.257zM248.020 960h421.641v-21.257h-421.641v21.257zM248.020 843.087h226.763v-21.257h-226.763v21.257zM3.531 818.264h152.364v141.736h-152.364zM134.638 938.743v-95.656h-109.921v95.726zM496.040 279.711h173.621v-46.045h-173.621v46.045zM248.020 311.596h226.763v-21.257h-226.763v21.257zM248.020 371.836h421.641v-21.257h-421.641v21.257zM248.020 254.888h226.763v-21.257h-226.763v21.257zM3.531 368.269v0l-3.531-138.169h152.364v138.169zM24.717 251.357v95.726h109.85v-95.656zM496.040-14.389h173.621v-46.045h-173.621v46.045zM248.020 17.496h226.763v-21.257h-226.763v21.257zM248.020 77.736h421.641v-21.257h-421.641v21.257zM248.020-39.212h226.763v-21.257h-226.763v21.257zM3.531 74.169v0l-3.531-138.169h152.364v138.169zM24.717-42.743v95.726h109.85v-95.656z" />
13
- <glyph unicode="&#xe903;" glyph-name="flip-box" horiz-adv-x="663" d="M499.606 960h-499.606v-1024h662.599v832.653zM637.775 750.963v-790.246h-620.12v978.097h460.694v-187.851zM499.606 772.149v156.072l131.107-155.895zM347.242 414.349h53.142v-17.726h-53.142v17.726zM449.995 414.349h53.142v-17.726h-53.142v17.726zM152.364 414.349h53.142v-17.726h-53.142v17.726zM109.85 414.349h17.726v-17.726h-17.726v17.726zM527.96 414.349h21.257v-17.726h-21.257v17.726zM248.020 414.349h53.142v-17.726h-53.142v17.726zM325.985 354.11l-223.232-205.506-3.531-3.531h457.092l-230.294 209.037zM155.895 169.86l170.090 155.895 170.090-155.895zM106.284 658.838l219.666-201.975 205.506 187.78 21.186 21.186-446.358-6.991zM325.95 485.217l-170.055 155.966h340.145z" />
14
- <glyph unicode="&#xe904;" glyph-name="countdown" horiz-adv-x="3050" d="M1491.957 558.108h60.559v-44.043h-60.559v44.043zM1491.957 381.935h60.559v-44.043h-60.559v44.043zM44.043 514.065h44.043v-132.129h-44.043v132.129zM589.075 514.065h44.043v-132.129h-44.043v132.129zM765.247 514.065h44.043v-132.129h-44.043v132.129zM1310.28 514.065h44.043v-132.129h-44.043v132.129zM1690.151 514.065h44.043v-132.129h-44.043v132.129zM2235.183 514.065h44.043v-132.129h-44.043v132.129zM2416.86 514.065h44.043v-132.129h-44.043v132.129zM2961.892 514.065h44.043v-132.129h-44.043v132.129zM649.634-41.978h-627.613v467.957h-22.022v-489.978h666.151v489.978h-16.516v-467.957zM22.022 937.978h627.613v-467.957h22.022v489.978h-666.151v-489.978h16.516v467.957zM1370.839-41.978h-627.613v467.957h-16.516v-489.978h666.151v489.978h-22.022zM743.226 937.978h627.613v-467.957h22.022v489.978h-666.151v-489.978h16.516v467.957zM2301.247-41.978h-627.613v467.957h-16.516v-489.978h666.151v489.978h-22.022zM1679.14 937.978h627.613v-467.957h22.022v489.978h-666.151v-489.978h16.516v467.957zM2400.344 937.978h627.613v-467.957h22.022v489.978h-666.151v-489.978h16.516v467.957zM3022.452-41.978h-627.613v467.957h-16.516v-489.978h666.151v489.978h-22.022zM22.022 470.022h627.613v-44.043h-627.613v44.043zM2400.344 470.022h627.613v-44.043h-627.613v44.043zM743.226 470.022h627.613v-44.043h-627.613v44.043zM1679.14 470.022h627.613v-44.043h-627.613v44.043zM924.903 492.043c-0.903 9.645-1.419 20.856-1.419 32.188 0 56.273 12.704 109.579 35.399 157.206l-0.949-2.211c16.626 36.298 52.639 61.059 94.435 61.059 3.581 0 7.119-0.182 10.606-0.536l-0.438 0.036c0.446 0.006 0.973 0.010 1.501 0.010 44.086 0 82.528-24.17 102.796-59.981l0.306-0.587c20.922-55.080 33.036-118.767 33.036-185.284 0-0.668-0.001-1.335-0.004-2.002v0.103h71.57c0.346 6.26 0.543 13.586 0.543 20.959 0 75.481-20.656 146.138-56.623 206.626l1.026-1.864c-29.245 49.918-82.62 82.91-143.701 82.91-3.676 0-7.325-0.12-10.942-0.355l0.492 0.026c-3.083 0.197-6.684 0.309-10.312 0.309-59.827 0-112.535-30.479-143.444-76.757l-0.394-0.627c-31.822-58.531-50.531-128.172-50.531-202.183 0-10.219 0.357-20.355 1.058-30.396l-0.076 1.353zM1194.667 409.462c0.002-0.481 0.003-1.050 0.003-1.619 0-59.052-12.149-115.267-34.083-166.282l1.048 2.74c-20.108-36.861-58.583-61.451-102.802-61.451-18.694 0-36.361 4.395-52.025 12.208l0.676-0.305c-21.657 10.759-38.789 27.892-49.266 48.921l-0.283 0.627c-20.897 49.982-33.035 108.057-33.035 168.968 0 0.597 0.001 1.194 0.003 1.791v-0.092h-71.57c-0.044-2.213-0.070-4.822-0.070-7.436 0-74.42 20.486-144.055 56.126-203.574l-1.002 1.806c35.526-50.865 93.79-83.723 159.729-83.723 41.129 0 79.273 12.784 110.674 34.595l-0.64-0.42c17.427 11.986 32.056 26.616 43.676 43.479l0.367 0.564c31.354 56.135 49.816 123.159 49.816 194.495 0 5.173-0.097 10.323-0.29 15.449l0.022-0.74h-77.075zM1849.806 492.043c-0.903 9.645-1.419 20.856-1.419 32.188 0 56.273 12.704 109.579 35.399 157.206l-0.949-2.211c16.626 36.298 52.639 61.059 94.435 61.059 3.581 0 7.119-0.182 10.606-0.536l-0.438 0.036c0.446 0.006 0.973 0.010 1.501 0.010 44.086 0 82.528-24.17 102.796-59.981l0.306-0.587c20.922-55.080 33.036-118.767 33.036-185.284 0-0.668-0.001-1.335-0.004-2.002v0.103h71.57c0.346 6.26 0.543 13.586 0.543 20.959 0 75.481-20.656 146.138-56.623 206.626l1.026-1.864c-29.245 49.918-82.62 82.91-143.701 82.91-3.676 0-7.325-0.12-10.942-0.355l0.492 0.026c-3.083 0.197-6.684 0.309-10.312 0.309-59.827 0-112.535-30.479-143.444-76.757l-0.394-0.627c-31.822-58.531-50.531-128.172-50.531-202.183 0-10.219 0.357-20.355 1.058-30.396l-0.076 1.353zM2119.57 409.462c0.002-0.481 0.003-1.050 0.003-1.619 0-59.052-12.149-115.267-34.083-166.282l1.048 2.74c-20.108-36.861-58.583-61.451-102.802-61.451-18.694 0-36.361 4.395-52.025 12.208l0.676-0.305c-21.657 10.759-38.789 27.892-49.266 48.921l-0.283 0.627c-20.897 49.982-33.035 108.057-33.035 168.968 0 0.597 0.001 1.194 0.003 1.791v-0.092h-71.57c-0.044-2.213-0.070-4.822-0.070-7.436 0-74.42 20.486-144.055 56.126-203.574l-1.002 1.806c35.526-50.865 93.79-83.723 159.729-83.723 41.129 0 79.273 12.784 110.674 34.595l-0.64-0.42c17.427 11.986 32.056 26.616 43.676 43.479l0.367 0.564c31.354 56.135 49.816 123.159 49.816 194.495 0 5.173-0.097 10.323-0.29 15.449l0.022-0.74h-77.075zM2576.516 492.043c-0.903 9.645-1.419 20.856-1.419 32.188 0 56.273 12.704 109.579 35.399 157.206l-0.949-2.211c16.626 36.298 52.639 61.059 94.435 61.059 3.581 0 7.119-0.182 10.606-0.536l-0.438 0.036c0.446 0.006 0.973 0.010 1.501 0.010 44.086 0 82.528-24.17 102.796-59.981l0.306-0.587c20.922-55.080 33.036-118.767 33.036-185.284 0-0.668-0.001-1.335-0.004-2.002v0.103h71.57c0.346 6.26 0.543 13.586 0.543 20.959 0 75.481-20.656 146.138-56.623 206.626l1.026-1.864c-29.245 49.918-82.62 82.91-143.701 82.91-3.676 0-7.325-0.12-10.942-0.355l0.492 0.026c-3.083 0.197-6.684 0.309-10.312 0.309-59.827 0-112.535-30.479-143.444-76.757l-0.394-0.627c-31.822-58.531-50.531-128.172-50.531-202.183 0-10.219 0.357-20.355 1.058-30.396l-0.076 1.353zM2846.28 409.462c0.002-0.481 0.003-1.050 0.003-1.619 0-59.052-12.149-115.267-34.083-166.282l1.048 2.74c-20.108-36.861-58.583-61.451-102.802-61.451-18.694 0-36.361 4.395-52.025 12.208l0.676-0.305c-21.657 10.759-38.789 27.892-49.266 48.921l-0.283 0.627c-20.897 49.982-33.035 108.057-33.035 168.968 0 0.597 0.001 1.194 0.003 1.791v-0.092h-71.57c-0.044-2.213-0.070-4.822-0.070-7.436 0-74.42 20.486-144.055 56.126-203.574l-1.002 1.806c35.526-50.865 93.79-83.723 159.729-83.723 41.129 0 79.273 12.784 110.674 34.595l-0.64-0.42c17.427 11.986 32.056 26.616 43.676 43.479l0.367 0.564c31.354 56.135 49.816 123.159 49.816 194.495 0 5.173-0.097 10.323-0.29 15.449l0.022-0.74h-77.075zM313.806 409.462h71.57v-291.785h-71.57v291.785zM297.29 706.753c5.505 5.505 16.516 11.011 22.022 16.516 0-33.032-5.505-71.57-5.505-104.602v-132.129h71.57v313.806h-60.559l-165.161-126.624 38.538-49.548c29.979 29.099 62.32 56.2 96.552 80.838l2.545 1.743z" />
15
- <glyph unicode="&#xe905;" glyph-name="call-to-action" horiz-adv-x="665" d="M0 960v-1024h665.070v1024zM21.186-39.283v974.566h619.343v-974.566h-619.343zM112.605 643.302h429.303v-21.116h-429.303v21.116zM112.605 544.786h429.303v-21.116h-429.303v21.116zM112.605 432.181h429.303v-21.116h-429.303v21.116zM214.652 769.995h232.236v-21.116h-232.236v21.116zM239.298 168.271h175.951v-45.762h-175.951v45.762zM555.502 100.97l-209.178 109.003 61.864-226.834 38.276 61.864 47.139-58.933 41.242 32.415-47.139 58.933zM511.294 21.416l-17.655-14.724-52.966 64.794-29.449-50.070-41.242 159.073 147.315-76.588-55.967-17.655zM369.876 180.524l147.279-76.588-55.967-17.655 50.070-64.83-17.655-14.724-50.070 64.794-32.38-50.070z" />
16
- <glyph unicode="&#xe906;" glyph-name="photo-gallery" horiz-adv-x="1209" d="M120.139 1.925c-0.597-0.011-1.301-0.017-2.007-0.017-65.153 0-117.97 52.817-117.97 117.97 0 1.264 0.020 2.524 0.059 3.779l-0.005-0.183v484.080c-0.13 2.562-0.204 5.564-0.204 8.583 0 91.281 67.543 166.787 155.377 179.266l0.963 0.112 4.879 0.976c4.494 0.581 8.573 1.762 12.363 3.472l-0.274-0.11c0.564 1.459 0.891 3.148 0.891 4.913 0 0.677-0.048 1.342-0.141 1.993l0.009-0.075c-0.083 0.834-0.13 1.802-0.13 2.781 0 7.761 2.976 14.826 7.848 20.118l-0.019-0.021c6.765 5.9 15.672 9.498 25.419 9.498 1.934 0 3.836-0.142 5.694-0.415l-0.211 0.025h126.59c2.184 0.32 4.706 0.503 7.271 0.503 12.394 0 23.79-4.274 32.793-11.429l-0.108 0.083c7.257-7.803 11.711-18.299 11.711-29.834 0-0.051 0-0.103 0-0.154v0.008c3.376-0.834 7.252-1.312 11.239-1.312 10.56 0 20.337 3.355 28.323 9.057l-0.148-0.101c20.039 25.414 39.526 53.938 57.042 83.76l1.944 3.58c21.248 40.183 62.778 67.098 110.594 67.098 2.786 0 5.55-0.091 8.291-0.271l-0.372 0.020c108.429-0.867 224.773-0.922 336.454 0 2.578 0.201 5.584 0.315 8.615 0.315 46.146 0 86.101-26.507 105.468-65.126l0.309-0.68c13.228-27.107 33.288-66.738 52.967-105.718 35.619-70.479 52.967-104.959 59.636-122.85v-0.325c6.126-16.264 3.036-18.812-3.036-23.15-2.668-1.9-5.994-3.037-9.586-3.037-4.599 0-8.762 1.865-11.775 4.881v0c-0.457 0.493-0.901 1.023-1.318 1.575l-0.038 0.052c-87.298 113.335-223.049 185.641-375.687 185.641-108.035 0-207.61-36.222-287.242-97.184l1.135 0.834q-17.728-13.499-34.101-28.625c-161.017-155.975-212.412-446.401 9.921-676.757 2.812-2.919 4.544-6.896 4.544-11.277 0-8.979-7.276-16.259-16.254-16.264h-0.001zM206.882 806.302c0.027-0.552 0.043-1.198 0.043-1.848 0-21.823-17.52-39.555-39.262-39.897h-0.032l-5.421-1.030c-73.56-10.028-129.64-72.444-129.64-147.958 0-2.553 0.064-5.091 0.191-7.612l-0.014 0.354v-484.893c-0.053-1.124-0.083-2.441-0.083-3.765 0-47.098 38.181-85.279 85.279-85.279 0.716 0 1.429 0.009 2.14 0.026l-0.105-0.002h291.022c-82.729 88.69-133.517 208.111-133.517 339.394 0 139.474 57.322 265.559 149.693 355.982l0.088 0.086c11.981 10.843 24.071 21.252 36.757 30.848 83.952 64.372 190.475 103.155 306.055 103.155 125.606 0 240.514-45.802 328.933-121.615l-0.681 0.57-15.505 30.74c-19.68 39.089-39.793 78.936-52.967 105.772-14.17 28.685-43.222 48.067-76.8 48.067-2.297 0-4.573-0.091-6.825-0.269l0.297 0.019h-1.898c-111.953-1.084-228.784-1.084-337.864 0-1.63 0.1-3.535 0.157-5.453 0.157-35.95 0-67.221-20.029-83.265-49.537l-0.248-0.498c-20.363-35.081-40.784-65.041-63.1-93.442l1.296 1.711c-13.752-13.38-32.554-21.63-53.283-21.63-7.734 0-15.2 1.149-22.237 3.285l0.541-0.141c-12.154 2.439-21.362 12.494-22.491 24.884l-0.008 0.109c0.109 0.828 0.172 1.786 0.172 2.758 0 3.619-0.865 7.035-2.399 10.054l0.058-0.126c-3.693 1.137-7.939 1.792-12.338 1.792-1.536 0-3.053-0.080-4.547-0.235l0.187 0.016h-124.097c-3.578 0-6.723 0-8.945 0zM771.253-64h-4.283c-239.762 1.124-433.692 195.748-433.692 435.666 0 240.614 195.056 435.671 435.671 435.671 0.696 0 1.391-0.002 2.086-0.005h3.037c169.409-0.715 315.772-98.666 386.23-240.897l1.131-2.525c1.046-2.089 1.659-4.551 1.659-7.156 0-8.983-7.282-16.264-16.264-16.264-0.011 0-0.023 0-0.034 0h-263.588c-0.080-0.001-0.175-0.002-0.27-0.002-4.047 0-7.749 1.478-10.595 3.924l0.022-0.018c-23.665 20.668-54.836 33.272-88.95 33.272-2.599 0-5.181-0.073-7.744-0.218l0.355 0.016c-1.903 0.065-4.14 0.102-6.385 0.102-54.786 0-104.428-22.023-140.556-57.698l0.021 0.021c-38.484-37.259-62.373-89.392-62.373-147.106 0-111.972 89.922-202.942 201.49-204.635l0.159-0.002h7.427c3.639-0.262 7.885-0.412 12.166-0.412 53.089 0 100.808 22.991 133.744 59.56l0.143 0.162h-148.439c-8.983 0-16.264 7.282-16.264 16.264v0 179.992c0 8.983 7.282 16.264 16.264 16.264v0h418.426c0.012 0 0.026 0 0.040 0 4.522 0 8.612-1.845 11.56-4.824l0.001-0.001c5.421-5.421 5.421-5.421 4.879-68.147v0c-3.181-238.713-197.437-431.004-436.606-431.004-0.165 0-0.33 0-0.495 0h0.025zM770.928 774.804c-221.776-1.031-401.161-181.052-401.161-402.971 0-222.557 180.418-402.975 402.975-402.975 220.974 0 400.406 177.86 402.948 398.231l0.002 0.24v40.119h-386.060v-147.463h164.757c8.982-0.001 16.263-7.282 16.263-16.264 0-3.172-0.908-6.132-2.478-8.634l0.040 0.068c-37.923-60.404-104.174-99.969-179.667-99.969-4.749 0-9.462 0.157-14.133 0.465l0.635-0.034h-7.102c-129.427 2.041-233.563 107.439-233.563 237.16 0 66.854 27.659 127.249 72.159 170.363l0.062 0.060c43.026 41.346 101.581 66.808 166.084 66.808 0.982 0 1.963-0.006 2.943-0.018l-0.149 0.001c2.639 0.149 5.728 0.234 8.836 0.234 39.808 0 76.363-13.93 105.055-37.182l-0.312 0.245h230.682c-70.048 120.854-198.577 200.971-345.863 201.514h-0.078z" />
17
- <glyph unicode="&#xe907;" glyph-name="slider-wd" horiz-adv-x="1481" d="M370.188 316.518c-0.153-0.006-0.333-0.009-0.514-0.009-7.749 0-14.032 6.282-14.032 14.032 0 7.569 5.992 13.738 13.492 14.021l0.026 0.001c24.603 4.927 44.377 21.855 53.209 44.289l0.169 0.488c6.59 24.726-15.705 45.946-35.57 59.408-31.27 21.174-45.759 43.89-43.282 67.26 4.347 39.356 56.463 60.763 62.399 63.334 1.43 0.538 3.082 0.85 4.807 0.85 7.744 0 14.022-6.278 14.022-14.022 0-5.767-3.481-10.72-8.456-12.874l-0.091-0.035c-10.937-4.347-42.721-21.174-44.825-40.478-1.636-15.144 16.032-30.475 31.129-40.711 49.639-33.56 52.957-67.354 46.741-89.836-12.12-34.32-41.691-59.595-77.773-65.363l-0.565-0.074zM580.896 316.518h-98.156c-7.744 0-14.022 6.278-14.022 14.022v0 235.574c0 7.744 6.278 14.022 14.022 14.022s14.022-6.278 14.022-14.022v-221.552h84.134c7.744 0 14.022-6.278 14.022-14.022s-6.278-14.022-14.022-14.022v0zM621.654 316.518c-7.744 0-14.022 6.278-14.022 14.022v0 235.574c0 7.744 6.278 14.022 14.022 14.022s14.022-6.278 14.022-14.022v0-235.574c0-7.744-6.278-14.022-14.022-14.022v0zM674.892 316.518c-7.744 0-14.022 6.278-14.022 14.022v0 235.574c0.051 4.084 1.84 7.741 4.661 10.271l0.013 0.012c2.631 2.33 6.113 3.753 9.926 3.753 0.224 0 0.447-0.005 0.669-0.015l-0.032 0.001c71.039-2.285 127.768-60.388 127.836-131.756v-0.007c-1.042-70.859-56.999-128.315-127.152-131.751l-0.31-0.012zM688.914 549.708v-202.528c49.372 7.858 86.658 50.13 86.658 101.111 0 0.013 0 0.026 0 0.039v-0.002c0.007 0.452 0.011 0.985 0.011 1.518 0 50.699-37.404 92.661-86.122 99.797l-0.547 0.066zM965.948 316.518h-1.449c-0.643-0.012-1.4-0.019-2.16-0.019-65.891 0-119.632 52.019-122.396 117.229l-0.008 0.25v132.137c0 7.744 6.278 14.022 14.022 14.022v0h112.178c7.744 0 14.022-6.278 14.022-14.022s-6.278-14.022-14.022-14.022h-98.156v-118.395c0-3.459 0-79.132 99.371-89.228 7.446-0.384 13.339-6.515 13.339-14.022 0-7.754-6.286-14.040-14.040-14.040-0.247 0-0.492 0.006-0.735 0.019l0.034-0.001zM965.901 482.448h-142.046c-7.744 0-14.022 6.278-14.022 14.022s6.278 14.022 14.022 14.022h142.046c7.744 0 14.022-6.278 14.022-14.022s-6.278-14.022-14.022-14.022v0zM1113.976 315.957c-36.605 0.871-68.526 20.142-86.964 48.888l-0.254 0.423v-34.729c0-7.744-6.278-14.022-14.022-14.022s-14.022 6.278-14.022 14.022v0 235.574c0 0.033 0 0.072 0 0.111 0 4.147 1.8 7.873 4.661 10.44l0.013 0.012c2.398 2.162 5.591 3.485 9.091 3.485 0.634 0 1.259-0.043 1.87-0.127l-0.071 0.008c37.393-4.674 108.579-32.999 109.841-104.232 0.038-0.992 0.059-2.158 0.059-3.328 0-44.864-31.604-82.346-73.763-91.398l-0.614-0.11c13.635-22.201 37.784-36.785 65.339-36.785 2.487 0 4.946 0.119 7.372 0.351l-0.309-0.024c0.561 0.082 1.208 0.128 1.866 0.128 7.155 0 13.024-5.506 13.602-12.512l0.003-0.049c0.050-0.445 0.079-0.961 0.079-1.484 0-7.212-5.445-13.153-12.448-13.935l-0.064-0.006c-3.419-0.428-7.395-0.682-11.426-0.701h-0.026zM1026.758 548.727v-143.448h0.654c2.851 0 70.111 6.404 68.99 70.111-0.841 47.255-45.152 66.325-69.644 73.336zM740.75-64c-0.028 0-0.060 0-0.093 0-282.77 0-512 229.23-512 512s229.23 512 512 512c282.77 0 512-229.23 512-512 0-0.016 0-0.033 0-0.049v0.002c-0.026-282.717-229.193-511.9-511.901-511.953h-0.005zM740.75 932.002c-0.042 0-0.091 0-0.14 0-267.307 0-484.002-216.695-484.002-484.002s216.695-484.002 484.002-484.002c267.307 0 484.002 216.695 484.002 484.002 0 0.016 0 0.033 0 0.049v-0.002c-0.026 267.237-216.632 483.876-483.854 483.955h-0.008zM1217.601 124.74c-7.739 0.007-14.011 6.282-14.011 14.022 0 3.193 1.067 6.137 2.865 8.494l-0.025-0.034c63.267 82.503 101.383 187.189 101.383 300.778s-38.117 218.274-102.257 301.965l0.873-1.187c-1.778 2.325-2.849 5.274-2.849 8.472 0 7.744 6.278 14.022 14.022 14.022 1.009 0 1.992-0.106 2.941-0.309l-0.092 0.016c150.228-33.093 260.97-165.092 260.97-322.956s-110.742-289.863-258.778-322.55l-2.192-0.406c-0.856-0.208-1.839-0.327-2.85-0.327-0.001 0-0.001 0-0.002 0v0zM1251.768 733.073c52.728-80.52 84.099-179.156 84.099-285.12s-31.371-204.6-85.332-287.129l1.233 2.010c118.558 42.685 201.8 154.181 201.8 285.12s-83.242 242.435-199.694 284.456l-2.106 0.664zM263.899 124.74c-0.014 0-0.031 0-0.048 0-1.011 0-1.994 0.119-2.936 0.345l0.086-0.017c-150.228 33.093-260.97 165.092-260.97 322.956s110.742 289.863 258.778 322.55l2.192 0.406c0.856 0.186 1.84 0.292 2.849 0.292 7.744 0 14.022-6.278 14.022-14.022 0-3.198-1.071-6.147-2.874-8.506l0.025 0.034c-63.267-82.503-101.383-187.189-101.383-300.778s38.117-218.274 102.257-301.965l-0.873 1.187c1.772-2.323 2.84-5.267 2.84-8.46 0-7.74-6.271-14.016-14.010-14.022h-0.001zM229.685 733.073c-118.558-42.685-201.8-154.181-201.8-285.12s83.242-242.435 199.694-284.456l2.106-0.664c-52.728 80.52-84.099 179.156-84.099 285.12s31.371 204.6 85.332 287.129l-1.233-2.010zM1380.306 480.204l-9.348-9.348 28.045-23.37-28.045-23.37 9.348-9.348 37.393 32.719zM66.419 448.047l37.393-32.719 9.348 9.348-28.045 23.37 28.045 23.37-9.348 9.348z" />
18
- <glyph unicode="&#xe908;" glyph-name="form-maker" horiz-adv-x="1101" d="M385.133 479.717h-267.327v249.204h262.796v-249.204zM140.46 502.372h222.018v203.894h-222.018v-203.894zM987.752 348.319h-869.947v95.15h869.947v-95.15zM140.46 370.973h824.637v45.31h-824.637v-45.31zM987.752 99.115h-869.947v212.956h869.947v-212.956zM140.46 121.77h824.637v167.646h-824.637v-167.646zM987.752 620.177h-262.796v108.743h267.327v-108.743zM747.611 642.832h222.018v63.434h-222.018v-63.434zM693.239 620.177h-267.327v108.743h267.327v-108.743zM448.566 642.832h222.018v63.434h-222.018v-63.434zM987.752 479.717h-262.796v99.681h267.327v-99.681zM747.611 502.372h222.018v54.372h-222.018v-54.372zM693.239 479.717h-267.327v99.681h267.327v-99.681zM448.566 502.372h222.018v54.372h-222.018v-54.372zM22.655 3.965h1055.717v838.23h-1055.717v-838.23zM1046.655 810.478v-774.796h-992.283v774.796h992.283z" />
19
- <glyph unicode="&#xe909;" glyph-name="wd-facebook-feed" d="M625.778 709.689c5.689 5.689 17.067 11.378 39.822 11.378h85.333c22.756 0 39.822 17.067 39.822 39.822v147.911c0 22.756-17.067 39.822-39.822 39.822h-125.156c-73.956 0-136.533-22.756-182.044-68.267-45.511-51.2-68.267-113.778-68.267-187.733v-85.333h-102.4c-22.756-5.689-39.822-22.756-39.822-45.511v-159.289c0-22.756 17.067-39.822 39.822-39.822h102.4v-375.467c0-22.756 17.067-39.822 39.822-39.822h164.978c22.756 0 39.822 17.067 39.822 39.822v375.467h125.156c22.756 0 39.822 17.067 39.822 39.822v159.289c0 17.067-5.689 28.444-22.756 34.133-5.689 5.689-11.378 5.689-22.756 5.689h-125.156v73.956c5.689 22.756 11.378 28.444 11.378 34.133zM750.933 897.422v0 0zM603.022 561.778h142.222v-153.6h-142.222c-11.378 0-22.756-11.378-22.756-22.756v-392.533h-159.289v392.533c0 11.378-11.378 22.756-22.756 22.756h-125.156v153.6h119.467c11.378 0 22.756 11.378 22.756 22.756v108.089c5.689 130.844 85.333 210.489 210.489 210.489h125.156v-142.222h-79.644c-22.756 0-51.2 0-73.956-22.756-17.067-17.067-17.067-39.822-17.067-62.578v-91.022c0-11.378 11.378-22.756 22.756-22.756z" />
20
- <glyph unicode="&#xe90a;" glyph-name="wd-instagram-feed" d="M711.111 954.311h-403.911c-164.978 0-307.2-136.533-307.2-307.2v-403.911c0-170.667 136.533-307.2 307.2-307.2h403.911c170.667 0 307.2 136.533 307.2 307.2v403.911c0 170.667-136.533 307.2-307.2 307.2zM972.8 243.2c0-147.911-119.467-261.689-261.689-261.689h-403.911c-147.911 0-261.689 119.467-261.689 261.689v403.911c0 147.911 119.467 261.689 261.689 261.689h403.911c147.911 0 261.689-119.467 261.689-261.689v-403.911zM512 686.933c-130.844 0-238.933-108.089-238.933-238.933s108.089-238.933 238.933-238.933c130.844 0 238.933 108.089 238.933 238.933s-108.089 238.933-238.933 238.933zM512 248.889c-108.089 0-193.422 85.333-193.422 193.422s85.333 199.111 193.422 199.111 193.422-85.333 193.422-193.422-85.333-199.111-193.422-199.111zM836.267 738.133c0-18.851-15.282-34.133-34.133-34.133s-34.133 15.282-34.133 34.133c0 18.851 15.282 34.133 34.133 34.133s34.133-15.282 34.133-34.133z" />
21
  </font></defs></svg>
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Generated by IcoMoon</metadata>
5
+ <defs>
6
+ <font id="twbb-icons" horiz-adv-x="1024">
7
+ <font-face units-per-em="1024" ascent="960" descent="-64" />
8
+ <missing-glyph horiz-adv-x="1024" />
9
+ <glyph unicode="&#x20;" horiz-adv-x="512" d="" />
10
+ <glyph unicode="&#xe900;" glyph-name="share-buttons" horiz-adv-x="663" d="M420.793 222.473c-7.286 3.871-15.914 6.184-25.074 6.285h-0.032c-15.75-1.033-29.684-8.054-39.692-18.785l-0.032-0.035-50.176 29.272c3.967 7.634 6.293 16.668 6.293 26.245 0 0.332-0.003 0.663-0.008 0.994l0.001-0.050c-0.199 8.291-1.709 16.165-4.33 23.512l0.163-0.525 50.176 29.272c9.006-11.070 22.431-18.245 37.547-18.818l0.094-0.003c9.191 0.104 17.819 2.417 25.409 6.431l-0.303-0.146c10.769 6.738 18.873 16.877 22.877 28.89l0.11 0.382c1.319 4.179 2.078 8.986 2.078 13.969 0 8.704-2.317 16.866-6.368 23.904l0.124-0.233c-8.559 14.651-23.969 24.485-41.722 25.103l-0.086 0.002c-9.191-0.099-17.82-2.413-25.408-6.431l0.302 0.146c-10.771-6.736-18.876-16.876-22.877-28.891l-0.11-0.382c-0.933-3.708-1.468-7.965-1.468-12.347 0-6.838 1.304-13.371 3.676-19.365l-0.124 0.356-50.176-29.272c-11.552 16.494-30.468 27.145-51.872 27.145-34.716 0-62.888-28.021-63.133-62.679v-0.023c0.864-34.301 28.445-61.883 62.665-62.745l0.081-0.002c20.353 0.442 38.361 10.106 50.070 24.966l0.106 0.139 52.259-29.272c-2.081-5.29-3.287-11.416-3.287-17.824 0-18.073 9.596-33.906 23.971-42.679l0.22-0.125c7.285-3.872 15.914-6.186 25.074-6.285h0.031c18.32 1.091 34.186 10.709 43.798 24.906l0.128 0.2c2.599 5.983 4.111 12.952 4.111 20.275 0 18.78-9.947 35.237-24.859 44.39l-0.227 0.129zM362.249 358.382c2.498 9.148 8.557 16.567 16.557 20.816l0.18 0.087c4.899 2.247 10.593 3.739 16.582 4.158l0.155 0.009c0.139 0.002 0.304 0.003 0.469 0.003 12.875 0 24.208-6.6 30.801-16.602l0.086-0.138c3.139-5.567 4.988-12.222 4.988-19.309 0-2.789-0.286-5.511-0.831-8.138l0.045 0.258c-2.493-9.15-8.554-16.571-16.557-20.817l-0.18-0.087c-5.137-3.229-11.382-5.145-18.075-5.145-12.847 0-24.045 7.058-29.928 17.508l-0.089 0.172c-3.896 4.559-6.267 10.524-6.267 17.043 0 3.689 0.759 7.201 2.131 10.388l-0.065-0.171zM247.243 216.188c-27.711 0-50.176 22.465-50.176 50.176s22.465 50.176 50.176 50.176c27.711 0 50.176-22.465 50.176-50.176v0c-0.411-27.537-22.636-49.749-50.139-50.14h-0.037zM427.079 161.81c-5.972-10.622-17.171-17.68-30.017-17.68-6.693 0-12.939 1.916-18.218 5.229l0.143-0.084c-10.538 6.1-17.514 17.321-17.514 30.171 0 6.62 1.852 12.808 5.065 18.074l-0.087-0.153c6.678 10.14 18.012 16.74 30.887 16.74 0.165 0 0.33-0.001 0.494-0.003h-0.025c0.104 0.001 0.228 0.002 0.351 0.002 18.858 0 34.145-15.287 34.145-34.145 0-6.729-1.946-13.003-5.307-18.29l0.082 0.139zM496.040 960h-496.040v-1024h662.599v836.22zM499.571 928.221l131.107-155.895h-131.072zM646.638-42.814h-628.983v985.159h460.694v-187.78h159.462l5.332-797.237zM46.045 758.060h325.985v-21.257h-325.985v21.257zM46.045 843.087h191.347v-21.257h-191.347v21.257zM46.045 683.626h435.836v-21.257h-435.836v21.257zM46.045 612.793h566.908v-21.257h-566.908v21.257zM46.045 474.589v-418.11h566.908v418.11zM591.695 453.402v-375.596h-524.465v375.596z" />
11
+ <glyph unicode="&#xe901;" glyph-name="pricing-table" horiz-adv-x="1439" d="M1439.214 175.298v0 721.355h-457.587v63.347h-524.182v-66.842h-457.446v-890.315h457.446v-66.842h524.182v66.842h457.587zM28.142 175.298h429.303v-147.809h-429.197zM1414.603 200.015h-432.975v668.495h429.444v-668.601zM482.092 935.283h475.065v-756.489h-475.065v756.489zM457.375 199.839h-429.127v668.672h429.197v-668.601zM482.092 2.772v0 151.411h475.065v-193.465h-475.065zM981.628 175.298h429.444v-147.809h-429.444zM70.374 769.995h337.814v-21.116h-337.814v21.116zM87.993 678.471h302.61v-21.116h-302.61v21.116zM133.72 590.513h211.121v-21.116h-211.121v21.116zM1027.531 769.995h337.814v-21.116h-337.814v21.116zM1045.116 678.471h302.61v-21.116h-302.61v21.116zM1090.878 590.513h211.121v-21.116h-211.121v21.116zM548.935 850.926h337.814v-21.116h-337.814v21.116zM566.554 759.437h302.61v-21.116h-302.61v21.116zM612.281 674.975h211.121v-21.116h-211.121v21.116zM1104.967 122.509h182.978v-45.762h-182.978v45.762zM147.809 122.509h182.978v-45.762h-182.978v45.762zM626.37 69.72h182.978v-45.762h-182.978v45.762zM711.362 382.146c1.126-0.11 2.433-0.173 3.756-0.173 7.739 0 14.975 2.152 21.143 5.89l-0.182-0.102c4.305 3.206 7.063 8.281 7.063 14 0 0.044 0 0.087 0 0.13v-0.007c0.005 0.17 0.008 0.369 0.008 0.569 0 3.871-1.149 7.474-3.125 10.485l0.045-0.073c-2.221 3.186-4.958 5.844-8.115 7.911l-0.112 0.069c-3.405 2.27-7.31 4.343-11.419 6.019l-0.446 0.161q-6.744 2.754-13.806 5.261t-13.594 5.614c-4.586 2.096-8.538 4.623-12.082 7.619l0.076-0.063c-3.471 2.929-6.341 6.441-8.487 10.404l-0.094 0.189c-2.104 4.202-3.336 9.155-3.336 14.396 0 0.364 0.006 0.726 0.018 1.088l-0.001-0.053c-0.018 0.43-0.028 0.935-0.028 1.442 0 9.712 3.699 18.56 9.765 25.212l-0.027-0.030c7.375 7.25 17.167 12.062 28.058 13.12l0.19 0.015v26.271h18.962v-25.6c6.794-0.274 13.226-1.173 19.437-2.644l-0.687 0.137c5.548-1.249 10.131-2.585 14.602-4.161l-0.901 0.277-4.343-17.655q-5.473 2.048-13.7 4.237c-5.638 1.381-12.111 2.173-18.769 2.173-0.627 0-1.252-0.007-1.875-0.021l0.093 0.002c-0.678 0.045-1.47 0.071-2.267 0.071-6.999 0-13.534-1.985-19.073-5.422l0.155 0.089c-4.513-3.129-7.432-8.283-7.432-14.118 0-0.263 0.006-0.525 0.018-0.785l-0.001 0.037c-0.006-0.166-0.009-0.362-0.009-0.558 0-3.062 0.802-5.937 2.207-8.426l-0.044 0.086c1.635-2.617 3.738-4.786 6.209-6.449l0.076-0.048c2.797-1.93 5.994-3.66 9.373-5.034l0.337-0.121q5.614-2.295 12.465-4.802 8.898-3.531 16.914-7.062c5.396-2.429 10.047-5.372 14.218-8.869l-0.094 0.076c3.959-3.364 7.214-7.42 9.606-11.997l0.105-0.22c2.243-4.63 3.554-10.070 3.554-15.817 0-0.46-0.008-0.919-0.025-1.375l0.002 0.066c0.022-0.473 0.035-1.027 0.035-1.584 0-9.54-3.753-18.204-9.864-24.595l0.013 0.013c-8.107-7.183-18.642-11.791-30.233-12.458l-0.134-0.006v-29.484h-18.962v28.778c-9.285 0.037-18.254 1.324-26.768 3.7l0.709-0.169c-5.813 1.654-10.817 3.638-15.566 6.051l0.488-0.225 5.72 17.126c4.552-2.129 10.018-4.152 15.666-5.742l0.789-0.19c6.458-1.7 13.872-2.676 21.514-2.676 0.779 0 1.555 0.010 2.329 0.030l-0.114-0.002zM233.225 346.165c0.881-0.087 1.905-0.136 2.941-0.136 6.005 0 11.62 1.665 16.41 4.559l-0.142-0.080c3.358 2.497 5.51 6.453 5.51 10.912 0 0.074-0.001 0.148-0.002 0.222v-0.011c0.004 0.126 0.006 0.275 0.006 0.425 0 3.020-0.898 5.829-2.442 8.177l0.035-0.056c-1.726 2.48-3.851 4.549-6.304 6.161l-0.087 0.054c-2.655 1.765-5.7 3.377-8.904 4.677l-0.348 0.125q-5.261 2.119-10.593 4.096t-10.593 4.343c-3.575 1.625-6.655 3.586-9.418 5.912l0.061-0.050c-2.709 2.313-4.944 5.088-6.6 8.217l-0.073 0.152c-1.634 3.269-2.59 7.121-2.59 11.197 0 0.284 0.005 0.568 0.014 0.85l-0.001-0.041c-0.014 0.333-0.021 0.723-0.021 1.116 0 7.562 2.878 14.452 7.599 19.635l-0.021-0.023c5.735 5.641 13.346 9.391 21.813 10.228l0.15 0.012v20.48h14.76v-19.915c5.283-0.211 10.286-0.908 15.118-2.049l-0.535 0.106c4.297-0.982 7.839-2.026 11.294-3.254l-0.701 0.217-3.531-13.877q-4.273 1.589-10.593 3.284c-4.412 1.086-9.478 1.709-14.689 1.709-0.472 0-0.942-0.005-1.412-0.015l0.070 0.001c-0.514 0.033-1.114 0.052-1.718 0.052-5.451 0-10.541-1.544-14.857-4.218l0.121 0.070c-3.524-2.438-5.803-6.458-5.803-11.011 0-0.201 0.004-0.401 0.013-0.599l-0.001 0.028c-0.007-0.157-0.010-0.34-0.010-0.525 0-2.401 0.632-4.655 1.74-6.603l-0.035 0.066c1.275-2.049 2.917-3.747 4.849-5.047l0.059-0.037c2.176-1.493 4.664-2.833 7.293-3.896l0.263-0.094q4.343-1.766 9.71-3.743 7.062-2.684 13.171-5.508c4.182-1.896 7.786-4.188 11.017-6.909l-0.071 0.058c3.082-2.625 5.616-5.79 7.475-9.362l0.081-0.172c1.812-3.664 2.871-7.978 2.871-12.539 0-0.284-0.004-0.567-0.012-0.85l0.001 0.041c0.017-0.362 0.027-0.787 0.027-1.213 0-7.438-2.93-14.192-7.698-19.171l0.009 0.010c-6.315-5.597-14.523-9.187-23.554-9.706l-0.104-0.005v-22.952h-14.76v22.422c-7.235 0.030-14.222 1.033-20.856 2.886l0.552-0.132c-4.521 1.333-8.408 2.918-12.093 4.836l0.37-0.175 4.449 13.347c3.546-1.66 7.804-3.237 12.203-4.478l0.615-0.148c5.053-1.336 10.853-2.104 16.833-2.104 0.587 0 1.173 0.007 1.756 0.022l-0.086-0.002zM1197.374 346.165c0.881-0.087 1.905-0.136 2.941-0.136 6.005 0 11.62 1.665 16.41 4.559l-0.142-0.080c3.358 2.497 5.51 6.453 5.51 10.912 0 0.074-0.001 0.148-0.002 0.222v-0.011c0.004 0.126 0.006 0.275 0.006 0.425 0 3.020-0.898 5.829-2.442 8.177l0.035-0.056c-1.726 2.48-3.851 4.549-6.304 6.161l-0.087 0.054c-2.655 1.765-5.7 3.377-8.904 4.677l-0.348 0.125q-5.261 2.119-10.593 4.096t-10.593 4.343c-3.575 1.625-6.655 3.586-9.418 5.912l0.061-0.050c-2.709 2.313-4.944 5.088-6.6 8.217l-0.073 0.152c-1.634 3.269-2.59 7.121-2.59 11.197 0 0.284 0.005 0.568 0.014 0.85l-0.001-0.041c-0.014 0.333-0.021 0.723-0.021 1.116 0 7.562 2.878 14.452 7.599 19.635l-0.021-0.023c5.735 5.641 13.346 9.391 21.813 10.228l0.15 0.012v20.48h14.76v-19.915c5.283-0.211 10.286-0.908 15.118-2.049l-0.535 0.106c4.297-0.982 7.839-2.026 11.294-3.254l-0.701 0.217-3.531-13.877q-4.273 1.589-10.593 3.284c-4.412 1.086-9.478 1.709-14.689 1.709-0.472 0-0.942-0.005-1.412-0.015l0.070 0.001c-0.514 0.033-1.114 0.052-1.718 0.052-5.451 0-10.541-1.544-14.857-4.218l0.121 0.070c-3.524-2.438-5.803-6.458-5.803-11.011 0-0.201 0.004-0.401 0.013-0.599l-0.001 0.028c-0.007-0.157-0.010-0.34-0.010-0.525 0-2.401 0.632-4.655 1.74-6.603l-0.035 0.066c1.275-2.049 2.917-3.747 4.849-5.047l0.059-0.037c2.176-1.493 4.664-2.833 7.293-3.896l0.263-0.094q4.343-1.766 9.71-3.743 7.062-2.684 13.171-5.508c4.182-1.896 7.786-4.188 11.017-6.909l-0.071 0.058c3.082-2.625 5.616-5.79 7.475-9.362l0.081-0.172c1.812-3.664 2.871-7.978 2.871-12.539 0-0.284-0.004-0.567-0.012-0.85l0.001 0.041c0.017-0.362 0.027-0.787 0.027-1.213 0-7.438-2.93-14.192-7.698-19.171l0.009 0.010c-6.315-5.597-14.523-9.187-23.554-9.706l-0.104-0.005v-22.952h-14.76v22.422c-7.235 0.030-14.222 1.033-20.856 2.886l0.552-0.132c-4.521 1.333-8.408 2.918-12.093 4.836l0.37-0.175 4.449 13.347c3.546-1.66 7.804-3.237 12.203-4.478l0.615-0.148c5.053-1.336 10.853-2.104 16.833-2.104 0.587 0 1.173 0.007 1.756 0.022l-0.086-0.002z" />
12
+ <glyph unicode="&#xe902;" glyph-name="posts" horiz-adv-x="670" d="M496.040 573.775h173.621v-46.045h-173.621v46.045zM248.020 605.661h226.763v-21.257h-226.763v21.257zM248.020 665.9h421.641v-21.257h-421.641v21.257zM248.020 548.988h226.763v-21.257h-226.763v21.257zM3.531 662.369v0l-3.531-138.169h152.364v138.169zM24.717 545.457v95.726h109.85v-95.656zM496.040 867.875h173.621v-46.045h-173.621v46.045zM248.020 903.292h226.763v-21.257h-226.763v21.257zM248.020 960h421.641v-21.257h-421.641v21.257zM248.020 843.087h226.763v-21.257h-226.763v21.257zM3.531 818.264h152.364v141.736h-152.364zM134.638 938.743v-95.656h-109.921v95.726zM496.040 279.711h173.621v-46.045h-173.621v46.045zM248.020 311.596h226.763v-21.257h-226.763v21.257zM248.020 371.836h421.641v-21.257h-421.641v21.257zM248.020 254.888h226.763v-21.257h-226.763v21.257zM3.531 368.269v0l-3.531-138.169h152.364v138.169zM24.717 251.357v95.726h109.85v-95.656zM496.040-14.389h173.621v-46.045h-173.621v46.045zM248.020 17.496h226.763v-21.257h-226.763v21.257zM248.020 77.736h421.641v-21.257h-421.641v21.257zM248.020-39.212h226.763v-21.257h-226.763v21.257zM3.531 74.169v0l-3.531-138.169h152.364v138.169zM24.717-42.743v95.726h109.85v-95.656z" />
13
+ <glyph unicode="&#xe903;" glyph-name="flip-box" horiz-adv-x="663" d="M499.606 960h-499.606v-1024h662.599v832.653zM637.775 750.963v-790.246h-620.12v978.097h460.694v-187.851zM499.606 772.149v156.072l131.107-155.895zM347.242 414.349h53.142v-17.726h-53.142v17.726zM449.995 414.349h53.142v-17.726h-53.142v17.726zM152.364 414.349h53.142v-17.726h-53.142v17.726zM109.85 414.349h17.726v-17.726h-17.726v17.726zM527.96 414.349h21.257v-17.726h-21.257v17.726zM248.020 414.349h53.142v-17.726h-53.142v17.726zM325.985 354.11l-223.232-205.506-3.531-3.531h457.092l-230.294 209.037zM155.895 169.86l170.090 155.895 170.090-155.895zM106.284 658.838l219.666-201.975 205.506 187.78 21.186 21.186-446.358-6.991zM325.95 485.217l-170.055 155.966h340.145z" />
14
+ <glyph unicode="&#xe904;" glyph-name="countdown" horiz-adv-x="3050" d="M1491.957 558.108h60.559v-44.043h-60.559v44.043zM1491.957 381.935h60.559v-44.043h-60.559v44.043zM44.043 514.065h44.043v-132.129h-44.043v132.129zM589.075 514.065h44.043v-132.129h-44.043v132.129zM765.247 514.065h44.043v-132.129h-44.043v132.129zM1310.28 514.065h44.043v-132.129h-44.043v132.129zM1690.151 514.065h44.043v-132.129h-44.043v132.129zM2235.183 514.065h44.043v-132.129h-44.043v132.129zM2416.86 514.065h44.043v-132.129h-44.043v132.129zM2961.892 514.065h44.043v-132.129h-44.043v132.129zM649.634-41.978h-627.613v467.957h-22.022v-489.978h666.151v489.978h-16.516v-467.957zM22.022 937.978h627.613v-467.957h22.022v489.978h-666.151v-489.978h16.516v467.957zM1370.839-41.978h-627.613v467.957h-16.516v-489.978h666.151v489.978h-22.022zM743.226 937.978h627.613v-467.957h22.022v489.978h-666.151v-489.978h16.516v467.957zM2301.247-41.978h-627.613v467.957h-16.516v-489.978h666.151v489.978h-22.022zM1679.14 937.978h627.613v-467.957h22.022v489.978h-666.151v-489.978h16.516v467.957zM2400.344 937.978h627.613v-467.957h22.022v489.978h-666.151v-489.978h16.516v467.957zM3022.452-41.978h-627.613v467.957h-16.516v-489.978h666.151v489.978h-22.022zM22.022 470.022h627.613v-44.043h-627.613v44.043zM2400.344 470.022h627.613v-44.043h-627.613v44.043zM743.226 470.022h627.613v-44.043h-627.613v44.043zM1679.14 470.022h627.613v-44.043h-627.613v44.043zM924.903 492.043c-0.903 9.645-1.419 20.856-1.419 32.188 0 56.273 12.704 109.579 35.399 157.206l-0.949-2.211c16.626 36.298 52.639 61.059 94.435 61.059 3.581 0 7.119-0.182 10.606-0.536l-0.438 0.036c0.446 0.006 0.973 0.010 1.501 0.010 44.086 0 82.528-24.17 102.796-59.981l0.306-0.587c20.922-55.080 33.036-118.767 33.036-185.284 0-0.668-0.001-1.335-0.004-2.002v0.103h71.57c0.346 6.26 0.543 13.586 0.543 20.959 0 75.481-20.656 146.138-56.623 206.626l1.026-1.864c-29.245 49.918-82.62 82.91-143.701 82.91-3.676 0-7.325-0.12-10.942-0.355l0.492 0.026c-3.083 0.197-6.684 0.309-10.312 0.309-59.827 0-112.535-30.479-143.444-76.757l-0.394-0.627c-31.822-58.531-50.531-128.172-50.531-202.183 0-10.219 0.357-20.355 1.058-30.396l-0.076 1.353zM1194.667 409.462c0.002-0.481 0.003-1.050 0.003-1.619 0-59.052-12.149-115.267-34.083-166.282l1.048 2.74c-20.108-36.861-58.583-61.451-102.802-61.451-18.694 0-36.361 4.395-52.025 12.208l0.676-0.305c-21.657 10.759-38.789 27.892-49.266 48.921l-0.283 0.627c-20.897 49.982-33.035 108.057-33.035 168.968 0 0.597 0.001 1.194 0.003 1.791v-0.092h-71.57c-0.044-2.213-0.070-4.822-0.070-7.436 0-74.42 20.486-144.055 56.126-203.574l-1.002 1.806c35.526-50.865 93.79-83.723 159.729-83.723 41.129 0 79.273 12.784 110.674 34.595l-0.64-0.42c17.427 11.986 32.056 26.616 43.676 43.479l0.367 0.564c31.354 56.135 49.816 123.159 49.816 194.495 0 5.173-0.097 10.323-0.29 15.449l0.022-0.74h-77.075zM1849.806 492.043c-0.903 9.645-1.419 20.856-1.419 32.188 0 56.273 12.704 109.579 35.399 157.206l-0.949-2.211c16.626 36.298 52.639 61.059 94.435 61.059 3.581 0 7.119-0.182 10.606-0.536l-0.438 0.036c0.446 0.006 0.973 0.010 1.501 0.010 44.086 0 82.528-24.17 102.796-59.981l0.306-0.587c20.922-55.080 33.036-118.767 33.036-185.284 0-0.668-0.001-1.335-0.004-2.002v0.103h71.57c0.346 6.26 0.543 13.586 0.543 20.959 0 75.481-20.656 146.138-56.623 206.626l1.026-1.864c-29.245 49.918-82.62 82.91-143.701 82.91-3.676 0-7.325-0.12-10.942-0.355l0.492 0.026c-3.083 0.197-6.684 0.309-10.312 0.309-59.827 0-112.535-30.479-143.444-76.757l-0.394-0.627c-31.822-58.531-50.531-128.172-50.531-202.183 0-10.219 0.357-20.355 1.058-30.396l-0.076 1.353zM2119.57 409.462c0.002-0.481 0.003-1.050 0.003-1.619 0-59.052-12.149-115.267-34.083-166.282l1.048 2.74c-20.108-36.861-58.583-61.451-102.802-61.451-18.694 0-36.361 4.395-52.025 12.208l0.676-0.305c-21.657 10.759-38.789 27.892-49.266 48.921l-0.283 0.627c-20.897 49.982-33.035 108.057-33.035 168.968 0 0.597 0.001 1.194 0.003 1.791v-0.092h-71.57c-0.044-2.213-0.070-4.822-0.070-7.436 0-74.42 20.486-144.055 56.126-203.574l-1.002 1.806c35.526-50.865 93.79-83.723 159.729-83.723 41.129 0 79.273 12.784 110.674 34.595l-0.64-0.42c17.427 11.986 32.056 26.616 43.676 43.479l0.367 0.564c31.354 56.135 49.816 123.159 49.816 194.495 0 5.173-0.097 10.323-0.29 15.449l0.022-0.74h-77.075zM2576.516 492.043c-0.903 9.645-1.419 20.856-1.419 32.188 0 56.273 12.704 109.579 35.399 157.206l-0.949-2.211c16.626 36.298 52.639 61.059 94.435 61.059 3.581 0 7.119-0.182 10.606-0.536l-0.438 0.036c0.446 0.006 0.973 0.010 1.501 0.010 44.086 0 82.528-24.17 102.796-59.981l0.306-0.587c20.922-55.080 33.036-118.767 33.036-185.284 0-0.668-0.001-1.335-0.004-2.002v0.103h71.57c0.346 6.26 0.543 13.586 0.543 20.959 0 75.481-20.656 146.138-56.623 206.626l1.026-1.864c-29.245 49.918-82.62 82.91-143.701 82.91-3.676 0-7.325-0.12-10.942-0.355l0.492 0.026c-3.083 0.197-6.684 0.309-10.312 0.309-59.827 0-112.535-30.479-143.444-76.757l-0.394-0.627c-31.822-58.531-50.531-128.172-50.531-202.183 0-10.219 0.357-20.355 1.058-30.396l-0.076 1.353zM2846.28 409.462c0.002-0.481 0.003-1.050 0.003-1.619 0-59.052-12.149-115.267-34.083-166.282l1.048 2.74c-20.108-36.861-58.583-61.451-102.802-61.451-18.694 0-36.361 4.395-52.025 12.208l0.676-0.305c-21.657 10.759-38.789 27.892-49.266 48.921l-0.283 0.627c-20.897 49.982-33.035 108.057-33.035 168.968 0 0.597 0.001 1.194 0.003 1.791v-0.092h-71.57c-0.044-2.213-0.070-4.822-0.070-7.436 0-74.42 20.486-144.055 56.126-203.574l-1.002 1.806c35.526-50.865 93.79-83.723 159.729-83.723 41.129 0 79.273 12.784 110.674 34.595l-0.64-0.42c17.427 11.986 32.056 26.616 43.676 43.479l0.367 0.564c31.354 56.135 49.816 123.159 49.816 194.495 0 5.173-0.097 10.323-0.29 15.449l0.022-0.74h-77.075zM313.806 409.462h71.57v-291.785h-71.57v291.785zM297.29 706.753c5.505 5.505 16.516 11.011 22.022 16.516 0-33.032-5.505-71.57-5.505-104.602v-132.129h71.57v313.806h-60.559l-165.161-126.624 38.538-49.548c29.979 29.099 62.32 56.2 96.552 80.838l2.545 1.743z" />
15
+ <glyph unicode="&#xe905;" glyph-name="call-to-action" horiz-adv-x="665" d="M0 960v-1024h665.070v1024zM21.186-39.283v974.566h619.343v-974.566h-619.343zM112.605 643.302h429.303v-21.116h-429.303v21.116zM112.605 544.786h429.303v-21.116h-429.303v21.116zM112.605 432.181h429.303v-21.116h-429.303v21.116zM214.652 769.995h232.236v-21.116h-232.236v21.116zM239.298 168.271h175.951v-45.762h-175.951v45.762zM555.502 100.97l-209.178 109.003 61.864-226.834 38.276 61.864 47.139-58.933 41.242 32.415-47.139 58.933zM511.294 21.416l-17.655-14.724-52.966 64.794-29.449-50.070-41.242 159.073 147.315-76.588-55.967-17.655zM369.876 180.524l147.279-76.588-55.967-17.655 50.070-64.83-17.655-14.724-50.070 64.794-32.38-50.070z" />
16
+ <glyph unicode="&#xe906;" glyph-name="photo-gallery" horiz-adv-x="1209" d="M120.139 1.925c-0.597-0.011-1.301-0.017-2.007-0.017-65.153 0-117.97 52.817-117.97 117.97 0 1.264 0.020 2.524 0.059 3.779l-0.005-0.183v484.080c-0.13 2.562-0.204 5.564-0.204 8.583 0 91.281 67.543 166.787 155.377 179.266l0.963 0.112 4.879 0.976c4.494 0.581 8.573 1.762 12.363 3.472l-0.274-0.11c0.564 1.459 0.891 3.148 0.891 4.913 0 0.677-0.048 1.342-0.141 1.993l0.009-0.075c-0.083 0.834-0.13 1.802-0.13 2.781 0 7.761 2.976 14.826 7.848 20.118l-0.019-0.021c6.765 5.9 15.672 9.498 25.419 9.498 1.934 0 3.836-0.142 5.694-0.415l-0.211 0.025h126.59c2.184 0.32 4.706 0.503 7.271 0.503 12.394 0 23.79-4.274 32.793-11.429l-0.108 0.083c7.257-7.803 11.711-18.299 11.711-29.834 0-0.051 0-0.103 0-0.154v0.008c3.376-0.834 7.252-1.312 11.239-1.312 10.56 0 20.337 3.355 28.323 9.057l-0.148-0.101c20.039 25.414 39.526 53.938 57.042 83.76l1.944 3.58c21.248 40.183 62.778 67.098 110.594 67.098 2.786 0 5.55-0.091 8.291-0.271l-0.372 0.020c108.429-0.867 224.773-0.922 336.454 0 2.578 0.201 5.584 0.315 8.615 0.315 46.146 0 86.101-26.507 105.468-65.126l0.309-0.68c13.228-27.107 33.288-66.738 52.967-105.718 35.619-70.479 52.967-104.959 59.636-122.85v-0.325c6.126-16.264 3.036-18.812-3.036-23.15-2.668-1.9-5.994-3.037-9.586-3.037-4.599 0-8.762 1.865-11.775 4.881v0c-0.457 0.493-0.901 1.023-1.318 1.575l-0.038 0.052c-87.298 113.335-223.049 185.641-375.687 185.641-108.035 0-207.61-36.222-287.242-97.184l1.135 0.834q-17.728-13.499-34.101-28.625c-161.017-155.975-212.412-446.401 9.921-676.757 2.812-2.919 4.544-6.896 4.544-11.277 0-8.979-7.276-16.259-16.254-16.264h-0.001zM206.882 806.302c0.027-0.552 0.043-1.198 0.043-1.848 0-21.823-17.52-39.555-39.262-39.897h-0.032l-5.421-1.030c-73.56-10.028-129.64-72.444-129.64-147.958 0-2.553 0.064-5.091 0.191-7.612l-0.014 0.354v-484.893c-0.053-1.124-0.083-2.441-0.083-3.765 0-47.098 38.181-85.279 85.279-85.279 0.716 0 1.429 0.009 2.14 0.026l-0.105-0.002h291.022c-82.729 88.69-133.517 208.111-133.517 339.394 0 139.474 57.322 265.559 149.693 355.982l0.088 0.086c11.981 10.843 24.071 21.252 36.757 30.848 83.952 64.372 190.475 103.155 306.055 103.155 125.606 0 240.514-45.802 328.933-121.615l-0.681 0.57-15.505 30.74c-19.68 39.089-39.793 78.936-52.967 105.772-14.17 28.685-43.222 48.067-76.8 48.067-2.297 0-4.573-0.091-6.825-0.269l0.297 0.019h-1.898c-111.953-1.084-228.784-1.084-337.864 0-1.63 0.1-3.535 0.157-5.453 0.157-35.95 0-67.221-20.029-83.265-49.537l-0.248-0.498c-20.363-35.081-40.784-65.041-63.1-93.442l1.296 1.711c-13.752-13.38-32.554-21.63-53.283-21.63-7.734 0-15.2 1.149-22.237 3.285l0.541-0.141c-12.154 2.439-21.362 12.494-22.491 24.884l-0.008 0.109c0.109 0.828 0.172 1.786 0.172 2.758 0 3.619-0.865 7.035-2.399 10.054l0.058-0.126c-3.693 1.137-7.939 1.792-12.338 1.792-1.536 0-3.053-0.080-4.547-0.235l0.187 0.016h-124.097c-3.578 0-6.723 0-8.945 0zM771.253-64h-4.283c-239.762 1.124-433.692 195.748-433.692 435.666 0 240.614 195.056 435.671 435.671 435.671 0.696 0 1.391-0.002 2.086-0.005h3.037c169.409-0.715 315.772-98.666 386.23-240.897l1.131-2.525c1.046-2.089 1.659-4.551 1.659-7.156 0-8.983-7.282-16.264-16.264-16.264-0.011 0-0.023 0-0.034 0h-263.588c-0.080-0.001-0.175-0.002-0.27-0.002-4.047 0-7.749 1.478-10.595 3.924l0.022-0.018c-23.665 20.668-54.836 33.272-88.95 33.272-2.599 0-5.181-0.073-7.744-0.218l0.355 0.016c-1.903 0.065-4.14 0.102-6.385 0.102-54.786 0-104.428-22.023-140.556-57.698l0.021 0.021c-38.484-37.259-62.373-89.392-62.373-147.106 0-111.972 89.922-202.942 201.49-204.635l0.159-0.002h7.427c3.639-0.262 7.885-0.412 12.166-0.412 53.089 0 100.808 22.991 133.744 59.56l0.143 0.162h-148.439c-8.983 0-16.264 7.282-16.264 16.264v0 179.992c0 8.983 7.282 16.264 16.264 16.264v0h418.426c0.012 0 0.026 0 0.040 0 4.522 0 8.612-1.845 11.56-4.824l0.001-0.001c5.421-5.421 5.421-5.421 4.879-68.147v0c-3.181-238.713-197.437-431.004-436.606-431.004-0.165 0-0.33 0-0.495 0h0.025zM770.928 774.804c-221.776-1.031-401.161-181.052-401.161-402.971 0-222.557 180.418-402.975 402.975-402.975 220.974 0 400.406 177.86 402.948 398.231l0.002 0.24v40.119h-386.060v-147.463h164.757c8.982-0.001 16.263-7.282 16.263-16.264 0-3.172-0.908-6.132-2.478-8.634l0.040 0.068c-37.923-60.404-104.174-99.969-179.667-99.969-4.749 0-9.462 0.157-14.133 0.465l0.635-0.034h-7.102c-129.427 2.041-233.563 107.439-233.563 237.16 0 66.854 27.659 127.249 72.159 170.363l0.062 0.060c43.026 41.346 101.581 66.808 166.084 66.808 0.982 0 1.963-0.006 2.943-0.018l-0.149 0.001c2.639 0.149 5.728 0.234 8.836 0.234 39.808 0 76.363-13.93 105.055-37.182l-0.312 0.245h230.682c-70.048 120.854-198.577 200.971-345.863 201.514h-0.078z" />
17
+ <glyph unicode="&#xe907;" glyph-name="slider-wd" horiz-adv-x="1481" d="M370.188 316.518c-0.153-0.006-0.333-0.009-0.514-0.009-7.749 0-14.032 6.282-14.032 14.032 0 7.569 5.992 13.738 13.492 14.021l0.026 0.001c24.603 4.927 44.377 21.855 53.209 44.289l0.169 0.488c6.59 24.726-15.705 45.946-35.57 59.408-31.27 21.174-45.759 43.89-43.282 67.26 4.347 39.356 56.463 60.763 62.399 63.334 1.43 0.538 3.082 0.85 4.807 0.85 7.744 0 14.022-6.278 14.022-14.022 0-5.767-3.481-10.72-8.456-12.874l-0.091-0.035c-10.937-4.347-42.721-21.174-44.825-40.478-1.636-15.144 16.032-30.475 31.129-40.711 49.639-33.56 52.957-67.354 46.741-89.836-12.12-34.32-41.691-59.595-77.773-65.363l-0.565-0.074zM580.896 316.518h-98.156c-7.744 0-14.022 6.278-14.022 14.022v0 235.574c0 7.744 6.278 14.022 14.022 14.022s14.022-6.278 14.022-14.022v-221.552h84.134c7.744 0 14.022-6.278 14.022-14.022s-6.278-14.022-14.022-14.022v0zM621.654 316.518c-7.744 0-14.022 6.278-14.022 14.022v0 235.574c0 7.744 6.278 14.022 14.022 14.022s14.022-6.278 14.022-14.022v0-235.574c0-7.744-6.278-14.022-14.022-14.022v0zM674.892 316.518c-7.744 0-14.022 6.278-14.022 14.022v0 235.574c0.051 4.084 1.84 7.741 4.661 10.271l0.013 0.012c2.631 2.33 6.113 3.753 9.926 3.753 0.224 0 0.447-0.005 0.669-0.015l-0.032 0.001c71.039-2.285 127.768-60.388 127.836-131.756v-0.007c-1.042-70.859-56.999-128.315-127.152-131.751l-0.31-0.012zM688.914 549.708v-202.528c49.372 7.858 86.658 50.13 86.658 101.111 0 0.013 0 0.026 0 0.039v-0.002c0.007 0.452 0.011 0.985 0.011 1.518 0 50.699-37.404 92.661-86.122 99.797l-0.547 0.066zM965.948 316.518h-1.449c-0.643-0.012-1.4-0.019-2.16-0.019-65.891 0-119.632 52.019-122.396 117.229l-0.008 0.25v132.137c0 7.744 6.278 14.022 14.022 14.022v0h112.178c7.744 0 14.022-6.278 14.022-14.022s-6.278-14.022-14.022-14.022h-98.156v-118.395c0-3.459 0-79.132 99.371-89.228 7.446-0.384 13.339-6.515 13.339-14.022 0-7.754-6.286-14.040-14.040-14.040-0.247 0-0.492 0.006-0.735 0.019l0.034-0.001zM965.901 482.448h-142.046c-7.744 0-14.022 6.278-14.022 14.022s6.278 14.022 14.022 14.022h142.046c7.744 0 14.022-6.278 14.022-14.022s-6.278-14.022-14.022-14.022v0zM1113.976 315.957c-36.605 0.871-68.526 20.142-86.964 48.888l-0.254 0.423v-34.729c0-7.744-6.278-14.022-14.022-14.022s-14.022 6.278-14.022 14.022v0 235.574c0 0.033 0 0.072 0 0.111 0 4.147 1.8 7.873 4.661 10.44l0.013 0.012c2.398 2.162 5.591 3.485 9.091 3.485 0.634 0 1.259-0.043 1.87-0.127l-0.071 0.008c37.393-4.674 108.579-32.999 109.841-104.232 0.038-0.992 0.059-2.158 0.059-3.328 0-44.864-31.604-82.346-73.763-91.398l-0.614-0.11c13.635-22.201 37.784-36.785 65.339-36.785 2.487 0 4.946 0.119 7.372 0.351l-0.309-0.024c0.561 0.082 1.208 0.128 1.866 0.128 7.155 0 13.024-5.506 13.602-12.512l0.003-0.049c0.050-0.445 0.079-0.961 0.079-1.484 0-7.212-5.445-13.153-12.448-13.935l-0.064-0.006c-3.419-0.428-7.395-0.682-11.426-0.701h-0.026zM1026.758 548.727v-143.448h0.654c2.851 0 70.111 6.404 68.99 70.111-0.841 47.255-45.152 66.325-69.644 73.336zM740.75-64c-0.028 0-0.060 0-0.093 0-282.77 0-512 229.23-512 512s229.23 512 512 512c282.77 0 512-229.23 512-512 0-0.016 0-0.033 0-0.049v0.002c-0.026-282.717-229.193-511.9-511.901-511.953h-0.005zM740.75 932.002c-0.042 0-0.091 0-0.14 0-267.307 0-484.002-216.695-484.002-484.002s216.695-484.002 484.002-484.002c267.307 0 484.002 216.695 484.002 484.002 0 0.016 0 0.033 0 0.049v-0.002c-0.026 267.237-216.632 483.876-483.854 483.955h-0.008zM1217.601 124.74c-7.739 0.007-14.011 6.282-14.011 14.022 0 3.193 1.067 6.137 2.865 8.494l-0.025-0.034c63.267 82.503 101.383 187.189 101.383 300.778s-38.117 218.274-102.257 301.965l0.873-1.187c-1.778 2.325-2.849 5.274-2.849 8.472 0 7.744 6.278 14.022 14.022 14.022 1.009 0 1.992-0.106 2.941-0.309l-0.092 0.016c150.228-33.093 260.97-165.092 260.97-322.956s-110.742-289.863-258.778-322.55l-2.192-0.406c-0.856-0.208-1.839-0.327-2.85-0.327-0.001 0-0.001 0-0.002 0v0zM1251.768 733.073c52.728-80.52 84.099-179.156 84.099-285.12s-31.371-204.6-85.332-287.129l1.233 2.010c118.558 42.685 201.8 154.181 201.8 285.12s-83.242 242.435-199.694 284.456l-2.106 0.664zM263.899 124.74c-0.014 0-0.031 0-0.048 0-1.011 0-1.994 0.119-2.936 0.345l0.086-0.017c-150.228 33.093-260.97 165.092-260.97 322.956s110.742 289.863 258.778 322.55l2.192 0.406c0.856 0.186 1.84 0.292 2.849 0.292 7.744 0 14.022-6.278 14.022-14.022 0-3.198-1.071-6.147-2.874-8.506l0.025 0.034c-63.267-82.503-101.383-187.189-101.383-300.778s38.117-218.274 102.257-301.965l-0.873 1.187c1.772-2.323 2.84-5.267 2.84-8.46 0-7.74-6.271-14.016-14.010-14.022h-0.001zM229.685 733.073c-118.558-42.685-201.8-154.181-201.8-285.12s83.242-242.435 199.694-284.456l2.106-0.664c-52.728 80.52-84.099 179.156-84.099 285.12s31.371 204.6 85.332 287.129l-1.233-2.010zM1380.306 480.204l-9.348-9.348 28.045-23.37-28.045-23.37 9.348-9.348 37.393 32.719zM66.419 448.047l37.393-32.719 9.348 9.348-28.045 23.37 28.045 23.37-9.348 9.348z" />
18
+ <glyph unicode="&#xe908;" glyph-name="form-maker" horiz-adv-x="1101" d="M385.133 479.717h-267.327v249.204h262.796v-249.204zM140.46 502.372h222.018v203.894h-222.018v-203.894zM987.752 348.319h-869.947v95.15h869.947v-95.15zM140.46 370.973h824.637v45.31h-824.637v-45.31zM987.752 99.115h-869.947v212.956h869.947v-212.956zM140.46 121.77h824.637v167.646h-824.637v-167.646zM987.752 620.177h-262.796v108.743h267.327v-108.743zM747.611 642.832h222.018v63.434h-222.018v-63.434zM693.239 620.177h-267.327v108.743h267.327v-108.743zM448.566 642.832h222.018v63.434h-222.018v-63.434zM987.752 479.717h-262.796v99.681h267.327v-99.681zM747.611 502.372h222.018v54.372h-222.018v-54.372zM693.239 479.717h-267.327v99.681h267.327v-99.681zM448.566 502.372h222.018v54.372h-222.018v-54.372zM22.655 3.965h1055.717v838.23h-1055.717v-838.23zM1046.655 810.478v-774.796h-992.283v774.796h992.283z" />
19
+ <glyph unicode="&#xe909;" glyph-name="wd-facebook-feed" d="M625.778 709.689c5.689 5.689 17.067 11.378 39.822 11.378h85.333c22.756 0 39.822 17.067 39.822 39.822v147.911c0 22.756-17.067 39.822-39.822 39.822h-125.156c-73.956 0-136.533-22.756-182.044-68.267-45.511-51.2-68.267-113.778-68.267-187.733v-85.333h-102.4c-22.756-5.689-39.822-22.756-39.822-45.511v-159.289c0-22.756 17.067-39.822 39.822-39.822h102.4v-375.467c0-22.756 17.067-39.822 39.822-39.822h164.978c22.756 0 39.822 17.067 39.822 39.822v375.467h125.156c22.756 0 39.822 17.067 39.822 39.822v159.289c0 17.067-5.689 28.444-22.756 34.133-5.689 5.689-11.378 5.689-22.756 5.689h-125.156v73.956c5.689 22.756 11.378 28.444 11.378 34.133zM750.933 897.422v0 0zM603.022 561.778h142.222v-153.6h-142.222c-11.378 0-22.756-11.378-22.756-22.756v-392.533h-159.289v392.533c0 11.378-11.378 22.756-22.756 22.756h-125.156v153.6h119.467c11.378 0 22.756 11.378 22.756 22.756v108.089c5.689 130.844 85.333 210.489 210.489 210.489h125.156v-142.222h-79.644c-22.756 0-51.2 0-73.956-22.756-17.067-17.067-17.067-39.822-17.067-62.578v-91.022c0-11.378 11.378-22.756 22.756-22.756z" />
20
+ <glyph unicode="&#xe90a;" glyph-name="wd-instagram-feed" d="M711.111 954.311h-403.911c-164.978 0-307.2-136.533-307.2-307.2v-403.911c0-170.667 136.533-307.2 307.2-307.2h403.911c170.667 0 307.2 136.533 307.2 307.2v403.911c0 170.667-136.533 307.2-307.2 307.2zM972.8 243.2c0-147.911-119.467-261.689-261.689-261.689h-403.911c-147.911 0-261.689 119.467-261.689 261.689v403.911c0 147.911 119.467 261.689 261.689 261.689h403.911c147.911 0 261.689-119.467 261.689-261.689v-403.911zM512 686.933c-130.844 0-238.933-108.089-238.933-238.933s108.089-238.933 238.933-238.933c130.844 0 238.933 108.089 238.933 238.933s-108.089 238.933-238.933 238.933zM512 248.889c-108.089 0-193.422 85.333-193.422 193.422s85.333 199.111 193.422 199.111 193.422-85.333 193.422-193.422-85.333-199.111-193.422-199.111zM836.267 738.133c0-18.851-15.282-34.133-34.133-34.133s-34.133 15.282-34.133 34.133c0 18.851 15.282 34.133 34.133 34.133s34.133-15.282 34.133-34.133z" />
21
  </font></defs></svg>
elementor/widget.php CHANGED
@@ -1,115 +1,115 @@
1
- <?php
2
- /**
3
- * Created by PhpStorm.
4
- * User: mher
5
- * Date: 10/19/18
6
- * Time: 4:00 PM
7
- */
8
-
9
- class WDIElementorWidget extends \Elementor\Widget_Base {
10
- private $feed_options = array();
11
- private $default_feed = '0';
12
-
13
- /**
14
- * Get widget name.
15
- *
16
- * @return string Widget name.
17
- */
18
- public function get_name(){
19
- return 'wdi-elementor';
20
- }
21
-
22
- /**
23
- * Get widget title.
24
- *
25
- * @return string Widget title.
26
- */
27
- public function get_title(){
28
- return __('Instagram Feed', 'wd-instagram-feed');
29
- }
30
-
31
- /**
32
- * Get widget icon.
33
- *
34
- * @return string Widget icon.
35
- */
36
- public function get_icon(){
37
- return 'twbb-wd-instagram-feed twbb-widget-icon';
38
- }
39
-
40
- /**
41
- * Get widget categories.
42
- *
43
- * @return array Widget categories.
44
- */
45
- public function get_categories(){
46
- return ['tenweb-plugins-widgets'];
47
- }
48
-
49
- /**
50
- * Register widget controls.
51
- */
52
- protected function _register_controls(){
53
- $this->set_options();
54
- $this->start_controls_section(
55
- 'wdi_general',
56
- [
57
- 'label' => __('General', 'wd-instagram-feed'),
58
- ]
59
- );
60
-
61
- $wdi_feed_id = $this->default_feed;
62
- if(isset($settings) && isset($settings["wdi_feeds"]) && intval($settings["wdi_feeds"])>0){
63
- $wdi_feed_id = intval($settings["wdi_feeds"]);
64
- }
65
- if(intval($this->default_feed) !==0){
66
- $wdi_edit_link = add_query_arg(array( 'page' => 'wdi_feeds&task=edit&current_id='.$wdi_feed_id), admin_url('admin.php'));
67
- }else{
68
- $wdi_edit_link = add_query_arg(array( 'page' => 'wdi_feeds'), admin_url('admin.php'));
69
- }
70
- $this->add_control(
71
- 'wdi_feeds',
72
- [
73
- 'label' => __('Select Feed', 'wd-instagram-feed'),
74
- 'label_block' => true,
75
- 'description' => __('', 'wd-instagram-feed'),
76
- 'type' => \Elementor\Controls_Manager::SELECT,
77
- 'default' => $this->default_feed,
78
- 'options' => $this->feed_options,
79
- 'description' => __('Select the feed to display.', 'wd-instagram-feed') .' <a target="_blank" " href="' . $wdi_edit_link . '">' . __('Edit feed', 'wd-instagram-feed') . '</a>',
80
- ]
81
- );
82
-
83
- $this->end_controls_section();
84
- }
85
-
86
- /**
87
- * Render widget output on the frontend.
88
- */
89
- protected function render(){
90
- $settings = $this->get_settings_for_display();
91
- if(!empty($settings['wdi_feeds'])) {
92
- echo wdi_feed(array('id' => $settings['wdi_feeds']));
93
- } else {
94
- echo __('No feed. Create and publish a feed to display it.', "wd-instagram-feed");
95
- }
96
- }
97
-
98
- public function set_options(){
99
- require_once WDI_DIR . "/admin/models/WDIModelEditorShortcode.php";
100
- $model = new WDIModelEditorShortcode();
101
- $rows = $model->get_row_data();
102
- if(!empty($rows)) {
103
- foreach($rows as $row) {
104
- $this->feed_options[$row->id] = $row->feed_name;
105
- }
106
- } else {
107
- $this->feed_options = array('0' => 'No Feed');
108
- }
109
-
110
- reset($this->feed_options);
111
- $this->default_feed = key($this->feed_options);
112
- }
113
- }
114
-
115
  \Elementor\Plugin::instance()->widgets_manager->register_widget_type(new WDIElementorWidget());
1
+ <?php
2
+ /**
3
+ * Created by PhpStorm.
4
+ * User: mher
5
+ * Date: 10/19/18
6
+ * Time: 4:00 PM
7
+ */
8
+
9
+ class WDIElementorWidget extends \Elementor\Widget_Base {
10
+ private $feed_options = array();
11
+ private $default_feed = '0';
12
+
13
+ /**
14
+ * Get widget name.
15
+ *
16
+ * @return string Widget name.
17
+ */
18
+ public function get_name(){
19
+ return 'wdi-elementor';
20
+ }
21
+
22
+ /**
23
+ * Get widget title.
24
+ *
25
+ * @return string Widget title.
26
+ */
27
+ public function get_title(){
28
+ return __('Instagram Feed', 'wd-instagram-feed');
29
+ }
30
+
31
+ /**
32
+ * Get widget icon.
33
+ *
34
+ * @return string Widget icon.
35
+ */
36
+ public function get_icon(){
37
+ return 'twbb-wd-instagram-feed twbb-widget-icon';
38
+ }
39
+
40
+ /**
41
+ * Get widget categories.
42
+ *
43
+ * @return array Widget categories.
44
+ */
45
+ public function get_categories(){
46
+ return ['tenweb-plugins-widgets'];
47
+ }
48
+
49
+ /**
50
+ * Register widget controls.
51
+ */
52
+ protected function _register_controls(){
53
+ $this->set_options();
54
+ $this->start_controls_section(
55
+ 'wdi_general',
56
+ [
57
+ 'label' => __('General', 'wd-instagram-feed'),
58
+ ]
59
+ );
60
+
61
+ $wdi_feed_id = $this->default_feed;
62
+ if(isset($settings) && isset($settings["wdi_feeds"]) && intval($settings["wdi_feeds"])>0){
63
+ $wdi_feed_id = intval($settings["wdi_feeds"]);
64
+ }
65
+ if(intval($this->default_feed) !==0){
66
+ $wdi_edit_link = add_query_arg(array( 'page' => 'wdi_feeds&task=edit&current_id='.$wdi_feed_id), admin_url('admin.php'));
67
+ }else{
68
+ $wdi_edit_link = add_query_arg(array( 'page' => 'wdi_feeds'), admin_url('admin.php'));
69
+ }
70
+ $this->add_control(
71
+ 'wdi_feeds',
72
+ [
73
+ 'label' => __('Select Feed', 'wd-instagram-feed'),
74
+ 'label_block' => true,
75
+ 'description' => __('', 'wd-instagram-feed'),
76
+ 'type' => \Elementor\Controls_Manager::SELECT,
77
+ 'default' => $this->default_feed,
78
+ 'options' => $this->feed_options,
79
+ 'description' => __('Select the feed to display.', 'wd-instagram-feed') .' <a target="_blank" " href="' . $wdi_edit_link . '">' . __('Edit feed', 'wd-instagram-feed') . '</a>',
80
+ ]
81
+ );
82
+
83
+ $this->end_controls_section();
84
+ }
85
+
86
+ /**
87
+ * Render widget output on the frontend.
88
+ */
89
+ protected function render(){
90
+ $settings = $this->get_settings_for_display();
91
+ if(!empty($settings['wdi_feeds'])) {
92
+ echo wdi_feed(array('id' => $settings['wdi_feeds']));
93
+ } else {
94
+ echo __('No feed. Create and publish a feed to display it.', "wd-instagram-feed");
95
+ }
96
+ }
97
+
98
+ public function set_options(){
99
+ require_once WDI_DIR . "/admin/models/WDIModelEditorShortcode.php";
100
+ $model = new WDIModelEditorShortcode();
101
+ $rows = $model->get_row_data();
102
+ if(!empty($rows)) {
103
+ foreach($rows as $row) {
104
+ $this->feed_options[$row->id] = $row->feed_name;
105
+ }
106
+ } else {
107
+ $this->feed_options = array('0' => 'No Feed');
108
+ }
109
+
110
+ reset($this->feed_options);
111
+ $this->default_feed = key($this->feed_options);
112
+ }
113
+ }
114
+
115
  \Elementor\Plugin::instance()->widgets_manager->register_widget_type(new WDIElementorWidget());
framework/WDILibrary.php CHANGED
@@ -1,1271 +1,1353 @@
1
- <?php
2
- class WDILibrary {
3
-
4
- public function __construct() {
5
- }
6
-
7
- public static function get($key, $default_value = '') {
8
- if (isset($_GET[$key])) {
9
- $value = sanitize_text_field($_GET[$key]);
10
- }
11
- elseif (isset($_POST[$key])) {
12
- $value = sanitize_text_field($_POST[$key]);
13
- }
14
- else {
15
- $value = '';
16
- }
17
- if (!$value) {
18
- $value = $default_value;
19
- }
20
- return $value;
21
- }
22
-
23
- public static function message_id($message_id) {
24
- if ($message_id) {
25
- switch($message_id) {
26
- case 1: {
27
- $message = 'Item Succesfully Saved.';
28
- $type = 'updated';
29
- break;
30
-
31
- }
32
- case 2: {
33
- $message = 'Error. Please install plugin again.';
34
- $type = 'error';
35
- break;
36
-
37
- }
38
- case 3: {
39
- $message = 'Item Succesfully Deleted.';
40
- $type = 'updated';
41
- break;
42
-
43
- }
44
- case 4: {
45
- $message = "You can't delete default theme";
46
- $type = 'error';
47
- break;
48
-
49
- }
50
- case 5: {
51
- $message = 'Items Succesfully Deleted.';
52
- $type = 'updated';
53
- break;
54
-
55
- }
56
- case 6: {
57
- $message = 'You must select at least one item.';
58
- $type = 'error';
59
- break;
60
-
61
- }
62
- case 7: {
63
- $message = 'The item is successfully set as default.';
64
- $type = 'updated';
65
- break;
66
-
67
- }
68
- case 8: {
69
- $message = 'Options Succesfully Saved.';
70
- $type = 'updated';
71
- break;
72
-
73
- }
74
- case 9: {
75
- $message = 'Item Succesfully Published.';
76
- $type = 'updated';
77
- break;
78
-
79
- }
80
- case 10: {
81
- $message = 'Items Succesfully Published.';
82
- $type = 'updated';
83
- break;
84
-
85
- }
86
- case 11: {
87
- $message = 'Item Succesfully Unpublished.';
88
- $type = 'updated';
89
- break;
90
-
91
- }
92
- case 12: {
93
- $message = 'Items Succesfully Unpublished.';
94
- $type = 'updated';
95
- break;
96
-
97
- }
98
- case 13: {
99
- $message = 'Ordering Succesfully Saved.';
100
- $type = 'updated';
101
- break;
102
-
103
- }
104
- case 14: {
105
- $message = 'A term with the name provided already exists.';
106
- $type = 'error';
107
- break;
108
-
109
- }
110
- case 15: {
111
- $message = 'Name field is required.';
112
- $type = 'error';
113
- break;
114
-
115
- }
116
- case 16: {
117
- $message = 'The slug must be unique.';
118
- $type = 'error';
119
- break;
120
-
121
- }
122
- case 17: {
123
- $message = 'Changes must be saved.';
124
- $type = 'error';
125
- break;
126
-
127
- }
128
- case 18: {
129
- $message = 'Item successfully duplicated.';
130
- $type = 'updated';
131
- break;
132
-
133
- }
134
- case 19: {
135
- $message = 'Items successfully Duplicated.';
136
- $type = 'updated';
137
- break;
138
-
139
- }
140
- case 20: {
141
- $message = 'Failed.';
142
- $type = 'error';
143
- break;
144
- }
145
- case 21: {
146
- $message = 'You cannot delete default theme.';
147
- $type = 'error';
148
- break;
149
- }
150
- case 22: {
151
- $message = 'Cannot Write on database. Check database permissions.';
152
- $type = 'error';
153
- break;
154
- }
155
- case 23: {
156
- $message = 'Changes have been successfully applied.';
157
- $type = 'updated';
158
- break;
159
- }
160
- case 24: {
161
- $message = 'You have not made new changes.';
162
- $type = 'updated';
163
- break;
164
- }
165
- case 25: {
166
- $message = "Style file generation failed. Maybe you don't have write permissions on wp-content/uploads folder. Your Instagram feed theme styles will be written inline.";
167
- $type = 'error';
168
- break;
169
- }
170
- }
171
- return '<div style="width:99%"><div class="' . $type . '"><p><strong>' . $message . '</strong></p></div></div>';
172
- }
173
- }
174
-
175
- public static function message($message, $type) {
176
- return '<div style="width:99%"><div class="' . $type . '"><p><strong>' . $message . '</strong></p></div></div>';
177
- }
178
-
179
- public static function search($search_by, $search_value, $form_id) {
180
- ?>
181
- <script>
182
- function wdi_spider_search() {
183
- var wdi_form = jQuery('#<?php echo $form_id; ?>');
184
- var wdi_search_text = jQuery("#search_value").val();
185
- var wdi_new_url = wdiChangeParamByName(window.location.href, "search", wdi_search_text);
186
- wdi_form.attr("action", wdi_new_url);
187
- wdi_form.submit();
188
- }
189
- function wdi_spider_reset() {
190
- if (document.getElementById("search_value")) {
191
- document.getElementById("search_value").value = "";
192
- }
193
- if (document.getElementById("search_select_value")) {
194
- document.getElementById("search_select_value").value = 0;
195
- }
196
- document.getElementById("<?php echo $form_id; ?>").submit();
197
- }
198
- function check_search_key(e, that) {
199
- var key_code = (e.keyCode ? e.keyCode : e.which);
200
- if (key_code == 13) { /*Enter keycode*/
201
- wdi_spider_search();
202
- return false;
203
- }
204
- return true;
205
- }
206
- </script>
207
- <p class="search-box">
208
- <input type="search" id="search_value" name="search_value" class="wdi_spider_search_value" onkeypress="return check_search_key(event, this);" value="<?php echo esc_html($search_value); ?>" style="<?php echo (get_bloginfo('version') > '3.7') ? ' height: 28px;' : ''; ?>" />
209
- <input type="button" value="<?php _e('Search',"wd-instagram-feed");?>" onclick="wdi_spider_search()" class="button-secondary action">
210
- </p>
211
- <?php
212
- }
213
-
214
- public static function search_select($search_by, $search_select_id = 'search_select_value', $search_select_value, $playlists, $form_id) {
215
- ?>
216
- <div class="alignleft actions" style="clear:both;">
217
- <script>
218
- function wdi_spider_search_select() {
219
- document.getElementById("page_number").value = "1";
220
- document.getElementById("search_or_not").value = "search";
221
- document.getElementById("<?php echo $form_id; ?>").submit();
222
- }
223
- </script>
224
- <div class="alignleft actions" >
225
- <label for="<?php echo $search_select_id; ?>" style="font-size:14px; width:50px; display:inline-block;"><?php echo $search_by; ?>:</label>
226
- <select id="<?php echo $search_select_id; ?>" name="<?php echo $search_select_id; ?>" onchange="wdi_spider_search_select();" style="float: none; width: 150px;">
227
- <?php
228
- foreach ($playlists as $id => $playlist) {
229
- ?>
230
- <option value="<?php echo $id; ?>" <?php echo (($search_select_value == $id) ? 'selected="selected"' : ''); ?>><?php echo $playlist; ?></option>
231
- <?php
232
- }
233
- ?>
234
- </select>
235
- </div>
236
- </div>
237
- <?php
238
- }
239
-
240
- public static function html_page_nav($count_items, $page_number, $form_id, $items_per_page = 20) {
241
- $limit = 20;
242
- if ($count_items) {
243
- if ($count_items % $limit) {
244
- $items_county = ($count_items - $count_items % $limit) / $limit + 1;
245
- }
246
- else {
247
- $items_county = ($count_items - $count_items % $limit) / $limit;
248
- }
249
- }
250
- else {
251
- $items_county = 1;
252
- }
253
- ?>
254
- <script type="text/javascript">
255
- var items_county = <?php echo $items_county; ?>;
256
- function wdi_spider_page(x, y) {
257
- switch (y) {
258
- case 1:
259
- if (x >= items_county) {
260
- document.getElementById('page_number').value = items_county;
261
- }
262
- else {
263
- document.getElementById('page_number').value = x + 1;
264
- }
265
- break;
266
- case 2:
267
- document.getElementById('page_number').value = items_county;
268
- break;
269
- case -1:
270
- if (x == 1) {
271
- document.getElementById('page_number').value = 1;
272
- }
273
- else {
274
- document.getElementById('page_number').value = x - 1;
275
- }
276
- break;
277
- case -2:
278
- document.getElementById('page_number').value = 1;
279
- break;
280
- default:
281
- document.getElementById('page_number').value = 1;
282
- }
283
- document.getElementById('<?php echo $form_id; ?>').submit();
284
- }
285
- function check_enter_key(e , _this) {
286
- var key_code = (e.keyCode ? e.keyCode : e.which);
287
- if (key_code == 13) {
288
- var wdi_form = jQuery('#<?php echo $form_id; ?>');
289
- /*Enter keycode*/
290
- var to_page = jQuery(_this).val();
291
- //console.log(to_page);
292
- var wdi_new_url = wdiChangeParamByName(window.location.href, "paged", to_page);
293
- wdi_form.attr("action", wdi_new_url);
294
- wdi_form.submit();
295
- }
296
- return true;
297
- }
298
- function wdiChangeParamByName(url, paramName, paramValue){
299
- var pattern = new RegExp('(\\?|\\&)('+paramName+'=).*?(&|$)');
300
- var newUrl=url;
301
- if(url.search(pattern)>=0){
302
- if(paramValue===""){
303
- newUrl = url.replace(pattern,'');
304
- }else {
305
- newUrl = url.replace(pattern,'$1$2' + paramValue + '$3');
306
- }
307
- }
308
- else{
309
- newUrl = newUrl + (newUrl.indexOf('?')>0 ? '&' : '?') + paramName + '=' + paramValue
310
- }
311
- return newUrl
312
- }
313
- </script>
314
- <div class="tablenav-pages">
315
- <span class="displaying-num">
316
- <?php
317
- if ($count_items != 0) {
318
- echo $count_items; ?> item<?php echo (($count_items == 1) ? '' : 's');
319
- }
320
- ?>
321
- </span>
322
- <?php
323
- $next_last_page = true;
324
- $first_prev_page = true;
325
- if ($count_items > $items_per_page) {
326
- $first_page = "first-page";
327
- $prev_page = "prev-page";
328
- $next_page = "next-page";
329
- $last_page = "last-page";
330
- if ($page_number == 1) {
331
- $first_prev_page = false;
332
- $first_page = "first-page disabled";
333
- $prev_page = "prev-page disabled";
334
- $next_page = "next-page";
335
- $last_page = "last-page";
336
- }
337
- if ($page_number >= $items_county) {
338
- $next_last_page = false;
339
- $first_page = "first-page ";
340
- $prev_page = "prev-page";
341
- $next_page = "next-page disabled";
342
- $last_page = "last-page disabled";
343
- }
344
- ?>
345
- <span class="pagination-links">
346
- <?php if($first_prev_page):?>
347
- <a class="<?php echo $first_page; ?>" title="Go to the first page" href="<?php echo WDILibrary::get_pagination_page($items_county , $page_number,-2);?>">«</a>
348
- <a class="<?php echo $prev_page; ?>" title="Go to the previous page" href="<?php echo WDILibrary::get_pagination_page($items_county , $page_number,-1);?>">‹</a>
349
- <?php else:?>
350
- <span class="tablenav-pages-navspan" aria-hidden="true">«</span>
351
- <span class="tablenav-pages-navspan" aria-hidden="true">‹</span>
352
- <?php endif;?>
353
- <span class="paging-input">
354
- <span class="total-pages">
355
- <input class="current_page" id="current_page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return check_enter_key(event ,this)" title="Go to the page" type="text" size="1" />
356
- </span> of
357
- <span class="total-pages">
358
- <?php echo $items_county; ?>
359
- </span>
360
- </span>
361
- <?php if($next_last_page):?>
362
- <a class="<?php echo $next_page ?>" title="Go to the next page" href="<?php echo WDILibrary::get_pagination_page($items_county , $page_number,1);?>">›</a>
363
- <a class="<?php echo $last_page ?>" title="Go to the last page" href="<?php echo WDILibrary::get_pagination_page($items_county , $page_number,2);?>">»</a>
364
- <?php else:?>
365
- <span class="tablenav-pages-navspan" aria-hidden="true">›</span>
366
- <span class="tablenav-pages-navspan" aria-hidden="true">»</span>
367
- <?php endif;?>
368
- <?php
369
- }
370
- ?>
371
- </span>
372
- </div>
373
- <input type="hidden" id="page_number" name="page_number" value="<?php echo (int) WDILibrary::get('page_number',1); ?>" />
374
- <input type="hidden" id="search_or_not" name="search_or_not" value="<?php echo WDILibrary::get('search_or_not', ''); ?>"/>
375
- <?php
376
- }
377
-
378
- public static function get_pagination_page($items_county, $x, $y){
379
- switch ($y) {
380
- case 1:
381
- if ($x >= $items_county) {
382
- $page_number = $items_county;
383
- }
384
- else {
385
- $page_number = $x + 1;
386
- }
387
- break;
388
- case 2:
389
- $page_number = $items_county;
390
- break;
391
- case -1:
392
- if ($x == 1) {
393
- $page_number = 1;
394
- }
395
- else {
396
- $page_number = $x - 1;
397
- }
398
- break;
399
- case -2:
400
- $page_number = 1;
401
- break;
402
- default:
403
- $page_number = 1;
404
- }
405
-
406
- $page_link_data = array(
407
- "paged" => $page_number
408
- );
409
-
410
- $search = WDILibrary::get('search', '');
411
- if( !empty($search) ){
412
- $page_link_data['search'] = $search;
413
- }
414
-
415
- $order_by = WDILibrary::get('order_by', '');
416
- if( !empty($order_by) ) {
417
- $page_link_data['order_by'] = $order_by;
418
- }
419
-
420
- $order = WDILibrary::get('order', '');
421
- if( !empty($order) ) {
422
- $page_link_data['order'] = $order;
423
- }
424
-
425
- return self::get_page_link(array($page_link_data));
426
- }
427
-
428
- public static function ajax_search($search_by, $search_value, $form_id) {
429
- ?>
430
- <div class="alignleft actions" style="clear:both;">
431
- <script>
432
- function wdi_spider_search() {
433
- document.getElementById("page_number").value = "1";
434
- document.getElementById("search_or_not").value = "search";
435
- wdi_spider_ajax_save('<?php echo $form_id; ?>');
436
- }
437
- function wdi_spider_reset() {
438
- if (document.getElementById("search_value")) {
439
- document.getElementById("search_value").value = "";
440
- }
441
- wdi_spider_ajax_save('<?php echo $form_id; ?>');
442
- }
443
- function check_search_key(e, that) {
444
- var key_code = (e.keyCode ? e.keyCode : e.which);
445
- if (key_code == 13) { /*Enter keycode*/
446
- wdi_spider_search();
447
- return false;
448
- }
449
- return true;
450
- }
451
- </script>
452
- <div class="alignleft actions" style="">
453
- <label for="search_value" style="font-size:14px; width:60px; display:inline-block;"><?php echo $search_by; ?>:</label>
454
- <input type="text" id="search_value" name="search_value" class="wdi_spider_search_value" onkeypress="return check_search_key(event, this);" value="<?php echo esc_html($search_value); ?>" style="width: 150px;<?php echo (get_bloginfo('version') > '3.7') ? ' height: 28px;' : ''; ?>" />
455
- </div>
456
- <div class="alignleft actions">
457
- <input type="button" value="Search" onclick="wdi_spider_search()" class="button-secondary action">
458
- <input type="button" value="Reset" onclick="wdi_spider_reset()" class="button-secondary action">
459
- </div>
460
- </div>
461
- <?php
462
- }
463
-
464
- public static function ajax_html_page_nav($count_items, $page_number, $form_id, $items_per_page = 20, $pager = 0) {
465
- $limit = $items_per_page;
466
-
467
- if ($count_items) {
468
- if ($count_items % $limit) {
469
- $items_county = ($count_items - $count_items % $limit) / $limit + 1;
470
- }
471
- else {
472
- $items_county = ($count_items - $count_items % $limit) / $limit;
473
- }
474
- }
475
- else {
476
- $items_county = 1;
477
- }
478
- if (!$pager) {
479
- ?>
480
- <script type="text/javascript">
481
- var items_county = <?php echo $items_county; ?>;
482
- function wdi_spider_page(x, y) {
483
- switch (y) {
484
- case 1:
485
- if (x >= items_county) {
486
- document.getElementById('page_number').value = items_county;
487
- }
488
- else {
489
- document.getElementById('page_number').value = x + 1;
490
- }
491
- break;
492
- case 2:
493
- document.getElementById('page_number').value = items_county;
494
- break;
495
- case -1:
496
- if (x == 1) {
497
- document.getElementById('page_number').value = 1;
498
- }
499
- else {
500
- document.getElementById('page_number').value = x - 1;
501
- }
502
- break;
503
- case -2:
504
- document.getElementById('page_number').value = 1;
505
- break;
506
- default:
507
- document.getElementById('page_number').value = 1;
508
- }
509
- wdi_spider_ajax_save('<?php echo $form_id; ?>');
510
- }
511
- function check_enter_key(e, that) {
512
- var key_code = (e.keyCode ? e.keyCode : e.which);
513
- if (key_code == 13) { /*Enter keycode*/
514
- if (jQuery(that).val() >= items_county) {
515
- document.getElementById('page_number').value = items_county;
516
- }
517
- else {
518
- document.getElementById('page_number').value = jQuery(that).val();
519
- }
520
- wdi_spider_ajax_save('<?php echo $form_id; ?>');
521
- return false;
522
- }
523
- return true;
524
- }
525
- </script>
526
- <?php } ?>
527
- <div id="tablenav-pages" class="tablenav-pages">
528
- <span class="displaying-num">
529
- <?php
530
- if ($count_items != 0) {
531
- echo $count_items; ?> item<?php echo (($count_items == 1) ? '' : 's');
532
- }
533
- ?>
534
- </span>
535
- <?php
536
- if ($count_items > $limit) {
537
- $first_page = "first-page";
538
- $prev_page = "prev-page";
539
- $next_page = "next-page";
540
- $last_page = "last-page";
541
- if ($page_number == 1) {
542
- $first_page = "first-page disabled";
543
- $prev_page = "prev-page disabled";
544
- $next_page = "next-page";
545
- $last_page = "last-page";
546
- }
547
- if ($page_number >= $items_county) {
548
- $first_page = "first-page ";
549
- $prev_page = "prev-page";
550
- $next_page = "next-page disabled";
551
- $last_page = "last-page disabled";
552
- }
553
- ?>
554
- <span class="pagination-links">
555
- <a class="<?php echo $first_page; ?>" title="Go to the first page" onclick="wdi_spider_page(<?php echo $page_number; ?>,-2)">«</a>
556
- <a class="<?php echo $prev_page; ?>" title="Go to the previous page" onclick="wdi_spider_page(<?php echo $page_number; ?>,-1)">‹</a>
557
- <span class="paging-input">
558
- <span class="total-pages">
559
- <input class="current_page" id="current_page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return check_enter_key(event)" title="Go to the page" type="text" size="1" />
560
- </span> of
561
- <span class="total-pages">
562
- <?php echo $items_county; ?>
563
- </span>
564
- </span>
565
- <a class="<?php echo $next_page ?>" title="Go to the next page" onclick="wdi_spider_page(<?php echo $page_number; ?>,1)">›</a>
566
- <a class="<?php echo $last_page ?>" title="Go to the last page" onclick="wdi_spider_page(<?php echo $page_number; ?>,2)">»</a>
567
- <?php
568
- }
569
- ?>
570
- </span>
571
- </div>
572
- <?php if (!$pager) { ?>
573
- <input type="hidden" id="page_number" name="page_number" value="<?php echo (int) WDILibrary::get('page_number', 1); ?>" />
574
- <input type="hidden" id="search_or_not" name="search_or_not" value="<?php echo WDILibrary::get('search_or_not', ''); ?>"/>
575
- <?php
576
- }
577
- }
578
-
579
- public static function ajax_html_frontend_page_nav($theme_row, $count_items, $page_number, $form_id, $limit = 20, $current_view, $id, $cur_alb_gal_id = 0, $type = 'album', $enable_seo = false, $pagination = 1) {
580
- $type = WDILibrary::get('type_' . $current_view, $type);
581
- $album_gallery_id = WDILibrary::get('album_gallery_id_' . $current_view, $cur_alb_gal_id);
582
- if ($count_items) {
583
- if ($count_items % $limit) {
584
- $items_county = ($count_items - $count_items % $limit) / $limit + 1;
585
- }
586
- else {
587
- $items_county = ($count_items - $count_items % $limit) / $limit;
588
- }
589
- }
590
- else {
591
- $items_county = 1;
592
- }
593
- if ($page_number > $items_county) {
594
- return;
595
- }
596
- $first_page = "first-page-" . $current_view;
597
- $prev_page = "prev-page-" . $current_view;
598
- $next_page = "next-page-" . $current_view;
599
- $last_page = "last-page-" . $current_view;
600
- ?>
601
- <span class="wdi_nav_cont_<?php echo $current_view; ?>">
602
- <?php
603
- if ($pagination == 1) {
604
- ?>
605
- <div class="tablenav-pages_<?php echo $current_view; ?>">
606
- <?php
607
- if ($theme_row->page_nav_number) {
608
- ?>
609
- <span class="displaying-num_<?php echo $current_view; ?>"><?php echo $count_items . __(' item(s)', 'wd-instagram-feed'); ?></span>
610
- <?php
611
- }
612
- if ($count_items > $limit) {
613
- if ($theme_row->page_nav_button_text) {
614
- $first_button = __('First', 'wd-instagram-feed');
615
- $previous_button = __('Previous', 'wd-instagram-feed');
616
- $next_button = __('Next', 'wd-instagram-feed');
617
- $last_button = __('Last', 'wd-instagram-feed');
618
- }
619
- else {
620
- $first_button = '«';
621
- $previous_button = '';
622
- $next_button = '';
623
- $last_button = '»';
624
- }
625
- if ($page_number == 1) {
626
- $first_page = "first-page disabled";
627
- $prev_page = "prev-page disabled";
628
- }
629
- if ($page_number >= $items_county) {
630
- $next_page = "next-page disabled";
631
- $last_page = "last-page disabled";
632
- }
633
- ?>
634
- <span class="pagination-links_<?php echo $current_view; ?>">
635
- <a class="<?php echo $first_page; ?>" title="<?php echo __('Go to the first page', 'wd-instagram-feed'); ?>"><?php echo $first_button; ?></a>
636
- <a class="<?php echo $prev_page; ?>" title="<?php echo __('Go to the previous page', 'wd-instagram-feed'); ?>" <?php echo $page_number > 1 && $enable_seo ? 'href="' . add_query_arg(array("page_number_" . $current_view => $page_number - 1), $_SERVER['REQUEST_URI']) . '"' : ""; ?>><?php echo $previous_button; ?></a>
637
- <span class="paging-input_<?php echo $current_view; ?>">
638
- <span class="total-pages_<?php echo $current_view; ?>"><?php echo $page_number; ?></span> <?php echo __('of', 'wd-instagram-feed'); ?> <span class="total-pages_<?php echo $current_view; ?>">
639
- <?php echo $items_county; ?>
640
- </span>
641
- </span>
642
- <a class="<?php echo $next_page ?>" title="<?php echo __('Go to the next page', 'wd-instagram-feed'); ?>" <?php echo $page_number + 1 <= $items_county && $enable_seo ? 'href="' . add_query_arg(array("page_number_" . $current_view => $page_number + 1), $_SERVER['REQUEST_URI']) . '"' : ""; ?>><?php echo $next_button; ?></a>
643
- <a class="<?php echo $last_page ?>" title="<?php echo __('Go to the last page', 'wd-instagram-feed'); ?>"><?php echo $last_button; ?></a>
644
- </span>
645
- <?php
646
- }
647
- ?>
648
- </div>
649
- <?php
650
- }
651
- elseif ($pagination == 2) {
652
- if ($count_items > $limit * $page_number) {
653
- ?>
654
- <div id="wdi_load_<?php echo $current_view; ?>" class="tablenav-pages_<?php echo $current_view; ?>">
655
- <a class="wdi_load_btn_<?php echo $current_view; ?> wdi_load_btn" href="javascript:void(0);"><?php echo __('Load More...', 'wd-instagram-feed'); ?></a>
656
- <input type="hidden" id="wdi_load_more_<?php echo $current_view; ?>" name="wdi_load_more_<?php echo $current_view; ?>" value="on" />
657
- </div>
658
- <?php
659
- }
660
- }
661
- elseif ($pagination == 3) {
662
- if ($count_items > $limit * $page_number) {
663
- ?>
664
- <script type="text/javascript">
665
- jQuery(window).on("scroll", function() {
666
- if (jQuery(document).scrollTop() + jQuery(window).height() > (jQuery('#<?php echo $form_id; ?>').offset().top + jQuery('#<?php echo $form_id; ?>').height())) {
667
- wdi_spider_page_<?php echo $current_view; ?>('', <?php echo $page_number; ?>, 1, true);
668
- jQuery(window).off("scroll");
669
- return false;
670
- }
671
- });
672
- </script>
673
- <?php
674
- }
675
- }
676
- ?>
677
- <input type="hidden" id="page_number_<?php echo $current_view; ?>" name="page_number_<?php echo $current_view; ?>" value="<?php echo (int) WDILibrary::get('page_number_' . $current_view, 1); ?>" />
678
- <script type="text/javascript">
679
- function wdi_spider_page_<?php echo $current_view; ?>(cur, x, y, load_more) {
680
- if (typeof load_more == "undefined") {
681
- var load_more = false;
682
- }
683
- if (jQuery(cur).hasClass('disabled')) {
684
- return false;
685
- }
686
- var items_county_<?php echo $current_view; ?> = <?php echo $items_county; ?>;
687
- switch (y) {
688
- case 1:
689
- if (x >= items_county_<?php echo $current_view; ?>) {
690
- document.getElementById('page_number_<?php echo $current_view; ?>').value = items_county_<?php echo $current_view; ?>;
691
- }
692
- else {
693
- document.getElementById('page_number_<?php echo $current_view; ?>').value = x + 1;
694
- }
695
- break;
696
- case 2:
697
- document.getElementById('page_number_<?php echo $current_view; ?>').value = items_county_<?php echo $current_view; ?>;
698
- break;
699
- case -1:
700
- if (x == 1) {
701
- document.getElementById('page_number_<?php echo $current_view; ?>').value = 1;
702
- }
703
- else {
704
- document.getElementById('page_number_<?php echo $current_view; ?>').value = x - 1;
705
- }
706
- break;
707
- case -2:
708
- document.getElementById('page_number_<?php echo $current_view; ?>').value = 1;
709
- break;
710
- default:
711
- document.getElementById('page_number_<?php echo $current_view; ?>').value = 1;
712
- }
713
- wdi_spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $id; ?>', '<?php echo $album_gallery_id; ?>', '', '<?php echo $type; ?>', 0, '', '', load_more);
714
- }
715
- jQuery(document).ready(function() {
716
-
717
- jQuery('.<?php echo $first_page; ?>').on('click', function() {
718
- wdi_spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, -2);
719
- });
720
- jQuery('.<?php echo $prev_page; ?>').on('click', function() {
721
- wdi_spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, -1);
722
- return false;
723
- });
724
- jQuery('.<?php echo $next_page; ?>').on('click', function() {
725
- wdi_spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, 1);
726
- return false;
727
- });
728
- jQuery('.<?php echo $last_page; ?>').on('click', function() {
729
- wdi_spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, 2);
730
- });
731
- jQuery('.wdi_load_btn_<?php echo $current_view; ?>').on('click', function() {
732
- wdi_spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, 1, true);
733
- return false;
734
- });
735
- });
736
- </script>
737
- </span>
738
- <?php
739
- }
740
-
741
- public static function ajax_html_frontend_search_box($form_id, $current_view, $cur_gal_id, $images_count, $search_box_width = 180) {
742
- $wdi_search = WDILibrary::get('wdi_search_' . $current_view, '');
743
- $type = WDILibrary::get('type_' . $current_view, 'album');
744
- $album_gallery_id = (int) WDILibrary::get('album_gallery_id_' . $current_view, 0);
745
- ?>
746
- <style>
747
- .wdi_search_container_1 {
748
- display: inline-block;
749
- width: 100%;
750
- text-align: right;
751
- margin: 0 5px 20px 5px;
752
- background-color: rgba(0,0,0,0);
753
- }
754
- .wdi_search_container_2 {
755
- display: inline-block;
756
- position: relative;
757
- border-radius: 4px;
758
- box-shadow: 0 0 3px 1px #CCCCCC;
759
- background-color: #FFFFFF;
760
- border: 1px solid #CCCCCC;
761
- width: <?php echo $search_box_width; ?>px;
762
- max-width: 100%;
763
- }
764
- #wdi_search_container_1_<?php echo $current_view; ?> #wdi_search_container_2_<?php echo $current_view; ?> .wdi_search_input_container {
765
- display: block;
766
- margin-right: 45px;
767
- }
768
- #wdi_search_container_1_<?php echo $current_view; ?> #wdi_search_container_2_<?php echo $current_view; ?> .wdi_search_loupe_container {
769
- display: inline-block;
770
- margin-right: 1px;
771
- vertical-align: middle;
772
- float: right;
773
- padding-top: 3px;
774
- }
775
- #wdi_search_container_1_<?php echo $current_view; ?> #wdi_search_container_2_<?php echo $current_view; ?> .wdi_search_reset_container {
776
- display: inline-block;
777
- margin-right: 5px;
778
- vertical-align: middle;
779
- float: right;
780
- padding-top: 3px;
781
- }
782
- #wdi_search_container_1_<?php echo $current_view; ?> #wdi_search_container_2_<?php echo $current_view; ?> .wdi_search,
783
- #wdi_search_container_1_<?php echo $current_view; ?> #wdi_search_container_2_<?php echo $current_view; ?> .wdi_reset {
784
- font-size: 18px;
785
- color: #CCCCCC;
786
- cursor: pointer;
787
- }
788
- #wdi_search_container_1_<?php echo $current_view; ?> #wdi_search_container_2_<?php echo $current_view; ?> .wdi_search_input_<?php echo $current_view; ?>,
789
- #wdi_search_container_1_<?php echo $current_view; ?> #wdi_search_container_2_<?php echo $current_view; ?> .wdi_search_input_<?php echo $current_view; ?>:focus {
790
- color: hsl(0, 1%, 3%);
791
- outline: none;
792
- border: none;
793
- box-shadow: none;
794
- background: none;
795
- padding: 0 5px;
796
- font-family: inherit;
797
- width: 100%;
798
- }
799
- </style>
800
- <script type="text/javascript">
801
- function clear_input_<?php echo $current_view; ?> (current_view) {
802
- jQuery("#wdi_search_input_" + current_view).val('');
803
- }
804
- function check_enter_key(e) {
805
- var key_code = e.which || e.keyCode;
806
- if (key_code == 13) {
807
- wdi_spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1);
808
- return false;
809
- }
810
- return true;
811
- }
812
- </script>
813
- <div class="wdi_search_container_1" id="wdi_search_container_1_<?php echo $current_view; ?>">
814
- <div class="wdi_search_container_2" id="wdi_search_container_2_<?php echo $current_view; ?>">
815
- <span class="wdi_search_reset_container" >
816
- <i title="<?php echo __('Reset', 'wd-instagram-feed'); ?>" class="wdi_reset tenweb-i tenweb-i-times" onclick="clear_input_<?php echo $current_view; ?>('<?php echo $current_view; ?>'),wdi_spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1)"></i>
817
- </span>
818
- <span class="wdi_search_loupe_container" >
819
- <i title="<?php echo __('Search', 'wd-instagram-feed'); ?>" class="wdi_search tenweb-i tenweb-i-search" onclick="wdi_spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1)"></i>
820
- </span>
821
- <span class="wdi_search_input_container">
822
- <input id="wdi_search_input_<?php echo $current_view; ?>" class="wdi_search_input_<?php echo $current_view; ?>" type="text" onkeypress="return check_enter_key(event ,this)" name="wdi_search_<?php echo $current_view; ?>" value="<?php echo $wdi_search; ?>" >
823
- <input id="wdi_images_count_<?php echo $current_view; ?>" class="wdi_search_input" type="hidden" name="wdi_images_count_<?php echo $current_view; ?>" value="<?php echo $images_count; ?>" >
824
- </span>
825
- </div>
826
- </div>
827
- <?php
828
- }
829
-
830
- public static function ajax_html_frontend_sort_box($form_id, $current_view, $cur_gal_id, $sort_by = '', $search_box_width = 180) {
831
- $wdi_search = WDILibrary::get('wdi_search_' . $current_view, '');
832
- $type = WDILibrary::get('type_' . $current_view, 'album');
833
- $album_gallery_id = (int) WDILibrary::get('album_gallery_id_' . $current_view, 'album');
834
- ?>
835
- <style>
836
- .wdi_order_cont_<?php echo $current_view; ?> {
837
- background-color: rgba(0,0,0,0);
838
- display: block;
839
- margin: 0 5px 20px 5px;
840
- text-align: right;
841
- width: 100%;
842
- }
843
- .wdi_order_label_<?php echo $current_view; ?> {
844
- border: none;
845
- box-shadow: none;
846
- color: #BBBBBB;
847
- font-family: inherit;
848
- font-weight: bold;
849
- outline: none;
850
- }
851
- .wdi_order_<?php echo $current_view; ?> {
852
- background-color: #FFFFFF;
853
- border: 1px solid #CCCCCC;
854
- box-shadow: 0 0 3px 1px #CCCCCC;
855
- border-radius: 4px;
856
- max-width: 100%;
857
- width: <?php echo $search_box_width; ?>px;
858
- }
859
- </style>
860
- <div class="wdi_order_cont_<?php echo $current_view; ?>">
861
- <span class="wdi_order_label_<?php echo $current_view; ?>"><?php echo __('Order by: ', 'wd-instagram-feed'); ?></span>
862
- <select class="wdi_order_<?php echo $current_view; ?>" onchange="wdi_spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1, '', this.value)">
863
- <option <?php if ($sort_by == 'default') echo 'selected'; ?> value="default"><?php echo __('Default', 'wd-instagram-feed'); ?></option>
864
- <option <?php if ($sort_by == 'filename') echo 'selected'; ?> value="filename"><?php echo __('Filename', 'wd-instagram-feed'); ?></option>
865
- <option <?php if ($sort_by == 'size') echo 'selected'; ?> value="size"><?php echo __('Size', 'wd-instagram-feed'); ?></option>
866
- <option <?php if ($sort_by == 'RAND()') echo 'selected'; ?> value="random"><?php echo __('Random', 'wd-instagram-feed'); ?></option>
867
- </select>
868
- </div>
869
- <?php
870
- }
871
-
872
- public static function wdi_spider_hex2rgb($colour) {
873
- if ($colour[0] == '#') {
874
- $colour = substr( $colour, 1 );
875
- }
876
- if (strlen($colour) == 6) {
877
- list( $r, $g, $b ) = array( $colour[0] . $colour[1], $colour[2] . $colour[3], $colour[4] . $colour[5]);
878
- }
879
- else if (strlen($colour) == 3) {
880
- list($r, $g, $b) = array($colour[0] . $colour[0], $colour[1] . $colour[1], $colour[2] . $colour[2]);
881
- }
882
- else {
883
- return FALSE;
884
- }
885
- $r = hexdec($r);
886
- $g = hexdec($g);
887
- $b = hexdec($b);
888
- return array('red' => $r, 'green' => $g, 'blue' => $b);
889
- }
890
-
891
- public static function wdi_spider_redirect($url) {
892
- ?>
893
- <script>
894
- window.location = "<?php echo $url; ?>";
895
- </script>
896
- <?php
897
- exit();
898
- }
899
-
900
- /**
901
- * If string argument passed, put it into delimiters for AJAX response to separate from other data.
902
- */
903
-
904
- public static function delimit_wd_output($data) {
905
-
906
- if(is_string ( $data )){
907
- return "WD_delimiter_start". $data . "WD_delimiter_end";
908
- }
909
- else{
910
- return $data;
911
- }
912
- }
913
-
914
- public static function verify_nonce($page){
915
-
916
- $nonce_verified = false;
917
- $wdi_nonce = WDILibrary::get('wdi_nonce', '');
918
- $_wpnonce = WDILibrary::get('_wpnonce', '');
919
- if ( isset( $wdi_nonce ) && wp_verify_nonce( $wdi_nonce, $page )) {
920
- $nonce_verified = true;
921
- }
922
- elseif ( isset( $_wpnonce ) && wp_verify_nonce( $_wpnonce, $page )) {
923
- $nonce_verified = true;
924
- }
925
-
926
- return $nonce_verified;
927
- }
928
-
929
-
930
- public static function arrayToObject($d) {
931
- if (is_array($d)) {
932
- /*
933
- * Return array converted to object
934
- * Using __FUNCTION__ (Magic constant)
935
- * for recursive call
936
- */
937
- return (object) array_map(array('WDILibrary','arrayToObject'), $d);
938
- }
939
- else {
940
- // Return object
941
- return $d;
942
- }
943
- }
944
-
945
- public static function objectToArray($d) {
946
- if (is_object($d)) {
947
- // Gets the properties of the given object
948
- // with get_object_vars function
949
- $d = get_object_vars($d);
950
- }
951
-
952
- if (is_array($d)) {
953
- /*
954
- * Return array converted to object
955
- * Using __FUNCTION__ (Magic constant)
956
- * for recursive call
957
- */
958
- return array_map(array('WDILibrary','objectToArray'), $d);
959
- }
960
- else {
961
- // Return array
962
- return $d;
963
- }
964
- }
965
-
966
-
967
- public static function keep_only_self_user($feed_row){
968
- global $wdi_options;
969
-
970
- if($feed_row['liked_feed'] == 'liked'){
971
- $feed_row['nothing_to_display'] = '1';
972
- return $feed_row;
973
- }
974
-
975
- $users = json_decode($feed_row['feed_users']);
976
- $new_users_list = array();
977
- $users_list = self::get_users_list();
978
- if(is_array($users)) {
979
- foreach($users as $i => $user) {
980
- if(substr($user->username, 0, 1) === '#' || $user->username === $wdi_options['wdi_user_name'] || !empty($users_list[$user->username])) {
981
- $new_users_list[] = $user;
982
- }
983
- }
984
- }
985
- $feed_row['nothing_to_display'] = (empty($new_users_list)) ? '1' : '0';
986
- $feed_row['feed_users'] = json_encode($new_users_list);
987
-
988
-
989
- return $feed_row;
990
- }
991
-
992
- /*
993
- * @return color if valid color, otherwise return false
994
- *
995
- */
996
-
997
- public static function regexColor($color, $named) {
998
-
999
- if ($named) {
1000
-
1001
- $named = array('transparent','aliceblue', 'antiquewhite', 'aqua', 'aquamarine', 'azure', 'beige', 'bisque', 'black', 'blanchedalmond', 'blue', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'fuchsia', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'gray', 'green', 'greenyellow', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightsteelblue', 'lightyellow', 'lime', 'limegreen', 'linen', 'magenta', 'maroon', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'navy', 'oldlace', 'olive', 'olivedrab', 'orange', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'purple', 'red', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'silver', 'skyblue', 'slateblue', 'slategray', 'snow', 'springgreen', 'steelblue', 'tan', 'teal', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'white', 'whitesmoke', 'yellow', 'yellowgreen');
1002
- if (in_array(strtolower($color), $named)) {
1003
- /* A color name was entered instead of a Hex Value, so just exit function */
1004
- return $color;
1005
- }
1006
- }
1007
-
1008
- //checking rgb format
1009
- if(self::is_rgb($color) == true){
1010
- return $color;
1011
- }
1012
- if(substr($color,0,1) == '#' && strlen($color) === 4){
1013
- $color.=substr($color,1,strlen($color));
1014
- }
1015
-
1016
-
1017
-
1018
- //Check for a hex color string '#c1c2b4'
1019
- if(preg_match('/^#[a-f0-9]{6}$/i', $color)) //hex color is valid
1020
- {
1021
- return $color;
1022
- }
1023
-
1024
- //Check for a hex color string without hash 'c1c2b4'
1025
- if(preg_match('/^[a-f0-9]{6}$/i', $color)) //hex color is valid
1026
- {
1027
- $fix_color = '#' . $color;
1028
- return $fix_color;
1029
- }
1030
- return false;
1031
- }
1032
- /**
1033
- * Check is rgb color value
1034
- * @param string
1035
- * @return boolean
1036
- */
1037
- public static function is_rgb($val){
1038
- //checking for rgb
1039
- $rgbFlag = false;
1040
- $rgbaFlag = false;
1041
- if(substr($val,0,4) === 'rgb('){
1042
- $values = explode(',',substr($val,4,strlen($val)-5));
1043
- if(count($values) !== 3){
1044
- return false;
1045
- }
1046
- foreach ($values as $value) {
1047
- if(!is_numeric($value) || $value<0 || $value>255){
1048
- $rgbFlag = true;
1049
- }
1050
- }
1051
- if($rgbFlag === false){
1052
- return true;
1053
- }
1054
- }
1055
- else if(substr($val,0,5) === 'rgba('){
1056
- $values = explode(',',substr($val,5,strlen($val)-6));
1057
- if(count($values) !== 4){
1058
- return false;
1059
- }
1060
- foreach ($values as $value) {
1061
- if(!is_numeric($value) || $value<0 || $value>255){
1062
- $rgbaFlag = true;
1063
- }
1064
- }
1065
- if($rgbaFlag === false){
1066
- return true;
1067
- }
1068
- }else{
1069
- return false;
1070
- }
1071
- }
1072
-
1073
- public static function get_page_link( $data ){
1074
- $page = WDILibrary::get('page');
1075
- $url = add_query_arg(array( 'page' => $page, $data ), admin_url('admin.php'));
1076
- return $url;
1077
- }
1078
-
1079
- public static function get_shortcode_data() {
1080
- global $wpdb;
1081
- require_once WDI_DIR . "/admin/models/WDIModelEditorShortcode.php";
1082
- $model = new WDIModelEditorShortcode();
1083
-
1084
- $rows = $model->get_row_data();
1085
- $gb_row = array();
1086
- foreach ($rows as $row){
1087
- $obj = new stdClass();
1088
- $obj->id = $row->id;
1089
- $obj->name = $row->feed_name;
1090
- $gb_row[] = $obj;
1091
- }
1092
- $data = array();
1093
- $data['shortcode_prefix'] = "wdi_feed";
1094
- $data['inputs'][] = array(
1095
- 'type' => 'select',
1096
- 'id' => 'wdi_id',
1097
- 'name' => 'wdi_id',
1098
- 'shortcode_attibute_name' => 'id',
1099
- 'options' => $gb_row,
1100
- );
1101
- return json_encode($data);
1102
- }
1103
-
1104
- public static function add_auth_button($text = ""){
1105
- $new_url = urlencode(admin_url('admin.php?page=wdi_settings')) . '&response_type=token&state='. admin_url('admin.php?wdi_settings');
1106
- ?>
1107
- <a onclick="document.cookie = 'wdi_autofill=true'" class="wdi_sign_in_button"
1108
- href="https://api.instagram.com/oauth/authorize/?client_id=54da896cf80343ecb0e356ac5479d9ec&scope=basic&redirect_uri=http://api.web-dorado.com/instagram/?return_url=<?php echo $new_url; ?>">
1109
- <?php echo $text; ?>
1110
- </a>
1111
- <?php
1112
- }
1113
-
1114
- public static function get_users_list(){
1115
- global $wdi_options;
1116
- $users_list = array();
1117
- if(!empty($wdi_options['wdi_authenticated_users_list'])){
1118
- $users_list = json_decode($wdi_options['wdi_authenticated_users_list'], true);
1119
- if(!is_array($users_list)){
1120
- $users_list = array();
1121
- }
1122
- }
1123
- return $users_list;
1124
- }
1125
-
1126
- public static function get_user_access_token($users){
1127
- global $wdi_options;
1128
- $users_list = self::get_users_list();
1129
- foreach($users as $user) {
1130
- if(substr($user->username, 0, 1) === '#') {
1131
- continue;
1132
- }
1133
-
1134
- if(!empty($users_list[$user->username])) {
1135
- return $users_list[$user->username]['access_token'];
1136
- }
1137
-
1138
- }
1139
-
1140
- return $wdi_options['wdi_access_token'];
1141
- }
1142
-
1143
- public static function localize_script($object_name, $l10n){
1144
- foreach ( (array) $l10n as $key => $value ) {
1145
- if ( !is_scalar($value) )
1146
- continue;
1147
-
1148
- $l10n[$key] = html_entity_decode( (string) $value, ENT_QUOTES, 'UTF-8');
1149
- }
1150
-
1151
- $script = "var $object_name = " . wp_json_encode( $l10n ) . ';';
1152
- $script = "<script>" . $script . "</script>";
1153
- echo $script;
1154
- }
1155
-
1156
- public static function elementor_is_active(){
1157
-
1158
- if((isset($_REQUEST['action']) && in_array($_REQUEST['action'], array('elementor', 'elementor_ajax'))) || (isset($_REQUEST['elementor-preview']))) {
1159
- return true;
1160
- }
1161
-
1162
- return false;
1163
- }
1164
-
1165
- public static function is_ajax(){
1166
-
1167
- //todo add themes
1168
- if(defined('DOING_AJAX') && DOING_AJAX) {
1169
- return true;
1170
- }
1171
-
1172
- return false;
1173
- }
1174
-
1175
- /**
1176
- * Generate top bar.
1177
- *
1178
- * @return string Top bar html.
1179
- */
1180
- public static function topbar() {
1181
- $page = isset($_GET['page']) ? esc_html($_GET['page']) : '';
1182
- $user_guide_link = 'https://help.10web.io/hc/en-us/articles/';
1183
- $show_guide_link = true;
1184
- $description = "";
1185
- switch ($page) {
1186
- case 'wdi_feeds': {
1187
- $user_guide_link .= '360016497251-Creating-Instagram-Feed';
1188
- $description .= __('This section allows you to create, edit and delete Feeds.', WD_WDI_PREFIX);
1189
- break;
1190
- }
1191
- case 'wdi_themes': {
1192
- $user_guide_link .= '360016277832';
1193
- $description .= __('This section allows you to create, edit and delete Themes.', WD_WDI_PREFIX);
1194
- break;
1195
- }
1196
- case 'wdi_settings': {
1197
- $user_guide_link .= '360016277532-Configuring-Instagram-Access-Token';
1198
- $description .= __('This section allows you to set API parameters.', WD_WDI_PREFIX);
1199
- break;
1200
- }
1201
- default: {
1202
- return '';
1203
- break;
1204
- }
1205
- }
1206
- $user_guide_link .= '?utm_source=instagram_feed&amp;utm_medium=free_plugin';
1207
- $support_forum_link = 'https://wordpress.org/support/plugin/wd-instagram-feed/#new-post';
1208
- $premium_link = 'https://10web.io/plugins/wordpress-instagram-feed/?utm_source=instagram_feed&amp;utm_medium=free_plugin';
1209
- wp_enqueue_style(WD_WDI_PREFIX . '-roboto');
1210
- wp_enqueue_style(WD_WDI_PREFIX . '-pricing');
1211
- ob_start();
1212
- ?>
1213
- <div class="wrap">
1214
- <h1 class="head-notice">&nbsp;</h1>
1215
- <div class="topbar-container">
1216
- <?php
1217
- if ( !WDI_IS_PRO ) {
1218
- ?>
1219
- <div class="topbar topbar-content">
1220
- <div class="topbar-content-container">
1221
- <div class="topbar-content-title">
1222
- <?php _e('Instagram Feed by 10Web Premium', WD_WDI_PREFIX); ?>
1223
- </div>
1224
- <div class="topbar-content-body">
1225
- <?php echo $description; ?>
1226
- </div>
1227
- </div>
1228
- <div class="topbar-content-button-container">
1229
- <a href="<?php echo $premium_link; ?>" target="_blank" class="topbar-upgrade-button"><?php _e( 'Upgrade',WD_WDI_PREFIX ); ?></a>
1230
- </div>
1231
- </div>
1232
- <?php
1233
- }
1234
- ?>
1235
- <div class="topbar_cont">
1236
- <?php
1237
- if ( $show_guide_link ) {
1238
- ?>
1239
- <div class="topbar topbar-links">
1240
- <div class="topbar-links-container">
1241
- <a href="<?php echo $user_guide_link; ?>" target="_blank" class="topbar_user_guid">
1242
- <div class="topbar-links-item">
1243
- <?php _e('User guide', WD_WDI_PREFIX); ?>
1244
- </div>
1245
- </a>
1246
- </div>
1247
- </div>
1248
- <?php
1249
- }
1250
- if ( !WDI_IS_PRO ) {
1251
- ?>
1252
- <div class="topbar topbar-links topbar_support_forum">
1253
- <div class="topbar-links-container">
1254
- <a href="<?php echo $support_forum_link; ?>" target="_blank" class="topbar_support_forum">
1255
- <div class="topbar-links-item">
1256
- <img src="<?php echo WDI_URL . '/images/help.svg'; ?>" class="help_icon" />
1257
- <?php _e('Ask a question', WD_WDI_PREFIX); ?>
1258
- </div>
1259
- </a>
1260
- </div>
1261
- </div>
1262
- <?php
1263
- }
1264
- ?>
1265
- </div>
1266
- </div>
1267
- </div>
1268
- <?php
1269
- echo ob_get_clean();
1270
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1271
  }
1
+ <?php
2
+
3
+ class WDILibrary {
4
+
5
+ public function __construct() {
6
+ }
7
+
8
+ public static function get($key, $default_value = '') {
9
+ if (isset($_GET[$key])) {
10
+ $value = sanitize_text_field($_GET[$key]);
11
+ }
12
+ elseif (isset($_POST[$key])) {
13
+ $value = sanitize_text_field($_POST[$key]);
14
+ }
15
+ else {
16
+ $value = '';
17
+ }
18
+ if (!$value) {
19
+ $value = $default_value;
20
+ }
21
+ return $value;
22
+ }
23
+
24
+ public static function message_id($message_id) {
25
+ if ($message_id) {
26
+ switch($message_id) {
27
+ case 1: {
28
+ $message = 'Item Succesfully Saved.';
29
+ $type = 'updated';
30
+ break;
31
+
32
+ }
33
+ case 2: {
34
+ $message = 'Error. Please install plugin again.';
35
+ $type = 'error';
36
+ break;
37
+
38
+ }
39
+ case 3: {
40
+ $message = 'Item Succesfully Deleted.';
41
+ $type = 'updated';
42
+ break;
43
+
44
+ }
45
+ case 4: {
46
+ $message = "You can't delete default theme";
47
+ $type = 'error';
48
+ break;
49
+
50
+ }
51
+ case 5: {
52
+ $message = 'Items Succesfully Deleted.';
53
+ $type = 'updated';
54
+ break;
55
+
56
+ }
57
+ case 6: {
58
+ $message = 'You must select at least one item.';
59
+ $type = 'error';
60
+ break;
61
+
62
+ }
63
+ case 7: {
64
+ $message = 'The item is successfully set as default.';
65
+ $type = 'updated';
66
+ break;
67
+
68
+ }
69
+ case 8: {
70
+ $message = 'Options Succesfully Saved.';
71
+ $type = 'updated';
72
+ break;
73
+
74
+ }
75
+ case 9: {
76
+ $message = 'Item Succesfully Published.';
77
+ $type = 'updated';
78
+ break;
79
+
80
+ }
81
+ case 10: {
82
+ $message = 'Items Succesfully Published.';
83
+ $type = 'updated';
84
+ break;
85
+
86
+ }
87
+ case 11: {
88
+ $message = 'Item Succesfully Unpublished.';
89
+ $type = 'updated';
90
+ break;
91
+
92
+ }
93
+ case 12: {
94
+ $message = 'Items Succesfully Unpublished.';
95
+ $type = 'updated';
96
+ break;
97
+
98
+ }
99
+ case 13: {
100
+ $message = 'Ordering Succesfully Saved.';
101
+ $type = 'updated';
102
+ break;
103
+
104
+ }
105
+ case 14: {
106
+ $message = 'A term with the name provided already exists.';
107
+ $type = 'error';
108
+ break;
109
+
110
+ }
111
+ case 15: {
112
+ $message = 'Name field is required.';
113
+ $type = 'error';
114
+ break;
115
+
116
+ }
117
+ case 16: {
118
+ $message = 'The slug must be unique.';
119
+ $type = 'error';
120
+ break;
121
+
122
+ }
123
+ case 17: {
124
+ $message = 'Changes must be saved.';
125
+ $type = 'error';
126
+ break;
127
+
128
+ }
129
+ case 18: {
130
+ $message = 'Item successfully duplicated.';
131
+ $type = 'updated';
132
+ break;
133
+
134
+ }
135
+ case 19: {
136
+ $message = 'Items successfully Duplicated.';
137
+ $type = 'updated';
138
+ break;
139
+
140
+ }
141
+ case 20: {
142
+ $message = 'Failed.';
143
+ $type = 'error';
144
+ break;
145
+ }
146
+ case 21: {
147
+ $message = 'You cannot delete default theme.';
148
+ $type = 'error';
149
+ break;
150
+ }
151
+ case 22: {
152
+ $message = 'Cannot Write on database. Check database permissions.';
153
+ $type = 'error';
154
+ break;
155
+ }
156
+ case 23: {
157
+ $message = 'Changes have been successfully applied.';
158
+ $type = 'updated';
159
+ break;
160
+ }
161
+ case 24: {
162
+ $message = 'You have not made new changes.';
163
+ $type = 'updated';
164
+ break;
165
+ }
166
+ case 25: {
167
+ $message = "Style file generation failed. Maybe you don't have write permissions on wp-content/uploads folder. Your Instagram feed theme styles will be written inline.";
168
+ $type = 'error';
169
+ break;
170
+ }
171
+ }
172
+ return '<div style="width:99%"><div class="' . $type . ' inline"><p><strong>' . $message . '</strong></p></div></div>';
173
+ }
174
+ }
175
+
176
+ public static function message($message, $type) {
177
+ return '<div style="width:99%"><div class="' . $type . ' inline"><p><strong>' . $message . '</strong></p></div></div>';
178
+ }
179
+
180
+ public static function search($search_by, $search_value, $form_id) {
181
+ ?>
182
+ <script>
183
+ function wdi_spider_search() {
184
+ var wdi_form = jQuery('#<?php echo $form_id; ?>');
185
+ var wdi_search_text = jQuery("#search_value").val();
186
+ var wdi_new_url = wdiChangeParamByName(window.location.href, "search", wdi_search_text);
187
+ wdi_form.attr("action", wdi_new_url);
188
+ wdi_form.submit();
189
+ }
190
+ function wdi_spider_reset() {
191
+ if (document.getElementById("search_value")) {
192
+ document.getElementById("search_value").value = "";
193
+ }
194
+ if (document.getElementById("search_select_value")) {
195
+ document.getElementById("search_select_value").value = 0;
196
+ }
197
+ document.getElementById("<?php echo $form_id; ?>").submit();
198
+ }
199
+ function check_search_key(e, that) {
200
+ var key_code = (e.keyCode ? e.keyCode : e.which);
201
+ if (key_code == 13) { /*Enter keycode*/
202
+ wdi_spider_search();
203
+ return false;
204
+ }
205
+ return true;
206
+ }
207
+ </script>
208
+ <p class="search-box">
209
+ <input type="search" id="search_value" name="search_value" class="wdi_spider_search_value" onkeypress="return check_search_key(event, this);" value="<?php echo esc_html($search_value); ?>" style="<?php echo (get_bloginfo('version') > '3.7') ? ' height: 28px;' : ''; ?>" />
210
+ <input type="button" value="<?php _e('Search',"wd-instagram-feed");?>" onclick="wdi_spider_search()" class="button-secondary action">
211
+ </p>
212
+ <?php
213
+ }
214
+
215
+ public static function search_select($search_by, $search_select_id = 'search_select_value', $search_select_value, $playlists, $form_id) {
216
+ ?>
217
+ <div class="alignleft actions" style="clear:both;">
218
+ <script>
219
+ function wdi_spider_search_select() {
220
+ document.getElementById("page_number").value = "1";
221
+ document.getElementById("search_or_not").value = "search";
222
+ document.getElementById("<?php echo $form_id; ?>").submit();
223
+ }
224
+ </script>
225
+ <div class="alignleft actions" >
226
+ <label for="<?php echo $search_select_id; ?>" style="font-size:14px; width:50px; display:inline-block;"><?php echo $search_by; ?>:</label>
227
+ <select id="<?php echo $search_select_id; ?>" name="<?php echo $search_select_id; ?>" onchange="wdi_spider_search_select();" style="float: none; width: 150px;">
228
+ <?php
229
+ foreach ($playlists as $id => $playlist) {
230
+ ?>
231
+ <option value="<?php echo $id; ?>" <?php echo (($search_select_value == $id) ? 'selected="selected"' : ''); ?>><?php echo $playlist; ?></option>
232
+ <?php
233
+ }
234
+ ?>
235
+ </select>
236
+ </div>
237
+ </div>
238
+ <?php
239
+ }
240
+
241
+ public static function html_page_nav($count_items, $page_number, $form_id, $items_per_page = 20) {
242
+ $limit = 20;
243
+ if ($count_items) {
244
+ if ($count_items % $limit) {
245
+ $items_county = ($count_items - $count_items % $limit) / $limit + 1;
246
+ }
247
+ else {
248
+ $items_county = ($count_items - $count_items % $limit) / $limit;
249
+ }
250
+ }
251
+ else {
252
+ $items_county = 1;
253
+ }
254
+ ?>
255
+ <script type="text/javascript">
256
+ var items_county = <?php echo $items_county; ?>;
257
+ function wdi_spider_page(x, y) {
258
+ switch (y) {
259
+ case 1:
260
+ if (x >= items_county) {
261
+ document.getElementById('page_number').value = items_county;
262
+ }
263
+ else {
264
+ document.getElementById('page_number').value = x + 1;
265
+ }
266
+ break;
267
+ case 2:
268
+ document.getElementById('page_number').value = items_county;
269
+ break;
270
+ case -1:
271
+ if (x == 1) {
272
+ document.getElementById('page_number').value = 1;
273
+ }
274
+ else {
275
+ document.getElementById('page_number').value = x - 1;
276
+ }
277
+ break;
278
+ case -2:
279
+ document.getElementById('page_number').value = 1;
280
+ break;
281
+ default:
282
+ document.getElementById('page_number').value = 1;
283
+ }
284
+ document.getElementById('<?php echo $form_id; ?>').submit();
285
+ }
286
+ function check_enter_key(e , _this) {
287
+ var key_code = (e.keyCode ? e.keyCode : e.which);
288
+ if (key_code == 13) {
289
+ var wdi_form = jQuery('#<?php echo $form_id; ?>');
290
+ /*Enter keycode*/
291
+ var to_page = jQuery(_this).val();
292
+ //console.log(to_page);
293
+ var wdi_new_url = wdiChangeParamByName(window.location.href, "paged", to_page);
294
+ wdi_form.attr("action", wdi_new_url);
295
+ wdi_form.submit();
296
+ }
297
+ return true;
298
+ }
299
+ function wdiChangeParamByName(url, paramName, paramValue){
300
+ var pattern = new RegExp('(\\?|\\&)('+paramName+'=).*?(&|$)');
301
+ var newUrl=url;
302
+ if(url.search(pattern)>=0){
303
+ if(paramValue===""){
304
+ newUrl = url.replace(pattern,'');
305
+ }else {
306
+ newUrl = url.replace(pattern,'$1$2' + paramValue + '$3');
307
+ }
308
+ }
309
+ else{
310
+ newUrl = newUrl + (newUrl.indexOf('?')>0 ? '&' : '?') + paramName + '=' + paramValue
311
+ }
312
+ return newUrl
313
+ }
314
+ </script>
315
+ <div class="tablenav-pages">
316
+ <span class="displaying-num">
317
+ <?php
318
+ if ($count_items != 0) {
319
+ echo $count_items; ?> item<?php echo (($count_items == 1) ? '' : 's');
320
+ }
321
+ ?>
322
+ </span>
323
+ <?php
324
+ $next_last_page = true;
325
+ $first_prev_page = true;
326
+ if ($count_items > $items_per_page) {
327
+ $first_page = "first-page";
328
+ $prev_page = "prev-page";
329
+ $next_page = "next-page";
330
+ $last_page = "last-page";
331
+ if ($page_number == 1) {
332
+ $first_prev_page = false;
333
+ $first_page = "first-page disabled";
334
+ $prev_page = "prev-page disabled";
335
+ $next_page = "next-page";
336
+ $last_page = "last-page";
337
+ }
338
+ if ($page_number >= $items_county) {
339
+ $next_last_page = false;
340
+ $first_page = "first-page ";
341
+ $prev_page = "prev-page";
342
+ $next_page = "next-page disabled";
343
+ $last_page = "last-page disabled";
344
+ }
345
+ ?>
346
+ <span class="pagination-links">
347
+ <?php if($first_prev_page):?>
348
+ <a class="<?php echo $first_page; ?>" title="Go to the first page" href="<?php echo WDILibrary::get_pagination_page($items_county , $page_number,-2);?>">«</a>
349
+ <a class="<?php echo $prev_page; ?>" title="Go to the previous page" href="<?php echo WDILibrary::get_pagination_page($items_county , $page_number,-1);?>">‹</a>
350
+ <?php else:?>
351
+ <span class="tablenav-pages-navspan" aria-hidden="true">«</span>
352
+ <span class="tablenav-pages-navspan" aria-hidden="true">‹</span>
353
+ <?php endif;?>
354
+ <span class="paging-input">
355
+ <span class="total-pages">
356
+ <input class="current_page" id="current_page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return check_enter_key(event ,this)" title="Go to the page" type="text" size="1" />
357
+ </span> of
358
+ <span class="total-pages">
359
+ <?php echo $items_county; ?>
360
+ </span>
361
+ </span>
362
+ <?php if($next_last_page):?>
363
+ <a class="<?php echo $next_page ?>" title="Go to the next page" href="<?php echo WDILibrary::get_pagination_page($items_county , $page_number,1);?>">›</a>
364
+ <a class="<?php echo $last_page ?>" title="Go to the last page" href="<?php echo WDILibrary::get_pagination_page($items_county , $page_number,2);?>">»</a>
365
+ <?php else:?>
366
+ <span class="tablenav-pages-navspan" aria-hidden="true">›</span>
367
+ <span class="tablenav-pages-navspan" aria-hidden="true">»</span>
368
+ <?php endif;?>
369
+ <?php
370
+ }
371
+ ?>
372
+ </span>
373
+ </div>
374
+ <input type="hidden" id="page_number" name="page_number" value="<?php echo (int) WDILibrary::get('page_number',1); ?>" />
375
+ <input type="hidden" id="search_or_not" name="search_or_not" value="<?php echo WDILibrary::get('search_or_not', ''); ?>"/>
376
+ <?php
377
+ }
378
+
379
+ public static function get_pagination_page($items_county, $x, $y){
380
+ switch ($y) {
381
+ case 1:
382
+ if ($x >= $items_county) {
383
+ $page_number = $items_county;
384
+ }
385
+ else {
386
+ $page_number = $x + 1;
387
+ }
388
+ break;
389
+ case 2:
390
+ $page_number = $items_county;
391
+ break;
392
+ case -1:
393
+ if ($x == 1) {
394
+ $page_number = 1;
395
+ }
396
+ else {
397
+ $page_number = $x - 1;
398
+ }
399
+ break;
400
+ case -2:
401
+ $page_number = 1;
402
+ break;
403
+ default:
404
+ $page_number = 1;
405
+ }
406
+
407
+ $page_link_data = array(
408
+ "paged" => $page_number
409
+ );
410
+
411
+ $search = WDILibrary::get('search', '');
412
+ if( !empty($search) ){
413
+ $page_link_data['search'] = $search;
414
+ }
415
+
416
+ $order_by = WDILibrary::get('order_by', '');
417
+ if( !empty($order_by) ) {
418
+ $page_link_data['order_by'] = $order_by;
419
+ }
420
+
421
+ $order = WDILibrary::get('order', '');
422
+ if( !empty($order) ) {
423
+ $page_link_data['order'] = $order;
424
+ }
425
+
426
+ return self::get_page_link(array($page_link_data));
427
+ }
428
+
429
+ public static function ajax_search($search_by, $search_value, $form_id) {
430
+ ?>
431
+ <div class="alignleft actions" style="clear:both;">
432
+ <script>
433
+ function wdi_spider_search() {
434
+ document.getElementById("page_number").value = "1";
435
+ document.getElementById("search_or_not").value = "search";
436
+ wdi_spider_ajax_save('<?php echo $form_id; ?>');
437
+ }
438
+ function wdi_spider_reset() {
439
+ if (document.getElementById("search_value")) {
440
+ document.getElementById("search_value").value = "";
441
+ }
442
+ wdi_spider_ajax_save('<?php echo $form_id; ?>');
443
+ }
444
+ function check_search_key(e, that) {
445
+ var key_code = (e.keyCode ? e.keyCode : e.which);
446
+ if (key_code == 13) { /*Enter keycode*/
447
+ wdi_spider_search();
448
+ return false;
449
+ }
450
+ return true;
451
+ }
452
+ </script>
453
+ <div class="alignleft actions" style="">
454
+ <label for="search_value" style="font-size:14px; width:60px; display:inline-block;"><?php echo $search_by; ?>:</label>
455
+ <input type="text" id="search_value" name="search_value" class="wdi_spider_search_value" onkeypress="return check_search_key(event, this);" value="<?php echo esc_html($search_value); ?>" style="width: 150px;<?php echo (get_bloginfo('version') > '3.7') ? ' height: 28px;' : ''; ?>" />
456
+ </div>
457
+ <div class="alignleft actions">
458
+ <input type="button" value="Search" onclick="wdi_spider_search()" class="button-secondary action">
459
+ <input type="button" value="Reset" onclick="wdi_spider_reset()" class="button-secondary action">
460
+ </div>
461
+ </div>
462
+ <?php
463
+ }
464
+
465
+ public static function ajax_html_page_nav($count_items, $page_number, $form_id, $items_per_page = 20, $pager = 0) {
466
+ $limit = $items_per_page;
467
+
468
+ if ($count_items) {
469
+ if ($count_items % $limit) {
470
+ $items_county = ($count_items - $count_items % $limit) / $limit + 1;
471
+ }
472
+ else {
473
+ $items_county = ($count_items - $count_items % $limit) / $limit;
474
+ }
475
+ }
476
+ else {
477
+ $items_county = 1;
478
+ }
479
+ if (!$pager) {
480
+ ?>
481
+ <script type="text/javascript">
482
+ var items_county = <?php echo $items_county; ?>;
483
+ function wdi_spider_page(x, y) {
484
+ switch (y) {
485
+ case 1:
486
+ if (x >= items_county) {
487
+ document.getElementById('page_number').value = items_county;
488
+ }
489
+ else {
490
+ document.getElementById('page_number').value = x + 1;
491
+ }
492
+ break;
493
+ case 2:
494
+ document.getElementById('page_number').value = items_county;
495
+ break;
496
+ case -1:
497
+ if (x == 1) {
498
+ document.getElementById('page_number').value = 1;
499
+ }
500
+ else {
501
+ document.getElementById('page_number').value = x - 1;
502
+ }
503
+ break;
504
+ case -2:
505
+ document.getElementById('page_number').value = 1;
506
+ break;
507
+ default:
508
+ document.getElementById('page_number').value = 1;
509
+ }
510
+ wdi_spider_ajax_save('<?php echo $form_id; ?>');
511
+ }
512
+ function check_enter_key(e, that) {
513
+ var key_code = (e.keyCode ? e.keyCode : e.which);
514
+ if (key_code == 13) { /*Enter keycode*/
515
+ if (jQuery(that).val() >= items_county) {
516
+ document.getElementById('page_number').value = items_county;
517
+ }
518
+ else {
519
+ document.getElementById('page_number').value = jQuery(that).val();
520
+ }
521
+ wdi_spider_ajax_save('<?php echo $form_id; ?>');
522
+ return false;
523
+ }
524
+ return true;
525
+ }
526
+ </script>
527
+ <?php } ?>
528
+ <div id="tablenav-pages" class="tablenav-pages">
529
+ <span class="displaying-num">
530
+ <?php
531
+ if ($count_items != 0) {
532
+ echo $count_items; ?> item<?php echo (($count_items == 1) ? '' : 's');
533
+ }
534
+ ?>
535
+ </span>
536
+ <?php
537
+ if ($count_items > $limit) {
538
+ $first_page = "first-page";
539
+ $prev_page = "prev-page";
540
+ $next_page = "next-page";
541
+ $last_page = "last-page";
542
+ if ($page_number == 1) {
543
+ $first_page = "first-page disabled";
544
+ $prev_page = "prev-page disabled";
545
+ $next_page = "next-page";
546
+ $last_page = "last-page";
547
+ }
548
+ if ($page_number >= $items_county) {
549
+ $first_page = "first-page ";
550
+ $prev_page = "prev-page";
551
+ $next_page = "next-page disabled";
552
+ $last_page = "last-page disabled";
553
+ }
554
+ ?>
555
+ <span class="pagination-links">
556
+ <a class="<?php echo $first_page; ?>" title="Go to the first page" onclick="wdi_spider_page(<?php echo $page_number; ?>,-2)">«</a>
557
+ <a class="<?php echo $prev_page; ?>" title="Go to the previous page" onclick="wdi_spider_page(<?php echo $page_number; ?>,-1)">‹</a>
558
+ <span class="paging-input">
559
+ <span class="total-pages">
560
+ <input class="current_page" id="current_page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return check_enter_key(event)" title="Go to the page" type="text" size="1" />
561
+ </span> of
562
+ <span class="total-pages">
563
+ <?php echo $items_county; ?>
564
+ </span>
565
+ </span>
566
+ <a class="<?php echo $next_page ?>" title="Go to the next page" onclick="wdi_spider_page(<?php echo $page_number; ?>,1)">›</a>
567
+ <a class="<?php echo $last_page ?>" title="Go to the last page" onclick="wdi_spider_page(<?php echo $page_number; ?>,2)">»</a>
568
+ <?php
569
+ }
570
+ ?>
571
+ </span>
572
+ </div>
573
+ <?php if (!$pager) { ?>
574
+ <input type="hidden" id="page_number" name="page_number" value="<?php echo (int) WDILibrary::get('page_number', 1); ?>" />
575
+ <input type="hidden" id="search_or_not" name="search_or_not" value="<?php echo WDILibrary::get('search_or_not', ''); ?>"/>
576
+ <?php
577
+ }
578
+ }
579
+
580
+ public static function ajax_html_frontend_page_nav($theme_row, $count_items, $page_number, $form_id, $limit = 20, $current_view, $id, $cur_alb_gal_id = 0, $type = 'album', $enable_seo = false, $pagination = 1) {
581
+ $type = WDILibrary::get('type_' . $current_view, $type);
582
+ $album_gallery_id = WDILibrary::get('album_gallery_id_' . $current_view, $cur_alb_gal_id);
583
+ if ($count_items) {
584
+ if ($count_items % $limit) {
585
+ $items_county = ($count_items - $count_items % $limit) / $limit + 1;
586
+ }
587
+ else {
588
+ $items_county = ($count_items - $count_items % $limit) / $limit;
589
+ }
590
+ }
591
+ else {
592
+ $items_county = 1;
593
+ }
594
+ if ($page_number > $items_county) {
595
+ return;
596
+ }
597
+ $first_page = "first-page-" . $current_view;
598
+ $prev_page = "prev-page-" . $current_view;
599
+ $next_page = "next-page-" . $current_view;
600
+ $last_page = "last-page-" . $current_view;
601
+ ?>
602
+ <span class="wdi_nav_cont_<?php echo $current_view; ?>">
603
+ <?php
604
+ if ($pagination == 1) {
605
+ ?>
606
+ <div class="tablenav-pages_<?php echo $current_view; ?>">
607
+ <?php
608
+ if ($theme_row->page_nav_number) {
609
+ ?>
610
+ <span class="displaying-num_<?php echo $current_view; ?>"><?php echo $count_items . __(' item(s)', 'wd-instagram-feed'); ?></span>
611
+ <?php
612
+ }
613
+ if ($count_items > $limit) {
614
+ if ($theme_row->page_nav_button_text) {
615
+ $first_button = __('First', 'wd-instagram-feed');
616
+ $previous_button = __('Previous', 'wd-instagram-feed');
617
+ $next_button = __('Next', 'wd-instagram-feed');
618
+ $last_button = __('Last', 'wd-instagram-feed');
619
+ }
620
+ else {
621
+ $first_button = '«';
622
+ $previous_button = '';
623
+ $next_button = '';
624
+ $last_button = '»';
625
+ }
626
+ if ($page_number == 1) {
627
+ $first_page = "first-page disabled";
628
+ $prev_page = "prev-page disabled";
629
+ }
630
+ if ($page_number >= $items_county) {
631
+ $next_page = "next-page disabled";
632
+ $last_page = "last-page disabled";
633
+ }
634
+ ?>
635
+ <span class="pagination-links_<?php echo $current_view; ?>">
636
+ <a class="<?php echo $first_page; ?>" title="<?php echo __('Go to the first page', 'wd-instagram-feed'); ?>"><?php echo $first_button; ?></a>
637
+ <a class="<?php echo $prev_page; ?>" title="<?php echo __('Go to the previous page', 'wd-instagram-feed'); ?>" <?php echo $page_number > 1 && $enable_seo ? 'href="' . add_query_arg(array("page_number_" . $current_view => $page_number - 1), $_SERVER['REQUEST_URI']) . '"' : ""; ?>><?php echo $previous_button; ?></a>
638
+ <span class="paging-input_<?php echo $current_view; ?>">
639
+ <span class="total-pages_<?php echo $current_view; ?>"><?php echo $page_number; ?></span> <?php echo __('of', 'wd-instagram-feed'); ?> <span class="total-pages_<?php echo $current_view; ?>">
640
+ <?php echo $items_county; ?>
641
+ </span>
642
+ </span>
643
+ <a class="<?php echo $next_page ?>" title="<?php echo __('Go to the next page', 'wd-instagram-feed'); ?>" <?php echo $page_number + 1 <= $items_county && $enable_seo ? 'href="' . add_query_arg(array("page_number_" . $current_view => $page_number + 1), $_SERVER['REQUEST_URI']) . '"' : ""; ?>><?php echo $next_button; ?></a>
644
+ <a class="<?php echo $last_page ?>" title="<?php echo __('Go to the last page', 'wd-instagram-feed'); ?>"><?php echo $last_button; ?></a>
645
+ </span>
646
+ <?php
647
+ }
648
+ ?>
649
+ </div>
650
+ <?php
651
+ }
652
+ elseif ($pagination == 2) {
653
+ if ($count_items > $limit * $page_number) {
654
+ ?>
655
+ <div id="wdi_load_<?php echo $current_view; ?>" class="tablenav-pages_<?php echo $current_view; ?>">
656
+ <a class="wdi_load_btn_<?php echo $current_view; ?> wdi_load_btn" href="javascript:void(0);"><?php echo __('Load More...', 'wd-instagram-feed'); ?></a>
657
+ <input type="hidden" id="wdi_load_more_<?php echo $current_view; ?>" name="wdi_load_more_<?php echo $current_view; ?>" value="on" />
658
+ </div>
659
+ <?php
660
+ }
661
+ }
662
+ elseif ($pagination == 3) {
663
+ if ($count_items > $limit * $page_number) {
664
+ ?>
665
+ <script type="text/javascript">
666
+ jQuery(window).on("scroll", function() {
667
+ if (jQuery(document).scrollTop() + jQuery(window).height() > (jQuery('#<?php echo $form_id; ?>').offset().top + jQuery('#<?php echo $form_id; ?>').height())) {
668
+ wdi_spider_page_<?php echo $current_view; ?>('', <?php echo $page_number; ?>, 1, true);
669
+ jQuery(window).off("scroll");
670
+ return false;
671
+ }
672
+ });
673
+ </script>
674
+ <?php
675
+ }
676
+ }
677
+ ?>
678
+ <input type="hidden" id="page_number_<?php echo $current_view; ?>" name="page_number_<?php echo $current_view; ?>" value="<?php echo (int) WDILibrary::get('page_number_' . $current_view, 1); ?>" />
679
+ <script type="text/javascript">
680
+ function wdi_spider_page_<?php echo $current_view; ?>(cur, x, y, load_more) {
681
+ if (typeof load_more == "undefined") {
682
+ var load_more = false;
683
+ }
684
+ if (jQuery(cur).hasClass('disabled')) {
685
+ return false;
686
+ }
687
+ var items_county_<?php echo $current_view; ?> = <?php echo $items_county; ?>;
688
+ switch (y) {
689
+ case 1:
690
+ if (x >= items_county_<?php echo $current_view; ?>) {
691
+ document.getElementById('page_number_<?php echo $current_view; ?>').value = items_county_<?php echo $current_view; ?>;
692
+ }
693
+ else {
694
+ document.getElementById('page_number_<?php echo $current_view; ?>').value = x + 1;
695
+ }
696
+ break;
697
+ case 2:
698
+ document.getElementById('page_number_<?php echo $current_view; ?>').value = items_county_<?php echo $current_view; ?>;
699
+ break;
700
+ case -1:
701
+ if (x == 1) {
702
+ document.getElementById('page_number_<?php echo $current_view; ?>').value = 1;
703
+ }
704
+ else {
705
+ document.getElementById('page_number_<?php echo $current_view; ?>').value = x - 1;
706
+ }
707
+ break;
708
+ case -2:
709
+ document.getElementById('page_number_<?php echo $current_view; ?>').value = 1;
710
+ break;
711
+ default:
712
+ document.getElementById('page_number_<?php echo $current_view; ?>').value = 1;
713
+ }
714
+ wdi_spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $id; ?>', '<?php echo $album_gallery_id; ?>', '', '<?php echo $type; ?>', 0, '', '', load_more);
715
+ }
716
+ jQuery(document).ready(function() {
717
+
718
+ jQuery('.<?php echo $first_page; ?>').on('click', function() {
719
+ wdi_spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, -2);
720
+ });
721
+ jQuery('.<?php echo $prev_page; ?>').on('click', function() {
722
+ wdi_spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, -1);
723
+ return false;
724
+ });
725
+ jQuery('.<?php echo $next_page; ?>').on('click', function() {
726
+ wdi_spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, 1);
727
+ return false;
728
+ });
729
+ jQuery('.<?php echo $last_page; ?>').on('click', function() {
730
+ wdi_spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, 2);
731
+ });
732
+ jQuery('.wdi_load_btn_<?php echo $current_view; ?>').on('click', function() {
733
+ wdi_spider_page_<?php echo $current_view; ?>(this, <?php echo $page_number; ?>, 1, true);
734
+ return false;
735
+ });
736
+ });
737
+ </script>
738
+ </span>
739
+ <?php
740
+ }
741
+
742
+ public static function ajax_html_frontend_search_box($form_id, $current_view, $cur_gal_id, $images_count, $search_box_width = 180) {
743
+ $wdi_search = WDILibrary::get('wdi_search_' . $current_view, '');
744
+ $type = WDILibrary::get('type_' . $current_view, 'album');
745
+ $album_gallery_id = (int) WDILibrary::get('album_gallery_id_' . $current_view, 0);
746
+ ?>
747
+ <style>
748
+ .wdi_search_container_1 {
749
+ display: inline-block;
750
+ width: 100%;
751
+ text-align: right;
752
+ margin: 0 5px 20px 5px;
753
+ background-color: rgba(0,0,0,0);
754
+ }
755
+ .wdi_search_container_2 {
756
+ display: inline-block;
757
+ position: relative;
758
+ border-radius: 4px;
759
+ box-shadow: 0 0 3px 1px #CCCCCC;
760
+ background-color: #FFFFFF;
761
+ border: 1px solid #CCCCCC;
762
+ width: <?php echo $search_box_width; ?>px;
763
+ max-width: 100%;
764
+ }
765
+ #wdi_search_container_1_<?php echo $current_view; ?> #wdi_search_container_2_<?php echo $current_view; ?> .wdi_search_input_container {
766
+ display: block;
767
+ margin-right: 45px;
768
+ }
769
+ #wdi_search_container_1_<?php echo $current_view; ?> #wdi_search_container_2_<?php echo $current_view; ?> .wdi_search_loupe_container {
770
+ display: inline-block;
771
+ margin-right: 1px;
772
+ vertical-align: middle;
773
+ float: right;
774
+ padding-top: 3px;
775
+ }
776
+ #wdi_search_container_1_<?php echo $current_view; ?> #wdi_search_container_2_<?php echo $current_view; ?> .wdi_search_reset_container {
777
+ display: inline-block;
778
+ margin-right: 5px;
779
+ vertical-align: middle;
780
+ float: right;
781
+ padding-top: 3px;
782
+ }
783
+ #wdi_search_container_1_<?php echo $current_view; ?> #wdi_search_container_2_<?php echo $current_view; ?> .wdi_search,
784
+ #wdi_search_container_1_<?php echo $current_view; ?> #wdi_search_container_2_<?php echo $current_view; ?> .wdi_reset {
785
+ font-size: 18px;
786
+ color: #CCCCCC;
787
+ cursor: pointer;
788
+ }
789
+ #wdi_search_container_1_<?php echo $current_view; ?> #wdi_search_container_2_<?php echo $current_view; ?> .wdi_search_input_<?php echo $current_view; ?>,
790
+ #wdi_search_container_1_<?php echo $current_view; ?> #wdi_search_container_2_<?php echo $current_view; ?> .wdi_search_input_<?php echo $current_view; ?>:focus {
791
+ color: hsl(0, 1%, 3%);
792
+ outline: none;
793
+ border: none;
794
+ box-shadow: none;
795
+ background: none;
796
+ padding: 0 5px;
797
+ font-family: inherit;
798
+ width: 100%;
799
+ }
800
+ </style>
801
+ <script type="text/javascript">
802
+ function clear_input_<?php echo $current_view; ?> (current_view) {
803
+ jQuery("#wdi_search_input_" + current_view).val('');
804
+ }
805
+ function check_enter_key(e) {
806
+ var key_code = e.which || e.keyCode;
807
+ if (key_code == 13) {
808
+ wdi_spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1);
809
+ return false;
810
+ }
811
+ return true;
812
+ }
813
+ </script>
814
+ <div class="wdi_search_container_1" id="wdi_search_container_1_<?php echo $current_view; ?>">
815
+ <div class="wdi_search_container_2" id="wdi_search_container_2_<?php echo $current_view; ?>">
816
+ <span class="wdi_search_reset_container" >
817
+ <i title="<?php echo __('Reset', 'wd-instagram-feed'); ?>" class="wdi_reset tenweb-i tenweb-i-times" onclick="clear_input_<?php echo $current_view; ?>('<?php echo $current_view; ?>'),wdi_spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1)"></i>
818
+ </span>
819
+ <span class="wdi_search_loupe_container" >
820
+ <i title="<?php echo __('Search', 'wd-instagram-feed'); ?>" class="wdi_search tenweb-i tenweb-i-search" onclick="wdi_spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1)"></i>
821
+ </span>
822
+ <span class="wdi_search_input_container">
823
+ <input id="wdi_search_input_<?php echo $current_view; ?>" class="wdi_search_input_<?php echo $current_view; ?>" type="text" onkeypress="return check_enter_key(event ,this)" name="wdi_search_<?php echo $current_view; ?>" value="<?php echo $wdi_search; ?>" >
824
+ <input id="wdi_images_count_<?php echo $current_view; ?>" class="wdi_search_input" type="hidden" name="wdi_images_count_<?php echo $current_view; ?>" value="<?php echo $images_count; ?>" >
825
+ </span>
826
+ </div>
827
+ </div>
828
+ <?php
829
+ }
830
+
831
+ public static function ajax_html_frontend_sort_box($form_id, $current_view, $cur_gal_id, $sort_by = '', $search_box_width = 180) {
832
+ $wdi_search = WDILibrary::get('wdi_search_' . $current_view, '');
833
+ $type = WDILibrary::get('type_' . $current_view, 'album');
834
+ $album_gallery_id = (int) WDILibrary::get('album_gallery_id_' . $current_view, 'album');
835
+ ?>
836
+ <style>
837
+ .wdi_order_cont_<?php echo $current_view; ?> {
838
+ background-color: rgba(0,0,0,0);
839
+ display: block;
840
+ margin: 0 5px 20px 5px;
841
+ text-align: right;
842
+ width: 100%;
843
+ }
844
+ .wdi_order_label_<?php echo $current_view; ?> {
845
+ border: none;
846
+ box-shadow: none;
847
+ color: #BBBBBB;
848
+ font-family: inherit;
849
+ font-weight: bold;
850
+ outline: none;
851
+ }
852
+ .wdi_order_<?php echo $current_view; ?> {
853
+ background-color: #FFFFFF;
854
+ border: 1px solid #CCCCCC;
855
+ box-shadow: 0 0 3px 1px #CCCCCC;
856
+ border-radius: 4px;
857
+ max-width: 100%;
858
+ width: <?php echo $search_box_width; ?>px;
859
+ }
860
+ </style>
861
+ <div class="wdi_order_cont_<?php echo $current_view; ?>">
862
+ <span class="wdi_order_label_<?php echo $current_view; ?>"><?php echo __('Order by: ', 'wd-instagram-feed'); ?></span>
863
+ <select class="wdi_order_<?php echo $current_view; ?>" onchange="wdi_spider_frontend_ajax('<?php echo $form_id; ?>', '<?php echo $current_view; ?>', '<?php echo $cur_gal_id; ?>', <?php echo $album_gallery_id; ?>, '', '<?php echo $type; ?>', 1, '', this.value)">
864
+ <option <?php if ($sort_by == 'default') echo 'selected'; ?> value="default"><?php echo __('Default', 'wd-instagram-feed'); ?></option>
865
+ <option <?php if ($sort_by == 'filename') echo 'selected'; ?> value="filename"><?php echo __('Filename', 'wd-instagram-feed'); ?></option>
866
+ <option <?php if ($sort_by == 'size') echo 'selected'; ?> value="size"><?php echo __('Size', 'wd-instagram-feed'); ?></option>
867
+ <option <?php if ($sort_by == 'RAND()') echo 'selected'; ?> value="random"><?php echo __('Random', 'wd-instagram-feed'); ?></option>
868
+ </select>
869
+ </div>
870
+ <?php
871
+ }
872
+
873
+ public static function wdi_spider_hex2rgb($colour) {
874
+ if ($colour[0] == '#') {
875
+ $colour = substr( $colour, 1 );
876
+ }
877
+ if (strlen($colour) == 6) {
878
+ list( $r, $g, $b ) = array( $colour[0] . $colour[1], $colour[2] . $colour[3], $colour[4] . $colour[5]);
879
+ }
880
+ else if (strlen($colour) == 3) {
881
+ list($r, $g, $b) = array($colour[0] . $colour[0], $colour[1] . $colour[1], $colour[2] . $colour[2]);
882
+ }
883
+ else {
884
+ return FALSE;
885
+ }
886
+ $r = hexdec($r);
887
+ $g = hexdec($g);
888
+ $b = hexdec($b);
889
+ return array('red' => $r, 'green' => $g, 'blue' => $b);
890
+ }
891
+
892
+ public static function wdi_spider_redirect($url) {
893
+ ?>
894
+ <script>
895
+ window.location = "<?php echo $url; ?>";
896
+ </script>
897
+ <?php
898
+ exit();
899
+ }
900
+
901
+ /**
902
+ * Redirect.
903
+ *
904
+ * @param array $url
905
+ */
906
+ public static function redirect( $url = array() ) {
907
+ $url = html_entity_decode($url);
908
+ ?>
909
+ <script>window.location = "<?php echo $url; ?>";</script>
910
+ <?php
911
+ exit();
912
+ }
913
+
914
+ /**
915
+ * If string argument passed, put it into delimiters for AJAX response to separate from other data.
916
+ */
917
+
918
+ public static function delimit_wd_output($data) {
919
+
920
+ if(is_string ( $data )){
921
+ return "WD_delimiter_start". $data . "WD_delimiter_end";
922
+ }
923
+ else{
924
+ return $data;
925
+ }
926
+ }
927
+
928
+ public static function verify_nonce($page){
929
+
930
+ $nonce_verified = false;
931
+ $wdi_nonce = WDILibrary::get('wdi_nonce', '');
932
+ $_wpnonce = WDILibrary::get('_wpnonce', '');
933
+ if ( isset( $wdi_nonce ) && wp_verify_nonce( $wdi_nonce, $page )) {
934
+ $nonce_verified = true;
935
+ }
936
+ elseif ( isset( $_wpnonce ) && wp_verify_nonce( $_wpnonce, $page )) {
937
+ $nonce_verified = true;
938
+ }
939
+
940
+ return $nonce_verified;
941
+ }
942
+
943
+
944
+ public static function arrayToObject($d) {
945
+ if (is_array($d)) {
946
+ /*
947
+ * Return array converted to object
948
+ * Using __FUNCTION__ (Magic constant)
949
+ * for recursive call
950
+ */
951
+ return (object) array_map(array('WDILibrary','arrayToObject'), $d);
952
+ }
953
+ else {
954
+ // Return object
955
+ return $d;
956
+ }
957
+ }
958
+
959
+ public static function objectToArray($d) {
960
+ if (is_object($d)) {
961
+ // Gets the properties of the given object
962
+ // with get_object_vars function
963
+ $d = get_object_vars($d);
964
+ }
965
+
966
+ if (is_array($d)) {
967
+ /*
968
+ * Return array converted to object
969
+ * Using __FUNCTION__ (Magic constant)
970
+ * for recursive call
971
+ */
972
+ return array_map(array('WDILibrary','objectToArray'), $d);
973
+ }
974
+ else {
975
+ // Return array
976
+ return $d;
977
+ }
978
+ }
979
+
980
+
981
+ public static function keep_only_self_user($feed_row){
982
+ global $wdi_options;
983
+
984
+ if($feed_row['liked_feed'] == 'liked'){
985
+ $feed_row['nothing_to_display'] = '1';
986
+ return $feed_row;
987
+ }
988
+
989
+ $users = json_decode($feed_row['feed_users']);
990
+ $new_users_list = array();
991
+ $users_list = self::get_users_list();
992
+ if(is_array($users)) {
993
+ foreach($users as $i => $user) {
994
+ if(substr($user->username, 0, 1) === '#' || $user->username === $wdi_options['wdi_user_name'] || !empty($users_list[$user->username])) {
995
+ $new_users_list[] = $user;
996
+ }
997
+ }
998
+ }
999
+ $feed_row['nothing_to_display'] = (empty($new_users_list)) ? '1' : '0';
1000
+ $feed_row['feed_users'] = json_encode($new_users_list);
1001
+
1002
+ return $feed_row;
1003
+ }
1004
+
1005
+ /*
1006
+ * @return color if valid color, otherwise return false
1007
+ *
1008
+ */
1009
+
1010
+ public static function regexColor($color, $named) {
1011
+
1012
+ if ($named) {
1013
+
1014
+ $named = array('transparent','aliceblue', 'antiquewhite', 'aqua', 'aquamarine', 'azure', 'beige', 'bisque', 'black', 'blanchedalmond', 'blue', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'fuchsia', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'gray', 'green', 'greenyellow', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightsteelblue', 'lightyellow', 'lime', 'limegreen', 'linen', 'magenta', 'maroon', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'navy', 'oldlace', 'olive', 'olivedrab', 'orange', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'purple', 'red', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'silver', 'skyblue', 'slateblue', 'slategray', 'snow', 'springgreen', 'steelblue', 'tan', 'teal', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'white', 'whitesmoke', 'yellow', 'yellowgreen');
1015
+ if (in_array(strtolower($color), $named)) {
1016
+ /* A color name was entered instead of a Hex Value, so just exit function */
1017
+ return $color;
1018
+ }
1019
+ }
1020
+
1021
+ //checking rgb format
1022
+ if(self::is_rgb($color) == true){
1023
+ return $color;
1024
+ }
1025
+ if(substr($color,0,1) == '#' && strlen($color) === 4){
1026
+ $color.=substr($color,1,strlen($color));
1027
+ }
1028
+
1029
+ //Check for a hex color string '#c1c2b4'
1030
+ if(preg_match('/^#[a-f0-9]{6}$/i', $color)) //hex color is valid
1031
+ {
1032
+ return $color;
1033
+ }
1034
+
1035
+ //Check for a hex color string without hash 'c1c2b4'
1036
+ if(preg_match('/^[a-f0-9]{6}$/i', $color)) //hex color is valid
1037
+ {
1038
+ $fix_color = '#' . $color;
1039
+ return $fix_color;
1040
+ }
1041
+ return false;
1042
+ }
1043
+
1044
+ /**
1045
+ * Check is rgb color value
1046
+ * @param string
1047
+ * @return boolean
1048
+ */
1049
+ public static function is_rgb($val){
1050
+ //checking for rgb
1051
+ $rgbFlag = false;
1052
+ $rgbaFlag = false;
1053
+ if(substr($val,0,4) === 'rgb('){
1054
+ $values = explode(',',substr($val,4,strlen($val)-5));
1055
+ if(count($values) !== 3){
1056
+ return false;
1057
+ }
1058
+ foreach ($values as $value) {
1059
+ if(!is_numeric($value) || $value<0 || $value>255){
1060
+ $rgbFlag = true;
1061
+ }
1062
+ }
1063
+ if($rgbFlag === false){
1064
+ return true;
1065
+ }
1066
+ }
1067
+ else if(substr($val,0,5) === 'rgba('){
1068
+ $values = explode(',',substr($val,5,strlen($val)-6));
1069
+ if(count($values) !== 4){
1070
+ return false;
1071
+ }
1072
+ foreach ($values as $value) {
1073
+ if(!is_numeric($value) || $value<0 || $value>255){
1074
+ $rgbaFlag = true;
1075
+ }
1076
+ }
1077
+ if($rgbaFlag === false){
1078
+ return true;
1079
+ }
1080
+ }else{
1081
+ return false;
1082
+ }
1083
+ }
1084
+
1085
+ public static function get_page_link( $data ){
1086
+ $page = WDILibrary::get('page');
1087
+ $url = add_query_arg(array( 'page' => $page, $data ), admin_url('admin.php'));
1088
+ return $url;
1089
+ }
1090
+
1091
+ public static function get_shortcode_data() {
1092
+ global $wpdb;
1093
+ require_once WDI_DIR . "/admin/models/WDIModelEditorShortcode.php";
1094
+ $model = new WDIModelEditorShortcode();
1095
+
1096
+ $rows = $model->get_row_data();
1097
+ $gb_row = array();
1098
+ foreach ($rows as $row){
1099
+ $obj = new stdClass();
1100
+ $obj->id = $row->id;
1101
+ $obj->name = $row->feed_name;
1102
+ $gb_row[] = $obj;
1103
+ }
1104
+ $data = array();
1105
+ $data['shortcode_prefix'] = "wdi_feed";
1106
+ $data['inputs'][] = array(
1107
+ 'type' => 'select',
1108
+ 'id' => 'wdi_id',
1109
+ 'name' => 'wdi_id',
1110
+ 'shortcode_attibute_name' => 'id',
1111
+ 'options' => $gb_row,
1112
+ );
1113
+ return json_encode($data);
1114
+ }
1115
+
1116
+ /**
1117
+ * Add auth button.
1118
+ *
1119
+ * @param string $text
1120
+ */
1121
+ public static function add_auth_button( $text = "" ) {
1122
+ $app_config = WDILibrary::instagram_app_config();
1123
+ $href = $app_config['authorize'] . '?app_id=' . $app_config['app_id'] . '&redirect_uri=' . $app_config['redirect_uri'] . '&response_type=code&scope=user_profile,user_media&state=' . admin_url('admin.php?wdi_settings');
1124
+ ?>
1125
+ <a href="<?php echo $href; ?>" onclick="document.cookie='wdi_autofill=true'" class="wdi_sign_in_button"><?php echo $text; ?></a>
1126
+ <?php
1127
+ }
1128
+
1129
+ public static function get_users_list(){
1130
+ global $wdi_options;
1131
+ $users_list = array();
1132
+ if(!empty($wdi_options['wdi_authenticated_users_list'])){
1133
+ $users_list = json_decode($wdi_options['wdi_authenticated_users_list'], true);
1134
+ if(!is_array($users_list)){
1135
+ $users_list = array();
1136
+ }
1137
+ }
1138
+ return $users_list;
1139
+ }
1140
+
1141
+ public static function get_user_access_token($users){
1142
+ global $wdi_options;
1143
+ $users_list = self::get_users_list();
1144
+ foreach($users as $user) {
1145
+ if(substr($user->username, 0, 1) === '#') {
1146
+ continue;
1147
+ }
1148
+
1149
+ if(!empty($users_list[$user->username])) {
1150
+ return $users_list[$user->username]['access_token'];
1151
+ }
1152
+
1153
+ }
1154
+
1155
+ return $wdi_options['wdi_access_token'];
1156
+ }
1157
+
1158
+ public static function localize_script($object_name, $l10n){
1159
+ foreach ( (array) $l10n as $key => $value ) {
1160
+ if ( !is_scalar($value) )
1161
+ continue;
1162
+
1163
+ $l10n[$key] = html_entity_decode( (string) $value, ENT_QUOTES, 'UTF-8');
1164
+ }
1165
+
1166
+ $script = "var $object_name = " . wp_json_encode( $l10n ) . ';';
1167
+ $script = "<script>" . $script . "</script>";
1168
+ echo $script;
1169
+ }
1170
+
1171
+ public static function elementor_is_active(){
1172
+
1173
+ if((isset($_REQUEST['action']) && in_array($_REQUEST['action'], array('elementor', 'elementor_ajax'))) || (isset($_REQUEST['elementor-preview']))) {
1174
+ return true;
1175
+ }
1176
+
1177
+ return false;
1178
+ }
1179
+
1180
+ public static function is_ajax(){
1181
+
1182
+ //todo add themes
1183
+ if(defined('DOING_AJAX') && DOING_AJAX) {
1184
+ return true;
1185
+ }
1186
+
1187
+ return false;
1188
+ }
1189
+
1190
+ public static function instagram_app_config() {
1191
+ $config = array(
1192
+ 'code' => '',
1193
+ 'app_id' => '734781953985462',
1194
+ 'redirect_uri' => 'https://instagram-api.10web.io/instagram/personal/',
1195
+ 'authorize' => 'https://api.instagram.com/oauth/authorize/',
1196
+ 'access_token' => 'https://api.instagram.com/oauth/access_token/',
1197
+ 'refresh_access_token' => 'https://graph.instagram.com/refresh_access_token/',
1198
+ );
1199
+
1200
+ return $config;
1201
+ }
1202
+
1203
+ /**
1204
+ * Get instagram access token.
1205
+ *
1206
+ * @param array $args
1207
+ *
1208
+ * @return array|mixed
1209
+ */
1210
+
1211
+ public static function get_instagram_access( $access_token ) {
1212
+ $config = self::instagram_app_config();
1213
+ $response = wp_remote_get( $config['refresh_access_token'] . '?grant_type=ig_refresh_token&access_token=' . $access_token );
1214
+ $response = json_decode( wp_remote_retrieve_body( $response ), true );
1215
+
1216
+ return $response;
1217
+ }
1218
+
1219
+ /**
1220
+ * Refresh access token.
1221
+ *
1222
+ * @return array|bool|mixed|WP_Error
1223
+ */
1224
+ public static function refresh_instagram_access_token() {
1225
+ global $wdi_options;
1226
+ if ( !empty($wdi_options['wdi_access_token']) ) {
1227
+ $config = self::instagram_app_config();
1228
+ $response = wp_remote_get($config['refresh_access_token'] . '?grant_type=ig_refresh_token&access_token=' . $wdi_options['wdi_access_token']);
1229
+ $response = json_decode(wp_remote_retrieve_body($response), TRUE);
1230
+ if ( !empty($response['expires_in']) && !empty($response['access_token']) ) {
1231
+ $wdi_options['wdi_start_in'] = time();
1232
+ $wdi_options['wdi_expires_in'] = $response['expires_in'];
1233
+ $wdi_options['wdi_access_token'] = $response['access_token'];
1234
+ update_option(WDI_OPT, $wdi_options);
1235
+
1236
+ return $response;
1237
+ }
1238
+ }
1239
+
1240
+ return FALSE;
1241
+ }
1242
+
1243
+ /**
1244
+ * Get instagram user.
1245
+ *
1246
+ * @param $access_token
1247
+ *
1248
+ * @return array|mixed|WP_Error
1249
+ */
1250
+ public static function get_instagram_user( $access_token ) {
1251
+ $response = wp_remote_get( 'https://graph.instagram.com/me/?fields=id,username&access_token=' . $access_token );
1252
+ $response = json_decode( wp_remote_retrieve_body( $response ), true );
1253
+
1254
+ return $response;
1255
+ }
1256
+
1257
+ /**
1258
+ * Generate top bar.
1259
+ *
1260
+ * @return string Top bar html.
1261
+ */
1262
+ public static function topbar() {
1263
+ $page = isset($_GET['page']) ? esc_html($_GET['page']) : '';
1264
+ $user_guide_link = 'https://help.10web.io/hc/en-us/articles/';
1265
+ $show_guide_link = true;
1266
+ $description = "";
1267
+ switch ($page) {
1268
+ case 'wdi_feeds': {
1269
+ $user_guide_link .= '360016497251-Creating-Instagram-Feed';
1270
+ $description .= __('This section allows you to create, edit and delete Feeds.', WD_WDI_PREFIX);
1271
+ break;
1272
+ }
1273
+ case 'wdi_themes': {
1274
+ $user_guide_link .= '360016277832';
1275
+ $description .= __('This section allows you to create, edit and delete Themes.', WD_WDI_PREFIX);
1276
+ break;
1277
+ }
1278
+ case 'wdi_settings': {
1279
+ $user_guide_link .= '360016277532-Configuring-Instagram-Access-Token';
1280
+ $description .= __('This section allows you to set API parameters.', WD_WDI_PREFIX);
1281
+ break;
1282
+ }
1283
+ default: {
1284
+ return '';
1285
+ break;
1286
+ }
1287
+ }
1288
+ $user_guide_link .= '?utm_source=instagram_feed&amp;utm_medium=free_plugin';
1289
+ $support_forum_link = 'https://wordpress.org/support/plugin/wd-instagram-feed/#new-post';
1290
+ $premium_link = 'https://10web.io/plugins/wordpress-instagram-feed/?utm_source=instagram_feed&amp;utm_medium=free_plugin';
1291
+ wp_enqueue_style(WD_WDI_PREFIX . '-roboto');
1292
+ wp_enqueue_style(WD_WDI_PREFIX . '-pricing');
1293
+ ob_start();
1294
+ ?>
1295
+ <div class="wrap">
1296
+ <h1 class="head-notice">&nbsp;</h1>
1297
+ <div class="topbar-container">
1298
+ <?php
1299
+ if ( !WDI_IS_PRO ) {
1300
+ ?>
1301
+ <div class="topbar topbar-content">
1302
+ <div class="topbar-content-container">
1303
+ <div class="topbar-content-title">
1304
+ <?php _e('Instagram Feed by 10Web Premium', WD_WDI_PREFIX); ?>
1305
+ </div>
1306
+ <div class="topbar-content-body">
1307
+ <?php echo $description; ?>
1308
+ </div>
1309
+ </div>
1310
+ <div class="topbar-content-button-container">
1311
+ <a href="<?php echo $premium_link; ?>" target="_blank" class="topbar-upgrade-button"><?php _e( 'Upgrade',WD_WDI_PREFIX ); ?></a>
1312
+ </div>
1313
+ </div>
1314
+ <?php
1315
+ }
1316
+ ?>
1317
+ <div class="topbar_cont">
1318
+ <?php
1319
+ if ( $show_guide_link ) {
1320
+ ?>
1321
+ <div class="topbar topbar-links">
1322
+ <div class="topbar-links-container">
1323
+ <a href="<?php echo $user_guide_link; ?>" target="_blank" class="topbar_user_guid">
1324
+ <div class="topbar-links-item">
1325
+ <?php _e('User guide', WD_WDI_PREFIX); ?>
1326
+ </div>
1327
+ </a>
1328
+ </div>
1329
+ </div>
1330
+ <?php
1331
+ }
1332
+ if ( !WDI_IS_PRO ) {
1333
+ ?>
1334
+ <div class="topbar topbar-links topbar_support_forum">
1335
+ <div class="topbar-links-container">
1336
+ <a href="<?php echo $support_forum_link; ?>" target="_blank" class="topbar_support_forum">
1337
+ <div class="topbar-links-item">
1338
+ <img src="<?php echo WDI_URL . '/images/help.svg'; ?>" class="help_icon" />
1339
+ <?php _e('Ask a question', WD_WDI_PREFIX); ?>
1340
+ </div>
1341
+ </a>
1342
+ </div>
1343
+ </div>
1344
+ <?php
1345
+ }
1346
+ ?>
1347
+ </div>
1348
+ </div>
1349
+ </div>
1350
+ <?php
1351
+ echo ob_get_clean();
1352
+ }
1353
  }
framework/WDILibraryEmbed.php CHANGED
@@ -1,960 +1,923 @@
1
- <?php
2
-
3
- /**
4
- * Class for handling embedded media in gallery
5
- *
6
- */
7
-
8
- class WDILibraryEmbed {
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- // Events //
11
- ////////////////////////////////////////////////////////////////////////////////////////
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- // Constants //
14
- ////////////////////////////////////////////////////////////////////////////////////////
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- // Variables //
17
- ////////////////////////////////////////////////////////////////////////////////////////
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Constructor & Destructor //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function __construct() {
22
- }
23
-
24
-
25
- ////////////////////////////////////////////////////////////////////////////////////////
26
- // Public Methods //
27
- ////////////////////////////////////////////////////////////////////////////////////////
28
- ////////////////////////////////////////////////////////////////////////////////////////
29
- // Getters & Setters //
30
- ////////////////////////////////////////////////////////////////////////////////////////
31
-
32
- public function get_provider($oembed, $url, $args = '') {
33
- $provider = false;
34
- if (!isset($args['discover'])) {
35
- $args['discover'] = true;
36
- }
37
- foreach ($oembed->providers as $matchmask => $data ) {
38
- list( $providerurl, $regex ) = $data;
39
- // Turn the asterisk-type provider URLs into regex
40
- if ( !$regex ) {
41
- $matchmask = '#' . str_replace( '___wildcard___', '(.+)', preg_quote( str_replace( '*', '___wildcard___', $matchmask ), '#' ) ) . '#i';
42
- $matchmask = preg_replace( '|^#http\\\://|', '#https?\://', $matchmask );
43
- }
44
- if ( preg_match( $matchmask, $url ) ) {
45
- $provider = str_replace( '{format}', 'json', $providerurl ); // JSON is easier to deal with than XML
46
- break;
47
- }
48
- }
49
- if ( !$provider && $args['discover'] ) {
50
- $provider = $oembed->discover($url);
51
- }
52
- return $provider;
53
- }
54
-
55
- /**
56
- * check host and get data for a given url
57
- * @return encode_json(associative array of data) on success
58
- * @return encode_json(array[false, "error message"]) on failure
59
- *
60
- * EMBED TYPES
61
- *
62
- * EMBED_OEMBED_YOUTUBE_VIDEO
63
- * EMBED_OEMBED_VIMEO_VIDEO
64
- * EMBED_OEMBED_DAILYMOTION_VIDEO
65
- * EMBED_OEMBED_INSTAGRAM_IMAGE
66
- * EMBED_OEMBED_INSTAGRAM_VIDEO
67
- * EMBED_OEMBED_INSTAGRAM_POST
68
- * EMBED_OEMBED_FLICKR_IMAGE
69
- *
70
- * RULES FOR NEW TYPES
71
- *
72
- * 1. begin type name with EMBED_
73
- * 2. if using WP native OEMBED class, add _OEMBED then
74
- * 3. add provider name
75
- * 4. add _VIDEO, _IMAGE FOR embedded media containing only video or image
76
- * 5. add _DIRECT_URL from static URL of image (not implemented yet)
77
- *
78
- */
79
-
80
- public static function add_embed($url) {
81
-
82
- $url = sanitize_text_field(urldecode($url));
83
-
84
-
85
- $embed_type = '';
86
- $host = '';
87
- /*returns this array*/
88
- $embedData = array(
89
- 'name' => '',
90
- 'description' => '',
91
- 'filename' => '',
92
- 'url' => '',
93
- 'reliative_url' => '',
94
- 'thumb_url' => '',
95
- 'thumb' => '',
96
- 'size' => '',
97
- 'filetype' => '',
98
- 'date_modified' => '',
99
- 'resolution' => '',
100
- 'redirect_url' => '');
101
-
102
- $accepted_oembeds = array(
103
- 'YOUTUBE' => '/youtube/',
104
- 'VIMEO' => '/vimeo/',
105
- 'FLICKR' => '/flickr/',
106
- 'INSTAGRAM' => '/instagram/',
107
- 'DAILYMOTION' => '/dailymotion/'
108
- );
109
-
110
- /*check if we can embed this using wordpress class WP_oEmbed */
111
- if ( !function_exists( '_wp_oembed_get_object' ) )
112
- include( ABSPATH . WPINC . '/class-oembed.php' );
113
- // get an oembed object
114
- $oembed = _wp_oembed_get_object();
115
- if (method_exists($oembed, 'get_provider')) {
116
- // Since 4.0.0
117
- $provider = $oembed->get_provider($url);
118
- }
119
- else {
120
- $provider = self::get_provider($oembed, $url);
121
- }
122
- foreach ($accepted_oembeds as $oembed_provider => $regex) {
123
- if(preg_match($regex, $provider)==1){
124
- $host = $oembed_provider;
125
- }
126
- }
127
- /*return json_encode($host); for test*/
128
-
129
- /*handling oembed cases*/
130
- if($host){
131
- /*instagram is exception*/
132
- /*standard oembed fetching does not return thumbnail_url! so we do it manually*/
133
- if($host == 'INSTAGRAM' && substr($url,-4)!='post' && substr($url,-4!='POST')){
134
- $embed_type = 'EMBED_OEMBED_INSTAGRAM';
135
-
136
- $insta_host_and_id= strtok($url, '/')."/".strtok('/')."/".strtok('/')."/".strtok('/');
137
- $insta_host= strtok($url, '/')."/".strtok('/')."/".strtok('/')."/";
138
- $filename = str_replace($insta_host, "", $insta_host_and_id);
139
-
140
- $get_embed_data = wp_remote_get("http://api.instagram.com/oembed?url=http://instagram.com/p/".$filename);
141
- if ( is_wp_error( $get_embed_data ) ) {
142
- return json_encode(array("error", "cannot get Instagram data"));
143
- }
144
- $result = json_decode(wp_remote_retrieve_body($get_embed_data));
145
- if(empty($result)){
146
- return json_encode(array("error", wp_remote_retrieve_body($get_embed_data)));
147
- }
148
-
149
-
150
- $embedData = array(
151
- 'name' => htmlspecialchars($result->title),
152
- 'description' => htmlspecialchars($result->title),
153
- 'filename' => $filename,
154
- 'url' => $url,
155
- 'reliative_url' => $url,
156
- 'thumb_url' => $result->thumbnail_url,
157
- 'thumb' => $result->thumbnail_url,
158
- 'size' => '',
159
- 'filetype' => $embed_type,
160
- 'date_modified' => date('d F Y, H:i'),
161
- 'resolution' => $result->thumbnail_width." x ".$result->thumbnail_height." px",
162
- 'redirect_url' => ''
163
- );
164
-
165
- /*get instagram post html page, parse its DOM to find video URL*/
166
- $DOM = new DOMDocument;
167
- libxml_use_internal_errors(true);
168
- $html_code = wp_remote_get($url);
169
- if ( is_wp_error( $html_code ) ) {
170
- return json_encode(array("error", "cannot get Instagram data"));
171
- }
172
- $html_body = wp_remote_retrieve_body($html_code);
173
- if(empty($html_body)){
174
- return json_encode(array("error", wp_remote_retrieve_body($html_code)));
175
- }
176
-
177
- $DOM->loadHTML($html_body);
178
- $finder = new DomXPath($DOM);
179
- $query = "//meta[@property='og:video']";
180
- $nodes = $finder->query($query);
181
- $node = $nodes->item(0);
182
- if($node){
183
- $length = $node->attributes->length;
184
-
185
- for ($i = 0; $i < $length; ++$i) {
186
- $name = $node->attributes->item($i)->name;
187
- $value = $node->attributes->item($i)->value;
188
-
189
- if($name == 'content'){
190
- $filename = $value;
191
- }
192
- }
193
- $embedData['filename'] = $filename;
194
- $embedData['filetype'] .= '_VIDEO';
195
- }
196
- else{
197
- $embedData['filetype'] .= '_IMAGE';
198
- }
199
-
200
- return json_encode($embedData);
201
- }
202
- if($host == 'INSTAGRAM' && (substr($url,-4)=='post'||substr($url,-4)=='POST')){
203
- /*check if instagram post*/
204
- $url = substr($url,0,-4);
205
- $embed_type = 'EMBED_OEMBED_INSTAGRAM_POST';
206
- parse_str( parse_url( $url, PHP_URL_QUERY ), $my_array_of_vars );
207
- $matches = array();
208
- $filename = '';
209
- $regex = "/^.*?instagram\.com\/p\/(.*?)[\/]?$/";
210
- if(preg_match($regex, $url, $matches)){
211
- $filename = $matches[1];
212
- }
213
- $get_embed_data = wp_remote_get("http://api.instagram.com/oembed?url=http://instagram.com/p/".$filename);
214
- if ( is_wp_error( $get_embed_data ) ) {
215
- return json_encode(array("error", "cannot get Instagram data"));
216
- }
217
- $result = json_decode(wp_remote_retrieve_body($get_embed_data));
218
- if(empty($result)){
219
- return json_encode(array("error", wp_remote_retrieve_body($get_embed_data)));
220
- }
221
-
222
- $embedData = array(
223
- 'name' => htmlspecialchars($result->title),
224
- 'description' => htmlspecialchars($result->title),
225
- 'filename' => $filename,
226
- 'url' => $url,
227
- 'reliative_url' => $url,
228
- 'thumb_url' => $result->thumbnail_url,
229
- 'thumb' => $result->thumbnail_url,
230
- 'size' => '',
231
- 'filetype' => $embed_type,
232
- 'date_modified' => date('d F Y, H:i'),
233
- 'resolution' => $result->width." x ".$result->width." px",
234
- 'redirect_url' => '');
235
-
236
- return json_encode($embedData);
237
- }
238
-
239
- $result = $oembed->fetch( $provider, $url);
240
- /*no data fetched for a known provider*/
241
- if(!$result){
242
- return json_encode(array("error", "please enter ". $host . " correct single media URL"));
243
- }
244
- else{/*one of known oembed types*/
245
- $embed_type = 'EMBED_OEMBED_'.$host;
246
- switch ($embed_type) {
247
- case 'EMBED_OEMBED_YOUTUBE':
248
- $youtube_regex = "#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v\/)[^&\n]+|(?<=v=)[^&\n]+|(?<=youtu.be/)[^&\n]+#";
249
- $matches = array();
250
- preg_match($youtube_regex , $url , $matches);
251
- $filename = $matches[0];
252
-
253
- $embedData = array(
254
- 'name' => htmlspecialchars($result->title),
255
- 'description' => htmlspecialchars($result->title),
256
- 'filename' => $filename,
257
- 'url' => $url,
258
- 'reliative_url' => $url,
259
- 'thumb_url' => $result->thumbnail_url,
260
- 'thumb' => $result->thumbnail_url,
261
- 'size' => '',
262
- 'filetype' => $embed_type."_VIDEO",
263
- 'date_modified' => date('d F Y, H:i'),
264
- 'resolution' => $result->width." x ".$result->height." px",
265
- 'redirect_url' => '');
266
-
267
- return json_encode($embedData);
268
-
269
- break;
270
- case 'EMBED_OEMBED_VIMEO':
271
-
272
- $embedData = array(
273
- 'name' => htmlspecialchars($result->title),
274
- 'description' => htmlspecialchars($result->title),
275
- 'filename' => $result->video_id,
276
- 'url' => $url,
277
- 'reliative_url' => $url,
278
- 'thumb_url' => $result->thumbnail_url,
279
- 'thumb' => $result->thumbnail_url,
280
- 'size' => '',
281
- 'filetype' => $embed_type."_VIDEO",
282
- 'date_modified' => date('d F Y, H:i'),
283
- 'resolution' => $result->width." x ".$result->height." px",
284
- 'redirect_url' => '');
285
-
286
- return json_encode($embedData);
287
-
288
- break;
289
- case 'EMBED_OEMBED_FLICKR':
290
- $matches = preg_match('~^.+/(\d+)~',$url,$matches);
291
- $filename = $matches[1];
292
- /*if($result->type =='photo')
293
- $embed_type .= '_IMAGE';
294
- if($result->type =='video')
295
- $embed_type .= '_VIDEO';*/
296
- /*flickr video type not implemented yet*/
297
- $embed_type .= '_IMAGE';
298
-
299
- $embedData = array(
300
- 'name' => htmlspecialchars($result->title),
301
- 'description' => htmlspecialchars($result->title),
302
- 'filename' =>substr($result->thumbnail_url, 0, -5)."b.jpg",
303
- 'url' => $url,
304
- 'reliative_url' => $url,
305
- 'thumb_url' => $result->thumbnail_url,
306
- 'thumb' => $result->thumbnail_url,
307
- 'size' => '',
308
- 'filetype' => $embed_type,
309
- 'date_modified' => date('d F Y, H:i'),
310
- 'resolution' => $result->width." x ".$result->height." px",
311
- 'redirect_url' => '');
312
-
313
- return json_encode($embedData);
314
- break;
315
-
316
- case 'EMBED_OEMBED_DAILYMOTION':
317
- $filename = strtok(basename($url), '_');
318
-
319
- $embedData = array(
320
- 'name' => htmlspecialchars($result->title),
321
- 'description' => htmlspecialchars($result->title),
322
- 'filename' => $filename,
323
- 'url' => $url,
324
- 'reliative_url' => $url,
325
- 'thumb_url' => $result->thumbnail_url,
326
- 'thumb' => $result->thumbnail_url,
327
- 'size' => '',
328
- 'filetype' => $embed_type."_VIDEO",
329
- 'date_modified' => date('d F Y, H:i'),
330
- 'resolution' => $result->width." x ".$result->height." px",
331
- 'redirect_url' => '');
332
-
333
- return json_encode($embedData);
334
-
335
- break;
336
- case 'EMBED_OEMBED_GETTYIMAGES':
337
- /*not working yet*/
338
- $filename = strtok(basename($url), '_');
339
-
340
- $embedData = array(
341
- 'name' => htmlspecialchars($result->title),
342
- 'description' => htmlspecialchars($result->title),
343
- 'filename' => $filename,
344
- 'url' => $url,
345
- 'reliative_url' => $url,
346
- 'thumb_url' => $result->thumbnail_url,
347
- 'thumb' => $result->thumbnail_url,
348
- 'size' => '',
349
- 'filetype' => $embed_type,
350
- 'date_modified' => date('d F Y, H:i'),
351
- 'resolution' => $result->width." x ".$result->height." px",
352
- 'redirect_url' => '');
353
-
354
- return json_encode($embedData);
355
-
356
- default:
357
- return json_encode(array("error", "unknown URL host"));
358
- break;
359
- }
360
- }
361
- }/*end of oembed cases*/
362
- else {
363
- /*check for direct image url*/
364
- /*check if something else*/
365
- /*not implemented yet*/
366
- return json_encode(array("error", "unknown URL"));
367
- }
368
- return json_encode(array("error", "unknown URL"));
369
- }
370
-
371
-
372
- /**
373
- * client side analogue is function wdi_spider_display_embed in wdi_embed.js
374
- *
375
- * @param embed_type: string , one of predefined accepted types
376
- * @param embed_id: string, id of media in corresponding host, or url if no unique id system is defined for host
377
- * @param attrs: associative array with html attributes and values format e.g. array('width'=>"100px", 'style'=>"display:inline;")
378
- *
379
- */
380
-
381
- public static function display_embed($embed_type, $embed_id='', $attrs = array(), $carousel_media = null) {
382
- $html_to_insert = '';
383
-
384
- switch ($embed_type) {
385
- case 'EMBED_OEMBED_YOUTUBE_VIDEO':
386
- $oembed_youtube_html ='<iframe ';
387
- if($embed_id!=''){
388
- $oembed_youtube_html .= ' src="' . '//www.youtube.com/embed/'. $embed_id . '?enablejsapi=1&wmode=transparent"';
389
- }
390
- foreach ($attrs as $attr => $value) {
391
- if(preg_match('/src/i', $attr)===0){
392
- if($attr != '' && $value != ''){
393
- $oembed_youtube_html .= ' '. $attr . '="'. $value . '"';
394
- }
395
- }
396
- }
397
- $oembed_youtube_html .= " ></iframe>";
398
- $html_to_insert .= $oembed_youtube_html;
399
- break;
400
- case 'EMBED_OEMBED_VIMEO_VIDEO':
401
- $oembed_vimeo_html ='<iframe ';
402
- if($embed_id!=''){
403
- $oembed_vimeo_html .= ' src="' . '//player.vimeo.com/video/'. $embed_id . '?enablejsapi=1"';
404
- }
405
- foreach ($attrs as $attr => $value) {
406
- if(preg_match('/src/i', $attr)===0){
407
- if($attr != '' && $value != ''){
408
- $oembed_vimeo_html .= ' '. $attr . '="'. $value . '"';
409
- }
410
- }
411
- }
412
- $oembed_vimeo_html .= " ></iframe>";
413
- $html_to_insert .= $oembed_vimeo_html;
414
- break;
415
- case 'EMBED_OEMBED_FLICKR_IMAGE':
416
- $oembed_flickr_html ='<div ';
417
- foreach ($attrs as $attr => $value) {
418
- if(preg_match('/src/i', $attr)===0){
419
- if($attr != '' && $value != ''){
420
- $oembed_flickr_html .= ' '. $attr . '="'. $value . '"';
421
- }
422
- }
423
- }
424
- $oembed_flickr_html .= " >";
425
- if($embed_id!=''){
426
- $oembed_flickr_html .= '<img src="'.$embed_id.'"'.
427
- ' style="'.
428
- 'max-width:'.'100%'." !important".
429
- '; max-height:'.'100%'." !important".
430
- '; width:'.'auto !important'.
431
- '; height:'. 'auto !important' .
432
- ';">';
433
- }
434
- $oembed_flickr_html .="</div>";
435
-
436
- $html_to_insert .= $oembed_flickr_html;
437
- break;
438
- case 'EMBED_OEMBED_FLICKR_VIDEO':
439
- # code...not implemented yet
440
- break;
441
- case 'EMBED_OEMBED_INSTAGRAM_VIDEO':
442
- $oembed_instagram_html ='<div ';
443
- foreach ($attrs as $attr => $value) {
444
- if(preg_match('/src/i', $attr)===0){
445
- if($attr != '' && $value != ''){
446
- $oembed_instagram_html .= ' '. $attr . '="'. $value . '"';
447
- }
448
- }
449
- }
450
- $oembed_instagram_html .= " >";
451
- if($embed_id!=''){
452
- $oembed_instagram_html .= '<video onclick="wdi_play_pause(jQuery(this));" style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls>'.
453
- '<source src="'. $embed_id .
454
- '" type="video/mp4"> Your browser does not support the video tag. </video>';
455
- }
456
- $oembed_instagram_html .="</div>";
457
- $html_to_insert .= $oembed_instagram_html;
458
- break;
459
- case 'EMBED_OEMBED_INSTAGRAM_IMAGE':
460
- $oembed_instagram_html ='<div ';
461
- foreach ($attrs as $attr => $value) {
462
- if(preg_match('/src/i', $attr)===0){
463
- if($attr != '' && $value != ''){
464
- $oembed_instagram_html .= ' '. $attr . '="'. $value . '"';
465
- }
466
- }
467
- }
468
- $oembed_instagram_html .= " >";
469
- if(!is_null($carousel_media) && count($carousel_media)){
470
- foreach($carousel_media as $key => $media){
471
- if($media["type"] == "image"){
472
- $oembed_instagram_html .= '<img src="'.$media["images"]["standard_resolution"]["url"].'"'.
473
- ' style="'.
474
- 'max-width:'.'100%'." !important".
475
- '; max-height:'.'100%'." !important".
476
- '; width:'.'auto !important'.
477
- '; height:'. 'auto !important' .
478
- ';" data-id="' . $key . '" class="carousel_media ' . ($key == 0 ? "active" : "") . '">';
479
- } elseif($media["type"] == "video"){
480
- $oembed_instagram_html .= '<video onclick="wdi_play_pause(jQuery(this));" style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls data-id="' . $key . '" class="carousel_media ' . ($key == 0 ? "active" : "") . '">'.
481
- '<source src="'. $media["videos"]["standard_resolution"]["url"] .
482
- '" type="video/mp4"> Your browser does not support the video tag. </video>';
483
- }
484
- }
485
- } else {
486
- if($embed_id!=''){
487
- $oembed_instagram_html .= '<img src="//instagram.com/p/'.$embed_id.'/media/?size=l"'.
488
- ' style="'.
489
- 'max-width:'.'100%'." !important".
490
- '; max-height:'.'100%'." !important".
491
- '; width:'.'auto !important'.
492
- '; height:'. 'auto !important' .
493
- ';">';
494
- }
495
- }
496
- $oembed_instagram_html .="</div>";
497
- $html_to_insert .= $oembed_instagram_html;
498
- break;
499
- case 'EMBED_OEMBED_INSTAGRAM_POST':
500
- $oembed_instagram_html ='<div ';
501
- $id = '';
502
- foreach ($attrs as $attr => $value) {
503
- if(preg_match('/src/i', $attr)===0){
504
- if($attr != '' && $value != ''){
505
- $oembed_instagram_html .= ' '. $attr . '="'. $value . '"';
506
- if($attr == 'class' || $attr =='CLASS' || $attr =='Class'){
507
- $class = $value;
508
- }
509
- }
510
- }
511
- }
512
- $oembed_instagram_html .= " >";
513
- if($embed_id!=''){
514
- $oembed_instagram_html .= '<iframe class="inner_instagram_iframe_'.$class.'" src="//instagr.am/p/'.$embed_id.'/embed/?enablejsapi=1"'.
515
- ' style="'.
516
- 'max-width:'.'100%'." !important".
517
- '; max-height:'.'100%'." !important".
518
- '; width:'.'100%'.
519
- '; height:'. '100%' .
520
- '; margin:0'.
521
- '; display:table-cell; vertical-align:middle;"'.
522
- 'frameborder="0" scrolling="no" allowtransparency="false" allowfullscreen'.
523
- '></iframe>';
524
- }
525
- $oembed_instagram_html .="</div>";
526
- $html_to_insert .= $oembed_instagram_html;
527
- break;
528
- case 'EMBED_OEMBED_DAILYMOTION_VIDEO':
529
- $oembed_dailymotion_html ='<iframe ';
530
- if($embed_id!=''){
531
- $oembed_dailymotion_html .= ' src="' . '//www.dailymotion.com/embed/video/'. $embed_id . '?api=postMessage"';
532
- }
533
- foreach ($attrs as $attr => $value) {
534
- if(preg_match('/src/i', $attr)===0){
535
- if($attr != '' && $value != ''){
536
- $oembed_dailymotion_html .= ' '. $attr . '="'. $value . '"';
537
- }
538
- }
539
- }
540
- $oembed_dailymotion_html .= " ></iframe>";
541
- $html_to_insert .= $oembed_dailymotion_html;
542
- break;
543
- default:
544
- # code...
545
- break;
546
- }
547
-
548
- echo $html_to_insert;
549
-
550
- }
551
-
552
-
553
- /**
554
- *
555
- * @return json_encode(array("error","error message")) on failure
556
- * @return json_encode(array of data of instagram user recent posts) on success
557
- */
558
- public static function add_instagram_gallery($instagram_user, $client_id, $whole_post, $autogallery_image_number) {
559
-
560
- $instagram_user = sanitize_text_field(urldecode($instagram_user));
561
- $instagram_user_response = wp_remote_get("https://api.instagram.com/v1/users/search?q=".$instagram_user."&client_id=".$client_id."&count=1");
562
- if ( is_wp_error( $instagram_user_response ) ) {
563
- return json_encode(array("error", "cannot get Instagram user parameters"));
564
- }
565
- $user_json = wp_remote_retrieve_body($instagram_user_response);
566
- $response_code = json_decode($user_json)->meta->code;
567
-
568
- /*
569
- instagram API returns
570
-
571
- *wrong username
572
- {"meta":{"code":200},"data":[]}
573
-
574
- *wrong client_id
575
- {"meta":{"error_type":"OAuthParameterException","code":400,"error_message":"The client_id provided is invalid and does not match a valid application."}}
576
-
577
- */
578
-
579
- if($response_code != 200){
580
- return json_encode(array("error", json_decode($user_json)->meta->error_message));
581
- }
582
-
583
-
584
- if(!property_exists(json_decode($user_json), 'data')){
585
- return json_encode(array("error", "cannot get Instagram user parameters"));
586
- }
587
- if(empty(json_decode($user_json)->data)){
588
- return json_encode(array("error", "wrong Instagram username"));
589
- }
590
- $user_data = json_decode($user_json)->data[0];
591
- $user_id = $user_data->id;
592
-
593
-
594
- $instagram_posts_response = wp_remote_get("https://api.instagram.com/v1/users/".$user_id."/media/recent/?client_id=".$client_id."&count=".$autogallery_image_number);
595
- if ( is_wp_error( $instagram_posts_response ) ) {
596
- return json_encode(array("error", "cannot get Instagram user posts"));
597
- }
598
- $posts_json = wp_remote_retrieve_body($instagram_posts_response);
599
- $response_code = json_decode($posts_json)->meta->code;
600
-
601
- /*
602
- instagram API returns
603
-
604
- *private user
605
- '{"meta":{"error_type":"APINotAllowedError","code":400,"error_message":"you cannot view this resource"}}'
606
-
607
- */
608
-
609
- if($response_code != 200){
610
- return json_encode(array("error", json_decode($posts_json)->meta->error_message));
611
- }
612
- if(!property_exists(json_decode($posts_json), 'data')){
613
- return json_encode(array("error", "cannot get Instagram user posts data"));
614
- }
615
- /*
616
- if instagram user has no posts
617
- */
618
- if(empty(json_decode($posts_json)->data)){
619
- return json_encode(array("error", "Instagram user has no posts"));
620
- }
621
-
622
-
623
- $posts_array = json_decode($posts_json)->data;
624
- $instagram_album_data = array();
625
- if($whole_post==1){
626
- $post_flag ="post";
627
- }
628
- else{
629
- $post_flag ='';
630
- }
631
- foreach ($posts_array as $post_data) {
632
- $url = $post_data ->link . $post_flag;
633
-
634
- $post_to_embed = json_decode(self::add_embed($url), true);
635
-
636
- /* if add_embed function did not indexed array because of error */
637
- if(!isset($post_to_embed[0]) ){
638
- array_push($instagram_album_data, $post_to_embed);
639
- }
640
-
641
- }
642
-
643
- return json_encode($instagram_album_data);
644
-
645
- }
646
-
647
- /**
648
- *
649
- * @return array of galleries,
650
- * @return array(false, "error message");
651
- *
652
- */
653
-
654
- public static function check_instagram_galleries(){
655
-
656
- global $wpdb;
657
- $instagram_galleries = $wpdb->get_results( "SELECT id, gallery_type, gallery_source, update_flag, autogallery_image_number FROM " . $wpdb->prefix . "wdi_gallery WHERE gallery_type='instagram' OR gallery_type='instagram_post'", OBJECT );
658
-
659
- $galleries_to_update = array();
660
- if($instagram_galleries){
661
- foreach ($instagram_galleries as $gallery) {
662
- if($gallery->update_flag == 'add' || $gallery->update_flag == 'replace'){
663
- array_push($galleries_to_update, $gallery);
664
- }
665
- }
666
- if(!empty($galleries_to_update)){
667
- return $galleries_to_update;
668
- }
669
- else{
670
- return array(false, "No instagram gallery has to be updated");
671
- }
672
- }
673
- else{
674
- return array(false,"There is no instagram gallery");
675
- }
676
- }
677
-
678
- /**
679
- *
680
- * @return array(true, "refresh time");
681
- * @return array(false, "error message");
682
- *
683
- */
684
-
685
- public static function refresh_instagram_gallery($gallery){
686
- global $wpdb;
687
- $id = $gallery->id;
688
- $type = $gallery->gallery_type;
689
- $update_flag = $gallery->update_flag;
690
- $autogallery_image_number = $gallery->autogallery_image_number;
691
-
692
- if($type=='instagram'){
693
- $whole_post = 0;
694
- }
695
- if($type=='instagram_post'){
696
- $whole_post = 1;
697
- }
698
- $source =$gallery->gallery_source;
699
- if(!$id || !$type || !$source){
700
- return array(false, "Gallery id, type or source are empty");
701
- }
702
-
703
- $get_client_id = $wpdb->get_results( "SELECT instagram_client_id FROM " . $wpdb->prefix . "wdi_option", OBJECT );
704
- if(!$get_client_id){
705
- return array(false, "Cannot get CLIENT_ID from the database");
706
- }
707
- $client_id = $get_client_id[0]->instagram_client_id;
708
-
709
- $images = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "wdi_image WHERE gallery_id='" . $id . "' ", OBJECT);
710
- $images_count = sizeof($images);
711
- $new_images_data = self::add_instagram_gallery($source, $client_id, $whole_post, $autogallery_image_number);
712
- if(!$new_images_data){
713
- return array(false, "Cannot get instagram data");
714
- }
715
- $images_new = json_decode($new_images_data);
716
- if(empty($images_new)){
717
- return array(false, "Cannot get instagram data");
718
- }
719
- if($images_new[0] == "error"){
720
- return array(false, "Cannot get instagram data");
721
- }
722
-
723
- $images_count_new = sizeof($images_new);
724
-
725
- $images_update = array(); /*ids and orders of images existing in both arrays*/
726
- $images_insert = array(); /*data of new images*/
727
- $images_dated = array(); /*ids and orders of images not existing in the array of new images*/
728
- $new_order = 0; /*how many images should be added*/
729
- if($images_count!=0){
730
- $author = $images[0]->author; /* author is the same for the images in the gallery */
731
- }
732
- else{
733
- $author = 1;
734
- }
735
-
736
- /*loops to compare new and existing images*/
737
- foreach ($images_new as $image_new) {
738
- $to_add = true;
739
- if($images_count != 0){
740
- foreach($images as $image){
741
- if($image_new->filename == $image->filename){
742
- /*if that image exist, do not update*/
743
- $to_add = false;
744
- }
745
- }
746
- }
747
- if($to_add){
748
- /*if image does not exist, insert*/
749
- $new_order++;
750
- $new_image_data = array(
751
- 'gallery_id' => $id,
752
- 'slug' => sanitize_title($image_new->name),
753
- 'filename' => $image_new->filename,
754
- 'image_url' => $image_new->url,
755
- 'thumb_url' => $image_new->thumb_url,
756
- 'description' => $image_new->description,
757
- 'alt' => $image_new->name,
758
- 'date' => $image_new->date_modified,
759
- 'size' => $image_new->size,
760
- 'filetype' => $image_new->filetype,
761
- 'resolution' => $image_new->resolution,
762
- 'author' => $author,
763
- 'order' => $new_order,
764
- 'published' => 1,
765
- 'comment_count' => 0,
766
- 'avg_rating' => 0,
767
- 'rate_count' => 0,
768
- 'hit_count' => 0,
769
- 'redirect_url' => $image_new->redirect_url,
770
- );
771
- array_push($images_insert, $new_image_data);
772
- }
773
- }
774
-
775
-
776
- if($images_count != 0){
777
- foreach ($images as $image) {
778
- $is_dated = true;
779
- foreach($images_new as $image_new){
780
- if($image_new->filename == $image->filename){
781
- /* if that image exist, do not update */
782
- /* shift order by a number of new images */
783
- $image_update = array(
784
- 'id' => $image->id ,
785
- 'order'=> intval($image->order) + $new_order,
786
- "slug" => sanitize_title($image_new->name),
787
- "description" => $image_new->description,
788
- "alt" => $image_new->name,
789
- "date" => $image_new->date_modified);
790
- array_push($images_update, $image_update);
791
- $is_dated = false;
792
- }
793
- }
794
- if($is_dated){
795
- $image_dated = array(
796
- 'id' => $image->id ,
797
- 'order'=> intval($image->order) + $new_order,
798
- );
799
- array_push($images_dated, $image_dated);
800
- }
801
- }
802
- }
803
- /*endof comparing loops*/
804
-
805
- $to_unpublish = true;
806
- if($update_flag == 'add'){
807
- $to_unpublish = false;
808
- }
809
- if($update_flag == 'replace'){
810
- $to_unpublish = true;
811
- }
812
-
813
-
814
- /*update old images*/
815
- if($images_count != 0){
816
- if($to_unpublish){
817
- foreach ($images_dated as $image) {
818
- $q = 'UPDATE ' . $wpdb->prefix . 'wdi_image SET published=0, `order` ='.$image['order'].' WHERE `id`='.$image['id'];
819
- $wpdb->query($q);
820
- }
821
- }
822
- else{
823
- foreach ($images_dated as $image) {
824
- $q = 'UPDATE ' . $wpdb->prefix . 'wdi_image SET `order` ='.$image['order'].' WHERE `id`='.$image['id'];
825
- $wpdb->query($q);
826
- }
827
- }
828
-
829
- foreach ($images_update as $image) {
830
- $save = $wpdb->update($wpdb->prefix . 'wdi_image', array(
831
- 'order' => $image['order'],
832
- 'slug' => $image['slug'],
833
- 'description' => $image['description'],
834
- 'alt' => $image['alt'],
835
- 'date' => $image['date']
836
- ), array('id' => $image['id']));
837
- }
838
- }
839
- /*add new images*/
840
- foreach($images_insert as $image){
841
- $save = $wpdb->insert($wpdb->prefix . 'wdi_image', array(
842
- 'gallery_id' => $image['gallery_id'],
843
- 'slug' => $image['slug'],
844
- 'filename' => $image['filename'],
845
- 'image_url' => $image['image_url'],
846
- 'thumb_url' => $image['thumb_url'],
847
- 'description' => $image['description'],
848
- 'alt' => $image['alt'],
849
- 'date' => $image['date'],
850
- 'size' => $image['size'],
851
- 'filetype' => $image['filetype'],
852
- 'resolution' => $image['resolution'],
853
- 'author' => $image['author'],
854
- 'order' => $image['order'],
855
- 'published' => $image['published'],
856
- 'comment_count' => $image['comment_count'],
857
- 'avg_rating' => $image['avg_rating'],
858
- 'rate_count' => $image['rate_count'],
859
- 'hit_count' => $image['hit_count'],
860
- 'redirect_url' => $image['redirect_url'],
861
- ), array(
862
- '%d',
863
- '%s',
864
- '%s',
865
- '%s',
866
- '%s',
867
- '%s',
868
- '%s',
869
- '%s',
870
- '%s',
871
- '%s',
872
- '%s',
873
- '%d',
874
- '%d',
875
- '%d',
876
- '%d',
877
- '%d',
878
- '%d',
879
- '%d',
880
- '%s',
881
- ));
882
- }
883
- $time = date('d F Y, H:i');
884
-
885
- /*return time of last update*/
886
- return array(true, $time);
887
-
888
- }
889
-
890
- public static function get_autoupdate_interval(){
891
- global $wpdb;
892
-
893
- $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdi_option WHERE id="%d"', 1));
894
- if(!isset($row)){
895
- return 30;
896
- }
897
- if(!isset($row->autoupdate_interval)){
898
- return 30;
899
- }
900
- $autoupdate_interval = $row->autoupdate_interval;
901
- return $autoupdate_interval;
902
- }
903
-
904
-
905
-
906
-
907
-
908
-
909
- /**
910
- * @return user id by username
911
- * @return flase on failure
912
- */
913
- public static function get_instagram_id_by_username($instagram_user) {
914
-
915
- $instagram_user_response = wp_remote_get('https://api.instagram.com/v1/users/search?q=' . $instagram_user . '&access_token=2276055961.145c5c2.c37b17e530f245a29716f748137c84a9');
916
- if ( is_wp_error( $instagram_user_response ) ) {
917
- return false;
918
- }
919
- $user_json = wp_remote_retrieve_body($instagram_user_response);
920
- $response_code = json_decode($user_json)->meta->code;
921
-
922
- /*
923
- instagram API returns
924
-
925
- *wrong username
926
- {"meta":{"code":200},"data":[]}
927
-
928
- *wrong client_id
929
- {"meta":{"error_type":"OAuthParameterException","code":400,"error_message":"The client_id provided is invalid and does not match a valid application."}}
930
-
931
- */
932
-
933
- if($response_code != 200){
934
- return false;
935
- }
936
-
937
-
938
- if(!property_exists(json_decode($user_json), 'data')){
939
- return false;
940
- }
941
- if(empty(json_decode($user_json)->data)){
942
- return false;
943
- }
944
- $user_data = json_decode($user_json)->data[0];
945
- $user_id = $user_data->id;
946
-
947
- return $user_id;
948
-
949
- }
950
-
951
-
952
-
953
-
954
- ////////////////////////////////////////////////////////////////////////////////////////
955
- // Private Methods //
956
- ////////////////////////////////////////////////////////////////////////////////////////
957
- ////////////////////////////////////////////////////////////////////////////////////////
958
- // Listeners //
959
- ////////////////////////////////////////////////////////////////////////////////////////
960
  }
1
+ <?php
2
+
3
+ /**
4
+ * Class for handling embedded media in gallery
5
+ *
6
+ */
7
+
8
+ class WDILibraryEmbed {
9
+
10
+ public function __construct() {
11
+ }
12
+
13
+ public function get_provider($oembed, $url, $args = '') {
14
+ $provider = false;
15
+ if (!isset($args['discover'])) {
16
+ $args['discover'] = true;
17
+ }
18
+ foreach ($oembed->providers as $matchmask => $data ) {
19
+ list( $providerurl, $regex ) = $data;
20
+ // Turn the asterisk-type provider URLs into regex
21
+ if ( !$regex ) {
22
+ $matchmask = '#' . str_replace( '___wildcard___', '(.+)', preg_quote( str_replace( '*', '___wildcard___', $matchmask ), '#' ) ) . '#i';
23
+ $matchmask = preg_replace( '|^#http\\\://|', '#https?\://', $matchmask );
24
+ }
25
+ if ( preg_match( $matchmask, $url ) ) {
26
+ $provider = str_replace( '{format}', 'json', $providerurl ); // JSON is easier to deal with than XML
27
+ break;
28
+ }
29
+ }
30
+ if ( !$provider && $args['discover'] ) {
31
+ $provider = $oembed->discover($url);
32
+ }
33
+ return $provider;
34
+ }
35
+
36
+ /**
37
+ * check host and get data for a given url
38
+ * @return encode_json(associative array of data) on success
39
+ * @return encode_json(array[false, "error message"]) on failure
40
+ *
41
+ * EMBED TYPES
42
+ *
43
+ * EMBED_OEMBED_YOUTUBE_VIDEO
44
+ * EMBED_OEMBED_VIMEO_VIDEO
45
+ * EMBED_OEMBED_DAILYMOTION_VIDEO
46
+ * EMBED_OEMBED_INSTAGRAM_IMAGE
47
+ * EMBED_OEMBED_INSTAGRAM_VIDEO
48
+ * EMBED_OEMBED_INSTAGRAM_POST
49
+ * EMBED_OEMBED_FLICKR_IMAGE
50
+ *
51
+ * RULES FOR NEW TYPES
52
+ *
53
+ * 1. begin type name with EMBED_
54
+ * 2. if using WP native OEMBED class, add _OEMBED then
55
+ * 3. add provider name
56
+ * 4. add _VIDEO, _IMAGE FOR embedded media containing only video or image
57
+ * 5. add _DIRECT_URL from static URL of image (not implemented yet)
58
+ *
59
+ */
60
+
61
+ public static function add_embed($url) {
62
+
63
+ $url = sanitize_text_field(urldecode($url));
64
+
65
+
66
+ $embed_type = '';
67
+ $host = '';
68
+ /*returns this array*/
69
+ $embedData = array(
70
+ 'name' => '',
71
+ 'description' => '',
72
+ 'filename' => '',
73
+ 'url' => '',
74
+ 'reliative_url' => '',
75
+ 'thumb_url' => '',
76
+ 'thumb' => '',
77
+ 'size' => '',
78
+ 'filetype' => '',
79
+ 'date_modified' => '',
80
+ 'resolution' => '',
81
+ 'redirect_url' => '');
82
+
83
+ $accepted_oembeds = array(
84
+ 'YOUTUBE' => '/youtube/',
85
+ 'VIMEO' => '/vimeo/',
86
+ 'FLICKR' => '/flickr/',
87
+ 'INSTAGRAM' => '/instagram/',
88
+ 'DAILYMOTION' => '/dailymotion/'
89
+ );
90
+
91
+ /*check if we can embed this using wordpress class WP_oEmbed */
92
+ if ( !function_exists( '_wp_oembed_get_object' ) )
93
+ include( ABSPATH . WPINC . '/class-oembed.php' );
94
+ // get an oembed object
95
+ $oembed = _wp_oembed_get_object();
96
+ if (method_exists($oembed, 'get_provider')) {
97
+ // Since 4.0.0
98
+ $provider = $oembed->get_provider($url);
99
+ }
100
+ else {
101
+ $provider = self::get_provider($oembed, $url);
102
+ }
103
+ foreach ($accepted_oembeds as $oembed_provider => $regex) {
104
+ if(preg_match($regex, $provider)==1){
105
+ $host = $oembed_provider;
106
+ }
107
+ }
108
+ /*return json_encode($host); for test*/
109
+
110
+ /*handling oembed cases*/
111
+ if($host){
112
+ /*instagram is exception*/
113
+ /*standard oembed fetching does not return thumbnail_url! so we do it manually*/
114
+ if($host == 'INSTAGRAM' && substr($url,-4)!='post' && substr($url,-4!='POST')){
115
+ $embed_type = 'EMBED_OEMBED_INSTAGRAM';
116
+
117
+ $insta_host_and_id= strtok($url, '/')."/".strtok('/')."/".strtok('/')."/".strtok('/');
118
+ $insta_host= strtok($url, '/')."/".strtok('/')."/".strtok('/')."/";
119
+ $filename = str_replace($insta_host, "", $insta_host_and_id);
120
+
121
+ $get_embed_data = wp_remote_get("http://api.instagram.com/oembed?url=http://instagram.com/p/".$filename);
122
+ if ( is_wp_error( $get_embed_data ) ) {
123
+ return json_encode(array("error", "cannot get Instagram data"));
124
+ }
125
+ $result = json_decode(wp_remote_retrieve_body($get_embed_data));
126
+ if(empty($result)){
127
+ return json_encode(array("error", wp_remote_retrieve_body($get_embed_data)));
128
+ }
129
+
130
+
131
+ $embedData = array(
132
+ 'name' => htmlspecialchars($result->title),
133
+ 'description' => htmlspecialchars($result->title),
134
+ 'filename' => $filename,
135
+ 'url' => $url,
136
+ 'reliative_url' => $url,
137
+ 'thumb_url' => $result->thumbnail_url,
138
+ 'thumb' => $result->thumbnail_url,
139
+ 'size' => '',
140
+ 'filetype' => $embed_type,
141
+ 'date_modified' => date('d F Y, H:i'),
142
+ 'resolution' => $result->thumbnail_width." x ".$result->thumbnail_height." px",
143
+ 'redirect_url' => ''
144
+ );
145
+
146
+ /*get instagram post html page, parse its DOM to find video URL*/
147
+ $DOM = new DOMDocument;
148
+ libxml_use_internal_errors(true);
149
+ $html_code = wp_remote_get($url);
150
+ if ( is_wp_error( $html_code ) ) {
151
+ return json_encode(array("error", "cannot get Instagram data"));
152
+ }
153
+ $html_body = wp_remote_retrieve_body($html_code);
154
+ if(empty($html_body)){
155
+ return json_encode(array("error", wp_remote_retrieve_body($html_code)));
156
+ }
157
+
158
+ $DOM->loadHTML($html_body);
159
+ $finder = new DomXPath($DOM);
160
+ $query = "//meta[@property='og:video']";
161
+ $nodes = $finder->query($query);
162
+ $node = $nodes->item(0);
163
+ if($node){
164
+ $length = $node->attributes->length;
165
+
166
+ for ($i = 0; $i < $length; ++$i) {
167
+ $name = $node->attributes->item($i)->name;
168
+ $value = $node->attributes->item($i)->value;
169
+
170
+ if($name == 'content'){
171
+ $filename = $value;
172
+ }
173
+ }
174
+ $embedData['filename'] = $filename;
175
+ $embedData['filetype'] .= '_VIDEO';
176
+ }
177
+ else{
178
+ $embedData['filetype'] .= '_IMAGE';
179
+ }
180
+
181
+ return json_encode($embedData);
182
+ }
183
+ if($host == 'INSTAGRAM' && (substr($url,-4)=='post'||substr($url,-4)=='POST')){
184
+ /*check if instagram post*/
185
+ $url = substr($url,0,-4);
186
+ $embed_type = 'EMBED_OEMBED_INSTAGRAM_POST';
187
+ parse_str( parse_url( $url, PHP_URL_QUERY ), $my_array_of_vars );
188
+ $matches = array();
189
+ $filename = '';
190
+ $regex = "/^.*?instagram\.com\/p\/(.*?)[\/]?$/";
191
+ if(preg_match($regex, $url, $matches)){
192
+ $filename = $matches[1];
193
+ }
194
+ $get_embed_data = wp_remote_get("http://api.instagram.com/oembed?url=http://instagram.com/p/".$filename);
195
+ if ( is_wp_error( $get_embed_data ) ) {
196
+ return json_encode(array("error", "cannot get Instagram data"));
197
+ }
198
+ $result = json_decode(wp_remote_retrieve_body($get_embed_data));
199
+ if(empty($result)){
200
+ return json_encode(array("error", wp_remote_retrieve_body($get_embed_data)));
201
+ }
202
+
203
+ $embedData = array(
204
+ 'name' => htmlspecialchars($result->title),
205
+ 'description' => htmlspecialchars($result->title),
206
+ 'filename' => $filename,
207
+ 'url' => $url,
208
+ 'reliative_url' => $url,
209
+ 'thumb_url' => $result->thumbnail_url,
210
+ 'thumb' => $result->thumbnail_url,
211
+ 'size' => '',
212
+ 'filetype' => $embed_type,
213
+ 'date_modified' => date('d F Y, H:i'),
214
+ 'resolution' => $result->width." x ".$result->width." px",
215
+ 'redirect_url' => '');
216
+
217
+ return json_encode($embedData);
218
+ }
219
+
220
+ $result = $oembed->fetch( $provider, $url);
221
+ /*no data fetched for a known provider*/
222
+ if(!$result){
223
+ return json_encode(array("error", "please enter ". $host . " correct single media URL"));
224
+ }
225
+ else{/*one of known oembed types*/
226
+ $embed_type = 'EMBED_OEMBED_'.$host;
227
+ switch ($embed_type) {
228
+ case 'EMBED_OEMBED_YOUTUBE':
229
+ $youtube_regex = "#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v\/)[^&\n]+|(?<=v=)[^&\n]+|(?<=youtu.be/)[^&\n]+#";
230
+ $matches = array();
231
+ preg_match($youtube_regex , $url , $matches);
232
+ $filename = $matches[0];
233
+
234
+ $embedData = array(
235
+ 'name' => htmlspecialchars($result->title),
236
+ 'description' => htmlspecialchars($result->title),
237
+ 'filename' => $filename,
238
+ 'url' => $url,
239
+ 'reliative_url' => $url,
240
+ 'thumb_url' => $result->thumbnail_url,
241
+ 'thumb' => $result->thumbnail_url,
242
+ 'size' => '',
243
+ 'filetype' => $embed_type."_VIDEO",
244
+ 'date_modified' => date('d F Y, H:i'),
245
+ 'resolution' => $result->width." x ".$result->height." px",
246
+ 'redirect_url' => '');
247
+
248
+ return json_encode($embedData);
249
+
250
+ break;
251
+ case 'EMBED_OEMBED_VIMEO':
252
+
253
+ $embedData = array(
254
+ 'name' => htmlspecialchars($result->title),
255
+ 'description' => htmlspecialchars($result->title),
256
+ 'filename' => $result->video_id,
257
+ 'url' => $url,
258
+ 'reliative_url' => $url,
259
+ 'thumb_url' => $result->thumbnail_url,
260
+ 'thumb' => $result->thumbnail_url,
261
+ 'size' => '',
262
+ 'filetype' => $embed_type."_VIDEO",
263
+ 'date_modified' => date('d F Y, H:i'),
264
+ 'resolution' => $result->width." x ".$result->height." px",
265
+ 'redirect_url' => '');
266
+
267
+ return json_encode($embedData);
268
+
269
+ break;
270
+ case 'EMBED_OEMBED_FLICKR':
271
+ $matches = preg_match('~^.+/(\d+)~',$url,$matches);
272
+ $filename = $matches[1];
273
+ /*if($result->type =='photo')
274
+ $embed_type .= '_IMAGE';
275
+ if($result->type =='video')
276
+ $embed_type .= '_VIDEO';*/
277
+ /*flickr video type not implemented yet*/
278
+ $embed_type .= '_IMAGE';
279
+
280
+ $embedData = array(
281
+ 'name' => htmlspecialchars($result->title),
282
+ 'description' => htmlspecialchars($result->title),
283
+ 'filename' =>substr($result->thumbnail_url, 0, -5)."b.jpg",
284
+ 'url' => $url,
285
+ 'reliative_url' => $url,
286
+ 'thumb_url' => $result->thumbnail_url,
287
+ 'thumb' => $result->thumbnail_url,
288
+ 'size' => '',
289
+ 'filetype' => $embed_type,
290
+ 'date_modified' => date('d F Y, H:i'),
291
+ 'resolution' => $result->width." x ".$result->height." px",
292
+ 'redirect_url' => '');
293
+
294
+ return json_encode($embedData);
295
+ break;
296
+
297
+ case 'EMBED_OEMBED_DAILYMOTION':
298
+ $filename = strtok(basename($url), '_');
299
+
300
+ $embedData = array(
301
+ 'name' => htmlspecialchars($result->title),
302
+ 'description' => htmlspecialchars($result->title),
303
+ 'filename' => $filename,
304
+ 'url' => $url,
305
+ 'reliative_url' => $url,
306
+ 'thumb_url' => $result->thumbnail_url,
307
+ 'thumb' => $result->thumbnail_url,
308
+ 'size' => '',
309
+ 'filetype' => $embed_type."_VIDEO",
310
+ 'date_modified' => date('d F Y, H:i'),
311
+ 'resolution' => $result->width." x ".$result->height." px",
312
+ 'redirect_url' => '');
313
+
314
+ return json_encode($embedData);
315
+
316
+ break;
317
+ case 'EMBED_OEMBED_GETTYIMAGES':
318
+ /*not working yet*/
319
+ $filename = strtok(basename($url), '_');
320
+
321
+ $embedData = array(
322
+ 'name' => htmlspecialchars($result->title),
323
+ 'description' => htmlspecialchars($result->title),
324
+ 'filename' => $filename,
325
+ 'url' => $url,
326
+ 'reliative_url' => $url,
327
+ 'thumb_url' => $result->thumbnail_url,
328
+ 'thumb' => $result->thumbnail_url,
329
+ 'size' => '',
330
+ 'filetype' => $embed_type,
331
+ 'date_modified' => date('d F Y, H:i'),
332
+ 'resolution' => $result->width." x ".$result->height." px",
333
+ 'redirect_url' => '');
334
+
335
+ return json_encode($embedData);
336
+
337
+ default:
338
+ return json_encode(array("error", "unknown URL host"));
339
+ break;
340
+ }
341
+ }
342
+ }/*end of oembed cases*/
343
+ else {
344
+ /*check for direct image url*/
345
+ /*check if something else*/
346
+ /*not implemented yet*/
347
+ return json_encode(array("error", "unknown URL"));
348
+ }
349
+ return json_encode(array("error", "unknown URL"));
350
+ }
351
+
352
+
353
+ /**
354
+ * client side analogue is function wdi_spider_display_embed in wdi_embed.js
355
+ *
356
+ * @param embed_type: string , one of predefined accepted types
357
+ * @param embed_id: string, id of media in corresponding host, or url if no unique id system is defined for host
358
+ * @param attrs: associative array with html attributes and values format e.g. array('width'=>"100px", 'style'=>"display:inline;")
359
+ *
360
+ */
361
+
362
+ public static function display_embed($embed_type, $embed_id='', $attrs = array(), $carousel_media = null) {
363
+ $html_to_insert = '';
364
+ switch ($embed_type) {
365
+ case 'EMBED_OEMBED_YOUTUBE_VIDEO':
366
+ $oembed_youtube_html ='<iframe ';
367
+ if($embed_id!=''){
368
+ $oembed_youtube_html .= ' src="' . '//www.youtube.com/embed/'. $embed_id . '?enablejsapi=1&wmode=transparent"';
369
+ }
370
+ foreach ($attrs as $attr => $value) {
371
+ if(preg_match('/src/i', $attr)===0){
372
+ if($attr != '' && $value != ''){
373
+ $oembed_youtube_html .= ' '. $attr . '="'. $value . '"';
374
+ }
375
+ }
376
+ }
377
+ $oembed_youtube_html .= " ></iframe>";
378
+ $html_to_insert .= $oembed_youtube_html;
379
+ break;
380
+ case 'EMBED_OEMBED_VIMEO_VIDEO':
381
+ $oembed_vimeo_html ='<iframe ';
382
+ if($embed_id!=''){
383
+ $oembed_vimeo_html .= ' src="' . '//player.vimeo.com/video/'. $embed_id . '?enablejsapi=1"';
384
+ }
385
+ foreach ($attrs as $attr => $value) {
386
+ if(preg_match('/src/i', $attr)===0){
387
+ if($attr != '' && $value != ''){
388
+ $oembed_vimeo_html .= ' '. $attr . '="'. $value . '"';
389
+ }
390
+ }
391
+ }
392
+ $oembed_vimeo_html .= " ></iframe>";
393
+ $html_to_insert .= $oembed_vimeo_html;
394
+ break;
395
+ case 'EMBED_OEMBED_FLICKR_IMAGE':
396
+ $oembed_flickr_html ='<div ';
397
+ foreach ($attrs as $attr => $value) {
398
+ if(preg_match('/src/i', $attr)===0){
399
+ if($attr != '' && $value != ''){
400
+ $oembed_flickr_html .= ' '. $attr . '="'. $value . '"';
401
+ }
402
+ }
403
+ }
404
+ $oembed_flickr_html .= " >";
405
+ if($embed_id!=''){
406
+ $oembed_flickr_html .= '<img src="'.$embed_id.'"'.
407
+ ' style="'.
408
+ 'max-width:'.'100%'." !important".
409
+ '; max-height:'.'100%'." !important".
410
+ '; width:'.'auto !important'.
411
+ '; height:'. 'auto !important' .
412
+ ';">';
413
+ }
414
+ $oembed_flickr_html .="</div>";
415
+
416
+ $html_to_insert .= $oembed_flickr_html;
417
+ break;
418
+ case 'EMBED_OEMBED_FLICKR_VIDEO':
419
+ # code...not implemented yet
420
+ break;
421
+ case 'EMBED_OEMBED_INSTAGRAM_VIDEO':
422
+ $oembed_instagram_html ='<div ';
423
+ foreach ($attrs as $attr => $value) {
424
+ if(preg_match('/src/i', $attr)===0){
425
+ if($attr != '' && $value != ''){
426
+ $oembed_instagram_html .= ' '. $attr . '="'. $value . '"';
427
+ }
428
+ }
429
+ }
430
+ $oembed_instagram_html .= " >";
431
+ if($embed_id!=''){
432
+ $oembed_instagram_html .= '<video onclick="wdi_play_pause(jQuery(this));" style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls>'.
433
+ '<source src="'. $embed_id .
434
+ '" type="video/mp4"> Your browser does not support the video tag. </video>';
435
+ }
436
+ $oembed_instagram_html .="</div>";
437
+ $html_to_insert .= $oembed_instagram_html;
438
+ break;
439
+ case 'EMBED_OEMBED_INSTAGRAM_IMAGE':
440
+ $oembed_instagram_html = '<div ';
441
+ foreach ( $attrs as $attr => $value ) {
442
+ if ( preg_match('/src/i', $attr) === 0 ) {
443
+ if ( $attr != '' && $value != '' ) {
444
+ $oembed_instagram_html .= ' ' . $attr . '="' . $value . '"';
445
+ }
446
+ }
447
+ }
448
+ $oembed_instagram_html .= " >";
449
+ if ( !is_null($carousel_media) && count($carousel_media) ) {
450
+ foreach ( $carousel_media as $key => $media ) {
451
+ if ( $media["type"] == "image" ) {
452
+ $oembed_instagram_html .= '<img src="'.$media["images"]["standard_resolution"]["url"].'"'.
453
+ ' style="'.
454
+ 'max-width:'.'100%'." !important".
455
+ '; max-height:'.'100%'." !important".
456
+ '; width:'.'auto !important'.
457
+ '; height:'. 'auto !important' .
458
+ ';" data-id="' . $key . '" class="carousel_media ' . ($key == 0 ? "active" : "") . '">';
459
+ } elseif($media["type"] == "video"){
460
+ $oembed_instagram_html .= '<video onclick="wdi_play_pause(jQuery(this));" style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls data-id="' . $key . '" class="carousel_media ' . ($key == 0 ? "active" : "") . '">'.
461
+ '<source src="'. $media["videos"]["standard_resolution"]["url"] .
462
+ '" type="video/mp4"> Your browser does not support the video tag. </video>';
463
+ }
464
+ }
465
+ } else {
466
+ if($embed_id!=''){
467
+ $oembed_instagram_html .= '<img src="//instagram.com/p/'.$embed_id.'/media/?size=l"'.
468
+ ' style="'.
469
+ 'max-width:'.'100%'." !important".
470
+ '; max-height:'.'100%'." !important".
471
+ '; width:'.'auto !important'.
472
+ '; height:'. 'auto !important' .
473
+ ';">';
474
+ }
475
+ }
476
+ $oembed_instagram_html .="</div>";
477
+ $html_to_insert .= $oembed_instagram_html;
478
+ break;
479
+ case 'EMBED_OEMBED_INSTAGRAM_POST':
480
+ $oembed_instagram_html ='<div ';
481
+ $id = '';
482
+ foreach ($attrs as $attr => $value) {
483
+ if(preg_match('/src/i', $attr)===0){
484
+ if($attr != '' && $value != ''){
485
+ $oembed_instagram_html .= ' '. $attr . '="'. $value . '"';
486
+ if($attr == 'class' || $attr =='CLASS' || $attr =='Class'){
487
+ $class = $value;
488
+ }
489
+ }
490
+ }
491
+ }
492
+ $oembed_instagram_html .= " >";
493
+ if($embed_id!=''){
494
+ $oembed_instagram_html .= '<iframe class="inner_instagram_iframe_'.$class.'" src="//instagr.am/p/'.$embed_id.'/embed/?enablejsapi=1"'.
495
+ ' style="'.
496
+ 'max-width:'.'100%'." !important".
497
+ '; max-height:'.'100%'." !important".
498
+ '; width:'.'100%'.
499
+ '; height:'. '100%' .
500
+ '; margin:0'.
501
+ '; display:table-cell; vertical-align:middle;"'.
502
+ 'frameborder="0" scrolling="no" allowtransparency="false" allowfullscreen'.
503
+ '></iframe>';
504
+ }
505
+ $oembed_instagram_html .="</div>";
506
+ $html_to_insert .= $oembed_instagram_html;
507
+ break;
508
+ case 'EMBED_OEMBED_DAILYMOTION_VIDEO':
509
+ $oembed_dailymotion_html ='<iframe ';
510
+ if($embed_id!=''){
511
+ $oembed_dailymotion_html .= ' src="' . '//www.dailymotion.com/embed/video/'. $embed_id . '?api=postMessage"';
512
+ }
513
+ foreach ($attrs as $attr => $value) {
514
+ if(preg_match('/src/i', $attr)===0){
515
+ if($attr != '' && $value != ''){
516
+ $oembed_dailymotion_html .= ' '. $attr . '="'. $value . '"';
517
+ }
518
+ }
519
+ }
520
+ $oembed_dailymotion_html .= " ></iframe>";
521
+ $html_to_insert .= $oembed_dailymotion_html;
522
+ break;
523
+ default:
524
+ # code...
525
+ break;
526
+ }
527
+
528
+ echo $html_to_insert;
529
+
530
+ }
531
+
532
+
533
+ /**
534
+ *
535
+ * @return json_encode(array("error","error message")) on failure
536
+ * @return json_encode(array of data of instagram user recent posts) on success
537
+ */
538
+ public static function add_instagram_gallery($instagram_user, $client_id, $whole_post, $autogallery_image_number) {
539
+ $instagram_user = sanitize_text_field(urldecode($instagram_user));
540
+ $instagram_user_response = wp_remote_get("https://api.instagram.com/v1/users/search?q=".$instagram_user."&client_id=".$client_id."&count=1");
541
+ if ( is_wp_error( $instagram_user_response ) ) {
542
+ return json_encode(array("error", "cannot get Instagram user parameters"));
543
+ }
544
+ $user_json = wp_remote_retrieve_body($instagram_user_response);
545
+ $response_code = json_decode($user_json)->meta->code;
546
+
547
+ /*
548
+ instagram API returns
549
+
550
+ *wrong username
551
+ {"meta":{"code":200},"data":[]}
552
+
553
+ *wrong client_id
554
+ {"meta":{"error_type":"OAuthParameterException","code":400,"error_message":"The client_id provided is invalid and does not match a valid application."}}
555
+
556
+ */
557
+
558
+ if($response_code != 200){
559
+ return json_encode(array("error", json_decode($user_json)->meta->error_message));
560
+ }
561
+
562
+
563
+ if(!property_exists(json_decode($user_json), 'data')){
564
+ return json_encode(array("error", "cannot get Instagram user parameters"));
565
+ }
566
+ if(empty(json_decode($user_json)->data)){
567
+ return json_encode(array("error", "wrong Instagram username"));
568
+ }
569
+ $user_data = json_decode($user_json)->data[0];
570
+ $user_id = $user_data->id;
571
+
572
+
573
+ $instagram_posts_response = wp_remote_get("https://api.instagram.com/v1/users/".$user_id."/media/recent/?client_id=".$client_id."&count=".$autogallery_image_number);
574
+ if ( is_wp_error( $instagram_posts_response ) ) {
575
+ return json_encode(array("error", "cannot get Instagram user posts"));
576
+ }
577
+ $posts_json = wp_remote_retrieve_body($instagram_posts_response);
578
+ $response_code = json_decode($posts_json)->meta->code;
579
+
580
+ /*
581
+ instagram API returns
582
+
583
+ *private user
584
+ '{"meta":{"error_type":"APINotAllowedError","code":400,"error_message":"you cannot view this resource"}}'
585
+
586
+ */
587
+
588
+ if($response_code != 200){
589
+ return json_encode(array("error", json_decode($posts_json)->meta->error_message));
590
+ }
591
+ if(!property_exists(json_decode($posts_json), 'data')){
592
+ return json_encode(array("error", "cannot get Instagram user posts data"));
593
+ }
594
+ /*
595
+ if instagram user has no posts
596
+ */
597
+ if(empty(json_decode($posts_json)->data)){
598
+ return json_encode(array("error", "Instagram user has no posts"));
599
+ }
600
+
601
+
602
+ $posts_array = json_decode($posts_json)->data;
603
+ $instagram_album_data = array();
604
+ if($whole_post==1){
605
+ $post_flag ="post";
606
+ }
607
+ else{
608
+ $post_flag ='';
609
+ }
610
+ foreach ($posts_array as $post_data) {
611
+ $url = $post_data ->link . $post_flag;
612
+
613
+ $post_to_embed = json_decode(self::add_embed($url), true);
614
+
615
+ /* if add_embed function did not indexed array because of error */
616
+ if(!isset($post_to_embed[0]) ){
617
+ array_push($instagram_album_data, $post_to_embed);
618
+ }
619
+
620
+ }
621
+
622
+ return json_encode($instagram_album_data);
623
+
624
+ }
625
+
626
+ /**
627
+ *
628
+ * @return array of galleries,
629
+ * @return array(false, "error message");
630
+ *
631
+ */
632
+
633
+ public static function check_instagram_galleries(){
634
+
635
+ global $wpdb;
636
+ $instagram_galleries = $wpdb->get_results( "SELECT id, gallery_type, gallery_source, update_flag, autogallery_image_number FROM " . $wpdb->prefix . "wdi_gallery WHERE gallery_type='instagram' OR gallery_type='instagram_post'", OBJECT );
637
+
638
+ $galleries_to_update = array();
639
+ if($instagram_galleries){
640
+ foreach ($instagram_galleries as $gallery) {
641
+ if($gallery->update_flag == 'add' || $gallery->update_flag == 'replace'){
642
+ array_push($galleries_to_update, $gallery);
643
+ }
644
+ }
645
+ if(!empty($galleries_to_update)){
646
+ return $galleries_to_update;
647
+ }
648
+ else{
649
+ return array(false, "No instagram gallery has to be updated");
650
+ }
651
+ }
652
+ else{
653
+ return array(false,"There is no instagram gallery");
654
+ }
655
+ }
656
+
657
+ /**
658
+ *
659
+ * @return array(true, "refresh time");
660
+ * @return array(false, "error message");
661
+ *
662
+ */
663
+
664
+ public static function refresh_instagram_gallery($gallery){
665
+ global $wpdb;
666
+ $id = $gallery->id;
667
+ $type = $gallery->gallery_type;
668
+ $update_flag = $gallery->update_flag;
669
+ $autogallery_image_number = $gallery->autogallery_image_number;
670
+
671
+ if($type=='instagram'){
672
+ $whole_post = 0;
673
+ }
674
+ if($type=='instagram_post'){
675
+ $whole_post = 1;
676
+ }
677
+ $source =$gallery->gallery_source;
678
+ if(!$id || !$type || !$source){
679
+ return array(false, "Gallery id, type or source are empty");
680
+ }
681
+
682
+ $get_client_id = $wpdb->get_results( "SELECT instagram_client_id FROM " . $wpdb->prefix . "wdi_option", OBJECT );
683
+ if(!$get_client_id){
684
+ return array(false, "Cannot get CLIENT_ID from the database");
685
+ }
686
+ $client_id = $get_client_id[0]->instagram_client_id;
687
+
688
+ $images = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "wdi_image WHERE gallery_id='" . $id . "' ", OBJECT);
689
+ $images_count = sizeof($images);
690
+ $new_images_data = self::add_instagram_gallery($source, $client_id, $whole_post, $autogallery_image_number);
691
+ if(!$new_images_data){
692
+ return array(false, "Cannot get instagram data");
693
+ }
694
+ $images_new = json_decode($new_images_data);
695
+ if(empty($images_new)){
696
+ return array(false, "Cannot get instagram data");
697
+ }
698
+ if($images_new[0] == "error"){
699
+ return array(false, "Cannot get instagram data");
700
+ }
701
+
702
+ $images_count_new = sizeof($images_new);
703
+
704
+ $images_update = array(); /*ids and orders of images existing in both arrays*/
705
+ $images_insert = array(); /*data of new images*/
706
+ $images_dated = array(); /*ids and orders of images not existing in the array of new images*/
707
+ $new_order = 0; /*how many images should be added*/
708
+ if($images_count!=0){
709
+ $author = $images[0]->author; /* author is the same for the images in the gallery */
710
+ }
711
+ else{
712
+ $author = 1;
713
+ }
714
+
715
+ /*loops to compare new and existing images*/
716
+ foreach ($images_new as $image_new) {
717
+ $to_add = true;
718
+ if($images_count != 0){
719
+ foreach($images as $image){
720
+ if($image_new->filename == $image->filename){
721
+ /*if that image exist, do not update*/
722
+ $to_add = false;
723
+ }
724
+ }
725
+ }
726
+ if($to_add){
727
+ /*if image does not exist, insert*/
728
+ $new_order++;
729
+ $new_image_data = array(
730
+ 'gallery_id' => $id,
731
+ 'slug' => sanitize_title($image_new->name),
732
+ 'filename' => $image_new->filename,
733
+ 'image_url' => $image_new->url,
734
+ 'thumb_url' => $image_new->thumb_url,
735
+ 'description' => $image_new->description,
736
+ 'alt' => $image_new->name,
737
+ 'date' => $image_new->date_modified,
738
+ 'size' => $image_new->size,
739
+ 'filetype' => $image_new->filetype,
740
+ 'resolution' => $image_new->resolution,
741
+ 'author' => $author,
742
+ 'order' => $new_order,
743
+ 'published' => 1,
744
+ 'comment_count' => 0,
745
+ 'avg_rating' => 0,
746
+ 'rate_count' => 0,
747
+ 'hit_count' => 0,
748
+ 'redirect_url' => $image_new->redirect_url,
749
+ );
750
+ array_push($images_insert, $new_image_data);
751
+ }
752
+ }
753
+
754
+
755
+ if($images_count != 0){
756
+ foreach ($images as $image) {
757
+ $is_dated = true;
758
+ foreach($images_new as $image_new){
759
+ if($image_new->filename == $image->filename){
760
+ /* if that image exist, do not update */
761
+ /* shift order by a number of new images */
762
+ $image_update = array(
763
+ 'id' => $image->id ,
764
+ 'order'=> intval($image->order) + $new_order,
765
+ "slug" => sanitize_title($image_new->name),
766
+ "description" => $image_new->description,
767
+ "alt" => $image_new->name,
768
+ "date" => $image_new->date_modified);
769
+ array_push($images_update, $image_update);
770
+ $is_dated = false;
771
+ }
772
+ }
773
+ if($is_dated){
774
+ $image_dated = array(
775
+ 'id' => $image->id ,
776
+ 'order'=> intval($image->order) + $new_order,
777
+ );
778
+ array_push($images_dated, $image_dated);
779
+ }
780
+ }
781
+ }
782
+ /*endof comparing loops*/
783
+
784
+ $to_unpublish = true;
785
+ if($update_flag == 'add'){
786
+ $to_unpublish = false;
787
+ }
788
+ if($update_flag == 'replace'){
789
+ $to_unpublish = true;
790
+ }
791
+
792
+
793
+ /*update old images*/
794
+ if($images_count != 0){
795
+ if($to_unpublish){
796
+ foreach ($images_dated as $image) {
797
+ $q = 'UPDATE ' . $wpdb->prefix . 'wdi_image SET published=0, `order` ='.$image['order'].' WHERE `id`='.$image['id'];
798
+ $wpdb->query($q);
799
+ }
800
+ }
801
+ else{
802
+ foreach ($images_dated as $image) {
803
+ $q = 'UPDATE ' . $wpdb->prefix . 'wdi_image SET `order` ='.$image['order'].' WHERE `id`='.$image['id'];
804
+ $wpdb->query($q);
805
+ }
806
+ }
807
+
808
+ foreach ($images_update as $image) {
809
+ $save = $wpdb->update($wpdb->prefix . 'wdi_image', array(
810
+ 'order' => $image['order'],
811
+ 'slug' => $image['slug'],
812
+ 'description' => $image['description'],
813
+ 'alt' => $image['alt'],
814
+ 'date' => $image['date']
815
+ ), array('id' => $image['id']));
816
+ }
817
+ }
818
+ /*add new images*/
819
+ foreach($images_insert as $image){
820
+ $save = $wpdb->insert($wpdb->prefix . 'wdi_image', array(
821
+ 'gallery_id' => $image['gallery_id'],
822
+ 'slug' => $image['slug'],
823
+ 'filename' => $image['filename'],
824
+ 'image_url' => $image['image_url'],
825
+ 'thumb_url' => $image['thumb_url'],
826
+ 'description' => $image['description'],
827
+ 'alt' => $image['alt'],
828
+ 'date' => $image['date'],
829
+ 'size' => $image['size'],
830
+ 'filetype' => $image['filetype'],
831
+ 'resolution' => $image['resolution'],
832
+ 'author' => $image['author'],
833
+ 'order' => $image['order'],
834
+ 'published' => $image['published'],
835
+ 'comment_count' => $image['comment_count'],
836
+ 'avg_rating' => $image['avg_rating'],
837
+ 'rate_count' => $image['rate_count'],
838
+ 'hit_count' => $image['hit_count'],
839
+ 'redirect_url' => $image['redirect_url'],
840
+ ), array(
841
+ '%d',
842
+ '%s',
843
+ '%s',
844
+ '%s',
845
+ '%s',
846
+ '%s',
847
+ '%s',
848
+ '%s',
849
+ '%s',
850
+ '%s',
851
+ '%s',
852
+ '%d',
853
+ '%d',
854
+ '%d',
855
+ '%d',
856
+ '%d',
857
+ '%d',
858
+ '%d',
859
+ '%s',
860
+ ));
861
+ }
862
+ $time = date('d F Y, H:i');
863
+
864
+ /*return time of last update*/
865
+ return array(true, $time);
866
+
867
+ }
868
+
869
+ public static function get_autoupdate_interval(){
870
+ global $wpdb;
871
+
872
+ $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdi_option WHERE id="%d"', 1));
873
+ if(!isset($row)){
874
+ return 30;
875
+ }
876
+ if(!isset($row->autoupdate_interval)){
877
+ return 30;
878
+ }
879
+ $autoupdate_interval = $row->autoupdate_interval;
880
+ return $autoupdate_interval;
881
+ }
882
+
883
+ /**
884
+ * @return user id by username
885
+ * @return flase on failure
886
+ */
887
+ public static function get_instagram_id_by_username($instagram_user) {
888
+
889
+ $instagram_user_response = wp_remote_get('https://api.instagram.com/v1/users/search?q=' . $instagram_user . '&access_token=2276055961.145c5c2.c37b17e530f245a29716f748137c84a9');
890
+ if ( is_wp_error( $instagram_user_response ) ) {
891
+ return false;
892
+ }
893
+ $user_json = wp_remote_retrieve_body($instagram_user_response);
894
+ $response_code = json_decode($user_json)->meta->code;
895
+
896
+ /*
897
+ instagram API returns
898
+
899
+ *wrong username
900
+ {"meta":{"code":200},"data":[]}
901
+
902
+ *wrong client_id
903
+ {"meta":{"error_type":"OAuthParameterException","code":400,"error_message":"The client_id provided is invalid and does not match a valid application."}}
904
+
905
+ */
906
+
907
+ if($response_code != 200){
908
+ return false;
909
+ }
910
+
911
+
912
+ if(!property_exists(json_decode($user_json), 'data')){
913
+ return false;
914
+ }
915
+ if(empty(json_decode($user_json)->data)){
916
+ return false;
917
+ }
918
+ $user_data = json_decode($user_json)->data[0];
919
+ $user_id = $user_data->id;
920
+
921
+ return $user_id;
922
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
923
  }
framework/WDI_admin_view.php CHANGED
@@ -1,1390 +1,1375 @@
1
- <?php
2
-
3
- class WDI_admin_view{
4
-
5
- private $params;
6
-
7
- function __construct($initial_params=array()){
8
-
9
- $defaults= array(
10
- "input_size"=>"36",
11
- "textarea_height"=>"150",
12
- "textarea_width"=>"450",
13
- "select_width"=>"240",
14
- "upload_size" => "30",
15
- "upload_filetype" => "image",
16
- );
17
-
18
- $this->params=$this->merge_params($defaults,$initial_params);
19
- }
20
-
21
-
22
-
23
- /**
24
- * Displays a link like button
25
- *
26
- */
27
- public function link_button($element, $context = 'option', $opt_val = '', $meta=array()){
28
- global $wdi_options;
29
- ?>
30
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
31
- <div class="block margin">
32
- <a href="<?php echo $element['href']; ?>" id="<?php echo $element['name']; ?>" class="button" style="text-decoration:none;"><?php echo (isset($element['value']))?esc_html($element['value']):esc_html($element['title']); ?></a>
33
- </div>
34
- <?php if(isset($element['description'])){ ?>
35
- <p style="font-style: italic;"><?php echo $element['description']; ?></p>
36
- <?php } ?>
37
- </div>
38
- <?php
39
- }
40
-
41
- /**
42
- * Displays a single button for toggling some other elements onclick
43
- *
44
- * @param $element['show'] = array('name_of _element_to_hide')
45
- * @param $element['hide'] = array('name_of _element_to_show')
46
- */
47
- public function button($element, $context = 'option', $opt_val = '', $meta=array()){
48
- global $wdi_options;
49
- ?>
50
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
51
- <div class="block margin">
52
- <div class="optioninput checkbox">
53
- <span id="<?php echo $element['name']; ?>" class="button" style="text-decoration:none;"><?php echo esc_html($element['title']); ?></span>
54
- </div>
55
- </div>
56
- <script>
57
- jQuery(document).ready(function () {
58
- /*init*/
59
- var element_<?php echo $element['name']; ?> = {
60
- id : "<?php echo $element['name']; ?>",
61
- show : [
62
- <?php
63
- foreach ($element['show'] as $element_to_show) :
64
- echo "'". $element_to_show ."', ";
65
- endforeach;
66
- ?>
67
- ],
68
- hide : [
69
- <?php
70
- foreach ($element['hide'] as $element_to_hide) :
71
- echo "'". $element_to_hide ."', ";
72
- endforeach;
73
- ?>
74
- ]
75
- };
76
-
77
- wdwt_elements.button_toggle(element_<?php echo $element['name']; ?>);
78
- /*change on click*/
79
- jQuery('#<?php echo $element['name']; ?>').on( "click", function() {
80
- wdwt_elements.button_toggle(element_<?php echo $element['name']; ?>);
81
- });
82
-
83
- });
84
- </script>
85
- </div>
86
- <?php
87
- }
88
-
89
- /**
90
- * Displays single checkbox with hidden input field
91
- *
92
- *
93
- */
94
-
95
- public function checkbox($element, $context = 'option', $opt_val = '', $meta=array()){
96
-
97
- if($context == 'meta'){
98
- $optionname = "topt".'[' .$element['name']. ']';
99
- }
100
- else{
101
- global $wdi_options;
102
- $optionname = WDI_OPT.'[' .$element['name']. ']';
103
- $opt_val = isset($wdi_options[$element['name']]) ? $wdi_options[$element['name']] : '';
104
- }
105
- if(is_bool($opt_val)){
106
- $opt_val = $opt_val ? 'true' : '';
107
- }
108
- $opt_val = trim($opt_val);
109
-
110
-
111
- ?>
112
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
113
- <div class="block margin">
114
- <div class="optioninput checkbox">
115
- <input type="checkbox" class="checkbox" name="<?php echo $optionname; ?>" id="<?php echo $element['name'] ?>" <?php checked($opt_val || $opt_val =='on'); ?> <?php $this->custom_attrs($element); ?> value="1">
116
- </div>
117
- </div>
118
- </div>
119
- <?php
120
- }
121
-
122
- /**
123
- * Displays a checkbox which shows or hides some other elements onclick
124
- *
125
- * @param $element['show'] = array('name_of _element_to_show') on being checked
126
- * @param $element['hide'] = array('name_of _element_to_hide') on being checked
127
- */
128
-
129
- public function checkbox_open($element, $context = 'option', $opt_val ='', $meta=array()){
130
-
131
- if($context== 'meta'){
132
- $optionname = WDI_META.'[' .$element['name']. ']';
133
- }
134
- else{
135
- global $wdi_options;
136
- $optionname = WDI_OPT.'[' .$element['name']. ']';
137
- $opt_val = $wdi_options[$element['name']];
138
- }
139
- if(is_bool($opt_val)){
140
- $opt_val = $opt_val ? 'true' : '';
141
- }
142
- $opt_val = trim($opt_val);
143
-
144
- ?>
145
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
146
- <div class="block margin">
147
- <div class="optioninput checkbox">
148
- <input type="checkbox" class="checkbox" name="<?php echo $optionname; ?>" id="<?php echo $element['name'] ?>" <?php checked($opt_val || $opt_val =='on'); ?> <?php $this->custom_attrs($element); ?> value="<?php echo esc_attr($opt_val); ?>">
149
- </div>
150
- </div>
151
- </div>
152
- <script>
153
- jQuery(document).ready(function () {
154
- /*init*/
155
-
156
- var element_<?php echo $element["name"]; ?> = {
157
- id : "<?php echo $element["name"]; ?>",
158
- show : [
159
- <?php
160
- foreach ($element['show'] as $element_to_show) :
161
- echo "'". $element_to_show ."', ";
162
- endforeach;
163
- ?>
164
- ],
165
- hide : [
166
- <?php
167
- foreach ($element['hide'] as $element_to_hide) :
168
- echo "'". $element_to_hide ."', ";
169
- endforeach;
170
- ?>
171
- ]
172
- };
173
-
174
- wdwt_elements.checkbox_open(element_<?php echo $element["name"]; ?>);
175
- /*change on click*/
176
- jQuery('#<?php echo $element["name"]; ?>').on( "click", function() {
177
- wdwt_elements.checkbox_open(element_<?php echo $element["name"]; ?>);
178
- });
179
-
180
- });
181
- </script>
182
- <?php
183
- }
184
-
185
- /**
186
- * Displays a single color control
187
- */
188
-
189
- public function color($element, $context='option', $opt_val='', $meta=array()){
190
-
191
- if($context== 'meta'){
192
- $optionname = WDI_META.'[' .$element['name']. ']';
193
- }
194
- else{
195
- $wdi_options = get_option(WDI_OPT );
196
- $optionname = WDI_OPT.'[' .$element['name']. ']';
197
- $opt_val = $wdi_options[$element['name']];
198
- }
199
- ?>
200
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
201
- <div class='wdwt_float'>
202
- <div>
203
- <input type="text" class='color_input' id="<?php echo $element['name']; ?>" name="<?php echo $optionname; ?>" value="<?php echo esc_attr($opt_val); ?>" data-default-color="<?php echo $element['default']; ?>" <?php $this->custom_attrs($element); ?> style="background-color:<?php echo esc_attr($opt_val); ?>;">
204
- </div>
205
- </div>
206
- </div>
207
- <script type="text/javascript">
208
- jQuery(document).ready(function() {
209
- jQuery('.color_input').wpColorPicker();
210
- });
211
- </script>
212
- <?php
213
- }
214
-
215
-
216
- public function users_list($element){
217
- global $wdi_options;
218
-
219
- $readonly = isset($element['readonly']) ? 'readonly="' . esc_attr($element['readonly']) . '"' : '';
220
- $input_size = isset($element["input_size"]) ? $element["input_size"] : $this->params["input_size"];
221
- $optionname = WDI_OPT.'[' .$element['name']. ']';
222
-
223
- ?>
224
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
225
- <div class="block">
226
- <?php WDILibrary::add_auth_button(''); ?>
227
- <div class="wdi_more_token_template" style="display: none;">
228
- <input type="text" name="<?php echo $optionname . '[access_token][]'; ?>" class="wdi_more_access_token" disabled/>
229
- <input type="text" name="<?php echo $optionname . '[user_name][]'; ?>" class="wdi_more_user_name" disabled/>
230
- <input type="text" name="<?php echo $optionname . '[user_id][]'; ?>" class="wdi_more_user_id" disabled/>
231
- </div>
232
- </div>
233
- </div>
234
- <div style="margin-left: 15px;font-style: italic;">
235
- <p>Log out from current Instagram account(same browser)<br> before signing in to the another account.</p>
236
- </div>
237
- <?php
238
- }
239
-
240
-
241
- /**
242
- * Displays single input text field
243
- *
244
- * @param $element['default']: one of the keys from 'valid options' as default value
245
- * @param $element['input_size']: input field size
246
- * @param $element['value'] : give constant value
247
- */
248
-
249
- public function input($element, $context = 'option', $opt_val = '', $meta=array()){
250
- $readonly = isset($element['readonly'])? 'readonly="'.esc_attr($element['readonly']).'"' : '';
251
-
252
- if($context== 'meta'){
253
- $optionname = WDI_META.'[' .$element['name']. ']';
254
- }
255
- else{
256
- global $wdi_options;
257
- $optionname = WDI_OPT.'[' .$element['name']. ']';
258
- $opt_val = isset($wdi_options[$element['name']])? $wdi_options[$element['name']] : '';
259
- if($opt_val == ''){
260
- $opt_val = isset($element['value']) ? $element['value'] : '';
261
- }
262
-
263
- }
264
-
265
- $input_size = isset($element["input_size"]) ? $element["input_size"] : $this->params["input_size"];
266
-
267
- ?>
268
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
269
- <div class="block">
270
- <div class="optioninput">
271
- <input <?php echo $readonly;?> type=<?php echo isset($element['input_type']) ? $element['input_type'] : 'text'?> name="<?php echo $optionname; ?>" id="<?php echo $element['name'];?>"
272
- <?php echo isset($element['required'])? 'required' : ''; $this->custom_attrs($element); ?>
273
- value="<?php echo esc_attr($opt_val); ?>" size="<?php echo $input_size; ?>"
274
- <?php if(isset($element['attr'])) {echo $element['attr']['name'] . '="' .$element["attr"]["value"].'"';} ?>>
275
- <?php
276
- if(isset($element['unit_symbol'])){
277
- echo $element['unit_symbol'];
278
- }
279
- echo isset($element['label']) ? $element['label'] : "";
280
- ?>
281
-
282
- </div>
283
- </div>
284
- </div>
285
- <?php
286
- }
287
-
288
-
289
-
290
- /**
291
- * Displays a group of radio buttons
292
- *
293
- * @param $option['valid options']: ($key => array('title'=>'value', 'description'=>'value'))
294
- * @param $option['default']: one of the keys from 'valid options' as default value
295
- */
296
-
297
- public function radio($element, $context = 'option', $opt_val = '', $meta=array()){
298
- if($context== 'meta'){
299
- $optionname = WDI_META.'[' .$element['name']. ']';
300
- }
301
- else{
302
- global $wdi_options;
303
- $optionname = WDI_OPT.'[' .$element['name']. ']';
304
- $opt_val = $wdi_options[$element['name']];
305
- }
306
-
307
- ?>
308
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
309
- <?php
310
- foreach ( $element['valid_options'] as $key => $option ) {
311
- ?>
312
- <input type="radio" name="<?php echo $optionname; ?>" <?php checked( $key, $opt_val ); ?> <?php $this->custom_attrs($element); ?> value="<?php echo esc_attr($key); ?>" /> <?php echo esc_html($option); ?>
313
- <?php
314
- echo isset($element['label']) ? $element['label'] : "";
315
- }
316
- ?>
317
- </div>
318
- <?php
319
- }
320
-
321
- /**
322
- * Displays a group of radio buttons which show or hide some other elements onchange
323
- *
324
- * @param $element['show'] = array("key" => "value") or array("key" => array("value","valeu2"))
325
- * @param $element['hide'] = array("key" => "value")
326
- */
327
-
328
- public function radio_open($element,$context = 'option', $opt_val = '', $meta=array()){
329
-
330
- if($context== 'meta'){
331
- $optionname = WDI_META.'[' .$element['name']. ']';
332
- }
333
- else{
334
- global $wdi_options;
335
- $optionname = WDI_OPT.'[' .$element['name']. ']';
336
- $opt_val = $wdi_options[$element['name']];
337
- }
338
-
339
-
340
-
341
- ?>
342
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
343
-
344
- <?php
345
- foreach ( $element['valid_options'] as $key => $option ) {
346
- ?>
347
- <input type="radio" name="<?php echo $optionname; ?>" <?php checked( $key, $opt_val ); ?> <?php $this->custom_attrs($element); ?> value="<?php echo esc_attr($key); ?>" /> <?php echo esc_html($option); ?>
348
- <?php
349
- }
350
- ?>
351
-
352
- </div>
353
- <script>
354
- jQuery(document).ready(function () {
355
- /*init*/
356
- var element_<?php echo $element["name"]; ?> = {
357
- name : "<?php echo $optionname; ?>",
358
- show : [
359
- <?php
360
- foreach ($element['show'] as $key => $value) :
361
- echo "{key: '" . $key ."', val: [" ;
362
- if(gettype ($value)=='array'){ /*many items. array of strings of names*/
363
- foreach ($value as $item){
364
- echo "'".$item."',";
365
- }
366
- }
367
- else{/*single item name string */
368
- echo "'".$value."',";
369
- }
370
- echo "]},";
371
- endforeach;
372
- ?>
373
- ],
374
- hide : [
375
- <?php
376
- foreach ($element['hide'] as $key => $value) :
377
- echo "{key: '" . $key ."', val: [" ;
378
- if(gettype ($value)=='array'){ /*many items. array of strings of names*/
379
- foreach ($value as $item){
380
- echo "'".$item."',";
381
- }
382
- }
383
- else{/*single item name string */
384
- echo "'".$value."',";
385
- }
386
- echo "]},";
387
- endforeach;
388
- ?>
389
- ]
390
- };
391
-
392
- wdwt_elements.radio_open(element_<?php echo $element["name"]; ?>);
393
- /*shor or hide on change*/
394
- jQuery('input[type=radio][name="<?php echo $optionname; ?>"]').on( "change", function() {
395
- wdwt_elements.radio_open(element_<?php echo $element["name"]; ?>);
396
- });
397
-
398
- });
399
- </script>
400
-
401
- <?php
402
-
403
- }
404
-
405
- /**
406
- * Displays a group of radio buttons with images as descriptions
407
- *
408
- * @param $element['valid options']: array( array('index' => 0, title'=>'value', 'description'=>'value'))
409
- * @param $element['default']: one of the indices from 'valid options' as default value
410
- * @param $element['img_src']:
411
- * @param $element['img_height']:
412
- * @param $element['img_width']:
413
- */
414
-
415
- public function radio_images($element, $context='meta', $opt_val='', $meta=array()){
416
-
417
- if($context== 'meta'){
418
- $optionname = WDI_META.'[' .$element['name']. ']';
419
- }
420
- else{
421
- global $wdi_options;
422
- $optionname = WDI_OPT.'[' .$element['name']. ']';
423
- $opt_val = $wdi_options[$element['name']];
424
- }
425
- ?>
426
-
427
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
428
- <?php
429
- $img_h = intval($element['img_height']) / sizeof($element['valid_options']);
430
- foreach($element['valid_options'] as $option) { ?>
431
- <div class="sprite_layouts">
432
- <div alt="<?php echo esc_attr($option['title']); ?>" style="width:<?php echo esc_attr($element['img_width']); ?>px; height:<?php echo esc_attr($img_h); ?>px; background:url(<?php echo esc_url(WDWT_IMG_INC.$element['img_src']); ?>) no-repeat 0 -<?php echo (intval($option['index'])-1) * $img_h; ?>px;"></div>
433
- <input type="radio" name="<?php echo $optionname; ?>" <?php checked( $option['index'], $opt_val ); ?> <?php $this->custom_attrs($element); ?> value="<?php echo intval($option['index']); ?>">
434
- </div>
435
- <?php
436
- }
437
- ?>
438
- </div>
439
- <?php
440
- }
441
- /**
442
- * Displays a group of radio buttons with images as descriptions which show or hide some other elements onchange
443
- *
444
- * @param $element['valid options']: array( array('index' => 0, title'=>'value', 'description'=>'value'))
445
- * @param $element['default']: one of the indices from 'valid options' as default value
446
- * @param $element['img_src']:
447
- * @param $element['img_height']:
448
- * @param $element['img_width']:
449
- * @param $element['show'] = array("key" => "value") or array("key" => array("value","valeu2"))
450
- * @param $element['hide'] = array("key" => "value")
451
- *
452
- */
453
-
454
-
455
- public function radio_images_open($element, $context='option', $opt_val ='', $meta=array()){
456
-
457
- if($context== 'meta'){
458
- $optionname = WDI_META.'[' .$element['name']. ']';
459
- }
460
- else{
461
- global $wdi_options;
462
- $optionname = WDI_OPT.'[' .$element['name']. ']';
463
- $opt_val = $wdi_options[$element['name']];
464
- }
465
- ?>
466
-
467
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
468
- <?php
469
- $img_h = intval($element['img_height']) / sizeof($element['valid_options']);
470
- foreach($element['valid_options'] as $option) { ?>
471
- <div class="sprite_layouts">
472
- <div alt="<?php echo esc_attr($option['title']); ?>" style="width:<?php echo $element['img_width']; ?>px; height:<?php echo $img_h; ?>px; background:url(<?php echo esc_url(WDWT_IMG_INC.$element['img_src']); ?>) no-repeat 0 -<?php echo (intval($option['index'])-1) * $img_h; ?>px;"></div>
473
- <input type="radio" name="<?php echo $optionname; ?>" <?php checked( $option['index'], $opt_val ); ?> <?php $this->custom_attrs($element); ?> value="<?php echo intval($option['index']); ?>">
474
- </div>
475
- <?php
476
- }
477
- ?>
478
- </div>
479
- <script>
480
- jQuery(document).ready(function () {
481
- /*init*/
482
- var element_<?php echo $element["name"]; ?> = {
483
- name : "<?php echo $optionname; ?>",
484
- show : [
485
- <?php
486
- foreach ($element['show'] as $key => $value) :
487
- echo "{key: '" . $key ."', val: [" ;
488
- if(gettype ($value)=='array'){ /*many items. array of strings of names*/
489
- foreach ($value as $item){
490
- echo "'".$item."',";
491
- }
492
- }
493
- else{/*single item name string */
494
- echo "'".$value."',";
495
- }
496
- echo "]},";
497
- endforeach;
498
- ?>
499
- ],
500
- hide : [
501
- <?php
502
- foreach ($element['hide'] as $key => $value) :
503
- echo "{key: '" . $key ."', val: [" ;
504
- if(gettype ($value)=='array'){ /*many items. array of strings of names*/
505
- foreach ($value as $item){
506
- echo "'".$item."',";
507
- }
508
- }
509
- else{/*single item name string */
510
- echo "'".$value."',";
511
- }
512
- echo "]},";
513
- endforeach;
514
- ?>
515
- ]
516
- };
517
-
518
- wdwt_elements.radio_open(element_<?php echo $element["name"]; ?>);
519
- /*shor or hide on change*/
520
- jQuery('input[type=radio][name="<?php echo $optionname; ?>"]').on( "change", function() {
521
- wdwt_elements.radio_open(element_<?php echo $element["name"]; ?>);
522
- });
523
-
524
- });
525
- </script>
526
- <?php
527
- }
528
-
529
- /**
530
- * Displays single <select> element
531
- *
532
- * @param $select['valid options']: ($key => $value)
533
- * @param $select['default']: one of the keys from 'valid options' as default value
534
- */
535
-
536
- public function select($element, $context='option', $opt_val = array(), $meta=array()){
537
-
538
- if($context== 'meta'){
539
- $optionname = WDI_META.'[' .$element['name']. '][]';
540
- if(!is_array($opt_val)){
541
- /*old format*/
542
- $opt_val = $this->get_old_posts_cats($opt_val);
543
- }
544
- }
545
- else{
546
- global $wdi_options;
547
- $optionname = isset($element["multiple"]) ? WDI_OPT.'[' .$element['name']. '][]' : WDI_OPT.'[' .$element['name']. ']';
548
- $opt_val = isset($wdi_options[$element['name']]) ? $wdi_options[$element['name']] : $element["default"];
549
- }
550
- $opt_val = is_array($opt_val) ? $opt_val : array($opt_val);
551
- $multiple = isset($element["multiple"]) ? true : false;
552
- $width = isset($element["width"]) ? intval($element["width"]) : $this->params["select_width"];
553
- $disabled = isset($element["disabled"]) ? $element["disabled"] : array();
554
- ?>
555
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
556
- <div class="block">
557
- <div class="optioninput">
558
- <select name="<?php echo $optionname; ?>" id="<?php echo $element['name'] ?>" <?php echo $multiple ? 'multiple="multiple"' : ''; ?> <?php $this->custom_attrs($element); ?> style="width:<?php echo $width; ?>px; resize:vertical;">
559
- <?php foreach($element['valid_options'] as $key => $value){ ?>
560
- <option value="<?php echo esc_attr($key) ?>" <?php selected(true, in_array($key, $opt_val)); ?> <?php echo in_array($key, $disabled) ? 'disabled="disabled"' : ''; ?>>
561
- <?php echo esc_html($value); ?>
562
- </option>
563
- <?php } ?>
564
- </select>
565
- </div>
566
- </div>
567
- </div>
568
- <?php
569
- }
570
-
571
- /**
572
- * Displays a select with options which shows or hides some other elements onchange
573
- *
574
- * @param $element['show'] = array("key" => "value") or array("key" => array("value","valeu2"))
575
- * @param $element['hide'] = array("key" => "value")
576
- */
577
-
578
- public function select_open($element, $context='option', $opt_val ='', $meta=array()){
579
-
580
- if($context== 'meta'){
581
- $optionname = WDI_META.'[' .$element['name']. '][]';
582
- }
583
- else{
584
- global $wdi_options;
585
- $optionname = WDI_OPT.'[' .$element['name']. '][]';
586
- $opt_val = $wdi_options[$element['name']];
587
- }
588
- $opt_val = is_array($opt_val) ? $opt_val : array($opt_val);
589
- $multiple = isset($element["multiple"]) ? true : false;
590
- $width = isset($element["width"]) ? intval($element["width"]) : $this->params["select_width"];
591
-
592
- ?>
593
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
594
-
595
- <select name="<?php echo $optionname; ?>" id="<?php echo $element['name'] ?>" <?php echo $multiple ? 'multiple="multiple"' : ''; ?> <?php $this->custom_attrs($element); ?> style="width:<?php echo $width; ?>px; resize:vertical;">
596
- <?php
597
- foreach($element['valid_options'] as $key => $value){ ?>
598
- <option value="<?php echo esc_attr($key); ?>" <?php selected(true, in_array($key, $opt_val)); ?>><?php echo esc_html($value); ?></option>
599
- <?php } ?>
600
- </select>
601
- </div>
602
- <script>
603
- jQuery(document).ready(function () {
604
- /*init*/
605
-
606
- var element_<?php echo $element["name"]; ?> = {
607
- id : "<?php echo $element['name']; ?>",
608
- show : [
609
- <?php
610
- foreach ($element['show'] as $key => $value) :
611
- echo "{key: '" . $key ."', val: [" ;
612
- if(gettype ($value)=='array'){ /*many items. array of strings of names*/
613
- foreach ($value as $item){
614
- echo "'".$item."',";
615
- }
616
- }
617
- else{/*single item name string */
618
- echo "'".$value."',";
619
- }
620
- echo "]},";
621
- endforeach;
622
- ?>
623
- ],
624
- hide : [
625
- <?php
626
- foreach ($element['hide'] as $key => $value) :
627
- echo "{key: '" . $key ."', val: [" ;
628
- if(gettype ($value)=='array'){ /*many items. array of strings of names*/
629
- foreach ($value as $item){
630
- echo "'".$item."',";
631
- }
632
- }
633
- else{/*single item name string */
634
- echo "'".$value."',";
635
- }
636
- echo "]},";
637
- endforeach;
638
- ?>
639
- ]
640
- };
641
-
642
-
643
-
644
- wdwt_elements.select_open(element_<?php echo $element["name"]; ?>);
645
- /*change on click*/
646
- jQuery('#<?php echo $element["name"]; ?>').on( "change", function() {
647
- wdwt_elements.select_open(element_<?php echo $element["name"]; ?>);
648
- });
649
-
650
- });
651
- </script>
652
- <?php
653
- }
654
-
655
- /**
656
- * Displays a select with style options which allow to modify preview text
657
- *
658
- * @param $element['text_preview'] = 'name'
659
- * @param $element['style_param'] = 'font-size' (css param name)
660
- * @param $element['valid_options'] = array('1em' => "1 em")
661
- */
662
-
663
- public function select_style($element, $context='option', $opt_val='', $meta=array()){
664
-
665
- if($context== 'meta'){
666
- $optionname = WDI_META.'[' .$element['name']. '][]';
667
- }
668
- else{
669
- global $wdi_options;
670
- $optionname = WDI_OPT.'[' .$element['name']. '][]';
671
- $opt_val = $wdi_options[$element['name']];
672
- }
673
- $width = isset($element["width"]) ? $element["width"] : $this->params["select_width"];
674
-
675
- ?>
676
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
677
- <select name="<?php echo $optionname; ?>" id="<?php echo $element['name'] ?>" <?php $this->custom_attrs($element); ?> style="width:<?php echo $width;?>px;">
678
- <?php
679
- foreach($element['valid_options'] as $key => $value){ ?>
680
- <option value="<?php echo esc_attr($key); ?>" <?php selected(true, in_array($key, $opt_val)); ?>><?php echo esc_html($value); ?></option>
681
- <?php } ?>
682
- </select>
683
- </div>
684
- <?php
685
- if($context == 'option') :
686
- ?>
687
- <script>
688
- jQuery(document).ready(function () {
689
- /*init*/
690
-
691
- var element_<?php echo $element["name"]; ?> = {
692
- id : "<?php echo $element["name"]; ?>",
693
- text_preview : "<?php echo $element['text_preview']; ?>",
694
- style_param : "<?php echo $element['style_param']; ?>",
695
- };
696
-
697
- wdwt_elements.select_style(element_<?php echo $element["name"]; ?>);
698
- /*change preview text*/
699
- jQuery('#<?php echo $element["name"]; ?>').on( "change", function() {
700
- wdwt_elements.select_style(element_<?php echo $element["name"]; ?>);
701
- });
702
-
703
- });
704
- </script>
705
- <?php
706
- endif;
707
- }
708
-
709
-
710
-
711
- /**
712
- * Displays single textarea field
713
- *
714
- * @param $params["textarea_height"] and $params["textarea_width"]
715
- *
716
- */
717
-
718
- public function textarea($element, $context='option', $opt_val='', $meta=array()){
719
-
720
- if($context== 'meta'){
721
- $optionname = WDI_META.'[' .$element['name']. ']';
722
- }
723
- else{
724
- global $wdi_options;
725
- $optionname = WDI_OPT.'[' .$element['name']. ']';
726
- $opt_val = isset($wdi_options[$element['name']])? $wdi_options[$element['name']] : '';
727
- }
728
-
729
- $textarea_w = isset($element["width"]) ? $element["width"] : $this->params["textarea_width"];
730
- $textarea_h = isset($element["height"]) ? $element["height"] : $this->params["textarea_height"];
731
- ?>
732
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
733
- <div class="block">
734
- <div class="optioninput">
735
- <textarea name="<?php echo $optionname; ?>" id="<?php echo $element['name'] ?>" <?php $this->custom_attrs($element); ?> style="width:<?php echo $textarea_w; ?>px; height:<?php echo $textarea_h; ?>px;"><?php echo esc_html($opt_val); ?></textarea>
736
- </div>
737
- </div>
738
- </div>
739
- <?php
740
-
741
- }
742
-
743
-
744
-
745
-
746
- /**
747
- * displays a preview text in typography page
748
- * @param $element['modified_by'] = array('home_font_weight' => 'font-weight')
749
- *
750
- */
751
-
752
- public function text_preview($element, $context='option', $opt_val='', $meta=array()){
753
- global $wdi_options;
754
- ?>
755
-
756
- <div class="font_preview_wrap" id="wdwt_wrap_<?php echo $element['name']; ?>">
757
- <label class="typagrphy_label" for="" style="font-size:18px;font-size: 20px;font-family: Segoe UI;"><?php echo __('Preview', WDWT_LANG ); ?></label>
758
- <div class="font_preview">
759
- <div class="optioninput-preview" id="<?php echo $element['name']; ?>" style="margin-top: 14px; margin-bottom: 23px;" ><?php
760
- $theme = wp_get_theme();
761
- echo esc_html($theme->description);
762
- ?></div>
763
- </div>
764
- </div>
765
- <?php
766
- }
767
-
768
-
769
-
770
- /**
771
- * Displays an upload with single input field for filename
772
- *
773
- * @param $element[''] =
774
- *
775
- * not for the slider!!!
776
- */
777
-
778
- public function upload_single($element, $context='', $opt_val=''){
779
-
780
- if($context== 'meta'){
781
- $optionname = WDI_META.'[' .$element['name']. ']';
782
- }
783
- else{
784
- global $wdi_options;
785
- $optionname = WDI_OPT.'[' .$element['name']. ']';
786
- $opt_val = $wdi_options[$element['name']];
787
- }
788
-
789
- $upload_size = isset($element["upload_size"]) ? $element["upload_size"] : $this->params["upload_size"];
790
- $filetype = (isset($element["filetype"]) && $element_filetype != '') ? $element["filetype"] : $this->params["upload_filetype"];
791
-
792
- ?>
793
- <script>
794
- jQuery(document).ready(function ($) {
795
-
796
- /* set uploader size in resizing*/
797
- tb_position = function() {
798
- var tbWindow = jQuery('#TB_window'),
799
- width = jQuery(window).width(),
800
- H = jQuery(window).height(),
801
- W = ( 850 < width ) ? 850 : width,
802
- adminbar_height = 0;
803
-
804
- if ( jQuery('#wpadminbar').length ) {
805
- adminbar_height = parseInt(jQuery('#wpadminbar').css('height'), 10 );
806
- }
807
-
808
- if ( tbWindow.size() ) {
809
- tbWindow.width( W - 50 ).height( H - 45 - adminbar_height );
810
- jQuery('#TB_iframeContent').width( W - 50 ).height( H - 75 - adminbar_height );
811
- tbWindow.css({'margin-left': '-' + parseInt( ( ( W - 50 ) / 2 ), 10 ) + 'px'});
812
- if ( typeof document.body.style.maxWidth !== 'undefined' )
813
- tbWindow.css({'top': 20 + adminbar_height + 'px', 'margin-top': '0'});
814
- }
815
- };
816
-
817
- /*setup the var*/
818
- jQuery('#uploader_<?php echo $element['name']; ?>').on('click', function () {
819
-
820
- window.parent.uploadID = jQuery(this).prev('#<?php echo $element['name']; ?>');
821
- /*grab the specific input*/
822
- /*formfield = jQuery('.upload').attr('name');*/
823
- tb_show('', 'media-upload.php?type=<?php echo $filetype;?>&amp;TB_iframe=true');
824
- return false;
825
- });
826
- window.send_to_editor = function (html) {
827
- imgurl = jQuery('img', html).attr('src');
828
- /*assign the value to the input*/
829
- window.parent.uploadID.val(imgurl);
830
- /*trigger change for the customizer control*/
831
- window.parent.uploadID.change();
832
- tb_remove();
833
- };
834
-
835
- /*jQuery(".slide_tab").prev().parent().prev().css("display","none");*/
836
- });
837
- </script>
838
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
839
- <div class="optioninput" id="upload_images">
840
- <input type="text" class="upload" id="<?php echo $element["name"] ?>" name="<?php echo $optionname; ?>" size="<?php echo $upload_size; ?>" <?php $this->custom_attrs($element); ?> value="<?php echo esc_url($opt_val); ?>"/>
841
- <input class="upload-button button" type="button" id="uploader_<?php echo $element['name']; ?>" value="<?php esc_attr_e('Upload Image', WDWT_LANG); ?>"/>
842
- </div>
843
- </div>
844
- <?php
845
-
846
- }
847
-
848
-
849
- /**
850
- * Displays an upload with
851
- * input fields for filename,
852
- * remove button,
853
- * img href text, image title text, imange description textarea,
854
- * and upload new image button
855
- *
856
- *
857
- * @param $element[''] =
858
- *
859
- * for the slider!!!
860
- */
861
-
862
-
863
- public function upload_multiple($element, $context='', $opt_val='', $meta=array()){
864
- if($context== 'meta'){
865
- $optionname = WDI_META.'[' .$element['name']. ']';
866
- /*correct here later*/
867
- }
868
- else {
869
- global $wdi_options;
870
- $imgs_url = $wdi_options[$element['name']];
871
- $optionname_url = WDI_OPT.'[' .$element['name']. ']';
872
-
873
- $imgs_href = $wdi_options[$element['option']['imgs_href']] ;
874
- $optionname_href = WDI_OPT.'[' .$element['option']['imgs_href']. ']';
875
- $imgs_title = $wdi_options[$element['option']['imgs_title']] ;
876
- $optionname_title = WDI_OPT.'[' .$element['option']['imgs_title']. ']';
877
- $imgs_desc = $wdi_options[$element['option']['imgs_description']];
878
- $optionname_desc = WDI_OPT.'[' .$element['option']['imgs_description']. ']';
879
- }
880
-
881
- $upload_size = isset($element["upload_size"]) ? $element["upload_size"] : $this->params["upload_size"];
882
- $filetype = (isset($element["filetype"]) && $element_filetype != '') ? $element["filetype"] : $this->params["upload_filetype"];
883
- ?>
884
-
885
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
886
-
887
- <div class="wdwt_slide wdwt_slide_<?php echo $element['name']; ?> last_slide" id="wdwt_slide_<?php echo $element['name']; ?>_0">
888
- <!-- Image URL -->
889
- <div class="slide-from-base_url" style="margin-bottom:3%;">
890
- <div valign="middle"><h2><?php esc_html_e("Image URL",WDWT_LANG); ?></h2></div>
891
- <div>
892
- <input type="text" id="<?php echo $element['name']; ?>_url_0" size="50" value="" class="upload image_links_group" >
893
-
894
- <input type="button" class="<?php echo $element['name']; ?>_update-image slide_but_up" id="<?php echo $element['name']; ?>_update-button_0" value="<?php esc_attr_e("Update image", WDWT_LANG); ?>">
895
-
896
- <input type="button" class="<?php echo $element['name']; ?>_remove-image slide_but_rem wdwt_btn_red" id="<?php echo $element['name']; ?>_remove-button_0" value="<?php esc_attr_e("Remove this slide", WDWT_LANG); ?>" />
897
- </div>
898
- </div>
899
- <!-- Image -->
900
- <div class="slide-from-base_image">
901
- <div><img style="width:82%;" id="<?php echo $element['name']; ?>_img_0" src="" /></div>
902
- </div>
903
- <!-- Image HREF -->
904
- <div class="slide-from-base_href">
905
- <div valign="middle"><h2><?php esc_html_e("Image Href", WDWT_LANG); ?></h2></div>
906
- <div><input type="text" id="<?php echo $element['name']; ?>_href_0" class="image_href_group" value="" /></div>
907
- </div>
908
- <!-- Image TITLE -->
909
- <div class="slide-from-base_title">
910
- <div valign="middle">
911
- <h2><?php esc_html_e("Image Title", WDWT_LANG); ?></h2>
912
- </div>
913
- <div><input type="text" id="<?php echo $element['name']; ?>_title_0" class="image_title_group" value="" /></div>
914
- </div>
915
- <!-- Image DESCRIPTION -->
916
- <div class="slide-from-base_desc" style="margin-bottom:3%;">
917
- <div valign="middle">
918
- <h2><?php esc_html_e("Image Description", WDWT_LANG); ?></h2>
919
- </div>
920
- <div>
921
- <textarea class="image_descr_group" id="<?php echo $element['name']; ?>_descr_0" style="width:236px; height:120px;"></textarea>
922
- </div>
923
- </div>
924
- </div>
925
-
926
- <div class="slider-controls">
927
- <div valign="middle">
928
- <h2>
929
- <?php esc_html_e("Image", WDWT_LANG); ?>
930
- <span class="hasTip" style="cursor: pointer;color: #3B5998;" title="<?php esc_attr_e("Using this option you can add images for the slider.",WDWT_LANG); ?>">[?]</span>
931
- </h2>
932
- </div>
933
- <div>
934
- <input type="hidden" name="<?php echo $optionname_url; ?>" id="<?php echo $element['name']; ?>_urls" data-customize-setting-link="<?php echo $optionname_url; ?>" value="<?php echo esc_attr($imgs_url); ?>" >
935
- <input type="hidden" name="<?php echo $optionname_href; ?>" id="<?php echo $element['name']; ?>_hrefs" data-customize-setting-link="<?php echo $optionname_href; ?>" value="<?php echo esc_attr($imgs_href); ?>" >
936
- <input type="hidden" name="<?php echo $optionname_title; ?>" id="<?php echo $element['name']; ?>_titles" data-customize-setting-link="<?php echo $optionname_title; ?>" value="<?php echo esc_attr($imgs_title); ?>" >
937
- <input type="hidden" name="<?php echo $optionname_desc; ?>" id="<?php echo $element['name']; ?>_descrs" data-customize-setting-link="<?php echo $optionname_desc; ?>" value="<?php echo esc_attr($imgs_desc); ?>" >
938
- <input class="upload_button_slide" type="button" id="<?php echo $element['name']; ?>_add-button" value="<?php esc_attr_e('Add new slide', WDWT_LANG); ?>" />
939
- </div>
940
- </div>
941
- </div>
942
- <script type="text/javascript">
943
- jQuery(document).ready(function(){
944
-
945
- var element_<?php echo $element["name"]; ?> = {
946
- id : "<?php echo $element['name']; ?>",
947
- urls : jQuery('#<?php echo $element['name']; ?>_urls').val(),
948
- hrefs : jQuery('#<?php echo $element['name']; ?>_hrefs').val(),
949
- titles : jQuery('#<?php echo $element['name']; ?>_titles').val(),
950
- descrs : jQuery('#<?php echo $element['name']; ?>_descrs').val(),
951
- active : 0,
952
- number_slides : wdwt_elements.slider.len(jQuery('#<?php echo $element['name']; ?>_urls').val()),
953
- };
954
- /*init show*/
955
- wdwt_elements.slider.init(element_<?php echo $element["name"]; ?>);
956
- wdwt_elements.slider.show(element_<?php echo $element["name"]; ?>);
957
- /*firefox bug!*/
958
- jQuery('#customize-control-theme_portfolio_gallery_options-slider_head').find("*").on("focus",function(e){
959
- console.log(e);
960
- });
961
- /*watch for changes in values*/
962
- jQuery("#wdwt_wrap_<?php echo $element['name']; ?>").on("change", ".image_links_group" , function (){
963
- var index = wdwt_elements.slider.find_index(jQuery(this), "<?php echo $element['name']; ?>_url_");
964
- wdwt_elements.slider.edit(element_<?php echo $element["name"]; ?>, index, "url");
965
- });
966
- jQuery("#wdwt_wrap_<?php echo $element['name']; ?>").on("change", ".image_href_group", function (){
967
- var index = wdwt_elements.slider.find_index(jQuery(this), "<?php echo $element['name']; ?>_href_");
968
- wdwt_elements.slider.edit(element_<?php echo $element["name"]; ?>, index, "href");
969
- });
970
- jQuery("#wdwt_wrap_<?php echo $element['name']; ?>").on("change", ".image_title_group", function (){
971
- var index = wdwt_elements.slider.find_index(jQuery(this), "<?php echo $element['name']; ?>_title_");
972
- wdwt_elements.slider.edit(element_<?php echo $element["name"]; ?>, index, "title");
973
- });
974
- jQuery("#wdwt_wrap_<?php echo $element['name']; ?>").on("change", ".image_descr_group", function (){
975
- var index = wdwt_elements.slider.find_index(jQuery(this), "<?php echo $element['name']; ?>_descr_");
976
- wdwt_elements.slider.edit(element_<?php echo $element["name"]; ?>, index, "descr");
977
- });
978
- /*add new slide*/
979
- jQuery("#<?php echo $element['name']; ?>_add-button").on('click', function(){
980
- tb_show("", "media-upload.php?type=image&amp;TB_iframe=true");
981
- add_image=send_to_editor ;
982
- window.send_to_editor = function(html) {
983
- imgurl = jQuery("img",html).attr("src");
984
- after = element_<?php echo $element["name"]; ?>.number_slides-1;
985
- wdwt_elements.slider.insert(element_<?php echo $element["name"]; ?>, after, imgurl);
986
- tb_remove();
987
- };
988
- return false;
989
- });
990
- /*update image*/
991
- jQuery("#wdwt_wrap_<?php echo $element['name']; ?>").on('click', ".<?php echo $element['name']; ?>_update-image", function(){
992
- var index = wdwt_elements.slider.find_index(jQuery(this), "<?php echo $element['name']; ?>_update-button_");
993
- tb_show("", "media-upload.php?type=image&amp;TB_iframe=true");
994
- window.send_to_editor = function(html) {
995
- imgurl = jQuery("img",html).attr("src");
996
- jQuery("#<?php echo $element['name']; ?>_url_"+index).val(imgurl);
997
- jQuery("#<?php echo $element['name']; ?>_url_"+index).change();
998
- tb_remove();
999
- };
1000
- return false;
1001
- });
1002
- /*remove slide*/
1003
- jQuery("#wdwt_wrap_<?php echo $element['name']; ?>").on('click', ".<?php echo $element['name']; ?>_remove-image", function(){
1004
- var index = wdwt_elements.slider.find_index(jQuery(this), "<?php echo $element['name']; ?>_remove-button_");
1005
- element_<?php echo $element["name"]; ?>.active = index;
1006
- wdwt_elements.slider.remove(element_<?php echo $element["name"]; ?>);
1007
- });
1008
- });
1009
- </script>
1010
- <?php
1011
- }
1012
-
1013
-
1014
-
1015
-
1016
-
1017
- /**
1018
- * Displays a select with color theme options which allows to select active theme
1019
- *
1020
- * @param $element['color_panel'] = 'name of color panel'
1021
- * @param $element['default'] = array(
1022
- * 'active'=>0,
1023
- * 'themes' => array(array('name'=>'theme_1', "title" =>'')),
1024
- * 'colors'=> array(
1025
- * array('color_name => 'array('value'=>'#cccccc', 'default'=>'#000000')))
1026
- * )
1027
- *
1028
- */
1029
-
1030
- public function select_theme($element, $context='option', $opt_val='', $meta=array()){
1031
-
1032
-
1033
- if($context== 'meta'){
1034
- $optionname = WDI_META.'[' .$element['name']. ']';
1035
- }
1036
- else{
1037
- global $wdi_options;
1038
- $optionname = WDI_OPT.'[' .$element['name']. ']';
1039
- $opt_val = $wdi_options[$element['name']];
1040
- }
1041
-
1042
- $current = $opt_val['active'];
1043
- $width = isset($element["width"]) ? $element["width"] : $this->params["select_width"];
1044
- ?>
1045
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
1046
- <select name="<?php echo $optionname; ?>[active]" id="<?php echo $element['name'] ?>" <?php $this->custom_attrs($element); ?> style="width:<?php echo $width; ?>px;">
1047
- <?php
1048
- for($i=0; $i<sizeof($element['default']['themes']); $i++){ ?>
1049
- <option value="<?php echo $i ?>" <?php selected( $current, $i); ?>> <?php echo esc_html($element['default']['themes'][$i]['title']); ?></option>
1050
- <?php } ?>
1051
- </select>
1052
- </div>
1053
- <script>/*stop here*/
1054
- jQuery(document).ready(function () {
1055
-
1056
- /*create var storing all parameters*/
1057
- var element_<?php echo $element['name'] ?> = {
1058
- id : "<?php echo $element["name"]; ?>",
1059
- cpanel:"<?php echo $element['color_panel']; ?>",
1060
- themes:[],
1061
- colors:[]
1062
- };
1063
-
1064
- <?php
1065
- /*add themes to variable*/
1066
- for($i=0; $i<sizeof($opt_val['themes']); $i++):
1067
- ?>
1068
- element_<?php echo $element['name']; ?>.themes.push({name: "<?php echo $opt_val['themes'][$i]['name']; ?>", title: "<?php echo esc_attr($opt_val['themes'][$i]['title']); ?>"});
1069
- var theme_colors = {};
1070
- <?php
1071
- foreach ($opt_val['colors'][$i] as $color_name => $color){
1072
- ?>
1073
- theme_colors["<?php echo $color_name; ?>"] = { name: "<?php echo $color_name; ?>", val: "<?php echo $color['value']; ?>", def: "<?php echo $color['default']; ?>"};
1074
- <?php
1075
- }
1076
- /*add colors of every theme to variable */
1077
- ?>
1078
- element_<?php echo $element['name']; ?>.colors.push(theme_colors);
1079
- <?php
1080
- endfor;
1081
- ?>
1082
- /*refresh color panel on theme select change*/
1083
- jQuery('#<?php echo $element["name"]; ?>').on( "change", function() {
1084
- wdwt_elements.refresh_colorpanel(element_<?php echo $element['name'] ?>);
1085
- });
1086
-
1087
- });
1088
- </script>
1089
- <?php
1090
- }
1091
-
1092
-
1093
- /**
1094
- * Displays a color panel with names, pickers and default buttons for every color
1095
- * Active theme index and its colors are taken from here, not from select_theme
1096
- *
1097
- * @param $element['default'] = array( 'select_theme' => 'color_scheme', 'active' => 0,
1098
- * 'colors' => array('color_name'=>array('value'=>'#cccccc', 'value'=>'#000000')))
1099
- */
1100
-
1101
- public function colors($element, $context='option', $opt_val='', $meta=array()){
1102
-
1103
- if($context== 'meta'){
1104
- $optionname = WDI_META.'[' .$element['name']. ']';
1105
- }
1106
- else{
1107
- global $wdi_options;
1108
- $optionname = WDI_OPT.'[' .$element['name']. ']';
1109
- $opt_val = $wdi_options[$element['name']];
1110
- }
1111
-
1112
- $select_theme = $opt_val['select_theme'];
1113
- ?>
1114
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
1115
- <input type="text" class="hidden_field" id="theme_<?php echo $element['name']; ?>" hidden='hidden' name="<?php echo $optionname.'[select_theme]'; ?>" value="<?php echo esc_attr($opt_val['select_theme']); ?>">
1116
- <input type="text" class="hidden_field" id="active_<?php echo $element['name']; ?>" hidden='hidden' name="<?php echo $optionname.'[active]'; ?>" value="<?php echo esc_attr($opt_val['active']); ?>">
1117
- <?php foreach($opt_val['colors'] as $color_name => $color): ?>
1118
- <div class='wdwt_float'>
1119
- <span class="wdwt_color_title"><?php echo esc_html($element['color_names'][$color_name]); ?></span>
1120
- <div>
1121
- <input type="text" class="hidden_field" id="default_<?php echo $element['name']; ?>_<?php echo $color_name; ?>" hidden='hidden' name="<?php echo $optionname.'[colors]['.$color_name.']'.'[default]'; ?>" value="<?php echo $color['default']; ?>">
1122
- <input type="text" class='color_input' id="value_<?php echo $element['name']; ?>_<?php echo $color_name; ?>" name="<?php echo $optionname.'[colors]['.$color_name.']'.'[value]'; ?>" value="<?php echo $color['value']; ?>" data-default-color="<?php echo $color['default']; ?>" style="background-color:<?php echo $color['value']; ?>;">
1123
- </div>
1124
- </div>
1125
- <?php endforeach; ?>
1126
- </div>
1127
- <script type="text/javascript">
1128
- jQuery(document).ready(function() {
1129
- jQuery('.color_input').wpColorPicker();
1130
-
1131
-
1132
- });
1133
- </script>
1134
- <?php
1135
- }
1136
-
1137
-
1138
- /**
1139
- * Displays a diagram with
1140
- * input fields for title and percent
1141
- * colors and other options are given separately, type (horizonral, circular etc. ...)
1142
- */
1143
-
1144
-
1145
- public function diagram($element, $context='', $opt_val='', $meta=array()){
1146
- if($context== 'meta'){
1147
- $optionname = WDI_META.'[' .$element['name']. ']';
1148
- $diagram_title = isset($meta[$element['option']['diagram_title']]) ? $meta[$element['option']['diagram_title']] : '' ;
1149
- $optionname_title = WDI_META.'[' .$element['option']['diagram_title']. ']';
1150
- $diagram_percent = isset($meta[$element['option']['diagram_percent']]) ? $meta[$element['option']['diagram_percent']] : '';
1151
- $optionname_percent = WDI_META.'[' .$element['option']['diagram_percent']. ']';
1152
- }
1153
- else {
1154
- global $wdi_options;
1155
-
1156
- $diagram_title = $wdi_options[$element['option']['diagram_title']] ;
1157
- $optionname_title = WDI_OPT.'[' .$element['option']['diagram_title']. ']';
1158
- $diagram_percent = $wdi_options[$element['option']['diagram_percent']];
1159
- $optionname_percent = WDI_OPT.'[' .$element['option']['diagram_percent']. ']';
1160
- }
1161
- ?>
1162
-
1163
- <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
1164
-
1165
- <div class="wdwt_diagram wdwt_diagram_<?php echo $element['name']; ?> last_percent" id="wdwt_diagram_<?php echo $element['name']; ?>_0">
1166
- <!-- Percent TITLE -->
1167
- <div class="diagram-from-base_title">
1168
- <div valign="middle">
1169
- <h2><?php esc_html_e("Title", WDWT_LANG); ?></h2>
1170
- </div>
1171
- <div><input type="text" id="<?php echo $element['name']; ?>_title_0" class="diagram_title_group" value="" /></div>
1172
- </div>
1173
- <!-- percent DESCRIPTION -->
1174
- <div class="diagram-from-base_desc" style="margin-bottom:3%;">
1175
- <div valign="middle">
1176
- <h2><?php esc_html_e("Percent", WDWT_LANG); ?></h2>
1177
- </div>
1178
- <div>
1179
- <input type="text" class="diagram_percent_group" id="<?php echo $element['name']; ?>_percent_0" value="" />%
1180
- <input type="button" class="<?php echo $element['name']; ?>_remove-percent wdwt_btn_red" id="<?php echo $element['name']; ?>_remove-button_0" value="<?php esc_attr_e("Remove this percent", WDWT_LANG); ?>" />
1181
- </div>
1182
- </div>
1183
- </div>
1184
-
1185
- <div class="diagram-controls">
1186
- <div>
1187
- <input type="hidden" name="<?php echo $optionname_title; ?>" id="<?php echo $element['name']; ?>_titles" data-customize-setting-link="<?php echo $optionname_title; ?>" value="<?php echo esc_attr($diagram_title); ?>" >
1188
- <input type="hidden" name="<?php echo $optionname_percent; ?>" id="<?php echo $element['name']; ?>_percents" data-customize-setting-link="<?php echo $optionname_percent; ?>" value="<?php echo esc_attr($diagram_percent); ?>" >
1189
- <input class="add_percent wdwt_btn_blue" type="button" id="<?php echo $element['name']; ?>_add-button" value="<?php esc_attr_e('Add new percent value', WDWT_LANG); ?>" />
1190
- </div>
1191
- </div>
1192
- </div>
1193
- <script type="text/javascript">
1194
- jQuery(document).ready(function(){
1195
-
1196
- var element_<?php echo $element["name"]; ?> = {
1197
- id : "<?php echo $element['name']; ?>",
1198
- titles : jQuery('#<?php echo $element['name']; ?>_titles').val(),
1199
- percents : jQuery('#<?php echo $element['name']; ?>_percents').val(),
1200
- active : 0,
1201
- number_percents : wdwt_elements.diagram.len(jQuery('#<?php echo $element['name']; ?>_titles').val()),
1202
- };
1203
- /*init show*/
1204
- wdwt_elements.diagram.init(element_<?php echo $element["name"]; ?>);
1205
- wdwt_elements.diagram.show(element_<?php echo $element["name"]; ?>);
1206
- /*watch for changes in values*/
1207
- jQuery("#wdwt_wrap_<?php echo $element['name']; ?>").on("change", ".diagram_title_group", function (){
1208
- var index = wdwt_elements.diagram.find_index(jQuery(this), "<?php echo $element['name']; ?>_title_");
1209
- wdwt_elements.diagram.edit(element_<?php echo $element["name"]; ?>, index, "title");
1210
- });
1211
- jQuery("#wdwt_wrap_<?php echo $element['name']; ?>").on("change", ".diagram_percent_group", function (){
1212
- var index = wdwt_elements.diagram.find_index(jQuery(this), "<?php echo $element['name']; ?>_percent_");
1213
- wdwt_elements.diagram.edit(element_<?php echo $element["name"]; ?>, index, "percent");
1214
- });
1215
- /*add new percent*/
1216
- jQuery("#<?php echo $element['name']; ?>_add-button").on('click', function(){
1217
- console.log('call');
1218
- after = element_<?php echo $element["name"]; ?>.number_percents-1;
1219
- wdwt_elements.diagram.insert(element_<?php echo $element["name"]; ?>, after, '');
1220
- });
1221
- /*remove percent*/
1222
- jQuery("#wdwt_wrap_<?php echo $element['name']; ?>").on('click', ".<?php echo $element['name']; ?>_remove-percent", function(){
1223
- var index = wdwt_elements.diagram.find_index(jQuery(this), "<?php echo $element['name']; ?>_remove-button_");
1224
- element_<?php echo $element["name"]; ?>.active = index;
1225
- wdwt_elements.diagram.remove(element_<?php echo $element["name"]; ?>);
1226
- });
1227
- });
1228
- </script>
1229
- <?php
1230
- }
1231
-
1232
-
1233
- public static function html_page_nav($count_items, $page_number, $form_id, $items_per_page = 20) {
1234
- $limit = 20;
1235
- if ($count_items) {
1236
- if ($count_items % $limit) {
1237
- $items_county = ($count_items - $count_items % $limit) / $limit + 1;
1238
- }
1239
- else {
1240
- $items_county = ($count_items - $count_items % $limit) / $limit;
1241
- }
1242
- }
1243
- else {
1244
- $items_county = 1;
1245
- }
1246
- ?>
1247
- <script type="text/javascript">
1248
- var items_county = <?php echo $items_county; ?>;
1249
- function wdi_spider_page(x, y) {
1250
- switch (y) {
1251
- case 1:
1252
- if (x >= items_county) {
1253
- document.getElementById('page_number').value = items_county;
1254
- }
1255
- else {
1256
- document.getElementById('page_number').value = x + 1;
1257
- }
1258
- break;
1259
- case 2:
1260
- document.getElementById('page_number').value = items_county;
1261
- break;
1262
- case -1:
1263
- if (x == 1) {
1264
- document.getElementById('page_number').value = 1;
1265
- }
1266
- else {
1267
- document.getElementById('page_number').value = x - 1;
1268
- }
1269
- break;
1270
- case -2:
1271
- document.getElementById('page_number').value = 1;
1272
- break;
1273
- default:
1274
- document.getElementById('page_number').value = 1;
1275
- }
1276
- document.getElementById('<?php echo $form_id; ?>').submit();
1277
- }
1278
- function check_enter_key(e) {
1279
- var key_code = (e.keyCode ? e.keyCode : e.which);
1280
- if (key_code == 13) { /*Enter keycode*/
1281
- if (jQuery('#current_page').val() >= items_county) {
1282
- document.getElementById('page_number').value = items_county;
1283
- }
1284
- else {
1285
- document.getElementById('page_number').value = jQuery('#current_page').val();
1286
- }
1287
- document.getElementById('<?php echo $form_id; ?>').submit();
1288
- }
1289
- return true;
1290
- }
1291
- </script>
1292
- <div class="tablenav-pages">
1293
- <span class="displaying-num">
1294
- <?php
1295
- if ($count_items != 0) {
1296
- echo $count_items; ?> item<?php echo (($count_items == 1) ? '' : 's');
1297
- }
1298
- ?>
1299
- </span>
1300
- <?php
1301
- if ($count_items > $items_per_page) {
1302
- $first_page = "first-page";
1303
- $prev_page = "prev-page";
1304
- $next_page = "next-page";
1305
- $last_page = "last-page";
1306
- if ($page_number == 1) {
1307
- $first_page = "first-page disabled";
1308
- $prev_page = "prev-page disabled";
1309
- $next_page = "next-page";
1310
- $last_page = "last-page";
1311
- }
1312
- if ($page_number >= $items_county) {
1313
- $first_page = "first-page ";
1314
- $prev_page = "prev-page";
1315
- $next_page = "next-page disabled";
1316
- $last_page = "last-page disabled";
1317
- }
1318
- ?>
1319
- <span class="pagination-links">
1320
- <a class="<?php echo $first_page; ?>" title="Go to the first page" href="javascript:wdi_spider_page(<?php echo $page_number; ?>,-2);">«</a>
1321
- <a class="<?php echo $prev_page; ?>" title="Go to the previous page" href="javascript:wdi_spider_page(<?php echo $page_number; ?>,-1);">‹</a>
1322
- <span class="paging-input">
1323
- <span class="total-pages">
1324
- <input class="current_page" id="current_page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return check_enter_key(event)" title="Go to the page" type="text" size="1" />
1325
- </span> of
1326
- <span class="total-pages">
1327
- <?php echo $items_county; ?>
1328
- </span>
1329
- </span>
1330
- <a class="<?php echo $next_page ?>" title="Go to the next page" href="javascript:wdi_spider_page(<?php echo $page_number; ?>,1);">›</a>
1331
- <a class="<?php echo $last_page ?>" title="Go to the last page" href="javascript:wdi_spider_page(<?php echo $page_number; ?>,2);">»</a>
1332
- <?php
1333
- }
1334
- ?>
1335
- </span>
1336
- </div>
1337
- <input type="hidden" id="page_number" name="page_number" value="<?php echo (int) WDILibrary::get('page_number', 1); ?>" />
1338
- <input type="hidden" id="search_or_not" name="search_or_not" value="<?php echo WDILibrary::get('search_or_not', ''); ?>"/>
1339
- <?php
1340
- }
1341
-
1342
- private function merge_params($param_begin_low_prioritet,$param_last_high_priorete){
1343
- $new_param=array();
1344
- foreach($param_begin_low_prioritet as $key=>$value){
1345
- if(isset($param_last_high_priorete[$key])){
1346
- $new_param[$key]=$param_last_high_priorete[$key];
1347
- }
1348
- else{
1349
- $new_param[$key]=$value;
1350
- }
1351
- }
1352
- return $new_param;
1353
- }
1354
-
1355
- private function custom_attrs($element = array()){
1356
- $attrs_array = isset($element['custom_attrs']) ? $element['custom_attrs'] : array();
1357
-
1358
- foreach ($attrs_array as $attr => $value) {
1359
- echo esc_html($attr).'="'.esc_attr($value).'" ';
1360
- }
1361
-
1362
-
1363
- }
1364
-
1365
- /**
1366
- * get posts and categories createdwith checkboxes
1367
- */
1368
- protected function get_old_posts_cats($val){
1369
-
1370
- $value = $val;
1371
- $val = json_decode( $val , true );
1372
- $result = array();
1373
-
1374
- if( $val == NULL ){
1375
- if(is_string($value)){
1376
- $result = explode(",", $value);
1377
- }
1378
- } else {
1379
- $result = $val;
1380
- }
1381
- return $result;
1382
-
1383
- }
1384
-
1385
-
1386
- }
1387
-
1388
-
1389
-
1
+ <?php
2
+
3
+ class WDI_admin_view{
4
+
5
+ private $params;
6
+
7
+ function __construct($initial_params=array()){
8
+
9
+ $defaults= array(
10
+ "input_size"=>"36",
11
+ "textarea_height"=>"150",
12
+ "textarea_width"=>"450",
13
+ "select_width"=>"240",
14
+ "upload_size" => "30",
15
+ "upload_filetype" => "image",
16
+ );
17
+
18
+ $this->params=$this->merge_params($defaults,$initial_params);
19
+ }
20
+
21
+ /**
22
+ * Displays a link like button
23
+ *
24
+ */
25
+ public function link_button($element, $context = 'option', $opt_val = '', $meta=array()){
26
+ global $wdi_options;
27
+ ?>
28
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
29
+ <div class="block margin">
30
+ <a href="<?php echo $element['href']; ?>" id="<?php echo $element['name']; ?>" class="button" style="text-decoration:none;"><?php echo (isset($element['value']))?esc_html($element['value']):esc_html($element['title']); ?></a>
31
+ </div>
32
+ <?php if(isset($element['description'])){ ?>
33
+ <p style="font-style: italic;"><?php echo $element['description']; ?></p>
34
+ <?php } ?>
35
+ </div>
36
+ <?php
37
+ }
38
+
39
+ /**
40
+ * Displays a single button for toggling some other elements onclick
41
+ *
42
+ * @param $element['show'] = array('name_of _element_to_hide')
43
+ * @param $element['hide'] = array('name_of _element_to_show')
44
+ */
45
+ public function button($element, $context = 'option', $opt_val = '', $meta=array()){
46
+ global $wdi_options;
47
+ ?>
48
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
49
+ <div class="block margin">
50
+ <div class="optioninput checkbox">
51
+ <span id="<?php echo $element['name']; ?>" class="button" style="text-decoration:none;"><?php echo esc_html($element['title']); ?></span>
52
+ </div>
53
+ </div>
54
+ <script>
55
+ jQuery(document).ready(function () {
56
+ /*init*/
57
+ var element_<?php echo $element['name']; ?> = {
58
+ id : "<?php echo $element['name']; ?>",
59
+ show : [
60
+ <?php
61
+ foreach ($element['show'] as $element_to_show) :
62
+ echo "'". $element_to_show ."', ";
63
+ endforeach;
64
+ ?>
65
+ ],
66
+ hide : [
67
+ <?php
68
+ foreach ($element['hide'] as $element_to_hide) :
69
+ echo "'". $element_to_hide ."', ";
70
+ endforeach;
71
+ ?>
72
+ ]
73
+ };
74
+
75
+ wdwt_elements.button_toggle(element_<?php echo $element['name']; ?>);
76
+ /*change on click*/
77
+ jQuery('#<?php echo $element['name']; ?>').on( "click", function() {
78
+ wdwt_elements.button_toggle(element_<?php echo $element['name']; ?>);
79
+ });
80
+
81
+ });
82
+ </script>
83
+ </div>
84
+ <?php
85
+ }
86
+
87
+ /**
88
+ * Displays single checkbox with hidden input field
89
+ *
90
+ *
91
+ */
92
+
93
+ public function checkbox($element, $context = 'option', $opt_val = '', $meta=array()){
94
+
95
+ if($context == 'meta'){
96
+ $optionname = "topt".'[' .$element['name']. ']';
97
+ }
98
+ else{
99
+ global $wdi_options;
100
+ $optionname = WDI_OPT.'[' .$element['name']. ']';
101
+ $opt_val = isset($wdi_options[$element['name']]) ? $wdi_options[$element['name']] : '';
102
+ }
103
+ if(is_bool($opt_val)){
104
+ $opt_val = $opt_val ? 'true' : '';
105
+ }
106
+ $opt_val = trim($opt_val);
107
+
108
+
109
+ ?>
110
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
111
+ <div class="block margin">
112
+ <div class="optioninput checkbox">
113
+ <input type="checkbox" class="checkbox" name="<?php echo $optionname; ?>" id="<?php echo $element['name'] ?>" <?php checked($opt_val || $opt_val =='on'); ?> <?php $this->custom_attrs($element); ?> value="1">
114
+ </div>
115
+ </div>
116
+ </div>
117
+ <?php
118
+ }
119
+
120
+ /**
121
+ * Displays a checkbox which shows or hides some other elements onclick
122
+ *
123
+ * @param $element['show'] = array('name_of _element_to_show') on being checked
124
+ * @param $element['hide'] = array('name_of _element_to_hide') on being checked
125
+ */
126
+
127
+ public function checkbox_open($element, $context = 'option', $opt_val ='', $meta=array()){
128
+
129
+ if($context== 'meta'){
130
+ $optionname = WDI_META.'[' .$element['name']. ']';
131
+ }
132
+ else{
133
+ global $wdi_options;
134
+ $optionname = WDI_OPT.'[' .$element['name']. ']';
135
+ $opt_val = $wdi_options[$element['name']];
136
+ }
137
+ if(is_bool($opt_val)){
138
+ $opt_val = $opt_val ? 'true' : '';
139
+ }
140
+ $opt_val = trim($opt_val);
141
+
142
+ ?>
143
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
144
+ <div class="block margin">
145
+ <div class="optioninput checkbox">
146
+ <input type="checkbox" class="checkbox" name="<?php echo $optionname; ?>" id="<?php echo $element['name'] ?>" <?php checked($opt_val || $opt_val =='on'); ?> <?php $this->custom_attrs($element); ?> value="<?php echo esc_attr($opt_val); ?>">
147
+ </div>
148
+ </div>
149
+ </div>
150
+ <script>
151
+ jQuery(document).ready(function () {
152
+ /*init*/
153
+
154
+ var element_<?php echo $element["name"]; ?> = {
155
+ id : "<?php echo $element["name"]; ?>",
156
+ show : [
157
+ <?php
158
+ foreach ($element['show'] as $element_to_show) :
159
+ echo "'". $element_to_show ."', ";
160
+ endforeach;
161
+ ?>
162
+ ],
163
+ hide : [
164
+ <?php
165
+ foreach ($element['hide'] as $element_to_hide) :
166
+ echo "'". $element_to_hide ."', ";
167
+ endforeach;
168
+ ?>
169
+ ]
170
+ };
171
+
172
+ wdwt_elements.checkbox_open(element_<?php echo $element["name"]; ?>);
173
+ /*change on click*/
174
+ jQuery('#<?php echo $element["name"]; ?>').on( "click", function() {
175
+ wdwt_elements.checkbox_open(element_<?php echo $element["name"]; ?>);
176
+ });
177
+
178
+ });
179
+ </script>
180
+ <?php
181
+ }
182
+
183
+ /**
184
+ * Displays a single color control
185
+ */
186
+
187
+ public function color($element, $context='option', $opt_val='', $meta=array()){
188
+
189
+ if($context== 'meta'){
190
+ $optionname = WDI_META.'[' .$element['name']. ']';
191
+ }
192
+ else{
193
+ $wdi_options = get_option(WDI_OPT );
194
+ $optionname = WDI_OPT.'[' .$element['name']. ']';
195
+ $opt_val = $wdi_options[$element['name']];
196
+ }
197
+ ?>
198
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
199
+ <div class='wdwt_float'>
200
+ <div>
201
+ <input type="text" class='color_input' id="<?php echo $element['name']; ?>" name="<?php echo $optionname; ?>" value="<?php echo esc_attr($opt_val); ?>" data-default-color="<?php echo $element['default']; ?>" <?php $this->custom_attrs($element); ?> style="background-color:<?php echo esc_attr($opt_val); ?>;">
202
+ </div>
203
+ </div>
204
+ </div>
205
+ <script type="text/javascript">
206
+ jQuery(document).ready(function() {
207
+ jQuery('.color_input').wpColorPicker();
208
+ });
209
+ </script>
210
+ <?php
211
+ }
212
+
213
+
214
+ public function users_list($element){
215
+ global $wdi_options;
216
+
217
+ $readonly = isset($element['readonly']) ? 'readonly="' . esc_attr($element['readonly']) . '"' : '';
218
+ $input_size = isset($element["input_size"]) ? $element["input_size"] : $this->params["input_size"];
219
+ $optionname = WDI_OPT.'[' .$element['name']. ']';
220
+
221
+ ?>
222
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
223
+ <div class="block">
224
+ <?php WDILibrary::add_auth_button(''); ?>
225
+ <div class="wdi_more_token_template" style="display: none;">
226
+ <input type="text" name="<?php echo $optionname . '[access_token][]'; ?>" class="wdi_more_access_token" disabled/>
227
+ <input type="text" name="<?php echo $optionname . '[user_name][]'; ?>" class="wdi_more_user_name" disabled/>
228
+ <input type="text" name="<?php echo $optionname . '[user_id][]'; ?>" class="wdi_more_user_id" disabled/>
229
+ </div>
230
+ </div>
231
+ </div>
232
+ <div style="margin-left: 15px;font-style: italic;">
233
+ <p>Log out from current Instagram account(same browser)<br> before signing in to the another account.</p>
234
+ </div>
235
+ <?php
236
+ }
237
+
238
+
239
+ /**
240
+ * Displays single input text field
241
+ *
242
+ * @param $element['default']: one of the keys from 'valid options' as default value
243
+ * @param $element['input_size']: input field size
244
+ * @param $element['value'] : give constant value
245
+ */
246
+
247
+ public function input($element, $context = 'option', $opt_val = '', $meta=array()){
248
+ $readonly = isset($element['readonly'])? 'readonly="'.esc_attr($element['readonly']).'"' : '';
249
+
250
+ if($context== 'meta'){
251
+ $optionname = WDI_META.'[' .$element['name']. ']';
252
+ }
253
+ else{
254
+ global $wdi_options;
255
+ $optionname = WDI_OPT.'[' .$element['name']. ']';
256
+ $opt_val = isset($wdi_options[$element['name']])? $wdi_options[$element['name']] : '';
257
+ if($opt_val == ''){
258
+ $opt_val = isset($element['value']) ? $element['value'] : '';
259
+ }
260
+
261
+ }
262
+
263
+ $input_size = isset($element["input_size"]) ? $element["input_size"] : $this->params["input_size"];
264
+
265
+ ?>
266
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
267
+ <div class="block">
268
+ <div class="optioninput">
269
+ <input <?php echo $readonly;?> type=<?php echo isset($element['input_type']) ? $element['input_type'] : 'text'?> name="<?php echo $optionname; ?>" id="<?php echo $element['name'];?>"
270
+ <?php echo isset($element['required'])? 'required' : ''; $this->custom_attrs($element); ?>
271
+ value="<?php echo esc_attr($opt_val); ?>" size="<?php echo $input_size; ?>"
272
+ <?php if(isset($element['attr'])) {echo $element['attr']['name'] . '="' .$element["attr"]["value"].'"';} ?>>
273
+ <?php
274
+ if(isset($element['unit_symbol'])){
275
+ echo $element['unit_symbol'];
276
+ }
277
+ echo isset($element['label']) ? $element['label'] : "";
278
+ ?>
279
+
280
+ </div>
281
+ </div>
282
+ </div>
283
+ <?php
284
+ }
285
+
286
+ /**
287
+ * Displays a group of radio buttons
288
+ *
289
+ * @param $option['valid options']: ($key => array('title'=>'value', 'description'=>'value'))
290
+ * @param $option['default']: one of the keys from 'valid options' as default value
291
+ */
292
+
293
+ public function radio($element, $context = 'option', $opt_val = '', $meta=array()){
294
+ if($context== 'meta'){
295
+ $optionname = WDI_META.'[' .$element['name']. ']';
296
+ }
297
+ else{
298
+ global $wdi_options;
299
+ $optionname = WDI_OPT.'[' .$element['name']. ']';
300
+ $opt_val = $wdi_options[$element['name']];
301
+ }
302
+
303
+ ?>
304
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
305
+ <?php
306
+ foreach ( $element['valid_options'] as $key => $option ) {
307
+ ?>
308
+ <input type="radio" name="<?php echo $optionname; ?>" <?php checked( $key, $opt_val ); ?> <?php $this->custom_attrs($element); ?> value="<?php echo esc_attr($key); ?>" /> <?php echo esc_html($option); ?>
309
+ <?php
310
+ echo isset($element['label']) ? $element['label'] : "";
311
+ }
312
+ ?>
313
+ </div>
314
+ <?php
315
+ }
316
+
317
+ /**
318
+ * Displays a group of radio buttons which show or hide some other elements onchange
319
+ *
320
+ * @param $element['show'] = array("key" => "value") or array("key" => array("value","valeu2"))
321
+ * @param $element['hide'] = array("key" => "value")
322
+ */
323
+
324
+ public function radio_open($element,$context = 'option', $opt_val = '', $meta=array()){
325
+
326
+ if($context== 'meta'){
327
+ $optionname = WDI_META.'[' .$element['name']. ']';
328
+ }
329
+ else{
330
+ global $wdi_options;
331
+ $optionname = WDI_OPT.'[' .$element['name']. ']';
332
+ $opt_val = $wdi_options[$element['name']];
333
+ }
334
+
335
+ ?>
336
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
337
+ <?php
338
+ foreach ( $element['valid_options'] as $key => $option ) {
339
+ ?>
340
+ <input type="radio" name="<?php echo $optionname; ?>" <?php checked( $key, $opt_val ); ?> <?php $this->custom_attrs($element); ?> value="<?php echo esc_attr($key); ?>" /> <?php echo esc_html($option); ?>
341
+ <?php
342
+ }
343
+ ?>
344
+ </div>
345
+ <script>
346
+ jQuery(document).ready(function () {
347
+ /*init*/
348
+ var element_<?php echo $element["name"]; ?> = {
349
+ name : "<?php echo $optionname; ?>",
350
+ show : [
351
+ <?php
352
+ foreach ($element['show'] as $key => $value) :
353
+ echo "{key: '" . $key ."', val: [" ;
354
+ if(gettype ($value)=='array'){ /*many items. array of strings of names*/
355
+ foreach ($value as $item){
356
+ echo "'".$item."',";
357
+ }
358
+ }
359
+ else{/*single item name string */
360
+ echo "'".$value."',";
361
+ }
362
+ echo "]},";
363
+ endforeach;
364
+ ?>
365
+ ],
366
+ hide : [
367
+ <?php
368
+ foreach ($element['hide'] as $key => $value) :
369
+ echo "{key: '" . $key ."', val: [" ;
370
+ if(gettype ($value)=='array'){ /*many items. array of strings of names*/
371
+ foreach ($value as $item){
372
+ echo "'".$item."',";
373
+ }
374
+ }
375
+ else{/*single item name string */
376
+ echo "'".$value."',";
377
+ }
378
+ echo "]},";
379
+ endforeach;
380
+ ?>
381
+ ]
382
+ };
383
+
384
+ wdwt_elements.radio_open(element_<?php echo $element["name"]; ?>);
385
+ /*shor or hide on change*/
386
+ jQuery('input[type=radio][name="<?php echo $optionname; ?>"]').on( "change", function() {
387
+ wdwt_elements.radio_open(element_<?php echo $element["name"]; ?>);
388
+ });
389
+
390
+ });
391
+ </script>
392
+
393
+ <?php
394
+
395
+ }
396
+
397
+ /**
398
+ * Displays a group of radio buttons with images as descriptions
399
+ *
400
+ * @param $element['valid options']: array( array('index' => 0, title'=>'value', 'description'=>'value'))
401
+ * @param $element['default']: one of the indices from 'valid options' as default value
402
+ * @param $element['img_src']:
403
+ * @param $element['img_height']:
404
+ * @param $element['img_width']:
405
+ */
406
+
407
+ public function radio_images($element, $context='meta', $opt_val='', $meta=array()){
408
+
409
+ if($context== 'meta'){
410
+ $optionname = WDI_META.'[' .$element['name']. ']';
411
+ }
412
+ else{
413
+ global $wdi_options;
414
+ $optionname = WDI_OPT.'[' .$element['name']. ']';
415
+ $opt_val = $wdi_options[$element['name']];
416
+ }
417
+ ?>
418
+
419
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
420
+ <?php
421
+ $img_h = intval($element['img_height']) / sizeof($element['valid_options']);
422
+ foreach($element['valid_options'] as $option) { ?>
423
+ <div class="sprite_layouts">
424
+ <div alt="<?php echo esc_attr($option['title']); ?>" style="width:<?php echo esc_attr($element['img_width']); ?>px; height:<?php echo esc_attr($img_h); ?>px; background:url(<?php echo esc_url(WDWT_IMG_INC.$element['img_src']); ?>) no-repeat 0 -<?php echo (intval($option['index'])-1) * $img_h; ?>px;"></div>
425
+ <input type="radio" name="<?php echo $optionname; ?>" <?php checked( $option['index'], $opt_val ); ?> <?php $this->custom_attrs($element); ?> value="<?php echo intval($option['index']); ?>">
426
+ </div>
427
+ <?php
428
+ }
429
+ ?>
430
+ </div>
431
+ <?php
432
+ }
433
+ /**
434
+ * Displays a group of radio buttons with images as descriptions which show or hide some other elements onchange
435
+ *
436
+ * @param $element['valid options']: array( array('index' => 0, title'=>'value', 'description'=>'value'))
437
+ * @param $element['default']: one of the indices from 'valid options' as default value
438
+ * @param $element['img_src']:
439
+ * @param $element['img_height']:
440
+ * @param $element['img_width']:
441
+ * @param $element['show'] = array("key" => "value") or array("key" => array("value","valeu2"))
442
+ * @param $element['hide'] = array("key" => "value")
443
+ *
444
+ */
445
+
446
+
447
+ public function radio_images_open($element, $context='option', $opt_val ='', $meta=array()){
448
+
449
+ if($context== 'meta'){
450
+ $optionname = WDI_META.'[' .$element['name']. ']';
451
+ }
452
+ else{
453
+ global $wdi_options;
454
+ $optionname = WDI_OPT.'[' .$element['name']. ']';
455
+ $opt_val = $wdi_options[$element['name']];
456
+ }
457
+ ?>
458
+
459
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
460
+ <?php
461
+ $img_h = intval($element['img_height']) / sizeof($element['valid_options']);
462
+ foreach($element['valid_options'] as $option) { ?>
463
+ <div class="sprite_layouts">
464
+ <div alt="<?php echo esc_attr($option['title']); ?>" style="width:<?php echo $element['img_width']; ?>px; height:<?php echo $img_h; ?>px; background:url(<?php echo esc_url(WDWT_IMG_INC.$element['img_src']); ?>) no-repeat 0 -<?php echo (intval($option['index'])-1) * $img_h; ?>px;"></div>
465
+ <input type="radio" name="<?php echo $optionname; ?>" <?php checked( $option['index'], $opt_val ); ?> <?php $this->custom_attrs($element); ?> value="<?php echo intval($option['index']); ?>">
466
+ </div>
467
+ <?php
468
+ }
469
+ ?>
470
+ </div>
471
+ <script>
472
+ jQuery(document).ready(function () {
473
+ /*init*/
474
+ var element_<?php echo $element["name"]; ?> = {
475
+ name : "<?php echo $optionname; ?>",
476
+ show : [
477
+ <?php
478
+ foreach ($element['show'] as $key => $value) :
479
+ echo "{key: '" . $key ."', val: [" ;
480
+ if(gettype ($value)=='array'){ /*many items. array of strings of names*/
481
+ foreach ($value as $item){
482
+ echo "'".$item."',";
483
+ }
484
+ }
485
+ else{/*single item name string */
486
+ echo "'".$value."',";
487
+ }
488
+ echo "]},";
489
+ endforeach;
490
+ ?>
491
+ ],
492
+ hide : [
493
+ <?php
494
+ foreach ($element['hide'] as $key => $value) :
495
+ echo "{key: '" . $key ."', val: [" ;
496
+ if(gettype ($value)=='array'){ /*many items. array of strings of names*/
497
+ foreach ($value as $item){
498
+ echo "'".$item."',";
499
+ }
500
+ }
501
+ else{/*single item name string */
502
+ echo "'".$value."',";
503
+ }
504
+ echo "]},";
505
+ endforeach;
506
+ ?>
507
+ ]
508
+ };
509
+
510
+ wdwt_elements.radio_open(element_<?php echo $element["name"]; ?>);
511
+ /*shor or hide on change*/
512
+ jQuery('input[type=radio][name="<?php echo $optionname; ?>"]').on( "change", function() {
513
+ wdwt_elements.radio_open(element_<?php echo $element["name"]; ?>);
514
+ });
515
+
516
+ });
517
+ </script>
518
+ <?php
519
+ }
520
+
521
+ /**
522
+ * Displays single <select> element
523
+ *
524
+ * @param $select['valid options']: ($key => $value)
525
+ * @param $select['default']: one of the keys from 'valid options' as default value
526
+ */
527
+
528
+ public function select($element, $context='option', $opt_val = array(), $meta=array()){
529
+
530
+ if($context== 'meta'){
531
+ $optionname = WDI_META.'[' .$element['name']. '][]';
532
+ if(!is_array($opt_val)){
533
+ /*old format*/
534
+ $opt_val = $this->get_old_posts_cats($opt_val);
535
+ }
536
+ }
537
+ else{
538
+ global $wdi_options;
539
+ $optionname = isset($element["multiple"]) ? WDI_OPT.'[' .$element['name']. '][]' : WDI_OPT.'[' .$element['name']. ']';
540
+ $opt_val = isset($wdi_options[$element['name']]) ? $wdi_options[$element['name']] : $element["default"];
541
+ }
542
+ $opt_val = is_array($opt_val) ? $opt_val : array($opt_val);
543
+ $multiple = isset($element["multiple"]) ? true : false;
544
+ $width = isset($element["width"]) ? intval($element["width"]) : $this->params["select_width"];
545
+ $disabled = isset($element["disabled"]) ? $element["disabled"] : array();
546
+ ?>
547
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
548
+ <div class="block">
549
+ <div class="optioninput">
550
+ <select name="<?php echo $optionname; ?>" id="<?php echo $element['name'] ?>" <?php echo $multiple ? 'multiple="multiple"' : ''; ?> <?php $this->custom_attrs($element); ?> style="width:<?php echo $width; ?>px; resize:vertical;">
551
+ <?php foreach($element['valid_options'] as $key => $value){ ?>
552
+ <option value="<?php echo esc_attr($key) ?>" <?php selected(true, in_array($key, $opt_val)); ?> <?php echo in_array($key, $disabled) ? 'disabled="disabled"' : ''; ?>>
553
+ <?php echo esc_html($value); ?>
554
+ </option>
555
+ <?php } ?>
556
+ </select>
557
+ </div>
558
+ </div>
559
+ </div>
560
+ <?php
561
+ }
562
+
563
+ /**
564
+ * Displays a select with options which shows or hides some other elements onchange
565
+ *
566
+ * @param $element['show'] = array("key" => "value") or array("key" => array("value","valeu2"))
567
+ * @param $element['hide'] = array("key" => "value")
568
+ */
569
+
570
+ public function select_open($element, $context='option', $opt_val ='', $meta=array()){
571
+
572
+ if($context== 'meta'){
573
+ $optionname = WDI_META.'[' .$element['name']. '][]';
574
+ }
575
+ else{
576
+ global $wdi_options;
577
+ $optionname = WDI_OPT.'[' .$element['name']. '][]';
578
+ $opt_val = $wdi_options[$element['name']];
579
+ }
580
+ $opt_val = is_array($opt_val) ? $opt_val : array($opt_val);
581
+ $multiple = isset($element["multiple"]) ? true : false;
582
+ $width = isset($element["width"]) ? intval($element["width"]) : $this->params["select_width"];
583
+
584
+ ?>
585
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
586
+
587
+ <select name="<?php echo $optionname; ?>" id="<?php echo $element['name'] ?>" <?php echo $multiple ? 'multiple="multiple"' : ''; ?> <?php $this->custom_attrs($element); ?> style="width:<?php echo $width; ?>px; resize:vertical;">
588
+ <?php
589
+ foreach($element['valid_options'] as $key => $value){ ?>
590
+ <option value="<?php echo esc_attr($key); ?>" <?php selected(true, in_array($key, $opt_val)); ?>><?php echo esc_html($value); ?></option>
591
+ <?php } ?>
592
+ </select>
593
+ </div>
594
+ <script>
595
+ jQuery(document).ready(function () {
596
+ /*init*/
597
+
598
+ var element_<?php echo $element["name"]; ?> = {
599
+ id : "<?php echo $element['name']; ?>",
600
+ show : [
601
+ <?php
602
+ foreach ($element['show'] as $key => $value) :
603
+ echo "{key: '" . $key ."', val: [" ;
604
+ if(gettype ($value)=='array'){ /*many items. array of strings of names*/
605
+ foreach ($value as $item){
606
+ echo "'".$item."',";
607
+ }
608
+ }
609
+ else{/*single item name string */
610
+ echo "'".$value."',";
611
+ }
612
+ echo "]},";
613
+ endforeach;
614
+ ?>
615
+ ],
616
+ hide : [
617
+ <?php
618
+ foreach ($element['hide'] as $key => $value) :
619
+ echo "{key: '" . $key ."', val: [" ;
620
+ if(gettype ($value)=='array'){ /*many items. array of strings of names*/
621
+ foreach ($value as $item){
622
+ echo "'".$item."',";
623
+ }
624
+ }
625
+ else{/*single item name string */
626
+ echo "'".$value."',";
627
+ }
628
+ echo "]},";
629
+ endforeach;
630
+ ?>
631
+ ]
632
+ };
633
+
634
+
635
+
636
+ wdwt_elements.select_open(element_<?php echo $element["name"]; ?>);
637
+ /*change on click*/
638
+ jQuery('#<?php echo $element["name"]; ?>').on( "change", function() {
639
+ wdwt_elements.select_open(element_<?php echo $element["name"]; ?>);
640
+ });
641
+
642
+ });
643
+ </script>
644
+ <?php
645
+ }
646
+
647
+ /**
648
+ * Displays a select with style options which allow to modify preview text
649
+ *
650
+ * @param $element['text_preview'] = 'name'
651
+ * @param $element['style_param'] = 'font-size' (css param name)
652
+ * @param $element['valid_options'] = array('1em' => "1 em")
653
+ */
654
+
655
+ public function select_style($element, $context='option', $opt_val='', $meta=array()){
656
+
657
+ if($context== 'meta'){
658
+ $optionname = WDI_META.'[' .$element['name']. '][]';
659
+ }
660
+ else{
661
+ global $wdi_options;
662
+ $optionname = WDI_OPT.'[' .$element['name']. '][]';
663
+ $opt_val = $wdi_options[$element['name']];
664
+ }
665
+ $width = isset($element["width"]) ? $element["width"] : $this->params["select_width"];
666
+
667
+ ?>
668
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
669
+ <select name="<?php echo $optionname; ?>" id="<?php echo $element['name'] ?>" <?php $this->custom_attrs($element); ?> style="width:<?php echo $width;?>px;">
670
+ <?php
671
+ foreach($element['valid_options'] as $key => $value){ ?>
672
+ <option value="<?php echo esc_attr($key); ?>" <?php selected(true, in_array($key, $opt_val)); ?>><?php echo esc_html($value); ?></option>
673
+ <?php } ?>
674
+ </select>
675
+ </div>
676
+ <?php
677
+ if($context == 'option') :
678
+ ?>
679
+ <script>
680
+ jQuery(document).ready(function () {
681
+ /*init*/
682
+
683
+ var element_<?php echo $element["name"]; ?> = {
684
+ id : "<?php echo $element["name"]; ?>",
685
+ text_preview : "<?php echo $element['text_preview']; ?>",
686
+ style_param : "<?php echo $element['style_param']; ?>",
687
+ };
688
+
689
+ wdwt_elements.select_style(element_<?php echo $element["name"]; ?>);
690
+ /*change preview text*/
691
+ jQuery('#<?php echo $element["name"]; ?>').on( "change", function() {
692
+ wdwt_elements.select_style(element_<?php echo $element["name"]; ?>);
693
+ });
694
+
695
+ });
696
+ </script>
697
+ <?php
698
+ endif;
699
+ }
700
+
701
+
702
+
703
+ /**
704
+ * Displays single textarea field
705
+ *
706
+ * @param $params["textarea_height"] and $params["textarea_width"]
707
+ *
708
+ */
709
+
710
+ public function textarea($element, $context='option', $opt_val='', $meta=array()){
711
+
712
+ if($context== 'meta'){
713
+ $optionname = WDI_META.'[' .$element['name']. ']';
714
+ }
715
+ else{
716
+ global $wdi_options;
717
+ $optionname = WDI_OPT.'[' .$element['name']. ']';
718
+ $opt_val = isset($wdi_options[$element['name']])? $wdi_options[$element['name']] : '';
719
+ }
720
+
721
+ $textarea_w = isset($element["width"]) ? $element["width"] : $this->params["textarea_width"];
722
+ $textarea_h = isset($element["height"]) ? $element["height"] : $this->params["textarea_height"];
723
+ ?>
724
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
725
+ <div class="block">
726
+ <div class="optioninput">
727
+ <textarea name="<?php echo $optionname; ?>" id="<?php echo $element['name'] ?>" <?php $this->custom_attrs($element); ?> style="width:<?php echo $textarea_w; ?>px; height:<?php echo $textarea_h; ?>px;"><?php echo esc_html($opt_val); ?></textarea>
728
+ </div>
729
+ </div>
730
+ </div>
731
+ <?php
732
+
733
+ }
734
+
735
+
736
+
737
+
738
+ /**
739
+ * displays a preview text in typography page
740
+ * @param $element['modified_by'] = array('home_font_weight' => 'font-weight')
741
+ *
742
+ */
743
+
744
+ public function text_preview($element, $context='option', $opt_val='', $meta=array()){
745
+ global $wdi_options;
746
+ ?>
747
+
748
+ <div class="font_preview_wrap" id="wdwt_wrap_<?php echo $element['name']; ?>">
749
+ <label class="typagrphy_label" for="" style="font-size:18px;font-size: 20px;font-family: Segoe UI;"><?php echo __('Preview', WDWT_LANG ); ?></label>
750
+ <div class="font_preview">
751
+ <div class="optioninput-preview" id="<?php echo $element['name']; ?>" style="margin-top: 14px; margin-bottom: 23px;" ><?php
752
+ $theme = wp_get_theme();
753
+ echo esc_html($theme->description);
754
+ ?></div>
755
+ </div>
756
+ </div>
757
+ <?php
758
+ }
759
+
760
+
761
+
762
+ /**
763
+ * Displays an upload with single input field for filename
764
+ *
765
+ * @param $element[''] =
766
+ *
767
+ * not for the slider!!!
768
+ */
769
+
770
+ public function upload_single($element, $context='', $opt_val=''){
771
+
772
+ if($context== 'meta'){
773
+ $optionname = WDI_META.'[' .$element['name']. ']';
774
+ }
775
+ else{
776
+ global $wdi_options;
777
+ $optionname = WDI_OPT.'[' .$element['name']. ']';
778
+ $opt_val = $wdi_options[$element['name']];
779
+ }
780
+
781
+ $upload_size = isset($element["upload_size"]) ? $element["upload_size"] : $this->params["upload_size"];
782
+ $filetype = (isset($element["filetype"]) && $element_filetype != '') ? $element["filetype"] : $this->params["upload_filetype"];
783
+
784
+ ?>
785
+ <script>
786
+ jQuery(document).ready(function ($) {
787
+
788
+ /* set uploader size in resizing*/
789
+ tb_position = function() {
790
+ var tbWindow = jQuery('#TB_window'),
791
+ width = jQuery(window).width(),
792
+ H = jQuery(window).height(),
793
+ W = ( 850 < width ) ? 850 : width,
794
+ adminbar_height = 0;
795
+
796
+ if ( jQuery('#wpadminbar').length ) {
797
+ adminbar_height = parseInt(jQuery('#wpadminbar').css('height'), 10 );
798
+ }
799
+
800
+ if ( tbWindow.size() ) {
801
+ tbWindow.width( W - 50 ).height( H - 45 - adminbar_height );
802
+ jQuery('#TB_iframeContent').width( W - 50 ).height( H - 75 - adminbar_height );
803
+ tbWindow.css({'margin-left': '-' + parseInt( ( ( W - 50 ) / 2 ), 10 ) + 'px'});
804
+ if ( typeof document.body.style.maxWidth !== 'undefined' )
805
+ tbWindow.css({'top': 20 + adminbar_height + 'px', 'margin-top': '0'});
806
+ }
807
+ };
808
+
809
+ /*setup the var*/
810
+ jQuery('#uploader_<?php echo $element['name']; ?>').on('click', function () {
811
+
812
+ window.parent.uploadID = jQuery(this).prev('#<?php echo $element['name']; ?>');
813
+ /*grab the specific input*/
814
+ /*formfield = jQuery('.upload').attr('name');*/
815
+ tb_show('', 'media-upload.php?type=<?php echo $filetype;?>&amp;TB_iframe=true');
816
+ return false;
817
+ });
818
+ window.send_to_editor = function (html) {
819
+ imgurl = jQuery('img', html).attr('src');
820
+ /*assign the value to the input*/
821
+ window.parent.uploadID.val(imgurl);
822
+ /*trigger change for the customizer control*/
823
+ window.parent.uploadID.change();
824
+ tb_remove();
825
+ };
826
+
827
+ /*jQuery(".slide_tab").prev().parent().prev().css("display","none");*/
828
+ });
829
+ </script>
830
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
831
+ <div class="optioninput" id="upload_images">
832
+ <input type="text" class="upload" id="<?php echo $element["name"] ?>" name="<?php echo $optionname; ?>" size="<?php echo $upload_size; ?>" <?php $this->custom_attrs($element); ?> value="<?php echo esc_url($opt_val); ?>"/>
833
+ <input class="upload-button button" type="button" id="uploader_<?php echo $element['name']; ?>" value="<?php esc_attr_e('Upload Image', WDWT_LANG); ?>"/>
834
+ </div>
835
+ </div>
836
+ <?php
837
+
838
+ }
839
+
840
+
841
+ /**
842
+ * Displays an upload with
843
+ * input fields for filename,
844
+ * remove button,
845
+ * img href text, image title text, imange description textarea,
846
+ * and upload new image button
847
+ *
848
+ *
849
+ * @param $element[''] =
850
+ *
851
+ * for the slider!!!
852
+ */
853
+
854
+
855
+ public function upload_multiple($element, $context='', $opt_val='', $meta=array()){
856
+ if($context== 'meta'){
857
+ $optionname = WDI_META.'[' .$element['name']. ']';
858
+ /*correct here later*/
859
+ }
860
+ else {
861
+ global $wdi_options;
862
+ $imgs_url = $wdi_options[$element['name']];
863
+ $optionname_url = WDI_OPT.'[' .$element['name']. ']';
864
+
865
+ $imgs_href = $wdi_options[$element['option']['imgs_href']] ;
866
+ $optionname_href = WDI_OPT.'[' .$element['option']['imgs_href']. ']';
867
+ $imgs_title = $wdi_options[$element['option']['imgs_title']] ;
868
+ $optionname_title = WDI_OPT.'[' .$element['option']['imgs_title']. ']';
869
+ $imgs_desc = $wdi_options[$element['option']['imgs_description']];
870
+ $optionname_desc = WDI_OPT.'[' .$element['option']['imgs_description']. ']';
871
+ }
872
+
873
+ $upload_size = isset($element["upload_size"]) ? $element["upload_size"] : $this->params["upload_size"];
874
+ $filetype = (isset($element["filetype"]) && $element_filetype != '') ? $element["filetype"] : $this->params["upload_filetype"];
875
+ ?>
876
+
877
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
878
+
879
+ <div class="wdwt_slide wdwt_slide_<?php echo $element['name']; ?> last_slide" id="wdwt_slide_<?php echo $element['name']; ?>_0">
880
+ <!-- Image URL -->
881
+ <div class="slide-from-base_url" style="margin-bottom:3%;">
882
+ <div valign="middle"><h2><?php esc_html_e("Image URL",WDWT_LANG); ?></h2></div>
883
+ <div>
884
+ <input type="text" id="<?php echo $element['name']; ?>_url_0" size="50" value="" class="upload image_links_group" >
885
+
886
+ <input type="button" class="<?php echo $element['name']; ?>_update-image slide_but_up" id="<?php echo $element['name']; ?>_update-button_0" value="<?php esc_attr_e("Update image", WDWT_LANG); ?>">
887
+
888
+ <input type="button" class="<?php echo $element['name']; ?>_remove-image slide_but_rem wdwt_btn_red" id="<?php echo $element['name']; ?>_remove-button_0" value="<?php esc_attr_e("Remove this slide", WDWT_LANG); ?>" />
889
+ </div>
890
+ </div>
891
+ <!-- Image -->
892
+ <div class="slide-from-base_image">
893
+ <div><img style="width:82%;" id="<?php echo $element['name']; ?>_img_0" src="" /></div>
894
+ </div>
895
+ <!-- Image HREF -->
896
+ <div class="slide-from-base_href">
897
+ <div valign="middle"><h2><?php esc_html_e("Image Href", WDWT_LANG); ?></h2></div>
898
+ <div><input type="text" id="<?php echo $element['name']; ?>_href_0" class="image_href_group" value="" /></div>
899
+ </div>
900
+ <!-- Image TITLE -->
901
+ <div class="slide-from-base_title">
902
+ <div valign="middle">
903
+ <h2><?php esc_html_e("Image Title", WDWT_LANG); ?></h2>
904
+ </div>
905
+ <div><input type="text" id="<?php echo $element['name']; ?>_title_0" class="image_title_group" value="" /></div>
906
+ </div>
907
+ <!-- Image DESCRIPTION -->
908
+ <div class="slide-from-base_desc" style="margin-bottom:3%;">
909
+ <div valign="middle">
910
+ <h2><?php esc_html_e("Image Description", WDWT_LANG); ?></h2>
911
+ </div>
912
+ <div>
913
+ <textarea class="image_descr_group" id="<?php echo $element['name']; ?>_descr_0" style="width:236px; height:120px;"></textarea>
914
+ </div>
915
+ </div>
916
+ </div>
917
+
918
+ <div class="slider-controls">
919
+ <div valign="middle">
920
+ <h2>
921
+ <?php esc_html_e("Image", WDWT_LANG); ?>
922
+ <span class="hasTip" style="cursor: pointer;color: #3B5998;" title="<?php esc_attr_e("Using this option you can add images for the slider.",WDWT_LANG); ?>">[?]</span>
923
+ </h2>
924
+ </div>
925
+ <div>
926
+ <input type="hidden" name="<?php echo $optionname_url; ?>" id="<?php echo $element['name']; ?>_urls" data-customize-setting-link="<?php echo $optionname_url; ?>" value="<?php echo esc_attr($imgs_url); ?>" >
927
+ <input type="hidden" name="<?php echo $optionname_href; ?>" id="<?php echo $element['name']; ?>_hrefs" data-customize-setting-link="<?php echo $optionname_href; ?>" value="<?php echo esc_attr($imgs_href); ?>" >
928
+ <input type="hidden" name="<?php echo $optionname_title; ?>" id="<?php echo $element['name']; ?>_titles" data-customize-setting-link="<?php echo $optionname_title; ?>" value="<?php echo esc_attr($imgs_title); ?>" >
929
+ <input type="hidden" name="<?php echo $optionname_desc; ?>" id="<?php echo $element['name']; ?>_descrs" data-customize-setting-link="<?php echo $optionname_desc; ?>" value="<?php echo esc_attr($imgs_desc); ?>" >
930
+ <input class="upload_button_slide" type="button" id="<?php echo $element['name']; ?>_add-button" value="<?php esc_attr_e('Add new slide', WDWT_LANG); ?>" />
931
+ </div>
932
+ </div>
933
+ </div>
934
+ <script type="text/javascript">
935
+ jQuery(document).ready(function(){
936
+
937
+ var element_<?php echo $element["name"]; ?> = {
938
+ id : "<?php echo $element['name']; ?>",
939
+ urls : jQuery('#<?php echo $element['name']; ?>_urls').val(),
940
+ hrefs : jQuery('#<?php echo $element['name']; ?>_hrefs').val(),
941
+ titles : jQuery('#<?php echo $element['name']; ?>_titles').val(),
942
+ descrs : jQuery('#<?php echo $element['name']; ?>_descrs').val(),
943
+ active : 0,
944
+ number_slides : wdwt_elements.slider.len(jQuery('#<?php echo $element['name']; ?>_urls').val()),
945
+ };
946
+ /*init show*/
947
+ wdwt_elements.slider.init(element_<?php echo $element["name"]; ?>);
948
+ wdwt_elements.slider.show(element_<?php echo $element["name"]; ?>);
949
+ /*firefox bug!*/
950
+ jQuery('#customize-control-theme_portfolio_gallery_options-slider_head').find("*").on("focus",function(e){
951
+ console.log(e);
952
+ });
953
+ /*watch for changes in values*/
954
+ jQuery("#wdwt_wrap_<?php echo $element['name']; ?>").on("change", ".image_links_group" , function (){
955
+ var index = wdwt_elements.slider.find_index(jQuery(this), "<?php echo $element['name']; ?>_url_");
956
+ wdwt_elements.slider.edit(element_<?php echo $element["name"]; ?>, index, "url");
957
+ });
958
+ jQuery("#wdwt_wrap_<?php echo $element['name']; ?>").on("change", ".image_href_group", function (){
959
+ var index = wdwt_elements.slider.find_index(jQuery(this), "<?php echo $element['name']; ?>_href_");
960
+ wdwt_elements.slider.edit(element_<?php echo $element["name"]; ?>, index, "href");
961
+ });
962
+ jQuery("#wdwt_wrap_<?php echo $element['name']; ?>").on("change", ".image_title_group", function (){
963
+ var index = wdwt_elements.slider.find_index(jQuery(this), "<?php echo $element['name']; ?>_title_");
964
+ wdwt_elements.slider.edit(element_<?php echo $element["name"]; ?>, index, "title");
965
+ });
966
+ jQuery("#wdwt_wrap_<?php echo $element['name']; ?>").on("change", ".image_descr_group", function (){
967
+ var index = wdwt_elements.slider.find_index(jQuery(this), "<?php echo $element['name']; ?>_descr_");
968
+ wdwt_elements.slider.edit(element_<?php echo $element["name"]; ?>, index, "descr");
969
+ });
970
+ /*add new slide*/
971
+ jQuery("#<?php echo $element['name']; ?>_add-button").on('click', function(){
972
+ tb_show("", "media-upload.php?type=image&amp;TB_iframe=true");
973
+ add_image=send_to_editor ;
974
+ window.send_to_editor = function(html) {
975
+ imgurl = jQuery("img",html).attr("src");
976
+ after = element_<?php echo $element["name"]; ?>.number_slides-1;
977
+ wdwt_elements.slider.insert(element_<?php echo $element["name"]; ?>, after, imgurl);
978
+ tb_remove();
979
+ };
980
+ return false;
981
+ });
982
+ /*update image*/
983
+ jQuery("#wdwt_wrap_<?php echo $element['name']; ?>").on('click', ".<?php echo $element['name']; ?>_update-image", function(){
984
+ var index = wdwt_elements.slider.find_index(jQuery(this), "<?php echo $element['name']; ?>_update-button_");
985
+ tb_show("", "media-upload.php?type=image&amp;TB_iframe=true");
986
+ window.send_to_editor = function(html) {
987
+ imgurl = jQuery("img",html).attr("src");
988
+ jQuery("#<?php echo $element['name']; ?>_url_"+index).val(imgurl);
989
+ jQuery("#<?php echo $element['name']; ?>_url_"+index).change();
990
+ tb_remove();
991
+ };
992
+ return false;
993
+ });
994
+ /*remove slide*/
995
+ jQuery("#wdwt_wrap_<?php echo $element['name']; ?>").on('click', ".<?php echo $element['name']; ?>_remove-image", function(){
996
+ var index = wdwt_elements.slider.find_index(jQuery(this), "<?php echo $element['name']; ?>_remove-button_");
997
+ element_<?php echo $element["name"]; ?>.active = index;
998
+ wdwt_elements.slider.remove(element_<?php echo $element["name"]; ?>);
999
+ });
1000
+ });
1001
+ </script>
1002
+ <?php
1003
+ }
1004
+
1005
+
1006
+
1007
+
1008
+
1009
+ /**
1010
+ * Displays a select with color theme options which allows to select active theme
1011
+ *
1012
+ * @param $element['color_panel'] = 'name of color panel'
1013
+ * @param $element['default'] = array(
1014
+ * 'active'=>0,
1015
+ * 'themes' => array(array('name'=>'theme_1', "title" =>'')),
1016
+ * 'colors'=> array(
1017
+ * array('color_name => 'array('value'=>'#cccccc', 'default'=>'#000000')))
1018
+ * )
1019
+ *
1020
+ */
1021
+
1022
+ public function select_theme($element, $context='option', $opt_val='', $meta=array()){
1023
+
1024
+
1025
+ if($context== 'meta'){
1026
+ $optionname = WDI_META.'[' .$element['name']. ']';
1027
+ }
1028
+ else{
1029
+ global $wdi_options;
1030
+ $optionname = WDI_OPT.'[' .$element['name']. ']';
1031
+ $opt_val = $wdi_options[$element['name']];
1032
+ }
1033
+
1034
+ $current = $opt_val['active'];
1035
+ $width = isset($element["width"]) ? $element["width"] : $this->params["select_width"];
1036
+ ?>
1037
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
1038
+ <select name="<?php echo $optionname; ?>[active]" id="<?php echo $element['name'] ?>" <?php $this->custom_attrs($element); ?> style="width:<?php echo $width; ?>px;">
1039
+ <?php
1040
+ for($i=0; $i<sizeof($element['default']['themes']); $i++){ ?>
1041
+ <option value="<?php echo $i ?>" <?php selected( $current, $i); ?>> <?php echo esc_html($element['default']['themes'][$i]['title']); ?></option>
1042
+ <?php } ?>
1043
+ </select>
1044
+ </div>
1045
+ <script>/*stop here*/
1046
+ jQuery(document).ready(function () {
1047
+
1048
+ /*create var storing all parameters*/
1049
+ var element_<?php echo $element['name'] ?> = {
1050
+ id : "<?php echo $element["name"]; ?>",
1051
+ cpanel:"<?php echo $element['color_panel']; ?>",
1052
+ themes:[],
1053
+ colors:[]
1054
+ };
1055
+
1056
+ <?php
1057
+ /*add themes to variable*/
1058
+ for($i=0; $i<sizeof($opt_val['themes']); $i++):
1059
+ ?>
1060
+ element_<?php echo $element['name']; ?>.themes.push({name: "<?php echo $opt_val['themes'][$i]['name']; ?>", title: "<?php echo esc_attr($opt_val['themes'][$i]['title']); ?>"});
1061
+ var theme_colors = {};
1062
+ <?php
1063
+ foreach ($opt_val['colors'][$i] as $color_name => $color){
1064
+ ?>
1065
+ theme_colors["<?php echo $color_name; ?>"] = { name: "<?php echo $color_name; ?>", val: "<?php echo $color['value']; ?>", def: "<?php echo $color['default']; ?>"};
1066
+ <?php
1067
+ }
1068
+ /*add colors of every theme to variable */
1069
+ ?>
1070
+ element_<?php echo $element['name']; ?>.colors.push(theme_colors);
1071
+ <?php
1072
+ endfor;
1073
+ ?>
1074
+ /*refresh color panel on theme select change*/
1075
+ jQuery('#<?php echo $element["name"]; ?>').on( "change", function() {
1076
+ wdwt_elements.refresh_colorpanel(element_<?php echo $element['name'] ?>);
1077
+ });
1078
+
1079
+ });
1080
+ </script>
1081
+ <?php
1082
+ }
1083
+
1084
+
1085
+ /**
1086
+ * Displays a color panel with names, pickers and default buttons for every color
1087
+ * Active theme index and its colors are taken from here, not from select_theme
1088
+ *
1089
+ * @param $element['default'] = array( 'select_theme' => 'color_scheme', 'active' => 0,
1090
+ * 'colors' => array('color_name'=>array('value'=>'#cccccc', 'value'=>'#000000')))
1091
+ */
1092
+
1093
+ public function colors($element, $context='option', $opt_val='', $meta=array()){
1094
+
1095
+ if($context== 'meta'){
1096
+ $optionname = WDI_META.'[' .$element['name']. ']';
1097
+ }
1098
+ else{
1099
+ global $wdi_options;
1100
+ $optionname = WDI_OPT.'[' .$element['name']. ']';
1101
+ $opt_val = $wdi_options[$element['name']];
1102
+ }
1103
+
1104
+ $select_theme = $opt_val['select_theme'];
1105
+ ?>
1106
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
1107
+ <input type="text" class="hidden_field" id="theme_<?php echo $element['name']; ?>" hidden='hidden' name="<?php echo $optionname.'[select_theme]'; ?>" value="<?php echo esc_attr($opt_val['select_theme']); ?>">
1108
+ <input type="text" class="hidden_field" id="active_<?php echo $element['name']; ?>" hidden='hidden' name="<?php echo $optionname.'[active]'; ?>" value="<?php echo esc_attr($opt_val['active']); ?>">
1109
+ <?php foreach($opt_val['colors'] as $color_name => $color): ?>
1110
+ <div class='wdwt_float'>
1111
+ <span class="wdwt_color_title"><?php echo esc_html($element['color_names'][$color_name]); ?></span>
1112
+ <div>
1113
+ <input type="text" class="hidden_field" id="default_<?php echo $element['name']; ?>_<?php echo $color_name; ?>" hidden='hidden' name="<?php echo $optionname.'[colors]['.$color_name.']'.'[default]'; ?>" value="<?php echo $color['default']; ?>">
1114
+ <input type="text" class='color_input' id="value_<?php echo $element['name']; ?>_<?php echo $color_name; ?>" name="<?php echo $optionname.'[colors]['.$color_name.']'.'[value]'; ?>" value="<?php echo $color['value']; ?>" data-default-color="<?php echo $color['default']; ?>" style="background-color:<?php echo $color['value']; ?>;">
1115
+ </div>
1116
+ </div>
1117
+ <?php endforeach; ?>
1118
+ </div>
1119
+ <script type="text/javascript">
1120
+ jQuery(document).ready(function() {
1121
+ jQuery('.color_input').wpColorPicker();
1122
+
1123
+
1124
+ });
1125
+ </script>
1126
+ <?php
1127
+ }
1128
+
1129
+
1130
+ /**
1131
+ * Displays a diagram with
1132
+ * input fields for title and percent
1133
+ * colors and other options are given separately, type (horizonral, circular etc. ...)
1134
+ */
1135
+
1136
+
1137
+ public function diagram($element, $context='', $opt_val='', $meta=array()){
1138
+ if($context== 'meta'){
1139
+ $optionname = WDI_META.'[' .$element['name']. ']';
1140
+ $diagram_title = isset($meta[$element['option']['diagram_title']]) ? $meta[$element['option']['diagram_title']] : '' ;
1141
+ $optionname_title = WDI_META.'[' .$element['option']['diagram_title']. ']';
1142
+ $diagram_percent = isset($meta[$element['option']['diagram_percent']]) ? $meta[$element['option']['diagram_percent']] : '';
1143
+ $optionname_percent = WDI_META.'[' .$element['option']['diagram_percent']. ']';
1144
+ }
1145
+ else {
1146
+ global $wdi_options;
1147
+
1148
+ $diagram_title = $wdi_options[$element['option']['diagram_title']] ;
1149
+ $optionname_title = WDI_OPT.'[' .$element['option']['diagram_title']. ']';
1150
+ $diagram_percent = $wdi_options[$element['option']['diagram_percent']];
1151
+ $optionname_percent = WDI_OPT.'[' .$element['option']['diagram_percent']. ']';
1152
+ }
1153
+ ?>
1154
+
1155
+ <div class="wdwt_param" id="wdwt_wrap_<?php echo $element['name']; ?>">
1156
+
1157
+ <div class="wdwt_diagram wdwt_diagram_<?php echo $element['name']; ?> last_percent" id="wdwt_diagram_<?php echo $element['name']; ?>_0">
1158
+ <!-- Percent TITLE -->
1159
+ <div class="diagram-from-base_title">
1160
+ <div valign="middle">
1161
+ <h2><?php esc_html_e("Title", WDWT_LANG); ?></h2>
1162
+ </div>
1163
+ <div><input type="text" id="<?php echo $element['name']; ?>_title_0" class="diagram_title_group" value="" /></div>
1164
+ </div>
1165
+ <!-- percent DESCRIPTION -->
1166
+ <div class="diagram-from-base_desc" style="margin-bottom:3%;">
1167
+ <div valign="middle">
1168
+ <h2><?php esc_html_e("Percent", WDWT_LANG); ?></h2>
1169
+ </div>
1170
+ <div>
1171
+ <input type="text" class="diagram_percent_group" id="<?php echo $element['name']; ?>_percent_0" value="" />%
1172
+ <input type="button" class="<?php echo $element['name']; ?>_remove-percent wdwt_btn_red" id="<?php echo $element['name']; ?>_remove-button_0" value="<?php esc_attr_e("Remove this percent", WDWT_LANG); ?>" />
1173
+ </div>
1174
+ </div>
1175
+ </div>
1176
+
1177
+ <div class="diagram-controls">
1178
+ <div>
1179
+ <input type="hidden" name="<?php echo $optionname_title; ?>" id="<?p