WD Instagram Feed – Instagram Gallery - Version 1.4.2

Version Description

Fixed: Feed Media Resolution. Changed: Feed Header. Fixed: Show Follow on Instagram.

Download this release

Release Info

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

Code changes from version 1.4.1 to 1.4.2

Files changed (36) hide show
  1. admin-functions.php +764 -764
  2. admin/controllers/WDIControllerEditorShortcode.php +42 -42
  3. admin/controllers/WDIControllerFeeds_wdi.php +568 -568
  4. admin/controllers/WDIControllerSettings_wdi.php +54 -54
  5. admin/controllers/WDIControllerThemes_wdi.php +679 -679
  6. admin/controllers/WDIControllerUninstall_wdi.php +140 -140
  7. admin/controllers/WDIControllerWidget.php +57 -57
  8. admin/models/WDIModelEditorShortcode.php +18 -18
  9. admin/models/WDIModelFeeds_wdi.php +315 -315
  10. admin/models/WDIModelSettings_wdi.php +9 -9
  11. admin/models/WDIModelThemes_wdi.php +577 -577
  12. admin/models/WDIModelUninstall_wdi.php +12 -12
  13. admin/models/WDIModelWidget.php +13 -13
  14. admin/views/WDIViewEditorShortcode.php +124 -124
  15. admin/views/WDIViewFeeds_wdi.php +668 -666
  16. admin/views/WDIViewSettings_wdi.php +133 -133
  17. admin/views/WDIViewThemes_wdi.php +41 -41
  18. admin/views/WDIViewUninstall_wdi.php +132 -132
  19. admin/views/WDIViewWidget.php +122 -122
  20. css/block.css +57 -57
  21. css/gallerybox/jquery.mCustomScrollbar.css +473 -473
  22. css/pricing.css +179 -179
  23. css/tenweb-fonts/fonts.css +132 -132
  24. css/tenweb-fonts/fonts/tenweb.svg +44 -44
  25. css/wd_bp_install.css +46 -46
  26. css/wdi_backend.css +1806 -1806
  27. css/wdi_frontend.css +975 -975
  28. elementor/elementor.php +57 -57
  29. elementor/js/wdi_elementor_widget.js +22 -22
  30. elementor/styles/editor.css +84 -84
  31. elementor/styles/fonts/twbb-icons.svg +20 -20
  32. elementor/widget.php +114 -114
  33. framework/WDILibrary.php +1352 -1352
  34. framework/WDILibraryEmbed.php +922 -922
  35. framework/WDI_admin_view.php +1374 -1374
  36. framework/WDI_form_builder.php +249 -552
admin-functions.php CHANGED
@@ -1,764 +1,764 @@
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
- }
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,568 +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
- 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
- }
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/WDIControllerSettings_wdi.php CHANGED
@@ -1,55 +1,55 @@
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']) && !empty($_REQUEST['user_id']) ) {
17
- $user_id = $_REQUEST['user_id'];
18
- $user_name = $_REQUEST['username'];
19
- $expires_in = $_REQUEST['expires_in'];
20
- $access_token = $_REQUEST['wdi_access_token'];
21
-
22
- $wdi_options['wdi_start_in'] = time();
23
- $wdi_options['wdi_user_id'] = $user_id;
24
- $wdi_options['wdi_user_name'] = $user_name;
25
- $wdi_options['wdi_expires_in'] = $expires_in;
26
- $wdi_options['wdi_access_token'] = $access_token;
27
- update_option(WDI_OPT, $wdi_options);
28
-
29
- WDILibrary::redirect(add_query_arg(array(
30
- 'page' => 'wdi_settings',
31
- ), admin_url('admin.php')));
32
- }
33
- else {
34
- $data = WDILibrary::get_instagram_user($wdi_options['wdi_access_token']);
35
- if ( !empty($wdi_options['wdi_access_token']) && !empty($data['error']) && !empty($data['error']['message']) && !WDILibrary::get('wdi_reset_access_token_input', 0) ) {
36
- $wdi_options['wdi_user_id'] = '';
37
- $wdi_options['wdi_user_name'] = '';
38
- $wdi_options['wdi_access_token'] = '';
39
- update_option(WDI_OPT, $wdi_options);
40
- WDILibrary::wdi_spider_redirect(admin_url('admin.php?page=wdi_settings&message=' . $data['error']['message']));
41
- }
42
- }
43
-
44
- require_once(WDI_DIR . '/admin/models/WDIModelSettings_wdi.php');
45
- $model = new WDIModelSettings_wdi();
46
- require_once(WDI_DIR . '/admin/views/WDIViewSettings_wdi.php');
47
- $view = new WDIViewSettings_wdi($model);
48
- $message = WDILibrary::get('message', '');
49
- if ( !empty($message) ) {
50
- echo WDILibrary::message($message, 'error');
51
- }
52
- $view->display();
53
- }
54
-
55
  }
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']) && !empty($_REQUEST['user_id']) ) {
17
+ $user_id = $_REQUEST['user_id'];
18
+ $user_name = $_REQUEST['username'];
19
+ $expires_in = $_REQUEST['expires_in'];
20
+ $access_token = $_REQUEST['wdi_access_token'];
21
+
22
+ $wdi_options['wdi_start_in'] = time();
23
+ $wdi_options['wdi_user_id'] = $user_id;
24
+ $wdi_options['wdi_user_name'] = $user_name;
25
+ $wdi_options['wdi_expires_in'] = $expires_in;
26
+ $wdi_options['wdi_access_token'] = $access_token;
27
+ update_option(WDI_OPT, $wdi_options);
28
+
29
+ WDILibrary::redirect(add_query_arg(array(
30
+ 'page' => 'wdi_settings',
31
+ ), admin_url('admin.php')));
32
+ }
33
+ else {
34
+ $data = WDILibrary::get_instagram_user($wdi_options['wdi_access_token']);
35
+ if ( !empty($wdi_options['wdi_access_token']) && !empty($data['error']) && !empty($data['error']['message']) && !WDILibrary::get('wdi_reset_access_token_input', 0) ) {
36
+ $wdi_options['wdi_user_id'] = '';
37
+ $wdi_options['wdi_user_name'] = '';
38
+ $wdi_options['wdi_access_token'] = '';
39
+ update_option(WDI_OPT, $wdi_options);
40
+ WDILibrary::wdi_spider_redirect(admin_url('admin.php?page=wdi_settings&message=' . $data['error']['message']));
41
+ }
42
+ }
43
+
44
+ require_once(WDI_DIR . '/admin/models/WDIModelSettings_wdi.php');
45
+ $model = new WDIModelSettings_wdi();
46
+ require_once(WDI_DIR . '/admin/views/WDIViewSettings_wdi.php');
47
+ $view = new WDIViewSettings_wdi($model);
48
+ $message = WDILibrary::get('message', '');
49
+ if ( !empty($message) ) {
50
+ echo WDILibrary::message($message, 'error');
51
+ }
52
+ $view->display();
53
+ }
54
+
55
  }
admin/controllers/WDIControllerThemes_wdi.php CHANGED
@@ -1,680 +1,680 @@
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
  ?>
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,141 +1,141 @@
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
  }
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,58 +1,58 @@
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
  }
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,19 +1,19 @@
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
  }
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,315 +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
- 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
- }
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/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,578 +1,578 @@
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
  ?>
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,14 +1,14 @@
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
  }
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,125 +1,125 @@
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
  }
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,666 +1,668 @@
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
- }
 
 
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' => 'Large (1080 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('switched' => 'off','name' => 'thumb_user', 'label' => array('place' => 'after', 'class' => 'wdi_pro_only', 'text' => __("Featured Image is available only in premium version", "wd-instagram-feed"), 'br' => 'true'), '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', "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
541
+
542
+ foreach ($elements as $key => $element) {
543
+ if ($element['name'] == 'conditional_filter_enable') { ?>
544
+ <div id="wdi-conditional-filters-ui" class="wdi_demo_img">
545
+ <div class="wdi-pro-overlay"><img src="<?php echo WDI_URL . '/demo_images/filters.png'; ?>" alt=""></div>
546
+ </div><?php
547
+ continue;
548
+ }
549
+
550
+ if ($element['name'] == 'conditional_filter_type') {
551
+ continue;
552
+ }
553
+
554
+ if (isset($element['status'])) {
555
+ if ($element['status'] == 'disabled') {
556
+ continue;
557
+ }
558
+ } ?>
559
+
560
+ <div class="wdi_element wdi_element_name_<?php echo $element['name'] ; ?>">
561
+ <div class="wdi_element_title">
562
+ <span class="wdi_settings_link" ><?php echo $element['title']; ?></span>
563
+ </div>
564
+ <div class="wdi_element_content">
565
+ <?php $this->buildField($element, $feed_row); ?>
566
+ <!-- FEED USERS -->
567
+ <?php if ($element['name'] == 'feed_users'): ?>
568
+ <input type="text" id="wdi_add_user_ajax_input">
569
+ <div id="wdi_add_user_ajax" class="button"><?php _e('Add', "wd-instagram-feed"); ?></div>
570
+ <div id="wdi_feed_users">
571
+ <?php $this->display_feed_users($feed_row); ?>
572
+ </div>
573
+ <?php endif; ?>
574
+ <!-- END FEED USERS -->
575
+ <?php
576
+ if($element['tooltip'] && $element['tooltip']!=""){
577
+ echo "<p class='wdi_about_filed'>".$element['tooltip']."</p>";
578
+ }
579
+ ?>
580
+ </div>
581
+ </div>
582
+ <?php } ?>
583
+ </div>
584
+ <?php } ?>
585
+ </div>
586
+ </div>
587
+ <?php } ?>
588
+ </div><?php
589
+ }
590
+ ?>
591
+ </div>
592
+ </form>
593
+ </div>
594
+ </div>
595
+ <?php
596
+ }
597
+
598
+ private function buildField($element, $feed_row = '')
599
+ {
600
+ require_once(WDI_DIR . '/framework/WDI_form_builder.php');
601
+ $element['defaults'] = $this->model->wdi_get_feed_defaults();
602
+ $element['CONST'] = WDI_FSN;
603
+ $builder = new WDI_form_builder();
604
+ switch ($element['type']) {
605
+ case 'input': {
606
+ $builder->input($element, $feed_row);
607
+ break;
608
+ }
609
+ case 'select': {
610
+ $builder->select($element, $feed_row);
611
+ break;
612
+ }
613
+ case 'radio': {
614
+ $builder->radio($element, $feed_row);
615
+ break;
616
+ }
617
+ case 'checkbox': {
618
+ $builder->checkbox($element, $feed_row);
619
+ break;
620
+ }
621
+ case 'how_to_publish': {
622
+ $builder->how_to_publish($element, $feed_row);
623
+ break;
624
+ }
625
+ }
626
+ }
627
+
628
+
629
+ public function display_feed_users($feed_row){
630
+ global $wdi_options;
631
+
632
+ $users = isset($feed_row['feed_users']) ? $feed_row['feed_users'] : "";
633
+ $users = json_decode($users);
634
+
635
+ if ($users === null) {
636
+ $users = array();
637
+ }
638
+ $token = WDILibrary::get_user_access_token($users);
639
+ ?>
640
+ <script>
641
+ jQuery(document).ready(function ()
642
+ {
643
+ var users_list = JSON.parse(wdi_options.wdi_authenticated_users_list);
644
+ if (typeof users_list !== 'object') {
645
+ users_list = {};
646
+ }
647
+
648
+ var usersnames = [wdi_options.wdi_user_name];
649
+ for(var i in users_list){
650
+ usersnames.push(users_list[i].user_name);
651
+ }
652
+
653
+ wdi_controller.users_list = users_list;
654
+ wdi_controller.usersnames = usersnames;
655
+ wdi_controller.instagram = new WDIInstagram();
656
+ wdi_controller.feed_users = [];
657
+ wdi_controller.instagram.addToken(<?php echo '"' . $token . '"'; ?>);
658
+
659
+ wdi_controller.updateFeaturedImageSelect(<?php echo '"' . $wdi_options['wdi_user_name'] . '"'; ?>, 'add', 'selected');
660
+
661
+ <?php foreach ($users as $user) : ?>
662
+ wdi_controller.makeInstagramUserRequest(<?php echo '"' . $user->username . '"'?>, true);
663
+ <?php endforeach; ?>
664
+ });
665
+ </script>
666
+ <?php
667
+ }
668
+ }
admin/views/WDIViewSettings_wdi.php CHANGED
@@ -1,134 +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('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
  }
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,133 +1,133 @@
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
  }
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,123 +1,123 @@
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
  }
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
+ }
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,1353 +1,1353 @@
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
  }
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,923 +1,923 @@
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
  }
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,1375 +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
- * 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="<?php echo $element['name']; ?>_titles" data-customize-setting-link="<?php echo $optionname_title; ?>" value="<?php echo esc_attr($diagram_title); ?>" >
1180
- <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); ?>" >
1181
- <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); ?>" />
1182
- </div>
1183
- </div>
1184
- </div>
1185
- <script type="text/javascript">
1186
- jQuery(document).ready(function(){
1187
-
1188
- var element_<?php echo $element["name"]; ?> = {
1189
- id : "<?php echo $element['name']; ?>",
1190
- titles : jQuery('#<?php echo $element['name']; ?>_titles').val(),
1191
- percents : jQuery('#<?php echo $element['name']; ?>_percents').val(),
1192
- active : 0,
1193
- number_percents : wdwt_elements.diagram.len(jQuery('#<?php echo $element['name']; ?>_titles').val()),
1194
- };
1195
- /*init show*/
1196
- wdwt_elements.diagram.init(element_<?php echo $element["name"]; ?>);
1197
- wdwt_elements.diagram.show(element_<?php echo $element["name"]; ?>);
1198
- /*watch for changes in values*/
1199
- jQuery("#wdwt_wrap_<?php echo $element['name']; ?>").on("change", ".diagram_title_group", function (){
1200
- var index = wdwt_elements.diagram.find_index(jQuery(this), "<?php echo $element['name']; ?>_title_");
1201
- wdwt_elements.diagram.edit(element_<?php echo $element["name"]; ?>, index, "title");
1202
- });
1203
- jQuery("#wdwt_wrap_<?php echo $element['name']; ?>").on("change", ".diagram_percent_group", function (){
1204
- var index = wdwt_elements.diagram.find_index(jQuery(this), "<?php echo $element['name']; ?>_percent_");
1205
- wdwt_elements.diagram.edit(element_<?php echo $element["name"]; ?>, index, "percent");
1206
- });
1207
- /*add new percent*/
1208
- jQuery("#<?php echo $element['name']; ?>_add-button").on('click', function(){
1209
- console.log('call');
1210
- after = element_<?php echo $element["name"]; ?>.number_percents-1;
1211
- wdwt_elements.diagram.insert(element_<?php echo $element["name"]; ?>, after, '');
1212
- });
1213
- /*remove percent*/
1214
- jQuery("#wdwt_wrap_<?php echo $element['name']; ?>").on('click', ".<?php echo $element['name']; ?>_remove-percent", function(){
1215
- var index = wdwt_elements.diagram.find_index(jQuery(this), "<?php echo $element['name']; ?>_remove-button_");
1216
- element_<?php echo $element["name"]; ?>.active = index;
1217
- wdwt_elements.diagram.remove(element_<?php echo $element["name"]; ?>);
1218
- });
1219
- });
1220
- </script>
1221
- <?php
1222
- }
1223
-
1224
-
1225
- public static function html_page_nav($count_items, $page_number, $form_id, $items_per_page = 20) {
1226
- $limit = 20;
1227
- if ($count_items) {
1228
- if ($count_items % $limit) {
1229
- $items_county = ($count_items - $count_items % $limit) / $limit + 1;
1230
- }
1231
- else {
1232
- $items_county = ($count_items - $count_items % $limit) / $limit;
1233
- }
1234
- }
1235
- else {
1236
- $items_county = 1;
1237
- }
1238
- ?>
1239
- <script type="text/javascript">
1240
- var items_county = <?php echo $items_county; ?>;
1241
- function wdi_spider_page(x, y) {
1242
- switch (y) {
1243
- case 1:
1244
- if (x >= items_county) {
1245
- document.getElementById('page_number').value = items_county;
1246
- }
1247
- else {
1248
- document.getElementById('page_number').value = x + 1;
1249
- }
1250
- break;
1251
- case 2:
1252
- document.getElementById('page_number').value = items_county;
1253
- break;
1254
- case -1:
1255
- if (x == 1) {
1256
- document.getElementById('page_number').value = 1;
1257
- }
1258
- else {
1259
- document.getElementById('page_number').value = x - 1;
1260
- }
1261
- break;
1262
- case -2:
1263
- document.getElementById('page_number').value = 1;
1264
- break;
1265
- default:
1266
- document.getElementById('page_number').value = 1;
1267
- }
1268
- document.getElementById('<?php echo $form_id; ?>').submit();
1269
- }
1270
- function check_enter_key(e) {
1271
- var key_code = (e.keyCode ? e.keyCode : e.which);
1272
- if (key_code == 13) { /*Enter keycode*/
1273
- if (jQuery('#current_page').val() >= items_county) {
1274
- document.getElementById('page_number').value = items_county;
1275
- }
1276
- else {
1277
- document.getElementById('page_number').value = jQuery('#current_page').val();
1278
- }
1279
- document.getElementById('<?php echo $form_id; ?>').submit();
1280
- }
1281
- return true;
1282
- }
1283
- </script>
1284
- <div class="tablenav-pages">
1285
- <span class="displaying-num">
1286
- <?php
1287
- if ($count_items != 0) {
1288
- echo $count_items; ?> item<?php echo (($count_items == 1) ? '' : 's');
1289
- }
1290
- ?>
1291
- </span>
1292
- <?php
1293
- if ($count_items > $items_per_page) {
1294
- $first_page = "first-page";
1295
- $prev_page = "prev-page";
1296
- $next_page = "next-page";
1297
- $last_page = "last-page";
1298
- if ($page_number == 1) {
1299
- $first_page = "first-page disabled";
1300
- $prev_page = "prev-page disabled";
1301
- $next_page = "next-page";
1302
- $last_page = "last-page";
1303
- }
1304
- if ($page_number >= $items_county) {
1305
- $first_page = "first-page ";
1306
- $prev_page = "prev-page";
1307
- $next_page = "next-page disabled";
1308
- $last_page = "last-page disabled";
1309
- }
1310
- ?>
1311
- <span class="pagination-links">
1312
- <a class="<?php echo $first_page; ?>" title="Go to the first page" href="javascript:wdi_spider_page(<?php echo $page_number; ?>,-2);">«</a>
1313
- <a class="<?php echo $prev_page; ?>" title="Go to the previous page" href="javascript:wdi_spider_page(<?php echo $page_number; ?>,-1);">‹</a>
1314
- <span class="paging-input">
1315
- <span class="total-pages">
1316
- <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" />
1317
- </span> of
1318
- <span class="total-pages">
1319
- <?php echo $items_county; ?>
1320
- </span>
1321
- </span>
1322
- <a class="<?php echo $next_page ?>" title="Go to the next page" href="javascript:wdi_spider_page(<?php echo $page_number; ?>,1);">›</a>
1323
- <a class="<?php echo $last_page ?>" title="Go to the last page" href="javascript:wdi_spider_page(<?php echo $page_number; ?>,2);">»</a>
1324
- <?php
1325
- }
1326
- ?>
1327
- </span>
1328
- </div>
1329
- <input type="hidden" id="page_number" name="page_number" value="<?php echo (int) WDILibrary::get('page_number', 1); ?>" />
1330
- <input type="hidden" id="search_or_not" name="search_or_not" value="<?php echo WDILibrary::get('search_or_not', ''); ?>"/>
1331
- <?php
1332
- }
1333
-
1334
- private function merge_params($param_begin_low_prioritet,$param_last_high_priorete){
1335
- $new_param=array();
1336
- foreach($param_begin_low_prioritet as $key=>$value){
1337
- if(isset($param_last_high_priorete[$key])){
1338
- $new_param[$key]=$param_last_high_priorete[$key];
1339
- }
1340
- else{
1341
- $new_param[$key]=$value;
1342
- }
1343
- }
1344
- return $new_param;
1345
- }
1346
-
1347
- private function custom_attrs($element = array()){
1348
- $attrs_array = isset($element['custom_attrs']) ? $element['custom_attrs'] : array();
1349
-
1350
- foreach ($attrs_array as $attr => $value) {
1351
- echo esc_html($attr).'="'.esc_attr($value).'" ';
1352
- }
1353
- }
1354
-
1355
- /**
1356
- * get posts and categories createdwith checkboxes
1357
- */
1358
- protected function get_old_posts_cats($val){
1359
-
1360
- $value = $val;
1361
- $val = json_decode( $val , true );
1362
- $result = array();
1363
-
1364
- if( $val == NULL ){
1365
- if(is_string($value)){
1366
- $result = explode(",", $value);
1367
- }
1368
- } else {
1369
- $result = $val;
1370
- }
1371
- return $result;
1372
-
1373
- }
1374
- }
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
+ * 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="<?php echo $element['name']; ?>_titles" data-customize-setting-link="<?php echo $optionname_title; ?>" value="<?php echo esc_attr($diagram_title); ?>" >
1180
+ <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); ?>" >
1181
+ <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); ?>" />
1182
+ </div>
1183
+ </div>
1184
+ </div>
1185
+ <script type="text/javascript">
1186
+ jQuery(document).ready(function(){
1187
+
1188
+ var element_<?php echo $element["name"]; ?> = {
1189
+ id : "<?php echo $element['name']; ?>",
1190
+ titles : jQuery('#<?php echo $element['name']; ?>_titles').val(),
1191
+ percents : jQuery('#<?php echo $element['name']; ?>_percents').val(),
1192
+ active : 0,
1193
+ number_percents : wdwt_elements.diagram.len(jQuery('#<?php echo $element['name']; ?>_titles').val()),
1194
+ };
1195
+ /*init show*/
1196
+ wdwt_elements.diagram.init(element_<?php echo $element["name"]; ?>);
1197
+ wdwt_elements.diagram.show(element_<?php echo $element["name"]; ?>);
1198
+ /*watch for changes in values*/
1199
+ jQuery("#wdwt_wrap_<?php echo $element['name']; ?>").on("change", ".diagram_title_group", function (){
1200
+ var index = wdwt_elements.diagram.find_index(jQuery(this), "<?php echo $element['name']; ?>_title_");
1201
+ wdwt_elements.diagram.edit(element_<?php echo $element["name"]; ?>, index, "title");
1202
+ });
1203
+ jQuery("#wdwt_wrap_<?php echo $element['name']; ?>").on("change", ".diagram_percent_group", function (){
1204
+ var index = wdwt_elements.diagram.find_index(jQuery(this), "<?php echo $element['name']; ?>_percent_");
1205
+ wdwt_elements.diagram.edit(element_<?php echo $element["name"]; ?>, index, "percent");
1206
+ });
1207
+ /*add new percent*/
1208
+ jQuery("#<?php echo $element['name']; ?>_add-button").on('click', function(){
1209
+ console.log('call');
1210
+ after = element_<?php echo $element["name"]; ?>.number_percents-1;
1211
+ wdwt_elements.diagram.insert(element_<?php echo $element["name"]; ?>, after, '');
1212
+ });
1213
+ /*remove percent*/
1214
+ jQuery("#wdwt_wrap_<?php echo $element['name']; ?>").on('click', ".<?php echo $element['name']; ?>_remove-percent", function(){
1215
+ var index = wdwt_elements.diagram.find_index(jQuery(this), "<?php echo $element['name']; ?>_remove-button_");
1216
+ element_<?php echo $element["name"]; ?>.active = index;
1217
+ wdwt_elements.diagram.remove(element_<?php echo $element["name"]; ?>);
1218
+ });
1219
+ });
1220
+ </script>
1221
+ <?php
1222
+ }
1223
+
1224
+
1225
+ public static function html_page_nav($count_items, $page_number, $form_id, $items_per_page = 20) {
1226
+ $limit = 20;
1227
+ if ($count_items) {
1228
+ if ($count_items % $limit) {
1229
+ $items_county = ($count_items - $count_items % $limit) / $limit + 1;
1230
+ }
1231
+ else {
1232
+ $items_county = ($count_items - $count_items % $limit) / $limit;
1233
+ }
1234
+ }
1235
+ else {
1236
+ $items_county = 1;
1237
+ }
1238
+ ?>
1239
+ <script type="text/javascript">
1240
+ var items_county = <?php echo $items_county; ?>;
1241
+ function wdi_spider_page(x, y) {
1242
+ switch (y) {
1243
+ case 1:
1244
+ if (x >= items_county) {
1245
+ document.getElementById('page_number').value = items_county;
1246
+ }
1247
+ else {
1248
+ document.getElementById('page_number').value = x + 1;
1249
+ }
1250
+ break;
1251
+ case 2:
1252
+ document.getElementById('page_number').value = items_county;
1253
+ break;
1254
+ case -1:
1255
+ if (x == 1) {
1256
+ document.getElementById('page_number').value = 1;
1257
+ }
1258
+ else {
1259
+ document.getElementById('page_number').value = x - 1;
1260
+ }
1261
+ break;
1262
+ case -2:
1263
+ document.getElementById('page_number').value = 1;
1264
+ break;
1265
+ default:
1266
+ document.getElementById('page_number').value = 1;
1267
+ }
1268
+ document.getElementById('<?php echo $form_id; ?>').submit();
1269
+ }
1270
+ function check_enter_key(e) {
1271
+ var key_code = (e.keyCode ? e.keyCode : e.which);
1272
+ if (key_code == 13) { /*Enter keycode*/
1273
+ if (jQuery('#current_page').val() >= items_county) {
1274
+ document.getElementById('page_number').value = items_county;
1275
+ }
1276
+ else {
1277
+ document.getElementById('page_number').value = jQuery('#current_page').val();
1278
+ }
1279
+ document.getElementById('<?php echo $form_id; ?>').submit();
1280
+ }
1281
+ return true;
1282
+ }
1283
+ </script>
1284
+ <div class="tablenav-pages">
1285
+ <span class="displaying-num">
1286
+ <?php
1287
+ if ($count_items != 0) {
1288
+ echo $count_items; ?> item<?php echo (($count_items == 1) ? '' : 's');
1289
+ }
1290
+ ?>
1291
+ </span>
1292
+ <?php
1293
+ if ($count_items > $items_per_page) {
1294
+ $first_page = "first-page";
1295
+ $prev_page = "prev-page";
1296
+ $next_page = "next-page";
1297
+ $last_page = "last-page";
1298
+ if ($page_number == 1) {
1299
+ $first_page = "first-page disabled";
1300
+ $prev_page = "prev-page disabled";
1301
+ $next_page = "next-page";
1302
+ $last_page = "last-page";
1303
+ }
1304
+ if ($page_number >= $items_county) {
1305
+ $first_page = "first-page ";
1306
+ $prev_page = "prev-page";
1307
+ $next_page = "next-page disabled";
1308
+ $last_page = "last-page disabled";
1309
+ }
1310
+ ?>
1311
+ <span class="pagination-links">
1312
+ <a class="<?php echo $first_page; ?>" title="Go to the first page" href="javascript:wdi_spider_page(<?php echo $page_number; ?>,-2);">«</a>
1313
+ <a class="<?php echo $prev_page; ?>" title="Go to the previous page" href="javascript:wdi_spider_page(<?php echo $page_number; ?>,-1);">‹</a>
1314
+ <span class="paging-input">
1315
+ <span class="total-pages">
1316
+ <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" />
1317
+ </span> of
1318
+ <span class="total-pages">
1319
+ <?php echo $items_county; ?>
1320
+ </span>
1321
+ </span>
1322
+ <a class="<?php echo $next_page ?>" title="Go to the next page" href="javascript:wdi_spider_page(<?php echo $page_number; ?>,1);">›</a>
1323
+ <a class="<?php echo $last_page ?>" title="Go to the last page" href="javascript:wdi_spider_page(<?php echo $page_number; ?>,2);">»</a>
1324
+ <?php
1325
+ }
1326
+ ?>
1327
+ </span>
1328
+ </div>
1329
+ <input type="hidden" id="page_number" name="page_number" value="<?php echo (int) WDILibrary::get('page_number', 1); ?>" />
1330
+ <input type="hidden" id="search_or_not" name="search_or_not" value="<?php echo WDILibrary::get('search_or_not', ''); ?>"/>
1331
+ <?php
1332
+ }
1333
+
1334
+ private function merge_params($param_begin_low_prioritet,$param_last_high_priorete){
1335
+ $new_param=array();
1336
+ foreach($param_begin_low_prioritet as $key=>$value){
1337
+ if(isset($param_last_high_priorete[$key])){
1338
+ $new_param[$key]=$param_last_high_priorete[$key];
1339
+ }
1340
+ else{
1341
+ $new_param[$key]=$value;
1342
+ }
1343
+ }
1344
+ return $new_param;
1345
+ }
1346
+
1347
+ private function custom_attrs($element = array()){
1348
+ $attrs_array = isset($element['custom_attrs']) ? $element['custom_attrs'] : array();
1349
+
1350
+ foreach ($attrs_array as $attr => $value) {
1351
+ echo esc_html($attr).'="'.esc_attr($value).'" ';
1352
+ }
1353
+ }
1354
+
1355
+ /**
1356
+ * get posts and categories createdwith checkboxes
1357
+ */
1358
+ protected function get_old_posts_cats($val){
1359
+
1360
+ $value = $val;
1361
+ $val = json_decode( $val , true );
1362
+ $result = array();
1363
+
1364
+ if( $val == NULL ){
1365
+ if(is_string($value)){
1366
+ $result = explode(",", $value);
1367
+ }
1368
+ } else {
1369
+ $result = $val;
1370
+ }
1371
+ return $result;
1372
+
1373
+ }
1374
+ }
1375
  ?>
framework/WDI_form_builder.php CHANGED
@@ -1,552 +1,552 @@
1
- <?php
2
-
3
- class WDI_form_builder {
4
-
5
-
6
-
7
-
8
-
9
- public function __construct() {
10
-
11
- }
12
- /*
13
-
14
-
15
-
16
-
17
- * $element['name']
18
- * $element['id'] //default is WDI_.$element_name
19
- * $element['type'] //text,number ...
20
- * $element['attr'] //custom attribute array(array('name'=>'attr_name','value'=>'attr_value'),...)
21
- * $element['input_size']
22
- * $element['label'] // array('text','place')
23
- * $element['defaults'] //array of default vlaues
24
- * $element['CONST'] //variable to store data in array
25
- * $element['disabled'] //text to be displayed if option is disabled
26
- */
27
- public function input($element,$feed_row=''){
28
- $name = $element['CONST'].'['.(isset($element['name']) ? $element['name'] : 'NOT_SET') . ']';
29
- $id = isset($element['id']) ? $element['id'] : 'WDI_'.$element['name'];
30
- $type = isset($element['input_type']) ? $element['input_type'] : 'text';
31
- //$attrText = $element['attr']['name'] . '=' . $element['attr']['value'];
32
- $disabled_text = (isset($element['disabled']) && isset($element['disabled']['text'])) ? $element['disabled']['text'] : '';
33
- $switched = (isset($element['switched']) && $element['switched'] === 'off') ? 'disabled' : '';
34
- $attrs = ' ';
35
- foreach ($element['attr'] as $attr) {
36
- $attrs .= $attr['name'] . '="' . $attr['value'] . '" ';
37
- }
38
- $attr = $attrs;
39
-
40
- $input_size= isset($element['input_size']) ? $element['input_size'] : '20';
41
- $label = isset($element['label']) ? $element['label'] : '';
42
- $defaults = $element['defaults'];
43
- $current_settings = isset($feed_row) ? $feed_row : '';
44
- $value = isset($defaults[$element['name']]) ? $defaults[$element['name']] : '';
45
- if($current_settings !=''){
46
- $value = isset($current_settings[$element['name']]) ? $current_settings[$element['name']] : '';
47
- }
48
-
49
-
50
- ?>
51
- <div class="wdwt_param" id="WDI_wrap_<?php echo $element['name']; ?>">
52
- <div class="block">
53
- <div class="optioninput">
54
-
55
- <?php
56
- if($label!='' && $label['place']=='before'){
57
- ?>
58
- <label for="<?php echo $id; ?>"><?php echo $label['text']; ?></label>
59
- <?php echo isset($label['br'])? '<br/>' : ''?>
60
- <?php
61
- }
62
- ?>
63
-
64
- <input type="<?php echo $type; ?>" id="<?php echo $id; ?>" <?php echo $switched; ?> name="<?php echo $name; ?>" value="<?php echo esc_attr($value); ?>"
65
- <?php echo $attr; ?> size="<?php echo $input_size; ?>">
66
- <?php
67
- if($label!='' && $label['place']=='after'){
68
- ?>
69
- <?php echo isset($label['br'])? '<br/>' : ''?>
70
- <label for="<?php echo $id; ?>"><?php echo $label['text']; ?></label>
71
- <?php
72
- }
73
- if($disabled_text != ''){
74
- ?><span class="wdi_pro_only"><?php echo $disabled_text?></span> <?php
75
- }
76
- ?>
77
- </div>
78
- </div>
79
- </div>
80
- <?php
81
- }
82
-
83
- /*
84
- * $element['name']
85
- * $element['id'] //default is WDI_.$element_name
86
- * $element['type'] //multiple
87
- * $element['attr'] //custom attribute array(array('name'=>'attr_name','value'=>'attr_value'),...)
88
- * $element['label'] // array('text','place')
89
- * $element['valid_options'] //array('option_value1'=>'option_name1','option_value2'=>'option_name2');
90
- * $element['width']
91
- * $element['selected'] //one of valid options
92
- * $element['defaults'] //array of default vlaues
93
- * $element['CONST'] //variable to store data in array
94
- * $element['switched'] //if set to 'off' will make field disabled
95
- * $element['disabled'] //disabled text label
96
- */
97
- public function select($element,$feed_row=''){
98
- $name = $element['CONST'].'['.(isset($element['name']) ? $element['name'] : 'NOT_SET') . ']';
99
- $id = isset($element['id']) ? $element['id'] : 'WDI_'.$element['name'];
100
- $type = isset($element['type']) ? $element['type'] : '';
101
- //$attr = isset($element['attr']) ? $element['attr']['name'] . '="' . $element['attr']['value'].'"' : '';
102
- $label = isset($element['label']) ? $element['label'] : '';
103
- $width = isset($element['width']) ? ($element['width']) : '';
104
- $options = isset($element['valid_options']) ? $element['valid_options'] : '';
105
- $switched = (isset($element['switched']) && $element['switched'] === 'off') ? 'disabled' : '';
106
- $hide_ids = isset($element['hide_ids']) ? $element['hide_ids'] : '';
107
- $disabled_text = (isset($element['disabled']) && isset($element['disabled']['text'])) ? $element['disabled']['text'] : '';
108
- $disabled_options = isset($element['disabled_options']) ? $element['disabled_options'] : array();
109
- $defaults = $element['defaults'];
110
- $current_settings = isset($feed_row) ? $feed_row : '';
111
- $opt_value = isset($defaults[$element['name']]) ? $defaults[$element['name']] : '';
112
- if($current_settings !=''){
113
- $opt_value = isset($current_settings[$element['name']]) ? $current_settings[$element['name']] : '';
114
- }
115
-
116
-
117
- $attrs = ' ';
118
- foreach ($element['attr'] as $attr) {
119
- $attrs .= $attr['name'] . '="' . $attr['value'] . '" ';
120
- }
121
- $attr = $attrs;
122
- ?>
123
-
124
- <div class="wdwt_param" id="WDI_wrap_<?php echo $element['name']; ?>">
125
- <div class="block">
126
- <div class="optioninput">
127
- <?php
128
- if($label!='' && $label['place']=='before'){
129
- ?>
130
- <label class="<?php echo isset($label['class']) ? $label['class'] : '';?>" for="<?php echo $id; ?>"><?php echo $label['text']; ?></label>
131
- <?php echo isset($label['br'])? '<br/>' : ''?>
132
- <?php
133
- }
134
- ?>
135
-
136
- <select name="<?php echo $name; ?>" id="<?php echo $id; ?>" <?php echo $type; ?> <?php echo $switched; ?> style="<?php if($width!='') echo 'width:' .$width . ';';?> resize:vertical;" <?php echo $attr; ?>>
137
- <?php foreach($options as $key => $value){ ?>
138
- <option <?php echo (in_array($key, $disabled_options)) ? 'disabled' : '' ?> value="<?php echo esc_attr($key) ?>" <?php if($key==$opt_value){echo 'selected';}?>>
139
- <?php echo esc_html($value); ?>
140
- </option>
141
- <?php } ?>
142
- </select>
143
-
144
- <?php
145
- if($label!='' && $label['place']=='after'){
146
- ?>
147
- <?php echo isset($label['br'])? '<br/>' : ''?>
148
- <label class="<?php echo isset($label['class']) ? $label['class'] : '';?>" for="<?php echo $id; ?>"><?php echo $label['text']; ?></label>
149
- <?php
150
- }
151
- if($disabled_text != ''){
152
- ?><span class="wdi_pro_only"><?php echo $disabled_text?></span> <?php
153
- }
154
- //echo disable text if need label & disable text
155
-
156
- ?>
157
-
158
- </div>
159
- </div>
160
- </div>
161
- <?php
162
- if($hide_ids != ''){
163
- ?>
164
- <style>
165
- .<?php echo $id.'_hide_ids_hidden';?>{
166
- display:none !important;
167
- }
168
- </style>
169
- <script>
170
- jQuery(document).ready(function(){
171
- var <?php echo $id.'_hide_ids';?> = <?php echo json_encode($hide_ids);?>;
172
- jQuery("#WDI_wrap_<?php echo $element['name'];?> select").on('change',function(){
173
- jQuery('.<?php echo $id.'_hide_ids_hidden';?>').each(function(){
174
- jQuery(this).removeClass('<?php echo $id.'_hide_ids_hidden';?>');
175
- });
176
- var selected = jQuery(this).val();
177
- for (var opt in <?php echo $id.'_hide_ids'?>){
178
- if(opt == selected){
179
- var ids = <?php echo $id.'_hide_ids'?>[opt].split(',');
180
- for (var i in ids){
181
- jQuery('#WDI_wrap_'+ids[i]).parent().parent().addClass("<?php echo $id.'_hide_ids_hidden';?>");
182
- }
183
- }
184
- }
185
- });
186
- jQuery("#WDI_wrap_<?php echo $element['name'];?> select").each(function(){
187
- var currentOption = "<?php echo $opt_value?>";
188
- if(jQuery(this).val() == currentOption){
189
- jQuery(this).trigger('change');
190
- }
191
- });
192
- });
193
- </script>
194
- <?php }
195
-
196
- }
197
-
198
-
199
- /*
200
- * $element['name']
201
- * $element['id'] //default is WDI_.$element_name
202
- * $element['attr'] //custom attribute array(array('name'=>'attr_name','value'=>'attr_value'),...)
203
- * $element['label'] // array('text','place')
204
- * $element['valid_options'] //array('option_value1'=>'option_name1','option_value2'=>'option_name2');
205
- * $element['width']
206
- * $element['selected'] //one of valid options
207
- * $element['defaults'] //array of default vlaues
208
- * $element['CONST'] //variable to store data in array
209
- */
210
- public function radio($element,$feed_row=''){
211
- $option_name = isset($element['name']) ? $element['name'] : 'NOT_SET';
212
- $name = $element['CONST'] . '[' . (isset($element['name']) ? $element['name'] : 'NOT_SET') . ']';
213
- $id = isset($element['id']) ? $element['id'] : 'WDI_'.$element['name'];
214
- //$attr = isset($element['attr']) ? $element['attr']['name'] . '="' . $element['attr']['value'].'"' : '';
215
- $label = isset($element['label']) ? $element['label'] : '';
216
- $width = isset($element['width']) ? ($element['width']) : '';
217
- $options = isset($element['valid_options']) ? $element['valid_options'] : '';
218
- $break = isset($element['break']) ? '<br/>' : '';
219
- $hide_ids = isset($element['hide_ids']) ? $element['hide_ids'] : '';
220
- $show_ids = isset($element['show_ids']) ? $element['show_ids'] : '';
221
- $disabled_options = isset($element['disabled_options']) ? $element['disabled_options'] : array();
222
- $attrs = ' ';
223
- foreach ($element['attr'] as $attr) {
224
- $attrs .= $attr['name'] . '="' . $attr['value'] . '" ';
225
- }
226
- $attr = $attrs;
227
- $defaults = $element['defaults'];
228
- $current_settings = isset($feed_row) ? $feed_row : '';
229
- $opt_value = isset($defaults[$element['name']]) ? $defaults[$element['name']] : '';
230
- if($current_settings !=''){
231
- $opt_value = isset($current_settings[$element['name']]) ? $current_settings[$element['name']] : '';
232
- }
233
-
234
- ?>
235
- <div class="wdwt_param" id="WDI_wrap_<?php echo $element['name'];?>">
236
- <div class="block">
237
- <div class="optioninput">
238
- <?php
239
-
240
- if($label!='' && $label['place']=='before'){
241
- ?>
242
- <label class="<?php echo isset($label['class']) ? $label['class'] : '';?>" for="<?php $id; ?>"><?php echo $label['text']; ?></label>
243
- <?php echo isset($label['br']) ? '<br/>' : ''?>
244
- <?php
245
- }
246
- foreach ( $options as $key => $option ) {
247
- $disable = '';
248
- $disable_text = '';
249
- foreach ($disabled_options as $disabled_option => $disable_lable) {
250
- if($disabled_option == $key){
251
- $disable = 'disabled';
252
- $disable_text = $disable_lable;
253
- }
254
- }
255
- ?>
256
- <input <?php echo $disable;?> style="margin:2px;" type="radio" name="<?php echo $name ?>" value="<?php echo esc_attr($key); ?>" <?php checked($key,$opt_value); ?> <?php echo $attr; ?> id="<?php echo $option_name . "_" . $key;?>" /><label for="<?php echo $option_name . "_" . $key;?>"> <?php echo esc_html($option); ?></label>
257
-
258
- <?php if($disable_text != '') : ?>
259
- <?php if(isset($disabled_options['br'])) : ?>
260
- <br>
261
- <?php endif; ?>
262
- <span class="wdi_pro_only"><?php echo $disable_text?></span>
263
- <?php endif;?>
264
-
265
- <?php echo $break;?>
266
- <?php
267
- }
268
- if($label!='' && $label['place']=='after'){
269
- ?>
270
- <?php echo isset($label['br'])? '<br/>' : ''?>
271
- <label for="<?php $id; ?>" class="<?php echo isset($label['class']) ? $label['class'] : '';?>"><?php echo $label['text']; ?></label>
272
- <?php
273
- }
274
- echo '</div></div></div>';
275
-
276
- if($hide_ids != ''){
277
- ?>
278
- <style>
279
- .<?php echo $id.'_hide_ids_hidden';?>{
280
- display:none !important;
281
- }
282
- </style>
283
- <script>
284
- jQuery(document).ready(function(){
285
- var <?php echo $id.'_hide_ids';?> = <?php echo json_encode($hide_ids);?>;
286
- jQuery("#WDI_wrap_<?php echo $element['name'];?> input").on('click',function(){
287
- jQuery('.<?php echo $id.'_hide_ids_hidden';?>').each(function(){
288
- jQuery(this).removeClass('<?php echo $id.'_hide_ids_hidden';?>');
289
- });
290
- var selected = jQuery(this).val();
291
- for (var opt in <?php echo $id.'_hide_ids'?>){
292
- if(opt == selected){
293
- var ids = <?php echo $id.'_hide_ids'?>[opt].split(',');
294
- for (var i in ids){
295
-
296
- jQuery('#WDI_wrap_'+ids[i]).parent().parent().addClass("<?php echo $id.'_hide_ids_hidden';?>");
297
- }
298
- }
299
-
300
- }
301
- });
302
- jQuery("#WDI_wrap_<?php echo $element['name'];?> input").each(function(){
303
- var currentOption = "<?php echo $opt_value?>";
304
- if(jQuery(this).val() == currentOption){
305
- jQuery(this).trigger('click');
306
- }
307
- });
308
- });
309
- </script>
310
- <?php }
311
- if($show_ids != ''){
312
- ?>
313
- <style>
314
- .<?php echo $id.'_show_ids_show';?>{
315
- display:block !important;
316
- }
317
- </style>
318
- <script>
319
- jQuery(document).ready(function(){
320
- var <?php echo $id.'_show_ids';?> = <?php echo json_encode($show_ids);?>;
321
- jQuery("#WDI_wrap_<?php echo $element['name'];?> input").on('click',function(){
322
- jQuery('.<?php echo $id.'_show_ids_show';?>').each(function(){
323
- jQuery(this).removeClass('<?php echo $id.'_show_ids_show';?>');
324
- });
325
- var selected = jQuery(this).val();
326
- for (var opt in <?php echo $id.'_show_ids'?>){
327
- if(opt == selected){
328
- var ids = <?php echo $id.'_show_ids'?>[opt].split(',');
329
- for (var i in ids){
330
- jQuery('#WDI_wrap_'+ids[i]).parent().parent().addClass("<?php echo $id.'_show_ids_show';?>");
331
- }
332
- }
333
-
334
- }
335
- });
336
- jQuery("#WDI_wrap_<?php echo $element['name'];?> input").each(function(){
337
- var currentOption = "<?php echo $opt_value?>";
338
- if(jQuery(this).val() == currentOption){
339
- jQuery(this).trigger('click');
340
- }
341
- });
342
- });
343
- </script>
344
- <?php }
345
-
346
- }
347
-
348
-
349
- /*
350
- * $element['name']
351
- * $element['id'] //default is WDI_.$element_name
352
- * $element['attr'] //custom attribute array(array('name'=>'attr_name','value'=>'attr_value'),...)
353
- * $element['label'] // array('text','place')
354
- * $element['width']
355
- * $element['selected'] //one of valid options
356
- * $element['defaults'] //array of default vlaues
357
- * $element['CONST'] //variable to store data in array
358
- */
359
- public function checkbox($element,$feed_row=''){
360
- $name = $element['CONST'].'['.(isset($element['name']) ? $element['name'] : 'NOT_SET').']';
361
- $id = isset($element['id']) ? $element['id'] : 'WDI_'.$element['name'];
362
- //$attr = isset($element['attr']) ? $element['attr']['name'] . '="' . $element['attr']['value'].'"' : '';
363
- $label = isset($element['label']) ? $element['label'] : '';
364
- $width = isset($element['width']) ? ($element['width']) : '';
365
- $break = isset($element['break']) ? '<br/>' : '';
366
- $disable = (isset($element['switched']) && $element['switched']=='off') ? 'disabled' : '' ;
367
- $attrs = ' ';
368
- foreach ($element['attr'] as $attr) {
369
- $attrs .= $attr['name'] . '="' . $attr['value'] . '" ';
370
- }
371
- $attr = $attrs;
372
-
373
- $defaults = $element['defaults'];
374
- $current_settings = isset($feed_row) ? $feed_row : '';
375
- $opt_value = isset($defaults[$element['name']]) ? $defaults[$element['name']] : '';
376
- if($current_settings !=''){
377
- $opt_value = isset($current_settings[$element['name']]) ? $current_settings[$element['name']] : '';
378
- }
379
-
380
- $hide_ids = isset($element['hide_ids']) ? $element['hide_ids'] : '';
381
-
382
- ?>
383
- <div class="wdwt_param" id="WDI_wrap_<?php echo $element['name'];?>">
384
-
385
-
386
-
387
- <div class="block margin">
388
- <div class="optioninput checkbox">
389
- <?php
390
- if($label!='' && $label['place']=='before'){
391
- ?>
392
- <label class="<?php echo isset($label['class']) ? $label['class'] : '' ?>" for="<?php $id; ?>"><?php echo $label['text']; ?></label>
393
- <?php echo isset($label['br'])? '<br/>' : ''?>
394
- <?php
395
- }
396
- ?>
397
- <input <?php echo $disable; ?> type="checkbox" class="checkbox" name="<?php echo $name; ?>" id="<?php echo $id ?>" <?php echo $attr;?> <?php checked(1,$opt_value)?> value="1">
398
- <?php
399
- if($label!='' && $label['place']=='after'){
400
- ?>
401
- <?php echo isset($label['br'])? '<br/>' : ''?>
402
- <label class="<?php echo isset($label['class']) ? $label['class'] : '' ?>" for="<?php $id; ?>"><?php echo $label['text']; ?></label>
403
- <?php
404
- }
405
- ?>
406
- </div>
407
- </div>
408
- </div>
409
- <style>
410
- <?php if(!empty($hide_ids)){
411
- echo '.'.$id.'_hide_ids_hidden{display:none !important;}';
412
- }
413
- ?>
414
- </style>
415
- <script>
416
-
417
- jQuery(document).ready(function(){
418
-
419
- var el = jQuery('#<?php echo ''.$id?>');
420
- var hide_ids = <?php echo json_encode($hide_ids); ?>;
421
- var hide_class = '<?php echo $id.'_hide_ids_hidden'; ?>';
422
-
423
-
424
- if(el.attr('checked') != 'checked'){
425
- el.after('<input type=\"hidden\" name=\"' + jQuery("#<?php echo ''.$id?>").attr("name") + '\" value="0">');
426
- }
427
-
428
- el.on('click',function(){
429
-
430
- if (jQuery(this).attr("checked") != 'checked') {
431
- jQuery(this).after("<input type=\"hidden\" name=\"" + jQuery(this).attr("name") + "\" value=0>");
432
- if(Array.isArray(hide_ids) && hide_ids.length > 0){
433
- iterator(false);
434
- }
435
- } else {
436
- jQuery(this).next().remove();
437
- if(Array.isArray(hide_ids) && hide_ids.length > 0){
438
- iterator(true);
439
- }
440
- }
441
-
442
- });
443
-
444
- if(Array.isArray(hide_ids) && hide_ids.length > 0){
445
- if(el.attr('checked') != 'checked'){
446
- iterator(false);
447
- }else{
448
- iterator(true);
449
- }
450
- }
451
-
452
-
453
- function iterator(show) {
454
- for (var i=0;i<hide_ids.length;i++){
455
- var el = jQuery("#WDI_"+hide_ids[i]).closest('.wdi_element');
456
- if(el.length == 0){
457
- continue;
458
- }
459
-
460
- (show === true) ? el.removeClass(hide_class) : el.addClass(hide_class);
461
- }
462
- }
463
-
464
- });
465
- </script>
466
-
467
- <?php
468
- }
469
-
470
-
471
- public function how_to_publish($element,$feed_row=array()){
472
- $feed_id = (isset($feed_row['id'])) ? $feed_row['id'] : 0;
473
- ?>
474
- <div class="wdi_howto_container">
475
- <div class="wdi_howto_content">
476
- <h2>Shortcode</h2>
477
- <h4>Copy and paste this shortcode into your posts or pages:</h4>
478
- <input type="text" class="wdi_howto_shortcode" value='[wdi_feed id="<?php echo $feed_id; ?>"]' onclick="wdi_select_focus_element(this)" size="11" readonly="readonly" />
479
- </div>
480
- <div class="wdi_howto_content">
481
- <h2>Page or Post editor</h2>
482
- <h4>Insert it into an existing post with the button:</h4>
483
- <img src="<?php echo WDI_URL.'/images/how_to_publish_shortcode.png'; ?>">
484
- </div>
485
- <div class="wdi_howto_content">
486
- <h2>PHP code</h2>
487
- <h4>Copy and paste the PHP code into your template file:</h4>
488
- <input type="text" class="wdi_howto_phpcode" value="&#60;?php echo wdi_feed(array('id'=>'<?php echo $feed_id; ?>')); ?&#62;" onclick="wdi_select_focus_element(this)" size="17" readonly="readonly" />
489
- </div>
490
- <div class="wdi_howto_content">
491
- <h2>Widget</h2>
492
- <h4>Add Instagram Feed Widget to your site:</h4>
493
- <img src="<?php echo WDI_URL.'/images/how_to_publish_widget.png'; ?>">
494
- </div>
495
- <script>function wdi_select_focus_element(obj) {obj.focus();obj.select();}</script>
496
- <?php
497
- }
498
-
499
- /**
500
- * Displays a single color control
501
- * $element['name']
502
- * $element['CONST'] //variable to store data in array
503
- */
504
-
505
- public function color($element,$feed_row=''){
506
- $name = $element['CONST'].'['.(isset($element['name']) ? $element['name'] : 'NOT_SET').']';
507
- $id = isset($element['id']) ? $element['id'] : 'WDI_'.$element['name'];
508
- $defaults = $element['defaults'];
509
-
510
- $attrs = ' ';
511
- foreach ($element['attr'] as $attr) {
512
- $attrs .= $attr['name'] . '="' . $attr['value'] . '" ';
513
- if($attr['name'] === 'tab'){
514
- $tab = $attr['value'];
515
- }
516
- if($attr['name'] === 'section'){
517
- $section = $attr['value'];
518
- }
519
- }
520
- $attr = $attrs;
521
-
522
- $current_settings = isset($feed_row) ? $feed_row : '';
523
-
524
- $opt_value = isset($defaults[$element['name']]) ? $defaults[$element['name']] : '';
525
- if($current_settings !=''){
526
- if($current_settings[$element['name']] != '')
527
- {
528
- $opt_value = $current_settings[$element['name']];
529
- }
530
- }
531
- ?>
532
- <div class="wdwt_param" id="WDI_wrap_<?php echo $element['name'];?>">
533
- <div class='wdwt_float' >
534
- <div>
535
- <input type="text" class='color_input' id="<?php echo $id ?>" <?php echo $attr;?> name="<?php echo $name; ?>" value="<?php echo esc_attr($opt_value); ?>" data-default-color="<?php echo $defaults[$element['name']]; ?>" style="background-color:<?php echo esc_attr($opt_value); ?>;">
536
- </div>
537
- </div>
538
- </div>
539
- <script type="text/javascript">
540
- jQuery(document).ready(function() {
541
- jQuery('.color_input').wpColorPicker();
542
- jQuery('#WDI_wrap_<?php echo $element['name'];?> .wp-picker-container').attr('tab','<?php echo $tab;?>');
543
- jQuery('#WDI_wrap_<?php echo $element['name'];?> .wp-picker-container').attr('section','<?php echo $section;?>');
544
- });
545
- </script>
546
- <?php
547
- }
548
-
549
- }
550
-
551
-
552
-
1
+ <?php
2
+
3
+ class WDI_form_builder {
4
+
5
+
6
+
7
+
8
+
9
+ public function __construct() {
10
+
11
+ }
12
+ /*
13
+
14
+
15
+
16
+
17
+ * $element['name']
18
+ * $element['id'] //default is WDI_.$element_name
19
+ * $element['type'] //text,number ...
20
+ * $element['attr'] //custom attribute array(array('name'=>'attr_name','value'=>'attr_value'),...)
21
+ * $element['input_size']
22
+ * $element['label'] // array('text','place')
23
+ * $element['defaults'] //array of default vlaues
24
+ * $element['CONST'] //variable to store data in array
25
+ * $element['disabled'] //text to be displayed if option is disabled
26
+ */
27
+ public function input($element,$feed_row=''){
28
+ $name = $element['CONST'].'['.(isset($element['name']) ? $element['name'] : 'NOT_SET') . ']';
29
+ $id = isset($element['id']) ? $element['id'] : 'WDI_'.$element['name'];
30
+ $type = isset($element['input_type']) ? $element['input_type'] : 'text';
31
+ //$attrText = $element['attr']['name'] . '=' . $element['attr']['value'];
32
+ $disabled_text = (isset($element['disabled']) && isset($element['disabled']['text'])) ? $element['disabled']['text'] : '';
33
+ $switched = (isset($element['switched']) && $element['switched'] === 'off') ? 'disabled' : '';
34
+ $attrs = ' ';
35
+ foreach ($element['attr'] as $attr) {
36
+ $attrs .= $attr['name'] . '="' . $attr['value'] . '" ';
37
+ }
38
+ $attr = $attrs;
39
+
40
+ $input_size= isset($element['input_size']) ? $element['input_size'] : '20';
41
+ $label = isset($element['label']) ? $element['label'] : '';
42
+ $defaults = $element['defaults'];
43
+ $current_settings = isset($feed_row) ? $feed_row : '';
44
+ $value = isset($defaults[$element['name']]) ? $defaults[$element['name']] : '';
45
+ if($current_settings !=''){
46
+ $value = isset($current_settings[$element['name']]) ? $current_settings[$element['name']] : '';
47
+ }
48
+
49
+
50
+ ?>
51
+ <div class="wdwt_param" id="WDI_wrap_<?php echo $element['name']; ?>">
52
+ <div class="block">
53
+ <div class="optioninput">
54
+
55
+ <?php
56
+ if($label!='' && $label['place']=='before'){
57
+ ?>
58
+ <label for="<?php echo $id; ?>"><?php echo $label['text']; ?></label>
59
+ <?php echo isset($label['br'])? '<br/>' : ''?>
60
+ <?php
61
+ }
62
+ ?>
63
+
64
+ <input type="<?php echo $type; ?>" id="<?php echo $id; ?>" <?php echo $switched; ?> name="<?php echo $name; ?>" value="<?php echo esc_attr($value); ?>"
65
+ <?php echo $attr; ?> size="<?php echo $input_size; ?>">
66
+ <?php
67
+ if($label!='' && $label['place']=='after'){
68
+ ?>
69
+ <?php echo isset($label['br'])? '<br/>' : ''?>
70
+ <label for="<?php echo $id; ?>"><?php echo $label['text']; ?></label>
71
+ <?php
72
+ }
73
+ if($disabled_text != ''){
74
+ ?><span class="wdi_pro_only"><?php echo $disabled_text?></span> <?php
75
+ }
76
+ ?>
77
+ </div>
78
+ </div>
79
+ </div>
80
+ <?php
81
+ }
82
+
83
+ /*
84
+ * $element['name']
85
+ * $element['id'] //default is WDI_.$element_name
86
+ * $element['type'] //multiple
87
+ * $element['attr'] //custom attribute array(array('name'=>'attr_name','value'=>'attr_value'),...)
88
+ * $element['label'] // array('text','place')
89
+ * $element['valid_options'] //array('option_value1'=>'option_name1','option_value2'=>'option_name2');
90
+ * $element['width']
91
+ * $element['selected'] //one of valid options
92
+ * $element['defaults'] //array of default vlaues
93
+ * $element['CONST'] //variable to store data in array
94
+ * $element['switched'] //if set to 'off' will make field disabled
95
+ * $element['disabled'] //disabled text label
96
+ */
97
+ public function select($element,$feed_row=''){
98
+ $name = $element['CONST'].'['.(isset($element['name']) ? $element['name'] : 'NOT_SET') . ']';
99
+ $id = isset($element['id']) ? $element['id'] : 'WDI_'.$element['name'];
100
+ $type = isset($element['type']) ? $element['type'] : '';
101
+ //$attr = isset($element['attr']) ? $element['attr']['name'] . '="' . $element['attr']['value'].'"' : '';
102
+ $label = isset($element['label']) ? $element['label'] : '';
103
+ $width = isset($element['width']) ? ($element['width']) : '';
104
+ $options = isset($element['valid_options']) ? $element['valid_options'] : '';
105
+ $switched = (isset($element['switched']) && $element['switched'] === 'off') ? 'disabled' : '';
106
+ $hide_ids = isset($element['hide_ids']) ? $element['hide_ids'] : '';
107
+ $disabled_text = (isset($element['disabled']) && isset($element['disabled']['text'])) ? $element['disabled']['text'] : '';
108
+ $disabled_options = isset($element['disabled_options']) ? $element['disabled_options'] : array();
109
+ $defaults = $element['defaults'];
110
+ $current_settings = isset($feed_row) ? $feed_row : '';
111
+ $opt_value = isset($defaults[$element['name']]) ? $defaults[$element['name']] : '';
112
+ if($current_settings !=''){
113
+ $opt_value = isset($current_settings[$element['name']]) ? $current_settings[$element['name']] : '';
114
+ }
115
+
116
+
117
+ $attrs = ' ';
118
+ foreach ($element['attr'] as $attr) {
119
+ $attrs .= $attr['name'] . '="' . $attr['value'] . '" ';
120
+ }
121
+ $attr = $attrs;
122
+ ?>
123
+
124
+ <div class="wdwt_param" id="WDI_wrap_<?php echo $element['name']; ?>">
125
+ <div class="block">
126
+ <div class="optioninput">
127
+ <?php
128
+ if($label!='' && $label['place']=='before'){
129
+ ?>
130
+ <label class="<?php echo isset($label['class']) ? $label['class'] : '';?>" for="<?php echo $id; ?>"><?php echo $label['text']; ?></label>
131
+ <?php echo isset($label['br'])? '<br/>' : ''?>
132
+ <?php
133
+ }
134
+ ?>
135
+
136
+ <select name="<?php echo $name; ?>" id="<?php echo $id; ?>" <?php echo $type; ?> <?php echo $switched; ?> style="<?php if($width!='') echo 'width:' .$width . ';';?> resize:vertical;" <?php echo $attr; ?>>
137
+ <?php foreach($options as $key => $value){ ?>
138
+ <option <?php echo (in_array($key, $disabled_options)) ? 'disabled' : '' ?> value="<?php echo esc_attr($key) ?>" <?php if($key==$opt_value){echo 'selected';}?>>
139
+ <?php echo esc_html($value); ?>
140
+ </option>
141
+ <?php } ?>
142
+ </select>
143
+
144
+ <?php
145
+ if($label!='' && $label['place']=='after'){
146
+ ?>
147
+ <?php echo isset($label['br'])? '<br/>' : ''?>
148
+ <label class="<?php echo isset($label['class']) ? $label['class'] : '';?>" for="<?php echo $id; ?>"><?php echo $label['text']; ?></label>
149
+ <?php
150
+ }
151
+ if($disabled_text != ''){
152
+ ?><span class="wdi_pro_only"><?php echo $disabled_text?></span> <?php
153
+ }
154
+ //echo disable text if need label & disable text
155
+
156
+ ?>
157
+
158
+ </div>
159
+ </div>
160
+ </div>
161
+ <?php
162
+ if($hide_ids != ''){
163
+ ?>
164
+ <style>
165
+ .<?php echo $id.'_hide_ids_hidden';?>{
166
+ display:none !important;
167
+ }
168
+ </style>
169
+ <script>
170
+ jQuery(document).ready(function(){
171
+ var <?php echo $id.'_hide_ids';?> = <?php echo json_encode($hide_ids);?>;
172
+ jQuery("#WDI_wrap_<?php echo $element['name'];?> select").on('change',function(){
173
+ jQuery('.<?php echo $id.'_hide_ids_hidden';?>').each(function(){
174
+ jQuery(this).removeClass('<?php echo $id.'_hide_ids_hidden';?>');
175
+ });
176
+ var selected = jQuery(this).val();
177
+ for (var opt in <?php echo $id.'_hide_ids'?>){
178
+ if(opt == selected){
179
+ var ids = <?php echo $id.'_hide_ids'?>[opt].split(',');
180
+ for (var i in ids){
181
+ jQuery('#WDI_wrap_'+ids[i]).parent().parent().addClass("<?php echo $id.'_hide_ids_hidden';?>");
182
+ }
183
+ }
184
+ }
185
+ });
186
+ jQuery("#WDI_wrap_<?php echo $element['name'];?> select").each(function(){
187
+ var currentOption = "<?php echo $opt_value?>";
188
+ if(jQuery(this).val() == currentOption){
189
+ jQuery(this).trigger('change');
190
+ }
191
+ });
192
+ });
193
+ </script>
194
+ <?php }
195
+
196
+ }
197
+
198
+
199
+ /*
200
+ * $element['name']
201
+ * $element['id'] //default is WDI_.$element_name
202
+ * $element['attr'] //custom attribute array(array('name'=>'attr_name','value'=>'attr_value'),...)
203
+ * $element['label'] // array('text','place')
204
+ * $element['valid_options'] //array('option_value1'=>'option_name1','option_value2'=>'option_name2');
205
+ * $element['width']
206
+ * $element['selected'] //one of valid options
207
+ * $element['defaults'] //array of default vlaues
208
+ * $element['CONST'] //variable to store data in array
209
+ */
210
+ public function radio($element,$feed_row=''){
211
+ $option_name = isset($element['name']) ? $element['name'] : 'NOT_SET';
212
+ $name = $element['CONST'] . '[' . (isset($element['name']) ? $element['name'] : 'NOT_SET') . ']';
213
+ $id = isset($element['id']) ? $element['id'] : 'WDI_'.$element['name'];
214
+ //$attr = isset($element['attr']) ? $element['attr']['name'] . '="' . $element['attr']['value'].'"' : '';
215
+ $label = isset($element['label']) ? $element['label'] : '';
216
+ $width = isset($element['width']) ? ($element['width']) : '';
217
+ $options = isset($element['valid_options']) ? $element['valid_options'] : '';
218
+ $break = isset($element['break']) ? '<br/>' : '';
219
+ $hide_ids = isset($element['hide_ids']) ? $element['hide_ids'] : '';
220
+ $show_ids = isset($element['show_ids']) ? $element['show_ids'] : '';
221
+ $disabled_options = isset($element['disabled_options']) ? $element['disabled_options'] : array();
222
+ $attrs = ' ';
223
+ foreach ($element['attr'] as $attr) {
224
+ $attrs .= $attr['name'] . '="' . $attr['value'] . '" ';
225
+ }
226
+ $attr = $attrs;
227
+ $defaults = $element['defaults'];
228
+ $current_settings = isset($feed_row) ? $feed_row : '';
229
+ $opt_value = isset($defaults[$element['name']]) ? $defaults[$element['name']] : '';
230
+ if($current_settings !=''){
231
+ $opt_value = isset($current_settings[$element['name']]) ? $current_settings[$element['name']] : '';
232
+ }
233
+
234
+ ?>
235
+ <div class="wdwt_param" id="WDI_wrap_<?php echo $element['name'];?>">
236
+ <div class="block">
237
+ <div class="optioninput">
238
+ <?php
239
+
240
+ if($label!='' && $label['place']=='before'){
241
+ ?>
242
+ <label class="<?php echo isset($label['class']) ? $label['class'] : '';?>" for="<?php $id; ?>"><?php echo $label['text']; ?></label>
243
+ <?php echo isset($label['br']) ? '<br/>' : ''?>
244
+ <?php
245
+ }
246
+ foreach ( $options as $key => $option ) {
247
+ $disable = '';
248
+ $disable_text = '';
249
+ foreach ($disabled_options as $disabled_option =>