Instagram Slider Widget - Version 2.0.3

Version Description

  • Fix Facebook shortcode
  • Fix Slick slider arrows
  • WP 5.9 compatibility
  • Minor fixes
Download this release

Release Info

Developer webtemyk
Plugin Icon 128x128 Instagram Slider Widget
Version 2.0.3
Comparing to
See all releases

Code changes from version 1.9.5 to 2.0.3

Files changed (148) hide show
  1. admin/ajax/check-license.php +1 -1
  2. admin/assets/css/admin-style.css +532 -0
  3. admin/assets/css/component.css +0 -249
  4. admin/assets/css/feeds.css +362 -0
  5. admin/assets/css/jr-insta-admin.css +0 -613
  6. admin/assets/css/spectre.css +3250 -0
  7. admin/assets/css/spectre.min.css +1 -0
  8. admin/assets/img/bg2.png +0 -0
  9. admin/assets/img/bg22.png +0 -0
  10. admin/assets/img/fb-icon.png +0 -0
  11. admin/assets/img/fon.jpg +0 -0
  12. admin/assets/img/insta-icon.png +0 -0
  13. admin/assets/img/logo.png +0 -0
  14. admin/assets/js/admin-script.js +5 -0
  15. admin/assets/js/cbpFWTabs.js +0 -72
  16. admin/assets/js/feeds.js +349 -0
  17. admin/assets/js/jr-insta-admin.js +0 -524
  18. admin/class-page-logger.php +242 -0
  19. admin/class-page.php +282 -0
  20. admin/class-wis-activation.php +2 -2
  21. admin/class-wis-page.php +0 -72
  22. admin/pages/Licenses.php +0 -74
  23. admin/pages/about.php +28 -6
  24. admin/pages/components.php +0 -85
  25. admin/pages/feeds.php +271 -0
  26. admin/pages/license.php +10 -15
  27. admin/pages/log.php +101 -0
  28. admin/pages/manual.php +9 -5
  29. admin/pages/profiles.php +230 -0
  30. admin/pages/settings.php +0 -237
  31. admin/pages/widgets.php +32 -41
  32. admin/views/facebook.php +0 -94
  33. admin/views/instagram.php +0 -196
  34. admin/views/{tab-about.php → page-about.php} +2 -6
  35. admin/views/{tab-addon_licenses.php → page-addon_licenses.php} +1 -1
  36. admin/views/page-feeds.php +23 -0
  37. admin/views/{tab-license.php → page-license.php} +5 -5
  38. admin/views/{tab-manual.php → page-manual.php} +11 -11
  39. admin/views/page-profiles.php +21 -0
  40. admin/views/{tab-showcase-license.php → page-showcase-license.php} +5 -5
  41. admin/views/page-widgets.php +89 -0
  42. admin/views/tab-components.php +0 -66
  43. admin/views/tab-licenses.php +0 -40
  44. admin/views/tab-settings.php +0 -57
  45. admin/views/tab-widgets.php +0 -82
  46. admin/views/youtube.php +0 -102
  47. assets/img/icon.png +0 -0
  48. components/facebook/assets/admin/js/wfacebook-admin.js +36 -0
  49. components/facebook/assets/css/remodal-default-theme.css +322 -0
  50. components/facebook/assets/css/remodal-template.css +56 -0
  51. components/facebook/assets/css/remodal-template1.css +247 -0
  52. components/facebook/assets/css/remodal-view.css +27 -0
  53. components/facebook/assets/css/remodal.css +93 -0
  54. components/facebook/assets/css/socialstory.css +258 -0
  55. components/facebook/assets/css/wbfb_masonry_view.css +145 -0
  56. components/facebook/assets/js/libs/imagesloaded.pkgd.js +497 -0
  57. components/facebook/assets/js/libs/imagesloaded.pkgd.min.js +7 -0
  58. components/facebook/assets/js/libs/remodal.js +785 -0
  59. components/facebook/assets/js/libs/remodal.min.js +10 -0
  60. components/facebook/assets/js/remodal-view.js +4 -0
  61. components/facebook/assets/js/socialstory-view.js +48 -0
  62. components/facebook/assets/js/socialstory.js +258 -0
  63. components/facebook/assets/js/wbfb_masonry_view.js +10 -0
  64. components/facebook/html_templates/accounts.php +75 -0
  65. components/facebook/html_templates/feeds.php +61 -0
  66. components/facebook/html_templates/form-feed.php +226 -0
  67. components/facebook/html_templates/masonry.php +107 -0
  68. components/facebook/html_templates/popup.php +68 -0
  69. components/facebook/html_templates/widget_settings.php +26 -0
  70. components/facebook/includes/Api/facebook-account.php +33 -0
  71. components/facebook/includes/Api/facebook-api.php +94 -0
  72. components/facebook/includes/Api/facebook-post-attachment.php +31 -0
  73. components/facebook/includes/Api/facebook-post.php +56 -0
  74. components/facebook/includes/class-facebook-feed.php +286 -0
  75. components/facebook/includes/class-facebook-profiles.php +156 -0
  76. components/facebook/includes/class-facebook-widget.php +214 -0
  77. components/facebook/includes/functions.php +22 -0
  78. components/facebook/load.php +21 -0
  79. components/instagram/assets/admin/js/instagram-scripts.js +49 -0
  80. {assets → components/instagram/assets}/css/instag-slider.css +4 -3
  81. {assets → components/instagram/assets}/css/jr-insta.css +0 -0
  82. {assets → components/instagram/assets}/css/wis-header.css +0 -0
  83. {assets → components/instagram/assets/img}/image.png +0 -0
  84. {assets → components/instagram/assets/img}/in.png +0 -0
  85. {assets → components/instagram/assets}/img/spinner.svg +0 -0
  86. {assets → components/instagram/assets}/js/jquery.flexslider-min.js +0 -0
  87. {assets → components/instagram/assets}/js/jr-insta.js +0 -0
  88. components/instagram/html_templates/accounts.php +147 -0
  89. components/instagram/html_templates/feeds.php +61 -0
  90. components/instagram/html_templates/form-feed.php +595 -0
  91. html_templates/feed_header_template.php → components/instagram/html_templates/templates/feed_header.php +0 -0
  92. components/instagram/html_templates/templates/slider-overlay.php +88 -0
  93. components/instagram/html_templates/templates/slider.php +74 -0
  94. components/instagram/html_templates/templates/thumbs-no-border.php +37 -0
  95. components/instagram/html_templates/templates/thumbs.php +37 -0
  96. components/instagram/html_templates/widget_settings.php +26 -0
  97. components/instagram/includes/class-instagram-feed.php +1214 -0
  98. components/instagram/includes/class-instagram-profiles.php +298 -0
  99. components/instagram/includes/class-instagram-widget.php +204 -0
  100. components/instagram/includes/functions.php +22 -0
  101. components/instagram/load.php +22 -0
  102. components/youtube/admin/assets/css/wyoutube-admin.css +2 -2
  103. components/youtube/admin/assets/js/cbpFWTabs.js +0 -72
  104. components/youtube/admin/assets/js/license-manager.js +0 -77
  105. components/youtube/admin/assets/js/wyoutube-admin.js +16 -70
  106. components/youtube/html_templates/accounts.php +115 -0
  107. components/youtube/html_templates/default.php +4 -4
  108. components/youtube/html_templates/feed_header_template.php +2 -2
  109. components/youtube/html_templates/feeds.php +61 -0
  110. components/youtube/html_templates/form-feed.php +235 -0
  111. components/youtube/html_templates/widget_settings.php +29 -31
  112. components/youtube/includes/Api/YoutubeApi.php +2 -2
  113. components/youtube/includes/class-youtube-feed.php +411 -0
  114. components/youtube/includes/class-youtube-profiles.php +120 -0
  115. components/youtube/includes/class-youtube-widget.php +59 -438
  116. components/youtube/includes/functions.php +22 -0
  117. components/youtube/load.php +20 -0
  118. html_templates/facebook_slider_template.php +0 -15
  119. html_templates/widget_settings_template.php +0 -505
  120. includes/class-feed.php +203 -0
  121. includes/class-feeds.php +129 -0
  122. includes/class-helper.php +13 -0
  123. includes/class-plugin.php +273 -0
  124. includes/class-profiles.php +54 -0
  125. includes/class-wis-plugin-temp.php +33 -0
  126. includes/class-wis-plugin.php +0 -323
  127. includes/class-wis_facebook_slider.php +0 -490
  128. includes/class-wis_instagram_slider.php +0 -2427
  129. includes/class.wis_social.php +0 -75
  130. includes/demo_widgets.php +10 -1
  131. includes/socials/class.wis_facebook.php +0 -280
  132. includes/socials/class.wis_youtube.php +0 -0
  133. instaram_slider.php +66 -111
  134. languages/instagram-slider-widget-en_US.mo +0 -0
  135. languages/instagram-slider-widget-en_US.po +0 -628
  136. languages/instagram-slider-widget-ru_RU.mo +0 -0
  137. languages/instagram-slider-widget-ru_RU.po +1074 -644
  138. languages/instagram-slider-widget.pot +1033 -629
  139. libs/factory/adverts/boot.php +13 -13
  140. libs/factory/adverts/includes/class-base.php +6 -6
  141. libs/factory/adverts/includes/class-dashboard-widget.php +4 -4
  142. libs/factory/adverts/includes/class-rest-request.php +4 -4
  143. libs/factory/adverts/langs/{wbcr_factory_adverts_123-ru_RU.mo → wbcr_factory_adverts_130-ru_RU.mo} +0 -0
  144. libs/factory/adverts/langs/{wbcr_factory_adverts_123-ru_RU.po → wbcr_factory_adverts_130-ru_RU.po} +0 -0
  145. libs/factory/bootstrap/assets/css-min/bootstrap.accordion.min.css +2 -2
  146. libs/factory/bootstrap/assets/css-min/bootstrap.blue.min.css +2 -2
  147. libs/factory/bootstrap/assets/css-min/bootstrap.coffee.min.css +2 -2
  148. libs/factory/bootstrap/assets/css-min/bootstrap.core.min.css +1 -2
admin/ajax/check-license.php CHANGED
@@ -7,7 +7,7 @@
7
  */
8
 
9
  // Exit if accessed directly
10
- use Instagram\Includes\WIS_Plugin;
11
 
12
  if ( ! defined( 'ABSPATH' ) ) {
13
  exit;
7
  */
8
 
9
  // Exit if accessed directly
10
+
11
 
12
  if ( ! defined( 'ABSPATH' ) ) {
13
  exit;
admin/assets/css/admin-style.css ADDED
@@ -0,0 +1,532 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wisw-logo-title
2
+ {
3
+ display: inline-block;
4
+ background: transparent url('../img/logo.png') no-repeat center center;
5
+ background-size: contain;
6
+ height: 50px;
7
+ width: 50px;
8
+ vertical-align: middle;
9
+ border-radius: 5px;
10
+ margin-right: 10px;
11
+ }
12
+
13
+ .wisw-container
14
+ {
15
+ margin: 10px 0 0 0;
16
+ }
17
+
18
+ .wisw-social
19
+ {
20
+ margin-bottom: 30px;
21
+ }
22
+
23
+ .wisw-social-content
24
+ {
25
+ margin: 0 20px;
26
+ }
27
+
28
+ .wis-btn-instagram-account, .wis-btn-instagram-account-disabled
29
+ {
30
+ padding: 0 24px 0 120px;
31
+ height: 44px;
32
+ line-height: 44px;
33
+ text-transform: uppercase;
34
+ color: rgba(255, 255, 255, 0.8) !important;
35
+ text-decoration: none;
36
+ border-radius: 5px;
37
+ transition: all .5s ease-in-out;
38
+ font-weight: 600;
39
+ display: inline-block;
40
+ background: #4267B2 url(../img/instagram_bg.png) no-repeat 16px 13.5px !important;
41
+ background-size: auto 20px !important;
42
+ }
43
+
44
+ .wis-btn-facebook-account
45
+ {
46
+ padding: 0 30px 0 60px;
47
+ height: 44px;
48
+ line-height: 44px;
49
+ text-transform: uppercase;
50
+ color: rgba(255, 255, 255, 0.8) !important;
51
+ text-decoration: none;
52
+ border-radius: 5px;
53
+ transition: all .5s ease-in-out;
54
+ font-weight: 600;
55
+ display: inline-block;
56
+ background: #1879f2 url(../img/fb-icon-button.png) no-repeat 15px center !important;
57
+ background-size: auto 25px !important;
58
+ /*background: #1879f2 url(../img/fb-icon-button.png) no-repeat 15px 10px !important;*/
59
+ /*background-size: auto 25px !important;*/
60
+ }
61
+
62
+ .wis-btn-youtube-account
63
+ {
64
+ padding: 0 24px 0 50px;
65
+ height: 44px;
66
+ line-height: 44px;
67
+ text-transform: uppercase;
68
+ color: rgba(255, 255, 255, 0.8) !important;
69
+ text-decoration: none;
70
+ border-radius: 5px;
71
+ transition: all .5s ease-in-out;
72
+ font-weight: 600;
73
+ display: inline-block;
74
+ background: #ff9797 url(../img/youtube-icon.png) no-repeat 16px 14px !important;
75
+ background-size: auto 20px !important;
76
+ }
77
+
78
+ .wis-not-working
79
+ {
80
+ padding-left: 10px;
81
+ font-size: 16px;
82
+ }
83
+
84
+ #wis-add-token
85
+ {
86
+ margin-top: 10px;
87
+ background-color: white;
88
+ padding: 20px;
89
+ border: 1px solid #ccd0d4;
90
+ border-radius: 5px;
91
+ }
92
+
93
+ #wis-add-token p
94
+ {
95
+ padding-top: 5px;
96
+ }
97
+
98
+ .btn-instagram-account-disabled
99
+ {
100
+ opacity: 0.5;
101
+ }
102
+
103
+ .instagram-account-pro
104
+ {
105
+ padding: 5px;
106
+ }
107
+
108
+ .wis-spinner
109
+ {
110
+ background: url(../img/spinner.gif) no-repeat;
111
+ background-size: 20px 20px;
112
+ display: inline-block;
113
+ visibility: hidden;
114
+ float: right;
115
+ vertical-align: middle;
116
+ opacity: 0.7;
117
+ filter: alpha(opacity=70);
118
+ width: 20px;
119
+ height: 20px;
120
+ margin: 4px 10px 0;
121
+ }
122
+
123
+ .wis-table > tbody > tr > td
124
+ {
125
+ background-color: white;
126
+ }
127
+
128
+ .wis-table > thead > tr > th
129
+ {
130
+ font-weight: bold;
131
+ background-color: #e8e8e8;
132
+ }
133
+
134
+ .wis-text-token
135
+ {
136
+ background: transparent !important;
137
+ border: 0 !important;
138
+ box-shadow: inset 0 0 0 rgba(0, 0, 0, 0.00) !important;
139
+ }
140
+
141
+ .wis-help-text
142
+ {
143
+ display: inline-block;
144
+ font-size: 14px;
145
+ margin: 10px 0 0 10px;
146
+ }
147
+
148
+ .wis-help-text p
149
+ {
150
+ font-size: 16px;
151
+ }
152
+
153
+ i.wis-shortcode-icon
154
+ {
155
+ background: url(../img/wis_icon.png) center no-repeat;
156
+ }
157
+
158
+ /* MODAL popup*/
159
+ .wis_accounts_modal
160
+ {
161
+ position: fixed;
162
+ top: 50%;
163
+ left: 50%;
164
+ transform: translate(-50%, -50%);
165
+ width: 400px;
166
+ max-width: 100%;
167
+ height: 400px;
168
+ max-height: 100%;
169
+ z-index: 1010;
170
+ display: block;
171
+ overflow-y: auto;
172
+ overflow-x: hidden;
173
+ background-color: white;
174
+ border: 1px solid #32323280;
175
+ border-radius: 10px;
176
+ -webkit-box-shadow: 1px 1px 3px 0 rgba(50, 50, 50, 0.5);
177
+ -moz-box-shadow: 1px 1px 3px 0 rgba(50, 50, 50, 0.5);
178
+ box-shadow: 1px 1px 3px 0 rgba(50, 50, 50, 0.5);
179
+ }
180
+
181
+ .wis_feeds_modal
182
+ {
183
+ position: fixed;
184
+ top: 50%;
185
+ left: 50%;
186
+ transform: translate(-50%, -50%);
187
+ width: 400px;
188
+ max-width: 100%;
189
+ height: 400px;
190
+ max-height: 100%;
191
+ z-index: 1010;
192
+ display: block;
193
+ overflow-y: auto;
194
+ overflow-x: hidden;
195
+ background-color: white;
196
+ border: 1px solid #32323280;
197
+ border-radius: 10px;
198
+ -webkit-box-shadow: 1px 1px 3px 0 rgba(50, 50, 50, 0.5);
199
+ -moz-box-shadow: 1px 1px 3px 0 rgba(50, 50, 50, 0.5);
200
+ box-shadow: 1px 1px 3px 0 rgba(50, 50, 50, 0.5);
201
+ }
202
+
203
+ .wis_ytaccounts_modal
204
+ {
205
+ position: fixed;
206
+ top: 50%;
207
+ left: 50%;
208
+ transform: translate(-50%, -50%);
209
+ width: 400px;
210
+ max-width: 100%;
211
+ height: 400px;
212
+ max-height: 100%;
213
+ z-index: 1010;
214
+ display: block;
215
+ overflow-y: auto;
216
+ overflow-x: hidden;
217
+ background-color: white;
218
+ border: 1px solid #32323280;
219
+ border-radius: 10px;
220
+ -webkit-box-shadow: 1px 1px 3px 0 rgba(50, 50, 50, 0.5);
221
+ -moz-box-shadow: 1px 1px 3px 0 rgba(50, 50, 50, 0.5);
222
+ box-shadow: 1px 1px 3px 0 rgba(50, 50, 50, 0.5);
223
+ }
224
+
225
+ #wis_add_account_modal
226
+ {
227
+ height: 230px !important;
228
+ }
229
+
230
+ .wis_closed
231
+ {
232
+ display: none !important;
233
+ }
234
+
235
+ .wis_modal_content
236
+ {
237
+ position: initial;
238
+ top: 0;
239
+ left: 0;
240
+ width: auto;
241
+ height: auto;
242
+ padding: 15px 20px 15px 20px;
243
+ overflow-y: auto;
244
+ overflow-x: hidden;
245
+ text-align: center;
246
+ }
247
+
248
+ .wis_modal_header
249
+ {
250
+ position: initial;
251
+ top: 0;
252
+ left: 0;
253
+ width: auto;
254
+ height: 20px;
255
+ padding: 15px 20px 25px 20px;
256
+ overflow: hidden;
257
+ text-align: left;
258
+ font-weight: bold;
259
+ font-size: 14px;
260
+
261
+ }
262
+
263
+ .wis_modal_overlay
264
+ {
265
+ z-index: 1000;
266
+ position: fixed;
267
+ top: 0;
268
+ left: 0;
269
+ width: 100%;
270
+ height: 100%;
271
+ background-color: rgba(0, 0, 0, 0.5);
272
+ }
273
+
274
+ .wis-overlay-spinner
275
+ {
276
+ background: url(../img/spinner.svg) no-repeat;
277
+ background-size: 100px 100px;
278
+ vertical-align: middle;
279
+ transform: translate(-50%, -50%);
280
+ left: 50%;
281
+ top: 50%;
282
+ width: 100px;
283
+ height: 100px;
284
+ position: fixed;
285
+ visibility: hidden;
286
+ z-index: 1001;
287
+ }
288
+
289
+ .is-active
290
+ {
291
+ visibility: visible !important;
292
+ }
293
+
294
+ .wis-row
295
+ {
296
+ width: 95%;
297
+ min-width: 1120px;
298
+ display: flex;
299
+ }
300
+
301
+ .wis-col-1
302
+ {
303
+ float: left;
304
+ width: 12%;
305
+ }
306
+
307
+ .wis-col-2
308
+ {
309
+ float: left;
310
+ width: 14%;
311
+ }
312
+
313
+ .wis-col-full
314
+ {
315
+ float: left;
316
+ width: 100%;
317
+ }
318
+
319
+ .wis-row-style
320
+ {
321
+ padding: 10px;
322
+ cursor: pointer;
323
+ text-align: center;
324
+ }
325
+
326
+ .wis-col1-style
327
+ {
328
+ text-align: center;
329
+ vertical-align: middle;
330
+ }
331
+
332
+ .wis-col-full-style
333
+ {
334
+ height: 50px;
335
+ font-weight: bold;
336
+ font-size: 14px;
337
+ padding-left: 5px;
338
+ text-align: center;
339
+ vertical-align: middle;
340
+ }
341
+
342
+ .wis-col1-style img
343
+ {
344
+ border: 1px solid #dadada;
345
+ border-radius: 10px;
346
+ vertical-align: middle;
347
+ }
348
+
349
+ .wis-col2-style
350
+ {
351
+ font-weight: bold;
352
+ font-size: 14px;
353
+ padding-left: 5px;
354
+ }
355
+
356
+ .wis-col2-style p
357
+ {
358
+ vertical-align: middle;
359
+ }
360
+
361
+ .wis-page-title
362
+ {
363
+ text-align: center;
364
+ padding: 10px 0;
365
+ }
366
+
367
+ .wis-page-title h1
368
+ {
369
+ vertical-align: middle;
370
+ color: #000000;
371
+ text-shadow: 1px 1px 1px #ccc;
372
+ }
373
+
374
+ .wis-div-added
375
+ {
376
+ display: inline-block;
377
+ background-color: #d3dec1;
378
+ border: 1px solid green;
379
+ border-radius: 5px;
380
+ text-align: center;
381
+ word-break: break-word;
382
+ width: 100px;
383
+ font-size: 12px;
384
+ line-height: 1.1;
385
+ padding: 5px 0;
386
+ margin: 5px 0 0 0;
387
+ }
388
+
389
+ .wis-widgets-container
390
+ {
391
+ padding: 20px 0 0 0;
392
+ /*margin-right: 20px;*/
393
+ }
394
+
395
+ .wis-col-16
396
+ {
397
+ float: left;
398
+ width: 16.66666666%;
399
+ }
400
+
401
+ .wis-demo-widgets
402
+ {
403
+ width: auto;
404
+ padding: 15px;
405
+ margin: 0 20px 20px 0;
406
+ background: #fafafa;
407
+ color: #23282d;
408
+ border: 1px solid #ccd0d4;
409
+ box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
410
+ }
411
+
412
+ .wis-demo-widgets .wis-demo-widefat
413
+ {
414
+ color: black;
415
+ font-family: monospace;
416
+ text-align: center;
417
+ }
418
+
419
+ .wis-demo-shortcode
420
+ {
421
+ margin: 10px 0 10px 0;
422
+ text-align: center;
423
+ }
424
+
425
+ .wis-demo-shortcode p
426
+ {
427
+ margin: 0 !important;
428
+ padding: 0 10px 10px 10px !important;
429
+ }
430
+
431
+ .wis-demo-shortcode input
432
+ {
433
+ padding: 0 !important;
434
+ width: 95%;
435
+ font-size: 12px;
436
+ }
437
+
438
+ .wis-demo-shortcode span.wis_demo_pro:after
439
+ {
440
+ display: inline-block;
441
+ position: relative;
442
+ content: 'PRO';
443
+ background: #ff5722;
444
+ border-radius: 4px;
445
+ color: #fff;
446
+ font-size: 10px;
447
+ line-height: 1;
448
+ font-style: normal;
449
+ padding: 4px 6px;
450
+ margin-left: 4px;
451
+ vertical-align: top;
452
+ top: 0;
453
+ left: 0;
454
+ right: auto;
455
+ z-index: 11;
456
+ cursor: pointer;
457
+ }
458
+
459
+ .wis-social-group
460
+ {
461
+ font-size: 18px;
462
+ font-weight: bold;
463
+ margin: 15px 0 10px 0;
464
+ }
465
+
466
+ .wis-profile-empty
467
+ {
468
+ }
469
+
470
+ .wis-profile-shortcode
471
+ {
472
+ text-align: right;
473
+ width: 200px;
474
+ }
475
+
476
+ .wis-profile-id
477
+ {
478
+ width: 125px;
479
+ }
480
+
481
+ .wis-profile-picture
482
+ {
483
+ width: 40px;
484
+ }
485
+
486
+ .wis-profile-name
487
+ {
488
+ width: 200px;
489
+ }
490
+
491
+ .wis-profile-actions
492
+ {
493
+ width: 200px;
494
+ }
495
+
496
+ .wis-profile-nofeed
497
+ {
498
+ width: 100%;
499
+ text-align: left;
500
+ }
501
+
502
+ .wis-text-token
503
+ {
504
+ width: 90%;
505
+ }
506
+
507
+ @media only screen and (max-width: 670px)
508
+ {
509
+ .wis-profile-id
510
+ {
511
+ display: none;
512
+ }
513
+ }
514
+
515
+ @media only screen and (max-width: 490px)
516
+ {
517
+ .wis-profile-token
518
+ {
519
+ display: none;
520
+ }
521
+ }
522
+
523
+ #wyt_feed_link
524
+ {
525
+ width: 100%;
526
+ }
527
+
528
+ /* Feeds page */
529
+ .wisw-container-row
530
+ {
531
+ margin: 15px 0;
532
+ }
admin/assets/css/component.css DELETED
@@ -1,249 +0,0 @@
1
- #wpcontent
2
- {
3
- padding-left: 0 !important;
4
- background-color: white !important;
5
- }
6
-
7
- #wpbody-content
8
- {
9
- /*height: 100vh;*/
10
- }
11
-
12
- a:active, a:focus
13
- {
14
- outline: none !important;
15
- box-shadow: none !important;
16
- }
17
-
18
- .wis-container
19
- {
20
- /*padding: 0px 30px 0px 10px;*/
21
- padding: 1px 0 0 0;
22
- background-color: #ffffff;
23
- }
24
-
25
- .tabs
26
- {
27
- position: relative;
28
- width: 100%;
29
- overflow: hidden;
30
- margin: 1em 0 2em;
31
- font-weight: 400;
32
- }
33
-
34
- /* Nav */
35
- .tabs nav
36
- {
37
- text-align: left;
38
- margin-bottom: -4px;
39
- }
40
-
41
- .tabs nav ul
42
- {
43
- padding: 0;
44
- margin: 0;
45
- list-style: none;
46
- display: inline-block;
47
- margin-left: 25px;
48
- }
49
-
50
- .tabs nav ul li
51
- {
52
- border: 1px solid #becbd2;
53
- border-bottom: none;
54
- border-top-left-radius: 10px;
55
- border-top-right-radius: 10px;
56
- border-bottom-right-radius: 0px;
57
- border-bottom-left-radius: 0px;
58
- margin: 0 0.25em;
59
- display: block;
60
- float: left;
61
- position: relative;
62
- width: 20em;
63
- background-color: #f1f1f1;
64
- }
65
-
66
- .tabs nav ul li:hover
67
- {
68
- background-color: white;
69
- }
70
-
71
- .tabs nav li.tab-current
72
- {
73
- border: 1px solid #47a3da;
74
- box-shadow: inset 0px 5px 4px -3px #ff7600;
75
- border-top-left-radius: 10px;
76
- border-top-right-radius: 10px;
77
- border-bottom-right-radius: 0px;
78
- border-bottom-left-radius: 0px;
79
- border-bottom: none;
80
- z-index: 100;
81
- background-color: white;
82
- }
83
-
84
- .tabs nav li.tab-current:before,
85
- .tabs nav li.tab-current:after
86
- {
87
- content: '';
88
- position: absolute;
89
- height: 1px;
90
- right: 100%;
91
- bottom: 0;
92
- width: 1000px;
93
- background: #47a3da;
94
- }
95
-
96
- .tabs nav li.tab-current:after
97
- {
98
- right: auto;
99
- left: 100%;
100
- width: 4000px;
101
- }
102
-
103
- .tabs nav a
104
- {
105
- color: #becbd2;
106
- display: block;
107
- font-size: 1.45em;
108
- line-height: 2.5;
109
- padding: 0 1.25em;
110
- white-space: nowrap;
111
- }
112
-
113
- .tabs nav a:hover
114
- {
115
- color: #768e9d;
116
- }
117
-
118
- .tabs nav li.tab-current a
119
- {
120
- color: #47a3da;
121
- font-weight: bold;
122
- outline: none !important;
123
- }
124
-
125
- /* Icons */
126
- .tabs nav a:before
127
- {
128
- display: inline-block;
129
- vertical-align: middle;
130
- text-transform: none;
131
- font-weight: normal;
132
- font-variant: normal;
133
- line-height: 1;
134
- speak: none;
135
- -webkit-font-smoothing: antialiased;
136
- margin: -0.25em 0.4em 0 0;
137
- }
138
-
139
- .icon-instagram:before
140
- {
141
- content: url(../img/insta-icon.png);
142
- }
143
-
144
- .icon-facebook:before
145
- {
146
- content: url(../img/fb-icon.png);
147
- }
148
-
149
- .icon-youtube:before
150
- {
151
- content: url(../img/youtube-icon.png);
152
- }
153
-
154
-
155
- /* Content */
156
- .content
157
- {
158
- border-bottom: 1px solid #47a3da;
159
- border-top: 0;
160
- background-color: white;
161
- padding: 30px;
162
- height: 100vh;
163
- }
164
-
165
- .content section
166
- {
167
-
168
- margin: 0 auto;
169
- }
170
-
171
- .content section:before,
172
- .content section:after
173
- {
174
- content: '';
175
- display: table;
176
- }
177
-
178
- .content section:after
179
- {
180
- clear: both;
181
- }
182
-
183
- /* Fallback example */
184
- .no-js .content section
185
- {
186
- display: block;
187
- padding-bottom: 2em;
188
- border-bottom: 1px solid #47a3da;
189
- }
190
-
191
- .content section.content-current
192
- {
193
- display: block;
194
- }
195
-
196
- /* Example media queries */
197
-
198
- @media screen and (max-width: 52.375em)
199
- {
200
- .tabs nav a span
201
- {
202
- display: none;
203
- }
204
-
205
- .tabs nav a:before
206
- {
207
- margin-right: 0;
208
- }
209
- }
210
-
211
- @media screen and (max-width: 32em)
212
- {
213
- .tabs nav ul,
214
- .tabs nav ul li a
215
- {
216
- width: 100%;
217
- padding: 0;
218
- }
219
-
220
- .tabs nav ul li
221
- {
222
- width: 20%;
223
- width: calc(20% + 1px);
224
- margin: 0 0 0 -1px;
225
- }
226
-
227
- .tabs nav ul li:last-child
228
- {
229
- border-right: none;
230
- }
231
- }
232
-
233
- .tabs nav li a
234
- {
235
- color: #0073aa;
236
- text-decoration: none;
237
- outline: none !important;
238
- }
239
-
240
- .tabs nav li a:hover
241
- {
242
- font-weight: bold;
243
- }
244
-
245
- p.info
246
- {
247
- text-align: center;
248
- padding: 20px;
249
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/assets/css/feeds.css ADDED
@@ -0,0 +1,362 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* FIX for Spectre css */
2
+ input.form-input[type="number"]
3
+ {
4
+ max-width: 100px;
5
+ margin-left: 10px !important;
6
+ display: inline-block;
7
+ border: .05rem solid #bcc3ce;
8
+ border-radius: .1rem !important;
9
+ }
10
+
11
+ #WBCR input, #WBCR select
12
+ {
13
+ margin: 0;
14
+ }
15
+
16
+ #WBCR *, #WBCR :after, #WBCR :before
17
+ {
18
+ -webkit-box-sizing: border-box;
19
+ -moz-box-sizing: border-box;
20
+ box-sizing: border-box;
21
+ }
22
+
23
+ .input-group
24
+ {
25
+ justify-content: space-between;
26
+ }
27
+
28
+ /**********/
29
+ .jr-container
30
+ {
31
+ width: 100%;
32
+ /*max-width: 800px;*/
33
+ }
34
+
35
+ .jr-flex-container
36
+ {
37
+ /*display: flex;
38
+ justify-content: flex-start;
39
+ align-items: flex-start;
40
+ gap: 25px;*/
41
+ }
42
+
43
+ .jr-container .donate
44
+ {
45
+ padding: 5px 15px 10px;
46
+ display: inline-block;
47
+ position: relative;
48
+ color: #000;
49
+ background: #ffd751;
50
+ -webkit-border-radius: 5px;
51
+ border-radius: 5px;
52
+ border: 1px solid #b4b4b4;
53
+ font-weight: bold;
54
+ font-size: 14px;
55
+ text-decoration: none;
56
+ }
57
+
58
+ .jr-container .donate a
59
+ {
60
+ outline: 0;
61
+ cursor: pointer
62
+ }
63
+
64
+ .jr-container .donate span:before
65
+ {
66
+ color: #ce1f00;
67
+ font: 400 20px/1 dashicons;
68
+ font-family: dashicons;
69
+ font-size: 24px;
70
+ font-style: normal;
71
+ font-variant: normal;
72
+ font-weight: 400;
73
+ font-stretch: normal;
74
+ line-height: 1;
75
+ content: '\f487';
76
+ position: relative;
77
+ display: inline-block;
78
+ top: 4px;
79
+ margin-right: 4px;
80
+ }
81
+
82
+ .jr-container .pressthis a, .jr-container .pressthis-bookmarklet a,
83
+ .jr-container .pressthis a:active, .jr-container .pressthis-bookmarklet a:active,
84
+ .jr-container .pressthis a:focus, .jr-container .pressthis-bookmarklet a:focus,
85
+ .jr-container .pressthis a:hover, .jr-container .pressthis-bookmarklet a:hover
86
+ {
87
+ cursor: pointer;
88
+ background: #53b5d9;
89
+ border: 1px solid #0074a2;
90
+ color: #ffffff;
91
+ font-weight: bold
92
+ }
93
+
94
+ .jr-container .jr_insta_error
95
+ {
96
+ border-left: 4px solid #dd3d36;
97
+ -moz-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
98
+ -webkit-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
99
+ box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
100
+ padding: 5px 12px;
101
+ }
102
+
103
+ .jr-container .jr-radio
104
+ {
105
+ margin-right: 20px
106
+ }
107
+
108
+ .jr-container .jr-search-for-container
109
+ {
110
+ display: block;
111
+ margin-bottom: 10px;
112
+ }
113
+
114
+ .jr-container .jr-seach-for
115
+ {
116
+ width: 125px;
117
+ display: inline-block;
118
+ vertical-align: middle
119
+ }
120
+
121
+ .jr-container .jr-advanced
122
+ {
123
+ text-decoration: none;
124
+ border: none
125
+ }
126
+
127
+ .jr-container .jr-advanced:focus
128
+ {
129
+ outline: 0;
130
+ border: none;
131
+ box-shadow: none
132
+ }
133
+
134
+ .jr-container .jr-advanced-input div
135
+ {
136
+ border: 1px solid #cfcfcf;
137
+ padding: 10px;
138
+ margin: 25px 0 0;
139
+ }
140
+
141
+ .jr-container .jr-advanced-input .jr-advanced-title
142
+ {
143
+ margin: -22px 0 0 0;
144
+ background-color: white;
145
+ width: 160px;
146
+ padding: 3px 10px;
147
+ border: 1px solid #cfcfcf;
148
+ }
149
+
150
+ .jr-container .jr-description
151
+ {
152
+ color: #777;
153
+ font-size: smaller;
154
+ clear: both;
155
+ display: block;
156
+ margin-top: 0;
157
+ max-width: 500px;
158
+ }
159
+
160
+ .jr-container .jr-description.hide-media-library, .jr-container .jr-description.hide-instagram
161
+ {
162
+ display: none
163
+ }
164
+
165
+ .jr-container .switch
166
+ {
167
+ position: relative;
168
+ display: inline-block;
169
+ margin-left: 5px;
170
+ width: 45px;
171
+ height: 24px;
172
+ }
173
+
174
+ .jr-container .switch input
175
+ {
176
+ display: none;
177
+ }
178
+
179
+ .jr-container .slider
180
+ {
181
+ position: absolute;
182
+ cursor: pointer;
183
+ top: 0;
184
+ left: 0;
185
+ right: 0;
186
+ bottom: 0;
187
+ background-color: #ccc;
188
+ -webkit-transition: .4s;
189
+ transition: .4s;
190
+ }
191
+
192
+ .jr-container .slider:before
193
+ {
194
+ position: absolute;
195
+ content: "";
196
+ height: 22px;
197
+ width: 22px;
198
+ left: 0;
199
+ bottom: 0;
200
+ border: 1px solid #e5e5e5;
201
+ background-color: white;
202
+ -webkit-transition: .4s;
203
+ transition: .4s;
204
+ }
205
+
206
+ .jr-container input:checked + .slider
207
+ {
208
+ background-color: #0085ba;
209
+ }
210
+
211
+ .jr-container input:focus + .slider
212
+ {
213
+ box-shadow: 0 0 1px #0085ba;
214
+ }
215
+
216
+ .jr-container input:checked + .slider:before
217
+ {
218
+ -webkit-transform: translateX(22px);
219
+ -ms-transform: translateX(22px);
220
+ transform: translateX(22px);
221
+ }
222
+
223
+ .jr-container .slider.round
224
+ {
225
+ border-radius: 34px;
226
+ }
227
+
228
+ .jr-container .slider.round:before
229
+ {
230
+ border-radius: 50%;
231
+ }
232
+
233
+ .jr-container .donate-buttons
234
+ {
235
+ text-align: center
236
+ }
237
+
238
+ .jr-container .donate-button-link
239
+ {
240
+ cursor: pointer
241
+ }
242
+
243
+ .isw-common-settings
244
+ {
245
+ display: inline-block;
246
+ width: 100%;
247
+ max-width: 600px;
248
+ }
249
+
250
+ /* tabs styles */
251
+
252
+ .isw-tabs
253
+ {
254
+ display: inline-block;
255
+ width: 100%;
256
+ margin: 1rem 0 0 0;
257
+ /*max-width: 400px;*/
258
+ }
259
+
260
+ .isw-tabs-content
261
+ {
262
+ border-color: #5755d9;
263
+ border-style: solid;
264
+ border-width: 5px 2px 2px 2px;
265
+ padding: 0 20px 20px 0;
266
+ margin-top: -4px;
267
+ border-radius: 0 0 5px 5px;
268
+ }
269
+
270
+ .isw-tabs > div
271
+ {
272
+ padding-top: 10px;
273
+ }
274
+
275
+ .isw-tabs p
276
+ {
277
+ padding-top: 5px;
278
+ }
279
+
280
+ .isw-tabs ul
281
+ {
282
+ margin: 0;
283
+ padding: 0;
284
+ }
285
+
286
+ .isw-tabs ul:after
287
+ {
288
+ /*content: "";
289
+ display: block;
290
+ clear: both;
291
+ height: 5px;
292
+ background: #bf1e79;*/
293
+ }
294
+
295
+ .isw-float-right
296
+ {
297
+ float: right !important;
298
+ }
299
+
300
+ .isw-tabs ul li
301
+ {
302
+ text-align: center;
303
+ margin: 0;
304
+ width: 50%;
305
+ cursor: pointer;
306
+ display: block;
307
+ float: left;
308
+ padding: 10px 0;
309
+ background: #e9eaeb;
310
+ color: #5755d9;
311
+ border-radius: 5px 5px 0 0;
312
+ font-weight: bold;
313
+ font-size: 17px;
314
+ }
315
+
316
+ .isw-tabs ul li.active, .isw-tabs ul li.active:hover
317
+ {
318
+ background: #5755d9;
319
+ color: #fff;
320
+ }
321
+
322
+ .isw-tabs ul li:hover
323
+ {
324
+ background: #d6d6d7;
325
+ }
326
+
327
+ .wis-hidden
328
+ {
329
+ display: none;
330
+ }
331
+
332
+ .wis-flex-content
333
+ {
334
+ display: flex;
335
+ flex-direction: row;
336
+ align-items: flex-start;
337
+ justify-content: flex-start;
338
+ gap: 20px;
339
+ }
340
+
341
+ .wis-flex-content-column
342
+ {
343
+ max-width: 600px;
344
+ min-width: 540px;
345
+ }
346
+
347
+ .wis-feed-save-button-container
348
+ {
349
+ padding: 10px 0;
350
+ }
351
+
352
+ .wis-shortcode-input
353
+ {
354
+ width: 200px;
355
+ border: none !important;
356
+ color: black !important;
357
+ font-family: monospace !important;
358
+ text-align: center !important;
359
+ outline: none !important;
360
+ box-shadow: none !important;
361
+ }
362
+
admin/assets/css/jr-insta-admin.css CHANGED
@@ -1,613 +0,0 @@
1
- .jr-container .donate
2
- {
3
- padding: 5px 15px 10px;
4
- display: inline-block;
5
- position: relative;
6
- color: #000;
7
- background: #ffd751;
8
- -webkit-border-radius: 5px;
9
- border-radius: 5px;
10
- border: 1px solid #b4b4b4;
11
- font-weight: bold;
12
- font-size: 14px;
13
- text-decoration: none;
14
- }
15
-
16
- .jr-container .donate a
17
- {
18
- outline: 0;
19
- cursor: pointer
20
- }
21
-
22
- .jr-container .donate span:before
23
- {
24
- color: #ce1f00;
25
- font: 400 20px/1 dashicons;
26
- font-family: dashicons;
27
- font-size: 24px;
28
- font-style: normal;
29
- font-variant: normal;
30
- font-weight: 400;
31
- font-stretch: normal;
32
- line-height: 1;
33
- content: '\f487';
34
- position: relative;
35
- display: inline-block;
36
- top: 4px;
37
- margin-right: 4px;
38
- }
39
-
40
- .jr-container .pressthis a, .jr-container .pressthis-bookmarklet a,
41
- .jr-container .pressthis a:active, .jr-container .pressthis-bookmarklet a:active,
42
- .jr-container .pressthis a:focus, .jr-container .pressthis-bookmarklet a:focus,
43
- .jr-container .pressthis a:hover, .jr-container .pressthis-bookmarklet a:hover
44
- {
45
- cursor: pointer;
46
- background: #53b5d9;
47
- border: 1px solid #0074a2;
48
- color: #ffffff;
49
- font-weight: bold
50
- }
51
-
52
- .jr-container .jr_insta_error
53
- {
54
- border-left: 4px solid #dd3d36;
55
- -moz-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
56
- -webkit-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
57
- box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
58
- padding: 5px 12px;
59
- }
60
-
61
- .jr-container .jr-radio
62
- {
63
- margin-right: 20px
64
- }
65
-
66
- .jr-container .jr-search-for-container
67
- {
68
- display: block;
69
- margin-bottom: 10px;
70
- }
71
-
72
- .jr-container .jr-seach-for
73
- {
74
- width: 125px;
75
- display: inline-block;
76
- vertical-align: middle
77
- }
78
-
79
- .jr-container .jr-advanced
80
- {
81
- text-decoration: none;
82
- border: none
83
- }
84
-
85
- .jr-container .jr-advanced:focus
86
- {
87
- outline: 0;
88
- border: none;
89
- box-shadow: none
90
- }
91
-
92
- .jr-container .jr-advanced-input div
93
- {
94
- border: 1px solid #cfcfcf;
95
- padding: 10px;
96
- margin: 25px 0 0;
97
- }
98
-
99
- .jr-container .jr-advanced-input .jr-advanced-title
100
- {
101
- margin: -22px 0 0 0;
102
- background-color: white;
103
- width: 160px;
104
- padding: 3px 10px;
105
- border: 1px solid #cfcfcf;
106
- }
107
-
108
- .jr-container .jr-description
109
- {
110
- color: #777;
111
- font-size: smaller;
112
- clear: both;
113
- display: block;
114
- margin-top: 5px;
115
- }
116
-
117
- .jr-container .jr-description.hide-media-library, .jr-container .jr-description.hide-instagram
118
- {
119
- display: none
120
- }
121
-
122
- .jr-container .switch
123
- {
124
- position: relative;
125
- display: inline-block;
126
- margin-left: 5px;
127
- width: 45px;
128
- height: 24px;
129
- }
130
-
131
- .jr-container .switch input
132
- {
133
- display: none;
134
- }
135
-
136
- .jr-container .slider
137
- {
138
- position: absolute;
139
- cursor: pointer;
140
- top: 0;
141
- left: 0;
142
- right: 0;
143
- bottom: 0;
144
- background-color: #ccc;
145
- -webkit-transition: .4s;
146
- transition: .4s;
147
- }
148
-
149
- .jr-container .slider:before
150
- {
151
- position: absolute;
152
- content: "";
153
- height: 22px;
154
- width: 22px;
155
- left: 0px;
156
- bottom: 0px;
157
- border: 1px solid #e5e5e5;
158
- background-color: white;
159
- -webkit-transition: .4s;
160
- transition: .4s;
161
- }
162
-
163
- .jr-container input:checked + .slider
164
- {
165
- background-color: #0085ba;
166
- }
167
-
168
- .jr-container input:focus + .slider
169
- {
170
- box-shadow: 0 0 1px #0085ba;
171
- }
172
-
173
- .jr-container input:checked + .slider:before
174
- {
175
- -webkit-transform: translateX(22px);
176
- -ms-transform: translateX(22px);
177
- transform: translateX(22px);
178
- }
179
-
180
- .jr-container .slider.round
181
- {
182
- border-radius: 34px;
183
- }
184
-
185
- .jr-container .slider.round:before
186
- {
187
- border-radius: 50%;
188
- }
189
-
190
- .jr-container .donate-buttons
191
- {
192
- text-align: center
193
- }
194
-
195
- .jr-container .donate-button-link
196
- {
197
- cursor: pointer
198
- }
199
-
200
- .wis-btn-instagram-account, .wis-btn-instagram-account-disabled
201
- {
202
- padding: 0 24px 0 120px;
203
- height: 44px;
204
- line-height: 44px;
205
- text-transform: uppercase;
206
- color: rgba(255, 255, 255, 0.8) !important;
207
- text-decoration: none;
208
- border-radius: 5px;
209
- transition: all .5s ease-in-out;
210
- font-weight: 600;
211
- display: inline-block;
212
- background: #4267B2 url(../img/instagram_bg.png) no-repeat 16px 13.5px !important;
213
- background-size: auto 20px !important;
214
- }
215
-
216
- .wis-btn-facebook-account
217
- {
218
- padding: 0 30px 0 60px;
219
- height: 44px;
220
- line-height: 44px;
221
- text-transform: uppercase;
222
- color: rgba(255, 255, 255, 0.8) !important;
223
- text-decoration: none;
224
- border-radius: 5px;
225
- transition: all .5s ease-in-out;
226
- font-weight: 600;
227
- display: inline-block;
228
- background: #1879f2 url(../img/fb-icon-button.png) no-repeat 15px center !important;
229
- background-size: auto 25px !important;
230
- /*background: #1879f2 url(../img/fb-icon-button.png) no-repeat 15px 10px !important;*/
231
- /*background-size: auto 25px !important;*/
232
- }
233
-
234
- .wis-not-working
235
- {
236
- padding-left: 10px;
237
- font-size: 16px;
238
- }
239
-
240
- #wis-add-token
241
- {
242
- margin-top: 10px;
243
- background-color: white;
244
- padding: 20px;
245
- border: 1px solid #ccd0d4;
246
- border-radius: 5px;
247
- }
248
-
249
- #wis-add-token p
250
- {
251
- padding-top: 5px;
252
- }
253
-
254
- .btn-instagram-account-disabled
255
- {
256
- opacity: 0.5;
257
- }
258
-
259
- .instagram-account-pro
260
- {
261
- padding: 5px;
262
- }
263
-
264
- .wis-spinner
265
- {
266
- background: url(../img/spinner.gif) no-repeat;
267
- background-size: 20px 20px;
268
- display: inline-block;
269
- visibility: hidden;
270
- float: right;
271
- vertical-align: middle;
272
- opacity: 0.7;
273
- filter: alpha(opacity=70);
274
- width: 20px;
275
- height: 20px;
276
- margin: 4px 10px 0;
277
- }
278
-
279
- .wis-table > tbody > tr > td
280
- {
281
- background-color: white;
282
- }
283
-
284
- .wis-table > thead > tr > th
285
- {
286
- font-weight: bold;
287
- background-color: #e8e8e8;
288
- }
289
-
290
- .wis-text-token
291
- {
292
- background: transparent !important;
293
- border: 0 !important;
294
- box-shadow: inset 0 0 0 rgba(0, 0, 0, 0.00) !important;
295
- }
296
-
297
- .wis-help-text
298
- {
299
- font-size: 16px;
300
- margin: 10px 0px 0px 10px;
301
- }
302
-
303
- .wis-help-text p
304
- {
305
- font-size: 16px;
306
- }
307
-
308
- i.wis-shortcode-icon
309
- {
310
- background: url(../img/wis_icon.png) center no-repeat;
311
- }
312
-
313
- /* MODAL popup*/
314
- .wis_accounts_modal
315
- {
316
- position: fixed;
317
- top: 50%;
318
- left: 50%;
319
- transform: translate(-50%, -50%);
320
- width: 400px;
321
- max-width: 100%;
322
- height: 400px;
323
- max-height: 100%;
324
- z-index: 1010;
325
- display: block;
326
- overflow-y: auto;
327
- overflow-x: hidden;
328
- background-color: white;
329
- border: 1px solid #32323280;
330
- border-radius: 10px;
331
- -webkit-box-shadow: 1px 1px 3px 0px rgba(50, 50, 50, 0.5);
332
- -moz-box-shadow: 1px 1px 3px 0px rgba(50, 50, 50, 0.5);
333
- box-shadow: 1px 1px 3px 0px rgba(50, 50, 50, 0.5);
334
- }
335
-
336
- #wis_add_account_modal
337
- {
338
- height: 230px !important;
339
- }
340
-
341
- .wis_closed
342
- {
343
- display: none !important;
344
- }
345
-
346
- .wis_modal_content
347
- {
348
- position: initial;
349
- top: 0;
350
- left: 0;
351
- width: auto;
352
- height: auto;
353
- padding: 15px 20px 15px 20px;
354
- overflow-y: auto;
355
- overflow-x: hidden;
356
- text-align: center;
357
- }
358
-
359
- .wis_modal_header
360
- {
361
- position: initial;
362
- top: 0;
363
- left: 0;
364
- width: auto;
365
- height: 20px;
366
- padding: 15px 20px 25px 20px;
367
- overflow: hidden;
368
- text-align: left;
369
- font-weight: bold;
370
- font-size: 14px;
371
-
372
- }
373
-
374
- .wis_modal_overlay
375
- {
376
- z-index: 1000;
377
- position: fixed;
378
- top: 0;
379
- left: 0;
380
- width: 100%;
381
- height: 100%;
382
- background-color: rgba(0, 0, 0, 0.5);
383
- }
384
-
385
- .wis-overlay-spinner
386
- {
387
- background: url(../img/spinner.svg) no-repeat;
388
- background-size: 100px 100px;
389
- vertical-align: middle;
390
- transform: translate(-50%, -50%);
391
- left: 50%;
392
- top: 50%;
393
- width: 100px;
394
- height: 100px;
395
- position: fixed;
396
- visibility: hidden;
397
- z-index: 1001;
398
- }
399
-
400
- .is-active
401
- {
402
- visibility: visible !important;
403
- }
404
-
405
- .wis-row
406
- {
407
- width: 95%;
408
- min-width: 1120px;
409
- display: flex;
410
- }
411
-
412
- .wis-col-1
413
- {
414
- float: left;
415
- width: 12%;
416
- }
417
-
418
- .wis-col-2
419
- {
420
- float: left;
421
- width: 14%;
422
- }
423
-
424
- .wis-col-full
425
- {
426
- float: left;
427
- width: 100%;
428
- }
429
-
430
- .wis-row-style
431
- {
432
- padding: 10px;
433
- cursor: pointer;
434
- text-align: center;
435
- }
436
-
437
- .wis-col1-style
438
- {
439
- text-align: center;
440
- vertical-align: middle;
441
- }
442
-
443
- .wis-col-full-style
444
- {
445
- height: 50px;
446
- font-weight: bold;
447
- font-size: 14px;
448
- padding-left: 5px;
449
- text-align: center;
450
- vertical-align: middle;
451
- }
452
-
453
- .wis-col1-style img
454
- {
455
- border: 1px solid #dadada;
456
- border-radius: 10px;
457
- vertical-align: middle;
458
- }
459
-
460
- .wis-col2-style
461
- {
462
- font-weight: bold;
463
- font-size: 14px;
464
- padding-left: 5px;
465
- }
466
-
467
- .wis-col2-style p
468
- {
469
- vertical-align: middle;
470
- }
471
-
472
- .wis-page-title
473
- {
474
- text-align: center;
475
- padding: 10px 0;
476
- }
477
-
478
- .wis-page-title h1
479
- {
480
- vertical-align: middle;
481
- color: #000000;
482
- text-shadow: 1px 1px 1px #ccc;
483
- }
484
-
485
- .wis-div-added
486
- {
487
- display: inline-block;
488
- background-color: #d3dec1;
489
- border: 1px solid green;
490
- border-radius: 5px;
491
- text-align: center;
492
- word-break: break-word;
493
- width: 100px;
494
- float: right;
495
- font-size: 12px;
496
- line-height: 1.1;
497
- padding: 5px 0px;
498
- }
499
-
500
- .wis-widgets-container
501
- {
502
- padding: 20px 0 0 0;
503
- /*margin-right: 20px;*/
504
- }
505
-
506
- .wis-col-16
507
- {
508
- float: left;
509
- width: 16.66666666%;
510
- }
511
-
512
- .wis-demo-widgets
513
- {
514
- width: auto;
515
- padding: 15px;
516
- margin: 0 20px 20px 0;
517
- background: #fafafa;
518
- color: #23282d;
519
- border: 1px solid #ccd0d4;
520
- box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
521
- }
522
-
523
- .wis-demo-widgets .wis-demo-widefat
524
- {
525
- color: black;
526
- font-family: monospace;
527
- text-align: center;
528
- }
529
-
530
- .wis-demo-shortcode
531
- {
532
- margin: 10px 0 10px 0;
533
- text-align: center;
534
- }
535
-
536
- .wis-demo-shortcode p
537
- {
538
- margin: 0 !important;
539
- padding: 0 10px 10px 10px !important;
540
- }
541
-
542
- .wis-demo-shortcode input
543
- {
544
- padding: 0 !important;
545
- width: 95%;
546
- font-size: 12px;
547
- }
548
-
549
- .wis-demo-shortcode span.wis_demo_pro:after
550
- {
551
- display: inline-block;
552
- position: relative;
553
- content: 'PRO';
554
- background: #ff5722;
555
- border-radius: 4px;
556
- color: #fff;
557
- font-size: 10px;
558
- line-height: 1;
559
- font-style: normal;
560
- padding: 4px 6px;
561
- margin-left: 4px;
562
- vertical-align: top;
563
- top: 0;
564
- left: 0;
565
- right: auto;
566
- z-index: 11;
567
- cursor: pointer;
568
- }
569
-
570
- /* tabs styles */
571
-
572
- .isw-tabs{
573
- display:inline-block;
574
- width: 100%;
575
- max-width: 350px;
576
- }
577
- .isw-tabs > div{
578
- padding-top: 10px;
579
- }
580
- .isw-tabs ul{
581
- margin: 0px;
582
- padding: 0px;
583
- }
584
- .isw-tabs ul:after{
585
- content:"";
586
- display:block;
587
- clear:both;
588
- height:5px;
589
- background: #bf1e79;
590
- }
591
-
592
- .isw-float-right{
593
- float: right !important;
594
- }
595
-
596
- .isw-tabs ul li{
597
- text-align: center;
598
- margin: 0px;
599
- width: 50%;
600
- cursor:pointer;
601
- display:block;
602
- float:left;
603
- padding: 10px 0px;
604
- background:#e9eaeb;
605
- color:#707070;
606
- }
607
- .isw-tabs ul li.active, .isw-tabs ul li.active:hover{
608
- background: #bf1e79;
609
- color:#fff;
610
- }
611
- .isw-tabs ul li:hover{
612
- background:#d6d6d7;
613
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/assets/css/spectre.css ADDED
@@ -0,0 +1,3250 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! Spectre.css v0.5.9 | MIT License | github.com/picturepan2/spectre */
2
+ /* Manually forked from Normalize.css */
3
+ /* normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */
4
+ /** 1. Change the default font family in all browsers (opinionated). 2. Correct the line height in all browsers. 3. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS. */
5
+ /* Document ========================================================================== */
6
+ .table {
7
+ border-collapse: collapse;
8
+ border-spacing: 0;
9
+ text-align: left;
10
+ width: 100%;
11
+ }
12
+
13
+ .table.table-striped tbody tr:nth-of-type(odd) {
14
+ background: #f7f8f9;
15
+ }
16
+
17
+ .table tbody tr.active,
18
+ .table.table-striped tbody tr.active {
19
+ background: #eef0f3;
20
+ }
21
+
22
+ .table.table-hover tbody tr:hover {
23
+ background: #eef0f3;
24
+ }
25
+
26
+ .table.table-scroll {
27
+ display: block;
28
+ overflow-x: auto;
29
+ padding-bottom: .75rem;
30
+ white-space: nowrap;
31
+ }
32
+
33
+ .table td,
34
+ .table th {
35
+ border-bottom: .05rem solid #dadee4;
36
+ padding: .6rem .4rem;
37
+ }
38
+
39
+ .table th {
40
+ border-bottom-width: .1rem;
41
+ }
42
+
43
+ .btn {
44
+ -webkit-appearance: none;
45
+ -moz-appearance: none;
46
+ appearance: none;
47
+ background: #fff;
48
+ border: .05rem solid #5755d9;
49
+ border-radius: .1rem;
50
+ color: #5755d9;
51
+ cursor: pointer;
52
+ display: inline-block;
53
+ font-size: .8rem;
54
+ height: 1.8rem;
55
+ line-height: 1.2rem;
56
+ outline: none;
57
+ padding: .25rem .4rem;
58
+ text-align: center;
59
+ text-decoration: none;
60
+ transition: background .2s, border .2s, box-shadow .2s, color .2s;
61
+ -webkit-user-select: none;
62
+ -moz-user-select: none;
63
+ -ms-user-select: none;
64
+ user-select: none;
65
+ vertical-align: middle;
66
+ white-space: nowrap;
67
+ }
68
+
69
+ .btn:focus {
70
+ box-shadow: 0 0 0 .1rem rgba(87, 85, 217, .2);
71
+ }
72
+
73
+ .btn:focus,
74
+ .btn:hover {
75
+ background: #f1f1fc;
76
+ border-color: #4b48d6;
77
+ text-decoration: none;
78
+ }
79
+
80
+ .btn:active,
81
+ .btn.active {
82
+ background: #4b48d6;
83
+ border-color: #3634d2;
84
+ color: #fff;
85
+ text-decoration: none;
86
+ }
87
+
88
+ .btn:active.loading::after,
89
+ .btn.active.loading::after {
90
+ border-bottom-color: #fff;
91
+ border-left-color: #fff;
92
+ }
93
+
94
+ .btn[disabled],
95
+ .btn:disabled,
96
+ .btn.disabled {
97
+ cursor: default;
98
+ opacity: .5;
99
+ pointer-events: none;
100
+ }
101
+
102
+ .btn.btn-primary {
103
+ background: #5755d9;
104
+ border-color: #4b48d6;
105
+ color: #fff;
106
+ }
107
+
108
+ .btn.btn-primary:focus,
109
+ .btn.btn-primary:hover {
110
+ background: #4240d4;
111
+ border-color: #3634d2;
112
+ color: #fff;
113
+ }
114
+
115
+ .btn.btn-primary:active,
116
+ .btn.btn-primary.active {
117
+ background: #3a38d2;
118
+ border-color: #302ecd;
119
+ color: #fff;
120
+ }
121
+
122
+ .btn.btn-primary.loading::after {
123
+ border-bottom-color: #fff;
124
+ border-left-color: #fff;
125
+ }
126
+
127
+ .btn.btn-success {
128
+ background: #32b643;
129
+ border-color: #2faa3f;
130
+ color: #fff;
131
+ }
132
+
133
+ .btn.btn-success:focus {
134
+ box-shadow: 0 0 0 .1rem rgba(50, 182, 67, .2);
135
+ }
136
+
137
+ .btn.btn-success:focus,
138
+ .btn.btn-success:hover {
139
+ background: #30ae40;
140
+ border-color: #2da23c;
141
+ color: #fff;
142
+ }
143
+
144
+ .btn.btn-success:active,
145
+ .btn.btn-success.active {
146
+ background: #2a9a39;
147
+ border-color: #278e34;
148
+ color: #fff;
149
+ }
150
+
151
+ .btn.btn-success.loading::after {
152
+ border-bottom-color: #fff;
153
+ border-left-color: #fff;
154
+ }
155
+
156
+ .btn.btn-error {
157
+ background: #e85600;
158
+ border-color: #d95000;
159
+ color: #fff;
160
+ }
161
+
162
+ .btn.btn-error:focus {
163
+ box-shadow: 0 0 0 .1rem rgba(232, 86, 0, .2);
164
+ }
165
+
166
+ .btn.btn-error:focus,
167
+ .btn.btn-error:hover {
168
+ background: #de5200;
169
+ border-color: #cf4d00;
170
+ color: #fff;
171
+ }
172
+
173
+ .btn.btn-error:active,
174
+ .btn.btn-error.active {
175
+ background: #c44900;
176
+ border-color: #b54300;
177
+ color: #fff;
178
+ }
179
+
180
+ .btn.btn-error.loading::after {
181
+ border-bottom-color: #fff;
182
+ border-left-color: #fff;
183
+ }
184
+
185
+ .btn.btn-link {
186
+ background: transparent;
187
+ border-color: transparent;
188
+ color: #5755d9;
189
+ }
190
+
191
+ .btn.btn-link:focus,
192
+ .btn.btn-link:hover,
193
+ .btn.btn-link:active,
194
+ .btn.btn-link.active {
195
+ color: #302ecd;
196
+ }
197
+
198
+ .btn.btn-sm {
199
+ font-size: .7rem;
200
+ height: 1.4rem;
201
+ padding: .05rem .3rem;
202
+ }
203
+
204
+ .btn.btn-lg {
205
+ font-size: .9rem;
206
+ height: 2rem;
207
+ padding: .35rem .6rem;
208
+ }
209
+
210
+ .btn.btn-block {
211
+ display: block;
212
+ width: 100%;
213
+ }
214
+
215
+ .btn.btn-action {
216
+ padding-left: 0;
217
+ padding-right: 0;
218
+ width: 1.8rem;
219
+ }
220
+
221
+ .btn.btn-action.btn-sm {
222
+ width: 1.4rem;
223
+ }
224
+
225
+ .btn.btn-action.btn-lg {
226
+ width: 2rem;
227
+ }
228
+
229
+ .btn.btn-clear {
230
+ background: transparent;
231
+ border: 0;
232
+ color: currentColor;
233
+ height: 1rem;
234
+ line-height: .8rem;
235
+ margin-left: .2rem;
236
+ margin-right: -2px;
237
+ opacity: 1;
238
+ padding: .1rem;
239
+ text-decoration: none;
240
+ width: 1rem;
241
+ }
242
+
243
+ .btn.btn-clear:focus,
244
+ .btn.btn-clear:hover {
245
+ background: rgba(247, 248, 249, .5);
246
+ opacity: .95;
247
+ }
248
+
249
+ .btn.btn-clear::before {
250
+ content: "\2715";
251
+ }
252
+
253
+ .btn-group {
254
+ display: -ms-inline-flexbox;
255
+ display: inline-flex;
256
+ -ms-flex-wrap: wrap;
257
+ flex-wrap: wrap;
258
+ }
259
+
260
+ .btn-group .btn {
261
+ -ms-flex: 1 0 auto;
262
+ flex: 1 0 auto;
263
+ }
264
+
265
+ .btn-group .btn:first-child:not(:last-child) {
266
+ border-bottom-right-radius: 0;
267
+ border-top-right-radius: 0;
268
+ }
269
+
270
+ .btn-group .btn:not(:first-child):not(:last-child) {
271
+ border-radius: 0;
272
+ margin-left: -.05rem;
273
+ }
274
+
275
+ .btn-group .btn:last-child:not(:first-child) {
276
+ border-bottom-left-radius: 0;
277
+ border-top-left-radius: 0;
278
+ margin-left: -.05rem;
279
+ }
280
+
281
+ .btn-group .btn:focus,
282
+ .btn-group .btn:hover,
283
+ .btn-group .btn:active,
284
+ .btn-group .btn.active {
285
+ z-index: 1;
286
+ }
287
+
288
+ .btn-group.btn-group-block {
289
+ display: -ms-flexbox;
290
+ display: flex;
291
+ }
292
+
293
+ .btn-group.btn-group-block .btn {
294
+ -ms-flex: 1 0 0;
295
+ flex: 1 0 0;
296
+ }
297
+
298
+ .form-group:not(:last-child) {
299
+ margin-bottom: .4rem;
300
+ }
301
+
302
+ fieldset {
303
+ margin-bottom: .8rem;
304
+ }
305
+
306
+ legend {
307
+ font-size: .9rem;
308
+ font-weight: 500;
309
+ margin-bottom: .8rem;
310
+ }
311
+
312
+ .form-label {
313
+ display: block;
314
+ line-height: 1.2rem;
315
+ padding: .3rem 0;
316
+ }
317
+
318
+ .form-label.label-sm {
319
+ font-size: .7rem;
320
+ padding: .1rem 0;
321
+ }
322
+
323
+ .form-label.label-lg {
324
+ font-size: .9rem;
325
+ padding: .4rem 0;
326
+ }
327
+
328
+ .form-input {
329
+ -webkit-appearance: none;
330
+ -moz-appearance: none;
331
+ appearance: none;
332
+ background: #fff;
333
+ background-image: none;
334
+ border: .05rem solid #bcc3ce;
335
+ border-radius: .1rem;
336
+ color: #3b4351;
337
+ display: block;
338
+ font-size: .8rem;
339
+ height: 1.8rem;
340
+ line-height: 1.2rem;
341
+ max-width: 100%;
342
+ outline: none;
343
+ padding: .25rem .4rem;
344
+ position: relative;
345
+ transition: background .2s, border .2s, box-shadow .2s, color .2s;
346
+ width: 100%;
347
+ }
348
+
349
+ .form-input:focus {
350
+ border-color: #5755d9;
351
+ box-shadow: 0 0 0 .1rem rgba(87, 85, 217, .2);
352
+ }
353
+
354
+ .form-input:-ms-input-placeholder {
355
+ color: #bcc3ce;
356
+ }
357
+
358
+ .form-input::-ms-input-placeholder {
359
+ color: #bcc3ce;
360
+ }
361
+
362
+ .form-input::placeholder {
363
+ color: #bcc3ce;
364
+ }
365
+
366
+ .form-input.input-sm {
367
+ font-size: .7rem;
368
+ height: 1.4rem;
369
+ padding: .05rem .3rem;
370
+ }
371
+
372
+ .form-input.input-lg {
373
+ font-size: .9rem;
374
+ height: 2rem;
375
+ padding: .35rem .6rem;
376
+ }
377
+
378
+ .form-input.input-inline {
379
+ display: inline-block;
380
+ vertical-align: middle;
381
+ width: auto;
382
+ }
383
+
384
+ .form-input[type="file"] {
385
+ height: auto;
386
+ }
387
+
388
+ textarea.form-input,
389
+ textarea.form-input.input-lg,
390
+ textarea.form-input.input-sm {
391
+ height: auto;
392
+ }
393
+
394
+ .form-input-hint {
395
+ color: #bcc3ce;
396
+ font-size: .7rem;
397
+ margin-top: .2rem;
398
+ }
399
+
400
+ .has-success .form-input-hint,
401
+ .is-success + .form-input-hint {
402
+ color: #32b643;
403
+ }
404
+
405
+ .has-error .form-input-hint,
406
+ .is-error + .form-input-hint {
407
+ color: #e85600;
408
+ }
409
+
410
+ .form-select {
411
+ -webkit-appearance: none;
412
+ -moz-appearance: none;
413
+ appearance: none;
414
+ background: #fff;
415
+ border: .05rem solid #bcc3ce;
416
+ border-radius: .1rem;
417
+ color: inherit;
418
+ font-size: .8rem;
419
+ height: 1.8rem;
420
+ line-height: 1.2rem;
421
+ outline: none;
422
+ padding: .25rem .4rem;
423
+ vertical-align: middle;
424
+ width: 100%;
425
+ }
426
+
427
+ .form-select:focus {
428
+ border-color: #5755d9;
429
+ box-shadow: 0 0 0 .1rem rgba(87, 85, 217, .2);
430
+ }
431
+
432
+ .form-select::-ms-expand {
433
+ display: none;
434
+ }
435
+
436
+ .form-select.select-sm {
437
+ font-size: .7rem;
438
+ height: 1.4rem;
439
+ padding: .05rem 1.1rem .05rem .3rem;
440
+ }
441
+
442
+ .form-select.select-lg {
443
+ font-size: .9rem;
444
+ height: 2rem;
445
+ padding: .35rem 1.4rem .35rem .6rem;
446
+ }
447
+
448
+ .form-select[size],
449
+ .form-select[multiple] {
450
+ height: auto;
451
+ padding: .25rem .4rem;
452
+ }
453
+
454
+ .form-select[size] option,
455
+ .form-select[multiple] option {
456
+ padding: .1rem .2rem;
457
+ }
458
+
459
+ .form-select:not([multiple]):not([size]) {
460
+ background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%204%205'%3E%3Cpath%20fill='%23667189'%20d='M2%200L0%202h4zm0%205L0%203h4z'/%3E%3C/svg%3E") no-repeat right .35rem center/.4rem .5rem;
461
+ padding-right: 1.2rem;
462
+ }
463
+
464
+ .has-icon-left,
465
+ .has-icon-right {
466
+ position: relative;
467
+ }
468
+
469
+ .has-icon-left .form-icon,
470
+ .has-icon-right .form-icon {
471
+ height: .8rem;
472
+ margin: 0 .25rem;
473
+ position: absolute;
474
+ top: 50%;
475
+ transform: translateY(-50%);
476
+ width: .8rem;
477
+ z-index: 2;
478
+ }
479
+
480
+ .has-icon-left .form-icon {
481
+ left: .05rem;
482
+ }
483
+
484
+ .has-icon-left .form-input {
485
+ padding-left: 1.3rem;
486
+ }
487
+
488
+ .has-icon-right .form-icon {
489
+ right: .05rem;
490
+ }
491
+
492
+ .has-icon-right .form-input {
493
+ padding-right: 1.3rem;
494
+ }
495
+
496
+ .form-checkbox,
497
+ .form-radio,
498
+ .form-switch {
499
+ display: block;
500
+ line-height: 1.2rem;
501
+ margin: .2rem 0;
502
+ min-height: 1.4rem;
503
+ padding: .1rem .4rem .1rem 1.2rem;
504
+ position: relative;
505
+ }
506
+
507
+ .form-checkbox input,
508
+ .form-radio input,
509
+ .form-switch input {
510
+ clip: rect(0, 0, 0, 0);
511
+ height: 1px;
512
+ margin: -1px;
513
+ overflow: hidden;
514
+ position: absolute;
515
+ width: 1px;
516
+ }
517
+
518
+ .form-checkbox input:focus + .form-icon,
519
+ .form-radio input:focus + .form-icon,
520
+ .form-switch input:focus + .form-icon {
521
+ border-color: #5755d9;
522
+ box-shadow: 0 0 0 .1rem rgba(87, 85, 217, .2);
523
+ }
524
+
525
+ .form-checkbox input:checked + .form-icon,
526
+ .form-radio input:checked + .form-icon,
527
+ .form-switch input:checked + .form-icon {
528
+ background: #5755d9;
529
+ border-color: #5755d9;
530
+ }
531
+
532
+ .form-checkbox .form-icon,
533
+ .form-radio .form-icon,
534
+ .form-switch .form-icon {
535
+ border: .05rem solid #bcc3ce;
536
+ cursor: pointer;
537
+ display: inline-block;
538
+ position: absolute;
539
+ transition: background .2s, border .2s, box-shadow .2s, color .2s;
540
+ }
541
+
542
+ .form-checkbox.input-sm,
543
+ .form-radio.input-sm,
544
+ .form-switch.input-sm {
545
+ font-size: .7rem;
546
+ margin: 0;
547
+ }
548
+
549
+ .form-checkbox.input-lg,
550
+ .form-radio.input-lg,
551
+ .form-switch.input-lg {
552
+ font-size: .9rem;
553
+ margin: .3rem 0;
554
+ }
555
+
556
+ .form-checkbox .form-icon,
557
+ .form-radio .form-icon {
558
+ background: #fff;
559
+ height: 1rem;
560
+ left: 0;
561
+ top: .3rem;
562
+ width: 1rem;
563
+ }
564
+
565
+ .form-checkbox input:active + .form-icon,
566
+ .form-radio input:active + .form-icon {
567
+ background: #eef0f3;
568
+ }
569
+
570
+ .form-checkbox .form-icon {
571
+ border-radius: .1rem;
572
+ }
573
+
574
+ .form-checkbox input:checked + .form-icon::before {
575
+ background-clip: padding-box;
576
+ border: .1rem solid #fff;
577
+ border-left-width: 0;
578
+ border-top-width: 0;
579
+ content: "";
580
+ height: 9px;
581
+ left: 50%;
582
+ margin-left: -3px;
583
+ margin-top: -6px;
584
+ position: absolute;
585
+ top: 50%;
586
+ transform: rotate(45deg);
587
+ width: 6px;
588
+ }
589
+
590
+ .form-checkbox input:indeterminate + .form-icon {
591
+ background: #5755d9;
592
+ border-color: #5755d9;
593
+ }
594
+
595
+ .form-checkbox input:indeterminate + .form-icon::before {
596
+ background: #fff;
597
+ content: "";
598
+ height: 2px;
599
+ left: 50%;
600
+ margin-left: -5px;
601
+ margin-top: -1px;
602
+ position: absolute;
603
+ top: 50%;
604
+ width: 10px;
605
+ }
606
+
607
+ .form-radio .form-icon {
608
+ border-radius: 50%;
609
+ }
610
+
611
+ .form-radio input:checked + .form-icon::before {
612
+ background: #fff;
613
+ border-radius: 50%;
614
+ content: "";
615
+ height: 6px;
616
+ left: 50%;
617
+ position: absolute;
618
+ top: 50%;
619
+ transform: translate(-50%, -50%);
620
+ width: 6px;
621
+ }
622
+
623
+ .form-switch {
624
+ padding-left: 2rem;
625
+ }
626
+
627
+ .form-switch .form-icon {
628
+ background: #bcc3ce;
629
+ background-clip: padding-box;
630
+ border-radius: .45rem;
631
+ height: .9rem;
632
+ left: 0;
633
+ top: .25rem;
634
+ width: 1.6rem;
635
+ }
636
+
637
+ .form-switch .form-icon::before {
638
+ background: #fff;
639
+ border-radius: 50%;
640
+ content: "";
641
+ display: block;
642
+ height: .8rem;
643
+ left: 0;
644
+ position: absolute;
645
+ top: 0;
646
+ transition: background .2s, border .2s, box-shadow .2s, color .2s, left .2s;
647
+ width: .8rem;
648
+ }
649
+
650
+ .form-switch input:checked + .form-icon::before {
651
+ left: 14px;
652
+ }
653
+
654
+ .form-switch input:active + .form-icon::before {
655
+ background: #f7f8f9;
656
+ }
657
+
658
+ .input-group {
659
+ display: -ms-flexbox;
660
+ display: flex;
661
+ }
662
+
663
+ .input-group .input-group-addon {
664
+ background: #f7f8f9;
665
+ border: .05rem solid #bcc3ce;
666
+ border-radius: .1rem;
667
+ line-height: 1.2rem;
668
+ padding: .25rem .4rem;
669
+ white-space: nowrap;
670
+ }
671
+
672
+ .input-group .input-group-addon.addon-sm {
673
+ font-size: .7rem;
674
+ padding: .05rem .3rem;
675
+ }
676
+
677
+ .input-group .input-group-addon.addon-lg {
678
+ font-size: .9rem;
679
+ padding: .35rem .6rem;
680
+ }
681
+
682
+ .input-group .form-input,
683
+ .input-group .form-select {
684
+ -ms-flex: 1 1 auto;
685
+ flex: 1 1 auto;
686
+ width: 1%;
687
+ }
688
+
689
+ .input-group .input-group-btn {
690
+ z-index: 1;
691
+ }
692
+
693
+ .input-group .form-input:first-child:not(:last-child),
694
+ .input-group .form-select:first-child:not(:last-child),
695
+ .input-group .input-group-addon:first-child:not(:last-child),
696
+ .input-group .input-group-btn:first-child:not(:last-child) {
697
+ border-bottom-right-radius: 0;
698
+ border-top-right-radius: 0;
699
+ }
700
+
701
+ .input-group .form-input:not(:first-child):not(:last-child),
702
+ .input-group .form-select:not(:first-child):not(:last-child),
703
+ .input-group .input-group-addon:not(:first-child):not(:last-child),
704
+ .input-group .input-group-btn:not(:first-child):not(:last-child) {
705
+ border-radius: 0;
706
+ margin-left: -.05rem;
707
+ }
708
+
709
+ .input-group .form-input:last-child:not(:first-child),
710
+ .input-group .form-select:last-child:not(:first-child),
711
+ .input-group .input-group-addon:last-child:not(:first-child),
712
+ .input-group .input-group-btn:last-child:not(:first-child) {
713
+ border-bottom-left-radius: 0;
714
+ border-top-left-radius: 0;
715
+ margin-left: -.05rem;
716
+ }
717
+
718
+ .input-group .form-input:focus,
719
+ .input-group .form-select:focus,
720
+ .input-group .input-group-addon:focus,
721
+ .input-group .input-group-btn:focus {
722
+ z-index: 2;
723
+ }
724
+
725
+ .input-group .form-select {
726
+ width: auto;
727
+ }
728
+
729
+ .input-group.input-inline {
730
+ display: -ms-inline-flexbox;
731
+ display: inline-flex;
732
+ }
733
+
734
+ .has-success .form-input,
735
+ .form-input.is-success,
736
+ .has-success .form-select,
737
+ .form-select.is-success {
738
+ background: #f9fdfa;
739
+ border-color: #32b643;
740
+ }
741
+
742
+ .has-success .form-input:focus,
743
+ .form-input.is-success:focus,
744
+ .has-success .form-select:focus,
745
+ .form-select.is-success:focus {
746
+ box-shadow: 0 0 0 .1rem rgba(50, 182, 67, .2);
747
+ }
748
+
749
+ .has-error .form-input,
750
+ .form-input.is-error,
751
+ .has-error .form-select,
752
+ .form-select.is-error {
753
+ background: #fffaf7;
754
+ border-color: #e85600;
755
+ }
756
+
757
+ .has-error .form-input:focus,
758
+ .form-input.is-error:focus,
759
+ .has-error .form-select:focus,
760
+ .form-select.is-error:focus {
761
+ box-shadow: 0 0 0 .1rem rgba(232, 86, 0, .2);
762
+ }
763
+
764
+ .has-error .form-checkbox .form-icon,
765
+ .form-checkbox.is-error .form-icon,
766
+ .has-error .form-radio .form-icon,
767
+ .form-radio.is-error .form-icon,
768
+ .has-error .form-switch .form-icon,
769
+ .form-switch.is-error .form-icon {
770
+ border-color: #e85600;
771
+ }
772
+
773
+ .has-error .form-checkbox input:checked + .form-icon,
774
+ .form-checkbox.is-error input:checked + .form-icon,
775
+ .has-error .form-radio input:checked + .form-icon,
776
+ .form-radio.is-error input:checked + .form-icon,
777
+ .has-error .form-switch input:checked + .form-icon,
778
+ .form-switch.is-error input:checked + .form-icon {
779
+ background: #e85600;
780
+ border-color: #e85600;
781
+ }
782
+
783
+ .has-error .form-checkbox input:focus + .form-icon,
784
+ .form-checkbox.is-error input:focus + .form-icon,
785
+ .has-error .form-radio input:focus + .form-icon,
786
+ .form-radio.is-error input:focus + .form-icon,
787
+ .has-error .form-switch input:focus + .form-icon,
788
+ .form-switch.is-error input:focus + .form-icon {
789
+ border-color: #e85600;
790
+ box-shadow: 0 0 0 .1rem rgba(232, 86, 0, .2);
791
+ }
792
+
793
+ .has-error .form-checkbox input:indeterminate + .form-icon,
794
+ .form-checkbox.is-error input:indeterminate + .form-icon {
795
+ background: #e85600;
796
+ border-color: #e85600;
797
+ }
798
+
799
+ .form-input:not(:-ms-input-placeholder):invalid {
800
+ border-color: #e85600;
801
+ }
802
+
803
+ .form-input:not(:placeholder-shown):invalid {
804
+ border-color: #e85600;
805
+ }
806
+
807
+ .form-input:not(:-ms-input-placeholder):invalid:focus {
808
+ background: #fffaf7;
809
+ box-shadow: 0 0 0 .1rem rgba(232, 86, 0, .2);
810
+ }
811
+
812
+ .form-input:not(:placeholder-shown):invalid:focus {
813
+ background: #fffaf7;
814
+ box-shadow: 0 0 0 .1rem rgba(232, 86, 0, .2);
815
+ }
816
+
817
+ .form-input:not(:-ms-input-placeholder):invalid + .form-input-hint {
818
+ color: #e85600;
819
+ }
820
+
821
+ .form-input:not(:placeholder-shown):invalid + .form-input-hint {
822
+ color: #e85600;
823
+ }
824
+
825
+ .form-input:disabled,
826
+ .form-input.disabled,
827
+ .form-select:disabled,
828
+ .form-select.disabled {
829
+ background-color: #eef0f3;
830
+ cursor: not-allowed;
831
+ opacity: .5;
832
+ }
833
+
834
+ .form-input[readonly] {
835
+ background-color: #f7f8f9;
836
+ }
837
+
838
+ input:disabled + .form-icon,
839
+ input.disabled + .form-icon {
840
+ background: #eef0f3;
841
+ cursor: not-allowed;
842
+ opacity: .5;
843
+ }
844
+
845
+ .form-switch input:disabled + .form-icon::before,
846
+ .form-switch input.disabled + .form-icon::before {
847
+ background: #fff;
848
+ }
849
+
850
+ .form-horizontal {
851
+ padding: .4rem 0;
852
+ }
853
+
854
+ .form-horizontal .form-group {
855
+ display: -ms-flexbox;
856
+ display: flex;
857
+ -ms-flex-wrap: wrap;
858
+ flex-wrap: wrap;
859
+ }
860
+
861
+ .form-inline {
862
+ display: inline-block;
863
+ }
864
+
865
+ .label {
866
+ background: #eef0f3;
867
+ border-radius: .1rem;
868
+ color: #455060;
869
+ display: inline-block;
870
+ line-height: 1.25;
871
+ padding: .1rem .2rem;
872
+ }
873
+
874
+ .label.label-rounded {
875
+ border-radius: 5rem;
876
+ padding-left: .4rem;
877
+ padding-right: .4rem;
878
+ }
879
+
880
+ .label.label-primary {
881
+ background: #5755d9;
882
+ color: #fff;
883
+ }
884
+
885
+ .label.label-secondary {
886
+ background: #f1f1fc;
887
+ color: #5755d9;
888
+ }
889
+
890
+ .label.label-success {
891
+ background: #32b643;
892
+ color: #fff;
893
+ }
894
+
895
+ .label.label-warning {
896
+ background: #ffb700;
897
+ color: #fff;
898
+ }
899
+
900
+ .label.label-error {
901
+ background: #e85600;
902
+ color: #fff;
903
+ }
904
+
905
+ code {
906
+ background: #fcf2f2;
907
+ border-radius: .1rem;
908
+ color: #d73e48;
909
+ font-size: 85%;
910
+ line-height: 1.25;
911
+ padding: .1rem .2rem;
912
+ }
913
+
914
+ .code {
915
+ border-radius: .1rem;
916
+ color: #3b4351;
917
+ position: relative;
918
+ }
919
+
920
+ .code::before {
921
+ color: #bcc3ce;
922
+ content: attr(data-lang);
923
+ font-size: .7rem;
924
+ position: absolute;
925
+ right: .4rem;
926
+ top: .1rem;
927
+ }
928
+
929
+ .code code {
930
+ background: #f7f8f9;
931
+ color: inherit;
932
+ display: block;
933
+ line-height: 1.5;
934
+ overflow-x: auto;
935
+ padding: 1rem;
936
+ width: 100%;
937
+ }
938
+
939
+ .img-responsive {
940
+ display: block;
941
+ height: auto;
942
+ max-width: 100%;
943
+ }
944
+
945
+ .img-fit-cover {
946
+ object-fit: cover;
947
+ }
948
+
949
+ .img-fit-contain {
950
+ object-fit: contain;
951
+ }
952
+
953
+ .video-responsive {
954
+ display: block;
955
+ overflow: hidden;
956
+ padding: 0;
957
+ position: relative;
958
+ width: 100%;
959
+ }
960
+
961
+ .video-responsive::before {
962
+ content: "";
963
+ display: block;
964
+ padding-bottom: 56.25%;
965
+ }
966
+
967
+ .video-responsive iframe,
968
+ .video-responsive object,
969
+ .video-responsive embed {
970
+ border: 0;
971
+ bottom: 0;
972
+ height: 100%;
973
+ left: 0;
974
+ position: absolute;
975
+ right: 0;
976
+ top: 0;
977
+ width: 100%;
978
+ }
979
+
980
+ video.video-responsive {
981
+ height: auto;
982
+ max-width: 100%;
983
+ }
984
+
985
+ video.video-responsive::before {
986
+ content: none;
987
+ }
988
+
989
+ .video-responsive-4-3::before {
990
+ padding-bottom: 75%;
991
+ }
992
+
993
+ .video-responsive-1-1::before {
994
+ padding-bottom: 100%;
995
+ }
996
+
997
+ .figure {
998
+ margin: 0 0 .4rem 0;
999
+ }
1000
+
1001
+ .figure .figure-caption {
1002
+ color: #66758c;
1003
+ margin-top: .4rem;
1004
+ }
1005
+
1006
+ .container {
1007
+ margin-left: auto;
1008
+ margin-right: auto;
1009
+ padding-left: .4rem;
1010
+ padding-right: .4rem;
1011
+ width: 100%;
1012
+ }
1013
+
1014
+ .container.grid-xl {
1015
+ max-width: 1296px;
1016
+ }
1017
+
1018
+ .container.grid-lg {
1019
+ max-width: 976px;
1020
+ }
1021
+
1022
+ .container.grid-md {
1023
+ max-width: 856px;
1024
+ }
1025
+
1026
+ .container.grid-sm {
1027
+ max-width: 616px;
1028
+ }
1029
+
1030
+ .container.grid-xs {
1031
+ max-width: 496px;
1032
+ }
1033
+
1034
+ .show-xs,
1035
+ .show-sm,
1036
+ .show-md,
1037
+ .show-lg,
1038
+ .show-xl {
1039
+ display: none !important;
1040
+ }
1041
+
1042
+ .cols,
1043
+ .columns {
1044
+ display: -ms-flexbox;
1045
+ display: flex;
1046
+ -ms-flex-wrap: wrap;
1047
+ flex-wrap: wrap;
1048
+ margin-left: -.4rem;
1049
+ margin-right: -.4rem;
1050
+ }
1051
+
1052
+ .cols.col-gapless,
1053
+ .columns.col-gapless {
1054
+ margin-left: 0;
1055
+ margin-right: 0;
1056
+ }
1057
+
1058
+ .cols.col-gapless > .column,
1059
+ .columns.col-gapless > .column {
1060
+ padding-left: 0;
1061
+ padding-right: 0;
1062
+ }
1063
+
1064
+ .cols.col-oneline,
1065
+ .columns.col-oneline {
1066
+ -ms-flex-wrap: nowrap;
1067
+ flex-wrap: nowrap;
1068
+ overflow-x: auto;
1069
+ }
1070
+
1071
+ [class~="col-"],
1072
+ .column {
1073
+ -ms-flex: 1;
1074
+ flex: 1;
1075
+ max-width: 100%;
1076
+ padding-left: .4rem;
1077
+ padding-right: .4rem;
1078
+ }
1079
+
1080
+ [class~="col-"].col-12,
1081
+ [class~="col-"].col-11,
1082
+ [class~="col-"].col-10,
1083
+ [class~="col-"].col-9,
1084
+ [class~="col-"].col-8,
1085
+ [class~="col-"].col-7,
1086
+ [class~="col-"].col-6,
1087
+ [class~="col-"].col-5,
1088
+ [class~="col-"].col-4,
1089
+ [class~="col-"].col-3,
1090
+ [class~="col-"].col-2,
1091
+ [class~="col-"].col-1,
1092
+ [class~="col-"].col-auto,
1093
+ .column.col-12,
1094
+ .column.col-11,
1095
+ .column.col-10,
1096
+ .column.col-9,
1097
+ .column.col-8,
1098
+ .column.col-7,
1099
+ .column.col-6,
1100
+ .column.col-5,
1101
+ .column.col-4,
1102
+ .column.col-3,
1103
+ .column.col-2,
1104
+ .column.col-1,
1105
+ .column.col-auto {
1106
+ -ms-flex: none;
1107
+ flex: none;
1108
+ }
1109
+
1110
+ .col-12 {
1111
+ width: 100%;
1112
+ }
1113
+
1114
+ .col-11 {
1115
+ width: 91.66666667%;
1116
+ }
1117
+
1118
+ .col-10 {
1119
+ width: 83.33333333%;
1120
+ }
1121
+
1122
+ .col-9 {
1123
+ width: 75%;
1124
+ }
1125
+
1126
+ .col-8 {
1127
+ width: 66.66666667%;
1128
+ }
1129
+
1130
+ .col-7 {
1131
+ width: 58.33333333%;
1132
+ }
1133
+
1134
+ .col-6 {
1135
+ width: 50%;
1136
+ }
1137
+
1138
+ .col-5 {
1139
+ width: 41.66666667%;
1140
+ }
1141
+
1142
+ .col-4 {
1143
+ width: 33.33333333%;
1144
+ }
1145
+
1146
+ .col-3 {
1147
+ width: 25%;
1148
+ }
1149
+
1150
+ .col-2 {
1151
+ width: 16.66666667%;
1152
+ }
1153
+
1154
+ .col-1 {
1155
+ width: 8.33333333%;
1156
+ }
1157
+
1158
+ .col-auto {
1159
+ -ms-flex: 0 0 auto;
1160
+ flex: 0 0 auto;
1161
+ max-width: none;
1162
+ width: auto;
1163
+ }
1164
+
1165
+ .col-mx-auto {
1166
+ margin-left: auto;
1167
+ margin-right: auto;
1168
+ }
1169
+
1170
+ .col-ml-auto {
1171
+ margin-left: auto;
1172
+ }
1173
+
1174
+ .col-mr-auto {
1175
+ margin-right: auto;
1176
+ }
1177
+
1178
+ @media (max-width: 1280px) {
1179
+ .col-xl-12,
1180
+ .col-xl-11,
1181
+ .col-xl-10,
1182
+ .col-xl-9,
1183
+ .col-xl-8,
1184
+ .col-xl-7,
1185
+ .col-xl-6,
1186
+ .col-xl-5,
1187
+ .col-xl-4,
1188
+ .col-xl-3,
1189
+ .col-xl-2,
1190
+ .col-xl-1,
1191
+ .col-xl-auto {
1192
+ -ms-flex: none;
1193
+ flex: none;
1194
+ }
1195
+ .col-xl-12 {
1196
+ width: 100%;
1197
+ }
1198
+ .col-xl-11 {
1199
+ width: 91.66666667%;
1200
+ }
1201
+ .col-xl-10 {
1202
+ width: 83.33333333%;
1203
+ }
1204
+ .col-xl-9 {
1205
+ width: 75%;
1206
+ }
1207
+ .col-xl-8 {
1208
+ width: 66.66666667%;
1209
+ }
1210
+ .col-xl-7 {
1211
+ width: 58.33333333%;
1212
+ }
1213
+ .col-xl-6 {
1214
+ width: 50%;
1215
+ }
1216
+ .col-xl-5 {
1217
+ width: 41.66666667%;
1218
+ }
1219
+ .col-xl-4 {
1220
+ width: 33.33333333%;
1221
+ }
1222
+ .col-xl-3 {
1223
+ width: 25%;
1224
+ }
1225
+ .col-xl-2 {
1226
+ width: 16.66666667%;
1227
+ }
1228
+ .col-xl-1 {
1229
+ width: 8.33333333%;
1230
+ }
1231
+ .col-xl-auto {
1232
+ width: auto;
1233
+ }
1234
+ .hide-xl {
1235
+ display: none !important;
1236
+ }
1237
+ .show-xl {
1238
+ display: block !important;
1239
+ }
1240
+ }
1241
+
1242
+ @media (max-width: 960px) {
1243
+ .col-lg-12,
1244
+ .col-lg-11,
1245
+ .col-lg-10,
1246
+ .col-lg-9,
1247
+ .col-lg-8,
1248
+ .col-lg-7,
1249
+ .col-lg-6,
1250
+ .col-lg-5,
1251
+ .col-lg-4,
1252
+ .col-lg-3,
1253
+ .col-lg-2,
1254
+ .col-lg-1,
1255
+ .col-lg-auto {
1256
+ -ms-flex: none;
1257
+ flex: none;
1258
+ }
1259
+ .col-lg-12 {
1260
+ width: 100%;
1261
+ }
1262
+ .col-lg-11 {
1263
+ width: 91.66666667%;
1264
+ }
1265
+ .col-lg-10 {
1266
+ width: 83.33333333%;
1267
+ }
1268
+ .col-lg-9 {
1269
+ width: 75%;
1270
+ }
1271
+ .col-lg-8 {
1272
+ width: 66.66666667%;
1273
+ }
1274
+ .col-lg-7 {
1275
+ width: 58.33333333%;
1276
+ }
1277
+ .col-lg-6 {
1278
+ width: 50%;
1279
+ }
1280
+ .col-lg-5 {
1281
+ width: 41.66666667%;
1282
+ }
1283
+ .col-lg-4 {
1284
+ width: 33.33333333%;
1285
+ }
1286
+ .col-lg-3 {
1287
+ width: 25%;
1288
+ }
1289
+ .col-lg-2 {
1290
+ width: 16.66666667%;
1291
+ }
1292
+ .col-lg-1 {
1293
+ width: 8.33333333%;
1294
+ }
1295
+ .col-lg-auto {
1296
+ width: auto;
1297
+ }
1298
+ .hide-lg {
1299
+ display: none !important;
1300
+ }
1301
+ .show-lg {
1302
+ display: block !important;
1303
+ }
1304
+ }
1305
+
1306
+ @media (max-width: 840px) {
1307
+ .col-md-12,
1308
+ .col-md-11,
1309
+ .col-md-10,
1310
+ .col-md-9,
1311
+ .col-md-8,
1312
+ .col-md-7,
1313
+ .col-md-6,
1314
+ .col-md-5,
1315
+ .col-md-4,
1316
+ .col-md-3,
1317
+ .col-md-2,
1318
+ .col-md-1,
1319
+ .col-md-auto {
1320
+ -ms-flex: none;
1321
+ flex: none;
1322
+ }
1323
+ .col-md-12 {
1324
+ width: 100%;
1325
+ }
1326
+ .col-md-11 {
1327
+ width: 91.66666667%;
1328
+ }
1329
+ .col-md-10 {
1330
+ width: 83.33333333%;
1331
+ }
1332
+ .col-md-9 {
1333
+ width: 75%;
1334
+ }
1335
+ .col-md-8 {
1336
+ width: 66.66666667%;
1337
+ }
1338
+ .col-md-7 {
1339
+ width: 58.33333333%;
1340
+ }
1341
+ .col-md-6 {
1342
+ width: 50%;
1343
+ }
1344
+ .col-md-5 {
1345
+ width: 41.66666667%;
1346
+ }
1347
+ .col-md-4 {
1348
+ width: 33.33333333%;
1349
+ }
1350
+ .col-md-3 {
1351
+ width: 25%;
1352
+ }
1353
+ .col-md-2 {
1354
+ width: 16.66666667%;
1355
+ }
1356
+ .col-md-1 {
1357
+ width: 8.33333333%;
1358
+ }
1359
+ .col-md-auto {
1360
+ width: auto;
1361
+ }
1362
+ .hide-md {
1363
+ display: none !important;
1364
+ }
1365
+ .show-md {
1366
+ display: block !important;
1367
+ }
1368
+ }
1369
+
1370
+ @media (max-width: 600px) {
1371
+ .col-sm-12,
1372
+ .col-sm-11,
1373
+ .col-sm-10,
1374
+ .col-sm-9,
1375
+ .col-sm-8,
1376
+ .col-sm-7,
1377
+ .col-sm-6,
1378
+ .col-sm-5,
1379
+ .col-sm-4,
1380
+ .col-sm-3,
1381
+ .col-sm-2,
1382
+ .col-sm-1,
1383
+ .col-sm-auto {
1384
+ -ms-flex: none;
1385
+ flex: none;
1386
+ }
1387
+ .col-sm-12 {
1388
+ width: 100%;
1389
+ }
1390
+ .col-sm-11 {
1391
+ width: 91.66666667%;
1392
+ }
1393
+ .col-sm-10 {
1394
+ width: 83.33333333%;
1395
+ }
1396
+ .col-sm-9 {
1397
+ width: 75%;
1398
+ }
1399
+ .col-sm-8 {
1400
+ width: 66.66666667%;
1401
+ }
1402
+ .col-sm-7 {
1403
+ width: 58.33333333%;
1404
+ }
1405
+ .col-sm-6 {
1406
+ width: 50%;
1407
+ }
1408
+ .col-sm-5 {
1409
+ width: 41.66666667%;
1410
+ }
1411
+ .col-sm-4 {
1412
+ width: 33.33333333%;
1413
+ }
1414
+ .col-sm-3 {
1415
+ width: 25%;
1416
+ }
1417
+ .col-sm-2 {
1418
+ width: 16.66666667%;
1419
+ }
1420
+ .col-sm-1 {
1421
+ width: 8.33333333%;
1422
+ }
1423
+ .col-sm-auto {
1424
+ width: auto;
1425
+ }
1426
+ .hide-sm {
1427
+ display: none !important;
1428
+ }
1429
+ .show-sm {
1430
+ display: block !important;
1431
+ }
1432
+ }
1433
+
1434
+ @media (max-width: 480px) {
1435
+ .col-xs-12,
1436
+ .col-xs-11,
1437
+ .col-xs-10,
1438
+ .col-xs-9,
1439
+ .col-xs-8,
1440
+ .col-xs-7,
1441
+ .col-xs-6,
1442
+ .col-xs-5,
1443
+ .col-xs-4,
1444
+ .col-xs-3,
1445
+ .col-xs-2,
1446
+ .col-xs-1,
1447
+ .col-xs-auto {
1448
+ -ms-flex: none;
1449
+ flex: none;
1450
+ }
1451
+ .col-xs-12 {
1452
+ width: 100%;
1453
+ }
1454
+ .col-xs-11 {
1455
+ width: 91.66666667%;
1456
+ }
1457
+ .col-xs-10 {
1458
+ width: 83.33333333%;
1459
+ }
1460
+ .col-xs-9 {
1461
+ width: 75%;
1462
+ }
1463
+ .col-xs-8 {
1464
+ width: 66.66666667%;
1465
+ }
1466
+ .col-xs-7 {
1467
+ width: 58.33333333%;
1468
+ }
1469
+ .col-xs-6 {
1470
+ width: 50%;
1471
+ }
1472
+ .col-xs-5 {
1473
+ width: 41.66666667%;
1474
+ }
1475
+ .col-xs-4 {
1476
+ width: 33.33333333%;
1477
+ }
1478
+ .col-xs-3 {
1479
+ width: 25%;
1480
+ }
1481
+ .col-xs-2 {
1482
+ width: 16.66666667%;
1483
+ }
1484
+ .col-xs-1 {
1485
+ width: 8.33333333%;
1486
+ }
1487
+ .col-xs-auto {
1488
+ width: auto;
1489
+ }
1490
+ .hide-xs {
1491
+ display: none !important;
1492
+ }
1493
+ .show-xs {
1494
+ display: block !important;
1495
+ }
1496
+ }
1497
+
1498
+ .hero {
1499
+ display: -ms-flexbox;
1500
+ display: flex;
1501
+ -ms-flex-direction: column;
1502
+ flex-direction: column;
1503
+ -ms-flex-pack: justify;
1504
+ justify-content: space-between;
1505
+ padding-bottom: 4rem;
1506
+ padding-top: 4rem;
1507
+ }
1508
+
1509
+ .hero.hero-sm {
1510
+ padding-bottom: 2rem;
1511
+ padding-top: 2rem;
1512
+ }
1513
+
1514
+ .hero.hero-lg {
1515
+ padding-bottom: 8rem;
1516
+ padding-top: 8rem;
1517
+ }
1518
+
1519
+ .hero .hero-body {
1520
+ padding: .4rem;
1521
+ }
1522
+
1523
+ .navbar {
1524
+ align-items: stretch;
1525
+ display: -ms-flexbox;
1526
+ display: flex;
1527
+ -ms-flex-align: stretch;
1528
+ -ms-flex-pack: justify;
1529
+ -ms-flex-wrap: wrap;
1530
+ flex-wrap: wrap;
1531
+ justify-content: space-between;
1532
+ }
1533
+
1534
+ .navbar .navbar-section {
1535
+ align-items: center;
1536
+ display: -ms-flexbox;
1537
+ display: flex;
1538
+ -ms-flex: 1 0 0;
1539
+ flex: 1 0 0;
1540
+ -ms-flex-align: center;
1541
+ }
1542
+
1543
+ .navbar .navbar-section:not(:first-child):last-child {
1544
+ -ms-flex-pack: end;
1545
+ justify-content: flex-end;
1546
+ }
1547
+
1548
+ .navbar .navbar-center {
1549
+ align-items: center;
1550
+ display: -ms-flexbox;
1551
+ display: flex;
1552
+ -ms-flex: 0 0 auto;
1553
+ flex: 0 0 auto;
1554
+ -ms-flex-align: center;
1555
+ }
1556
+
1557
+ .navbar .navbar-brand {
1558
+ font-size: .9rem;
1559
+ text-decoration: none;
1560
+ }
1561
+
1562
+ .accordion input:checked ~ .accordion-header > .icon:first-child,
1563
+ .accordion[open] .accordion-header > .icon:first-child {
1564
+ transform: rotate(90deg);
1565
+ }
1566
+
1567
+ .accordion input:checked ~ .accordion-body,
1568
+ .accordion[open] .accordion-body {
1569
+ max-height: 50rem;
1570
+ }
1571
+
1572
+ .accordion .accordion-header {
1573
+ display: block;
1574
+ padding: .2rem .4rem;
1575
+ }
1576
+
1577
+ .accordion .accordion-header .icon {
1578
+ transition: transform .25s;
1579
+ }
1580
+
1581
+ .accordion .accordion-body {
1582
+ margin-bottom: .4rem;
1583
+ max-height: 0;
1584
+ overflow: hidden;
1585
+ transition: max-height .25s;
1586
+ }
1587
+
1588
+ summary.accordion-header::-webkit-details-marker {
1589
+ display: none;
1590
+ }
1591
+
1592
+ .avatar {
1593
+ background: #5755d9;
1594
+ border-radius: 50%;
1595
+ color: rgba(255, 255, 255, .85);
1596
+ display: inline-block;
1597
+ font-size: .8rem;
1598
+ font-weight: 300;
1599
+ height: 1.6rem;
1600
+ line-height: 1.25;
1601
+ margin: 0;
1602
+ position: relative;
1603
+ vertical-align: middle;
1604
+ width: 1.6rem;
1605
+ }
1606
+
1607
+ .avatar.avatar-xs {
1608
+ font-size: .4rem;
1609
+ height: .8rem;
1610
+ width: .8rem;
1611
+ }
1612
+
1613
+ .avatar.avatar-sm {
1614
+ font-size: .6rem;
1615
+ height: 1.2rem;
1616
+ width: 1.2rem;
1617
+ }
1618
+
1619
+ .avatar.avatar-lg {
1620
+ font-size: 1.2rem;
1621
+ height: 2.4rem;
1622
+ width: 2.4rem;
1623
+ }
1624
+
1625
+ .avatar.avatar-xl {
1626
+ font-size: 1.6rem;
1627
+ height: 3.2rem;
1628
+ width: 3.2rem;
1629
+ }
1630
+
1631
+ .avatar img {
1632
+ border-radius: 50%;
1633
+ height: 100%;
1634
+ position: relative;
1635
+ width: 100%;
1636
+ z-index: 1;
1637
+ }
1638
+
1639
+ .avatar .avatar-icon,
1640
+ .avatar .avatar-presence {
1641
+ background: #fff;
1642
+ bottom: 14.64%;
1643
+ height: 50%;
1644
+ padding: .1rem;
1645
+ position: absolute;
1646
+ right: 14.64%;
1647
+ transform: translate(50%, 50%);
1648
+ width: 50%;
1649
+ z-index: 2;
1650
+ }
1651
+
1652
+ .avatar .avatar-presence {
1653
+ background: #bcc3ce;
1654
+ border-radius: 50%;
1655
+ box-shadow: 0 0 0 .1rem #fff;
1656
+ height: .5em;
1657
+ width: .5em;
1658
+ }
1659
+
1660
+ .avatar .avatar-presence.online {
1661
+ background: #32b643;
1662
+ }
1663
+
1664
+ .avatar .avatar-presence.busy {
1665
+ background: #e85600;
1666
+ }
1667
+
1668
+ .avatar .avatar-presence.away {
1669
+ background: #ffb700;
1670
+ }
1671
+
1672
+ .avatar[data-initial]::before {
1673
+ color: currentColor;
1674
+ content: attr(data-initial);
1675
+ left: 50%;
1676
+ position: absolute;
1677
+ top: 50%;
1678
+ transform: translate(-50%, -50%);
1679
+ z-index: 1;
1680
+ }
1681
+
1682
+ .badge {
1683
+ position: relative;
1684
+ white-space: nowrap;
1685
+ }
1686
+
1687
+ .badge[data-badge]::after,
1688
+ .badge:not([data-badge])::after {
1689
+ background: #5755d9;
1690
+ background-clip: padding-box;
1691
+ border-radius: .5rem;
1692
+ box-shadow: 0 0 0 .1rem #fff;
1693
+ color: #fff;
1694
+ content: attr(data-badge);
1695
+ display: inline-block;
1696
+ transform: translate(-.05rem, -.5rem);
1697
+ }
1698
+
1699
+ .badge[data-badge]::after {
1700
+ font-size: .7rem;
1701
+ height: .9rem;
1702
+ line-height: 1;
1703
+ min-width: .9rem;
1704
+ padding: .1rem .2rem;
1705
+ text-align: center;
1706
+ white-space: nowrap;
1707
+ }
1708
+
1709
+ .badge:not([data-badge])::after,
1710
+ .badge[data-badge=""]::after {
1711
+ height: 6px;
1712
+ min-width: 6px;
1713
+ padding: 0;
1714
+ width: 6px;
1715
+ }
1716
+
1717
+ .badge.btn::after {
1718
+ position: absolute;
1719
+ right: 0;
1720
+ top: 0;
1721
+ transform: translate(50%, -50%);
1722
+ }
1723
+
1724
+ .badge.avatar::after {
1725
+ position: absolute;
1726
+ right: 14.64%;
1727
+ top: 14.64%;
1728
+ transform: translate(50%, -50%);
1729
+ z-index: 100;
1730
+ }
1731
+
1732
+ .breadcrumb {
1733
+ list-style: none;
1734
+ margin: .2rem 0;
1735
+ padding: .2rem 0;
1736
+ }
1737
+
1738
+ .breadcrumb .breadcrumb-item {
1739
+ color: #66758c;
1740
+ display: inline-block;
1741
+ margin: 0;
1742
+ padding: .2rem 0;
1743
+ }
1744
+
1745
+ .breadcrumb .breadcrumb-item:not(:last-child) {
1746
+ margin-right: .2rem;
1747
+ }
1748
+
1749
+ .breadcrumb .breadcrumb-item:not(:last-child) a {
1750
+ color: #66758c;
1751
+ }
1752
+
1753
+ .breadcrumb .breadcrumb-item:not(:first-child)::before {
1754
+ color: #66758c;
1755
+ content: "/";
1756
+ padding-right: .4rem;
1757
+ }
1758
+
1759
+ .bar {
1760
+ background: #eef0f3;
1761
+ border-radius: .1rem;
1762
+ display: -ms-flexbox;
1763
+ display: flex;
1764
+ -ms-flex-wrap: nowrap;
1765
+ flex-wrap: nowrap;
1766
+ height: .8rem;
1767
+ width: 100%;
1768
+ }
1769
+
1770
+ .bar.bar-sm {
1771
+ height: .2rem;
1772
+ }
1773
+
1774
+ .bar .bar-item {
1775
+ background: #5755d9;
1776
+ color: #fff;
1777
+ display: block;
1778
+ -ms-flex-negative: 0;
1779
+ flex-shrink: 0;
1780
+ font-size: .7rem;
1781
+ height: 100%;
1782
+ line-height: .8rem;
1783
+ position: relative;
1784
+ text-align: center;
1785
+ width: 0;
1786
+ }
1787
+
1788
+ .bar .bar-item:first-child {
1789
+ border-bottom-left-radius: .1rem;
1790
+ border-top-left-radius: .1rem;
1791
+ }
1792
+
1793
+ .bar .bar-item:last-child {
1794
+ border-bottom-right-radius: .1rem;
1795
+ border-top-right-radius: .1rem;
1796
+ -ms-flex-negative: 1;
1797
+ flex-shrink: 1;
1798
+ }
1799
+
1800
+ .bar-slider {
1801
+ height: .1rem;
1802
+ margin: .4rem 0;
1803
+ position: relative;
1804
+ }
1805
+
1806
+ .bar-slider .bar-item {
1807
+ left: 0;
1808
+ padding: 0;
1809
+ position: absolute;
1810
+ }
1811
+
1812
+ .bar-slider .bar-item:not(:last-child):first-child {
1813
+ background: #eef0f3;
1814
+ z-index: 1;
1815
+ }
1816
+
1817
+ .bar-slider .bar-slider-btn {
1818
+ background: #5755d9;
1819
+ border: 0;
1820
+ border-radius: 50%;
1821
+ height: .6rem;
1822
+ padding: 0;
1823
+ position: absolute;
1824
+ right: 0;
1825
+ top: 50%;
1826
+ transform: translate(50%, -50%);
1827
+ width: .6rem;
1828
+ }
1829
+
1830
+ .bar-slider .bar-slider-btn:active {
1831
+ box-shadow: 0 0 0 .1rem #5755d9;
1832
+ }
1833
+
1834
+ .card {
1835
+ background: #fff;
1836
+ border: .05rem solid #dadee4;
1837
+ border-radius: .1rem;
1838
+ display: -ms-flexbox;
1839
+ display: flex;
1840
+ -ms-flex-direction: column;
1841
+ flex-direction: column;
1842
+ }
1843
+
1844
+ .card .card-header,
1845
+ .card .card-body,
1846
+ .card .card-footer {
1847
+ padding: .8rem;
1848
+ padding-bottom: 0;
1849
+ }
1850
+
1851
+ .card .card-header:last-child,
1852
+ .card .card-body:last-child,
1853
+ .card .card-footer:last-child {
1854
+ padding-bottom: .8rem;
1855
+ }
1856
+
1857
+ .card .card-body {
1858
+ -ms-flex: 1 1 auto;
1859
+ flex: 1 1 auto;
1860
+ }
1861
+
1862
+ .card .card-image {
1863
+ padding-top: .8rem;
1864
+ }
1865
+
1866
+ .card .card-image:first-child {
1867
+ padding-top: 0;
1868
+ }
1869
+
1870
+ .card .card-image:first-child img {
1871
+ border-top-left-radius: .1rem;
1872
+ border-top-right-radius: .1rem;
1873
+ }
1874
+
1875
+ .card .card-image:last-child img {
1876
+ border-bottom-left-radius: .1rem;
1877
+ border-bottom-right-radius: .1rem;
1878
+ }
1879
+
1880
+ .chip {
1881
+ align-items: center;
1882
+ background: #eef0f3;
1883
+ border-radius: 5rem;
1884
+ display: -ms-inline-flexbox;
1885
+ display: inline-flex;
1886
+ -ms-flex-align: center;
1887
+ font-size: 90%;
1888
+ height: 1.2rem;
1889
+ line-height: .8rem;
1890
+ margin: .1rem;
1891
+ max-width: 320px;
1892
+ overflow: hidden;
1893
+ padding: .2rem .4rem;
1894
+ text-decoration: none;
1895
+ text-overflow: ellipsis;
1896
+ vertical-align: middle;
1897
+ white-space: nowrap;
1898
+ }
1899
+
1900
+ .chip.active {
1901
+ background: #5755d9;
1902
+ color: #fff;
1903
+ }
1904
+
1905
+ .chip .avatar {
1906
+ margin-left: -.4rem;
1907
+ margin-right: .2rem;
1908
+ }
1909
+
1910
+ .chip .btn-clear {
1911
+ border-radius: 50%;
1912
+ transform: scale(.75);
1913
+ }
1914
+
1915
+ .dropdown {
1916
+ display: inline-block;
1917
+ position: relative;
1918
+ }
1919
+
1920
+ .dropdown .menu {
1921
+ animation: slide-down .15s ease 1;
1922
+ display: none;
1923
+ left: 0;
1924
+ max-height: 50vh;
1925
+ overflow-y: auto;
1926
+ position: absolute;
1927
+ top: 100%;
1928
+ }
1929
+
1930
+ .dropdown.dropdown-right .menu {
1931
+ left: auto;
1932
+ right: 0;
1933
+ }
1934
+
1935
+ .dropdown.active .menu,
1936
+ .dropdown .dropdown-toggle:focus + .menu,
1937
+ .dropdown .menu:hover {
1938
+ display: block;
1939
+ }
1940
+
1941
+ .dropdown .btn-group .dropdown-toggle:nth-last-child(2) {
1942
+ border-bottom-right-radius: .1rem;
1943
+ border-top-right-radius: .1rem;
1944
+ }
1945
+
1946
+ .empty {
1947
+ background: #f7f8f9;
1948
+ border-radius: .1rem;
1949
+ color: #66758c;
1950
+ padding: 3.2rem 1.6rem;
1951
+ text-align: center;
1952
+ }
1953
+
1954
+ .empty .empty-icon {
1955
+ margin-bottom: .8rem;
1956
+ }
1957
+
1958
+ .empty .empty-title,
1959
+ .empty .empty-subtitle {
1960
+ margin: .4rem auto;
1961
+ }
1962
+
1963
+ .empty .empty-action {
1964
+ margin-top: .8rem;
1965
+ }
1966
+
1967
+ .menu {
1968
+ background: #fff;
1969
+ border-radius: .1rem;
1970
+ box-shadow: 0 .05rem .2rem rgba(48, 55, 66, .3);
1971
+ list-style: none;
1972
+ margin: 0;
1973
+ min-width: 180px;
1974
+ padding: .4rem;
1975
+ transform: translateY(.2rem);
1976
+ z-index: 300;
1977
+ }
1978
+
1979
+ .menu.menu-nav {
1980
+ background: transparent;
1981
+ box-shadow: none;
1982
+ }
1983
+
1984
+ .menu .menu-item {
1985
+ margin-top: 0;
1986
+ padding: 0 .4rem;
1987
+ position: relative;
1988
+ text-decoration: none;
1989
+ }
1990
+
1991
+ .menu .menu-item > a {
1992
+ border-radius: .1rem;
1993
+ color: inherit;
1994
+ display: block;
1995
+ margin: 0 -.4rem;
1996
+ padding: .2rem .4rem;
1997
+ text-decoration: none;
1998
+ }
1999
+
2000
+ .menu .menu-item > a:focus,
2001
+ .menu .menu-item > a:hover {
2002
+ background: #f1f1fc;
2003
+ color: #5755d9;
2004
+ }
2005
+
2006
+ .menu .menu-item > a:active,
2007
+ .menu .menu-item > a.active {
2008
+ background: #f1f1fc;
2009
+ color: #5755d9;
2010
+ }
2011
+
2012
+ .menu .menu-item .form-checkbox,
2013
+ .menu .menu-item .form-radio,
2014
+ .menu .menu-item .form-switch {
2015
+ margin: .1rem 0;
2016
+ }
2017
+
2018
+ .menu .menu-item + .menu-item {
2019
+ margin-top: .2rem;
2020
+ }
2021
+
2022
+ .menu .menu-badge {
2023
+ align-items: center;
2024
+ display: -ms-flexbox;
2025
+ display: flex;
2026
+ -ms-flex-align: center;
2027
+ height: 100%;
2028
+ position: absolute;
2029
+ right: 0;
2030
+ top: 0;
2031
+ }
2032
+
2033
+ .menu .menu-badge .label {
2034
+ margin-right: .4rem;
2035
+ }
2036
+
2037
+ .modal {
2038
+ align-items: center;
2039
+ bottom: 0;
2040
+ display: none;
2041
+ -ms-flex-align: center;
2042
+ -ms-flex-pack: center;
2043
+ justify-content: center;
2044
+ left: 0;
2045
+ opacity: 0;
2046
+ overflow: hidden;
2047
+ padding: .4rem;
2048
+ position: fixed;
2049
+ right: 0;
2050
+ top: 0;
2051
+ }
2052
+
2053
+ .modal:target,
2054
+ .modal.active {
2055
+ display: -ms-flexbox;
2056
+ display: flex;
2057
+ opacity: 1;
2058
+ z-index: 400;
2059
+ }
2060
+
2061
+ .modal:target .modal-overlay,
2062
+ .modal.active .modal-overlay {
2063
+ background: rgba(247, 248, 249, .75);
2064
+ bottom: 0;
2065
+ cursor: default;
2066
+ display: block;
2067
+ left: 0;
2068
+ position: absolute;
2069
+ right: 0;
2070
+ top: 0;
2071
+ }
2072
+
2073
+ .modal:target .modal-container,
2074
+ .modal.active .modal-container {
2075
+ animation: slide-down .2s ease 1;
2076
+ z-index: 1;
2077
+ }
2078
+
2079
+ .modal.modal-sm .modal-container {
2080
+ max-width: 320px;
2081
+ padding: 0 .4rem;
2082
+ }
2083
+
2084
+ .modal.modal-lg .modal-overlay {
2085
+ background: #fff;
2086
+ }
2087
+
2088
+ .modal.modal-lg .modal-container {
2089
+ box-shadow: none;
2090
+ max-width: 960px;
2091
+ }
2092
+
2093
+ .modal-container {
2094
+ background: #fff;
2095
+ border-radius: .1rem;
2096
+ box-shadow: 0 .2rem .5rem rgba(48, 55, 66, .3);
2097
+ display: -ms-flexbox;
2098
+ display: flex;
2099
+ -ms-flex-direction: column;
2100
+ flex-direction: column;
2101
+ max-height: 75vh;
2102
+ max-width: 640px;
2103
+ padding: 0 .8rem;
2104
+ width: 100%;
2105
+ }
2106
+
2107
+ .modal-container.modal-fullheight {
2108
+ max-height: 100vh;
2109
+ }
2110
+
2111
+ .modal-container .modal-header {
2112
+ color: #303742;
2113
+ padding: .8rem;
2114
+ }
2115
+
2116
+ .modal-container .modal-body {
2117
+ overflow-y: auto;
2118
+ padding: .8rem;
2119
+ position: relative;
2120
+ }
2121
+
2122
+ .modal-container .modal-footer {
2123
+ padding: .8rem;
2124
+ text-align: right;
2125
+ }
2126
+
2127
+ .nav {
2128
+ display: -ms-flexbox;
2129
+ display: flex;
2130
+ -ms-flex-direction: column;
2131
+ flex-direction: column;
2132
+ list-style: none;
2133
+ margin: .2rem 0;
2134
+ }
2135
+
2136
+ .nav .nav-item a {
2137
+ color: #66758c;
2138
+ padding: .2rem .4rem;
2139
+ text-decoration: none;
2140
+ }
2141
+
2142
+ .nav .nav-item a:focus,
2143
+ .nav .nav-item a:hover {
2144
+ color: #5755d9;
2145
+ }
2146
+
2147
+ .nav .nav-item.active > a {
2148
+ color: #505c6e;
2149
+ font-weight: bold;
2150
+ }
2151
+
2152
+ .nav .nav-item.active > a:focus,
2153
+ .nav .nav-item.active > a:hover {
2154
+ color: #5755d9;
2155
+ }
2156
+
2157
+ .nav .nav {
2158
+ margin-bottom: .4rem;
2159
+ margin-left: .8rem;
2160
+ }
2161
+
2162
+ .pagination {
2163
+ display: -ms-flexbox;
2164
+ display: flex;
2165
+ list-style: none;
2166
+ margin: .2rem 0;
2167
+ padding: .2rem 0;
2168
+ }
2169
+
2170
+ .pagination .page-item {
2171
+ margin: .2rem .05rem;
2172
+ }
2173
+
2174
+ .pagination .page-item span {
2175
+ display: inline-block;
2176
+ padding: .2rem .2rem;
2177
+ }
2178
+
2179
+ .pagination .page-item a {
2180
+ border-radius: .1rem;
2181
+ display: inline-block;
2182
+ padding: .2rem .4rem;
2183
+ text-decoration: none;
2184
+ }
2185
+
2186
+ .pagination .page-item a:focus,
2187
+ .pagination .page-item a:hover {
2188
+ color: #5755d9;
2189
+ }
2190
+
2191
+ .pagination .page-item.disabled a {
2192
+ cursor: default;
2193
+ opacity: .5;
2194
+ pointer-events: none;
2195
+ }
2196
+
2197
+ .pagination .page-item.active a {
2198
+ background: #5755d9;
2199
+ color: #fff;
2200
+ }
2201
+
2202
+ .pagination .page-item.page-prev,
2203
+ .pagination .page-item.page-next {
2204
+ -ms-flex: 1 0 50%;
2205
+ flex: 1 0 50%;
2206
+ }
2207
+
2208
+ .pagination .page-item.page-next {
2209
+ text-align: right;
2210
+ }
2211
+
2212
+ .pagination .page-item .page-item-title {
2213
+ margin: 0;
2214
+ }
2215
+
2216
+ .pagination .page-item .page-item-subtitle {
2217
+ margin: 0;
2218
+ opacity: .5;
2219
+ }
2220
+
2221
+ .panel {
2222
+ border: .05rem solid #dadee4;
2223
+ border-radius: .1rem;
2224
+ display: -ms-flexbox;
2225
+ display: flex;
2226
+ -ms-flex-direction: column;
2227
+ flex-direction: column;
2228
+ }
2229
+
2230
+ .panel .panel-header,
2231
+ .panel .panel-footer {
2232
+ -ms-flex: 0 0 auto;
2233
+ flex: 0 0 auto;
2234
+ padding: .8rem;
2235
+ }
2236
+
2237
+ .panel .panel-nav {
2238
+ -ms-flex: 0 0 auto;
2239
+ flex: 0 0 auto;
2240
+ }
2241
+
2242
+ .panel .panel-body {
2243
+ -ms-flex: 1 1 auto;
2244
+ flex: 1 1 auto;
2245
+ overflow-y: auto;
2246
+ padding: 0 .8rem;
2247
+ }
2248
+
2249
+ .popover {
2250
+ display: inline-block;
2251
+ position: relative;
2252
+ }
2253
+
2254
+ .popover .popover-container {
2255
+ left: 50%;
2256
+ opacity: 0;
2257
+ padding: .4rem;
2258
+ position: absolute;
2259
+ top: 0;
2260
+ transform: translate(-50%, -50%) scale(0);
2261
+ transition: transform .2s;
2262
+ width: 320px;
2263
+ z-index: 300;
2264
+ }
2265
+
2266
+ .popover *:focus + .popover-container,
2267
+ .popover:hover .popover-container {
2268
+ display: block;
2269
+ opacity: 1;
2270
+ transform: translate(-50%, -100%) scale(1);
2271
+ }
2272
+
2273
+ .popover.popover-right .popover-container {
2274
+ left: 100%;
2275
+ top: 50%;
2276
+ }
2277
+
2278
+ .popover.popover-right *:focus + .popover-container,
2279
+ .popover.popover-right:hover .popover-container {
2280
+ transform: translate(0, -50%) scale(1);
2281
+ }
2282
+
2283
+ .popover.popover-bottom .popover-container {
2284
+ left: 50%;
2285
+ top: 100%;
2286
+ }
2287
+
2288
+ .popover.popover-bottom *:focus + .popover-container,
2289
+ .popover.popover-bottom:hover .popover-container {
2290
+ transform: translate(-50%, 0) scale(1);
2291
+ }
2292
+
2293
+ .popover.popover-left .popover-container {
2294
+ left: 0;
2295
+ top: 50%;
2296
+ }
2297
+
2298
+ .popover.popover-left *:focus + .popover-container,
2299
+ .popover.popover-left:hover .popover-container {
2300
+ transform: translate(-100%, -50%) scale(1);
2301
+ }
2302
+
2303
+ .popover .card {
2304
+ border: 0;
2305
+ box-shadow: 0 .2rem .5rem rgba(48, 55, 66, .3);
2306
+ }
2307
+
2308
+ .step {
2309
+ display: -ms-flexbox;
2310
+ display: flex;
2311
+ -ms-flex-wrap: nowrap;
2312
+ flex-wrap: nowrap;
2313
+ list-style: none;
2314
+ margin: .2rem 0;
2315
+ width: 100%;
2316
+ }
2317
+
2318
+ .step .step-item {
2319
+ -ms-flex: 1 1 0;
2320
+ flex: 1 1 0;
2321
+ margin-top: 0;
2322
+ min-height: 1rem;
2323
+ position: relative;
2324
+ text-align: center;
2325
+ }
2326
+
2327
+ .step .step-item:not(:first-child)::before {
2328
+ background: #5755d9;
2329
+ content: "";
2330
+ height: 2px;
2331
+ left: -50%;
2332
+ position: absolute;
2333
+ top: 9px;
2334
+ width: 100%;
2335
+ }
2336
+
2337
+ .step .step-item a {
2338
+ color: #5755d9;
2339
+ display: inline-block;
2340
+ padding: 20px 10px 0;
2341
+ text-decoration: none;
2342
+ }
2343
+
2344
+ .step .step-item a::before {
2345
+ background: #5755d9;
2346
+ border: .1rem solid #fff;
2347
+ border-radius: 50%;
2348
+ content: "";
2349
+ display: block;
2350
+ height: .6rem;
2351
+ left: 50%;
2352
+ position: absolute;
2353
+ top: .2rem;
2354
+ transform: translateX(-50%);
2355
+ width: .6rem;
2356
+ z-index: 1;
2357
+ }
2358
+
2359
+ .step .step-item.active a::before {
2360
+ background: #fff;
2361
+ border: .1rem solid #5755d9;
2362
+ }
2363
+
2364
+ .step .step-item.active ~ .step-item::before {
2365
+ background: #dadee4;
2366
+ }
2367
+
2368
+ .step .step-item.active ~ .step-item a {
2369
+ color: #bcc3ce;
2370
+ }
2371
+
2372
+ .step .step-item.active ~ .step-item a::before {
2373
+ background: #dadee4;
2374
+ }
2375
+
2376
+ .tab {
2377
+ align-items: center;
2378
+ border-bottom: .05rem solid #dadee4;
2379
+ display: -ms-flexbox;
2380
+ display: flex;
2381
+ -ms-flex-align: center;
2382
+ -ms-flex-wrap: wrap;
2383
+ flex-wrap: wrap;
2384
+ list-style: none;
2385
+ margin: .2rem 0 .15rem 0;
2386
+ }
2387
+
2388
+ .tab .tab-item {
2389
+ margin-top: 0;
2390
+ }
2391
+
2392
+ .tab .tab-item a {
2393
+ border-bottom: .1rem solid transparent;
2394
+ color: inherit;
2395
+ display: block;
2396
+ margin: 0 .4rem 0 0;
2397
+ padding: .4rem .2rem .3rem .2rem;
2398
+ text-decoration: none;
2399
+ }
2400
+
2401
+ .tab .tab-item a:focus,
2402
+ .tab .tab-item a:hover {
2403
+ color: #5755d9;
2404
+ }
2405
+
2406
+ .tab .tab-item.active a,
2407
+ .tab .tab-item a.active {
2408
+ border-bottom-color: #5755d9;
2409
+ color: #5755d9;
2410
+ }
2411
+
2412
+ .tab .tab-item.tab-action {
2413
+ -ms-flex: 1 0 auto;
2414
+ flex: 1 0 auto;
2415
+ text-align: right;
2416
+ }
2417
+
2418
+ .tab .tab-item .btn-clear {
2419
+ margin-top: -.2rem;
2420
+ }
2421
+
2422
+ .tab.tab-block .tab-item {
2423
+ -ms-flex: 1 0 0;
2424
+ flex: 1 0 0;
2425
+ text-align: center;
2426
+ }
2427
+
2428
+ .tab.tab-block .tab-item a {
2429
+ margin: 0;
2430
+ }
2431
+
2432
+ .tab.tab-block .tab-item .badge[data-badge]::after {
2433
+ position: absolute;
2434
+ right: .1rem;
2435
+ top: .1rem;
2436
+ transform: translate(0, 0);
2437
+ }
2438
+
2439
+ .tab:not(.tab-block) .badge {
2440
+ padding-right: 0;
2441
+ }
2442
+
2443
+ .tile {
2444
+ align-content: space-between;
2445
+ align-items: flex-start;
2446
+ display: -ms-flexbox;
2447
+ display: flex;
2448
+ -ms-flex-align: start;
2449
+ -ms-flex-line-pack: justify;
2450
+ }
2451
+
2452
+ .tile .tile-icon,
2453
+ .tile .tile-action {
2454
+ -ms-flex: 0 0 auto;
2455
+ flex: 0 0 auto;
2456
+ }
2457
+
2458
+ .tile .tile-content {
2459
+ -ms-flex: 1 1 auto;
2460
+ flex: 1 1 auto;
2461
+ }
2462
+
2463
+ .tile .tile-content:not(:first-child) {
2464
+ padding-left: .4rem;
2465
+ }
2466
+
2467
+ .tile .tile-content:not(:last-child) {
2468
+ padding-right: .4rem;
2469
+ }
2470
+
2471
+ .tile .tile-title,
2472
+ .tile .tile-subtitle {
2473
+ line-height: 1.2rem;
2474
+ }
2475
+
2476
+ .tile.tile-centered {
2477
+ align-items: center;
2478
+ -ms-flex-align: center;
2479
+ }
2480
+
2481
+ .tile.tile-centered .tile-content {
2482
+ overflow: hidden;
2483
+ }
2484
+
2485
+ .tile.tile-centered .tile-title,
2486
+ .tile.tile-centered .tile-subtitle {
2487
+ margin-bottom: 0;
2488
+ overflow: hidden;
2489
+ text-overflow: ellipsis;
2490
+ white-space: nowrap;
2491
+ }
2492
+
2493
+ .toast {
2494
+ background: rgba(48, 55, 66, .95);
2495
+ border: .05rem solid #303742;
2496
+ border-color: #303742;
2497
+ border-radius: .1rem;
2498
+ color: #fff;
2499
+ display: block;
2500
+ padding: .4rem;
2501
+ width: 100%;
2502
+ }
2503
+
2504
+ .toast.toast-primary {
2505
+ background: rgba(87, 85, 217, .95);
2506
+ border-color: #5755d9;
2507
+ }
2508
+
2509
+ .toast.toast-success {
2510
+ background: rgba(50, 182, 67, .95);
2511
+ border-color: #32b643;
2512
+ }
2513
+
2514
+ .toast.toast-warning {
2515
+ background: rgba(255, 183, 0, .95);
2516
+ border-color: #ffb700;
2517
+ }
2518
+
2519
+ .toast.toast-error {
2520
+ background: rgba(232, 86, 0, .95);
2521
+ border-color: #e85600;
2522
+ }
2523
+
2524
+ .toast a {
2525
+ color: #fff;
2526
+ text-decoration: underline;
2527
+ }
2528
+
2529
+ .toast a:focus,
2530
+ .toast a:hover,
2531
+ .toast a:active,
2532
+ .toast a.active {
2533
+ opacity: .75;
2534
+ }
2535
+
2536
+ .toast .btn-clear {
2537
+ margin: .1rem;
2538
+ }
2539
+
2540
+ .toast p:last-child {
2541
+ margin-bottom: 0;
2542
+ }
2543
+
2544
+ .tooltip {
2545
+ position: relative;
2546
+ }
2547
+
2548
+ .tooltip::after {
2549
+ background: rgba(48, 55, 66, .95);
2550
+ border-radius: .1rem;
2551
+ bottom: 100%;
2552
+ color: #fff;
2553
+ content: attr(data-tooltip);
2554
+ display: block;
2555
+ font-size: .7rem;
2556
+ left: 50%;
2557
+ max-width: 320px;
2558
+ opacity: 0;
2559
+ overflow: hidden;
2560
+ padding: .2rem .4rem;
2561
+ pointer-events: none;
2562
+ position: absolute;
2563
+ text-overflow: ellipsis;
2564
+ transform: translate(-50%, .4rem);
2565
+ transition: opacity .2s, transform .2s;
2566
+ white-space: pre;
2567
+ z-index: 300;
2568
+ }
2569
+
2570
+ .tooltip:focus::after,
2571
+ .tooltip:hover::after {
2572
+ opacity: 1;
2573
+ transform: translate(-50%, -.2rem);
2574
+ }
2575
+
2576
+ .tooltip[disabled],
2577
+ .tooltip.disabled {
2578
+ pointer-events: auto;
2579
+ }
2580
+
2581
+ .tooltip.tooltip-right::after {
2582
+ bottom: 50%;
2583
+ left: 100%;
2584
+ transform: translate(-.2rem, 50%);
2585
+ }
2586
+
2587
+ .tooltip.tooltip-right:focus::after,
2588
+ .tooltip.tooltip-right:hover::after {
2589
+ transform: translate(.2rem, 50%);
2590
+ }
2591
+
2592
+ .tooltip.tooltip-bottom::after {
2593
+ bottom: auto;
2594
+ top: 100%;
2595
+ transform: translate(-50%, -.4rem);
2596
+ }
2597
+
2598
+ .tooltip.tooltip-bottom:focus::after,
2599
+ .tooltip.tooltip-bottom:hover::after {
2600
+ transform: translate(-50%, .2rem);
2601
+ }
2602
+
2603
+ .tooltip.tooltip-left::after {
2604
+ bottom: 50%;
2605
+ left: auto;
2606
+ right: 100%;
2607
+ transform: translate(.4rem, 50%);
2608
+ }
2609
+
2610
+ .tooltip.tooltip-left:focus::after,
2611
+ .tooltip.tooltip-left:hover::after {
2612
+ transform: translate(-.2rem, 50%);
2613
+ }
2614
+
2615
+ @keyframes loading {
2616
+ 0% {
2617
+ transform: rotate(0deg);
2618
+ }
2619
+ 100% {
2620
+ transform: rotate(360deg);
2621
+ }
2622
+ }
2623
+
2624
+ @keyframes slide-down {
2625
+ 0% {
2626
+ opacity: 0;
2627
+ transform: translateY(-1.6rem);
2628
+ }
2629
+ 100% {
2630
+ opacity: 1;
2631
+ transform: translateY(0);
2632
+ }
2633
+ }
2634
+
2635
+ .text-primary {
2636
+ color: #5755d9 !important;
2637
+ }
2638
+
2639
+ a.text-primary:focus,
2640
+ a.text-primary:hover {
2641
+ color: #4240d4;
2642
+ }
2643
+
2644
+ a.text-primary:visited {
2645
+ color: #6c6ade;
2646
+ }
2647
+
2648
+ .text-secondary {
2649
+ color: #e5e5f9 !important;
2650
+ }
2651
+
2652
+ a.text-secondary:focus,
2653
+ a.text-secondary:hover {
2654
+ color: #d1d0f4;
2655
+ }
2656
+
2657
+ a.text-secondary:visited {
2658
+ color: #fafafe;
2659
+ }
2660
+
2661
+ .text-gray {
2662
+ color: #bcc3ce !important;
2663
+ }
2664
+
2665
+ a.text-gray:focus,
2666
+ a.text-gray:hover {
2667
+ color: #adb6c4;
2668
+ }
2669
+
2670
+ a.text-gray:visited {
2671
+ color: #cbd0d9;
2672
+ }
2673
+
2674
+ .text-light {
2675
+ color: #fff !important;
2676
+ }
2677
+
2678
+ a.text-light:focus,
2679
+ a.text-light:hover {
2680
+ color: #f2f2f2;
2681
+ }
2682
+
2683
+ a.text-light:visited {
2684
+ color: white;
2685
+ }
2686
+
2687
+ .text-dark {
2688
+ color: #3b4351 !important;
2689
+ }
2690
+
2691
+ a.text-dark:focus,
2692
+ a.text-dark:hover {
2693
+ color: #303742;
2694
+ }
2695
+
2696
+ a.text-dark:visited {
2697
+ color: #455060;
2698
+ }
2699
+
2700
+ .text-success {
2701
+ color: #32b643 !important;
2702
+ }
2703
+
2704
+ a.text-success:focus,
2705
+ a.text-success:hover {
2706
+ color: #2da23c;
2707
+ }
2708
+
2709
+ a.text-success:visited {
2710
+ color: #39c94b;
2711
+ }
2712
+
2713
+ .text-warning {
2714
+ color: #ffb700 !important;
2715
+ }
2716
+
2717
+ a.text-warning:focus,
2718
+ a.text-warning:hover {
2719
+ color: #e6a500;
2720
+ }
2721
+
2722
+ a.text-warning:visited {
2723
+ color: #ffbe1a;
2724
+ }
2725
+
2726
+ .text-error {
2727
+ color: #e85600 !important;
2728
+ }
2729
+
2730
+ a.text-error:focus,
2731
+ a.text-error:hover {
2732
+ color: #cf4d00;
2733
+ }
2734
+
2735
+ a.text-error:visited {
2736
+ color: #ff6003;
2737
+ }
2738
+
2739
+ .bg-primary {
2740
+ background: #5755d9 !important;
2741
+ color: #fff;
2742
+ }
2743
+
2744
+ .bg-secondary {
2745
+ background: #f1f1fc !important;
2746
+ }
2747
+
2748
+ .bg-dark {
2749
+ background: #303742 !important;
2750
+ color: #fff;
2751
+ }
2752
+
2753
+ .bg-gray {
2754
+ background: #f7f8f9 !important;
2755
+ }
2756
+
2757
+ .bg-success {
2758
+ background: #32b643 !important;
2759
+ color: #fff;
2760
+ }
2761
+
2762
+ .bg-warning {
2763
+ background: #ffb700 !important;
2764
+ color: #fff;
2765
+ }
2766
+
2767
+ .bg-error {
2768
+ background: #e85600 !important;
2769
+ color: #fff;
2770
+ }
2771
+
2772
+ .c-hand {
2773
+ cursor: pointer;
2774
+ }
2775
+
2776
+ .c-move {
2777
+ cursor: move;
2778
+ }
2779
+
2780
+ .c-zoom-in {
2781
+ cursor: zoom-in;
2782
+ }
2783
+
2784
+ .c-zoom-out {
2785
+ cursor: zoom-out;
2786
+ }
2787
+
2788
+ .c-not-allowed {
2789
+ cursor: not-allowed;
2790
+ }
2791
+
2792
+ .c-auto {
2793
+ cursor: auto;
2794
+ }
2795
+
2796
+ .d-block {
2797
+ display: block;
2798
+ }
2799
+
2800
+ .d-inline {
2801
+ display: inline;
2802
+ }
2803
+
2804
+ .d-inline-block {
2805
+ display: inline-block;
2806
+ }
2807
+
2808
+ .d-flex {
2809
+ display: -ms-flexbox;
2810
+ display: flex;
2811
+ }
2812
+
2813
+ .d-inline-flex {
2814
+ display: -ms-inline-flexbox;
2815
+ display: inline-flex;
2816
+ }
2817
+
2818
+ .d-none,
2819
+ .d-hide {
2820
+ display: none !important;
2821
+ }
2822
+
2823
+ .d-visible {
2824
+ visibility: visible;
2825
+ }
2826
+
2827
+ .d-invisible {
2828
+ visibility: hidden;
2829
+ }
2830
+
2831
+ .text-hide {
2832
+ background: transparent;
2833
+ border: 0;
2834
+ color: transparent;
2835
+ font-size: 0;
2836
+ line-height: 0;
2837
+ text-shadow: none;
2838
+ }
2839
+
2840
+ .text-assistive {
2841
+ border: 0;
2842
+ clip: rect(0, 0, 0, 0);
2843
+ height: 1px;
2844
+ margin: -1px;
2845
+ overflow: hidden;
2846
+ padding: 0;
2847
+ position: absolute;
2848
+ width: 1px;
2849
+ }
2850
+
2851
+ .divider,
2852
+ .divider-vert {
2853
+ display: block;
2854
+ position: relative;
2855
+ }
2856
+
2857
+ .divider[data-content]::after,
2858
+ .divider-vert[data-content]::after {
2859
+ background: #fff;
2860
+ color: #bcc3ce;
2861
+ content: attr(data-content);
2862
+ display: inline-block;
2863
+ font-size: .7rem;
2864
+ padding: 0 .4rem;
2865
+ transform: translateY(-.65rem);
2866
+ }
2867
+
2868
+ .divider {
2869
+ border-top: .05rem solid #f1f3f5;
2870
+ height: .05rem;
2871
+ margin: .4rem 0;
2872
+ }
2873
+
2874
+ .divider[data-content] {
2875
+ margin: .8rem 0;
2876
+ }
2877
+
2878
+ .divider-vert {
2879
+ display: block;
2880
+ padding: .8rem;
2881
+ }
2882
+
2883
+ .divider-vert::before {
2884
+ border-left: .05rem solid #dadee4;
2885
+ bottom: .4rem;
2886
+ content: "";
2887
+ display: block;
2888
+ left: 50%;
2889
+ position: absolute;
2890
+ top: .4rem;
2891
+ transform: translateX(-50%);
2892
+ }
2893
+
2894
+ .divider-vert[data-content]::after {
2895
+ left: 50%;
2896
+ padding: .2rem 0;
2897
+ position: absolute;
2898
+ top: 50%;
2899
+ transform: translate(-50%, -50%);
2900
+ }
2901
+
2902
+ .loading {
2903
+ color: transparent !important;
2904
+ min-height: .8rem;
2905
+ pointer-events: none;
2906
+ position: relative;
2907
+ }
2908
+
2909
+ .loading::after {
2910
+ animation: loading 500ms infinite linear;
2911
+ background: transparent;
2912
+ border: .1rem solid #5755d9;
2913
+ border-radius: 50%;
2914
+ border-right-color: transparent;
2915
+ border-top-color: transparent;
2916
+ content: "";
2917
+ display: block;
2918
+ height: .8rem;
2919
+ left: 50%;
2920
+ margin-left: -.4rem;
2921
+ margin-top: -.4rem;
2922
+ opacity: 1;
2923
+ padding: 0;
2924
+ position: absolute;
2925
+ top: 50%;
2926
+ width: .8rem;
2927
+ z-index: 1;
2928
+ }
2929
+
2930
+ .loading.loading-lg {
2931
+ min-height: 2rem;
2932
+ }
2933
+
2934
+ .loading.loading-lg::after {
2935
+ height: 1.6rem;
2936
+ margin-left: -.8rem;
2937
+ margin-top: -.8rem;
2938
+ width: 1.6rem;
2939
+ }
2940
+
2941
+ .clearfix::after {
2942
+ clear: both;
2943
+ content: "";
2944
+ display: table;
2945
+ }
2946
+
2947
+ .float-left {
2948
+ float: left !important;
2949
+ }
2950
+
2951
+ .float-right {
2952
+ float: right !important;
2953
+ }
2954
+
2955
+ .p-relative {
2956
+ position: relative !important;
2957
+ }
2958
+
2959
+ .p-absolute {
2960
+ position: absolute !important;
2961
+ }
2962
+
2963
+ .p-fixed {
2964
+ position: fixed !important;
2965
+ }
2966
+
2967
+ .p-sticky {
2968
+ position: -webkit-sticky !important;
2969
+ position: sticky !important;
2970
+ }
2971
+
2972
+ .p-centered {
2973
+ display: block;
2974
+ float: none;
2975
+ margin-left: auto;
2976
+ margin-right: auto;
2977
+ }
2978
+
2979
+ .flex-centered {
2980
+ align-items: center;
2981
+ display: -ms-flexbox;
2982
+ display: flex;
2983
+ -ms-flex-align: center;
2984
+ -ms-flex-pack: center;
2985
+ justify-content: center;
2986
+ }
2987
+
2988
+ .m-0 {
2989
+ margin: 0 !important;
2990
+ }
2991
+
2992
+ .mb-0 {
2993
+ margin-bottom: 0 !important;
2994
+ }
2995
+
2996
+ .ml-0 {
2997
+ margin-left: 0 !important;
2998
+ }
2999
+
3000
+ .mr-0 {
3001
+ margin-right: 0 !important;
3002
+ }
3003
+
3004
+ .mt-0 {
3005
+ margin-top: 0 !important;
3006
+ }
3007
+
3008
+ .mx-0 {
3009
+ margin-left: 0 !important;
3010
+ margin-right: 0 !important;
3011
+ }
3012
+
3013
+ .my-0 {
3014
+ margin-bottom: 0 !important;
3015
+ margin-top: 0 !important;
3016
+ }
3017
+
3018
+ .m-1 {
3019
+ margin: .2rem !important;
3020
+ }
3021
+
3022
+ .mb-1 {
3023
+ margin-bottom: .2rem !important;
3024
+ }
3025
+
3026
+ .ml-1 {
3027
+ margin-left: .2rem !important;
3028
+ }
3029
+
3030
+ .mr-1 {
3031
+ margin-right: .2rem !important;
3032
+ }
3033
+
3034
+ .mt-1 {
3035
+ margin-top: .2rem !important;
3036
+ }
3037
+
3038
+ .mx-1 {
3039
+ margin-left: .2rem !important;
3040
+ margin-right: .2rem !important;
3041
+ }
3042
+
3043
+ .my-1 {
3044
+ margin-bottom: .2rem !important;
3045
+ margin-top: .2rem !important;
3046
+ }
3047
+
3048
+ .m-2 {
3049
+ margin: .4rem !important;
3050
+ }
3051
+
3052
+ .mb-2 {
3053
+ margin-bottom: .4rem !important;
3054
+ }
3055
+
3056
+ .ml-2 {
3057
+ margin-left: .4rem !important;
3058
+ }
3059
+
3060
+ .mr-2 {
3061
+ margin-right: .4rem !important;
3062
+ }
3063
+
3064
+ .mt-2 {
3065
+ margin-top: .4rem !important;
3066
+ }
3067
+
3068
+ .mx-2 {
3069
+ margin-left: .4rem !important;
3070
+ margin-right: .4rem !important;
3071
+ }
3072
+
3073
+ .my-2 {
3074
+ margin-bottom: .4rem !important;
3075
+ margin-top: .4rem !important;
3076
+ }
3077
+
3078
+ .p-0 {
3079
+ padding: 0 !important;
3080
+ }
3081
+
3082
+ .pb-0 {
3083
+ padding-bottom: 0 !important;
3084
+ }
3085
+
3086
+ .pl-0 {
3087
+ padding-left: 0 !important;
3088
+ }
3089
+
3090
+ .pr-0 {
3091
+ padding-right: 0 !important;
3092
+ }
3093
+
3094
+ .pt-0 {
3095
+ padding-top: 0 !important;
3096
+ }
3097
+
3098
+ .px-0 {
3099
+ padding-left: 0 !important;
3100
+ padding-right: 0 !important;
3101
+ }
3102
+
3103
+ .py-0 {
3104
+ padding-bottom: 0 !important;
3105
+ padding-top: 0 !important;
3106
+ }
3107
+
3108
+ .p-1 {
3109
+ padding: .2rem !important;
3110
+ }
3111
+
3112
+ .pb-1 {
3113
+ padding-bottom: .2rem !important;
3114
+ }
3115
+
3116
+ .pl-1 {
3117
+ padding-left: .2rem !important;
3118
+ }
3119
+
3120
+ .pr-1 {
3121
+ padding-right: .2rem !important;
3122
+ }
3123
+
3124
+ .pt-1 {
3125
+ padding-top: .2rem !important;
3126
+ }
3127
+
3128
+ .px-1 {
3129
+ padding-left: .2rem !important;
3130
+ padding-right: .2rem !important;
3131
+ }
3132
+
3133
+ .py-1 {
3134
+ padding-bottom: .2rem !important;
3135
+ padding-top: .2rem !important;
3136
+ }
3137
+
3138
+ .p-2 {
3139
+ padding: .4rem !important;
3140
+ }
3141
+
3142
+ .pb-2 {
3143
+ padding-bottom: .4rem !important;
3144
+ }
3145
+
3146
+ .pl-2 {
3147
+ padding-left: .4rem !important;
3148
+ }
3149
+
3150
+ .pr-2 {
3151
+ padding-right: .4rem !important;
3152
+ }
3153
+
3154
+ .pt-2 {
3155
+ padding-top: .4rem !important;
3156
+ }
3157
+
3158
+ .px-2 {
3159
+ padding-left: .4rem !important;
3160
+ padding-right: .4rem !important;
3161
+ }
3162
+
3163
+ .py-2 {
3164
+ padding-bottom: .4rem !important;
3165
+ padding-top: .4rem !important;
3166
+ }
3167
+
3168
+ .s-rounded {
3169
+ border-radius: .1rem;
3170
+ }
3171
+
3172
+ .s-circle {
3173
+ border-radius: 50%;
3174
+ }
3175
+
3176
+ .text-left {
3177
+ text-align: left;
3178
+ }
3179
+
3180
+ .text-right {
3181
+ text-align: right;
3182
+ }
3183
+
3184
+ .text-center {
3185
+ text-align: center;
3186
+ }
3187
+
3188
+ .text-justify {
3189
+ text-align: justify;
3190
+ }
3191
+
3192
+ .text-lowercase {
3193
+ text-transform: lowercase;
3194
+ }
3195
+
3196
+ .text-uppercase {
3197
+ text-transform: uppercase;
3198
+ }
3199
+
3200
+ .text-capitalize {
3201
+ text-transform: capitalize;
3202
+ }
3203
+
3204
+ .text-normal {
3205
+ font-weight: normal;
3206
+ }
3207
+
3208
+ .text-bold {
3209
+ font-weight: bold;
3210
+ }
3211
+
3212
+ .text-italic {
3213
+ font-style: italic;
3214
+ }
3215
+
3216
+ .text-large {
3217
+ font-size: 1.2em;
3218
+ }
3219
+
3220
+ .text-small {
3221
+ font-size: .9em;
3222
+ }
3223
+
3224
+ .text-tiny {
3225
+ font-size: .8em;
3226
+ }
3227
+
3228
+ .text-muted {
3229
+ opacity: .8;
3230
+ }
3231
+
3232
+ .text-ellipsis {
3233
+ overflow: hidden;
3234
+ text-overflow: ellipsis;
3235
+ white-space: nowrap;
3236
+ }
3237
+
3238
+ .text-clip {
3239
+ overflow: hidden;
3240
+ text-overflow: clip;
3241
+ white-space: nowrap;
3242
+ }
3243
+
3244
+ .text-break {
3245
+ -webkit-hyphens: auto;
3246
+ -ms-hyphens: auto;
3247
+ hyphens: auto;
3248
+ word-break: break-word;
3249
+ word-wrap: break-word;
3250
+ }
admin/assets/css/spectre.min.css ADDED
@@ -0,0 +1 @@
 
1
+ /*! Spectre.css v0.5.9 | MIT License | github.com/picturepan2/spectre */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}hr{box-sizing:content-box;height:0;overflow:visible}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}address{font-style:normal}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:"SF Mono","Segoe UI Mono","Roboto Mono",Menlo,Courier,monospace;font-size:1em}dfn{font-style:italic}small{font-size:80%;font-weight:400}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}fieldset{border:0;margin:0;padding:0}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item;outline:0}canvas{display:inline-block}template{display:none}[hidden]{display:none}*,::after,::before{box-sizing:inherit}html{box-sizing:border-box;font-size:20px;line-height:1.5;-webkit-tap-highlight-color:transparent}body{background:#fff;color:#3b4351;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",sans-serif;font-size:.8rem;overflow-x:hidden;text-rendering:optimizeLegibility}a{color:#5755d9;outline:0;text-decoration:none}a:focus{box-shadow:0 0 0 .1rem rgba(87,85,217,.2)}a.active,a:active,a:focus,a:hover{color:#302ecd;text-decoration:underline}a:visited{color:#807fe2}h1,h2,h3,h4,h5,h6{color:inherit;font-weight:500;line-height:1.2;margin-bottom:.5em;margin-top:0}.h1,.h2,.h3,.h4,.h5,.h6{font-weight:500}.h1,h1{font-size:2rem}.h2,h2{font-size:1.6rem}.h3,h3{font-size:1.4rem}.h4,h4{font-size:1.2rem}.h5,h5{font-size:1rem}.h6,h6{font-size:.8rem}p{margin:0 0 1.2rem}a,ins,u{-webkit-text-decoration-skip:ink edges;text-decoration-skip:ink edges}abbr[title]{border-bottom:.05rem dotted;cursor:help;text-decoration:none}kbd{background:#303742;border-radius:.1rem;color:#fff;font-size:.7rem;line-height:1.25;padding:.1rem .2rem}mark{background:#ffe9b3;border-bottom:.05rem solid #ffd367;border-radius:.1rem;color:#3b4351;padding:.05rem .1rem 0}blockquote{border-left:.1rem solid #dadee4;margin-left:0;padding:.4rem .8rem}blockquote p:last-child{margin-bottom:0}ol,ul{margin:.8rem 0 .8rem .8rem;padding:0}ol ol,ol ul,ul ol,ul ul{margin:.8rem 0 .8rem .8rem}ol li,ul li{margin-top:.4rem}ul{list-style:disc inside}ul ul{list-style-type:circle}ol{list-style:decimal inside}ol ol{list-style-type:lower-alpha}dl dt{font-weight:700}dl dd{margin:.4rem 0 .8rem 0}.lang-zh,.lang-zh-hans,html:lang(zh),html:lang(zh-Hans){font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Helvetica Neue",sans-serif}.lang-zh-hant,html:lang(zh-Hant){font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang TC","Hiragino Sans CNS","Microsoft JhengHei","Helvetica Neue",sans-serif}.lang-ja,html:lang(ja){font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Hiragino Sans","Hiragino Kaku Gothic Pro","Yu Gothic",YuGothic,Meiryo,"Helvetica Neue",sans-serif}.lang-ko,html:lang(ko){font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Malgun Gothic","Helvetica Neue",sans-serif}.lang-cjk ins,.lang-cjk u,:lang(ja) ins,:lang(ja) u,:lang(zh) ins,:lang(zh) u{border-bottom:.05rem solid;text-decoration:none}.lang-cjk del+del,.lang-cjk del+s,.lang-cjk ins+ins,.lang-cjk ins+u,.lang-cjk s+del,.lang-cjk s+s,.lang-cjk u+ins,.lang-cjk u+u,:lang(ja) del+del,:lang(ja) del+s,:lang(ja) ins+ins,:lang(ja) ins+u,:lang(ja) s+del,:lang(ja) s+s,:lang(ja) u+ins,:lang(ja) u+u,:lang(zh) del+del,:lang(zh) del+s,:lang(zh) ins+ins,:lang(zh) ins+u,:lang(zh) s+del,:lang(zh) s+s,:lang(zh) u+ins,:lang(zh) u+u{margin-left:.125em}.table{border-collapse:collapse;border-spacing:0;text-align:left;width:100%}.table.table-striped tbody tr:nth-of-type(odd){background:#f7f8f9}.table tbody tr.active,.table.table-striped tbody tr.active{background:#eef0f3}.table.table-hover tbody tr:hover{background:#eef0f3}.table.table-scroll{display:block;overflow-x:auto;padding-bottom:.75rem;white-space:nowrap}.table td,.table th{border-bottom:.05rem solid #dadee4;padding:.6rem .4rem}.table th{border-bottom-width:.1rem}.btn{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#fff;border:.05rem solid #5755d9;border-radius:.1rem;color:#5755d9;cursor:pointer;display:inline-block;font-size:.8rem;height:1.8rem;line-height:1.2rem;outline:0;padding:.25rem .4rem;text-align:center;text-decoration:none;transition:background .2s,border .2s,box-shadow .2s,color .2s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.btn:focus{box-shadow:0 0 0 .1rem rgba(87,85,217,.2)}.btn:focus,.btn:hover{background:#f1f1fc;border-color:#4b48d6;text-decoration:none}.btn.active,.btn:active{background:#4b48d6;border-color:#3634d2;color:#fff;text-decoration:none}.btn.active.loading::after,.btn:active.loading::after{border-bottom-color:#fff;border-left-color:#fff}.btn.disabled,.btn:disabled,.btn[disabled]{cursor:default;opacity:.5;pointer-events:none}.btn.btn-primary{background:#5755d9;border-color:#4b48d6;color:#fff}.btn.btn-primary:focus,.btn.btn-primary:hover{background:#4240d4;border-color:#3634d2;color:#fff}.btn.btn-primary.active,.btn.btn-primary:active{background:#3a38d2;border-color:#302ecd;color:#fff}.btn.btn-primary.loading::after{border-bottom-color:#fff;border-left-color:#fff}.btn.btn-success{background:#32b643;border-color:#2faa3f;color:#fff}.btn.btn-success:focus{box-shadow:0 0 0 .1rem rgba(50,182,67,.2)}.btn.btn-success:focus,.btn.btn-success:hover{background:#30ae40;border-color:#2da23c;color:#fff}.btn.btn-success.active,.btn.btn-success:active{background:#2a9a39;border-color:#278e34;color:#fff}.btn.btn-success.loading::after{border-bottom-color:#fff;border-left-color:#fff}.btn.btn-error{background:#e85600;border-color:#d95000;color:#fff}.btn.btn-error:focus{box-shadow:0 0 0 .1rem rgba(232,86,0,.2)}.btn.btn-error:focus,.btn.btn-error:hover{background:#de5200;border-color:#cf4d00;color:#fff}.btn.btn-error.active,.btn.btn-error:active{background:#c44900;border-color:#b54300;color:#fff}.btn.btn-error.loading::after{border-bottom-color:#fff;border-left-color:#fff}.btn.btn-link{background:0 0;border-color:transparent;color:#5755d9}.btn.btn-link.active,.btn.btn-link:active,.btn.btn-link:focus,.btn.btn-link:hover{color:#302ecd}.btn.btn-sm{font-size:.7rem;height:1.4rem;padding:.05rem .3rem}.btn.btn-lg{font-size:.9rem;height:2rem;padding:.35rem .6rem}.btn.btn-block{display:block;width:100%}.btn.btn-action{padding-left:0;padding-right:0;width:1.8rem}.btn.btn-action.btn-sm{width:1.4rem}.btn.btn-action.btn-lg{width:2rem}.btn.btn-clear{background:0 0;border:0;color:currentColor;height:1rem;line-height:.8rem;margin-left:.2rem;margin-right:-2px;opacity:1;padding:.1rem;text-decoration:none;width:1rem}.btn.btn-clear:focus,.btn.btn-clear:hover{background:rgba(247,248,249,.5);opacity:.95}.btn.btn-clear::before{content:"\2715"}.btn-group{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.btn-group .btn{-ms-flex:1 0 auto;flex:1 0 auto}.btn-group .btn:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group .btn:not(:first-child):not(:last-child){border-radius:0;margin-left:-.05rem}.btn-group .btn:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-.05rem}.btn-group .btn.active,.btn-group .btn:active,.btn-group .btn:focus,.btn-group .btn:hover{z-index:1}.btn-group.btn-group-block{display:-ms-flexbox;display:flex}.btn-group.btn-group-block .btn{-ms-flex:1 0 0;flex:1 0 0}.form-group:not(:last-child){margin-bottom:.4rem}fieldset{margin-bottom:.8rem}legend{font-size:.9rem;font-weight:500;margin-bottom:.8rem}.form-label{display:block;line-height:1.2rem;padding:.3rem 0}.form-label.label-sm{font-size:.7rem;padding:.1rem 0}.form-label.label-lg{font-size:.9rem;padding:.4rem 0}.form-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#fff;background-image:none;border:.05rem solid #bcc3ce;border-radius:.1rem;color:#3b4351;display:block;font-size:.8rem;height:1.8rem;line-height:1.2rem;max-width:100%;outline:0;padding:.25rem .4rem;position:relative;transition:background .2s,border .2s,box-shadow .2s,color .2s;width:100%}.form-input:focus{border-color:#5755d9;box-shadow:0 0 0 .1rem rgba(87,85,217,.2)}.form-input:-ms-input-placeholder{color:#bcc3ce}.form-input::-ms-input-placeholder{color:#bcc3ce}.form-input::placeholder{color:#bcc3ce}.form-input.input-sm{font-size:.7rem;height:1.4rem;padding:.05rem .3rem}.form-input.input-lg{font-size:.9rem;height:2rem;padding:.35rem .6rem}.form-input.input-inline{display:inline-block;vertical-align:middle;width:auto}.form-input[type=file]{height:auto}textarea.form-input,textarea.form-input.input-lg,textarea.form-input.input-sm{height:auto}.form-input-hint{color:#bcc3ce;font-size:.7rem;margin-top:.2rem}.has-success .form-input-hint,.is-success+.form-input-hint{color:#32b643}.has-error .form-input-hint,.is-error+.form-input-hint{color:#e85600}.form-select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#fff;border:.05rem solid #bcc3ce;border-radius:.1rem;color:inherit;font-size:.8rem;height:1.8rem;line-height:1.2rem;outline:0;padding:.25rem .4rem;vertical-align:middle;width:100%}.form-select:focus{border-color:#5755d9;box-shadow:0 0 0 .1rem rgba(87,85,217,.2)}.form-select::-ms-expand{display:none}.form-select.select-sm{font-size:.7rem;height:1.4rem;padding:.05rem 1.1rem .05rem .3rem}.form-select.select-lg{font-size:.9rem;height:2rem;padding:.35rem 1.4rem .35rem .6rem}.form-select[multiple],.form-select[size]{height:auto;padding:.25rem .4rem}.form-select[multiple] option,.form-select[size] option{padding:.1rem .2rem}.form-select:not([multiple]):not([size]){background:#fff url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%204%205'%3E%3Cpath%20fill='%23667189'%20d='M2%200L0%202h4zm0%205L0%203h4z'/%3E%3C/svg%3E") no-repeat right .35rem center/.4rem .5rem;padding-right:1.2rem}.has-icon-left,.has-icon-right{position:relative}.has-icon-left .form-icon,.has-icon-right .form-icon{height:.8rem;margin:0 .25rem;position:absolute;top:50%;transform:translateY(-50%);width:.8rem;z-index:2}.has-icon-left .form-icon{left:.05rem}.has-icon-left .form-input{padding-left:1.3rem}.has-icon-right .form-icon{right:.05rem}.has-icon-right .form-input{padding-right:1.3rem}.form-checkbox,.form-radio,.form-switch{display:block;line-height:1.2rem;margin:.2rem 0;min-height:1.4rem;padding:.1rem .4rem .1rem 1.2rem;position:relative}.form-checkbox input,.form-radio input,.form-switch input{clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;position:absolute;width:1px}.form-checkbox input:focus+.form-icon,.form-radio input:focus+.form-icon,.form-switch input:focus+.form-icon{border-color:#5755d9;box-shadow:0 0 0 .1rem rgba(87,85,217,.2)}.form-checkbox input:checked+.form-icon,.form-radio input:checked+.form-icon,.form-switch input:checked+.form-icon{background:#5755d9;border-color:#5755d9}.form-checkbox .form-icon,.form-radio .form-icon,.form-switch .form-icon{border:.05rem solid #bcc3ce;cursor:pointer;display:inline-block;position:absolute;transition:background .2s,border .2s,box-shadow .2s,color .2s}.form-checkbox.input-sm,.form-radio.input-sm,.form-switch.input-sm{font-size:.7rem;margin:0}.form-checkbox.input-lg,.form-radio.input-lg,.form-switch.input-lg{font-size:.9rem;margin:.3rem 0}.form-checkbox .form-icon,.form-radio .form-icon{background:#fff;height:.8rem;left:0;top:.3rem;width:.8rem}.form-checkbox input:active+.form-icon,.form-radio input:active+.form-icon{background:#eef0f3}.form-checkbox .form-icon{border-radius:.1rem}.form-checkbox input:checked+.form-icon::before{background-clip:padding-box;border:.1rem solid #fff;border-left-width:0;border-top-width:0;content:"";height:9px;left:50%;margin-left:-3px;margin-top:-6px;position:absolute;top:50%;transform:rotate(45deg);width:6px}.form-checkbox input:indeterminate+.form-icon{background:#5755d9;border-color:#5755d9}.form-checkbox input:indeterminate+.form-icon::before{background:#fff;content:"";height:2px;left:50%;margin-left:-5px;margin-top:-1px;position:absolute;top:50%;width:10px}.form-radio .form-icon{border-radius:50%}.form-radio input:checked+.form-icon::before{background:#fff;border-radius:50%;content:"";height:6px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:6px}.form-switch{padding-left:2rem}.form-switch .form-icon{background:#bcc3ce;background-clip:padding-box;border-radius:.45rem;height:.9rem;left:0;top:.25rem;width:1.6rem}.form-switch .form-icon::before{background:#fff;border-radius:50%;content:"";display:block;height:.8rem;left:0;position:absolute;top:0;transition:background .2s,border .2s,box-shadow .2s,color .2s,left .2s;width:.8rem}.form-switch input:checked+.form-icon::before{left:14px}.form-switch input:active+.form-icon::before{background:#f7f8f9}.input-group{display:-ms-flexbox;display:flex}.input-group .input-group-addon{background:#f7f8f9;border:.05rem solid #bcc3ce;border-radius:.1rem;line-height:1.2rem;padding:.25rem .4rem;white-space:nowrap}.input-group .input-group-addon.addon-sm{font-size:.7rem;padding:.05rem .3rem}.input-group .input-group-addon.addon-lg{font-size:.9rem;padding:.35rem .6rem}.input-group .form-input,.input-group .form-select{-ms-flex:1 1 auto;flex:1 1 auto;width:1%}.input-group .input-group-btn{z-index:1}.input-group .form-input:first-child:not(:last-child),.input-group .form-select:first-child:not(:last-child),.input-group .input-group-addon:first-child:not(:last-child),.input-group .input-group-btn:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.input-group .form-input:not(:first-child):not(:last-child),.input-group .form-select:not(:first-child):not(:last-child),.input-group .input-group-addon:not(:first-child):not(:last-child),.input-group .input-group-btn:not(:first-child):not(:last-child){border-radius:0;margin-left:-.05rem}.input-group .form-input:last-child:not(:first-child),.input-group .form-select:last-child:not(:first-child),.input-group .input-group-addon:last-child:not(:first-child),.input-group .input-group-btn:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-.05rem}.input-group .form-input:focus,.input-group .form-select:focus,.input-group .input-group-addon:focus,.input-group .input-group-btn:focus{z-index:2}.input-group .form-select{width:auto}.input-group.input-inline{display:-ms-inline-flexbox;display:inline-flex}.form-input.is-success,.form-select.is-success,.has-success .form-input,.has-success .form-select{background:#f9fdfa;border-color:#32b643}.form-input.is-success:focus,.form-select.is-success:focus,.has-success .form-input:focus,.has-success .form-select:focus{box-shadow:0 0 0 .1rem rgba(50,182,67,.2)}.form-input.is-error,.form-select.is-error,.has-error .form-input,.has-error .form-select{background:#fffaf7;border-color:#e85600}.form-input.is-error:focus,.form-select.is-error:focus,.has-error .form-input:focus,.has-error .form-select:focus{box-shadow:0 0 0 .1rem rgba(232,86,0,.2)}.form-checkbox.is-error .form-icon,.form-radio.is-error .form-icon,.form-switch.is-error .form-icon,.has-error .form-checkbox .form-icon,.has-error .form-radio .form-icon,.has-error .form-switch .form-icon{border-color:#e85600}.form-checkbox.is-error input:checked+.form-icon,.form-radio.is-error input:checked+.form-icon,.form-switch.is-error input:checked+.form-icon,.has-error .form-checkbox input:checked+.form-icon,.has-error .form-radio input:checked+.form-icon,.has-error .form-switch input:checked+.form-icon{background:#e85600;border-color:#e85600}.form-checkbox.is-error input:focus+.form-icon,.form-radio.is-error input:focus+.form-icon,.form-switch.is-error input:focus+.form-icon,.has-error .form-checkbox input:focus+.form-icon,.has-error .form-radio input:focus+.form-icon,.has-error .form-switch input:focus+.form-icon{border-color:#e85600;box-shadow:0 0 0 .1rem rgba(232,86,0,.2)}.form-checkbox.is-error input:indeterminate+.form-icon,.has-error .form-checkbox input:indeterminate+.form-icon{background:#e85600;border-color:#e85600}.form-input:not(:-ms-input-placeholder):invalid{border-color:#e85600}.form-input:not(:placeholder-shown):invalid{border-color:#e85600}.form-input:not(:-ms-input-placeholder):invalid:focus{background:#fffaf7;box-shadow:0 0 0 .1rem rgba(232,86,0,.2)}.form-input:not(:placeholder-shown):invalid:focus{background:#fffaf7;box-shadow:0 0 0 .1rem rgba(232,86,0,.2)}.form-input:not(:-ms-input-placeholder):invalid+.form-input-hint{color:#e85600}.form-input:not(:placeholder-shown):invalid+.form-input-hint{color:#e85600}.form-input.disabled,.form-input:disabled,.form-select.disabled,.form-select:disabled{background-color:#eef0f3;cursor:not-allowed;opacity:.5}.form-input[readonly]{background-color:#f7f8f9}input.disabled+.form-icon,input:disabled+.form-icon{background:#eef0f3;cursor:not-allowed;opacity:.5}.form-switch input.disabled+.form-icon::before,.form-switch input:disabled+.form-icon::before{background:#fff}.form-horizontal{padding:.4rem 0}.form-horizontal .form-group{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.form-inline{display:inline-block}.label{background:#eef0f3;border-radius:.1rem;color:#455060;display:inline-block;line-height:1.25;padding:.1rem .2rem}.label.label-rounded{border-radius:5rem;padding-left:.4rem;padding-right:.4rem}.label.label-primary{background:#5755d9;color:#fff}.label.label-secondary{background:#f1f1fc;color:#5755d9}.label.label-success{background:#32b643;color:#fff}.label.label-warning{background:#ffb700;color:#fff}.label.label-error{background:#e85600;color:#fff}code{background:#fcf2f2;border-radius:.1rem;color:#d73e48;font-size:85%;line-height:1.25;padding:.1rem .2rem}.code{border-radius:.1rem;color:#3b4351;position:relative}.code::before{color:#bcc3ce;content:attr(data-lang);font-size:.7rem;position:absolute;right:.4rem;top:.1rem}.code code{background:#f7f8f9;color:inherit;display:block;line-height:1.5;overflow-x:auto;padding:1rem;width:100%}.img-responsive{display:block;height:auto;max-width:100%}.img-fit-cover{object-fit:cover}.img-fit-contain{object-fit:contain}.video-responsive{display:block;overflow:hidden;padding:0;position:relative;width:100%}.video-responsive::before{content:"";display:block;padding-bottom:56.25%}.video-responsive embed,.video-responsive iframe,.video-responsive object{border:0;bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%}video.video-responsive{height:auto;max-width:100%}video.video-responsive::before{content:none}.video-responsive-4-3::before{padding-bottom:75%}.video-responsive-1-1::before{padding-bottom:100%}.figure{margin:0 0 .4rem 0}.figure .figure-caption{color:#66758c;margin-top:.4rem}.container{margin-left:auto;margin-right:auto;padding-left:.4rem;padding-right:.4rem;width:100%}.container.grid-xl{max-width:1296px}.container.grid-lg{max-width:976px}.container.grid-md{max-width:856px}.container.grid-sm{max-width:616px}.container.grid-xs{max-width:496px}.show-lg,.show-md,.show-sm,.show-xl,.show-xs{display:none!important}.cols,.columns{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-left:-.4rem;margin-right:-.4rem}.cols.col-gapless,.columns.col-gapless{margin-left:0;margin-right:0}.cols.col-gapless>.column,.columns.col-gapless>.column{padding-left:0;padding-right:0}.cols.col-oneline,.columns.col-oneline{-ms-flex-wrap:nowrap;flex-wrap:nowrap;overflow-x:auto}.column,[class~=col-]{-ms-flex:1;flex:1;max-width:100%;padding-left:.4rem;padding-right:.4rem}.column.col-1,.column.col-10,.column.col-11,.column.col-12,.column.col-2,.column.col-3,.column.col-4,.column.col-5,.column.col-6,.column.col-7,.column.col-8,.column.col-9,.column.col-auto,[class~=col-].col-1,[class~=col-].col-10,[class~=col-].col-11,[class~=col-].col-12,[class~=col-].col-2,[class~=col-].col-3,[class~=col-].col-4,[class~=col-].col-5,[class~=col-].col-6,[class~=col-].col-7,[class~=col-].col-8,[class~=col-].col-9,[class~=col-].col-auto{-ms-flex:none;flex:none}.col-12{width:100%}.col-11{width:91.66666667%}.col-10{width:83.33333333%}.col-9{width:75%}.col-8{width:66.66666667%}.col-7{width:58.33333333%}.col-6{width:50%}.col-5{width:41.66666667%}.col-4{width:33.33333333%}.col-3{width:25%}.col-2{width:16.66666667%}.col-1{width:8.33333333%}.col-auto{-ms-flex:0 0 auto;flex:0 0 auto;max-width:none;width:auto}.col-mx-auto{margin-left:auto;margin-right:auto}.col-ml-auto{margin-left:auto}.col-mr-auto{margin-right:auto}@media (max-width:1280px){.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-auto{-ms-flex:none;flex:none}.col-xl-12{width:100%}.col-xl-11{width:91.66666667%}.col-xl-10{width:83.33333333%}.col-xl-9{width:75%}.col-xl-8{width:66.66666667%}.col-xl-7{width:58.33333333%}.col-xl-6{width:50%}.col-xl-5{width:41.66666667%}.col-xl-4{width:33.33333333%}.col-xl-3{width:25%}.col-xl-2{width:16.66666667%}.col-xl-1{width:8.33333333%}.col-xl-auto{width:auto}.hide-xl{display:none!important}.show-xl{display:block!important}}@media (max-width:960px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-auto{-ms-flex:none;flex:none}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-auto{width:auto}.hide-lg{display:none!important}.show-lg{display:block!important}}@media (max-width:840px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-auto{-ms-flex:none;flex:none}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-auto{width:auto}.hide-md{display:none!important}.show-md{display:block!important}}@media (max-width:600px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-auto{-ms-flex:none;flex:none}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-auto{width:auto}.hide-sm{display:none!important}.show-sm{display:block!important}}@media (max-width:480px){.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-auto{-ms-flex:none;flex:none}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-auto{width:auto}.hide-xs{display:none!important}.show-xs{display:block!important}}.hero{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;padding-bottom:4rem;padding-top:4rem}.hero.hero-sm{padding-bottom:2rem;padding-top:2rem}.hero.hero-lg{padding-bottom:8rem;padding-top:8rem}.hero .hero-body{padding:.4rem}.navbar{align-items:stretch;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;-ms-flex-pack:justify;-ms-flex-wrap:wrap;flex-wrap:wrap;justify-content:space-between}.navbar .navbar-section{align-items:center;display:-ms-flexbox;display:flex;-ms-flex:1 0 0;flex:1 0 0;-ms-flex-align:center}.navbar .navbar-section:not(:first-child):last-child{-ms-flex-pack:end;justify-content:flex-end}.navbar .navbar-center{align-items:center;display:-ms-flexbox;display:flex;-ms-flex:0 0 auto;flex:0 0 auto;-ms-flex-align:center}.navbar .navbar-brand{font-size:.9rem;text-decoration:none}.accordion input:checked~.accordion-header>.icon:first-child,.accordion[open] .accordion-header>.icon:first-child{transform:rotate(90deg)}.accordion input:checked~.accordion-body,.accordion[open] .accordion-body{max-height:50rem}.accordion .accordion-header{display:block;padding:.2rem .4rem}.accordion .accordion-header .icon{transition:transform .25s}.accordion .accordion-body{margin-bottom:.4rem;max-height:0;overflow:hidden;transition:max-height .25s}summary.accordion-header::-webkit-details-marker{display:none}.avatar{background:#5755d9;border-radius:50%;color:rgba(255,255,255,.85);display:inline-block;font-size:.8rem;font-weight:300;height:1.6rem;line-height:1.25;margin:0;position:relative;vertical-align:middle;width:1.6rem}.avatar.avatar-xs{font-size:.4rem;height:.8rem;width:.8rem}.avatar.avatar-sm{font-size:.6rem;height:1.2rem;width:1.2rem}.avatar.avatar-lg{font-size:1.2rem;height:2.4rem;width:2.4rem}.avatar.avatar-xl{font-size:1.6rem;height:3.2rem;width:3.2rem}.avatar img{border-radius:50%;height:100%;position:relative;width:100%;z-index:1}.avatar .avatar-icon,.avatar .avatar-presence{background:#fff;bottom:14.64%;height:50%;padding:.1rem;position:absolute;right:14.64%;transform:translate(50%,50%);width:50%;z-index:2}.avatar .avatar-presence{background:#bcc3ce;border-radius:50%;box-shadow:0 0 0 .1rem #fff;height:.5em;width:.5em}.avatar .avatar-presence.online{background:#32b643}.avatar .avatar-presence.busy{background:#e85600}.avatar .avatar-presence.away{background:#ffb700}.avatar[data-initial]::before{color:currentColor;content:attr(data-initial);left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:1}.badge{position:relative;white-space:nowrap}.badge:not([data-badge])::after,.badge[data-badge]::after{background:#5755d9;background-clip:padding-box;border-radius:.5rem;box-shadow:0 0 0 .1rem #fff;color:#fff;content:attr(data-badge);display:inline-block;transform:translate(-.05rem,-.5rem)}.badge[data-badge]::after{font-size:.7rem;height:.9rem;line-height:1;min-width:.9rem;padding:.1rem .2rem;text-align:center;white-space:nowrap}.badge:not([data-badge])::after,.badge[data-badge=""]::after{height:6px;min-width:6px;padding:0;width:6px}.badge.btn::after{position:absolute;right:0;top:0;transform:translate(50%,-50%)}.badge.avatar::after{position:absolute;right:14.64%;top:14.64%;transform:translate(50%,-50%);z-index:100}.breadcrumb{list-style:none;margin:.2rem 0;padding:.2rem 0}.breadcrumb .breadcrumb-item{color:#66758c;display:inline-block;margin:0;padding:.2rem 0}.breadcrumb .breadcrumb-item:not(:last-child){margin-right:.2rem}.breadcrumb .breadcrumb-item:not(:last-child) a{color:#66758c}.breadcrumb .breadcrumb-item:not(:first-child)::before{color:#66758c;content:"/";padding-right:.4rem}.bar{background:#eef0f3;border-radius:.1rem;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;height:.8rem;width:100%}.bar.bar-sm{height:.2rem}.bar .bar-item{background:#5755d9;color:#fff;display:block;-ms-flex-negative:0;flex-shrink:0;font-size:.7rem;height:100%;line-height:.8rem;position:relative;text-align:center;width:0}.bar .bar-item:first-child{border-bottom-left-radius:.1rem;border-top-left-radius:.1rem}.bar .bar-item:last-child{border-bottom-right-radius:.1rem;border-top-right-radius:.1rem;-ms-flex-negative:1;flex-shrink:1}.bar-slider{height:.1rem;margin:.4rem 0;position:relative}.bar-slider .bar-item{left:0;padding:0;position:absolute}.bar-slider .bar-item:not(:last-child):first-child{background:#eef0f3;z-index:1}.bar-slider .bar-slider-btn{background:#5755d9;border:0;border-radius:50%;height:.6rem;padding:0;position:absolute;right:0;top:50%;transform:translate(50%,-50%);width:.6rem}.bar-slider .bar-slider-btn:active{box-shadow:0 0 0 .1rem #5755d9}.card{background:#fff;border:.05rem solid #dadee4;border-radius:.1rem;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.card .card-body,.card .card-footer,.card .card-header{padding:.8rem;padding-bottom:0}.card .card-body:last-child,.card .card-footer:last-child,.card .card-header:last-child{padding-bottom:.8rem}.card .card-body{-ms-flex:1 1 auto;flex:1 1 auto}.card .card-image{padding-top:.8rem}.card .card-image:first-child{padding-top:0}.card .card-image:first-child img{border-top-left-radius:.1rem;border-top-right-radius:.1rem}.card .card-image:last-child img{border-bottom-left-radius:.1rem;border-bottom-right-radius:.1rem}.chip{align-items:center;background:#eef0f3;border-radius:5rem;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;font-size:90%;height:1.2rem;line-height:.8rem;margin:.1rem;max-width:320px;overflow:hidden;padding:.2rem .4rem;text-decoration:none;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.chip.active{background:#5755d9;color:#fff}.chip .avatar{margin-left:-.4rem;margin-right:.2rem}.chip .btn-clear{border-radius:50%;transform:scale(.75)}.dropdown{display:inline-block;position:relative}.dropdown .menu{animation:slide-down .15s ease 1;display:none;left:0;max-height:50vh;overflow-y:auto;position:absolute;top:100%}.dropdown.dropdown-right .menu{left:auto;right:0}.dropdown .dropdown-toggle:focus+.menu,.dropdown .menu:hover,.dropdown.active .menu{display:block}.dropdown .btn-group .dropdown-toggle:nth-last-child(2){border-bottom-right-radius:.1rem;border-top-right-radius:.1rem}.empty{background:#f7f8f9;border-radius:.1rem;color:#66758c;padding:3.2rem 1.6rem;text-align:center}.empty .empty-icon{margin-bottom:.8rem}.empty .empty-subtitle,.empty .empty-title{margin:.4rem auto}.empty .empty-action{margin-top:.8rem}.menu{background:#fff;border-radius:.1rem;box-shadow:0 .05rem .2rem rgba(48,55,66,.3);list-style:none;margin:0;min-width:180px;padding:.4rem;transform:translateY(.2rem);z-index:300}.menu.menu-nav{background:0 0;box-shadow:none}.menu .menu-item{margin-top:0;padding:0 .4rem;position:relative;text-decoration:none}.menu .menu-item>a{border-radius:.1rem;color:inherit;display:block;margin:0 -.4rem;padding:.2rem .4rem;text-decoration:none}.menu .menu-item>a:focus,.menu .menu-item>a:hover{background:#f1f1fc;color:#5755d9}.menu .menu-item>a.active,.menu .menu-item>a:active{background:#f1f1fc;color:#5755d9}.menu .menu-item .form-checkbox,.menu .menu-item .form-radio,.menu .menu-item .form-switch{margin:.1rem 0}.menu .menu-item+.menu-item{margin-top:.2rem}.menu .menu-badge{align-items:center;display:-ms-flexbox;display:flex;-ms-flex-align:center;height:100%;position:absolute;right:0;top:0}.menu .menu-badge .label{margin-right:.4rem}.modal{align-items:center;bottom:0;display:none;-ms-flex-align:center;-ms-flex-pack:center;justify-content:center;left:0;opacity:0;overflow:hidden;padding:.4rem;position:fixed;right:0;top:0}.modal.active,.modal:target{display:-ms-flexbox;display:flex;opacity:1;z-index:400}.modal.active .modal-overlay,.modal:target .modal-overlay{background:rgba(247,248,249,.75);bottom:0;cursor:default;display:block;left:0;position:absolute;right:0;top:0}.modal.active .modal-container,.modal:target .modal-container{animation:slide-down .2s ease 1;z-index:1}.modal.modal-sm .modal-container{max-width:320px;padding:0 .4rem}.modal.modal-lg .modal-overlay{background:#fff}.modal.modal-lg .modal-container{box-shadow:none;max-width:960px}.modal-container{background:#fff;border-radius:.1rem;box-shadow:0 .2rem .5rem rgba(48,55,66,.3);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:75vh;max-width:640px;padding:0 .8rem;width:100%}.modal-container.modal-fullheight{max-height:100vh}.modal-container .modal-header{color:#303742;padding:.8rem}.modal-container .modal-body{overflow-y:auto;padding:.8rem;position:relative}.modal-container .modal-footer{padding:.8rem;text-align:right}.nav{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;list-style:none;margin:.2rem 0}.nav .nav-item a{color:#66758c;padding:.2rem .4rem;text-decoration:none}.nav .nav-item a:focus,.nav .nav-item a:hover{color:#5755d9}.nav .nav-item.active>a{color:#505c6e;font-weight:700}.nav .nav-item.active>a:focus,.nav .nav-item.active>a:hover{color:#5755d9}.nav .nav{margin-bottom:.4rem;margin-left:.8rem}.pagination{display:-ms-flexbox;display:flex;list-style:none;margin:.2rem 0;padding:.2rem 0}.pagination .page-item{margin:.2rem .05rem}.pagination .page-item span{display:inline-block;padding:.2rem .2rem}.pagination .page-item a{border-radius:.1rem;display:inline-block;padding:.2rem .4rem;text-decoration:none}.pagination .page-item a:focus,.pagination .page-item a:hover{color:#5755d9}.pagination .page-item.disabled a{cursor:default;opacity:.5;pointer-events:none}.pagination .page-item.active a{background:#5755d9;color:#fff}.pagination .page-item.page-next,.pagination .page-item.page-prev{-ms-flex:1 0 50%;flex:1 0 50%}.pagination .page-item.page-next{text-align:right}.pagination .page-item .page-item-title{margin:0}.pagination .page-item .page-item-subtitle{margin:0;opacity:.5}.panel{border:.05rem solid #dadee4;border-radius:.1rem;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.panel .panel-footer,.panel .panel-header{-ms-flex:0 0 auto;flex:0 0 auto;padding:.8rem}.panel .panel-nav{-ms-flex:0 0 auto;flex:0 0 auto}.panel .panel-body{-ms-flex:1 1 auto;flex:1 1 auto;overflow-y:auto;padding:0 .8rem}.popover{display:inline-block;position:relative}.popover .popover-container{left:50%;opacity:0;padding:.4rem;position:absolute;top:0;transform:translate(-50%,-50%) scale(0);transition:transform .2s;width:320px;z-index:300}.popover :focus+.popover-container,.popover:hover .popover-container{display:block;opacity:1;transform:translate(-50%,-100%) scale(1)}.popover.popover-right .popover-container{left:100%;top:50%}.popover.popover-right :focus+.popover-container,.popover.popover-right:hover .popover-container{transform:translate(0,-50%) scale(1)}.popover.popover-bottom .popover-container{left:50%;top:100%}.popover.popover-bottom :focus+.popover-container,.popover.popover-bottom:hover .popover-container{transform:translate(-50%,0) scale(1)}.popover.popover-left .popover-container{left:0;top:50%}.popover.popover-left :focus+.popover-container,.popover.popover-left:hover .popover-container{transform:translate(-100%,-50%) scale(1)}.popover .card{border:0;box-shadow:0 .2rem .5rem rgba(48,55,66,.3)}.step{display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;list-style:none;margin:.2rem 0;width:100%}.step .step-item{-ms-flex:1 1 0;flex:1 1 0;margin-top:0;min-height:1rem;position:relative;text-align:center}.step .step-item:not(:first-child)::before{background:#5755d9;content:"";height:2px;left:-50%;position:absolute;top:9px;width:100%}.step .step-item a{color:#5755d9;display:inline-block;padding:20px 10px 0;text-decoration:none}.step .step-item a::before{background:#5755d9;border:.1rem solid #fff;border-radius:50%;content:"";display:block;height:.6rem;left:50%;position:absolute;top:.2rem;transform:translateX(-50%);width:.6rem;z-index:1}.step .step-item.active a::before{background:#fff;border:.1rem solid #5755d9}.step .step-item.active~.step-item::before{background:#dadee4}.step .step-item.active~.step-item a{color:#bcc3ce}.step .step-item.active~.step-item a::before{background:#dadee4}.tab{align-items:center;border-bottom:.05rem solid #dadee4;display:-ms-flexbox;display:flex;-ms-flex-align:center;-ms-flex-wrap:wrap;flex-wrap:wrap;list-style:none;margin:.2rem 0 .15rem 0}.tab .tab-item{margin-top:0}.tab .tab-item a{border-bottom:.1rem solid transparent;color:inherit;display:block;margin:0 .4rem 0 0;padding:.4rem .2rem .3rem .2rem;text-decoration:none}.tab .tab-item a:focus,.tab .tab-item a:hover{color:#5755d9}.tab .tab-item a.active,.tab .tab-item.active a{border-bottom-color:#5755d9;color:#5755d9}.tab .tab-item.tab-action{-ms-flex:1 0 auto;flex:1 0 auto;text-align:right}.tab .tab-item .btn-clear{margin-top:-.2rem}.tab.tab-block .tab-item{-ms-flex:1 0 0;flex:1 0 0;text-align:center}.tab.tab-block .tab-item a{margin:0}.tab.tab-block .tab-item .badge[data-badge]::after{position:absolute;right:.1rem;top:.1rem;transform:translate(0,0)}.tab:not(.tab-block) .badge{padding-right:0}.tile{align-content:space-between;align-items:flex-start;display:-ms-flexbox;display:flex;-ms-flex-align:start;-ms-flex-line-pack:justify}.tile .tile-action,.tile .tile-icon{-ms-flex:0 0 auto;flex:0 0 auto}.tile .tile-content{-ms-flex:1 1 auto;flex:1 1 auto}.tile .tile-content:not(:first-child){padding-left:.4rem}.tile .tile-content:not(:last-child){padding-right:.4rem}.tile .tile-subtitle,.tile .tile-title{line-height:1.2rem}.tile.tile-centered{align-items:center;-ms-flex-align:center}.tile.tile-centered .tile-content{overflow:hidden}.tile.tile-centered .tile-subtitle,.tile.tile-centered .tile-title{margin-bottom:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.toast{background:rgba(48,55,66,.95);border:.05rem solid #303742;border-color:#303742;border-radius:.1rem;color:#fff;display:block;padding:.4rem;width:100%}.toast.toast-primary{background:rgba(87,85,217,.95);border-color:#5755d9}.toast.toast-success{background:rgba(50,182,67,.95);border-color:#32b643}.toast.toast-warning{background:rgba(255,183,0,.95);border-color:#ffb700}.toast.toast-error{background:rgba(232,86,0,.95);border-color:#e85600}.toast a{color:#fff;text-decoration:underline}.toast a.active,.toast a:active,.toast a:focus,.toast a:hover{opacity:.75}.toast .btn-clear{margin:.1rem}.toast p:last-child{margin-bottom:0}.tooltip{position:relative}.tooltip::after{background:rgba(48,55,66,.95);border-radius:.1rem;bottom:100%;color:#fff;content:attr(data-tooltip);display:block;font-size:.7rem;left:50%;max-width:320px;opacity:0;overflow:hidden;padding:.2rem .4rem;pointer-events:none;position:absolute;text-overflow:ellipsis;transform:translate(-50%,.4rem);transition:opacity .2s,transform .2s;white-space:pre;z-index:300}.tooltip:focus::after,.tooltip:hover::after{opacity:1;transform:translate(-50%,-.2rem)}.tooltip.disabled,.tooltip[disabled]{pointer-events:auto}.tooltip.tooltip-right::after{bottom:50%;left:100%;transform:translate(-.2rem,50%)}.tooltip.tooltip-right:focus::after,.tooltip.tooltip-right:hover::after{transform:translate(.2rem,50%)}.tooltip.tooltip-bottom::after{bottom:auto;top:100%;transform:translate(-50%,-.4rem)}.tooltip.tooltip-bottom:focus::after,.tooltip.tooltip-bottom:hover::after{transform:translate(-50%,.2rem)}.tooltip.tooltip-left::after{bottom:50%;left:auto;right:100%;transform:translate(.4rem,50%)}.tooltip.tooltip-left:focus::after,.tooltip.tooltip-left:hover::after{transform:translate(-.2rem,50%)}@keyframes loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes slide-down{0%{opacity:0;transform:translateY(-1.6rem)}100%{opacity:1;transform:translateY(0)}}.text-primary{color:#5755d9!important}a.text-primary:focus,a.text-primary:hover{color:#4240d4}a.text-primary:visited{color:#6c6ade}.text-secondary{color:#e5e5f9!important}a.text-secondary:focus,a.text-secondary:hover{color:#d1d0f4}a.text-secondary:visited{color:#fafafe}.text-gray{color:#bcc3ce!important}a.text-gray:focus,a.text-gray:hover{color:#adb6c4}a.text-gray:visited{color:#cbd0d9}.text-light{color:#fff!important}a.text-light:focus,a.text-light:hover{color:#f2f2f2}a.text-light:visited{color:#fff}.text-dark{color:#3b4351!important}a.text-dark:focus,a.text-dark:hover{color:#303742}a.text-dark:visited{color:#455060}.text-success{color:#32b643!important}a.text-success:focus,a.text-success:hover{color:#2da23c}a.text-success:visited{color:#39c94b}.text-warning{color:#ffb700!important}a.text-warning:focus,a.text-warning:hover{color:#e6a500}a.text-warning:visited{color:#ffbe1a}.text-error{color:#e85600!important}a.text-error:focus,a.text-error:hover{color:#cf4d00}a.text-error:visited{color:#ff6003}.bg-primary{background:#5755d9!important;color:#fff}.bg-secondary{background:#f1f1fc!important}.bg-dark{background:#303742!important;color:#fff}.bg-gray{background:#f7f8f9!important}.bg-success{background:#32b643!important;color:#fff}.bg-warning{background:#ffb700!important;color:#fff}.bg-error{background:#e85600!important;color:#fff}.c-hand{cursor:pointer}.c-move{cursor:move}.c-zoom-in{cursor:zoom-in}.c-zoom-out{cursor:zoom-out}.c-not-allowed{cursor:not-allowed}.c-auto{cursor:auto}.d-block{display:block}.d-inline{display:inline}.d-inline-block{display:inline-block}.d-flex{display:-ms-flexbox;display:flex}.d-inline-flex{display:-ms-inline-flexbox;display:inline-flex}.d-hide,.d-none{display:none!important}.d-visible{visibility:visible}.d-invisible{visibility:hidden}.text-hide{background:0 0;border:0;color:transparent;font-size:0;line-height:0;text-shadow:none}.text-assistive{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.divider,.divider-vert{display:block;position:relative}.divider-vert[data-content]::after,.divider[data-content]::after{background:#fff;color:#bcc3ce;content:attr(data-content);display:inline-block;font-size:.7rem;padding:0 .4rem;transform:translateY(-.65rem)}.divider{border-top:.05rem solid #f1f3f5;height:.05rem;margin:.4rem 0}.divider[data-content]{margin:.8rem 0}.divider-vert{display:block;padding:.8rem}.divider-vert::before{border-left:.05rem solid #dadee4;bottom:.4rem;content:"";display:block;left:50%;position:absolute;top:.4rem;transform:translateX(-50%)}.divider-vert[data-content]::after{left:50%;padding:.2rem 0;position:absolute;top:50%;transform:translate(-50%,-50%)}.loading{color:transparent!important;min-height:.8rem;pointer-events:none;position:relative}.loading::after{animation:loading .5s infinite linear;background:0 0;border:.1rem solid #5755d9;border-radius:50%;border-right-color:transparent;border-top-color:transparent;content:"";display:block;height:.8rem;left:50%;margin-left:-.4rem;margin-top:-.4rem;opacity:1;padding:0;position:absolute;top:50%;width:.8rem;z-index:1}.loading.loading-lg{min-height:2rem}.loading.loading-lg::after{height:1.6rem;margin-left:-.8rem;margin-top:-.8rem;width:1.6rem}.clearfix::after{clear:both;content:"";display:table}.float-left{float:left!important}.float-right{float:right!important}.p-relative{position:relative!important}.p-absolute{position:absolute!important}.p-fixed{position:fixed!important}.p-sticky{position:-webkit-sticky!important;position:sticky!important}.p-centered{display:block;float:none;margin-left:auto;margin-right:auto}.flex-centered{align-items:center;display:-ms-flexbox;display:flex;-ms-flex-align:center;-ms-flex-pack:center;justify-content:center}.m-0{margin:0!important}.mb-0{margin-bottom:0!important}.ml-0{margin-left:0!important}.mr-0{margin-right:0!important}.mt-0{margin-top:0!important}.mx-0{margin-left:0!important;margin-right:0!important}.my-0{margin-bottom:0!important;margin-top:0!important}.m-1{margin:.2rem!important}.mb-1{margin-bottom:.2rem!important}.ml-1{margin-left:.2rem!important}.mr-1{margin-right:.2rem!important}.mt-1{margin-top:.2rem!important}.mx-1{margin-left:.2rem!important;margin-right:.2rem!important}.my-1{margin-bottom:.2rem!important;margin-top:.2rem!important}.m-2{margin:.4rem!important}.mb-2{margin-bottom:.4rem!important}.ml-2{margin-left:.4rem!important}.mr-2{margin-right:.4rem!important}.mt-2{margin-top:.4rem!important}.mx-2{margin-left:.4rem!important;margin-right:.4rem!important}.my-2{margin-bottom:.4rem!important;margin-top:.4rem!important}.p-0{padding:0!important}.pb-0{padding-bottom:0!important}.pl-0{padding-left:0!important}.pr-0{padding-right:0!important}.pt-0{padding-top:0!important}.px-0{padding-left:0!important;padding-right:0!important}.py-0{padding-bottom:0!important;padding-top:0!important}.p-1{padding:.2rem!important}.pb-1{padding-bottom:.2rem!important}.pl-1{padding-left:.2rem!important}.pr-1{padding-right:.2rem!important}.pt-1{padding-top:.2rem!important}.px-1{padding-left:.2rem!important;padding-right:.2rem!important}.py-1{padding-bottom:.2rem!important;padding-top:.2rem!important}.p-2{padding:.4rem!important}.pb-2{padding-bottom:.4rem!important}.pl-2{padding-left:.4rem!important}.pr-2{padding-right:.4rem!important}.pt-2{padding-top:.4rem!important}.px-2{padding-left:.4rem!important;padding-right:.4rem!important}.py-2{padding-bottom:.4rem!important;padding-top:.4rem!important}.s-rounded{border-radius:.1rem}.s-circle{border-radius:50%}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-normal{font-weight:400}.text-bold{font-weight:700}.text-italic{font-style:italic}.text-large{font-size:1.2em}.text-small{font-size:.9em}.text-tiny{font-size:.8em}.text-muted{opacity:.8}.text-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-clip{overflow:hidden;text-overflow:clip;white-space:nowrap}.text-break{-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;word-break:break-word;word-wrap:break-word}
admin/assets/img/bg2.png DELETED
Binary file
admin/assets/img/bg22.png DELETED
Binary file
admin/assets/img/fb-icon.png DELETED
Binary file
admin/assets/img/fon.jpg DELETED
Binary file
admin/assets/img/insta-icon.png DELETED
Binary file
admin/assets/img/logo.png ADDED
Binary file
admin/assets/js/admin-script.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ (function ($) {
2
+ $(document).ready(function ($) {
3
+
4
+ });
5
+ })(jQuery);
admin/assets/js/cbpFWTabs.js DELETED
@@ -1,72 +0,0 @@
1
- /**
2
- * cbpFWTabs.js v1.0.0
3
- * http://www.codrops.com
4
- *
5
- * Licensed under the MIT license.
6
- * http://www.opensource.org/licenses/mit-license.php
7
- *
8
- * Copyright 2014, Codrops
9
- * http://www.codrops.com
10
- */
11
- ;(function (window) {
12
-
13
- 'use strict';
14
-
15
- function extend(a, b) {
16
- for (var key in b) {
17
- if (b.hasOwnProperty(key)) {
18
- a[key] = b[key];
19
- }
20
- }
21
- return a;
22
- }
23
-
24
- function CBPFWTabs(el, options) {
25
- this.el = el;
26
- this.options = extend({}, this.options);
27
- extend(this.options, options);
28
- this._init();
29
- }
30
-
31
- CBPFWTabs.prototype.options = {
32
- start: 0
33
- };
34
-
35
- CBPFWTabs.prototype._init = function () {
36
- // tabs elemes
37
- this.tabs = [].slice.call(this.el.querySelectorAll('nav > ul > li'));
38
- // content items
39
- this.items = [].slice.call(this.el.querySelectorAll('.content > section'));
40
- // current index
41
- this.current = -1;
42
- // show current content item
43
- this._show();
44
- // init events
45
- this._initEvents();
46
- };
47
-
48
- CBPFWTabs.prototype._initEvents = function () {
49
- var self = this;
50
- this.tabs.forEach(function (tab, idx) {
51
- tab.addEventListener('click', function (ev) {
52
- ev.preventDefault();
53
- self._show(idx);
54
- });
55
- });
56
- };
57
-
58
- CBPFWTabs.prototype._show = function (idx) {
59
- if (this.current >= 0) {
60
- this.tabs[this.current].className = '';
61
- this.items[this.current].className = '';
62
- }
63
- // change current
64
- this.current = idx != undefined ? idx : this.options.start >= 0 && this.options.start < this.items.length ? this.options.start : 0;
65
- this.tabs[this.current].className = 'tab-current';
66
- this.items[this.current].className = 'content-current';
67
- };
68
-
69
- // add to global namespace
70
- window.CBPFWTabs = CBPFWTabs;
71
-
72
- })(window);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/assets/js/feeds.js ADDED
@@ -0,0 +1,349 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function ($) {
2
+ let search_for_items = wis_feeds.hide_show_fields;
3
+
4
+ function modifySettings(this_object, is_mob) {
5
+ var template = $(this_object);
6
+ var prefix = "";
7
+ if (is_mob) {
8
+ prefix = "m_";
9
+ }
10
+ if (template.val() === 'thumbs' || template.val() === 'thumbs-no-border') {
11
+ showSelector(template, '.' + prefix + 'thumbs_settings');
12
+ } else {
13
+ hideSelector(template, '.' + prefix + 'thumbs_settings');
14
+ }
15
+
16
+ if (template.val() !== 'masonry') {
17
+ hideSelector(template, '.' + prefix + 'masonry_settings');
18
+ hideSelector(template, '.' + prefix + 'masonry_notice');
19
+ } else {
20
+ showSelector(template, '.' + prefix + 'masonry_settings');
21
+ showSelector(template, '.' + prefix + 'masonry_notice');
22
+ }
23
+
24
+ if (template.val() !== 'masonry_lite') {
25
+ hideSelector(template, '.' + prefix + 'masonry_lite_settings');
26
+ } else {
27
+ showSelector(template, '.' + prefix + 'masonry_lite_settings');
28
+ }
29
+
30
+ if (template.val() !== 'slick_slider') {
31
+ hideSelector(template, '.' + prefix + 'slick_settings');
32
+ } else {
33
+ showSelector(template, '.' + prefix + 'slick_settings');
34
+ }
35
+
36
+ if (template.val() !== 'highlight') {
37
+ hideSelector(template, '.' + prefix + 'highlight_settings');
38
+ } else {
39
+ showSelector(template, '.' + prefix + 'highlight_settings');
40
+ }
41
+
42
+ if (template.val() !== 'showcase') {
43
+ hideSelector(template, '.' + prefix + 'shopifeed_settings');
44
+ $('.isw-linkto').animate({
45
+ opacity: 'show',
46
+ height: 'show'
47
+ }, 200);
48
+ } else {
49
+ showSelector(template, '.' + prefix + 'shopifeed_settings');
50
+ $('.isw-linkto').animate({
51
+ opacity: 'hide',
52
+ height: 'hide'
53
+ }, 200);
54
+ }
55
+
56
+ if (template.val() !== 'slider' && template.val() !== 'slider-overlay') {
57
+ hideSelector(template, '.' + prefix + 'slider_normal_settings');
58
+ } else {
59
+ showSelector(template, '.' + prefix + 'slider_normal_settings');
60
+ }
61
+ if (template.val() === 'highlight' || template.val() === 'slick_slider' || template.val() === 'thumbs' || template.val() === 'thumbs-no-border') {
62
+ hideSelector(template, '.' + prefix + 'words_in_caption');
63
+ } else {
64
+ showSelector(template, '.' + prefix + 'words_in_caption');
65
+ }
66
+
67
+ if (template.val() === 'thumbs' || template.val() === 'thumbs-no-border' || template.val() === 'slider' || template.val() === 'slider-overlay') {
68
+ hideSelector(template, 'select[id$="' + prefix + 'images_link"] option[value="popup"]');
69
+
70
+ window.image_link_val = template.closest('.jr-container').find('select[id$="' + prefix + 'images_link"]').val();
71
+ } else {
72
+ showSelector(template, 'select[id$="' + prefix + 'images_link"] option[value="popup"]');
73
+ }
74
+ }
75
+
76
+ function showSelector(closestFor, selector) {
77
+ closestFor.closest('.jr-container').find(selector).animate({
78
+ opacity: 'show',
79
+ height: 'show'
80
+ }, 200);
81
+ }
82
+
83
+ function hideSelector(closestFor, selector) {
84
+ closestFor.closest('.jr-container').find(selector).animate({
85
+ opacity: 'hide',
86
+ height: 'hide'
87
+ }, 200);
88
+ }
89
+
90
+ function hideField(closestFor, fieldName) {
91
+ closestFor.closest('.jr-container').find('#wis-field-' + fieldName).animate({
92
+ opacity: 'hide',
93
+ height: 'hide'
94
+ }, 200);
95
+ }
96
+
97
+ function showField(closestFor, fieldName) {
98
+ closestFor.closest('.jr-container').find('#wis-field-' + fieldName).animate({
99
+ opacity: 'show',
100
+ height: 'show'
101
+ }, 200);
102
+ }
103
+
104
+ function showSearchForSetting(show = '') {
105
+ Object.entries(search_for_items).forEach(function (search, i, arr) {
106
+ item = search[1];
107
+
108
+ if (show === item) {
109
+ $('#wis-feed-' + item).animate({
110
+ opacity: 'show',
111
+ height: 'show'
112
+ }, 150);
113
+ } else {
114
+ $('#wis-feed-' + item).animate({
115
+ opacity: 'hide',
116
+ height: 'hide'
117
+ }, 150);
118
+ }
119
+ });
120
+ }
121
+
122
+ $('input[name="savewidget"]').on('click', function () {
123
+ setTimeout(function () {
124
+ $(".isw-tabs").lightTabs();
125
+ }, 1500);
126
+
127
+ })
128
+
129
+ $(document).bind('DOMSubtreeModified', function () {
130
+ showPage = function (i, device) {
131
+ if (device === 'desk') {
132
+ $('#desk_tab_content_' + i).show();
133
+ $('#desk_tab_' + i).addClass("active");
134
+
135
+ $('#mob_tab_content_' + i).hide();
136
+ $('#mob_tab_' + i).removeClass("active");
137
+ }
138
+
139
+ if (device === 'mob') {
140
+ $('#mob_tab_content_' + i).show();
141
+ $('#mob_tab_' + i).addClass("active");
142
+
143
+ $('#desk_tab_content_' + i).hide();
144
+ $('#desk_tab_' + i).removeClass("active");
145
+ }
146
+ }
147
+
148
+ jQuery.fn.lightTabs = function (options) {
149
+ var createTabs = function () {
150
+ tabs = this;
151
+ data_widget_id = tabs.getAttribute("data-widget-id")
152
+ slider_id = data_widget_id.split('-')[1]
153
+ i = slider_id;
154
+
155
+ showPage(i, 'desk');
156
+ };
157
+ return this.each(createTabs);
158
+ };
159
+
160
+ jQuery(document).find(".desk_tab").click(function () {
161
+ let mob_tab_id = this.getAttribute('data-tab-id');
162
+ showPage(mob_tab_id, 'desk')
163
+ });
164
+ jQuery(document).find(".mob_tab").click(function () {
165
+ let mob_tab_id = this.getAttribute('data-tab-id');
166
+ showPage(mob_tab_id, 'mob')
167
+ });
168
+ });
169
+
170
+ $(document).ready(function ($) {
171
+ showPage = function (i, device) {
172
+ if (device === 'desk') {
173
+ $('#desk_tab_content_' + i).show();
174
+ $('#desk_tab_' + i).addClass("active");
175
+
176
+ $('#mob_tab_content_' + i).hide();
177
+ $('#mob_tab_' + i).removeClass("active");
178
+ }
179
+
180
+ if (device === 'mob') {
181
+ $('#mob_tab_content_' + i).show();
182
+ $('#mob_tab_' + i).addClass("active");
183
+
184
+ $('#desk_tab_content_' + i).hide();
185
+ $('#desk_tab_' + i).removeClass("active");
186
+ }
187
+ }
188
+
189
+ jQuery.fn.lightTabs = function (options) {
190
+ var createTabs = function () {
191
+ tabs = this;
192
+ data_widget_id = tabs.getAttribute("data-widget-id")
193
+ slider_id = data_widget_id.split('-')[1]
194
+ i = slider_id;
195
+
196
+ showPage(i, 'desk');
197
+ };
198
+ return this.each(createTabs);
199
+ };
200
+
201
+ jQuery(document).find(".desk_tab").click(function () {
202
+ let mob_tab_id = this.getAttribute('data-tab-id');
203
+ showPage(mob_tab_id, 'desk')
204
+ });
205
+ jQuery(document).find(".mob_tab").click(function () {
206
+ let mob_tab_id = this.getAttribute('data-tab-id');
207
+ showPage(mob_tab_id, 'mob')
208
+ });
209
+
210
+ $(".isw-tabs-content").lightTabs();
211
+
212
+ $('.wis-not-working').on('click', function (e) {
213
+ e.preventDefault();
214
+ $('#wis-add-token').animate({opacity: 'show', height: 'show'}, 200)
215
+ });
216
+
217
+ var template = $('.jr-container select[id$="template"]')
218
+ if (template.val() === 'thumbs' || template.val() === 'thumbs-no-border' || template.val() === 'slider' || template.val() === 'slider-overlay') {
219
+ hideSelector(template, 'select[id$="images_link"] option[value="popup"]');
220
+ } else {
221
+ showSelector(template, 'select[id$="images_link"] option[value="popup"]');
222
+ }
223
+
224
+ // Hide Custom Url if image link is not set to custom url
225
+ $('body').on('change', '.jr-container select[id$="images_link"]', function (e) {
226
+ var images_link = $(this);
227
+ if (images_link.val() !== 'custom_url') {
228
+ images_link.closest('.jr-container').find('input[id$="custom_url"]').val('').parent().animate({
229
+ opacity: 'hide',
230
+ height: 'hide'
231
+ }, 200);
232
+ } else {
233
+ images_link.closest('.jr-container').find('input[id$="custom_url"]').parent().animate({
234
+ opacity: 'show',
235
+ height: 'show'
236
+ }, 200);
237
+ }
238
+ });
239
+
240
+ $('body').on('change', '.jr-container input[id$="keep_ratio"]', function (e) {
241
+ var keep_ratio = $(this);
242
+ if (keep_ratio.is(":checked")) {
243
+ showSelector(keep_ratio, '.slick_img_size');
244
+ } else {
245
+ hideSelector(keep_ratio, '.slick_img_size');
246
+ }
247
+ });
248
+
249
+ $('body').on('change', '.jr-container input[id$="m_keep_ratio"]', function (e) {
250
+ var keep_ratio = $(this);
251
+ if (keep_ratio.is(":checked")) {
252
+ showSelector(keep_ratio, '.m_slick_img_size');
253
+ } else {
254
+ hideSelector(keep_ratio, '.m_slick_img_size');
255
+ }
256
+ });
257
+
258
+ // Modify options based on template selections
259
+ $('body').on('change', '.jr-container .desk_settings select[id$="template"]', function () {
260
+ modifySettings(this, false);
261
+ });
262
+ $('body').on('change', '.jr-container .mob_settings select[id$="m_template"]', function () {
263
+ modifySettings(this, true);
264
+ });
265
+
266
+ // Modfiy options when search for is changed
267
+ $(document).on('change', '.jr-container input:radio[id$="search_for"]', function (e) {
268
+ var search_for = $(this);
269
+ var img_to_show = $('#img_to_show');
270
+ showSearchForSetting(search_for.val());
271
+
272
+ switch (search_for.val()) {
273
+ case 'account':
274
+ hideSelector(search_for, 'select[id$="images_link"] option[value="user_url"]');
275
+ hideSelector(search_for, 'select[id$="images_link"] option[value="attachment"]');
276
+ hideSelector(search_for, 'select[id$="description"] option[value="username"]');
277
+ hideSelector(search_for, 'select[id$="orderby"] option[value="popular-ASC"]');
278
+ hideSelector(search_for, 'select[id$="orderby"] option[value="popular-DESC"]');
279
+
280
+ hideField(search_for, "blocked_users");
281
+ hideField(search_for, "show_feed_header");
282
+ hideField(search_for, "enable_stories");
283
+ showField(search_for, "blocked_words");
284
+
285
+ img_to_show.animate({opacity: 'show', height: 'show'}, 200);
286
+ break;
287
+ case 'account_business':
288
+ hideSelector(search_for, 'select[id$="images_link"] option[value="user_url"]');
289
+ hideSelector(search_for, 'select[id$="images_link"] option[value="attachment"]');
290
+ hideSelector(search_for, 'select[id$="description"] option[value="username"]');
291
+ showSelector(search_for, 'select[id$="orderby"] option[value="popular-ASC"]');
292
+ showSelector(search_for, 'select[id$="orderby"] option[value="popular-DESC"]');
293
+
294
+ hideField(search_for, "blocked_users");
295
+ showField(search_for, "show_feed_header");
296
+ showField(search_for, "enable_stories");
297
+ showField(search_for, "blocked_words");
298
+
299
+ img_to_show.animate({opacity: 'show', height: 'show'}, 200);
300
+ break;
301
+ case 'username':
302
+ showSelector(search_for, 'select[id$="images_link"] option[value="user_url"]');
303
+ showSelector(search_for, 'select[id$="images_link"] option[value="attachment"]');
304
+ showSelector(search_for, 'select[id$="description"] option[value="username"]');
305
+
306
+ hideField(search_for, "blocked_users");
307
+ showField(search_for, "show_feed_header");
308
+ hideField(search_for, "enable_stories");
309
+ showField(search_for, "blocked_words");
310
+
311
+ img_to_show.animate({opacity: 'hide', height: 'hide'}, 200);
312
+ break;
313
+ case 'hashtag':
314
+ hideSelector(search_for, 'select[id$="images_link"] option[value="user_url"]');
315
+ hideSelector(search_for, 'select[id$="images_link"] option[value="attachment"]');
316
+ hideSelector(search_for, 'select[id$="description"] option[value="username"]');
317
+
318
+ showField(search_for, "blocked_users");
319
+ hideField(search_for, "show_feed_header");
320
+ hideField(search_for, "enable_stories");
321
+ hideField(search_for, "blocked_words");
322
+
323
+ img_to_show.animate({opacity: 'hide', height: 'hide'}, 200);
324
+ break;
325
+ }
326
+
327
+ });
328
+
329
+ // Toggle advanced options
330
+ $('body').on('click', '.jr-advanced', function (e) {
331
+ e.preventDefault();
332
+ var advanced_container = $(this).parent().next();
333
+
334
+ if (advanced_container.is(':hidden')) {
335
+ $(this).html('[ - Close ]');
336
+ } else {
337
+ $(this).html('[ + Open ]');
338
+ }
339
+ advanced_container.toggle();
340
+ });
341
+
342
+ jQuery('span.wis_demo_pro').on('click', function (e) {
343
+ e.preventDefault();
344
+ window.open('https://cm-wp.com/instagram-slider-widget/pricing/', '_blank');
345
+ });
346
+
347
+ }); // Document Ready
348
+
349
+ })(jQuery);
admin/assets/js/jr-insta-admin.js CHANGED
@@ -1,524 +0,0 @@
1
- (function ($) {
2
-
3
- $('input[name="savewidget"]').on('click', function (){
4
- setTimeout(function (){
5
- $(".isw-tabs").lightTabs();
6
- },1500);
7
-
8
- })
9
-
10
-
11
- $(document).bind('DOMSubtreeModified', function () {
12
- showPage = function(i, device){
13
- if(device === 'desk'){
14
- $('#desk_tab_content_' + i).show();
15
- $('#desk_tab_' + i).addClass("active");
16
-
17
- $('#mob_tab_content_' + i).hide();
18
- $('#mob_tab_' + i).removeClass("active");
19
- }
20
-
21
- if(device === 'mob') {
22
- $('#mob_tab_content_' + i).show();
23
- $('#mob_tab_' + i).addClass("active");
24
-
25
- $('#desk_tab_content_' + i).hide();
26
- $('#desk_tab_' + i).removeClass("active");
27
- }
28
- }
29
-
30
- jQuery.fn.lightTabs = function(options){
31
- var createTabs = function(){
32
- tabs = this;
33
- data_widget_id = tabs.getAttribute("data-widget-id")
34
- slider_id = data_widget_id.split('-')[1]
35
- i = slider_id;
36
-
37
- showPage(i, 'desk');
38
- };
39
- return this.each(createTabs);
40
- };
41
-
42
- jQuery(document).find(".desk_tab").click(function (){
43
- let mob_tab_id = this.getAttribute('data-tab-id');
44
- showPage(mob_tab_id, 'desk')
45
- });
46
- jQuery(document).find(".mob_tab").click(function (){
47
- let mob_tab_id = this.getAttribute('data-tab-id');
48
- showPage(mob_tab_id, 'mob')
49
- });
50
- });
51
-
52
-
53
- $(document).ready(function ($) {
54
-
55
- showPage = function(i, device){
56
- if(device === 'desk'){
57
- $('#desk_tab_content_' + i).show();
58
- $('#desk_tab_' + i).addClass("active");
59
-
60
- $('#mob_tab_content_' + i).hide();
61
- $('#mob_tab_' + i).removeClass("active");
62
- }
63
-
64
- if(device === 'mob') {
65
- $('#mob_tab_content_' + i).show();
66
- $('#mob_tab_' + i).addClass("active");
67
-
68
- $('#desk_tab_content_' + i).hide();
69
- $('#desk_tab_' + i).removeClass("active");
70
- }
71
- }
72
-
73
- jQuery.fn.lightTabs = function(options){
74
- var createTabs = function(){
75
- tabs = this;
76
- data_widget_id = tabs.getAttribute("data-widget-id")
77
- slider_id = data_widget_id.split('-')[1]
78
- i = slider_id;
79
-
80
- showPage(i, 'desk');
81
- };
82
- return this.each(createTabs);
83
- };
84
-
85
- jQuery(document).find(".desk_tab").click(function (){
86
- let mob_tab_id = this.getAttribute('data-tab-id');
87
- showPage(mob_tab_id, 'desk')
88
- });
89
- jQuery(document).find(".mob_tab").click(function (){
90
- let mob_tab_id = this.getAttribute('data-tab-id');
91
- showPage(mob_tab_id, 'mob')
92
- });
93
-
94
-
95
-
96
- $(".isw-tabs").lightTabs();
97
-
98
- var template = $('.jr-container select[id$="template"]')
99
- if (template.val() === 'thumbs' || template.val() === 'thumbs-no-border' || template.val() === 'slider' || template.val() === 'slider-overlay') {
100
- hideClosestSetting(template, 'select[id$="images_link"] option[value="popup"]');
101
- } else {
102
- showClosestSetting(template,'select[id$="images_link"] option[value="popup"]');
103
- }
104
-
105
- // Hide Custom Url if image link is not set to custom url
106
- $('body').on('change', '.jr-container select[id$="images_link"]', function (e) {
107
- var images_link = $(this);
108
- if (images_link.val() != 'custom_url') {
109
- images_link.closest('.jr-container').find('input[id$="custom_url"]').val('').parent().animate({
110
- opacity: 'hide',
111
- height: 'hide'
112
- }, 200);
113
- } else {
114
- images_link.closest('.jr-container').find('input[id$="custom_url"]').parent().animate({
115
- opacity: 'show',
116
- height: 'show'
117
- }, 200);
118
- }
119
- });
120
-
121
- $('body').on('change', '.jr-container input[id$="keep_ratio"]', function (e) {
122
- var keep_ratio = $(this);
123
- if (keep_ratio.is(":checked")){
124
- showClosestSetting(keep_ratio, '.slick_img_size');
125
- } else {
126
- hideClosestSetting(keep_ratio, '.slick_img_size');
127
- }
128
- });
129
-
130
- $('body').on('change', '.jr-container input[id$="m_keep_ratio"]', function (e) {
131
- var keep_ratio = $(this);
132
- if (keep_ratio.is(":checked")){
133
- showClosestSetting(keep_ratio, '.m_slick_img_size');
134
- } else {
135
- hideClosestSetting(keep_ratio, '.m_slick_img_size');
136
- }
137
- });
138
-
139
- // Modify options based on template selections
140
-
141
- $('body').on('change', '.jr-container .desk_settings select[id$="template"]', function (){
142
- modifySettings(this, false);
143
- });
144
- $('body').on('change', '.jr-container .mob_settings select[id$="m_template"]', function (){
145
- modifySettings(this, true);
146
- });
147
-
148
- function modifySettings(this_object, is_mob){
149
- var template = $(this_object);
150
- var prefix = "";
151
- if (is_mob){
152
- prefix = "m_";
153
- }
154
- if (template.val() === 'thumbs' || template.val() === 'thumbs-no-border') {
155
- hideClosestSetting(template, '.' + prefix + 'jr-slider-options');
156
- template.closest('.jr-container').find('input[id$="' + prefix +'columns"]').closest('p').animate({
157
- opacity: 'show',
158
- height: 'show'
159
- }, 200);
160
- } else {
161
- showClosestSetting(template, '.' + prefix + 'jr-slider-options');
162
- template.closest('.jr-container').find('input[id$="' + prefix +'columns"]').closest('p').animate({
163
- opacity: 'hide',
164
- height: 'hide'
165
- }, 200);
166
- }
167
- if (template.val() != 'masonry') {
168
- hideClosestSetting(template, '.' + prefix + 'masonry_settings');
169
- hideClosestSetting(template, '.' + prefix + 'masonry_notice');
170
- } else {
171
- showClosestSetting(template, '.' + prefix + 'masonry_settings');
172
- showClosestSetting(template, '.' + prefix + 'masonry_notice');
173
- }
174
- if (template.val() != 'slick_slider') {
175
- hideClosestSetting(template, '.' + prefix + 'slick_settings');
176
- } else {
177
- showClosestSetting(template, '.' + prefix + 'slick_settings');
178
- }
179
- if (template.val() != 'highlight') {
180
- hideClosestSetting(template, '.' + prefix + 'highlight_settings');
181
- } else {
182
- showClosestSetting(template, '.' + prefix + 'highlight_settings');
183
- }
184
-
185
- if (template.val() != 'showcase'){
186
- hideClosestSetting(template, '.' + prefix + 'shopifeed_settings');
187
- $('.isw-linkto').animate({
188
- opacity: 'show',
189
- height: 'show'
190
- }, 200);
191
- } else {
192
- showClosestSetting(template, '.' + prefix + 'shopifeed_settings');
193
- $('.isw-linkto').animate({
194
- opacity: 'hide',
195
- height: 'hide'
196
- }, 200);
197
- }
198
-
199
- if (template.val() != 'slider' && template.val() != 'slider-overlay') {
200
- hideClosestSetting(template, '.' + prefix + 'slider_normal_settings');
201
- } else {
202
- showClosestSetting(template, '.' + prefix + 'slider_normal_settings');
203
- }
204
- if (template.val() === 'highlight' || template.val() === 'slick_slider' || template.val() === 'thumbs' || template.val() === 'thumbs-no-border') {
205
- hideClosestSetting(template, '.' + prefix + 'words_in_caption');
206
- } else {
207
- showClosestSetting(template, '.' + prefix + 'words_in_caption');
208
- }
209
-
210
- if (template.val() === 'thumbs' || template.val() === 'thumbs-no-border' || template.val() === 'slider' || template.val() === 'slider-overlay') {
211
- hideClosestSetting(template, 'select[id$="' + prefix + 'images_link"] option[value="popup"]');
212
-
213
- window.image_link_val = template.closest('.jr-container').find('select[id$="' + prefix + 'images_link"]').val();
214
- } else {
215
- showClosestSetting(template, 'select[id$="' + prefix + 'images_link"] option[value="popup"]');
216
- }
217
- }
218
-
219
- function showClosestSetting(closestFor, selector){
220
- closestFor.closest('.jr-container').find(selector).animate({
221
- opacity: 'show',
222
- height: 'show'
223
- }, 200);
224
- }
225
-
226
- function hideClosestSetting(closestFor, selector){
227
- closestFor.closest('.jr-container').find(selector).animate({
228
- opacity: 'hide',
229
- height: 'hide'
230
- }, 200);
231
- }
232
-
233
- // Modfiy options when search for is changed
234
- $('body').on('change', '.jr-container input:radio[id$="search_for"]', function (e) {
235
- var search_for = $(this);
236
- if (search_for.val() === 'hashtag') {
237
- search_for.closest('.jr-container').find('[id$="attachment"]:checkbox').closest('p').animate({
238
- opacity: 'hide',
239
- height: 'hide'
240
- }, 200);
241
-
242
- hideClosestSetting(search_for, 'select[id$="images_link"] option[value="user_url"]');
243
- hideClosestSetting(search_for, 'select[id$="images_link"] option[value="attachment"]');
244
- hideClosestSetting(search_for, 'select[id$="description"] option[value="username"]');
245
-
246
- search_for.closest('.jr-container').find('input[id$="blocked_users"]').closest('p').animate({
247
- opacity: 'show',
248
- height: 'show'
249
- }, 200);
250
- search_for.closest('.jr-container').find('input[id$="blocked_words"]').closest('p').animate({
251
- opacity: 'hide',
252
- height: 'hide'
253
- }, 200);
254
- search_for.closest('.jr-container').find('input[id$="show_feed_header"]').closest('p').animate({
255
- opacity: 'hide',
256
- height: 'hide'
257
- }, 200);
258
- $('#img_to_show').animate({opacity: 'hide', height: 'hide'}, 200);
259
-
260
-
261
- } else if (search_for.val() === 'username') {
262
- search_for.closest('.jr-container').find('[id$="attachment"]:checkbox').closest('p').animate({
263
- opacity: 'show',
264
- height: 'show'
265
- }, 200);
266
-
267
- showClosestSetting(search_for, 'select[id$="images_link"] option[value="user_url"]');
268
- showClosestSetting(search_for, 'select[id$="images_link"] option[value="attachment"]');
269
- showClosestSetting(search_for, 'select[id$="description"] option[value="username"]');
270
-
271
- search_for.closest('.jr-container').find('input[id$="blocked_users"]').closest('p').animate({
272
- opacity: 'hide',
273
- height: 'hide'
274
- }, 200);
275
- search_for.closest('.jr-container').find('input[id$="blocked_words"]').closest('p').animate({
276
- opacity: 'show',
277
- height: 'show'
278
- }, 200);
279
- search_for.closest('.jr-container').find('input[id$="show_feed_header"]').closest('p').animate({
280
- opacity: 'show',
281
- height: 'show'
282
- }, 200);
283
- $('#img_to_show').animate({opacity: 'hide', height: 'hide'}, 200);
284
-
285
- } else if (search_for.val() === 'account') {
286
- search_for.closest('.jr-container').find('[id$="attachment"]:checkbox').closest('p').animate({
287
- opacity: 'hide',
288
- height: 'hide'
289
- }, 200);
290
-
291
- hideClosestSetting(search_for, 'select[id$="images_link"] option[value="user_url"]');
292
- hideClosestSetting(search_for, 'select[id$="images_link"] option[value="attachment"]');
293
- hideClosestSetting(search_for, 'select[id$="description"] option[value="username"]');
294
-
295
- search_for.closest('.jr-container').find('input[id$="blocked_users"]').closest('p').animate({
296
- opacity: 'hide',
297
- height: 'hide'
298
- }, 200);
299
- search_for.closest('.jr-container').find('input[id$="blocked_words"]').closest('p').animate({
300
- opacity: 'show',
301
- height: 'show'
302
- }, 200);
303
- search_for.closest('.jr-container').find('input[id$="show_feed_header"]').closest('p').animate({
304
- opacity: 'hide',
305
- height: 'hide'
306
- }, 200);
307
-
308
- hideClosestSetting(search_for, 'select[id$="orderby"] option[value="popular-ASC"]');
309
- hideClosestSetting(search_for, 'select[id$="orderby"] option[value="popular-DESC"]');
310
-
311
- $('#img_to_show').animate({opacity: 'show', height: 'show'}, 200);
312
-
313
- } else if (search_for.val() === 'account_business') {
314
- search_for.closest('.jr-container').find('[id$="attachment"]:checkbox').closest('p').animate({
315
- opacity: 'hide',
316
- height: 'hide'
317
- }, 200);
318
-
319
- hideClosestSetting(search_for, 'select[id$="images_link"] option[value="user_url"]');
320
- hideClosestSetting(search_for, 'select[id$="images_link"] option[value="attachment"]');
321
- hideClosestSetting(search_for, 'select[id$="description"] option[value="username"]');
322
-
323
- search_for.closest('.jr-container').find('input[id$="blocked_users"]').closest('p').animate({
324
- opacity: 'hide',
325
- height: 'hide'
326
- }, 200);
327
- search_for.closest('.jr-container').find('input[id$="blocked_words"]').closest('p').animate({
328
- opacity: 'show',
329
- height: 'show'
330
- }, 200);
331
- search_for.closest('.jr-container').find('input[id$="show_feed_header"]').closest('p').animate({
332
- opacity: 'show',
333
- height: 'show'
334
- }, 200);
335
-
336
- showClosestSetting(search_for, 'select[id$="orderby"] option[value="popular-ASC"]');
337
- showClosestSetting(search_for, 'select[id$="orderby"] option[value="popular-DESC"]');
338
-
339
- $('#img_to_show').animate({opacity: 'show', height: 'show'}, 200);
340
-
341
- }
342
- });
343
-
344
- // Hide blocked images if not checked attachments
345
- $('body').on('change', '.jr-container [id$="attachment"]:checkbox', function (e) {
346
- var attachment = $(this);
347
- if (this.checked) {
348
- showClosestSetting(attachment, 'select[id$="images_link"] option[value="attachment"]')
349
- } else {
350
- hideClosestSetting(attachment, 'select[id$="images_link"] option[value="attachment"]')
351
- }
352
- });
353
-
354
- // Toggle advanced options
355
- $('body').on('click', '.jr-advanced', function (e) {
356
- e.preventDefault();
357
- var advanced_container = $(this).parent().next();
358
-
359
- if (advanced_container.is(':hidden')) {
360
- $(this).html('[ - Close ]');
361
- } else {
362
- $(this).html('[ + Open ]');
363
- }
364
- advanced_container.toggle();
365
- });
366
-
367
- // Remove blocked images with ajax
368
- $('body').on('click', '.jr-container .jr-delete-instagram-dupes', function (e) {
369
- e.preventDefault();
370
- var $this = $(this),
371
- username = $(this).data("username"),
372
- ajaxNonce = $(this).closest('.jr-container').find('input[name=delete_insta_dupes_nonce]').val();
373
-
374
- $.ajax({
375
- type: 'POST',
376
- url: ajaxurl,
377
- data: {
378
- action: 'jr_delete_insta_dupes',
379
- username: username,
380
- _ajax_nonce: ajaxNonce
381
- },
382
- beforeSend: function () {
383
- $this.prop('disabled', true);
384
- $this.closest('.jr-container').find('.jr-spinner').addClass('spinner').css({
385
- 'visibility': 'visible',
386
- 'float': 'none'
387
- });
388
- },
389
- success: function (data, textStatus, XMLHttpRequest) {
390
- $this.closest('.jr-container').find('.deleted-dupes-info').text('Removed Duplicates: ' + data.deleted);
391
- },
392
- complete: function () {
393
- $this.prop('disabled', false);
394
- $this.closest('.jr-container').find('.jr-spinner').addClass('spinner').css({
395
- 'visibility': 'hidden',
396
- 'float': 'none'
397
- });
398
- },
399
- error: function (XMLHttpRequest, textStatus, errorThrown) {
400
-
401
- }
402
- });
403
- });
404
- // Delete account with ajax
405
- $('.wis-delete-account').on('click', function (e) {
406
- e.preventDefault();
407
-
408
- var c = confirm(wis.remove_account);
409
-
410
- if (!c) {
411
- return false;
412
- }
413
-
414
- var $item = $(this),
415
- $tr = $item.closest('tr'),
416
- $spinner = $('#wis-delete-spinner-' + $item.data('item_id'));
417
-
418
- $.ajax({
419
- url: ajaxurl,
420
- type: 'post',
421
- data: {
422
- action: 'wis_delete_account',
423
- item_id: $item.data('item_id'),
424
- is_business: $item.data('is_business'),
425
- _ajax_nonce: wis.nonce
426
- },
427
- beforeSend: function () {
428
- $spinner.addClass('is-active');
429
- },
430
- success: function (response) {
431
- if (response.success) {
432
- $tr.fadeOut();
433
- } else {
434
- alert(response.data);
435
- }
436
- },
437
- complete: function () {
438
- $spinner.removeClass('is-active');
439
- },
440
- error: function (jqXHR, textStatus) {
441
- console.log(textStatus);
442
- }
443
- });
444
- });
445
-
446
- $('.wis-not-working').on('click', function (e) {
447
- e.preventDefault();
448
- $('#wis-add-token').animate({opacity: 'show', height: 'show'}, 200)
449
- });
450
-
451
- /*
452
- * FACEBOOK API modal
453
- */
454
-
455
- var modal = jQuery('#wis_accounts_modal');
456
- var modalOverlay = jQuery('#wis_modal_overlay');
457
- var spinOverlay = jQuery('.wis-overlay-spinner');
458
-
459
- modalOverlay.on("click", function () {
460
- var conf = confirm("You haven't finished adding an account. Are you sure you want to close the window?");
461
- if (conf) {
462
- modal.toggleClass("wis_closed");
463
- modalOverlay.toggleClass("wis_closed");
464
- spinOverlay.toggleClass("is-active");
465
- }
466
- });
467
-
468
- //BUSINESS INSTAGRAM
469
- jQuery('.wis_modal_content #wis-instagram-row').on('click', function (e) {
470
- modal.toggleClass("wis_closed");
471
- spinOverlay.addClass('is-active');
472
- wis_account = $(this).attr('data-account');
473
- jQuery.post(ajaxurl, {
474
- action: 'wis_add_account_by_token',
475
- account: wis_account,
476
- _ajax_nonce: add_account_nonce.nonce
477
- }).done(function (html) {
478
- console.log(html);
479
- window.location.reload();
480
- });
481
- });
482
-
483
- //FACEBOOK
484
- jQuery('.wis_modal_content #wis-facebook-row').on('click', function (e) {
485
- modal.toggleClass("wis_closed");
486
- spinOverlay.addClass('is-active');
487
- wis_account = $(this).attr('data-account');
488
- jQuery.post(ajaxurl, {
489
- action: 'wis_add_facebook_page_by_token',
490
- account: wis_account,
491
- _ajax_nonce: add_account_nonce.nonce
492
- }).done(function (html) {
493
- window.location.reload();
494
- });
495
- });
496
-
497
- /*
498
- * Chose API to add account
499
- * */
500
- var modal2 = jQuery('#wis_add_account_modal');
501
- var modal2Overlay = jQuery('#wis_add_account_modal_overlay');
502
-
503
- modal2Overlay.on("click", function () {
504
- var conf = confirm("You haven't finished adding an account. Are you sure you want to close the window?");
505
- if (conf) {
506
- modal2.toggleClass("wis_closed");
507
- modal2Overlay.toggleClass("wis_closed");
508
- }
509
- });
510
-
511
- jQuery('#wis-add-account-button .wis-btn-instagram-account').on('click', function (e) {
512
- e.preventDefault();
513
- modal2.removeClass('wis_closed');
514
- modal2Overlay.removeClass('wis_closed');
515
- });
516
-
517
- jQuery('span.wis_demo_pro').on('click', function (e) {
518
- e.preventDefault();
519
- window.open('https://cm-wp.com/instagram-slider-widget/pricing/', '_blank');
520
- });
521
-
522
- }); // Document Ready
523
-
524
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/class-page-logger.php ADDED
@@ -0,0 +1,242 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ use WBCR\Factory_Templates_106\ImpressiveLite;
4
+
5
+ /**
6
+ * Class of plugin page. Must be registered in file admin/class-prefix-page.php
7
+ *
8
+ * @author Artem Prihodko <webtemyk@yandex.ru>
9
+ * @copyright (c) 2021, Webcraftic
10
+ * @see ImpressiveLite
11
+ *
12
+ * @version 1.0.0
13
+ */
14
+
15
+ // Exit if accessed directly
16
+ if ( ! defined( 'ABSPATH' ) ) {
17
+ exit;
18
+ }
19
+
20
+ class WIS_Page_Logger extends Wbcr_FactoryLogger118_Lite {
21
+
22
+ /**
23
+ * Name of the template to get content of. It will be based on plugins /admin/views/ dir.
24
+ * /admin/views/tab-{$template_name}.php
25
+ *
26
+ * @var string
27
+ */
28
+ public $template_name = "log";
29
+
30
+ /**
31
+ * @var string
32
+ */
33
+ public $custom_target = "admin.php";
34
+
35
+ /**
36
+ * {@inheritdoc}
37
+ */
38
+ public $show_right_sidebar_in_options = false;
39
+
40
+ /**
41
+ * {@inheritdoc}
42
+ */
43
+ public $show_search_options_form = false;
44
+
45
+ /**
46
+ * Show this page in tabs?
47
+ * default: true
48
+ */
49
+ public $show_menu_tab = true;
50
+
51
+ /**
52
+ * Title for tab in menu
53
+ */
54
+ public $menu_tab_title;
55
+
56
+ public function __construct( $plugin ) {
57
+ $this->menu_tab_title = $this->menu_tab_title ?? $this->menu_title;
58
+
59
+ parent::__construct( $plugin );
60
+ }
61
+
62
+ /**
63
+ * Render and return content of the template.
64
+ * /admin/views/tab-{$template_name}.php
65
+ *
66
+ * @return mixed Content of the page
67
+ */
68
+ public function render( $name = '' ) {
69
+ if ( '' == $name ) {
70
+ $name = $this->template_name;
71
+ }
72
+ ob_start();
73
+ if ( is_callable( $name ) ) {
74
+ echo call_user_func( $name );
75
+ } elseif ( strpos( $name, DIRECTORY_SEPARATOR ) !== false && ( is_file( $name ) || is_file( $name . '.php' ) ) ) {
76
+ if ( is_file( $name ) ) {
77
+ $path = $name;
78
+ } else {
79
+ $path = $name . '.php';
80
+ }
81
+ } else {
82
+ $path = WAPT_PLUGIN_DIR . "/admin/views/tab-{$name}.php";
83
+ }
84
+ if ( ! is_file( $path ) ) {
85
+ return '';
86
+ }
87
+ include $path;
88
+ $content = ob_get_contents();
89
+ ob_end_clean();
90
+
91
+ return $content;
92
+ }
93
+
94
+ public function assets( $scripts, $styles ) {
95
+ parent::assets( $scripts, $styles );
96
+
97
+ $this->scripts->request( [
98
+ 'control.checkbox',
99
+ 'control.dropdown',
100
+ 'control.integer',
101
+ 'plugin.nouislider',
102
+ 'bootstrap.dropdown'
103
+ ], 'bootstrap' );
104
+
105
+ $this->styles->request( [
106
+ 'bootstrap.core',
107
+ 'bootstrap.form-group',
108
+ 'bootstrap.separator',
109
+ 'control.dropdown',
110
+ 'control.checkbox',
111
+ 'control.integer',
112
+ 'plugin.nouislider',
113
+ ], 'bootstrap' );
114
+ }
115
+
116
+ /**
117
+ * Show rendered template - $template_name
118
+ */
119
+ public function showPageContent() {
120
+ parent::showPageContent();
121
+ }
122
+
123
+ public function getPluginSlug() {
124
+ $plugin_slug = $this->plugin->getPluginInfoAttr( 'updates_settings' );
125
+
126
+ return $plugin_slug['slug'] ?? WAPT_PLUGIN_SLUG;
127
+ }
128
+
129
+ /**
130
+ * @param string $position
131
+ *
132
+ * @return mixed|void
133
+ */
134
+ protected function getPageWidgets( $position = 'bottom' ) {
135
+ $widgets = [];
136
+
137
+ if ( 'bottom' == $position ) {
138
+ $widgets['rating_widget'] = $this->getRatingWidget( [] );
139
+ $widgets['support_widget'] = $this->getSupportWidget();
140
+ }
141
+
142
+ /**
143
+ * @since 3.8.2 - добавлен
144
+ */
145
+ $widgets = apply_filters( 'wbcr/factory/pages/impressive_lite/widgets', $widgets, $position, $this->plugin, $this );
146
+
147
+ return $widgets;
148
+ }
149
+
150
+ /**
151
+ * Создает html разметку виджета рейтинга
152
+ *
153
+ * @param array $args
154
+ *
155
+ * @author Artem Prihodko <webtemyk@yandex.ru>
156
+ */
157
+ public function showRatingWidget( array $args ) {
158
+ $plugin_slug = $this->getPluginSlug();
159
+
160
+ if ( ! isset( $args[0] ) || empty( $args[0] ) ) {
161
+ $page_url = "https://wordpress.org/support/plugin/{$plugin_slug}/reviews/#new-post";
162
+ } else {
163
+ $page_url = $args[0];
164
+ }
165
+
166
+ $page_url = apply_filters( 'wbcr_factory_pages_452_implite_rating_widget_url', $page_url, $this->plugin->getPluginName(), $this->getResultId() );
167
+
168
+ ?>
169
+ <div class="wbcr-factory-sidebar-widget">
170
+ <p>
171
+ <strong><?php _e( 'Do you want the plugin to improved and update?', 'wbcr_factory_templates_106' ); ?></strong>
172
+ </p>
173
+ <p><?php _e( 'Help the author, leave a review on wordpress.org. Thanks to feedback, I will know that the plugin is really useful to you and is needed.', 'wbcr_factory_templates_106' ); ?></p>
174
+ <p><?php _e( 'And also write your ideas on how to extend or improve the plugin.', 'wbcr_factory_templates_106' ); ?></p>
175
+ <p>
176
+ <i class="wbcr-factory-icon-5stars"></i>
177
+ <a href="<?php echo $page_url; ?>" title="Go rate us" target="_blank">
178
+ <strong><?php _e( 'Go rate us and push ideas', 'wbcr_factory_templates_106' ); ?></strong>
179
+ </a>
180
+ </p>
181
+ </div>
182
+ <?php
183
+ }
184
+
185
+ /**
186
+ * Создает html разметку виджета поддержки
187
+ *
188
+ * @author @author Artem Prihodko <webtemyk@yandex.ru>
189
+ */
190
+ public function showSupportWidget() {
191
+ $plugin_slug = $this->getPluginSlug();
192
+
193
+ $free_support_url = "https://wordpress.org/support/plugin/{$plugin_slug}";
194
+ $hot_support_url = $this->plugin->get_support()->get_contacts_url();
195
+
196
+ ?>
197
+ <div id="wbcr-clr-support-widget" class="wbcr-factory-sidebar-widget">
198
+ <p><strong><?php _e( 'Having Issues?', 'wbcr_factory_templates_106' ); ?></strong></p>
199
+ <div class="wbcr-clr-support-widget-body">
200
+ <p>
201
+ <?php _e( 'We provide free support for this plugin. If you are pushed with a problem, just create a new ticket. We will definitely help you!', 'wbcr_factory_templates_106' ); ?>
202
+ </p>
203
+ <ul>
204
+ <li><span class="dashicons dashicons-sos"></span>
205
+ <a href="<?php echo $free_support_url; ?>" target="_blank"
206
+ rel="noopener"><?php _e( 'Get starting free support', 'wbcr_factory_templates_106' ); ?></a>
207
+ </li>
208
+ <li style="margin-top: 15px;background: #fff4f1;padding: 10px;color: #a58074;">
209
+ <span class="dashicons dashicons-warning"></span>
210
+ <?php printf( __( 'If you find a php error or a vulnerability in plugin, you can <a href="%s" target="_blank" rel="noopener">create ticket</a> in hot support that we responded instantly.', 'wbcr_factory_templates_106' ), $hot_support_url ); ?>
211
+ </li>
212
+ </ul>
213
+ </div>
214
+ </div>
215
+ <?php
216
+ }
217
+
218
+ /**
219
+ * @return string
220
+ */
221
+ public function getMenuSubTitle() {
222
+ $menu_title = $this->menu_tab_title ?? $this->menu_title ?? $this->page_title;
223
+
224
+ return apply_filters( 'wbcr/factory/pages/impressive_lite/menu_title', $menu_title, $this->plugin->getPluginName(), $this->id );
225
+ }
226
+
227
+ public static function instruction( $title, $html ) {
228
+ $return = "<div class='form-group form-group-textbox'>
229
+ <label for='' class='col-sm-4 control-label'>{$title}</label>
230
+ <div class='control-group col-sm-8'>
231
+ <div class='help-block'>
232
+ {$html}
233
+ </div>
234
+ </div>
235
+ </div>";
236
+
237
+ return $return;
238
+ }
239
+
240
+ }
241
+
242
+
admin/class-page.php ADDED
@@ -0,0 +1,282 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ use WBCR\Factory_Templates_106\ImpressiveLite;
4
+
5
+ /**
6
+ * Class of plugin page. Must be registered in file admin/class-prefix-page.php
7
+ *
8
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
9
+ * @copyright (c) 02.12.2018, Webcraftic
10
+ * @see ImpressiveLite
11
+ *
12
+ * @version 1.0.0
13
+ */
14
+
15
+ // Exit if accessed directly
16
+ if ( ! defined( 'ABSPATH' ) ) {
17
+ exit;
18
+ }
19
+
20
+ class WIS_Page extends ImpressiveLite {
21
+
22
+ /**
23
+ * Name of the template to get content of. It will be based on plugins /admin/views/ dir.
24
+ * /admin/views/tab-{$template_name}.php
25
+ *
26
+ * @var string
27
+ */
28
+ public $template_name = "main";
29
+
30
+ /**
31
+ * @var string
32
+ */
33
+ public $custom_target = "admin.php";
34
+
35
+ /**
36
+ * Menu position (only if a page is placed as a main menu).
37
+ * @link http://codex.wordpress.org/Function_Reference/add_menu_page
38
+ * @var string
39
+ */
40
+ public $menu_position = 58;
41
+
42
+ /**
43
+ * @var bool
44
+ */
45
+ public $internal = false;
46
+
47
+ /**
48
+ * {@inheritdoc}
49
+ */
50
+ public $show_right_sidebar_in_options = false;
51
+
52
+ /**
53
+ * {@inheritdoc}
54
+ */
55
+ public $show_search_options_form = false;
56
+
57
+ /**
58
+ * Show this page in tabs?
59
+ * default: true
60
+ */
61
+ public $show_menu_tab = true;
62
+
63
+ /**
64
+ * Title for tab in menu
65
+ */
66
+ public $menu_tab_title;
67
+
68
+ /**
69
+ * @see self::app()
70
+ * @var self
71
+ */
72
+ private static $instance;
73
+
74
+ /**
75
+ * @return self
76
+ */
77
+ public static function instance() {
78
+ return self::$instance;
79
+ }
80
+
81
+ public function __construct( $plugin ) {
82
+ $this->menu_tab_title = $this->menu_tab_title ?? $this->menu_title;
83
+ $this->template_name = 'page-' . $this->template_name;
84
+
85
+ parent::__construct( $plugin );
86
+
87
+ self::$instance = $this;
88
+ }
89
+
90
+ public function assets( $scripts, $styles ) {
91
+ parent::assets( $scripts, $styles );
92
+
93
+ /*$this->scripts->request( [
94
+ 'control.checkbox',
95
+ 'control.dropdown',
96
+ 'control.integer',
97
+ 'plugin.nouislider',
98
+ 'bootstrap.dropdown'
99
+ ], 'bootstrap' );
100
+
101
+ $this->styles->request( [
102
+ 'bootstrap.core',
103
+ 'bootstrap.form-group',
104
+ 'bootstrap.separator',
105
+ 'control.dropdown',
106
+ 'control.checkbox',
107
+ 'control.integer',
108
+ 'plugin.nouislider',
109
+ ], 'bootstrap' );*/
110
+
111
+ $this->styles->add( WIS_PLUGIN_URL . '/admin/assets/css/admin-style.css', [], WIS_PLUGIN_VERSION );
112
+ $this->scripts->add( WIS_PLUGIN_URL . '/admin/assets/js/admin-script.js', [ 'jquery' ], WIS_PLUGIN_VERSION );
113
+ }
114
+
115
+ protected function isShowRightSidebar() {
116
+ return $this->show_right_sidebar && ! $this->plugin->is_premium();
117
+ }
118
+
119
+ public function showRightSidebar() {
120
+ if ( ! $this->plugin->is_premium() ) {
121
+ $this->plugin->get_adverts_manager()->render_placement( 'right_sidebar' );
122
+ }
123
+ }
124
+
125
+ /**
126
+ * Render and return content of the template.
127
+ * /admin/views/tab-{$template_name}.php
128
+ *
129
+ * @param string $name
130
+ * @param array $args
131
+ *
132
+ * @return mixed Content of the page
133
+ */
134
+ public function render( $name = '', $args = [] ) {
135
+ if ( '' == $name ) {
136
+ $name = $this->template_name;
137
+ }
138
+ ob_start();
139
+ if ( is_callable( $name ) ) {
140
+ echo call_user_func( $name );
141
+ } else if ( strpos( $name, DIRECTORY_SEPARATOR ) !== false && ( is_file( $name ) || is_file( $name . '.php' ) ) ) {
142
+ if ( is_file( $name ) ) {
143
+ $path = $name;
144
+ } else {
145
+ $path = $name . '.php';
146
+ }
147
+ } else {
148
+ $path = WIS_PLUGIN_DIR . "/admin/views/{$name}.php";
149
+ }
150
+ if ( ! is_file( $path ) ) {
151
+ ob_end_clean();
152
+
153
+ return 'Template not found';
154
+ }
155
+ extract( $args );
156
+ include $path;
157
+ $content = ob_get_contents();
158
+ ob_end_clean();
159
+
160
+ return $content;
161
+ }
162
+
163
+ public function getPluginTitle() {
164
+ $logo = "<div class='wisw-logo-title'>&nbsp;</div>";
165
+
166
+ return $logo . $this->plugin->getPluginTitle();
167
+ }
168
+
169
+ /**
170
+ * Show rendered template - $template_name
171
+ */
172
+ public function showPageContent() {
173
+ echo $this->render();
174
+ }
175
+
176
+ public function getPluginSlug() {
177
+ $plugin_slug = $this->plugin->getPluginInfoAttr( 'updates_settings' );
178
+
179
+ return $plugin_slug['slug'] ?? WAPT_PLUGIN_SLUG;
180
+ }
181
+
182
+ /**
183
+ * @param string $position
184
+ *
185
+ * @return mixed|void
186
+ */
187
+ protected function getPageWidgets( $position = 'bottom' ) {
188
+ $widgets = [];
189
+
190
+ if ( 'bottom' == $position ) {
191
+ $widgets['rating_widget'] = $this->getRatingWidget( [] );
192
+ $widgets['support_widget'] = $this->getSupportWidget();
193
+ }
194
+
195
+ /**
196
+ * @since 3.8.2 - добавлен
197
+ */
198
+ $widgets = apply_filters( 'wbcr/factory/pages/impressive_lite/widgets', $widgets, $position, $this->plugin, $this );
199
+
200
+ return $widgets;
201
+ }
202
+
203
+ /**
204
+ * Создает html разметку виджета рейтинга
205
+ *
206
+ * @param array $args
207
+ *
208
+ * @author Artem Prihodko <webtemyk@yandex.ru>
209
+ */
210
+ public function showRatingWidget( array $args ) {
211
+ $plugin_slug = $this->getPluginSlug();
212
+
213
+ if ( ! isset( $args[0] ) || empty( $args[0] ) ) {
214
+ $page_url = "https://wordpress.org/support/plugin/{$plugin_slug}/reviews/#new-post";
215
+ } else {
216
+ $page_url = $args[0];
217
+ }
218
+
219
+ $page_url = apply_filters( 'wbcr_factory_pages_452_implite_rating_widget_url', $page_url, $this->plugin->getPluginName(), $this->getResultId() );
220
+
221
+ ?>
222
+ <div class="wbcr-factory-sidebar-widget">
223
+ <p>
224
+ <strong><?php _e( 'Do you want the plugin to improved and update?', 'wbcr_factory_templates_106' ); ?></strong>
225
+ </p>
226
+ <p><?php _e( 'Help the author, leave a review on wordpress.org. Thanks to feedback, I will know that the plugin is really useful to you and is needed.', 'wbcr_factory_templates_106' ); ?></p>
227
+ <p><?php _e( 'And also write your ideas on how to extend or improve the plugin.', 'wbcr_factory_templates_106' ); ?></p>
228
+ <p>
229
+ <i class="wbcr-factory-icon-5stars"></i>
230
+ <a href="<?php echo $page_url; ?>" title="Go rate us" target="_blank">
231
+ <strong><?php _e( 'Go rate us and push ideas', 'wbcr_factory_templates_106' ); ?></strong>
232
+ </a>
233
+ </p>
234
+ </div>
235
+ <?php
236
+ }
237
+
238
+ /**
239
+ * Создает html разметку виджета поддержки
240
+ *
241
+ * @author @author Artem Prihodko <webtemyk@yandex.ru>
242
+ */
243
+ public function showSupportWidget() {
244
+ $plugin_slug = $this->getPluginSlug();
245
+
246
+ $free_support_url = "https://wordpress.org/support/plugin/{$plugin_slug}";
247
+ $hot_support_url = $this->plugin->get_support()->get_contacts_url();
248
+
249
+ ?>
250
+ <div id="wbcr-clr-support-widget" class="wbcr-factory-sidebar-widget">
251
+ <p><strong><?php _e( 'Having Issues?', 'wbcr_factory_templates_106' ); ?></strong></p>
252
+ <div class="wbcr-clr-support-widget-body">
253
+ <p>
254
+ <?php _e( 'We provide free support for this plugin. If you are pushed with a problem, just create a new ticket. We will definitely help you!', 'wbcr_factory_templates_106' ); ?>
255
+ </p>
256
+ <ul>
257
+ <li><span class="dashicons dashicons-sos"></span>
258
+ <a href="<?php echo $free_support_url; ?>" target="_blank"
259
+ rel="noopener"><?php _e( 'Get starting free support', 'wbcr_factory_templates_106' ); ?></a>
260
+ </li>
261
+ <li style="margin-top: 15px;background: #fff4f1;padding: 10px;color: #a58074;">
262
+ <span class="dashicons dashicons-warning"></span>
263
+ <?php printf( __( 'If you find a php error or a vulnerability in plugin, you can <a href="%s" target="_blank" rel="noopener">create ticket</a> in hot support that we responded instantly.', 'wbcr_factory_templates_106' ), $hot_support_url ); ?>
264
+ </li>
265
+ </ul>
266
+ </div>
267
+ </div>
268
+ <?php
269
+ }
270
+
271
+ /**
272
+ * @return string
273
+ */
274
+ public function getMenuSubTitle() {
275
+ $menu_title = $this->menu_tab_title ?? $this->menu_title ?? $this->page_title;
276
+
277
+ return apply_filters( 'wbcr/factory/pages/impressive_lite/menu_title', $menu_title, $this->plugin->getPluginName(), $this->id );
278
+ }
279
+
280
+ }
281
+
282
+
admin/class-wis-activation.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author Webcraftic <wordpress.webraftic@gmail.com>
6
  * @copyright (c) 02.12.2018, Webcraftic
7
- * @see Wbcr_Factory445_Activator
8
  *
9
  * @version 1.0.1
10
  */
@@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
14
  exit;
15
  }
16
 
17
- class WIS_Activation extends Wbcr_Factory445_Activator {
18
 
19
  /**
20
  * Method is executed during the activation of the plugin.
4
  *
5
  * @author Webcraftic <wordpress.webraftic@gmail.com>
6
  * @copyright (c) 02.12.2018, Webcraftic
7
+ * @see Wbcr_Factory453_Activator
8
  *
9
  * @version 1.0.1
10
  */
14
  exit;
15
  }
16
 
17
+ class WIS_Activation extends Wbcr_Factory453_Activator {
18
 
19
  /**
20
  * Method is executed during the activation of the plugin.
admin/class-wis-page.php DELETED
@@ -1,72 +0,0 @@
1
- <?php
2
- /**
3
- * Class of plugin page. Must be registered in file admin/class-prefix-page.php
4
- *
5
- * @author Webcraftic <wordpress.webraftic@gmail.com>
6
- * @copyright (c) 02.12.2018, Webcraftic
7
- * @see Wbcr_FactoryPages444_AdminPage
8
- *
9
- * @version 1.0.0
10
- */
11
-
12
- // Exit if accessed directly
13
- if ( ! defined( 'ABSPATH' ) ) {
14
- exit;
15
- }
16
-
17
- class WIS_Page extends Wbcr_FactoryPages444_AdminPage {
18
-
19
- /**
20
- * Name of the template to get content of. It will be based on plugins /admin/views/ dir.
21
- * /admin/views/tab-{$template_name}.php
22
- *
23
- * @var string
24
- */
25
- public $template_name = "main";
26
-
27
- /**
28
- * Render and return content of the template.
29
- * /admin/views/tab-{$template_name}.php
30
- *
31
- * @param string $name
32
- * @param array $args
33
- *
34
- * @return mixed Content of the page
35
- */
36
- public function render( $name = '', $args = [] ) {
37
- if ( $name == '' ) {
38
- $name = $this->template_name;
39
- }
40
- ob_start();
41
- if ( is_callable( $name ) ) {
42
- echo call_user_func( $name );
43
- } elseif ( strpos( $name, DIRECTORY_SEPARATOR ) !== false && ( is_file( $name ) || is_file( $name . '.php' ) ) ) {
44
- if ( is_file( $name ) ) {
45
- $path = $name;
46
- } else {
47
- $path = $name . '.php';
48
- }
49
- } else {
50
- $path = WIS_PLUGIN_DIR . "/admin/views/tab-{$name}.php";
51
- }
52
- if ( ! is_file( $path ) ) {
53
- return '';
54
- }
55
- extract( $args );
56
- include $path;
57
- $content = ob_get_contents();
58
- ob_end_clean();
59
-
60
- return $content;
61
- }
62
-
63
- /**
64
- * Show rendered template - $template_name
65
- */
66
- public function indexAction() {
67
- echo $this->render();
68
- }
69
-
70
- }
71
-
72
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/pages/Licenses.php DELETED
@@ -1,74 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class Licenses
5
- *
6
- * Отображает страницу, где расположена плитка с лицензиями как плагина, так и его компонентов
7
- */
8
- class Licenses extends WIS_Page
9
- {
10
-
11
- /**
12
- * {@inheritdoc}
13
- */
14
- public $type = "page";
15
-
16
- /**
17
- * {@inheritdoc}
18
- */
19
- public $page_menu_dashicon = 'dashicons-admin-network';
20
-
21
- /**
22
- * {@inheritdoc}
23
- */
24
- public $show_right_sidebar_in_options = false;
25
-
26
- /**
27
- * {@inheritdoc}
28
- */
29
- public $page_menu_position = 0;
30
-
31
- /**
32
- * {@inheritdoc}
33
- */
34
- public $available_for_multisite = true;
35
-
36
- /**
37
- * @var string Name of the paid plan.
38
- */
39
- public $plan_name;
40
-
41
- /**
42
- * {@inheritdoc}
43
- * @param WIS_Plugin $plugin
44
- */
45
- public function __construct( $plugin ) {
46
- $this->plugin = $plugin;
47
-
48
- parent::__construct( $plugin );
49
-
50
- $this->id = 'licenses';
51
- $this->menu_title = '<span style="color:#f18500">' . __( 'Licenses', 'instagram-slider-widget' ) . '</span>';
52
- $this->page_title = __( 'Licenses', 'instagram-slider-widget' );
53
- $this->template_name = "licenses";
54
- $this->menu_target = "widgets-" . $plugin->getPluginName();
55
- $this->capabilitiy = "manage_options";
56
- }
57
-
58
- public function indexAction()
59
- {
60
-
61
- $licenses = [
62
- [
63
- 'name' => 'instagram_slider_widget',
64
- 'title' => __('Social Slider Widget', 'instagram-slider-widget'),
65
- 'license_url' => 'license-wisw',
66
- 'icon' => 'https://ps.w.org/instagram-slider-widget/assets/icon-256x256.png',
67
- 'description' => __('DISPLAY INSTAGRAM FEEDS IN WIDGETS, POSTS, PAGES, OR ANYWHERE ELSE USING SHORTCODES.', 'instagram-slider-widget'),
68
- ],
69
- ];
70
-
71
- echo $this->render('licenses', ['licenses' => $licenses]);
72
- }
73
-
74
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/pages/about.php CHANGED
@@ -1,5 +1,6 @@
1
  <?php
2
 
 
3
  // Exit if accessed directly
4
  if ( ! defined( 'ABSPATH' ) ) {
5
  exit;
@@ -21,6 +22,13 @@ class WIS_AboutPage extends WIS_Page {
21
  */
22
  public $type = 'page';
23
 
 
 
 
 
 
 
 
24
  /**
25
  * Menu icon (only if a page is placed as a main menu).
26
  * For example: '~/assets/img/menu-icon.png'
@@ -32,17 +40,31 @@ class WIS_AboutPage extends WIS_Page {
32
  /**
33
  * @var string
34
  */
35
- public $page_menu_dashicon;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
  /**
38
  * @param WIS_Plugin $plugin
39
  */
40
  public function __construct( $plugin ) {
41
- $this->id = "about";
42
- $this->menu_target = "widgets-" . $plugin->getPluginName();
43
- $this->page_title = __( 'About Social Slider Widget', 'instagram-slider-widget' );
44
- $this->menu_title = __( 'About', 'instagram-slider-widget' );
45
- $this->template_name = "about";
46
 
47
  parent::__construct( $plugin );
48
 
1
  <?php
2
 
3
+
4
  // Exit if accessed directly
5
  if ( ! defined( 'ABSPATH' ) ) {
6
  exit;
22
  */
23
  public $type = 'page';
24
 
25
+ /**
26
+ * Page content template
27
+ *
28
+ * @var string
29
+ */
30
+ public $template_name = 'about';
31
+
32
  /**
33
  * Menu icon (only if a page is placed as a main menu).
34
  * For example: '~/assets/img/menu-icon.png'
40
  /**
41
  * @var string
42
  */
43
+ public $page_menu_dashicon = "dashicons-info-outline";
44
+
45
+ /**
46
+ * @var string
47
+ */
48
+ public $menu_position = 60;
49
+
50
+ /**
51
+ * @var int
52
+ */
53
+ public $page_menu_position = 40;
54
+
55
+ /**
56
+ * {@inheritdoc}
57
+ */
58
+ public $show_menu_tab = false;
59
 
60
  /**
61
  * @param WIS_Plugin $plugin
62
  */
63
  public function __construct( $plugin ) {
64
+ $this->id = "about";
65
+ $this->menu_target = "feeds-" . $plugin->getPluginName();
66
+ $this->page_title = __( 'About ' . $plugin->getPluginTitle(), 'instagram-slider-widget' );
67
+ $this->menu_title = __( 'About', 'instagram-slider-widget' );
 
68
 
69
  parent::__construct( $plugin );
70
 
admin/pages/components.php DELETED
@@ -1,85 +0,0 @@
1
- <?php
2
-
3
- // Exit if accessed directly
4
- if ( ! defined( 'ABSPATH' ) ) {
5
- exit;
6
- }
7
-
8
- /**
9
- * Class WAPT_License_Page is used as template to display form to active premium functionality.
10
- *
11
- * @since 2.0.7
12
- */
13
- class WIS_ComponentsPage extends WIS_Page {
14
-
15
- /**
16
- * {@inheritdoc}
17
- */
18
- public $type = "page";
19
-
20
- /**
21
- * {@inheritdoc}
22
- */
23
- public $page_menu_dashicon = 'dashicons-admin-network';
24
-
25
- /**
26
- * {@inheritdoc}
27
- */
28
- public $show_right_sidebar_in_options = false;
29
-
30
- /**
31
- * {@inheritdoc}
32
- */
33
- public $page_menu_position = 0;
34
-
35
- /**
36
- * {@inheritdoc}
37
- */
38
- public $available_for_multisite = true;
39
-
40
- /**
41
- * @var string Name of the paid plan.
42
- */
43
- public $plan_name;
44
-
45
-
46
- /**
47
- * {@inheritdoc}
48
- * @param WIS_Plugin $plugin
49
- */
50
- public function __construct( $plugin ) {
51
- $this->plugin = $plugin;
52
-
53
- parent::__construct( $plugin );
54
-
55
- $this->id = 'components';
56
- $this->menu_title = '<span style="color:#f18500">' . __( 'Components', 'instagram-slider-widget' ) . '</span>';
57
- $this->page_title = __( 'Components', 'instagram-slider-widget' );
58
- $this->template_name = "components";
59
- $this->menu_target = "widgets-" . $plugin->getPluginName();
60
- $this->capabilitiy = "manage_options";
61
- }
62
-
63
- public function indexAction()
64
- {
65
-
66
- $components = [
67
- [
68
- 'name' => 'tiktok_feed',
69
- 'title' => __('TikTok Feed', 'instagram-slider-widget'),
70
- 'url' => 'https://wordpress.org/plugins/cm-tiktok-feed/',
71
- 'type' => 'internal',
72
- 'build' => 'free',
73
- 'component_const' => 'WTIK_PLUGIN_ACTIVE',
74
- 'base_path' => 'tiktok-feed/tiktok-feed.php',
75
- 'slug' => 'cm-tiktok-feed/cm-tiktok-feed.php',
76
- 'icon' => 'https://ps.w.org/cm-tiktok-feed/assets/icon-256x256.png',
77
- 'description' => __('DISPLAY TIKTOK IN WIDGETS, POSTS, PAGES, OR ANYWHERE ELSE USING SHORTCODES.', 'instagram-slider-widget'),
78
- 'settings_url' => admin_url('admin.php?page=widgets-wtiktok')
79
- ]
80
- ];
81
-
82
- echo $this->render('components', ['components' => $components]);
83
- }
84
-
85
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/pages/feeds.php ADDED
@@ -0,0 +1,271 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+
5
+
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ }
9
+
10
+ /**
11
+ * The page Settings.
12
+ *
13
+ * @since 1.0.0
14
+ */
15
+ class WIS_FeedsPage extends WIS_Page {
16
+
17
+ /**
18
+ * Тип страницы
19
+ *
20
+ * @var string
21
+ */
22
+ public $type = 'page';
23
+
24
+ /**
25
+ * The id of the page in the admin menu.
26
+ *
27
+ * @var string
28
+ */
29
+ public $id;
30
+
31
+ /**
32
+ * @var string
33
+ */
34
+ public $template_name = 'feeds';
35
+
36
+ /**
37
+ * @var string
38
+ */
39
+ public $page_menu_dashicon = 'dashicons-slides';
40
+
41
+ /**
42
+ * Заголовок страницы, также использует в меню, как название закладки
43
+ *
44
+ * @var bool
45
+ */
46
+ public $show_page_title = true;
47
+
48
+ /**
49
+ * @var bool
50
+ */
51
+ public $show_right_sidebar = true;
52
+
53
+ /**
54
+ * @var int
55
+ */
56
+ public $page_menu_position = 15;
57
+
58
+ /**
59
+ * @param WIS_Plugin $plugin
60
+ */
61
+ public function __construct( $plugin ) {
62
+ $this->id = 'feeds';
63
+ $this->page_title = __( 'Social Slider Feeds', 'instagram-slider-widget' );
64
+ $this->menu_title = __( 'Social Slider Feeds', 'instagram-slider-widget' );
65
+ $this->menu_sub_title = __( 'Feeds', 'instagram-slider-widget' );
66
+ $this->menu_tab_title = __( 'Feeds', 'instagram-slider-widget' );
67
+ $this->menu_icon = '~/admin/assets/img/wis.png';
68
+ $this->capabilitiy = 'manage_options';
69
+
70
+ parent::__construct( $plugin );
71
+
72
+ $this->plugin = $plugin;
73
+ }
74
+
75
+ public function assets( $scripts, $styles ) {
76
+ parent::assets( $scripts, $styles );
77
+
78
+ //$this->styles->required = [];
79
+ $this->styles->add( WIS_PLUGIN_URL . '/admin/assets/css/feeds.css', [], 'wis-feeds-style', WIS_PLUGIN_VERSION );
80
+ //$this->styles->add( WIS_PLUGIN_URL . "/admin/assets/css/spectre.css", [], 'wis-feeds-forms', WIS_PLUGIN_VERSION );
81
+ $this->scripts->add( WIS_PLUGIN_URL . '/admin/assets/js/feeds.js', [ 'jquery' ], 'wis-feeds-script', WIS_PLUGIN_VERSION );
82
+ $this->scripts->localize( 'wis_feeds', [
83
+ 'add_account_nonce' => wp_create_nonce( 'addAccountByToken' ),
84
+ 'wis_nonce' => wp_create_nonce( 'addAccountByToken' ),
85
+ 'remove_account' => __( 'Are you sure want to delete this feed?', 'instagram-slider-widget' ),
86
+ 'nonce' => wp_create_nonce( 'wis_nonce' ),
87
+ 'modal_close_confirm' => __( "You haven't finished adding the feed. Are you sure you want to close the window?", 'instagram-slider-widget' ),
88
+ 'hide_show_fields' => $this->get_hideShow_fields(),
89
+ ] );
90
+ }
91
+
92
+ /**
93
+ * @inerhitDoc
94
+ */
95
+ public function showPageContent() {
96
+ if ( isset( $_GET['action'] ) && isset( $_GET['social'] ) ) {
97
+ $social = sanitize_text_field( $_GET['social'] );
98
+
99
+ switch ( sanitize_text_field( $_GET['action'] ) ) {
100
+ case 'add':
101
+ $this->edit_action( $social );
102
+
103
+ return;
104
+ case 'edit':
105
+ if ( isset( $_GET['feed'] ) ) {
106
+ $this->edit_action( $social, $_GET['feed'] );
107
+ }
108
+
109
+ return;
110
+ case 'delete':
111
+ if ( isset( $_GET['feed'] ) ) {
112
+ $this->delete_action( $social, $_GET['feed'] );
113
+ }
114
+
115
+ return;
116
+ default:
117
+ unset( $_GET['action'] );
118
+ $this->showPageContent();
119
+
120
+ return;
121
+ }
122
+ }
123
+
124
+ $socials = [
125
+ 'instagram' => [
126
+ 'title' => __( 'Instagram feeds', 'instagram-slider-widget' ),
127
+ 'description' => __( 'Manage Instagram feeds', 'instagram-slider-widget' ),
128
+ 'content' => $this->instagram(),
129
+ ],
130
+ 'facebook' => [
131
+ 'title' => __( 'Facebook feeds', 'instagram-slider-widget' ),
132
+ 'description' => __( 'Manage Facebook feeds', 'instagram-slider-widget' ),
133
+ 'content' => $this->facebook(),
134
+ ],
135
+ 'youtube' => [
136
+ 'title' => __( 'Youtube feeds', 'instagram-slider-widget' ),
137
+ 'description' => __( 'Manage Youtube feeds', 'instagram-slider-widget' ),
138
+ 'content' => $this->youtube(),
139
+ ],
140
+ ];
141
+
142
+ $data = [
143
+ 'socials' => $socials,
144
+ ];
145
+
146
+ echo $this->render( $this->template_name, $data ); // @codingStandardsIgnoreLine
147
+ }
148
+
149
+ /**
150
+ * Логика на вкладке Инстаграма
151
+ *
152
+ * @return string
153
+ */
154
+ public function instagram() {
155
+ $instagram = new WIS_Feeds( 'instagram' );
156
+ $data = [
157
+ 'social' => 'instagram',
158
+ 'feeds' => $instagram->feeds,
159
+ ];
160
+ $result = $this->render( WIG_COMPONENT_VIEWS_DIR . '/feeds', $data );
161
+
162
+ return $result;
163
+ }
164
+
165
+ /**
166
+ * Логика на вкладке Facebook
167
+ *
168
+ * @return string
169
+ */
170
+ public function facebook() {
171
+ $facebook = new WIS_Feeds( 'facebook' );
172
+ $data = [
173
+ 'social' => 'facebook',
174
+ 'feeds' => $facebook->feeds,
175
+ ];
176
+ $result = $this->render( WFB_COMPONENT_VIEWS_DIR . '/feeds', $data );
177
+
178
+ return $result;
179
+ }
180
+
181
+ /**
182
+ * Логика на вкладке Youtube
183
+ *
184
+ * @return string
185
+ */
186
+ public function youtube() {
187
+ $youtube = new WIS_Feeds( 'youtube' );
188
+ $data = [
189
+ 'social' => 'youtube',
190
+ 'feeds' => $youtube->feeds,
191
+ ];
192
+ $result = $this->render( WYT_COMPONENT_VIEWS_DIR . '/feeds', $data );
193
+
194
+ return $result;
195
+ }
196
+
197
+ /**
198
+ * @param $social
199
+ * @param array $data
200
+ *
201
+ * @return WIS_Facebook_Feed|WIS_Instagram_Feed|WIS_Youtube_Feed|null
202
+ */
203
+ private function getSocialClass( $social, $data = [] ) {
204
+ switch ( $social ) {
205
+ case 'instagram':
206
+ return new WIS_Instagram_Feed( $data );
207
+ case 'facebook':
208
+ return new WIS_Facebook_Feed( $data );
209
+ case 'youtube':
210
+ return new WIS_Youtube_Feed( $data );
211
+ default:
212
+ return null;
213
+ }
214
+
215
+ }
216
+
217
+ public function edit_action( $social, $feed_id = 0 ) {
218
+ $feeds = new WIS_Feeds( $social );
219
+
220
+ // ADD/EDIT Action
221
+ if ( isset( $_POST['wis-feed-save-action'] ) ) {
222
+ unset( $_POST['wis-feed-save-action'] );
223
+
224
+ $feed = $this->getSocialClass( $social, $_POST );
225
+
226
+ if ( $feed_id ) {
227
+ $feeds->update_feed( $feed_id, $feed );
228
+ //$_SERVER['REQUEST_URI'] = remove_query_arg( 'action' );
229
+ //$_SERVER['REQUEST_URI'] = remove_query_arg( 'feed' );
230
+ } else {
231
+ $feeds->add_feed( $feed );
232
+ $_SERVER['REQUEST_URI'] = remove_query_arg( 'action' );
233
+ }
234
+
235
+ //wp_redirect( $_SERVER['REQUEST_URI'] );
236
+ }
237
+
238
+ // FORM
239
+ $this->styles->required = [];
240
+ $this->styles->add( WIS_PLUGIN_URL . '/admin/assets/css/spectre.css', [], 'wis-feeds-forms', WIS_PLUGIN_VERSION );
241
+
242
+ if ( $feed_id ) {
243
+ $feed = $feeds->get_feed( $feed_id );
244
+ } else {
245
+ $feed = $this->getSocialClass( $social );
246
+ }
247
+
248
+ $feed->form( $feed_id );
249
+ }
250
+
251
+ public function delete_action( $social, $feed_id = 0 ) {
252
+ $feeds = new WIS_Feeds( $social );
253
+
254
+ if ( $feed_id ) {
255
+ $feeds->delete_feed( $feed_id );
256
+ }
257
+
258
+ $_SERVER['REQUEST_URI'] = remove_query_arg( 'action' );
259
+ $_SERVER['REQUEST_URI'] = remove_query_arg( 'feed' );
260
+ wp_safe_redirect( $_SERVER['REQUEST_URI'] );
261
+ }
262
+
263
+ public function get_hideShow_fields() {
264
+ return [
265
+ 'account',
266
+ 'account_business',
267
+ 'username',
268
+ 'hashtag',
269
+ ];
270
+ }
271
+ }
admin/pages/license.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  // Exit if accessed directly
4
- use Instagram\Includes\WIS_Plugin;
5
 
6
  if ( ! defined( 'ABSPATH' ) ) {
7
  exit;
@@ -19,11 +19,6 @@ class WIS_LicensePage extends WIS_Page {
19
  */
20
  public $type = "page";
21
 
22
- /**
23
- * @var bool
24
- */
25
- public $internal = true;
26
-
27
  /**
28
  * {@inheritdoc}
29
  */
@@ -37,7 +32,7 @@ class WIS_LicensePage extends WIS_Page {
37
  /**
38
  * {@inheritdoc}
39
  */
40
- public $page_menu_position = 0;
41
 
42
  /**
43
  * {@inheritdoc}
@@ -59,7 +54,7 @@ class WIS_LicensePage extends WIS_Page {
59
 
60
  /**
61
  * @since 2.0.7
62
- * @var \WBCR\Factory_445\Premium\Provider
63
  */
64
  protected $premium;
65
 
@@ -77,7 +72,7 @@ class WIS_LicensePage extends WIS_Page {
77
 
78
  /**
79
  * @since 2.0.7
80
- * @var \WBCR\Factory_445\Premium\Interfaces\License
81
  */
82
  protected $premium_license;
83
 
@@ -91,13 +86,11 @@ class WIS_LicensePage extends WIS_Page {
91
  public function __construct( $plugin ) {
92
  $this->plugin = $plugin;
93
 
94
- parent::__construct( $plugin );
95
-
96
  $this->id = 'license';
97
  $this->menu_title = '<span style="color:#f18500">' . __( 'License', 'instagram-slider-widget' ) . '</span>';
98
- $this->page_title = __( 'License of Social Slider Widget', 'instagram-slider-widget' );
99
  $this->template_name = "license";
100
- $this->menu_target = "widgets-" . $plugin->getPluginName();
101
  $this->capabilitiy = "manage_options";
102
 
103
  $this->premium = WIS_Plugin::app()->premium;
@@ -105,6 +98,8 @@ class WIS_LicensePage extends WIS_Page {
105
  $this->is_premium_active = $this->premium->is_active();
106
  $this->premium_has_subscription = $this->premium->has_paid_subscription();
107
  $this->premium_license = $this->premium->get_license();
 
 
108
  }
109
 
110
  /**
@@ -115,11 +110,11 @@ class WIS_LicensePage extends WIS_Page {
115
 
116
  $this->styles->add( WIS_PLUGIN_URL . '/admin/assets/css/license-manager.css' );
117
 
118
- $this->styles->request( array(
119
  'bootstrap.core',
120
  'bootstrap.form-groups',
121
  'bootstrap.separator',
122
- ), 'bootstrap' );
123
 
124
  $this->scripts->add( WIS_PLUGIN_URL . '/admin/assets/js/license-manager.js' );
125
  }
1
  <?php
2
 
3
  // Exit if accessed directly
4
+
5
 
6
  if ( ! defined( 'ABSPATH' ) ) {
7
  exit;
19
  */
20
  public $type = "page";
21
 
 
 
 
 
 
22
  /**
23
  * {@inheritdoc}
24
  */
32
  /**
33
  * {@inheritdoc}
34
  */
35
+ public $page_menu_position = 30;
36
 
37
  /**
38
  * {@inheritdoc}
54
 
55
  /**
56
  * @since 2.0.7
57
+ * @var \WBCR\Factory_453\Premium\Provider
58
  */
59
  protected $premium;
60
 
72
 
73
  /**
74
  * @since 2.0.7
75
+ * @var \WBCR\Factory_453\Premium\Interfaces\License
76
  */
77
  protected $premium_license;
78
 
86
  public function __construct( $plugin ) {
87
  $this->plugin = $plugin;
88
 
 
 
89
  $this->id = 'license';
90
  $this->menu_title = '<span style="color:#f18500">' . __( 'License', 'instagram-slider-widget' ) . '</span>';
91
+ $this->page_title = __( 'License of ' . $plugin->getPluginTitle(), 'instagram-slider-widget' );
92
  $this->template_name = "license";
93
+ $this->menu_target = "feeds-" . $plugin->getPluginName();
94
  $this->capabilitiy = "manage_options";
95
 
96
  $this->premium = WIS_Plugin::app()->premium;
98
  $this->is_premium_active = $this->premium->is_active();
99
  $this->premium_has_subscription = $this->premium->has_paid_subscription();
100
  $this->premium_license = $this->premium->get_license();
101
+
102
+ parent::__construct( $plugin );
103
  }
104
 
105
  /**
110
 
111
  $this->styles->add( WIS_PLUGIN_URL . '/admin/assets/css/license-manager.css' );
112
 
113
+ $this->styles->request( [
114
  'bootstrap.core',
115
  'bootstrap.form-groups',
116
  'bootstrap.separator',
117
+ ], 'bootstrap' );
118
 
119
  $this->scripts->add( WIS_PLUGIN_URL . '/admin/assets/js/license-manager.js' );
120
  }
admin/pages/log.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ }
6
+
7
+ require_once WIS_PLUGIN_DIR . '/admin/class-page-logger.php';
8
+
9
+ /**
10
+ * Класс отвечает за работу страницы логов.
11
+ *
12
+ * @author Artem Prihodko <webtemyk@yandex.ru>
13
+ * @copyright (c) 2021, Webcraftic
14
+ * @version 1.0
15
+ */
16
+ class WIS_LogPage extends WIS_Page_Logger {
17
+
18
+ /**
19
+ * {@inheritdoc}
20
+ */
21
+ public $id;
22
+
23
+ /**
24
+ * Тип страницы
25
+ * options - предназначена для создании страниц с набором опций и настроек.
26
+ * page - произвольный контент, любой html код
27
+ *
28
+ * @var string
29
+ */
30
+ public $type = 'page';
31
+
32
+ /**
33
+ * @var string
34
+ */
35
+ public $page_menu_dashicon = 'dashicons-list-view';
36
+
37
+ /**
38
+ * Menu position (only if a page is placed as a main menu).
39
+ * @link http://codex.wordpress.org/Function_Reference/add_menu_page
40
+ * @var string
41
+ */
42
+ public $menu_position = 58;
43
+
44
+ /**
45
+ * @var bool
46
+ */
47
+ public $internal = false;
48
+
49
+ /**
50
+ * Заголовок страницы, также использует в меню, как название закладки
51
+ *
52
+ * @var bool
53
+ */
54
+ public $show_page_title = true;
55
+
56
+ /**
57
+ * @var int
58
+ */
59
+ public $page_menu_position = 300;
60
+
61
+ /**
62
+ * {@inheritdoc}
63
+ */
64
+ public $available_for_multisite = false;
65
+
66
+ /**
67
+ * {@inheritdoc}
68
+ */
69
+ public $show_right_sidebar_in_options = false;
70
+
71
+ /**
72
+ * @param WIS_Plugin $plugin
73
+ */
74
+ public function __construct( WIS_Plugin $plugin ) {
75
+ $this->id = 'log';
76
+ $this->menu_target = "feeds-" . $plugin->getPluginName();
77
+ $this->page_title = __( 'Plugin logs', 'instagram-slider-widget' );
78
+ $this->menu_title = $this->getMenuTitle();
79
+
80
+ $this->plugin = $plugin;
81
+
82
+ parent::__construct( $plugin );
83
+ }
84
+
85
+ /**
86
+ * {@inheritdoc}
87
+ */
88
+ public function getMenuTitle() {
89
+ return __( 'Logs', 'instagram-slider-widget' );
90
+ }
91
+
92
+ /**
93
+ * {@inheritdoc}
94
+ *
95
+ * @return void
96
+ * @since 1.0.0
97
+ */
98
+ public function assets( $scripts, $styles ) {
99
+ parent::assets( $scripts, $styles );
100
+ }
101
+ }
admin/pages/manual.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
 
3
 
4
- use Instagram\Includes\WIS_Plugin;
5
 
6
- class Manual extends WIS_Page{
 
7
  /**
8
  * Тип страницы
9
  * options - предназначена для создании страниц с набором опций и настроек.
@@ -13,6 +13,11 @@ class Manual extends WIS_Page{
13
  */
14
  public $type = 'page';
15
 
 
 
 
 
 
16
  /**
17
  * Menu icon (only if a page is placed as a main menu).
18
  * For example: '~/assets/img/menu-icon.png'
@@ -26,14 +31,13 @@ class Manual extends WIS_Page{
26
  */
27
  public $page_menu_dashicon;
28
 
29
- public $internal = true;
30
-
31
  /**
32
  * @param WIS_Plugin $plugin
33
  */
34
  public function __construct( $plugin ) {
 
35
  $this->id = "manual";
36
- $this->menu_target = "widgets-" . $plugin->getPluginName();
37
  $this->page_title = __( 'How to get Youtube API key', 'instagram-slider-widget' );
38
  $this->template_name = "manual";
39
 
1
  <?php
2
 
3
 
 
4
 
5
+
6
+ class Manual extends WIS_Page {
7
  /**
8
  * Тип страницы
9
  * options - предназначена для создании страниц с набором опций и настроек.
13
  */
14
  public $type = 'page';
15
 
16
+ /**
17
+ * @var bool
18
+ */
19
+ public $internal = true;
20
+
21
  /**
22
  * Menu icon (only if a page is placed as a main menu).
23
  * For example: '~/assets/img/menu-icon.png'
31
  */
32
  public $page_menu_dashicon;
33
 
 
 
34
  /**
35
  * @param WIS_Plugin $plugin
36
  */
37
  public function __construct( $plugin ) {
38
+ $this->internal = true;
39
  $this->id = "manual";
40
+ $this->menu_target = "feeds-" . $plugin->getPluginName();
41
  $this->page_title = __( 'How to get Youtube API key', 'instagram-slider-widget' );
42
  $this->template_name = "manual";
43
 
admin/pages/profiles.php ADDED
@@ -0,0 +1,230 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+
5
+
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ }
9
+
10
+ /**
11
+ * The page Settings.
12
+ *
13
+ * @since 1.0.0
14
+ */
15
+ class WIS_ProfilesPage extends WIS_Page {
16
+
17
+ /**
18
+ * Тип страницы
19
+ *
20
+ * @var string
21
+ */
22
+ public $type = 'page';
23
+
24
+ /**
25
+ * The id of the page in the admin menu.
26
+ *
27
+ * @var string
28
+ */
29
+ public $id;
30
+
31
+ /**
32
+ * @var string
33
+ */
34
+ public $template_name = 'profiles';
35
+
36
+ /**
37
+ * @var string
38
+ */
39
+ public $page_menu_dashicon = 'dashicons-admin-users';
40
+
41
+ /**
42
+ * Заголовок страницы, также использует в меню, как название закладки
43
+ *
44
+ * @var bool
45
+ */
46
+ public $show_page_title = true;
47
+
48
+ /**
49
+ * @var bool
50
+ */
51
+ public $show_right_sidebar = true;
52
+
53
+ /**
54
+ * @var int
55
+ */
56
+ public $page_menu_position = 10;
57
+
58
+ /**
59
+ * @var WIS_Facebook_Profiles
60
+ */
61
+ public $facebook;
62
+
63
+ /**
64
+ * @var WIS_Instagram_Profiles
65
+ */
66
+ public $instagram;
67
+
68
+ /**
69
+ * @var WIS_Youtube_Profiles
70
+ */
71
+ public $youtube;
72
+
73
+ /**
74
+ * @param WIS_Plugin $plugin
75
+ */
76
+ public function __construct( $plugin ) {
77
+ $this->id = "settings";
78
+ $this->page_title = __( 'Social profiles', 'instagram-slider-widget' );
79
+ $this->menu_title = __( 'Profiles', 'instagram-slider-widget' );
80
+ $this->menu_target = "feeds-" . $plugin->getPluginName();
81
+
82
+ parent::__construct( $plugin );
83
+
84
+ $this->plugin = $plugin;
85
+
86
+ $this->instagram = new WIS_Instagram_Profiles( $this );
87
+ $this->facebook = new WIS_Facebook_Profiles( $this );
88
+ $this->youtube = new WIS_Youtube_Profiles( $this );
89
+
90
+ }
91
+
92
+ /**
93
+ * @return string|null
94
+ */
95
+ public static function get_page_hook() {
96
+ return get_plugin_page_hook( 'settings-wisw', 'admin.php' );
97
+ }
98
+
99
+ public function assets( $scripts, $styles ) {
100
+ parent::assets( $scripts, $styles );
101
+
102
+ $this->scripts->request( 'jquery' );
103
+
104
+ $this->scripts->request( [
105
+ 'control.checkbox',
106
+ 'control.dropdown',
107
+ ], 'bootstrap' );
108
+
109
+ $this->styles->request( [
110
+ 'bootstrap.core',
111
+ 'bootstrap.form-group',
112
+ 'bootstrap.separator',
113
+ 'control.dropdown',
114
+ 'control.checkbox',
115
+ ], 'bootstrap' );
116
+
117
+ wp_enqueue_style( 'wyoutube-admin-styles', WYT_COMPONENT_URL . '/admin/assets/css/wyoutube-admin.css', [], WYT_COMPONENT_VERSION );
118
+ wp_enqueue_script( 'wyoutube-admin-script', WYT_COMPONENT_URL . '/admin/assets/js/wyoutube-admin.js', [ 'jquery' ], WYT_COMPONENT_VERSION, true );
119
+ wp_enqueue_script( 'wfacebook-admin-script', WFB_COMPONENT_URL . '/assets/admin/js/wfacebook-admin.js', [ 'jquery' ], WFB_COMPONENT_VERSION, true );
120
+ wp_enqueue_script( 'winstagram-admin-script', WIG_COMPONENT_URL . '/assets/admin/js/instagram-scripts.js', [ 'jquery' ], WIG_COMPONENT_VERSION, true );
121
+
122
+ $wyt = json_encode( [
123
+ 'nonce' => wp_create_nonce( 'wyt_nonce' ),
124
+ 'remove_account' => __( 'Are you sure want to delete this account?', 'instagram-slider-widget' ),
125
+ ] );
126
+ wp_add_inline_script( 'wyoutube-admin-script', "var wyt = $wyt;" );
127
+
128
+ $wfb = json_encode( [
129
+ 'nonce' => wp_create_nonce( 'wfb_nonce' ),
130
+ 'remove_account' => __( 'Are you sure want to delete this account?', 'instagram-slider-widget' ),
131
+ ] );
132
+ wp_add_inline_script( 'wfacebook-admin-script', "var wfb = $wfb;" );
133
+
134
+ $wig = json_encode( [
135
+ 'nonce' => wp_create_nonce( 'wig_nonce' ),
136
+ 'remove_account' => __( 'Are you sure want to delete this account?', 'instagram-slider-widget' ),
137
+ ] );
138
+ wp_add_inline_script( 'winstagram-admin-script', "var wig = $wig;" );
139
+ }
140
+
141
+ /**
142
+ * @param $social
143
+ *
144
+ * @return string
145
+ */
146
+ public function getSocialUrl( $social = '' ) {
147
+ $args = [
148
+ 'page' => $this->id . "-" . WIS_Plugin::app()->getPluginName(),
149
+ ];
150
+ if ( $social ) {
151
+ $args['tab'] = sanitize_text_field( $social );
152
+ }
153
+
154
+ return admin_url( "admin.php?" ) . http_build_query( $args );
155
+ }
156
+
157
+ public function showPageContent() {
158
+ if ( isset( $_GET['action'] ) && isset( $_GET['social'] ) ) {
159
+ $social = sanitize_text_field( $_GET['social'] );
160
+
161
+ switch ( sanitize_text_field( $_GET['action'] ) ) {
162
+ case 'delete':
163
+ if ( isset( $_GET['account'] ) ) {
164
+ $this->delete_action( $social, sanitize_text_field( $_GET['account'] ) );
165
+ }
166
+
167
+ return;
168
+ default:
169
+ unset( $_GET['action'] );
170
+ $this->showPageContent();
171
+
172
+ return;
173
+ }
174
+ }
175
+
176
+ $socials = [
177
+ 'instagram' => [
178
+ 'title' => __( 'Instagram', 'instagram-slider-widget' ),
179
+ 'description' => __( 'Manage Instagram accounts', 'instagram-slider-widget' ),
180
+ 'content' => $this->instagram->content(),
181
+ ],
182
+ 'facebook' => [
183
+ 'title' => __( 'Facebook', 'instagram-slider-widget' ),
184
+ 'description' => __( 'Manage Facebook accounts', 'instagram-slider-widget' ),
185
+ 'content' => $this->facebook->content(),
186
+ ],
187
+ 'youtube' => [
188
+ 'title' => __( 'Youtube', 'instagram-slider-widget' ),
189
+ 'description' => __( 'Manage Youtube accounts', 'instagram-slider-widget' ),
190
+ 'content' => $this->youtube->content(),
191
+ ],
192
+ ];
193
+
194
+ $data = [
195
+ 'socials' => $socials,
196
+ ];
197
+ echo $this->render( $this->template_name, $data );
198
+ }
199
+
200
+ public function delete_action( $social, $account ) {
201
+ switch ( $social ) {
202
+ case 'instagram':
203
+ $profiles = new WIS_Instagram_Profiles();
204
+ $is_business = isset( $_GET['business'] ) && $_GET['business'];
205
+ if ( $account ) {
206
+ $profiles->delete_account( $account, $is_business );
207
+ }
208
+ break;
209
+ case 'facebook':
210
+ $profiles = new WIS_Facebook_Profiles();
211
+ if ( $account ) {
212
+ $profiles->delete_account( $account );
213
+ }
214
+ break;
215
+ case 'youtube':
216
+ $profiles = new WIS_Youtube_Profiles();
217
+ if ( $account ) {
218
+ $profiles->delete_account( $account );
219
+ }
220
+ break;
221
+ }
222
+
223
+ $_SERVER['REQUEST_URI'] = remove_query_arg( 'action' );
224
+ $_SERVER['REQUEST_URI'] = remove_query_arg( 'account' );
225
+ $_SERVER['REQUEST_URI'] = remove_query_arg( 'social' );
226
+ $_SERVER['REQUEST_URI'] = remove_query_arg( 'business' );
227
+ wp_redirect( $_SERVER['REQUEST_URI'] );
228
+ }
229
+
230
+ }
admin/pages/settings.php DELETED
@@ -1,237 +0,0 @@
1
- <?php
2
-
3
- // Exit if accessed directly
4
- use Instagram\Includes\WIS_Plugin;
5
-
6
- if ( ! defined( 'ABSPATH' ) ) {
7
- exit;
8
- }
9
-
10
- /**
11
- * The page Settings.
12
- *
13
- * @since 1.0.0
14
- */
15
- class WIS_SettingsPage extends WIS_Page {
16
-
17
- /**
18
- * Тип страницы
19
- * options - предназначена для создании страниц с набором опций и настроек.
20
- * page - произвольный контент, любой html код
21
- *
22
- * @var string
23
- */
24
- public $type = 'options';
25
-
26
- /**
27
- * The id of the page in the admin menu.
28
- *
29
- * Mainly used to navigate between pages.
30
- *
31
- * @since 1.0.0
32
- * @see FactoryPages444_AdminPage
33
- *
34
- * @var string
35
- */
36
- public $id;
37
-
38
- /**
39
- * Menu icon (only if a page is placed as a main menu).
40
- * For example: '~/assets/img/menu-icon.png'
41
- * For example dashicons: '\f321'
42
- * @var string
43
- */
44
- public $menu_icon;
45
-
46
- /**
47
- * @var string
48
- */
49
- public $page_menu_dashicon = 'dashicons-performance';
50
-
51
- /**
52
- * Menu position (only if a page is placed as a main menu).
53
- * @link http://codex.wordpress.org/Function_Reference/add_menu_page
54
- * @var string
55
- */
56
- public $menu_position = 58;
57
-
58
- /**
59
- * Menu type. Set it to add the page to the specified type menu.
60
- * For example: 'post'
61
- * @var string
62
- */
63
- public $menu_post_type = null;
64
-
65
- /**
66
- * Visible page title.
67
- * For example: 'License Manager'
68
- * @var string
69
- */
70
- public $page_title;
71
-
72
- /**
73
- * Visible title in menu.
74
- * For example: 'License Manager'
75
- * @var string
76
- */
77
- public $menu_title;
78
-
79
- /**
80
- * If set, an extra sub menu will be created with another title.
81
- * @var string
82
- */
83
- public $menu_sub_title;
84
-
85
- /**
86
- *
87
- * @var
88
- */
89
- public $page_menu_short_description;
90
-
91
- /**
92
- * Заголовок страницы, также использует в меню, как название закладки
93
- *
94
- * @var bool
95
- */
96
- public $show_page_title = true;
97
-
98
- /**
99
- * @var int
100
- */
101
- public $page_menu_position = 20;
102
-
103
-
104
- /**
105
- * @param WIS_Plugin $plugin
106
- */
107
- public function __construct( $plugin ) {
108
- $this->id = "settings";
109
- $this->page_title = __( 'Settings of Social Slider Widget', 'instagram-slider-widget' );
110
- $this->menu_title = __( 'Settings', 'instagram-slider-widget' );
111
- $this->menu_target = "widgets-" . $plugin->getPluginName();
112
- $this->menu_icon = '~/admin/assets/img/wis.png';
113
- $this->capabilitiy = "manage_options";
114
- $this->template_name = "settings";
115
-
116
- parent::__construct( $plugin );
117
-
118
- $this->plugin = $plugin;
119
- }
120
-
121
- public function assets( $scripts, $styles ) {
122
- $this->scripts->request( 'jquery' );
123
-
124
- $this->scripts->request( [
125
- 'control.checkbox',
126
- 'control.dropdown'
127
- ], 'bootstrap' );
128
-
129
- $this->styles->request( [
130
- 'bootstrap.core',
131
- 'bootstrap.form-group',
132
- 'bootstrap.separator',
133
- 'control.dropdown',
134
- 'control.checkbox',
135
- ], 'bootstrap' );
136
-
137
- wp_enqueue_style( 'wyoutube-admin-styles', WYT_PLUGIN_URL . '/admin/assets/css/wyoutube-admin.css', array(), WYT_PLUGIN_VERSION );
138
- wp_enqueue_script( 'wyoutube-admin-script', WYT_PLUGIN_URL . '/admin/assets/js/wyoutube-admin.js', array( 'jquery' ), WYT_PLUGIN_VERSION, true );
139
-
140
- $wyt = json_encode([
141
- 'nonce' => wp_create_nonce( 'wyt_nonce' ),
142
- 'remove_account' => __( 'Are you sure want to delete this account?', 'yft' ),
143
- ]);
144
- wp_add_inline_script( 'wyoutube-admin-script', "var wyt = $wyt;");
145
- }
146
-
147
- public function indexAction() {
148
- wp_enqueue_style( 'wis-tabs-style', WIS_PLUGIN_URL . '/admin/assets/css/component.css', array(), WIS_PLUGIN_VERSION );
149
- if ( isset( $_GET['tab'] ) && ! empty( $_GET['tab'] ) ) {
150
- switch ( $_GET['tab'] ) {
151
- case "instagram":
152
- $this->instagram();
153
- break;
154
- case "facebook":
155
- WIS_FacebookSlider::app()->FACEBOOK->tabAction();
156
- break;
157
- case "youtube":
158
- $this->youtube();
159
- break;
160
- }
161
- } else {
162
- $this->instagram();
163
- }
164
-
165
- parent::indexAction();
166
- }
167
-
168
- /**
169
- * Логика на вкладке Инстаграма
170
- */
171
- public function instagram() {
172
- if ( isset( $_GET['type'] ) && $_GET['type'] == 'business' ) {
173
- if ( isset( $_GET['token_error'] ) ) {
174
- $token_error = wp_strip_all_tags($_GET['token_error']);
175
- echo '<div class="notice notice-error"><p>' . $token_error . '</p></div>';
176
- $_SERVER['REQUEST_URI'] = str_replace( '#_', '', remove_query_arg( 'token_error' ) );
177
- } else {
178
- if ( isset( $_GET['access_token'] ) ) {
179
- $token = $_GET['access_token'];
180
- $result = WIS_InstagramSlider::app()->update_account_profiles( $token, true );
181
- $_SERVER['REQUEST_URI'] = remove_query_arg( 'access_token' );
182
- ?>
183
- <div id="wis_accounts_modal" class="wis_accounts_modal">
184
- <div class="wis_modal_header">
185
- Choose Account:
186
- </div>
187
- <div class="wis_modal_content">
188
- <?php echo $result[0]; ?>
189
- </div>
190
- </div>
191
- <div id="wis_modal_overlay" class="wis_modal_overlay"></div>
192
- <span class="wis-overlay-spinner is-active">&nbsp;</span>
193
- <?php
194
- }
195
- }
196
- } else {
197
- if ( isset( $_GET['token_error'] ) ) {
198
- $token_error = wp_strip_all_tags($_GET['token_error']);
199
- echo '<div class="notice notice-error"><p>' . $token_error . '</p></div>';
200
- $_SERVER['REQUEST_URI'] = str_replace( '#_', '', remove_query_arg( 'token_error' ) );
201
- } else {
202
- if ( isset( $_GET['access_token'] ) ) {
203
- $token = $_GET['access_token'];
204
- $result = WIS_InstagramSlider::app()->update_account_profiles( $token );
205
- $_SERVER['REQUEST_URI'] = str_replace( '#_', '', remove_query_arg( 'access_token' ) );
206
- }
207
- }
208
- }
209
- }
210
-
211
- /**
212
- * Логика на вкладке Ютуба
213
- */
214
- public function youtube() {
215
-
216
- if(isset($_POST['wyt_api_key']) && $_POST['wyt_api_key'] != null){
217
- $this->plugin->update_youtube_api_key($_POST['wyt_api_key']);
218
-
219
- if(isset($_POST['wyt_feed_link']) && $_POST['wyt_feed_link'] != null){
220
-
221
- $link = $_POST['wyt_feed_link'];
222
- $start_with_string = 'https://www.youtube.com/channel/';
223
-
224
- if(stripos($link, $start_with_string) === false) return false;
225
-
226
- $id = explode('/channel/', $link)[1];
227
- $id = explode('/', $id)[0];
228
-
229
- $profile = $this->plugin->youtube_api->getUserById($id)->items[0];
230
- $profile->snippet->channelId = $id;
231
- $this->plugin->update_youtube_feed( $profile );
232
-
233
- }
234
- }
235
- }
236
-
237
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/pages/widgets.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  // Exit if accessed directly
4
- use Instagram\Includes\WIS_Plugin;
5
 
6
  if ( ! defined( 'ABSPATH' ) ) {
7
  exit;
@@ -15,30 +15,27 @@ if ( ! defined( 'ABSPATH' ) ) {
15
  class WIS_WidgetsPage extends WIS_Page {
16
 
17
  /**
18
- * Тип страницы
19
- * options - предназначена для создании страниц с набором опций и настроек.
20
- * page - произвольный контент, любой html код
21
  *
22
  * @var string
23
  */
24
- public $type;
25
 
26
  /**
27
- * The id of the page in the admin menu.
28
- *
29
- * Mainly used to navigate between pages.
30
  *
31
- * @since 1.0.0
32
- * @see FactoryPages444_AdminPage
 
 
 
 
33
  *
34
  * @var string
35
  */
36
- public $id;
37
 
38
  /**
39
- * Menu icon (only if a page is placed as a main menu).
40
- * For example: '~/assets/img/menu-icon.png'
41
- * For example dashicons: '\f321'
42
  * @var string
43
  */
44
  public $menu_icon;
@@ -46,38 +43,29 @@ class WIS_WidgetsPage extends WIS_Page {
46
  /**
47
  * @var string
48
  */
49
- public $page_menu_dashicon = 'dashicons-performance';
50
 
51
  /**
52
- * Menu position (only if a page is placed as a main menu).
53
- * @link http://codex.wordpress.org/Function_Reference/add_menu_page
54
  * @var string
55
  */
56
  public $menu_position = 58;
57
 
58
  /**
59
- * Menu type. Set it to add the page to the specified type menu.
60
- * For example: 'post'
61
  * @var string
62
  */
63
  public $menu_post_type = null;
64
 
65
  /**
66
- * Visible page title.
67
- * For example: 'License Manager'
68
  * @var string
69
  */
70
  public $page_title;
71
 
72
  /**
73
- * Visible title in menu.
74
- * For example: 'License Manager'
75
  * @var string
76
  */
77
  public $menu_title;
78
 
79
  /**
80
- * If set, an extra sub menu will be created with another title.
81
  * @var string
82
  */
83
  public $menu_sub_title;
@@ -100,18 +88,17 @@ class WIS_WidgetsPage extends WIS_Page {
100
  */
101
  public $page_menu_position = 20;
102
 
103
-
104
  /**
105
  * @param WIS_Plugin $plugin
106
  */
107
  public function __construct( $plugin ) {
108
  $this->id = "widgets";
109
- $this->page_title = __( 'Social Slider Widgets', 'instagram-slider-widget' );
110
- $this->menu_title = __( 'Social Slider Widgets', 'instagram-slider-widget' );
111
  $this->menu_sub_title = __( 'Widgets', 'instagram-slider-widget' );
 
112
  $this->menu_icon = '~/admin/assets/img/wis.png';
113
  $this->capabilitiy = "manage_options";
114
- $this->template_name = "widgets";
115
 
116
  parent::__construct( $plugin );
117
 
@@ -120,6 +107,8 @@ class WIS_WidgetsPage extends WIS_Page {
120
  }
121
 
122
  public function assets( $scripts, $styles ) {
 
 
123
  //Widgets scripts
124
  $this->scripts->request( 'admin-widgets' );
125
 
@@ -137,16 +126,17 @@ class WIS_WidgetsPage extends WIS_Page {
137
  }
138
 
139
  /**
140
- * @inheritDoc
141
  */
142
- public function indexAction() {
143
  $sidebars_widgets = get_option( 'sidebars_widgets', [] );
144
  $insta_widgets = get_option( 'widget_jr_insta_slider', [] );
145
  $youtube_widgets = get_option( 'widget_wyoutube_feed', [] );
146
- $demo_widgets = include( WIS_PLUGIN_DIR . "/includes/demo_widgets.php" );
 
147
  $account = $this->get_current_account();
148
 
149
- if ( isset( $_GET['do'] ) && $_GET['do'] == 'add_demo' ) {
150
  if ( isset( $sidebars_widgets['jr-insta-shortcodes'] ) && ! empty( $account ) ) {
151
  $next_id = $this->get_next_widget_id( $insta_widgets );
152
 
@@ -175,7 +165,7 @@ class WIS_WidgetsPage extends WIS_Page {
175
  if ( ! empty( $sidebars_widgets ) ) {
176
  foreach ( $sidebars_widgets as $key => $sidebar ) {
177
  foreach ( $sidebar as $widget ) {
178
- if ( strstr( $widget, 'jr_insta_slider' ) || strstr( $widget, 'wyoutube_feed' ) ) {
179
  wp_list_widget_controls( $key, $wp_registered_sidebars[ $key ]['name'] );
180
  $isset_widgets = true;
181
  break;
@@ -184,16 +174,17 @@ class WIS_WidgetsPage extends WIS_Page {
184
  }
185
  }
186
  if ( ! $isset_widgets ) {
187
- echo "<h2>" . sprintf( __( "You don't have any Social Slider widgets. Go to the Wordpress <a href='%1s'>Widgets</a> page and add it.", 'instagram-slider-widget' ), admin_url( 'widgets.php' ) ) . "</h2>";
188
  }
189
  $widgets = ob_get_contents();
190
  ob_end_clean();
191
 
192
  $data = [
193
- 'content' => $widgets,
194
- 'insta_widgets' => $insta_widgets,
195
- 'demo_widgets' => $demo_widgets,
196
- 'youtube_widgets' => $youtube_widgets
 
197
  ];
198
  echo $this->render( '', $data );
199
  }
@@ -206,7 +197,7 @@ class WIS_WidgetsPage extends WIS_Page {
206
  public function get_next_widget_id( $widgets ) {
207
  $i = 0;
208
  foreach ( $widgets as $key => $widget ) {
209
- if ( $key !== '_multiwidget' ) {
210
  $i = $key;
211
  }
212
  }
@@ -219,8 +210,8 @@ class WIS_WidgetsPage extends WIS_Page {
219
  * @return array
220
  */
221
  public function get_current_account() {
222
- $accounts = WIS_Plugin::app()->getOption( 'account_profiles' );
223
- $accounts_new = WIS_Plugin::app()->getOption( 'account_profiles_new' );
224
  $result = array();
225
 
226
  if ( is_array( $accounts_new ) && ! empty( $accounts_new ) ) {
1
  <?php
2
 
3
  // Exit if accessed directly
4
+
5
 
6
  if ( ! defined( 'ABSPATH' ) ) {
7
  exit;
15
  class WIS_WidgetsPage extends WIS_Page {
16
 
17
  /**
18
+ * The id of the page in the admin menu.
 
 
19
  *
20
  * @var string
21
  */
22
+ public $id;
23
 
24
  /**
25
+ * Тип страницы
 
 
26
  *
27
+ * @var string
28
+ */
29
+ public $type = 'page';
30
+
31
+ /**
32
+ * Page content template
33
  *
34
  * @var string
35
  */
36
+ public $template_name = 'widgets';
37
 
38
  /**
 
 
 
39
  * @var string
40
  */
41
  public $menu_icon;
43
  /**
44
  * @var string
45
  */
46
+ public $page_menu_dashicon = 'dashicons-welcome-widgets-menus';
47
 
48
  /**
 
 
49
  * @var string
50
  */
51
  public $menu_position = 58;
52
 
53
  /**
 
 
54
  * @var string
55
  */
56
  public $menu_post_type = null;
57
 
58
  /**
 
 
59
  * @var string
60
  */
61
  public $page_title;
62
 
63
  /**
 
 
64
  * @var string
65
  */
66
  public $menu_title;
67
 
68
  /**
 
69
  * @var string
70
  */
71
  public $menu_sub_title;
88
  */
89
  public $page_menu_position = 20;
90
 
 
91
  /**
92
  * @param WIS_Plugin $plugin
93
  */
94
  public function __construct( $plugin ) {
95
  $this->id = "widgets";
96
+ $this->page_title = __( 'Social Slider Feeds', 'instagram-slider-widget' );
97
+ $this->menu_title = __( 'Social Slider Feeds', 'instagram-slider-widget' );
98
  $this->menu_sub_title = __( 'Widgets', 'instagram-slider-widget' );
99
+ $this->menu_tab_title = __( 'Widgets', 'instagram-slider-widget' );
100
  $this->menu_icon = '~/admin/assets/img/wis.png';
101
  $this->capabilitiy = "manage_options";
 
102
 
103
  parent::__construct( $plugin );
104
 
107
  }
108
 
109
  public function assets( $scripts, $styles ) {
110
+ parent::assets( $scripts, $styles );
111
+
112
  //Widgets scripts
113
  $this->scripts->request( 'admin-widgets' );
114
 
126
  }
127
 
128
  /**
129
+ * Show rendered template - $template_name
130
  */
131
+ public function showPageContent() {
132
  $sidebars_widgets = get_option( 'sidebars_widgets', [] );
133
  $insta_widgets = get_option( 'widget_jr_insta_slider', [] );
134
  $youtube_widgets = get_option( 'widget_wyoutube_feed', [] );
135
+ $facebook_widgets = get_option( 'widget_wfacebook_feed', [] );
136
+ $demo_widgets = include WIS_PLUGIN_DIR . "/includes/demo_widgets.php";
137
  $account = $this->get_current_account();
138
 
139
+ if ( isset( $_GET['do'] ) && 'add_demo' === $_GET['do'] ) {
140
  if ( isset( $sidebars_widgets['jr-insta-shortcodes'] ) && ! empty( $account ) ) {
141
  $next_id = $this->get_next_widget_id( $insta_widgets );
142
 
165
  if ( ! empty( $sidebars_widgets ) ) {
166
  foreach ( $sidebars_widgets as $key => $sidebar ) {
167
  foreach ( $sidebar as $widget ) {
168
+ if ( strstr( $widget, 'jr_insta_slider' ) || strstr( $widget, 'wyoutube_feed' ) || strstr( $widget, 'wfacebook_feed' ) ) {
169
  wp_list_widget_controls( $key, $wp_registered_sidebars[ $key ]['name'] );
170
  $isset_widgets = true;
171
  break;
174
  }
175
  }
176
  if ( ! $isset_widgets ) {
177
+ echo "<h2>" . sprintf( __( "You don't have any Social Slider Feeds. Go to the Wordpress <a href='%1s'>Widgets</a> page and add it.", 'instagram-slider-widget' ), admin_url( 'widgets.php' ) ) . "</h2>";
178
  }
179
  $widgets = ob_get_contents();
180
  ob_end_clean();
181
 
182
  $data = [
183
+ 'content' => $widgets,
184
+ 'insta_widgets' => $insta_widgets,
185
+ 'demo_widgets' => $demo_widgets,
186
+ 'youtube_widgets' => $youtube_widgets,
187
+ 'facebook_widgets' => $facebook_widgets
188
  ];
189
  echo $this->render( '', $data );
190
  }
197
  public function get_next_widget_id( $widgets ) {
198
  $i = 0;
199
  foreach ( $widgets as $key => $widget ) {
200
+ if ( '_multiwidget' !== $key ) {
201
  $i = $key;
202
  }
203
  }
210
  * @return array
211
  */
212
  public function get_current_account() {
213
+ $accounts = WIS_Plugin::app()->getOption( WIG_PROFILES_OPTION );
214
+ $accounts_new = WIS_Plugin::app()->getOption( WIG_BUSINESS_PROFILES_OPTION );
215
  $result = array();
216
 
217
  if ( is_array( $accounts_new ) && ! empty( $accounts_new ) ) {
admin/views/facebook.php DELETED
@@ -1,94 +0,0 @@
1
- <?php
2
- $args = array(
3
- "app_id" => WIS_FACEBOOK_CLIENT_ID,
4
- "state" => $current_url
5
- );
6
- $autorize_url = "https://instagram.cm-wp.com/facebook/?" . http_build_query( $args );
7
- $accounts = WIS_Plugin::app()->getPopulateOption( WIS_FACEBOOK_ACCOUNT_PROFILES_OPTION_NAME, array() );
8
- ?>
9
- <div class="factory-bootstrap-445 factory-fontawesome-000">
10
- <div class="row">
11
- <div class="col-md-9">
12
- <div class="row">
13
- <div class="col-md-12">
14
- <div id="wis-add-account-button" class="">
15
- <?php
16
- if ( count( $accounts ) && ! WIS_Plugin::app()->is_premium() ) : ?>
17
- <span class="wis-btn-facebook-account btn-instagram-account-disabled">
18
- <?php _e( 'Add Account', 'instagram-slider-widget' ) ?></span>
19
- <span class="instagram-account-pro"><?php echo sprintf( __( "More accounts in <a href='%s'>PRO version</a>", 'instagram-slider-widget' ), WIS_Plugin::app()->get_support()->get_pricing_url( true, "wis_settings" ) ); ?></span>
20
- <?php else: ?>
21
- <a class="wis-btn-facebook-account" target="_self" href="<?php echo $autorize_url; ?>"
22
- title="Add Account">
23
- <?php _e( 'Add Account', 'instagram-slider-widget' ) ?>
24
- </a>
25
- <span style="float: none; margin-top: 0;" class="spinner" id="wis-spinner"> </span>
26
- <?php endif; ?>
27
- </div>
28
- <div class="wis-help-text"><?php echo sprintf( __( "After adding an account, go to the <a href='%s'>widget settings</a> and change the \"Search Facebook for\" setting to Account", 'instagram-slider-widget' ), admin_url( 'widgets.php' ) ) ?></div>
29
- <?php
30
- if ( count( $accounts ) ) :
31
- ?>
32
- <br>
33
- <table class="widefat wis-table">
34
- <thead>
35
- <tr>
36
- <th><?php echo __( 'Image', 'instagram-slider-widget' ); ?></th>
37
- <th><?php echo __( 'ID', 'instagram-slider-widget' ); ?></th>
38
- <th><?php echo __( 'Name', 'instagram-slider-widget' ); ?></th>
39
- <th><?php echo __( 'Token', 'instagram-slider-widget' ); ?></th>
40
- <th><?php echo __( 'Action', 'instagram-slider-widget' ); ?></th>
41
- </tr>
42
- </thead>
43
- <tbody>
44
- <?php
45
- foreach ( $accounts as $profile_info ) {
46
- $image = $profile_info['picture']['data']['url'];
47
- $fullname = $profile_info['name'];
48
- ?>
49
- <tr>
50
- <td class="profile-picture">
51
- <img src="<?php echo esc_url( $image ); ?>"
52
- width="30"/>
53
- </td>
54
- <td><?php echo esc_attr( $profile_info['id'] ); ?></td>
55
- <td>
56
- <a href="https://www.facebook.com/<?php echo esc_html( $profile_info['username'] ); ?>"><?php echo esc_html( $profile_info['name'] ); ?></a>
57
- </td>
58
- <td>
59
- <input id="<?php echo esc_attr( $profile_info['id'] ); ?>-access-token"
60
- type="text"
61
- value="<?php echo esc_attr( $profile_info['token'] ); ?>"
62
- class="wis-text-token" readonly/>
63
- </td>
64
- <td>
65
- <a href="#"
66
- data-item_id="<?php echo esc_attr( $profile_info['id'] ); ?>"
67
- class="btn btn-danger wis-delete-account">
68
- <span class="dashicons dashicons-trash"></span><?php echo __( 'Delete', 'instagram-slider-widget' ); ?>
69
- </a>
70
- <span class="spinner"
71
- id="wis-delete-spinner-<?php echo esc_attr( $profile_info['id'] ); ?>"></span>
72
- </td>
73
- </tr>
74
- <?php
75
- }
76
- ?>
77
- </tbody>
78
- </table>
79
- <?php wp_nonce_field( $this->plugin->getPrefix() . 'settings_form', $this->plugin->getPrefix() . 'nonce' ); ?>
80
- <?php endif; ?>
81
- </div>
82
- </div>
83
- </div>
84
- <div class="col-md-3">
85
- <div id="wis-dashboard-widget" class="wis-right-widget">
86
- <?php
87
- if ( ! WIS_Plugin::app()->is_premium() ) {
88
- WIS_Plugin::app()->get_adverts_manager()->render_placement( 'right_sidebar' );
89
- }
90
- ?>
91
- </div>
92
- </div>
93
- </div>
94
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/instagram.php DELETED
@@ -1,196 +0,0 @@
1
- <?php
2
-
3
- use Instagram\Includes\WIS_Plugin;
4
-
5
- $args = array(
6
- "client_id" => WIS_INSTAGRAM_CLIENT_ID,
7
- "redirect_uri" => "https://instagram.cm-wp.com/basic-api",
8
- "scope" => "user_profile,user_media",
9
- "response_type" => "code",
10
- "state" => $current_url,
11
- );
12
- $autorize_url_instagram = "https://api.instagram.com/oauth/authorize?" . http_build_query( $args );
13
-
14
- $args = array(
15
- "app_id" => WIS_FACEBOOK_CLIENT_ID,
16
- "state" => $current_url . '&type=business'
17
- );
18
- $autorize_url_business = "https://instagram.cm-wp.com/api/?" . http_build_query( $args );
19
-
20
-
21
- $accounts = WIS_Plugin::app()->getPopulateOption( 'account_profiles', array() );
22
- $accounts_business = WIS_Plugin::app()->getPopulateOption( 'account_profiles_new', array() );
23
- $count_accounts = count( $accounts ) + count( $accounts_business );
24
- ?>
25
- <div class="factory-bootstrap-445 factory-fontawesome-000">
26
- <div class="row">
27
- <div class="col-md-9">
28
- <div class="row">
29
- <div class="col-md-12">
30
- <div id="wis-add-account-button" class="">
31
- <?php
32
- if ( $count_accounts >= 1 && ! WIS_Plugin::app()->is_premium() ) : ?>
33
- <span class="wis-btn-instagram-account-disabled btn-instagram-account-disabled">
34
- <?php _e( 'Add Account', 'instagram-slider-widget' ) ?></span>
35
- <span class="instagram-account-pro"><?php echo sprintf( __( "More accounts in <a href='%s'>PRO version</a>", 'instagram-slider-widget' ), WIS_Plugin::app()->get_support()->get_pricing_url( true, "wis_settings" ) ); ?></span>
36
- <?php else: ?>
37
- <a class="wis-btn-instagram-account" target="_self" href="#" title="Add Account">
38
- <?php _e( 'Add Account', 'instagram-slider-widget' ) ?>
39
- </a>
40
- <span style="float: none; margin-top: 0;" class="spinner" id="wis-spinner"> </span>
41
- <?php endif; ?>
42
- <!--<a class="wis-not-working" target="_blank" href="#">Button not working?</a>-->
43
- </div>
44
- <div id="wis-add-token" style="display: none;">
45
- <form action="<?php echo admin_url( 'admin.php' ); ?>" method="GET">
46
- <input type="hidden" id="page" name="page" value="settings-wisw">
47
- Access token <input type="text" id="wis-manual-token" name="access_token" size="60">
48
- <input type="submit" class="button button-primary button-large" value="Add account">
49
- <a class="" target="_blank" href="https://instagram.cm-wp.com/get-token/">Get access
50
- token</a>
51
- <span class="spinner" id="wis-add-token-spinner"></span>
52
- </form>
53
- </div>
54
- <div class="wis-help-text"><?php echo sprintf( __( "After adding an account, go to the <a href='%s'>widget settings</a> and change the \"Search Instagram for\" setting to Account or Business Account", 'instagram-slider-widget' ), admin_url( 'widgets.php' ) ) ?></div>
55
- <!-- Personal accounts -->
56
- <?php
57
- if ( count( $accounts ) ) :
58
- ?>
59
- <h3>Personal Accounts</h3>
60
- <table class="widefat wis-table wis-personal-status">
61
- <thead>
62
- <tr>
63
- <th><?php echo __( 'ID', 'instagram-slider-widget' ); ?></th>
64
- <th><?php echo __( 'User', 'instagram-slider-widget' ); ?></th>
65
- <th><?php echo __( 'Token', 'instagram-slider-widget' ); ?></th>
66
- <th style="width: 256px"><?php echo __( 'Action', 'instagram-slider-widget' ); ?></th>
67
- </tr>
68
- </thead>
69
- <tbody>
70
- <?php
71
- foreach ( $accounts as $profile_info ) {
72
- ?>
73
- <tr>
74
- <td><?php echo esc_attr( $profile_info['id'] ); ?></td>
75
- <td>
76
- <a href="https://www.instagram.com/<?php echo esc_html( $profile_info['username'] ); ?>">@<?php echo esc_html( $profile_info['username'] ); ?></a>
77
- </td>
78
- <td>
79
- <input id="<?php echo esc_attr( $profile_info['id'] ); ?>-access-token"
80
- type="text"
81
- value="<?php echo esc_attr( $profile_info['token'] ); ?>"
82
- class="wis-text-token" readonly/>
83
- </td>
84
- <td>
85
- <a href="#"
86
- data-item_id="<?php echo ! empty( $profile_info['id'] ) ? $profile_info['id'] : 0; ?>"
87
- data-is_business="0"
88
- class="btn btn-danger wis-delete-account">
89
- <span class="dashicons dashicons-trash"></span><?php echo __( 'Delete', 'instagram-slider-widget' ); ?>
90
- </a>
91
- <span class="spinner"
92
- id="wis-delete-spinner-<?php echo ! empty( $profile_info['id'] ) ? $profile_info['id'] : 0; ?>"></span>
93
- <?php
94
- if ( isset( $_GET['access_token'] ) && $_GET['access_token'] === $profile_info['token'] ) {
95
- ?><span class="wis-div-added">Successfully connected</span><?php
96
- }
97
- ?>
98
- </td>
99
- </tr>
100
- <?php
101
- }
102
- ?>
103
- </tbody>
104
- </table>
105
- <?php wp_nonce_field( $this->plugin->getPrefix() . 'settings_form', $this->plugin->getPrefix() . 'nonce' ); ?>
106
- <?php endif; ?>
107
- <!-- Business accounts -->
108
- <?php
109
- if ( count( $accounts_business ) ) :
110
- ?>
111
- <h3>Business Accounts</h3>
112
- <table class="widefat wis-table wis-business-status">
113
- <thead>
114
- <tr>
115
- <th><?php echo __( 'Image', 'instagram-slider-widget' ); ?></th>
116
- <th><?php echo __( 'ID', 'instagram-slider-widget' ); ?></th>
117
- <th><?php echo __( 'User', 'instagram-slider-widget' ); ?></th>
118
- <th><?php echo __( 'Name', 'instagram-slider-widget' ); ?></th>
119
- <th><?php echo __( 'Token', 'instagram-slider-widget' ); ?></th>
120
- <th><?php echo __( 'Action', 'instagram-slider-widget' ); ?></th>
121
- </tr>
122
- </thead>
123
- <tbody>
124
- <?php
125
- foreach ( $accounts_business as $profile_info ) {
126
- $image = $profile_info['profile_picture_url'];
127
- $fullname = $profile_info['name'];
128
- ?>
129
- <tr>
130
- <td class="profile-picture">
131
- <img src="<?php echo esc_url( $image ); ?>"
132
- width="30"/>
133
- </td>
134
- <td><?php echo esc_attr( $profile_info['id'] ); ?></td>
135
- <td>
136
- <a href="https://www.instagram.com/<?php echo esc_html( $profile_info['username'] ); ?>">@<?php echo esc_html( $profile_info['username'] ); ?></a>
137
- </td>
138
- <td><?php echo esc_html( $fullname ); ?></td>
139
- <td>
140
- <input id="<?php echo esc_attr( $profile_info['id'] ); ?>-access-token"
141
- type="text"
142
- value="<?php echo esc_attr( $profile_info['token'] ); ?>"
143
- class="wis-text-token" readonly/>
144
- </td>
145
- <td>
146
- <a href="#"
147
- data-item_id="<?php echo ! empty( $profile_info['id'] ) ? $profile_info['id'] : 0; ?>"
148
- data-is_business="1"
149
- class="btn btn-danger wis-delete-account">
150
- <span class="dashicons dashicons-trash"></span><?php echo __( 'Delete', 'instagram-slider-widget' ); ?>
151
- </a>
152
- <span class="spinner"
153
- id="wis-delete-spinner-<?php echo esc_attr( $profile_info['id'] ); ?>"></span>
154
- <span class="wis-div-added" style="display: none;">Successfully connected</span>
155
- </td>
156
- </tr>
157
- <?php
158
- }
159
- ?>
160
- </tbody>
161
- </table>
162
- <?php wp_nonce_field( $this->plugin->getPrefix() . 'settings_form', $this->plugin->getPrefix() . 'nonce' ); ?>
163
- <?php endif; ?>
164
- </div>
165
- </div>
166
- </div>
167
- <div class="col-md-3">
168
- <div id="wis-dashboard-widget" class="wis-right-widget">
169
- <?php
170
- if ( ! WIS_Plugin::app()->is_premium() ) {
171
- WIS_Plugin::app()->get_adverts_manager()->render_placement( 'right_sidebar' );
172
- }
173
- ?>
174
- </div>
175
- </div>
176
-
177
- <div id="wis_add_account_modal" class="wis_accounts_modal wis_closed">
178
- <div class="wis_modal_header">
179
- Select type of account
180
- </div>
181
- <div class="wis_modal_content">
182
-
183
- <div class='wis-row-style'>
184
- <a href="<?php echo $autorize_url_instagram; ?>" class='wis-btn-instagram-account'>Personal
185
- account</a>
186
- </div>
187
- <div class='wis-row-style'>
188
- <a href="<?php echo $autorize_url_business; ?>" class='wis-btn-facebook-account'>Business
189
- account</a>
190
- </div>
191
- </div>
192
- </div>
193
- <div id="wis_add_account_modal_overlay" class="wis_modal_overlay wis_closed"></div>
194
-
195
- </div>
196
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/{tab-about.php → page-about.php} RENAMED
@@ -134,10 +134,6 @@
134
  </style>
135
 
136
  <div class="wis-section-wrapper">
137
- <section class="wis-section-thin center-section black-background">
138
- <h1><?php echo __( 'Social Slider Widget', 'instagram-slider-widget' ); ?></h1>
139
- <p class="subheader"><?php echo __( 'Display Instagram feeds in widgets, posts, pages, or anywhere else using shortcodes.', 'instagram-slider-widget' ); ?></p>
140
- </section>
141
  <section class="wis-section wis-section-changelog">
142
  <div class="container">
143
  <div>
@@ -183,7 +179,7 @@
183
  <li>A new way of posting news. Flexible settings for widget display templates give your content a
184
  seamless and attractive view on any website design.
185
  </li>
186
- <li>Keep up your website. Post news on Instagram more often, and Social Slider Widget will take care
187
  of the rest.
188
  </li>
189
  <li>Intuitive settings. It will only take 10 seconds to configure the widget and get the content on
@@ -275,7 +271,7 @@
275
  <li>A new way of posting news. Flexible settings for widget display templates give your content a
276
  seamless and attractive view on any website design.
277
  </li>
278
- <li>Keep up your website. Post news on Instagram more often, and Social Slider Widget will take care
279
  of the rest.
280
  </li>
281
  <li>Intuitive settings. It will only take 10 seconds to configure the widget and get the content on
134
  </style>
135
 
136
  <div class="wis-section-wrapper">
 
 
 
 
137
  <section class="wis-section wis-section-changelog">
138
  <div class="container">
139
  <div>
179
  <li>A new way of posting news. Flexible settings for widget display templates give your content a
180
  seamless and attractive view on any website design.
181
  </li>
182
+ <li>Keep up your website. Post news on Instagram more often, and Social Slider Feed will take care
183
  of the rest.
184
  </li>
185
  <li>Intuitive settings. It will only take 10 seconds to configure the widget and get the content on
271
  <li>A new way of posting news. Flexible settings for widget display templates give your content a
272
  seamless and attractive view on any website design.
273
  </li>
274
+ <li>Keep up your website. Post news on Instagram more often, and Social Slider Feed will take care
275
  of the rest.
276
  </li>
277
  <li>Intuitive settings. It will only take 10 seconds to configure the widget and get the content on
admin/views/{tab-addon_licenses.php → page-addon_licenses.php} RENAMED
@@ -26,7 +26,7 @@ if( is_array($data) ) {
26
 
27
  $slug = $component['name'];
28
 
29
- if( $component['type'] == 'wordpress' ) {
30
  $slug = $component['base_path'];
31
  }
32
 
26
 
27
  $slug = $component['name'];
28
 
29
+ if( 'wordpress' == $component['type'] ) {
30
  $slug = $component['base_path'];
31
  }
32
 
admin/views/page-feeds.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var WIS_FeedsPage $this
4
+ * @var array $data
5
+ * @var array $feeds
6
+ * @var array $socials
7
+ */
8
+
9
+ $socials = $socials ?? [];
10
+ ?>
11
+ <div class="wisw-container">
12
+ <?php foreach ( $socials as $social ): ?>
13
+ <div class="wisw-social">
14
+ <div class="wbcr-factory-page-group-header">
15
+ <strong><?php echo $social['title']; ?></strong>
16
+ <p><?php echo $social['description']; ?></p>
17
+ </div>
18
+ <div class="wisw-social-content">
19
+ <?php echo $social['content']; ?>
20
+ </div>
21
+ </div>
22
+ <?php endforeach; ?>
23
+ </div>
admin/views/{tab-license.php → page-license.php} RENAMED
@@ -1,11 +1,11 @@
1
  <div class="wrap">
2
- <div class="factory-bootstrap-445 factory-fontawesome-000">
3
  <?php wp_nonce_field( 'license' ); ?>
4
  <div id="wis-license-wrapper"
5
  data-loader="<?php echo WIS_PLUGIN_URL . '/admin/assets/img/loader.gif'; ?>"
6
  data-plugin="<?php echo get_class( $this->plugin ) ?>">
7
 
8
- <div class="factory-bootstrap-445 onp-page-wrap <?php echo $this->get_license_type() ?>-license-manager-content"
9
  id="license-manager">
10
  <div>
11
  <h3><?php printf( __( 'Activate %s', 'instagram-slider-widget' ), $this->plan_name ) ?></h3>
@@ -15,7 +15,7 @@
15
 
16
  <div class="onp-container">
17
  <div class="license-details">
18
- <?php if ( $this->get_license_type() == 'free' ): ?>
19
  <a href="<?php echo $this->plugin->get_support()->get_pricing_url( true, 'license_page' ); ?>"
20
  class="purchase-premium" target="_blank" rel="noopener">
21
  <span class="btn btn-gold btn-inner-wrap">
@@ -59,7 +59,7 @@
59
  </p>
60
  <?php endif; ?>
61
 
62
- <?php if ( $this->get_license_type() == 'trial' ): ?>
63
  <p class="activate-error-hint">
64
  <?php printf( __( 'Your license has expired, please extend the license to get updates and support.', 'instagram-slider-widget' ), '' ) ?>
65
  </p>
@@ -90,7 +90,7 @@
90
  </td>
91
  <?php if ( $this->is_premium ): ?>
92
  <td class="license-param license-param-days">
93
- <?php if ( $this->get_license_type() == 'trial' ): ?>
94
  <span class="license-value"><?php _e( 'EXPIRED!', 'instagram-slider-widget' ) ?></span>
95
  <span class="license-value-name"><?php _e( 'please update the key', 'instagram-slider-widget' ) ?></span>
96
  <?php else: ?>
1
  <div class="wrap">
2
+ <div class="factory-bootstrap-454 factory-fontawesome-000">
3
  <?php wp_nonce_field( 'license' ); ?>
4
  <div id="wis-license-wrapper"
5
  data-loader="<?php echo WIS_PLUGIN_URL . '/admin/assets/img/loader.gif'; ?>"
6
  data-plugin="<?php echo get_class( $this->plugin ) ?>">
7
 
8
+ <div class="factory-bootstrap-454 onp-page-wrap <?php echo $this->get_license_type() ?>-license-manager-content"
9
  id="license-manager">
10
  <div>
11
  <h3><?php printf( __( 'Activate %s', 'instagram-slider-widget' ), $this->plan_name ) ?></h3>
15
 
16
  <div class="onp-container">
17
  <div class="license-details">
18
+ <?php if ( 'free' == $this->get_license_type() ): ?>
19
  <a href="<?php echo $this->plugin->get_support()->get_pricing_url( true, 'license_page' ); ?>"
20
  class="purchase-premium" target="_blank" rel="noopener">
21
  <span class="btn btn-gold btn-inner-wrap">
59
  </p>
60
  <?php endif; ?>
61
 
62
+ <?php if ( 'trial' == $this->get_license_type() ): ?>
63
  <p class="activate-error-hint">
64
  <?php printf( __( 'Your license has expired, please extend the license to get updates and support.', 'instagram-slider-widget' ), '' ) ?>
65
  </p>
90
  </td>
91
  <?php if ( $this->is_premium ): ?>
92
  <td class="license-param license-param-days">
93
+ <?php if ( 'trial' == $this->get_license_type() ): ?>
94
  <span class="license-value"><?php _e( 'EXPIRED!', 'instagram-slider-widget' ) ?></span>
95
  <span class="license-value-name"><?php _e( 'please update the key', 'instagram-slider-widget' ) ?></span>
96
  <?php else: ?>
admin/views/{tab-manual.php → page-manual.php} RENAMED
@@ -10,7 +10,7 @@
10
  1. You should follow this <a href="https://console.developers.google.com/apis/dashboard" target="_blank">link</a> and select the project from the top of the page in the drop-down menu
11
  </div>
12
  <div class="wyt-step-img">
13
- <img src="<?= WYT_PLUGIN_URL . ("/admin/assets/img/manual/1.png") ?>" class="wyt-manual-img" alt="">
14
  </div>
15
  </div>
16
  <div class="wyt-step">
@@ -18,7 +18,7 @@
18
  2. Click on the "Create project" button
19
  </div>
20
  <div class="wyt-step-img">
21
- <img src="<?= WYT_PLUGIN_URL . ("/admin/assets/img/manual/2.png") ?>" class="wyt-manual-img" alt="">
22
  </div>
23
  </div>
24
  <div class="wyt-step">
@@ -26,7 +26,7 @@
26
  3. Fill in the "Project name" field and click the "Create" button
27
  </div>
28
  <div class="wyt-step-img">
29
- <img src="<?= WYT_PLUGIN_URL . ("/admin/assets/img/manual/3.png") ?>" class="wyt-manual-img" alt="">
30
 
31
  </div>
32
  </div>
@@ -35,7 +35,7 @@
35
  4. At the top of the page, in the drop-down list, select the newly created project and click the "ENABLE APIS AND SERVICES" button
36
  </div>
37
  <div class="wyt-step-img">
38
- <img src="<?= WYT_PLUGIN_URL . ("/admin/assets/img/manual/4.png") ?>" class="wyt-manual-img" alt="">
39
 
40
  </div>
41
  </div>
@@ -44,7 +44,7 @@
44
  5. Type "Youtube" in the search bar
45
  </div>
46
  <div class="wyt-step-img">
47
- <img src="<?= WYT_PLUGIN_URL . ("/admin/assets/img/manual/5.png") ?>" class="wyt-manual-img" alt="">
48
 
49
  </div>
50
  </div>
@@ -53,7 +53,7 @@
53
  6. In the list of results, select "YouTube Data API v3"
54
  </div>
55
  <div class="wyt-step-img">
56
- <img src="<?= WYT_PLUGIN_URL . ("/admin/assets/img/manual/6.png") ?>" class="wyt-manual-img" alt="">
57
 
58
  </div>
59
  </div>
@@ -62,7 +62,7 @@
62
  7. Click the "ENABLE" button
63
  </div>
64
  <div class="wyt-step-img">
65
- <img src="<?= WYT_PLUGIN_URL . ("/admin/assets/img/manual/7.png") ?>" class="wyt-manual-img" alt="">
66
 
67
  </div>
68
  </div>
@@ -71,7 +71,7 @@
71
  8. Click the "CREATE CREDENTIALS" button
72
  </div>
73
  <div class="wyt-step-img">
74
- <img src="<?= WYT_PLUGIN_URL . ("/admin/assets/img/manual/8.png") ?>" class="wyt-manual-img" alt="">
75
 
76
  </div>
77
  </div>
@@ -80,7 +80,7 @@
80
  9. Fill in all the fields as shown in the picture and click the "What credentials do I need?"
81
  </div>
82
  <div class="wyt-step-img">
83
- <img src="<?= WYT_PLUGIN_URL . ("/admin/assets/img/manual/9.png") ?>" class="wyt-manual-img" alt="">
84
 
85
  </div>
86
  </div>
@@ -89,7 +89,7 @@
89
  10. Copy your API key and click the "Done" button
90
  </div>
91
  <div class="wyt-step-img">
92
- <img src="<?= WYT_PLUGIN_URL . ("/admin/assets/img/manual/10.png") ?>" class="wyt-manual-img" alt="">
93
 
94
  </div>
95
  </div>
@@ -98,7 +98,7 @@
98
  11. Paste your API key to the field and click "SAVE" button
99
  </div>
100
  <div class="wyt-step-img">
101
- <img src="<?= WYT_PLUGIN_URL . ("/admin/assets/img/manual/11.png") ?>" class="wyt-manual-img" alt="">
102
  </div>
103
  </div>
104
  </div>
10
  1. You should follow this <a href="https://console.developers.google.com/apis/dashboard" target="_blank">link</a> and select the project from the top of the page in the drop-down menu
11
  </div>
12
  <div class="wyt-step-img">
13
+ <img src="<?= WYT_COMPONENT_URL . ("/admin/assets/img/manual/1.png") ?>" class="wyt-manual-img" alt="">
14
  </div>
15
  </div>
16
  <div class="wyt-step">
18
  2. Click on the "Create project" button
19
  </div>
20
  <div class="wyt-step-img">
21
+ <img src="<?= WYT_COMPONENT_URL . ("/admin/assets/img/manual/2.png") ?>" class="wyt-manual-img" alt="">
22
  </div>
23
  </div>
24
  <div class="wyt-step">
26
  3. Fill in the "Project name" field and click the "Create" button
27
  </div>
28
  <div class="wyt-step-img">
29
+ <img src="<?= WYT_COMPONENT_URL . ("/admin/assets/img/manual/3.png") ?>" class="wyt-manual-img" alt="">
30
 
31
  </div>
32
  </div>
35
  4. At the top of the page, in the drop-down list, select the newly created project and click the "ENABLE APIS AND SERVICES" button
36
  </div>
37
  <div class="wyt-step-img">
38
+ <img src="<?= WYT_COMPONENT_URL . ("/admin/assets/img/manual/4.png") ?>" class="wyt-manual-img" alt="">
39
 
40
  </div>
41
  </div>
44
  5. Type "Youtube" in the search bar
45
  </div>
46
  <div class="wyt-step-img">
47
+ <img src="<?= WYT_COMPONENT_URL . ("/admin/assets/img/manual/5.png") ?>" class="wyt-manual-img" alt="">
48
 
49
  </div>
50
  </div>
53
  6. In the list of results, select "YouTube Data API v3"
54
  </div>
55
  <div class="wyt-step-img">
56
+ <img src="<?= WYT_COMPONENT_URL . ("/admin/assets/img/manual/6.png") ?>" class="wyt-manual-img" alt="">
57
 
58
  </div>
59
  </div>
62
  7. Click the "ENABLE" button
63
  </div>
64
  <div class="wyt-step-img">
65
+ <img src="<?= WYT_COMPONENT_URL . ("/admin/assets/img/manual/7.png") ?>" class="wyt-manual-img" alt="">
66
 
67
  </div>
68
  </div>
71
  8. Click the "CREATE CREDENTIALS" button
72
  </div>
73
  <div class="wyt-step-img">
74
+ <img src="<?= WYT_COMPONENT_URL . ("/admin/assets/img/manual/8.png") ?>" class="wyt-manual-img" alt="">
75
 
76
  </div>
77
  </div>
80
  9. Fill in all the fields as shown in the picture and click the "What credentials do I need?"
81
  </div>
82
  <div class="wyt-step-img">
83
+ <img src="<?= WYT_COMPONENT_URL . ("/admin/assets/img/manual/9.png") ?>" class="wyt-manual-img" alt="">
84
 
85
  </div>
86
  </div>
89
  10. Copy your API key and click the "Done" button
90
  </div>
91
  <div class="wyt-step-img">
92
+ <img src="<?= WYT_COMPONENT_URL . ("/admin/assets/img/manual/10.png") ?>" class="wyt-manual-img" alt="">
93
 
94
  </div>
95
  </div>
98
  11. Paste your API key to the field and click "SAVE" button
99
  </div>
100
  <div class="wyt-step-img">
101
+ <img src="<?= WYT_COMPONENT_URL . ("/admin/assets/img/manual/11.png") ?>" class="wyt-manual-img" alt="">
102
  </div>
103
  </div>
104
  </div>
admin/views/page-profiles.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var array $data
4
+ * @var array $socials
5
+ */
6
+
7
+ $socials = $socials ?? [];
8
+ ?>
9
+ <div class="wisw-container">
10
+ <?php foreach ( $socials as $social ): ?>
11
+ <div class="wisw-social">
12
+ <div class="wbcr-factory-page-group-header">
13
+ <strong><?php echo $social['title']; ?></strong>
14
+ <p><?php echo $social['description']; ?></p>
15
+ </div>
16
+ <div class="wisw-social-content">
17
+ <?php echo $social['content']; ?>
18
+ </div>
19
+ </div>
20
+ <?php endforeach; ?>
21
+ </div>
admin/views/{tab-showcase-license.php → page-showcase-license.php} RENAMED
@@ -1,11 +1,11 @@
1
  <div class="wrap">
2
- <div class="factory-bootstrap-445 factory-fontawesome-000">
3
  <?php wp_nonce_field( 'shopifeed_check_license' ); ?>
4
  <div id="wis-license-wrapper"
5
  data-loader="<?php echo WIS_PLUGIN_URL . '/admin/assets/img/loader.gif'; ?>"
6
  data-plugin="<?php echo get_class( $this->plugin ) ?>">
7
 
8
- <div class="factory-bootstrap-445 onp-page-wrap <?php echo $this->get_license_type() ?>-license-manager-content"
9
  id="license-manager">
10
  <div>
11
  <h3><?php printf( __( 'Activate %s', 'instagram-slider-widget' ), $this->plan_name ) ?></h3>
@@ -15,7 +15,7 @@
15
 
16
  <div class="onp-container">
17
  <div class="license-details">
18
- <?php if ( $this->get_license_type() == 'free' ): ?>
19
  <a href="<?php echo $this->plugin->get_support()->get_pricing_url( true, 'license_page' ); ?>"
20
  class="purchase-premium" target="_blank" rel="noopener">
21
  <span class="btn btn-gold btn-inner-wrap">
@@ -59,7 +59,7 @@
59
  </p>
60
  <?php endif; ?>
61
 
62
- <?php if ( $this->get_license_type() == 'trial' ): ?>
63
  <p class="activate-error-hint">
64
  <?php printf( __( 'Your license has expired, please extend the license to get updates and support.', 'instagram-slider-widget' ), '' ) ?>
65
  </p>
@@ -90,7 +90,7 @@
90
  </td>
91
  <?php if ( $this->is_premium ): ?>
92
  <td class="license-param license-param-days">
93
- <?php if ( $this->get_license_type() == 'trial' ): ?>
94
  <span class="license-value"><?php _e( 'EXPIRED!', 'instagram-slider-widget' ) ?></span>
95
  <span class="license-value-name"><?php _e( 'please update the key', 'instagram-slider-widget' ) ?></span>
96
  <?php else: ?>
1
  <div class="wrap">
2
+ <div class="factory-bootstrap-454 factory-fontawesome-000">
3
  <?php wp_nonce_field( 'shopifeed_check_license' ); ?>
4
  <div id="wis-license-wrapper"
5
  data-loader="<?php echo WIS_PLUGIN_URL . '/admin/assets/img/loader.gif'; ?>"
6
  data-plugin="<?php echo get_class( $this->plugin ) ?>">
7
 
8
+ <div class="factory-bootstrap-454 onp-page-wrap <?php echo $this->get_license_type() ?>-license-manager-content"
9
  id="license-manager">
10
  <div>
11
  <h3><?php printf( __( 'Activate %s', 'instagram-slider-widget' ), $this->plan_name ) ?></h3>
15
 
16
  <div class="onp-container">
17
  <div class="license-details">
18
+ <?php if ( 'free' == $this->get_license_type() ): ?>
19
  <a href="<?php echo $this->plugin->get_support()->get_pricing_url( true, 'license_page' ); ?>"
20
  class="purchase-premium" target="_blank" rel="noopener">
21
  <span class="btn btn-gold btn-inner-wrap">
59
  </p>
60
  <?php endif; ?>
61
 
62
+ <?php if ( 'trial' == $this->get_license_type() ): ?>
63
  <p class="activate-error-hint">
64
  <?php printf( __( 'Your license has expired, please extend the license to get updates and support.', 'instagram-slider-widget' ), '' ) ?>
65
  </p>
90
  </td>
91
  <?php if ( $this->is_premium ): ?>
92
  <td class="license-param license-param-days">
93
+ <?php if ( 'trial' == $this->get_license_type() ): ?>
94
  <span class="license-value"><?php _e( 'EXPIRED!', 'instagram-slider-widget' ) ?></span>
95
  <span class="license-value-name"><?php _e( 'please update the key', 'instagram-slider-widget' ) ?></span>
96
  <?php else: ?>
admin/views/page-widgets.php ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var string $content
4
+ * @var array $insta_widgets
5
+ * @var array $demo_widgets
6
+ */
7
+
8
+
9
+
10
+ ?>
11
+ <div class="wisw-container">
12
+ <div class="wisw-social-content">
13
+ <div class="wis-widgets-container">
14
+ <h2><?= __( 'Recommended widget templates', 'instagram-slider-widget' ); ?></h2>
15
+ <div class="wis-demo-widgets">
16
+ <?php if ( is_array( $insta_widgets ) && ! empty( $insta_widgets ) ): ?>
17
+ <div class="wis-row">
18
+ <?php foreach ( $insta_widgets as $key => $insta_widget ) {
19
+ $shortcode = "[jr_instagram id='{$key}']";
20
+ $wis_demo_pro = "";
21
+ if ( ! WIS_Plugin::app()->is_premium() && isset( $insta_widget['premium'] ) && $insta_widget['premium'] ) {
22
+ $shortcode = '';
23
+ $wis_demo_pro = "wis_demo_pro";
24
+ }
25
+ if ( isset( $insta_widget['demo'] ) && ! empty( $insta_widget['demo'] ) ) {
26
+ $demo_id = $insta_widget['demo'];
27
+ ?>
28
+ <div class="wis-col-16">
29
+ <div><p style="text-align: center;"><img
30
+ src="<?php echo WIS_PLUGIN_URL . "/admin/assets/img/demo/{$demo_id}.svg"; ?>"
31
+ alt=""></p>
32
+ </div>
33
+ <div class="wis-demo-shortcode">
34
+ <p><?= __( 'Shortcode for this widget', 'instagram-slider-widget' ); ?><span
35
+ class="<?= $wis_demo_pro; ?>"></span></p>
36
+ <input id="wis_insta_shortcode"
37
+ onclick="this.setSelectionRange(0, this.value.length)"
38
+ type="text" class="wis-demo-widefat" value="<?= $shortcode; ?>"
39
+ readonly="readonly">
40
+ <p><?= $insta_widget['title']; ?></p>
41
+ </div>
42
+ </div>
43
+ <?php
44
+ }
45
+ } ?>
46
+ </div>
47
+ <?php endif; ?>
48
+ <?php
49
+ $account = $this->get_current_account();
50
+ if ( ! isset( $demo_id ) && ! empty( $account ) ) { ?>
51
+ <a class="button button-primary" href="<?php echo add_query_arg( [ 'do' => 'add_demo' ] ); ?>">Add
52
+ demo
53
+ widgets</a>
54
+ <?php } else if ( ! isset( $demo_id ) && empty( $account ) ) { ?>
55
+ <a class="button button-primary" disabled="disabled" href="#">Add demo
56
+ widgets</a>
57
+ <div style="display: inline-block; line-height: 30px;"><?= __( 'Add instagram account in plugin settings', 'instagram-slider-widget' ); ?></div>
58
+ <?php } ?>
59
+ </div>
60
+
61
+ <div class="wis-demo-widgets">
62
+ <?php echo $content; ?>
63
+ </div>
64
+
65
+ <style>
66
+ .widget-inside
67
+ {
68
+ border-top: none;
69
+ padding: 1px 15px 15px 15px;
70
+ line-height: 1.2;
71
+ }
72
+ </style>
73
+ <script>
74
+ jQuery(document).ready(function ($) {
75
+ $('.widget:not([id*="jr_insta_slider"]) .widget:not([id*="wyotube_feed"]) .widget:not([id*="wfacebook_feed"])').remove();
76
+ //$('[id*="jr_insta_slider"]').before($('#jr_insta_shortcode').val())
77
+ $('.sidebar-name').find('button.handlediv').remove();
78
+ });
79
+ </script>
80
+
81
+ <?php
82
+ echo "<pre>";
83
+ //print_r( $demo );
84
+ //print_r( $insta_widgets );
85
+ echo "</pre>";
86
+ ?>
87
+ </div>
88
+ </div>
89
+ </div>
admin/views/tab-components.php DELETED
@@ -1,66 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * @var array $components
5
- */
6
-
7
- use Instagram\Includes\WIS_Plugin;
8
-
9
- ?>
10
- <div class="wbcr-factory-page-group-header"><?php
11
-
12
- _e('<strong>Plugin Components</strong>.', 'titan-security') ?>
13
- <p>
14
- <?php _e('These are components of the plugin bundle. When you activate the plugin, all the components turned on by default. If you don’t need some function, you can easily turn it off on this page.', 'titan-security') ?>
15
- </p>
16
- </div>
17
- <div class="wbcr-clearfy-components">
18
- <?php foreach((array)$components as $component): ?>
19
- <?php
20
-
21
- $component_const = $component['component_const'];
22
-
23
- $is_active_component = defined($component_const);
24
-
25
- $slug = $component['name'];
26
-
27
- if( $component['type'] == 'wordpress' ) {
28
- $slug = $component['base_path'];
29
- }
30
-
31
- ?>
32
-
33
- <div class="plugin-card">
34
- <div class="plugin-card-top">
35
- <div class="name column-name">
36
- <h3>
37
- <a href="<?php echo esc_url($component['url']) ?>" class="open-plugin-details-modal">
38
- <?php echo esc_html($component['title']) ?>
39
- <img src="<?php echo esc_attr($component['icon']) ?>" class="plugin-icon"
40
- alt="<?php echo esc_attr($component['title']) ?>">
41
- </a>
42
- </h3>
43
- </div>
44
- <div class="desc column-description">
45
- <p><?php echo esc_html($component['description']); ?></p>
46
- </div>
47
- </div>
48
- <div class="plugin-card-bottom">
49
- <?php if($is_active_component) : ?>
50
- <a href="<?php echo esc_url($component['settings_url']) ?>"
51
- class="button button-primary settings-button"><?php _e('Settings', 'instagram-slider-widget'); ?></a>
52
- <?php else: ?>
53
- <?php if( 'premium' === $component['build'] && !(WIS_Plugin::app()->premium->is_activate() && WIS_Plugin::app()->premium->is_install_package()) ): ?>
54
- <a target="_blank" href="<?php echo esc_url($component['url']) ?>"
55
- class="button button-default read-more"><?php _e('Read more', 'instagram-slider-widget'); ?></a>
56
- <?php else: ?>
57
- <?php WIS_Plugin::app()->get_install_component_button('wordpress', $component['slug'])->render_button(); ?>
58
- <?php endif; ?>
59
- <?php endif; ?>
60
- </div>
61
- </div>
62
- <?php endforeach; ?>
63
- <div class="clearfix"></div>
64
- </div>
65
-
66
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/tab-licenses.php DELETED
@@ -1,40 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * @var array $licenses
5
- */
6
-
7
-
8
- ?>
9
- <div class="wbcr-factory-page-group-header"><?php
10
-
11
- _e('<strong>Licenses</strong>.', 'titan-security') ?>
12
- <p>
13
- <?php _e('These are licenses for a plugin and components page.', 'titan-security') ?>
14
- </p>
15
- </div>
16
- <div class="wbcr-clearfy-components">
17
- <?php foreach((array)$licenses as $license): ?>
18
- <div class="plugin-card">
19
- <div class="plugin-card-top">
20
- <div class="name column-name">
21
- <h3>
22
- <?= $license['title'] ?>
23
- <img src="<?php echo esc_attr($license['icon']) ?>" class="plugin-icon"
24
- alt="<?php echo esc_attr($license['title']) ?>">
25
- </h3>
26
- </div>
27
- <div class="desc column-description">
28
- <p><?php echo esc_html($license['description']); ?></p>
29
- </div>
30
- </div>
31
- <div class="plugin-card-bottom">
32
- <a href="<?php echo admin_url('admin.php?page=' . $license['license_url']) ?>"
33
- class="button button-primary settings-button"><?php _e('License', 'instagram-slider-widget'); ?></a>
34
- </div>
35
- </div>
36
- <?php endforeach; ?>
37
- <div class="clearfix"></div>
38
- </div>
39
-
40
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/tab-settings.php DELETED
@@ -1,57 +0,0 @@
1
- <?php
2
-
3
- use Instagram\Includes\WIS_Plugin;
4
-
5
- $current_url = admin_url( 'admin.php?page=settings-' . WIS_Plugin::app()->getPluginName() );
6
- $current_tab = 'instagram';
7
- $TABS = array(
8
- 'instagram' => array(
9
- 'current' => false,
10
- 'caption' => 'Instagram',
11
- 'icon' => 'instagram',
12
- 'url' => $current_url . "&tab=instagram",
13
- ),
14
- 'youtube' => array(
15
- 'current' => false,
16
- 'caption' => 'Youtube',
17
- 'icon' => 'youtube',
18
- 'url' => $current_url . "&tab=youtube",
19
- ),
20
- );
21
- if ( isset( $_GET['tab'] ) && ! empty( $_GET['tab'] ) ) {
22
- $current_tab = htmlspecialchars( $_GET['tab'] );
23
- $current_url .= "&tab={$current_tab}";
24
- $TABS[ $current_tab ]['current'] = true;
25
- } else {
26
- $current_tab = 'instagram';
27
- $current_url .= "&tab={$current_tab}";
28
- $TABS[ $current_tab ]['current'] = true;
29
- }
30
- ?>
31
- <div class="wis-container">
32
- <div class="wis-page-title">
33
- <h1><?php _e( 'Settings', 'insert-php' ) ?><?php echo WIS_Plugin::app()->getPluginTitle() . " " . WIS_Plugin::app()->getPluginVersion(); ?></h1>
34
- </div>
35
- <div id="tabs" class="tabs">
36
- <nav>
37
- <ul>
38
- <?php
39
- foreach ( $TABS as $key => $tab ) {
40
- if ( $tab['current'] ) {
41
- echo "<li class='tab-current'>";
42
- } else {
43
- echo "<li>";
44
- }
45
- echo "<a href='{$tab['url']}' class='icon-{$tab['icon']}'><span>{$tab['caption']}</span></a>";
46
- echo "</li>";
47
- }
48
- ?>
49
- </ul>
50
- </nav>
51
- <div class="content">
52
- <section id="<?php echo $current_tab; ?>">
53
- <?php include_once WIS_PLUGIN_DIR . "/admin/views/{$current_tab}.php"; ?>
54
- </section>
55
- </div><!-- /content -->
56
- </div><!-- /tabs -->
57
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/tab-widgets.php DELETED
@@ -1,82 +0,0 @@
1
- <?php
2
- /**
3
- * @var string $content
4
- * @var array $insta_widgets
5
- * @var array $demo_widgets
6
- */
7
-
8
- use Instagram\Includes\WIS_Plugin;
9
-
10
- ?>
11
- <div class="wis-widgets-container">
12
- <h2><?= __( 'Recommended widget templates', 'instagram-slider-widget' ); ?></h2>
13
- <div class="wis-demo-widgets">
14
- <?php if ( is_array( $insta_widgets ) && ! empty( $insta_widgets ) ): ?>
15
- <div class="wis-row">
16
- <?php foreach ( $insta_widgets as $key => $insta_widget ) {
17
- $shortcode = "[jr_instagram id='{$key}']";
18
- $wis_demo_pro = "";
19
- if ( ! WIS_Plugin::app()->is_premium() && isset( $insta_widget['premium'] ) && $insta_widget['premium'] ) {
20
- $shortcode = '';
21
- $wis_demo_pro = "wis_demo_pro";
22
- }
23
- if ( isset( $insta_widget['demo'] ) && ! empty( $insta_widget['demo'] ) ) {
24
- $demo_id = $insta_widget['demo'];
25
- ?>
26
- <div class="wis-col-16">
27
- <div><p style="text-align: center;"><img
28
- src="<?php echo WIS_PLUGIN_URL . "/admin/assets/img/demo/{$demo_id}.svg"; ?>"
29
- alt=""></p>
30
- </div>
31
- <div class="wis-demo-shortcode">
32
- <p><?= __( 'Shortcode for this widget', 'instagram-slider-widget' ); ?><span
33
- class="<?= $wis_demo_pro; ?>"></span></p>
34
- <input id="wis_insta_shortcode" onclick="this.setSelectionRange(0, this.value.length)"
35
- type="text" class="wis-demo-widefat" value="<?= $shortcode; ?>"
36
- readonly="readonly">
37
- <p><?= $insta_widget['title']; ?></p>
38
- </div>
39
- </div>
40
- <?php
41
- }
42
- } ?>
43
- </div>
44
- <?php endif; ?>
45
- <?php
46
- $account = $this->get_current_account();
47
- if ( ! isset( $demo_id ) && ! empty( $account ) ) { ?>
48
- <a class="button button-primary" href="<?php echo add_query_arg( [ 'do' => 'add_demo' ] ); ?>">Add demo
49
- widgets</a>
50
- <?php } else if ( ! isset( $demo_id ) && empty( $account ) ) { ?>
51
- <a class="button button-primary" disabled="disabled" href="#">Add demo
52
- widgets</a> <div style="display: inline-block; line-height: 30px;"><?=__( 'Add instagram account in plugin settings', 'instagram-slider-widget' );?></div>
53
- <?php } ?>
54
- </div>
55
-
56
- <div class="wis-demo-widgets">
57
- <?php echo $content; ?>
58
- </div>
59
-
60
- <style>
61
- .widget-inside
62
- {
63
- border-top: none;
64
- padding: 1px 15px 15px 15px;
65
- line-height: 1.2;
66
- }
67
- </style>
68
- <script>
69
- jQuery(document).ready(function ($) {
70
- $('.widget:not([id*="jr_insta_slider"]) .widget:not([id*="wyotube_feed"])').remove();
71
- //$('[id*="jr_insta_slider"]').before($('#jr_insta_shortcode').val())
72
- $('.sidebar-name').find('button.handlediv').remove();
73
- });
74
- </script>
75
-
76
- <?php
77
- echo "<pre>";
78
- //print_r( $demo );
79
- //print_r( $insta_widgets );
80
- echo "</pre>";
81
- ?>
82
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/youtube.php DELETED
@@ -1,102 +0,0 @@
1
- <?php
2
-
3
- use Instagram\Includes\WIS_Plugin;
4
-
5
- /**
6
- * @var $accounts \YoutubeFeed\Api\Channel\YoutubeChannelItem[]
7
- */
8
- $accounts = WIS_Plugin::app()->getPopulateOption( WYT_ACCOUNT_OPTION_NAME, array() );
9
- $count_accounts = !empty($accounts) ? count($accounts) : 0 ;
10
- ?>
11
- <div class="factory-bootstrap-445 factory-fontawesome-000">
12
- <div class="row">
13
- <div class="col-md-9">
14
- <div class="row">
15
- <form action="<?= $_SERVER['REQUEST_URI']; ?>" method="post">
16
- <div class="col-md-12">
17
- <div class="wyt-add-form">
18
- <input type="text" name="wyt_api_key" id="wyt_api_key" class="" style="width: 550px;"
19
- value="<?= WIS_Plugin::app()->getOption( WYT_API_KEY_OPTION_NAME, '') ?>" placeholder="<?php _e( 'Youtube api key.', 'yft' ) ?>">
20
- </div>
21
- <div class="" style="display: inline-block;">
22
- <a href="<?= admin_url();?>?page=manual-wisw" target="_blank">How to get Youtube API key</a>
23
- </div>
24
- </div>
25
- <div class="col-md-12">
26
- <div class="wyt-add-form">
27
- <input type="text" name="wyt_feed_link" id="wyt_feed_link" class="" style="width: 550px; margin-top: 5px;"
28
- placeholder="<?php _e( 'Channel link. Example: https://www.youtube.com/channel/UC0WP5P-ufpRfjbNrmOWwLBQ', 'yft' ) ?>">
29
- </div>
30
- <div class="" style="display: inline-block">
31
- <a href="https://support.google.com/youtube/answer/6180214" target="_blank">How to get channel link</a>
32
- </div>
33
- <br>
34
-
35
- <?php
36
- if ( $count_accounts >= 1 && ! WIS_Plugin::app()->is_premium() ) : ?>
37
- <div class="wyt-add-form" style="margin-top: 15px !important;">
38
- <span class="wyt-btn-Youtube-account wyt-btn-Youtube-account-disabled" >
39
- <?php _e( 'Save', 'instagram-slider-widget' ) ?></span>
40
- <span class="instagram-account-pro"><?php echo sprintf( __( "More accounts in <a href='%s'>PRO version</a>", 'instagram-slider-widget' ), WIS_Plugin::app()->get_support()->get_pricing_url( true, "wis_settings" ) ); ?></span>
41
- <?php else: ?>
42
- <div class="wyt-add-form">
43
- <input type="submit" class="wyt-btn-Youtube-account"
44
- value="<?php _e( 'Save', 'yft' ) ?>">
45
- <?php endif; ?>
46
-
47
- </div>
48
- </div>
49
- </form>
50
-
51
- <div class="col-md-12">
52
- <?php
53
- if ( !empty($accounts) ) :
54
- ?>
55
- <h3><?php _e( 'Connected channels', 'yft' ) ?></h3>
56
- <div class="yt-channels">
57
- <?php
58
- /**
59
- * @var $account \YoutubeFeed\Api\Channel\YoutubeChannelItem
60
- */
61
- foreach ( $accounts as $channelId => $account ) {
62
- ?>
63
- <a style="text-decoration: none; color: black;position: relative" target="_blank" href="https://youtube.com/channel/<?= $channelId ?>">
64
- <div class="yt-channel-container col-md-2">
65
- <div class="wyt-close-icon" data-id="<?=$channelId?>">
66
- <svg xmlns="http://www.w3.org/2000/svg" fill="grey" height="25" viewBox="0 0 25 25" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M14.59 8L12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></svg>
67
- </div>
68
- <div class="yt-channel-inner">
69
- <div class="yt-channel-img-container">
70
- <img class="yt-channel-img" src="<?= $account->snippet->thumbnails->high->url ?>"
71
- width="100%" alt=""/>
72
- </div>
73
- <div class="yt-channel-title ellipsis">
74
- <?= $account->snippet->title ?>
75
- </div>
76
- <hr>
77
- <div class="yt-channel-desc ellipsis-5-lines">
78
- <?= $account->snippet->description ?>
79
- </div>
80
- </div>
81
- </div>
82
- </a>
83
- <?php
84
- }
85
- ?>
86
- </div>
87
- <?php wp_nonce_field( $this->plugin->getPrefix() . 'settings_form', $this->plugin->getPrefix() . 'nonce' ); ?>
88
- <?php endif; ?>
89
- </div>
90
- </div>
91
- </div>
92
- <div class="col-md-3">
93
- <div id="wyt-dashboard-widget" class="wyt-right-widget">
94
- <?php
95
- if ( ! WIS_Plugin::app()->is_premium() ) {
96
- WIS_Plugin::app()->get_adverts_manager()->render_placement( 'right_sidebar' );
97
- }
98
- ?>
99
- </div>
100
- </div>
101
- </div>
102
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/img/icon.png DELETED
Binary file
components/facebook/assets/admin/js/wfacebook-admin.js ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function ($) {
2
+
3
+ $(document).ready(function ($) {
4
+ /*
5
+ * FACEBOOK API modal
6
+ */
7
+
8
+ var modal = jQuery('#wis_accounts_modal');
9
+ var modalOverlay = jQuery('#wis_modal_overlay');
10
+ var spinOverlay = jQuery('.wis-overlay-spinner');
11
+
12
+ modalOverlay.on("click", function () {
13
+ var conf = confirm("You haven't finished adding an account. Are you sure you want to close the window?");
14
+ if (conf) {
15
+ modal.toggleClass("wis_closed");
16
+ modalOverlay.toggleClass("wis_closed");
17
+ spinOverlay.toggleClass("is-active");
18
+ }
19
+ });
20
+
21
+ jQuery('.wis_modal_content #wis-facebook-row').on('click', function (e) {
22
+ modal.toggleClass("wis_closed");
23
+ spinOverlay.addClass('is-active');
24
+ wfb_account = $(this).attr('data-account');
25
+ console.log(wfb.nonce);
26
+ jQuery.post(ajaxurl, {
27
+ action: 'wfb_add_account_by_token',
28
+ account: wfb_account,
29
+ _ajax_nonce: wfb.nonce
30
+ }).done(function (html) {
31
+ window.location.reload();
32
+ });
33
+ });
34
+
35
+ }); // Document Ready
36
+ })(jQuery);
components/facebook/assets/css/remodal-default-theme.css ADDED
@@ -0,0 +1,322 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Remodal - v1.1.1
3
+ * Responsive, lightweight, fast, synchronized with CSS animations, fully customizable modal window plugin with declarative configuration and hash tracking.
4
+ * http://vodkabears.github.io/remodal/
5
+ *
6
+ * Made by Ilya Makarov
7
+ * Under MIT License
8
+ */
9
+
10
+ /* ==========================================================================
11
+ Remodal's default mobile first theme
12
+ ========================================================================== */
13
+
14
+ /* Default theme styles for the background */
15
+
16
+ .remodal-bg.remodal-is-opening,
17
+ .remodal-bg.remodal-is-opened {
18
+ -webkit-filter: blur(3px);
19
+ filter: blur(3px);
20
+ }
21
+
22
+ /* Default theme styles of the overlay */
23
+
24
+ .remodal-overlay {
25
+ background: rgba(43, 46, 56, 0.9);
26
+ }
27
+
28
+ .remodal-overlay.remodal-is-opening,
29
+ .remodal-overlay.remodal-is-closing {
30
+ -webkit-animation-duration: 0.3s;
31
+ animation-duration: 0.3s;
32
+ -webkit-animation-fill-mode: forwards;
33
+ animation-fill-mode: forwards;
34
+ }
35
+
36
+ .remodal-overlay.remodal-is-opening {
37
+ -webkit-animation-name: remodal-overlay-opening-keyframes;
38
+ animation-name: remodal-overlay-opening-keyframes;
39
+ }
40
+
41
+ .remodal-overlay.remodal-is-closing {
42
+ -webkit-animation-name: remodal-overlay-closing-keyframes;
43
+ animation-name: remodal-overlay-closing-keyframes;
44
+ }
45
+
46
+ /* Default theme styles of the wrapper */
47
+
48
+ .remodal-wrapper {
49
+ padding: 10px 10px 0;
50
+ }
51
+
52
+ /* Default theme styles of the modal dialog */
53
+
54
+ .remodal {
55
+ box-sizing: border-box;
56
+ width: 100%;
57
+ margin-bottom: 20px;
58
+
59
+ -webkit-transform: translate3d(0, 0, 0);
60
+ transform: translate3d(0, 0, 0);
61
+
62
+ color: #2b2e38;
63
+ background: #fff;
64
+ }
65
+
66
+ .remodal.remodal-is-opening,
67
+ .remodal.remodal-is-closing {
68
+ -webkit-animation-duration: 0.3s;
69
+ animation-duration: 0.3s;
70
+ -webkit-animation-fill-mode: forwards;
71
+ animation-fill-mode: forwards;
72
+ }
73
+
74
+ .remodal.remodal-is-opening {
75
+ -webkit-animation-name: remodal-opening-keyframes;
76
+ animation-name: remodal-opening-keyframes;
77
+ }
78
+
79
+ .remodal.remodal-is-closing {
80
+ -webkit-animation-name: remodal-closing-keyframes;
81
+ animation-name: remodal-closing-keyframes;
82
+ }
83
+
84
+ /* Vertical align of the modal dialog */
85
+
86
+ .remodal,
87
+ .remodal-wrapper:after {
88
+ vertical-align: middle;
89
+ }
90
+
91
+ /* Close button */
92
+
93
+ .remodal-close {
94
+ position: absolute;
95
+ top: 0;
96
+ left: 0;
97
+
98
+ display: block;
99
+ overflow: visible;
100
+
101
+ width: 35px;
102
+ height: 35px;
103
+ margin: 0;
104
+ padding: 0;
105
+
106
+ cursor: pointer;
107
+ -webkit-transition: color 0.2s;
108
+ transition: color 0.2s;
109
+ text-decoration: none;
110
+
111
+ color: #95979c;
112
+ border: 0;
113
+ outline: 0;
114
+ background: transparent;
115
+ }
116
+
117
+ .remodal-close:hover,
118
+ .remodal-close:focus {
119
+ color: #2b2e38;
120
+ }
121
+
122
+ .remodal-close:before {
123
+ font-family: Arial, "Helvetica CY", "Nimbus Sans L", sans-serif !important;
124
+ font-size: 25px;
125
+ line-height: 35px;
126
+
127
+ position: absolute;
128
+ top: 0;
129
+ left: 0;
130
+
131
+ display: block;
132
+
133
+ width: 35px;
134
+
135
+ content: "\00d7";
136
+ text-align: center;
137
+ }
138
+
139
+ /* Dialog buttons */
140
+
141
+ .remodal-confirm,
142
+ .remodal-cancel {
143
+ font: inherit;
144
+
145
+ display: inline-block;
146
+ overflow: visible;
147
+
148
+ min-width: 110px;
149
+ margin: 0;
150
+ padding: 12px 0;
151
+
152
+ cursor: pointer;
153
+ -webkit-transition: background 0.2s;
154
+ transition: background 0.2s;
155
+ text-align: center;
156
+ vertical-align: middle;
157
+ text-decoration: none;
158
+
159
+ border: 0;
160
+ outline: 0;
161
+ }
162
+
163
+ .remodal-confirm {
164
+ color: #fff;
165
+ background: #81c784;
166
+ }
167
+
168
+ .remodal-confirm:hover,
169
+ .remodal-confirm:focus {
170
+ background: #66bb6a;
171
+ }
172
+
173
+ .remodal-cancel {
174
+ color: #fff;
175
+ background: #e57373;
176
+ }
177
+
178
+ .remodal-cancel:hover,
179
+ .remodal-cancel:focus {
180
+ background: #ef5350;
181
+ }
182
+
183
+ /* Remove inner padding and border in Firefox 4+ for the button tag. */
184
+
185
+ .remodal-confirm::-moz-focus-inner,
186
+ .remodal-cancel::-moz-focus-inner,
187
+ .remodal-close::-moz-focus-inner {
188
+ padding: 0;
189
+
190
+ border: 0;
191
+ }
192
+
193
+ /* Keyframes
194
+ ========================================================================== */
195
+
196
+ @-webkit-keyframes remodal-opening-keyframes {
197
+ from {
198
+ -webkit-transform: scale(1.05);
199
+ transform: scale(1.05);
200
+
201
+ opacity: 0;
202
+ }
203
+ to {
204
+ -webkit-transform: none;
205
+ transform: none;
206
+
207
+ opacity: 1;
208
+
209
+ -webkit-filter: blur(0);
210
+ filter: blur(0);
211
+ }
212
+ }
213
+
214
+ @keyframes remodal-opening-keyframes {
215
+ from {
216
+ -webkit-transform: scale(1.05);
217
+ transform: scale(1.05);
218
+
219
+ opacity: 0;
220
+ }
221
+ to {
222
+ -webkit-transform: none;
223
+ transform: none;
224
+
225
+ opacity: 1;
226
+
227
+ -webkit-filter: blur(0);
228
+ filter: blur(0);
229
+ }
230
+ }
231
+
232
+ @-webkit-keyframes remodal-closing-keyframes {
233
+ from {
234
+ -webkit-transform: scale(1);
235
+ transform: scale(1);
236
+
237
+ opacity: 1;
238
+ }
239
+ to {
240
+ -webkit-transform: scale(0.95);
241
+ transform: scale(0.95);
242
+
243
+ opacity: 0;
244
+
245
+ -webkit-filter: blur(0);
246
+ filter: blur(0);
247
+ }
248
+ }
249
+
250
+ @keyframes remodal-closing-keyframes {
251
+ from {
252
+ -webkit-transform: scale(1);
253
+ transform: scale(1);
254
+
255
+ opacity: 1;
256
+ }
257
+ to {
258
+ -webkit-transform: scale(0.95);
259
+ transform: scale(0.95);
260
+
261
+ opacity: 0;
262
+
263
+ -webkit-filter: blur(0);
264
+ filter: blur(0);
265
+ }
266
+ }
267
+
268
+ @-webkit-keyframes remodal-overlay-opening-keyframes {
269
+ from {
270
+ opacity: 0;
271
+ }
272
+ to {
273
+ opacity: 1;
274
+ }
275
+ }
276
+
277
+ @keyframes remodal-overlay-opening-keyframes {
278
+ from {
279
+ opacity: 0;
280
+ }
281
+ to {
282
+ opacity: 1;
283
+ }
284
+ }
285
+
286
+ @-webkit-keyframes remodal-overlay-closing-keyframes {
287
+ from {
288
+ opacity: 1;
289
+ }
290
+ to {
291
+ opacity: 0;
292
+ }
293
+ }
294
+
295
+ @keyframes remodal-overlay-closing-keyframes {
296
+ from {
297
+ opacity: 1;
298
+ }
299
+ to {
300
+ opacity: 0;
301
+ }
302
+ }
303
+
304
+ /* Media queries
305
+ ========================================================================== */
306
+
307
+ @media only screen and (min-width: 641px) {
308
+ .remodal {
309
+ max-width: 900px;
310
+ }
311
+ }
312
+
313
+ /* IE8
314
+ ========================================================================== */
315
+
316
+ .lt-ie9 .remodal-overlay {
317
+ background: #2b2e38;
318
+ }
319
+
320
+ .lt-ie9 .remodal {
321
+ width: 700px;
322
+ }
components/facebook/assets/css/remodal-template.css ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .isw-popup{
2
+ height: 70vh !important;
3
+ width: 80vh !important;
4
+ }
5
+
6
+ .isw-popup-data{
7
+ position: absolute;
8
+ text-align: right;
9
+ margin-left: 68%;
10
+ margin-top: 2%;
11
+ margin-right: 2%;
12
+ width: 30%;
13
+ }
14
+
15
+ .isw-popup-desc{
16
+ font-size: 2.2vh;
17
+ }
18
+
19
+ .isw-popup-stats{
20
+ text-align: center;
21
+ margin-top: 15%;
22
+ font-size: 14px;
23
+ }
24
+
25
+ .isw-popup-buttons{
26
+ margin-top: 20%;
27
+ text-align: center;
28
+ bottom:0;
29
+ height: 5vh;
30
+ }
31
+
32
+ .isw-popup-whatsapp{
33
+ margin-left: auto;
34
+ margin-right: auto;
35
+ width: 20%;
36
+ }
37
+
38
+ @media only screen and (min-width: 641px){
39
+ .remodal {
40
+ max-width: 120vh;
41
+ }
42
+ }
43
+
44
+
45
+ .isw-popup-image-container{
46
+ height: 101%;
47
+ width: auto;
48
+ float: left;
49
+ }
50
+
51
+ .isw-popup-image-container img {
52
+ width: 100%;
53
+ height: 100%;
54
+ }
55
+
56
+
components/facebook/assets/css/remodal-template1.css ADDED
@@ -0,0 +1,247 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .remodal > div {
2
+ float: left !important;
3
+ }
4
+
5
+ .remodal {
6
+ font-size: 13px !important;
7
+ font-family: Geneva, Arial, Helvetica, sans-serif !important;
8
+ }
9
+ .remodal-media{
10
+ object-fit: contain !important;
11
+ vertical-align: middle !important;
12
+
13
+ }
14
+ .remodal-media-image{
15
+ object-fit: contain !important;
16
+ vertical-align: middle !important;
17
+ max-height: 90vh !important;
18
+ }
19
+ .wis-video-block{
20
+ cursor: pointer !important;
21
+ }
22
+
23
+ .wis-remodal-info {
24
+ text-align: left !important;
25
+ }
26
+
27
+ .wis-remodal-round {
28
+ border-radius: 30px !important;
29
+ }
30
+
31
+ .wis-remodal-text {
32
+ margin-top: 20px !important;
33
+ width: 100% !important;
34
+ text-align: left !important;
35
+ }
36
+
37
+ .wis-remodal-stats {
38
+ margin-top: 20px !important;
39
+ width: 100% !important;
40
+ text-align: center !important;
41
+ }
42
+
43
+ .isw-popup-buttons{
44
+ width: 100% !important;
45
+ text-align: center !important;
46
+ margin-top: 10% !important;
47
+ }
48
+
49
+ .wis-remodal-showcase-message{
50
+ width: 45px !important;
51
+ height: 45px !important;
52
+ }
53
+
54
+ .wis-remodal-username {
55
+ margin-left: 2% !important;
56
+ }
57
+
58
+ .wis-remodal-info {
59
+ margin-top: 5% !important;
60
+ margin-right: 20px !important;
61
+ margin-left: 20px !important;
62
+ }
63
+
64
+ .wis-remodal-img {
65
+ text-align: center !important;
66
+ }
67
+
68
+ .wis-href {
69
+ text-decoration: none !important;
70
+ color: black !important;
71
+ }
72
+
73
+ .wis-href:hover {
74
+ color: #ed1e24 !important;
75
+ }
76
+
77
+ .wis-play-icon-div {
78
+ text-align: center !important;
79
+ color: white !important;
80
+ position: absolute !important;
81
+ }
82
+ .wis-play-icon {
83
+ background-color: rgba(0,0,0,0.2) !important;
84
+ width: 100px !important;
85
+ height: 100px !important;
86
+ padding: 25px 0px 0px 10px !important;
87
+ border-radius: 50px !important;
88
+ }
89
+
90
+ .date-post {
91
+ font-size: 10px !important;
92
+ color: rgba(0,0,0,0.72) !important;
93
+ letter-spacing: .2px !important;
94
+ text-transform: uppercase !important;
95
+ margin-top: 20px !important;
96
+ }
97
+
98
+ .wis-video{
99
+
100
+ }
101
+
102
+
103
+ .remodal-view-arrow-prev, .remodal-view-arrow-next{
104
+ /*display: none !important;*/
105
+ position: absolute !important;
106
+ top: 50% !important;
107
+
108
+ width: 40px !important;
109
+ height: 40px !important;
110
+ padding: 0 !important;
111
+ -webkit-transform: translate(0, -50%) !important;
112
+ -ms-transform: translate(0, -50%) !important;
113
+ transform: translate(0, -50%) !important;
114
+
115
+ cursor: pointer !important;
116
+
117
+ border: none !important;
118
+ outline: none !important;
119
+ border-radius: 20px !important;
120
+ color: black !important;
121
+ z-index: 1 !important;
122
+
123
+ text-align: center !important;
124
+ padding-top: 14px !important;
125
+ }
126
+
127
+ .remodal-view-arrow-prev{
128
+ left: 10px !important;
129
+ }
130
+
131
+ .remodal-view-arrow-next{
132
+ right: 10px !important;
133
+ }
134
+
135
+ .wis-remodal-slick-container:hover .remodal-view-arrow-next, .wis-remodal-slick-container:hover .remodal-view-arrow-prev{
136
+ display: block !important;
137
+ }
138
+
139
+ .wis-remodal-stats{
140
+ display: inline-block !important;
141
+ }
142
+
143
+ .wis-inline{
144
+ display: inline-block !important;
145
+ }
146
+
147
+ .wis-remodal-share-buttons{
148
+ margin-top: -38px !important;
149
+ position: absolute !important;
150
+ padding: 5px !important;
151
+ border: 1px solid #aaaaaa !important;
152
+ border-radius: 4px !important;
153
+ box-shadow: 0 0 10px rgba(0,0,0,0.5) !important;
154
+ background-color: rgba(255,255,255,0.9) !important;
155
+ }
156
+
157
+ .shr-btn{
158
+ color: black !important;
159
+ font-size: 20px !important;
160
+ margin-left: 4px !important;
161
+ }
162
+
163
+ .shr-btn-fcbk {
164
+ margin-left: 0 !important;
165
+ }
166
+
167
+ .wis-remodal-share {
168
+ cursor: pointer !important;
169
+ }
170
+
171
+ .shr-btn:hover{
172
+ color: #ed1e24 !important;
173
+ }
174
+
175
+ .remodal-container
176
+ {
177
+ width: 100% !important;
178
+ display: flex !important;
179
+ }
180
+ .remodal-md-6
181
+ {
182
+ position: relative !important;
183
+ min-height: 1px !important;
184
+ /*padding-right: 15px !important;*/
185
+ /*padding-left: 15px !important;*/
186
+ }
187
+
188
+
189
+
190
+ .white
191
+ {
192
+ background-color: black !important;
193
+ color: white !important;
194
+ }
195
+ .red
196
+ {
197
+ background-color: white !important;
198
+ color: black !important;
199
+ }
200
+
201
+ @media (min-width: 992px) {
202
+ .remodal-md-6 {
203
+ float: left !important;
204
+ width: 50% !important;
205
+ }
206
+
207
+ .remodal-md-3{
208
+ float: left !important;
209
+ width: 30% !important;
210
+ }
211
+
212
+ .remodal-md-9{
213
+ float: left !important;
214
+ width: 70% !important;
215
+ }
216
+
217
+ .wis-play-icon-div{
218
+ left: 38% !important;
219
+ top: 50% !important;
220
+ transform: translate(-50%, -50%) !important;
221
+ z-index: 2 !important;
222
+ pointer-events: none !important;
223
+ }
224
+ }
225
+ @media (max-width: 991px) {
226
+ .remodal-media{
227
+ /*transform: translate(-25%, 0%) !important;*/
228
+
229
+ }
230
+
231
+ .isw-popup-buttons{
232
+ margin-top: 2% !important;
233
+ }
234
+
235
+ .remodal-container
236
+ {
237
+ width: 100% !important;
238
+ display: block !important;
239
+ }
240
+ .wis-play-icon-div{
241
+ left: 50% !important;
242
+ top: 38% !important;
243
+ transform: translate(-50%, -50%) !important;
244
+ z-index: 2 !important;
245
+ pointer-events: none !important;
246
+ }
247
+ }
components/facebook/assets/css/remodal-view.css ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wfb-remodal-container{
2
+ display: block !important;
3
+ width: 100% !important;
4
+ height: auto !important;
5
+ padding: 30px;
6
+ }
7
+
8
+ .wfb-remodal-pic{
9
+ float: left !important;
10
+ padding-bottom: 30px;
11
+ display: inline-block !important;
12
+ }
13
+
14
+ .wfb-remodal-data{
15
+ margin-left: 20px !important;
16
+ text-align: left;
17
+ display: inline-block !important;
18
+ width: 30% !important;
19
+ }
20
+
21
+ @media only screen and (min-width: 641px){
22
+ .remodal{
23
+ max-width: 1200px !important;
24
+ }
25
+ }
26
+
27
+
components/facebook/assets/css/remodal.css ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Remodal - v1.1.1
3
+ * Responsive, lightweight, fast, synchronized with CSS animations, fully customizable modal window plugin with declarative configuration and hash tracking.
4
+ * http://vodkabears.github.io/remodal/
5
+ *
6
+ * Made by Ilya Makarov
7
+ * Under MIT License
8
+ */
9
+
10
+ /* ==========================================================================
11
+ Remodal's necessary styles
12
+ ========================================================================== */
13
+
14
+ /* Hide scroll bar */
15
+
16
+ html.remodal-is-locked {
17
+ overflow: hidden;
18
+
19
+ -ms-touch-action: none;
20
+ touch-action: none;
21
+ }
22
+
23
+ /* Anti FOUC */
24
+
25
+ .remodal,
26
+ [data-remodal-id] {
27
+ display: none;
28
+ }
29
+
30
+ /* Necessary styles of the overlay */
31
+
32
+ .remodal-overlay {
33
+ position: fixed;
34
+ z-index: 9999;
35
+ top: -5000px;
36
+ right: -5000px;
37
+ bottom: -5000px;
38
+ left: -5000px;
39
+
40
+ display: none;
41
+ }
42
+
43
+ /* Necessary styles of the wrapper */
44
+
45
+ .remodal-wrapper {
46
+ position: fixed;
47
+ z-index: 10000;
48
+ top: 0;
49
+ right: 0;
50
+ bottom: 0;
51
+ left: 0;
52
+
53
+ display: none;
54
+ overflow: auto;
55
+
56
+ text-align: center;
57
+
58
+ -webkit-overflow-scrolling: touch;
59
+ }
60
+
61
+ .remodal-wrapper:after {
62
+ display: inline-block;
63
+
64
+ height: 100%;
65
+ margin-left: -0.05em;
66
+
67
+ content: "";
68
+ }
69
+
70
+ /* Fix iPad, iPhone glitches */
71
+
72
+ .remodal-overlay,
73
+ .remodal-wrapper {
74
+ -webkit-backface-visibility: hidden;
75
+ backface-visibility: hidden;
76
+ }
77
+
78
+ /* Necessary styles of the modal dialog */
79
+
80
+ .remodal {
81
+ position: relative;
82
+
83
+ outline: none;
84
+
85
+ -webkit-text-size-adjust: 100%;
86
+ -ms-text-size-adjust: 100%;
87
+ text-size-adjust: 100%;
88
+ }
89
+
90
+ .remodal-is-initialized {
91
+ /* Disable Anti-FOUC */
92
+ display: inline-block;
93
+ }
components/facebook/assets/css/socialstory.css ADDED
@@ -0,0 +1,258 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #storytime .storytime {
2
+ position: relative;
3
+ width: 100%;
4
+ height: 100%;
5
+ margin: 0;
6
+ padding: 0;
7
+ opacity: 0;
8
+ transition: opacity 0.4s;
9
+ -moz-transition: opacity 0.4s;
10
+ -webkit-transition: opacity 0.4s;
11
+ }
12
+
13
+ #storytime .story-cover {
14
+ z-index: 1000;
15
+ position: fixed;
16
+ top: 0;
17
+ left: 0;
18
+ height: 100%;
19
+ width: 100%;
20
+ min-width: 100%;
21
+ min-height: 100%;
22
+ background-color: #000000;
23
+ opacity: 0.85;
24
+ }
25
+
26
+ #storytime .story-nav-left {
27
+ height: 6vh;
28
+ display: inline-block;
29
+ overflow: hidden;
30
+ position: relative;
31
+ color: #ffffff;
32
+ font-family: 'Helvetica', sans-serif;
33
+ vertical-align: middle;
34
+ font-size: 85%;
35
+ width: 80%;
36
+ margin: 0;
37
+ padding: 0;
38
+ text-align: left;
39
+ }
40
+
41
+ #storytime .story-nav-right {
42
+ height: 6vh;
43
+ display: inline-block;
44
+ overflow: hidden;
45
+ position: relative;
46
+ text-align: right;
47
+ width: 20%;
48
+ vertical-align: middle;
49
+ margin: 0;
50
+ padding: 0;
51
+ }
52
+
53
+ #storytime span.story-text {
54
+ font-weight: bold;
55
+ padding-left: 10px;
56
+ }
57
+
58
+ #storytime span.story-date {
59
+ opacity: 0.6;
60
+ font-size: 90%;
61
+ padding-left: 10px;
62
+ }
63
+
64
+ #storytime .story-timeline {
65
+ height: 3vh;
66
+ display: -webkit-box;
67
+ display: -webkit-flex;
68
+ display: -ms-flexbox;
69
+ display: flex;
70
+ -webkit-box-orient: horizontal;
71
+ -webkit-box-direction: normal;
72
+ -webkit-flex-direction: row;
73
+ -ms-flex-direction: row;
74
+ flex-direction: row;
75
+ -webkit-box-pack: justify;
76
+ -webkit-justify-content: space-between;
77
+ -ms-flex-pack: justify;
78
+ justify-content: space-between;
79
+ align-items: center;
80
+ }
81
+
82
+ #storytime .story-timeline-item {
83
+ -webkit-box-flex: 1;
84
+ -webkit-flex-grow: 1;
85
+ -ms-flex-positive: 1;
86
+ flex-grow: 1;
87
+ height: 2px;
88
+ position: relative;
89
+ margin-right: 5px;
90
+ }
91
+
92
+ #storytime .story-timeline-item:last-child {
93
+ margin-right: 0px;
94
+ }
95
+
96
+ #storytime .story-timeline-line {
97
+ background: rgba(255,255,255,.35);
98
+ border-radius: 2px;
99
+ height: 2px;
100
+ position: absolute;
101
+ top: 0;
102
+ width: 100%;
103
+ }
104
+
105
+ #storytime .story-timeline-line-active {
106
+ -webkit-transition: width .25s linear;
107
+ transition: width .25s linear;
108
+ width: auto;
109
+ will-change: width;
110
+ border-radius: 2px;
111
+ height: 2px;
112
+ position: absolute;
113
+ top: 0;
114
+ background: #ffffff;
115
+ }
116
+
117
+ #storytime .story-icon {
118
+ height: 90%;
119
+ object-fit: contain;
120
+ border-radius: 50%;
121
+ vertical-align:middle;
122
+ border: 2px solid #ffffff;
123
+ }
124
+
125
+ #storytime .story-window {
126
+ z-index: 1010;
127
+ position: fixed;
128
+ left: 50%;
129
+ top: 50%;
130
+ -webkit-transform: translate(-50%, -50%);
131
+ transform: translate(-50%, -50%);
132
+ max-height: 90%;
133
+ display: block;
134
+ }
135
+
136
+ #storytime .story-video {
137
+ display: block;
138
+ height: 80vh;
139
+ width: 100%;
140
+ object-fit: contain;
141
+ background-color: #000000;
142
+ }
143
+
144
+ #storytime .story-video video {
145
+ max-height: 100% !important;
146
+ object-fit: contain;
147
+ display: inline-block;
148
+ vertical-align: middle;
149
+ position: relative;
150
+ }
151
+
152
+ #storytime .close {
153
+ position: absolute;
154
+ right: 0;
155
+ bottom: 20%;
156
+ width: 32px;
157
+ height: 32px;
158
+ opacity: 0.3;
159
+ margin-top: auto;
160
+ margin-bottom: auto;
161
+ display: block;
162
+ }
163
+
164
+ #storytime .close:hover {
165
+ opacity: 1;
166
+ }
167
+
168
+ #storytime .close:before, #storytime .close:after {
169
+ position: absolute;
170
+ left: 15px;
171
+ content: ' ';
172
+ height: 33px;
173
+ width: 2px;
174
+ background-color: #ffffff;
175
+ }
176
+
177
+ #storytime .close:before {
178
+ transform: rotate(45deg);
179
+ }
180
+
181
+ #storytime .close:after {
182
+ transform: rotate(-45deg);
183
+ }
184
+
185
+ #storytime .story-arrow {
186
+ border: solid #ffffff;
187
+ border-width: 0 2px 2px 0;
188
+ display: block;
189
+ padding: 8px;
190
+ opacity: 0.2;
191
+ }
192
+
193
+ #storytime .story-arrow:hover {
194
+ opacity: 0.9;
195
+ }
196
+
197
+
198
+ #storytime .right {
199
+ position: absolute;
200
+ right: -10%;
201
+ top: 50%;
202
+ transform: rotate(-45deg);
203
+ -webkit-transform: rotate(-45deg);
204
+ }
205
+
206
+ #storytime .left {
207
+ position: absolute;
208
+ left: -10%;
209
+ top: 50%;
210
+ transform: rotate(135deg);
211
+ -webkit-transform: rotate(135deg);
212
+ }
213
+
214
+ #storytime .spinner {
215
+ width: 70px;
216
+ text-align: center;
217
+ margin:auto;
218
+ position: absolute;
219
+ left: 50%;
220
+ top: 50%;
221
+ margin-left: -30px;
222
+ }
223
+
224
+ #storytime .spinner > div {
225
+ width: 18px;
226
+ height: 18px;
227
+ background-color: #999999;
228
+ border-radius: 100%;
229
+ display: inline-block;
230
+ -webkit-animation: st-sk-bouncedelay 1.4s infinite ease-in-out both;
231
+ animation: st-sk-bouncedelay 1.4s infinite ease-in-out both;
232
+ }
233
+
234
+ #storytime .spinner .bounce1 {
235
+ -webkit-animation-delay: -0.32s;
236
+ animation-delay: -0.32s;
237
+ }
238
+
239
+ #storytime .spinner .bounce2 {
240
+ -webkit-animation-delay: -0.16s;
241
+ animation-delay: -0.16s;
242
+ }
243
+
244
+ @-webkit-keyframes st-sk-bouncedelay {
245
+ 0%, 80%, 100% { -webkit-transform: scale(0) }
246
+ 40% { -webkit-transform: scale(1.0) }
247
+ }
248
+
249
+ @keyframes st-sk-bouncedelay {
250
+ 0%, 80%, 100% {
251
+ -webkit-transform: scale(0);
252
+ transform: scale(0);
253
+ } 40% {
254
+ -webkit-transform: scale(1.0);
255
+ transform: scale(1.0);
256
+ }
257
+ }
258
+
components/facebook/assets/css/wbfb_masonry_view.css ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wbfb_masonry_container
2
+ {
3
+ margin: auto !important;
4
+ }
5
+ .wbfb_masonry_post{
6
+ vertical-align: top;
7
+ display: inline-block !important;
8
+ margin-top: 10px !important;
9
+ margin-left: 20px !important;
10
+ padding: 15px !important;
11
+ background-color: white !important;
12
+ box-shadow:0 0 10px #d2d2d2 !important;
13
+ border-radius: 5px !important;
14
+ }
15
+
16
+ .wbfb_profile_pic{
17
+ display: inline-block !important;
18
+ }
19
+
20
+ .wbfb_profile_data{
21
+ margin-left: 10px !important;
22
+ display: inline-block !important;
23
+ vertical-align: middle !important;
24
+ }
25
+
26
+ .wbfb_masonry_post_body{
27
+ margin-top: 20px !important;
28
+ }
29
+
30
+ .wbfb_masonry_post_attachment{
31
+ margin-top: 20px !important;
32
+ }
33
+
34
+ .wbfb_masonry_post_footer{
35
+ margin-top: 20px !important;
36
+ }
37
+
38
+ .wbfb_masonry_post_stats{
39
+ margin-top: 20px !important;
40
+ }
41
+
42
+ .wbfb_profile_data_name a{
43
+ text-decoration: none !important;
44
+ color: black !important;
45
+ font-weight: bold;
46
+ }
47
+
48
+ .wfb-meta {
49
+ float: left;
50
+ clear: both;
51
+ list-style-type: none;
52
+ padding: 10px 0 !important;
53
+ margin: 0 !important;
54
+ }
55
+
56
+ .wfb-meta li {
57
+ float: left;
58
+ width: auto;
59
+ display: block;
60
+ list-style-type: none !important;
61
+ margin: 0 10px 0 0 !important;
62
+ padding: 0 !important;
63
+ font-size: 11px;
64
+ line-height: 16px !important;
65
+ background: none !important;
66
+ }
67
+
68
+ .wfb-count{
69
+ margin-left: 5px !important;
70
+ }
71
+
72
+ .wbfb_post_data{
73
+ font-size: 12px !important;
74
+ color: grey !important;
75
+ }
76
+
77
+ .wbfb_masonry_repost{
78
+ color: black !important;
79
+ width: 100% !important;
80
+ background: #f9f9f9 !important;
81
+ padding: 10px 10px !important;
82
+ border: 1px solid #d9d9d9 !important;
83
+ border-radius: 5px !important;
84
+ }
85
+
86
+ .wbfb_masonry_repost a{
87
+ text-decoration: none !important;
88
+ }
89
+
90
+ .wbfb_repost_picture{
91
+ width: 100% !important;
92
+ height: auto !important;
93
+ }
94
+
95
+ .wbfb_repost_text{
96
+ margin-top: 10px !important;
97
+ }
98
+
99
+ .wbfb_masonry_post_text a{
100
+ text-decoration: none !important;
101
+ color: black !important;
102
+ }
103
+
104
+ .wbfb_popup_link{
105
+ cursor: pointer !important;
106
+ }
107
+
108
+ .wbfb_masonry_post_attachment{
109
+ cursor: pointer !important;
110
+ }
111
+
112
+ #wfb .wfb-icon, #wfb .wfb-reactions-count .wfb-like, #wfb-lightbox-wrapper .wfb-icon, #wfb-lightbox-wrapper .wfb-reactions-count .wfb-like {
113
+ display: block;
114
+ float: left;
115
+ position: relative;
116
+ z-index: 2;
117
+ margin: 0 0 0 3px;
118
+ }
119
+
120
+ #wfb .wfb-meta .wfb-count, #wfb-lightbox-wrapper .wfb-meta .wfb-count {
121
+ position: relative;
122
+ z-index: 2;
123
+ margin-left: 5px;
124
+ }
125
+
126
+ .wfb-icon, .wfb-icon svg {
127
+ width: 16px;
128
+ height: 16px;
129
+ transition: all 0.1s ease;
130
+ }
131
+
132
+ .wfb-screenreader {
133
+ text-indent: -9999px !important;
134
+ display: block !important;
135
+ width: 0 !important;
136
+ height: 0 !important;
137
+ line-height: 0 !important;
138
+ }
139
+
140
+ #wfb svg.wfb-svg-bg, #wfb-lightbox-wrapper svg.wfb-svg-bg, #wfb .wfb-reactions-count .wfb-svg-bg, #wfb .wfb-reactions-count .wfb-svg-bg-dark {
141
+ position: absolute;
142
+ left: 0;
143
+ top: 0;
144
+ z-index: -1;
145
+ }
components/facebook/assets/js/libs/imagesloaded.pkgd.js ADDED
@@ -0,0 +1,497 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * imagesLoaded PACKAGED v4.1.4
3
+ * JavaScript is all like "You images are done yet or what?"
4
+ * MIT License
5
+ */
6
+
7
+ /**
8
+ * EvEmitter v1.1.0
9
+ * Lil' event emitter
10
+ * MIT License
11
+ */
12
+
13
+ /* jshint unused: true, undef: true, strict: true */
14
+
15
+ ( function( global, factory ) {
16
+ // universal module definition
17
+ /* jshint strict: false */ /* globals define, module, window */
18
+ if ( typeof define == 'function' && define.amd ) {
19
+ // AMD - RequireJS
20
+ define( 'ev-emitter/ev-emitter',factory );
21
+ } else if ( typeof module == 'object' && module.exports ) {
22
+ // CommonJS - Browserify, Webpack
23
+ module.exports = factory();
24
+ } else {
25
+ // Browser globals
26
+ global.EvEmitter = factory();
27
+ }
28
+
29
+ }( typeof window != 'undefined' ? window : this, function() {
30
+
31
+
32
+
33
+ function EvEmitter() {}
34
+
35
+ var proto = EvEmitter.prototype;
36
+
37
+ proto.on = function( eventName, listener ) {
38
+ if ( !eventName || !listener ) {
39
+ return;
40
+ }
41
+ // set events hash
42
+ var events = this._events = this._events || {};
43
+ // set listeners array
44
+ var listeners = events[ eventName ] = events[ eventName ] || [];
45
+ // only add once
46
+ if ( listeners.indexOf( listener ) == -1 ) {
47
+ listeners.push( listener );
48
+ }
49
+
50
+ return this;
51
+ };
52
+
53
+ proto.once = function( eventName, listener ) {
54
+ if ( !eventName || !listener ) {
55
+ return;
56
+ }
57
+ // add event
58
+ this.on( eventName, listener );
59
+ // set once flag
60
+ // set onceEvents hash
61
+ var onceEvents = this._onceEvents = this._onceEvents || {};
62
+ // set onceListeners object
63
+ var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};
64
+ // set flag
65
+ onceListeners[ listener ] = true;
66
+
67
+ return this;
68
+ };
69
+
70
+ proto.off = function( eventName, listener ) {
71
+ var listeners = this._events && this._events[ eventName ];
72
+ if ( !listeners || !listeners.length ) {
73
+ return;
74
+ }
75
+ var index = listeners.indexOf( listener );
76
+ if ( index != -1 ) {
77
+ listeners.splice( index, 1 );
78
+ }
79
+
80
+ return this;
81
+ };
82
+
83
+ proto.emitEvent = function( eventName, args ) {
84
+ var listeners = this._events && this._events[ eventName ];
85
+ if ( !listeners || !listeners.length ) {
86
+ return;
87
+ }
88
+ // copy over to avoid interference if .off() in listener
89
+ listeners = listeners.slice(0);
90
+ args = args || [];
91
+ // once stuff
92
+ var onceListeners = this._onceEvents && this._onceEvents[ eventName ];
93
+
94
+ for ( var i=0; i < listeners.length; i++ ) {
95
+ var listener = listeners[i]
96
+ var isOnce = onceListeners && onceListeners[ listener ];
97
+ if ( isOnce ) {
98
+ // remove listener
99
+ // remove before trigger to prevent recursion
100
+ this.off( eventName, listener );
101
+ // unset once flag
102
+ delete onceListeners[ listener ];
103
+ }
104
+ // trigger listener
105
+ listener.apply( this, args );
106
+ }
107
+
108
+ return this;
109
+ };
110
+
111
+ proto.allOff = function() {
112
+ delete this._events;
113
+ delete this._onceEvents;
114
+ };
115
+
116
+ return EvEmitter;
117
+
118
+ }));
119
+
120
+ /*!
121
+ * imagesLoaded v4.1.4
122
+ * JavaScript is all like "You images are done yet or what?"
123
+ * MIT License
124
+ */
125
+
126
+ ( function( window, factory ) { 'use strict';
127
+ // universal module definition
128
+
129
+ /*global define: false, module: false, require: false */
130
+
131
+ if ( typeof define == 'function' && define.amd ) {
132
+ // AMD
133
+ define( [
134
+ 'ev-emitter/ev-emitter'
135
+ ], function( EvEmitter ) {
136
+ return factory( window, EvEmitter );
137
+ });
138
+ } else if ( typeof module == 'object' && module.exports ) {
139
+ // CommonJS
140
+ module.exports = factory(
141
+ window,
142
+ require('ev-emitter')
143
+ );
144
+ } else {
145
+ // browser global
146
+ window.imagesLoaded = factory(
147
+ window,
148
+ window.EvEmitter
149
+ );
150
+ }
151
+
152
+ })( typeof window !== 'undefined' ? window : this,
153
+
154
+ // -------------------------- factory -------------------------- //
155
+
156
+ function factory( window, EvEmitter ) {
157
+
158
+
159
+
160
+ var $ = window.jQuery;
161
+ var console = window.console;
162
+
163
+ // -------------------------- helpers -------------------------- //
164
+
165
+ // extend objects
166
+ function extend( a, b ) {
167
+ for ( var prop in b ) {
168
+ a[ prop ] = b[ prop ];
169
+ }
170
+ return a;
171
+ }
172
+
173
+ var arraySlice = Array.prototype.slice;
174
+
175
+ // turn element or nodeList into an array
176
+ function makeArray( obj ) {
177
+ if ( Array.isArray( obj ) ) {
178
+ // use object if already an array
179
+ return obj;
180
+ }
181
+
182
+ var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';
183
+ if ( isArrayLike ) {
184
+ // convert nodeList to array
185
+ return arraySlice.call( obj );
186
+ }
187
+
188
+ // array of single index
189
+ return [ obj ];
190
+ }
191
+
192
+ // -------------------------- imagesLoaded -------------------------- //
193
+
194
+ /**
195
+ * @param {Array, Element, NodeList, String} elem
196
+ * @param {Object or Function} options - if function, use as callback
197
+ * @param {Function} onAlways - callback function
198
+ */
199
+ function ImagesLoaded( elem, options, onAlways ) {
200
+ // coerce ImagesLoaded() without new, to be new ImagesLoaded()
201
+ if ( !( this instanceof ImagesLoaded ) ) {
202
+ return new ImagesLoaded( elem, options, onAlways );
203
+ }
204
+ // use elem as selector string
205
+ var queryElem = elem;
206
+ if ( typeof elem == 'string' ) {
207
+ queryElem = document.querySelectorAll( elem );
208
+ }
209
+ // bail if bad element
210
+ if ( !queryElem ) {
211
+ console.error( 'Bad element for imagesLoaded ' + ( queryElem || elem ) );
212
+ return;
213
+ }
214
+
215
+ this.elements = makeArray( queryElem );
216
+ this.options = extend( {}, this.options );
217
+ // shift arguments if no options set
218
+ if ( typeof options == 'function' ) {
219
+ onAlways = options;
220
+ } else {
221
+ extend( this.options, options );
222
+ }
223
+
224
+ if ( onAlways ) {
225
+ this.on( 'always', onAlways );
226
+ }
227
+
228
+ this.getImages();
229
+
230
+ if ( $ ) {
231
+ // add jQuery Deferred object
232
+ this.jqDeferred = new $.Deferred();
233
+ }
234
+
235
+ // HACK check async to allow time to bind listeners
236
+ setTimeout( this.check.bind( this ) );
237
+ }
238
+
239
+ ImagesLoaded.prototype = Object.create( EvEmitter.prototype );
240
+
241
+ ImagesLoaded.prototype.options = {};
242
+
243
+ ImagesLoaded.prototype.getImages = function() {
244
+ this.images = [];
245
+
246
+ // filter & find items if we have an item selector
247
+ this.elements.forEach( this.addElementImages, this );
248
+ };
249
+
250
+ /**
251
+ * @param {Node} element
252
+ */
253
+ ImagesLoaded.prototype.addElementImages = function( elem ) {
254
+ // filter siblings
255
+ if ( elem.nodeName == 'IMG' ) {
256
+ this.addImage( elem );
257
+ }
258
+ // get background image on element
259
+ if ( this.options.background === true ) {
260
+ this.addElementBackgroundImages( elem );
261
+ }
262
+
263
+ // find children
264
+ // no non-element nodes, #143
265
+ var nodeType = elem.nodeType;
266
+ if ( !nodeType || !elementNodeTypes[ nodeType ] ) {
267
+ return;
268
+ }
269
+ var childImgs = elem.querySelectorAll('img');
270
+ // concat childElems to filterFound array
271
+ for ( var i=0; i < childImgs.length; i++ ) {
272
+ var img = childImgs[i];
273
+ this.addImage( img );
274
+ }
275
+
276
+ // get child background images
277
+ if ( typeof this.options.background == 'string' ) {
278
+ var children = elem.querySelectorAll( this.options.background );
279
+ for ( i=0; i < children.length; i++ ) {
280
+ var child = children[i];
281
+ this.addElementBackgroundImages( child );
282
+ }
283
+ }
284
+ };
285
+
286
+ var elementNodeTypes = {
287
+ 1: true,
288
+ 9: true,
289
+ 11: true
290
+ };
291
+
292
+ ImagesLoaded.prototype.addElementBackgroundImages = function( elem ) {
293
+ var style = getComputedStyle( elem );
294
+ if ( !style ) {
295
+ // Firefox returns null if in a hidden iframe https://bugzil.la/548397
296
+ return;
297
+ }
298
+ // get url inside url("...")
299
+ var reURL = /url\((['"])?(.*?)\1\)/gi;
300
+ var matches = reURL.exec( style.backgroundImage );
301
+ while ( matches !== null ) {
302
+ var url = matches && matches[2];
303
+ if ( url ) {
304
+ this.addBackground( url, elem );
305
+ }
306
+ matches = reURL.exec( style.backgroundImage );
307
+ }
308
+ };
309
+
310
+ /**
311
+ * @param {Image} img
312
+ */
313
+ ImagesLoaded.prototype.addImage = function( img ) {
314
+ var loadingImage = new LoadingImage( img );
315
+ this.images.push( loadingImage );
316
+ };
317
+
318
+ ImagesLoaded.prototype.addBackground = function( url, elem ) {
319
+ var background = new Background( url, elem );
320
+ this.images.push( background );
321
+ };
322
+
323
+ ImagesLoaded.prototype.check = function() {
324
+ var _this = this;
325
+ this.progressedCount = 0;
326
+ this.hasAnyBroken = false;
327
+ // complete if no images
328
+ if ( !this.images.length ) {
329
+ this.complete();
330
+ return;
331
+ }
332
+
333
+ function onProgress( image, elem, message ) {
334
+ // HACK - Chrome triggers event before object properties have changed. #83
335
+ setTimeout( function() {
336
+ _this.progress( image, elem, message );
337
+ });
338
+ }
339
+
340
+ this.images.forEach( function( loadingImage ) {
341
+ loadingImage.once( 'progress', onProgress );
342
+ loadingImage.check();
343
+ });
344
+ };
345
+
346
+ ImagesLoaded.prototype.progress = function( image, elem, message ) {
347
+ this.progressedCount++;
348
+ this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded;
349
+ // progress event
350
+ this.emitEvent( 'progress', [ this, image, elem ] );
351
+ if ( this.jqDeferred && this.jqDeferred.notify ) {
352
+ this.jqDeferred.notify( this, image );
353
+ }
354
+ // check if completed
355
+ if ( this.progressedCount == this.images.length ) {
356
+ this.complete();
357
+ }
358
+
359
+ if ( this.options.debug && console ) {
360
+ console.log( 'progress: ' + message, image, elem );
361
+ }
362
+ };
363
+
364
+ ImagesLoaded.prototype.complete = function() {
365
+ var eventName = this.hasAnyBroken ? 'fail' : 'done';
366
+ this.isComplete = true;
367
+ this.emitEvent( eventName, [ this ] );
368
+ this.emitEvent( 'always', [ this ] );
369
+ if ( this.jqDeferred ) {
370
+ var jqMethod = this.hasAnyBroken ? 'reject' : 'resolve';
371
+ this.jqDeferred[ jqMethod ]( this );
372
+ }
373
+ };
374
+
375
+ // -------------------------- -------------------------- //
376
+
377
+ function LoadingImage( img ) {
378
+ this.img = img;
379
+ }
380
+
381
+ LoadingImage.prototype = Object.create( EvEmitter.prototype );
382
+
383
+ LoadingImage.prototype.check = function() {
384
+ // If complete is true and browser supports natural sizes,
385
+ // try to check for image status manually.
386
+ var isComplete = this.getIsImageComplete();
387
+ if ( isComplete ) {
388
+ // report based on naturalWidth
389
+ this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
390
+ return;
391
+ }
392
+
393
+ // If none of the checks above matched, simulate loading on detached element.
394
+ this.proxyImage = new Image();
395
+ this.proxyImage.addEventListener( 'load', this );
396
+ this.proxyImage.addEventListener( 'error', this );
397
+ // bind to image as well for Firefox. #191
398
+ this.img.addEventListener( 'load', this );
399
+ this.img.addEventListener( 'error', this );
400
+ this.proxyImage.src = this.img.src;
401
+ };
402
+
403
+ LoadingImage.prototype.getIsImageComplete = function() {
404
+ // check for non-zero, non-undefined naturalWidth
405
+ // fixes Safari+InfiniteScroll+Masonry bug infinite-scroll#671
406
+ return this.img.complete && this.img.naturalWidth;
407
+ };
408
+
409
+ LoadingImage.prototype.confirm = function( isLoaded, message ) {
410
+ this.isLoaded = isLoaded;
411
+ this.emitEvent( 'progress', [ this, this.img, message ] );
412
+ };
413
+
414
+ // ----- events ----- //
415
+
416
+ // trigger specified handler for event type
417
+ LoadingImage.prototype.handleEvent = function( event ) {
418
+ var method = 'on' + event.type;
419
+ if ( this[ method ] ) {
420
+ this[ method ]( event );
421
+ }
422
+ };
423
+
424
+ LoadingImage.prototype.onload = function() {
425
+ this.confirm( true, 'onload' );
426
+ this.unbindEvents();
427
+ };
428
+
429
+ LoadingImage.prototype.onerror = function() {
430
+ this.confirm( false, 'onerror' );
431
+ this.unbindEvents();
432
+ };
433
+
434
+ LoadingImage.prototype.unbindEvents = function() {
435
+ this.proxyImage.removeEventListener( 'load', this );
436
+ this.proxyImage.removeEventListener( 'error', this );
437
+ this.img.removeEventListener( 'load', this );
438
+ this.img.removeEventListener( 'error', this );
439
+ };
440
+
441
+ // -------------------------- Background -------------------------- //
442
+
443
+ function Background( url, element ) {
444
+ this.url = url;
445
+ this.element = element;
446
+ this.img = new Image();
447
+ }
448
+
449
+ // inherit LoadingImage prototype
450
+ Background.prototype = Object.create( LoadingImage.prototype );
451
+
452
+ Background.prototype.check = function() {
453
+ this.img.addEventListener( 'load', this );
454
+ this.img.addEventListener( 'error', this );
455
+ this.img.src = this.url;
456
+ // check if image is already complete
457
+ var isComplete = this.getIsImageComplete();
458
+ if ( isComplete ) {
459
+ this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
460
+ this.unbindEvents();
461
+ }
462
+ };
463
+
464
+ Background.prototype.unbindEvents = function() {
465
+ this.img.removeEventListener( 'load', this );
466
+ this.img.removeEventListener( 'error', this );
467
+ };
468
+
469
+ Background.prototype.confirm = function( isLoaded, message ) {
470
+ this.isLoaded = isLoaded;
471
+ this.emitEvent( 'progress', [ this, this.element, message ] );
472
+ };
473
+
474
+ // -------------------------- jQuery -------------------------- //
475
+
476
+ ImagesLoaded.makeJQueryPlugin = function( jQuery ) {
477
+ jQuery = jQuery || window.jQuery;
478
+ if ( !jQuery ) {
479
+ return;
480
+ }
481
+ // set local variable
482
+ $ = jQuery;
483
+ // $().imagesLoaded()
484
+ $.fn.imagesLoaded = function( options, callback ) {
485
+ var instance = new ImagesLoaded( this, options, callback );
486
+ return instance.jqDeferred.promise( $(this) );
487
+ };
488
+ };
489
+ // try making plugin
490
+ ImagesLoaded.makeJQueryPlugin();
491
+
492
+ // -------------------------- -------------------------- //
493
+
494
+ return ImagesLoaded;
495
+
496
+ });
497
+
components/facebook/assets/js/libs/imagesloaded.pkgd.min.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ /*!
2
+ * imagesLoaded PACKAGED v4.1.4
3
+ * JavaScript is all like "You images are done yet or what?"
4
+ * MIT License
5
+ */
6
+
7
+ !function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(e,r),delete n[r]),r.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return t(e,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("ev-emitter")):e.imagesLoaded=t(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){function i(e,t){for(var i in t)e[i]=t[i];return e}function n(e){if(Array.isArray(e))return e;var t="object"==typeof e&&"number"==typeof e.length;return t?d.call(e):[e]}function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);var s=e;return"string"==typeof e&&(s=document.querySelectorAll(e)),s?(this.elements=n(s),this.options=i({},this.options),"function"==typeof t?r=t:i(this.options,t),r&&this.on("always",r),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(s||e))}function r(e){this.img=e}function s(e,t){this.url=e,this.element=t,this.img=new Image}var h=e.jQuery,a=e.console,d=Array.prototype.slice;o.prototype=Object.create(t.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&u[t]){for(var i=e.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=e.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var u={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(t.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,e),n=i.exec(t.backgroundImage)}},o.prototype.addImage=function(e){var t=new r(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var i=new s(e,t);this.images.push(i)},o.prototype.check=function(){function e(e,i,n){setTimeout(function(){t.progress(e,i,n)})}var t=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(t){t.once("progress",e),t.check()}):void this.complete()},o.prototype.progress=function(e,t,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},r.prototype=Object.create(t.prototype),r.prototype.check=function(){var e=this.getIsImageComplete();return e?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},r.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},r.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},o.makeJQueryPlugin=function(t){t=t||e.jQuery,t&&(h=t,h.fn.imagesLoaded=function(e,t){var i=new o(this,e,t);return i.jqDeferred.promise(h(this))})},o.makeJQueryPlugin(),o});
components/facebook/assets/js/libs/remodal.js ADDED
@@ -0,0 +1,785 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Remodal - v1.1.1
3
+ * Responsive, lightweight, fast, synchronized with CSS animations, fully customizable modal window plugin with declarative configuration and hash tracking.
4
+ * http://vodkabears.github.io/remodal/
5
+ *
6
+ * Made by Ilya Makarov
7
+ * Under MIT License
8
+ */
9
+
10
+ !(function(root, factory) {
11
+ if (typeof define === 'function' && define.amd) {
12
+ define(['jquery'], function($) {
13
+ return factory(root, $);
14
+ });
15
+ } else if (typeof exports === 'object') {
16
+ factory(root, require('jquery'));
17
+ } else {
18
+ factory(root, root.jQuery || root.Zepto);
19
+ }
20
+ })(this, function(global, $) {
21
+
22
+ 'use strict';
23
+
24
+ /**
25
+ * Name of the plugin
26
+ * @private
27
+ * @const
28
+ * @type {String}
29
+ */
30
+ var PLUGIN_NAME = 'remodal';
31
+
32
+ /**
33
+ * Namespace for CSS and events
34
+ * @private
35
+ * @const
36
+ * @type {String}
37
+ */
38
+ var NAMESPACE = global.REMODAL_GLOBALS && global.REMODAL_GLOBALS.NAMESPACE || PLUGIN_NAME;
39
+
40
+ /**
41
+ * Animationstart event with vendor prefixes
42
+ * @private
43
+ * @const
44
+ * @type {String}
45
+ */
46
+ var ANIMATIONSTART_EVENTS = $.map(
47
+ ['animationstart', 'webkitAnimationStart', 'MSAnimationStart', 'oAnimationStart'],
48
+
49
+ function(eventName) {
50
+ return eventName + '.' + NAMESPACE;
51
+ }
52
+
53
+ ).join(' ');
54
+
55
+ /**
56
+ * Animationend event with vendor prefixes
57
+ * @private
58
+ * @const
59
+ * @type {String}
60
+ */
61
+ var ANIMATIONEND_EVENTS = $.map(
62
+ ['animationend', 'webkitAnimationEnd', 'MSAnimationEnd', 'oAnimationEnd'],
63
+
64
+ function(eventName) {
65
+ return eventName + '.' + NAMESPACE;
66
+ }
67
+
68
+ ).join(' ');
69
+
70
+ /**
71
+ * Default settings
72
+ * @private
73
+ * @const
74
+ * @type {Object}
75
+ */
76
+ var DEFAULTS = $.extend({
77
+ hashTracking: true,
78
+ closeOnConfirm: true,
79
+ closeOnCancel: true,
80
+ closeOnEscape: true,
81
+ closeOnOutsideClick: true,
82
+ modifier: '',
83
+ appendTo: null
84
+ }, global.REMODAL_GLOBALS && global.REMODAL_GLOBALS.DEFAULTS);
85
+
86
+ /**
87
+ * States of the Remodal
88
+ * @private
89
+ * @const
90
+ * @enum {String}
91
+ */
92
+ var STATES = {
93
+ CLOSING: 'closing',
94
+ CLOSED: 'closed',
95
+ OPENING: 'opening',
96
+ OPENED: 'opened'
97
+ };
98
+
99
+ /**
100
+ * Reasons of the state change.
101
+ * @private
102
+ * @const
103
+ * @enum {String}
104
+ */
105
+ var STATE_CHANGE_REASONS = {
106
+ CONFIRMATION: 'confirmation',
107
+ CANCELLATION: 'cancellation'
108
+ };
109
+
110
+ /**
111
+ * Is animation supported?
112
+ * @private
113
+ * @const
114
+ * @type {Boolean}
115
+ */
116
+ var IS_ANIMATION = (function() {
117
+ var style = document.createElement('div').style;
118
+
119
+ return style.animationName !== undefined ||
120
+ style.WebkitAnimationName !== undefined ||
121
+ style.MozAnimationName !== undefined ||
122
+ style.msAnimationName !== undefined ||
123
+ style.OAnimationName !== undefined;
124
+ })();
125
+
126
+ /**
127
+ * Is iOS?
128
+ * @private
129
+ * @const
130
+ * @type {Boolean}
131
+ */
132
+ var IS_IOS = /iPad|iPhone|iPod/.test(navigator.platform);
133
+
134
+ /**
135
+ * Current modal
136
+ * @private
137
+ * @type {Remodal}
138
+ */
139
+ var current;
140
+
141
+ /**
142
+ * Scrollbar position
143
+ * @private
144
+ * @type {Number}
145
+ */
146
+ var scrollTop;
147
+
148
+ /**
149
+ * Returns an animation duration
150
+ * @private
151
+ * @param {jQuery} $elem
152
+ * @returns {Number}
153
+ */
154
+ function getAnimationDuration($elem) {
155
+ if (
156
+ IS_ANIMATION &&
157
+ $elem.css('animation-name') === 'none' &&
158
+ $elem.css('-webkit-animation-name') === 'none' &&
159
+ $elem.css('-moz-animation-name') === 'none' &&
160
+ $elem.css('-o-animation-name') === 'none' &&
161
+ $elem.css('-ms-animation-name') === 'none'
162
+ ) {
163
+ return 0;
164
+ }
165
+
166
+ var duration = $elem.css('animation-duration') ||
167
+ $elem.css('-webkit-animation-duration') ||
168
+ $elem.css('-moz-animation-duration') ||
169
+ $elem.css('-o-animation-duration') ||
170
+ $elem.css('-ms-animation-duration') ||
171
+ '0s';
172
+
173
+ var delay = $elem.css('animation-delay') ||
174
+ $elem.css('-webkit-animation-delay') ||
175
+ $elem.css('-moz-animation-delay') ||
176
+ $elem.css('-o-animation-delay') ||
177
+ $elem.css('-ms-animation-delay') ||
178
+ '0s';
179
+
180
+ var iterationCount = $elem.css('animation-iteration-count') ||
181
+ $elem.css('-webkit-animation-iteration-count') ||
182
+ $elem.css('-moz-animation-iteration-count') ||
183
+ $elem.css('-o-animation-iteration-count') ||
184
+ $elem.css('-ms-animation-iteration-count') ||
185
+ '1';
186
+
187
+ var max;
188
+ var len;
189
+ var num;
190
+ var i;
191
+
192
+ duration = duration.split(', ');
193
+ delay = delay.split(', ');
194
+ iterationCount = iterationCount.split(', ');
195
+
196
+ // The 'duration' size is the same as the 'delay' size
197
+ for (i = 0, len = duration.length, max = Number.NEGATIVE_INFINITY; i < len; i++) {
198
+ num = parseFloat(duration[i]) * parseInt(iterationCount[i], 10) + parseFloat(delay[i]);
199
+
200
+ if (num > max) {
201
+ max = num;
202
+ }
203
+ }
204
+
205
+ return max;
206
+ }
207
+
208
+ /**
209
+ * Returns a scrollbar width
210
+ * @private
211
+ * @returns {Number}
212
+ */
213
+ function getScrollbarWidth() {
214
+ if ($(document).height() <= $(window).height()) {
215
+ return 0;
216
+ }
217
+
218
+ var outer = document.createElement('div');
219
+ var inner = document.createElement('div');
220
+ var widthNoScroll;
221
+ var widthWithScroll;
222
+
223
+ outer.style.visibility = 'hidden';
224
+ outer.style.width = '100px';
225
+ document.body.appendChild(outer);
226
+
227
+ widthNoScroll = outer.offsetWidth;
228
+
229
+ // Force scrollbars
230
+ outer.style.overflow = 'scroll';
231
+
232
+ // Add inner div
233
+ inner.style.width = '100%';
234
+ outer.appendChild(inner);
235
+
236
+ widthWithScroll = inner.offsetWidth;
237
+
238
+ // Remove divs
239
+ outer.parentNode.removeChild(outer);
240
+
241
+ return widthNoScroll - widthWithScroll;
242
+ }
243
+
244
+ /**
245
+ * Locks the screen
246
+ * @private
247
+ */
248
+ function lockScreen() {
249
+ if (IS_IOS) {
250
+ return;
251
+ }
252
+
253
+ var $html = $('html');
254
+ var lockedClass = namespacify('is-locked');
255
+ var paddingRight;
256
+ var $body;
257
+
258
+ if (!$html.hasClass(lockedClass)) {
259
+ $body = $(document.body);
260
+
261
+ // Zepto does not support '-=', '+=' in the `css` method
262
+ paddingRight = parseInt($body.css('padding-right'), 10) + getScrollbarWidth();
263
+
264
+ $body.css('padding-right', paddingRight + 'px');
265
+ $html.addClass(lockedClass);
266
+ }
267
+ }
268
+
269
+ /**
270
+ * Unlocks the screen
271
+ * @private
272
+ */
273
+ function unlockScreen() {
274
+ if (IS_IOS) {
275
+ return;
276
+ }
277
+
278
+ var $html = $('html');
279
+ var lockedClass = namespacify('is-locked');
280
+ var paddingRight;
281
+ var $body;
282
+
283
+ if ($html.hasClass(lockedClass)) {
284
+ $body = $(document.body);
285
+
286
+ // Zepto does not support '-=', '+=' in the `css` method
287
+ paddingRight = parseInt($body.css('padding-right'), 10) - getScrollbarWidth();
288
+
289
+ $body.css('padding-right', paddingRight + 'px');
290
+ $html.removeClass(lockedClass);
291
+ }
292
+ }
293
+
294
+ /**
295
+ * Sets a state for an instance
296
+ * @private
297
+ * @param {Remodal} instance
298
+ * @param {STATES} state
299
+ * @param {Boolean} isSilent If true, Remodal does not trigger events
300
+ * @param {String} Reason of a state change.
301
+ */
302
+ function setState(instance, state, isSilent, reason) {
303
+
304
+ var newState = namespacify('is', state);
305
+ var allStates = [namespacify('is', STATES.CLOSING),
306
+ namespacify('is', STATES.OPENING),
307
+ namespacify('is', STATES.CLOSED),
308
+ namespacify('is', STATES.OPENED)].join(' ');
309
+
310
+ instance.$bg
311
+ .removeClass(allStates)
312
+ .addClass(newState);
313
+
314
+ instance.$overlay
315
+ .removeClass(allStates)
316
+ .addClass(newState);
317
+
318
+ instance.$wrapper
319
+ .removeClass(allStates)
320
+ .addClass(newState);
321
+
322
+ instance.$modal
323
+ .removeClass(allStates)
324
+ .addClass(newState);
325
+
326
+ instance.state = state;
327
+ !isSilent && instance.$modal.trigger({
328
+ type: state,
329
+ reason: reason
330
+ }, [{ reason: reason }]);
331
+ }
332
+
333
+ /**
334
+ * Synchronizes with the animation
335
+ * @param {Function} doBeforeAnimation
336
+ * @param {Function} doAfterAnimation
337
+ * @param {Remodal} instance
338
+ */
339
+ function syncWithAnimation(doBeforeAnimation, doAfterAnimation, instance) {
340
+ var runningAnimationsCount = 0;
341
+
342
+ var handleAnimationStart = function(e) {
343
+ if (e.target !== this) {
344
+ return;
345
+ }
346
+
347
+ runningAnimationsCount++;
348
+ };
349
+
350
+ var handleAnimationEnd = function(e) {
351
+ if (e.target !== this) {
352
+ return;
353
+ }
354
+
355
+ if (--runningAnimationsCount === 0) {
356
+
357
+ // Remove event listeners
358
+ $.each(['$bg', '$overlay', '$wrapper', '$modal'], function(index, elemName) {
359
+ instance[elemName].off(ANIMATIONSTART_EVENTS + ' ' + ANIMATIONEND_EVENTS);
360
+ });
361
+
362
+ doAfterAnimation();
363
+ }
364
+ };
365
+
366
+ $.each(['$bg', '$overlay', '$wrapper', '$modal'], function(index, elemName) {
367
+ instance[elemName]
368
+ .on(ANIMATIONSTART_EVENTS, handleAnimationStart)
369
+ .on(ANIMATIONEND_EVENTS, handleAnimationEnd);
370
+ });
371
+
372
+ doBeforeAnimation();
373
+
374
+ // If the animation is not supported by a browser or its duration is 0
375
+ if (
376
+ getAnimationDuration(instance.$bg) === 0 &&
377
+ getAnimationDuration(instance.$overlay) === 0 &&
378
+ getAnimationDuration(instance.$wrapper) === 0 &&
379
+ getAnimationDuration(instance.$modal) === 0
380
+ ) {
381
+
382
+ // Remove event listeners
383
+ $.each(['$bg', '$overlay', '$wrapper', '$modal'], function(index, elemName) {
384
+ instance[elemName].off(ANIMATIONSTART_EVENTS + ' ' + ANIMATIONEND_EVENTS);
385
+ });
386
+
387
+ doAfterAnimation();
388
+ }
389
+ }
390
+
391
+ /**
392
+ * Closes immediately
393
+ * @private
394
+ * @param {Remodal} instance
395
+ */
396
+ function halt(instance) {
397
+ if (instance.state === STATES.CLOSED) {
398
+ return;
399
+ }
400
+
401
+ $.each(['$bg', '$overlay', '$wrapper', '$modal'], function(index, elemName) {
402
+ instance[elemName].off(ANIMATIONSTART_EVENTS + ' ' + ANIMATIONEND_EVENTS);
403
+ });
404
+
405
+ instance.$bg.removeClass(instance.settings.modifier);
406
+ instance.$overlay.removeClass(instance.settings.modifier).hide();
407
+ instance.$wrapper.hide();
408
+ unlockScreen();
409
+ setState(instance, STATES.CLOSED, true);
410
+ }
411
+
412
+ /**
413
+ * Parses a string with options
414
+ * @private
415
+ * @param str
416
+ * @returns {Object}
417
+ */
418
+ function parseOptions(str) {
419
+ var obj = {};
420
+ var arr;
421
+ var len;
422
+ var val;
423
+ var i;
424
+
425
+ // Remove spaces before and after delimiters
426
+ str = str.replace(/\s*:\s*/g, ':').replace(/\s*,\s*/g, ',');
427
+
428
+ // Parse a string
429
+ arr = str.split(',');
430
+ for (i = 0, len = arr.length; i < len; i++) {
431
+ arr[i] = arr[i].split(':');
432
+ val = arr[i][1];
433
+
434
+ // Convert a string value if it is like a boolean
435
+ if (typeof val === 'string' || val instanceof String) {
436
+ val = val === 'true' || (val === 'false' ? false : val);
437
+ }
438
+
439
+ // Convert a string value if it is like a number
440
+ if (typeof val === 'string' || val instanceof String) {
441
+ val = !isNaN(val) ? +val : val;
442
+ }
443
+
444
+ obj[arr[i][0]] = val;
445
+ }
446
+
447
+ return obj;
448
+ }
449
+
450
+ /**
451
+ * Generates a string separated by dashes and prefixed with NAMESPACE
452
+ * @private
453
+ * @param {...String}
454
+ * @returns {String}
455
+ */
456
+ function namespacify() {
457
+ var result = NAMESPACE;
458
+
459
+ for (var i = 0; i < arguments.length; ++i) {
460
+ result += '-' + arguments[i];
461
+ }
462
+
463
+ return result;
464
+ }
465
+
466
+ /**
467
+ * Handles the hashchange event
468
+ * @private
469
+ * @listens hashchange
470
+ */
471
+ function handleHashChangeEvent() {
472
+ var id = location.hash.replace('#', '');
473
+ var instance;
474
+ var $elem;
475
+
476
+ if (!id) {
477
+
478
+ // Check if we have currently opened modal and animation was completed
479
+ if (current && current.state === STATES.OPENED && current.settings.hashTracking) {
480
+ current.close();
481
+ }
482
+ } else {
483
+
484
+ // Catch syntax error if your hash is bad
485
+ try {
486
+ $elem = $(
487
+ '[data-' + PLUGIN_NAME + '-id="' + id + '"]'
488
+ );
489
+ } catch (err) {}
490
+
491
+ if ($elem && $elem.length) {
492
+ instance = $[PLUGIN_NAME].lookup[$elem.data(PLUGIN_NAME)];
493
+
494
+ if (instance && instance.settings.hashTracking) {
495
+ instance.open();
496
+ }
497
+ }
498
+
499
+ }
500
+ }
501
+
502
+ /**
503
+ * Remodal constructor
504
+ * @constructor
505
+ * @param {jQuery} $modal
506
+ * @param {Object} options
507
+ */
508
+ function Remodal($modal, options) {
509
+ var $body = $(document.body);
510
+ var $appendTo = $body;
511
+ var remodal = this;
512
+
513
+ remodal.settings = $.extend({}, DEFAULTS, options);
514
+ remodal.index = $[PLUGIN_NAME].lookup.push(remodal) - 1;
515
+ remodal.state = STATES.CLOSED;
516
+
517
+ remodal.$overlay = $('.' + namespacify('overlay'));
518
+
519
+ if (remodal.settings.appendTo !== null && remodal.settings.appendTo.length) {
520
+ $appendTo = $(remodal.settings.appendTo);
521
+ }
522
+
523
+ if (!remodal.$overlay.length) {
524
+ remodal.$overlay = $('<div>').addClass(namespacify('overlay') + ' ' + namespacify('is', STATES.CLOSED)).hide();
525
+ $appendTo.append(remodal.$overlay);
526
+ }
527
+
528
+ remodal.$bg = $('.' + namespacify('bg')).addClass(namespacify('is', STATES.CLOSED));
529
+
530
+ remodal.$modal = $modal
531
+ .addClass(
532
+ NAMESPACE + ' ' +
533
+ namespacify('is-initialized') + ' ' +
534
+ remodal.settings.modifier + ' ' +
535
+ namespacify('is', STATES.CLOSED))
536
+ .attr('tabindex', '-1');
537
+
538
+ remodal.$wrapper = $('<div>')
539
+ .addClass(
540
+ namespacify('wrapper') + ' ' +
541
+ remodal.settings.modifier + ' ' +
542
+ namespacify('is', STATES.CLOSED))
543
+ .hide()
544
+ .append(remodal.$modal);
545
+ $appendTo.append(remodal.$wrapper);
546
+
547
+ // Add the event listener for the close button
548
+ remodal.$wrapper.on('click.' + NAMESPACE, '[data-' + PLUGIN_NAME + '-action="close"]', function(e) {
549
+ e.preventDefault();
550
+
551
+ remodal.close();
552
+ });
553
+
554
+ // Add the event listener for the cancel button
555
+ remodal.$wrapper.on('click.' + NAMESPACE, '[data-' + PLUGIN_NAME + '-action="cancel"]', function(e) {
556
+ e.preventDefault();
557
+
558
+ remodal.$modal.trigger(STATE_CHANGE_REASONS.CANCELLATION);
559
+
560
+ if (remodal.settings.closeOnCancel) {
561
+ remodal.close(STATE_CHANGE_REASONS.CANCELLATION);
562
+ }
563
+ });
564
+
565
+ // Add the event listener for the confirm button
566
+ remodal.$wrapper.on('click.' + NAMESPACE, '[data-' + PLUGIN_NAME + '-action="confirm"]', function(e) {
567
+ e.preventDefault();
568
+
569
+ remodal.$modal.trigger(STATE_CHANGE_REASONS.CONFIRMATION);
570
+
571
+ if (remodal.settings.closeOnConfirm) {
572
+ remodal.close(STATE_CHANGE_REASONS.CONFIRMATION);
573
+ }
574
+ });
575
+
576
+ // Add the event listener for the overlay
577
+ remodal.$wrapper.on('click.' + NAMESPACE, function(e) {
578
+ var $target = $(e.target);
579
+
580
+ if (!$target.hasClass(namespacify('wrapper'))) {
581
+ return;
582
+ }
583
+
584
+ if (remodal.settings.closeOnOutsideClick) {
585
+ remodal.close();
586
+ }
587
+ });
588
+ }
589
+
590
+ /**
591
+ * Opens a modal window
592
+ * @public
593
+ */
594
+ Remodal.prototype.open = function() {
595
+ var remodal = this;
596
+ var id;
597
+
598
+ // Check if the animation was completed
599
+ if (remodal.state === STATES.OPENING || remodal.state === STATES.CLOSING) {
600
+ return;
601
+ }
602
+
603
+ id = remodal.$modal.attr('data-' + PLUGIN_NAME + '-id');
604
+
605
+ if (id && remodal.settings.hashTracking) {
606
+ scrollTop = $(window).scrollTop();
607
+ location.hash = id;
608
+ }
609
+
610
+ if (current && current !== remodal) {
611
+ halt(current);
612
+ }
613
+
614
+ current = remodal;
615
+ lockScreen();
616
+ remodal.$bg.addClass(remodal.settings.modifier);
617
+ remodal.$overlay.addClass(remodal.settings.modifier).show();
618
+ remodal.$wrapper.show().scrollTop(0);
619
+ remodal.$modal.focus();
620
+
621
+ syncWithAnimation(
622
+ function() {
623
+ setState(remodal, STATES.OPENING);
624
+ },
625
+
626
+ function() {
627
+ setState(remodal, STATES.OPENED);
628
+ },
629
+
630
+ remodal);
631
+ };
632
+
633
+ /**
634
+ * Closes a modal window
635
+ * @public
636
+ * @param {String} reason
637
+ */
638
+ Remodal.prototype.close = function(reason) {
639
+ var remodal = this;
640
+
641
+ // Check if the animation was completed
642
+ if (remodal.state === STATES.OPENING || remodal.state === STATES.CLOSING || remodal.state === STATES.CLOSED) {
643
+ return;
644
+ }
645
+
646
+ if (
647
+ remodal.settings.hashTracking &&
648
+ remodal.$modal.attr('data-' + PLUGIN_NAME + '-id') === location.hash.substr(1)
649
+ ) {
650
+ location.hash = '';
651
+ $(window).scrollTop(scrollTop);
652
+ }
653
+
654
+ syncWithAnimation(
655
+ function() {
656
+ setState(remodal, STATES.CLOSING, false, reason);
657
+ },
658
+
659
+ function() {
660
+ remodal.$bg.removeClass(remodal.settings.modifier);
661
+ remodal.$overlay.removeClass(remodal.settings.modifier).hide();
662
+ remodal.$wrapper.hide();
663
+ unlockScreen();
664
+
665
+ setState(remodal, STATES.CLOSED, false, reason);
666
+ },
667
+
668
+ remodal);
669
+ };
670
+
671
+ /**
672
+ * Returns a current state of a modal
673
+ * @public
674
+ * @returns {STATES}
675
+ */
676
+ Remodal.prototype.getState = function() {
677
+ return this.state;
678
+ };
679
+
680
+ /**
681
+ * Destroys a modal
682
+ * @public
683
+ */
684
+ Remodal.prototype.destroy = function() {
685
+ var lookup = $[PLUGIN_NAME].lookup;
686
+ var instanceCount;
687
+
688
+ halt(this);
689
+ this.$wrapper.remove();
690
+
691
+ delete lookup[this.index];
692
+ instanceCount = $.grep(lookup, function(instance) {
693
+ return !!instance;
694
+ }).length;
695
+
696
+ if (instanceCount === 0) {
697
+ this.$overlay.remove();
698
+ this.$bg.removeClass(
699
+ namespacify('is', STATES.CLOSING) + ' ' +
700
+ namespacify('is', STATES.OPENING) + ' ' +
701
+ namespacify('is', STATES.CLOSED) + ' ' +
702
+ namespacify('is', STATES.OPENED));
703
+ }
704
+ };
705
+
706
+ /**
707
+ * Special plugin object for instances
708
+ * @public
709
+ * @type {Object}
710
+ */
711
+ $[PLUGIN_NAME] = {
712
+ lookup: []
713
+ };
714
+
715
+ /**
716
+ * Plugin constructor
717
+ * @constructor
718
+ * @param {Object} options
719
+ * @returns {JQuery}
720
+ */
721
+ $.fn[PLUGIN_NAME] = function(opts) {
722
+ var instance;
723
+ var $elem;
724
+
725
+ this.each(function(index, elem) {
726
+ $elem = $(elem);
727
+
728
+ if ($elem.data(PLUGIN_NAME) == null) {
729
+ instance = new Remodal($elem, opts);
730
+ $elem.data(PLUGIN_NAME, instance.index);
731
+
732
+ if (
733
+ instance.settings.hashTracking &&
734
+ $elem.attr('data-' + PLUGIN_NAME + '-id') === location.hash.substr(1)
735
+ ) {
736
+ instance.open();
737
+ }
738
+ } else {
739
+ instance = $[PLUGIN_NAME].lookup[$elem.data(PLUGIN_NAME)];
740
+ }
741
+ });
742
+
743
+ return instance;
744
+ };
745
+
746
+ $(document).ready(function() {
747
+
748
+ // data-remodal-target opens a modal window with the special Id
749
+ $(document).on('click', '[data-' + PLUGIN_NAME + '-target]', function(e) {
750
+ e.preventDefault();
751
+
752
+ var elem = e.currentTarget;
753
+ var id = elem.getAttribute('data-' + PLUGIN_NAME + '-target');
754
+ var $target = $('[data-' + PLUGIN_NAME + '-id="' + id + '"]');
755
+
756
+ $[PLUGIN_NAME].lookup[$target.data(PLUGIN_NAME)].open();
757
+ });
758
+
759
+ // Auto initialization of modal windows
760
+ // They should have the 'remodal' class attribute
761
+ // Also you can write the `data-remodal-options` attribute to pass params into the modal
762
+ $(document).find('.' + NAMESPACE).each(function(i, container) {
763
+ var $container = $(container);
764
+ var options = $container.data(PLUGIN_NAME + '-options');
765
+
766
+ if (!options) {
767
+ options = {};
768
+ } else if (typeof options === 'string' || options instanceof String) {
769
+ options = parseOptions(options);
770
+ }
771
+
772
+ $container[PLUGIN_NAME](options);
773
+ });
774
+
775
+ // Handles the keydown event
776
+ $(document).on('keydown.' + NAMESPACE, function(e) {
777
+ if (current && current.settings.closeOnEscape && current.state === STATES.OPENED && e.keyCode === 27) {
778
+ current.close();
779
+ }
780
+ });
781
+
782
+ // Handles the hashchange event
783
+ $(window).on('hashchange.' + NAMESPACE, handleHashChangeEvent);
784
+ });
785
+ });
components/facebook/assets/js/libs/remodal.min.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Remodal - v1.1.1
3
+ * Responsive, lightweight, fast, synchronized with CSS animations, fully customizable modal window plugin with declarative configuration and hash tracking.
4
+ * http://vodkabears.github.io/remodal/
5
+ *
6
+ * Made by Ilya Makarov
7
+ * Under MIT License
8
+ */
9
+
10
+ !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return b(a,c)}):"object"==typeof exports?b(a,require("jquery")):b(a,a.jQuery||a.Zepto)}(this,function(a,b){"use strict";function c(a){if(w&&"none"===a.css("animation-name")&&"none"===a.css("-webkit-animation-name")&&"none"===a.css("-moz-animation-name")&&"none"===a.css("-o-animation-name")&&"none"===a.css("-ms-animation-name"))return 0;var b,c,d,e,f=a.css("animation-duration")||a.css("-webkit-animation-duration")||a.css("-moz-animation-duration")||a.css("-o-animation-duration")||a.css("-ms-animation-duration")||"0s",g=a.css("animation-delay")||a.css("-webkit-animation-delay")||a.css("-moz-animation-delay")||a.css("-o-animation-delay")||a.css("-ms-animation-delay")||"0s",h=a.css("animation-iteration-count")||a.css("-webkit-animation-iteration-count")||a.css("-moz-animation-iteration-count")||a.css("-o-animation-iteration-count")||a.css("-ms-animation-iteration-count")||"1";for(f=f.split(", "),g=g.split(", "),h=h.split(", "),e=0,c=f.length,b=Number.NEGATIVE_INFINITY;e<c;e++)d=parseFloat(f[e])*parseInt(h[e],10)+parseFloat(g[e]),d>b&&(b=d);return b}function d(){if(b(document).height()<=b(window).height())return 0;var a,c,d=document.createElement("div"),e=document.createElement("div");return d.style.visibility="hidden",d.style.width="100px",document.body.appendChild(d),a=d.offsetWidth,d.style.overflow="scroll",e.style.width="100%",d.appendChild(e),c=e.offsetWidth,d.parentNode.removeChild(d),a-c}function e(){if(!x){var a,c,e=b("html"),f=k("is-locked");e.hasClass(f)||(c=b(document.body),a=parseInt(c.css("padding-right"),10)+d(),c.css("padding-right",a+"px"),e.addClass(f))}}function f(){if(!x){var a,c,e=b("html"),f=k("is-locked");e.hasClass(f)&&(c=b(document.body),a=parseInt(c.css("padding-right"),10)-d(),c.css("padding-right",a+"px"),e.removeClass(f))}}function g(a,b,c,d){var e=k("is",b),f=[k("is",u.CLOSING),k("is",u.OPENING),k("is",u.CLOSED),k("is",u.OPENED)].join(" ");a.$bg.removeClass(f).addClass(e),a.$overlay.removeClass(f).addClass(e),a.$wrapper.removeClass(f).addClass(e),a.$modal.removeClass(f).addClass(e),a.state=b,!c&&a.$modal.trigger({type:b,reason:d},[{reason:d}])}function h(a,d,e){var f=0,g=function(a){a.target===this&&f++},h=function(a){a.target===this&&0===--f&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].off(r+" "+s)}),d())};b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].on(r,g).on(s,h)}),a(),0===c(e.$bg)&&0===c(e.$overlay)&&0===c(e.$wrapper)&&0===c(e.$modal)&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].off(r+" "+s)}),d())}function i(a){a.state!==u.CLOSED&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(b,c){a[c].off(r+" "+s)}),a.$bg.removeClass(a.settings.modifier),a.$overlay.removeClass(a.settings.modifier).hide(),a.$wrapper.hide(),f(),g(a,u.CLOSED,!0))}function j(a){var b,c,d,e,f={};for(a=a.replace(/\s*:\s*/g,":").replace(/\s*,\s*/g,","),b=a.split(","),e=0,c=b.length;e<c;e++)b[e]=b[e].split(":"),d=b[e][1],("string"==typeof d||d instanceof String)&&(d="true"===d||"false"!==d&&d),("string"==typeof d||d instanceof String)&&(d=isNaN(d)?d:+d),f[b[e][0]]=d;return f}function k(){for(var a=q,b=0;b<arguments.length;++b)a+="-"+arguments[b];return a}function l(){var a,c,d=location.hash.replace("#","");if(d){try{c=b('[data-remodal-id="'+d+'"]')}catch(e){}c&&c.length&&(a=b[p].lookup[c.data(p)],a&&a.settings.hashTracking&&a.open())}else n&&n.state===u.OPENED&&n.settings.hashTracking&&n.close()}function m(a,c){var d=b(document.body),e=d,f=this;f.settings=b.extend({},t,c),f.index=b[p].lookup.push(f)-1,f.state=u.CLOSED,f.$overlay=b("."+k("overlay")),null!==f.settings.appendTo&&f.settings.appendTo.length&&(e=b(f.settings.appendTo)),f.$overlay.length||(f.$overlay=b("<div>").addClass(k("overlay")+" "+k("is",u.CLOSED)).hide(),e.append(f.$overlay)),f.$bg=b("."+k("bg")).addClass(k("is",u.CLOSED)),f.$modal=a.addClass(q+" "+k("is-initialized")+" "+f.settings.modifier+" "+k("is",u.CLOSED)).attr("tabindex","-1"),f.$wrapper=b("<div>").addClass(k("wrapper")+" "+f.settings.modifier+" "+k("is",u.CLOSED)).hide().append(f.$modal),e.append(f.$wrapper),f.$wrapper.on("click."+q,'[data-remodal-action="close"]',function(a){a.preventDefault(),f.close()}),f.$wrapper.on("click."+q,'[data-remodal-action="cancel"]',function(a){a.preventDefault(),f.$modal.trigger(v.CANCELLATION),f.settings.closeOnCancel&&f.close(v.CANCELLATION)}),f.$wrapper.on("click."+q,'[data-remodal-action="confirm"]',function(a){a.preventDefault(),f.$modal.trigger(v.CONFIRMATION),f.settings.closeOnConfirm&&f.close(v.CONFIRMATION)}),f.$wrapper.on("click."+q,function(a){var c=b(a.target);c.hasClass(k("wrapper"))&&f.settings.closeOnOutsideClick&&f.close()})}var n,o,p="remodal",q=a.REMODAL_GLOBALS&&a.REMODAL_GLOBALS.NAMESPACE||p,r=b.map(["animationstart","webkitAnimationStart","MSAnimationStart","oAnimationStart"],function(a){return a+"."+q}).join(" "),s=b.map(["animationend","webkitAnimationEnd","MSAnimationEnd","oAnimationEnd"],function(a){return a+"."+q}).join(" "),t=b.extend({hashTracking:!0,closeOnConfirm:!0,closeOnCancel:!0,closeOnEscape:!0,closeOnOutsideClick:!0,modifier:"",appendTo:null},a.REMODAL_GLOBALS&&a.REMODAL_GLOBALS.DEFAULTS),u={CLOSING:"closing",CLOSED:"closed",OPENING:"opening",OPENED:"opened"},v={CONFIRMATION:"confirmation",CANCELLATION:"cancellation"},w=function(){var a=document.createElement("div").style;return void 0!==a.animationName||void 0!==a.WebkitAnimationName||void 0!==a.MozAnimationName||void 0!==a.msAnimationName||void 0!==a.OAnimationName}(),x=/iPad|iPhone|iPod/.test(navigator.platform);m.prototype.open=function(){var a,c=this;c.state!==u.OPENING&&c.state!==u.CLOSING&&(a=c.$modal.attr("data-remodal-id"),a&&c.settings.hashTracking&&(o=b(window).scrollTop(),location.hash=a),n&&n!==c&&i(n),n=c,e(),c.$bg.addClass(c.settings.modifier),c.$overlay.addClass(c.settings.modifier).show(),c.$wrapper.show().scrollTop(0),c.$modal.focus(),h(function(){g(c,u.OPENING)},function(){g(c,u.OPENED)},c))},m.prototype.close=function(a){var c=this;c.state!==u.OPENING&&c.state!==u.CLOSING&&c.state!==u.CLOSED&&(c.settings.hashTracking&&c.$modal.attr("data-remodal-id")===location.hash.substr(1)&&(location.hash="",b(window).scrollTop(o)),h(function(){g(c,u.CLOSING,!1,a)},function(){c.$bg.removeClass(c.settings.modifier),c.$overlay.removeClass(c.settings.modifier).hide(),c.$wrapper.hide(),f(),g(c,u.CLOSED,!1,a)},c))},m.prototype.getState=function(){return this.state},m.prototype.destroy=function(){var a,c=b[p].lookup;i(this),this.$wrapper.remove(),delete c[this.index],a=b.grep(c,function(a){return!!a}).length,0===a&&(this.$overlay.remove(),this.$bg.removeClass(k("is",u.CLOSING)+" "+k("is",u.OPENING)+" "+k("is",u.CLOSED)+" "+k("is",u.OPENED)))},b[p]={lookup:[]},b.fn[p]=function(a){var c,d;return this.each(function(e,f){d=b(f),null==d.data(p)?(c=new m(d,a),d.data(p,c.index),c.settings.hashTracking&&d.attr("data-remodal-id")===location.hash.substr(1)&&c.open()):c=b[p].lookup[d.data(p)]}),c},b(document).ready(function(){b(document).on("click","[data-remodal-target]",function(a){a.preventDefault();var c=a.currentTarget,d=c.getAttribute("data-remodal-target"),e=b('[data-remodal-id="'+d+'"]');b[p].lookup[e.data(p)].open()}),b(document).find("."+q).each(function(a,c){var d=b(c),e=d.data("remodal-options");e?("string"==typeof e||e instanceof String)&&(e=j(e)):e={},d[p](e)}),b(document).on("keydown."+q,function(a){n&&n.settings.closeOnEscape&&n.state===u.OPENED&&27===a.keyCode&&n.close()}),b(window).on("hashchange."+q,l)})});
components/facebook/assets/js/remodal-view.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ jQuery( document ).ready(function($) {
2
+
3
+ });
4
+
components/facebook/assets/js/socialstory-view.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ let playlist = []
3
+ stories_data.stories.forEach(function (story){
4
+ let obj = {};
5
+ obj.title = stories_data.account.username;
6
+ obj.date = timeDifference(Date.now(), new Date(story.timestamp).getTime());
7
+ obj.url = story.media_url
8
+ obj.icon = stories_data.account.profile_picture_url
9
+ playlist.push(obj)
10
+ });
11
+
12
+ var socialStory = new Story({
13
+ playlist: playlist
14
+ });
15
+
16
+ function timeDifference(current, previous) {
17
+ var msPerMinute = 60 * 1000;
18
+ var msPerHour = msPerMinute * 60;
19
+ var msPerDay = msPerHour * 24;
20
+ var msPerMonth = msPerDay * 30;
21
+ var msPerYear = msPerDay * 365;
22
+
23
+ var elapsed = current - previous;
24
+
25
+ if (elapsed < msPerMinute) {
26
+ return Math.round(elapsed/1000) + ' seconds ago';
27
+ }
28
+
29
+ else if (elapsed < msPerHour) {
30
+ return Math.round(elapsed/msPerMinute) + ' minutes ago';
31
+ }
32
+
33
+ else if (elapsed < msPerDay ) {
34
+ return Math.round(elapsed/msPerHour ) + ' hours ago';
35
+ }
36
+
37
+ else if (elapsed < msPerMonth) {
38
+ return 'approximately ' + Math.round(elapsed/msPerDay) + ' days ago';
39
+ }
40
+
41
+ else if (elapsed < msPerYear) {
42
+ return 'approximately ' + Math.round(elapsed/msPerMonth) + ' months ago';
43
+ }
44
+
45
+ else {
46
+ return 'approximately ' + Math.round(elapsed/msPerYear ) + ' years ago';
47
+ }
48
+ }
components/facebook/assets/js/socialstory.js ADDED
@@ -0,0 +1,258 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ SocialStory.JS
3
+ Copyright (c) 2018 TK Dewjee / iamtk
4
+ */
5
+
6
+ (function() {
7
+
8
+ // Declare plugin's variables
9
+ var defaults;
10
+ var video;
11
+ var thisTimeline;
12
+ var start = 0;
13
+ var storyTime;
14
+ var storySpinner;
15
+ var percentage = 0;
16
+
17
+ this.Story = function() {
18
+
19
+ // Default parameters if non provided.
20
+ defaults = {
21
+ playlist: null
22
+ };
23
+
24
+ if (arguments[0] && typeof arguments[0] === "object") {
25
+ this.options = extendDefaults(defaults, arguments[0]);
26
+ }
27
+
28
+ try {
29
+ if (defaults.playlist == null || defaults.playlist == '') {
30
+ console.log('[SocialStories] No playlist provided.');
31
+ return false;
32
+ }
33
+ } catch (e) {
34
+ console.log(e);
35
+ return false;
36
+ }
37
+
38
+ var Div = document.getElementById('storytime');
39
+
40
+ // HTML for story popup to be added to page
41
+ var baseHTML = '<div class="storytime" style="opacity: 0; display: none;">' +
42
+ '<div class="story-cover"></div>' +
43
+ '<div class="story-window">' +
44
+ '<a href="#" class="story-arrow left" onclick="socialStory.prev();"></a><a href="#" class="story-arrow right" onclick="socialStory.next();"></a>' +
45
+ '<div class="story-nav">' +
46
+ '<div class="story-nav-left"><img class="story-icon" src="" /> <span class="story-text"></span><span class="story-date"></span></div><div class="story-nav-right"><a href="#" class="close story-close" onclick="socialStory.close();"></a></div>' +
47
+ '</div>' +
48
+ '<div class="story-timeline"></div>' +
49
+ '<div class="story-video" onclick="socialStory.next();">' +
50
+ '<video class="story-next" src="" playsinline></video>' +
51
+ '</div>' +
52
+ '<div class="spinner">' +
53
+ '<div class="bounce1"></div>' +
54
+ '<div class="bounce2"></div>' +
55
+ '<div class="bounce3"></div>' +
56
+ '</div>' +
57
+ '</div>' +
58
+ '</div>';
59
+
60
+ var timelineHTML = '';
61
+
62
+ // Add HTML to storytime div element
63
+ Div.innerHTML = baseHTML;
64
+
65
+ // Create timeline elements by looping thorugh story items
66
+ var i;
67
+ for (i = 0; i < defaults.playlist.length; i++) {
68
+ timelineHTML = timelineHTML + '<div class="story-timeline-item"><div class="story-timeline-line"></div><div class="story-timeline-line-active story-active-' + i + '" style="width: 0%;"></div></div>';
69
+ }
70
+
71
+ // Add timeline HTML to storytime div element
72
+ var storyTimeline = document.getElementsByClassName('story-timeline')[0];
73
+ storyTimeline.innerHTML = timelineHTML;
74
+ };
75
+
76
+ // Utility method to extend defaults with user options
77
+ function extendDefaults(source, properties) {
78
+ var property;
79
+ for (property in properties) {
80
+ if (properties.hasOwnProperty(property)) {
81
+ source[property] = properties[property];
82
+ }
83
+ }
84
+ return source;
85
+ }
86
+
87
+ function launch() {
88
+ // Get HTML elements
89
+ storyTime = document.getElementsByClassName('storytime')[0];
90
+ storySpinner = document.getElementsByClassName('spinner')[0];
91
+ thisTimeline = document.getElementsByClassName('story-active-' + start)[0];
92
+ var icon = document.getElementsByClassName('story-icon')[0];
93
+ var text = document.getElementsByClassName('story-text')[0];
94
+ var date = document.getElementsByClassName('story-date')[0];
95
+ video = document.getElementsByTagName("video")[0];
96
+ let is_video = !!defaults.playlist[start].url.startsWith("https://video.cdninstagram.com");
97
+ percentage = 0
98
+
99
+
100
+ // Show the Social Story Pop-up
101
+ if (start == 0) {
102
+ storyTime.setAttribute("style", "display: block; opacity: 0;");
103
+ } else {
104
+ storyTime.setAttribute("style", "display: block; opacity: 1;");
105
+ }
106
+
107
+ // Set CSS loading spinner to display: block (i.e. show it)
108
+ storySpinner.style.display = 'block';
109
+ setTimeout(function() {
110
+ storyTime.setAttribute("style", "display: block; opacity: 1;");
111
+ }, 10);
112
+
113
+ // Load in the icon
114
+ icon.src = defaults.playlist[start].icon;
115
+
116
+ text.innerHTML = defaults.playlist[start].title;
117
+ date.innerHTML = defaults.playlist[start].date;
118
+
119
+ // Remove any previous videos
120
+ video.src = ' ';
121
+
122
+ if(!is_video){
123
+ video.poster = defaults.playlist[start].url;
124
+ thisTimeline.style.width = '0%';
125
+ storySpinner.style.display = 'none';
126
+ timeImgUpdate();
127
+ video.addEventListener('ended', videoEnded, false);
128
+
129
+ } else {
130
+ video.src = defaults.playlist[start].url;
131
+ video.load();
132
+ // When video can play, hide spinner
133
+ video.oncanplay = function() {
134
+ storySpinner.style.display = 'none';
135
+ video.play();
136
+ document.getElementsByClassName('story-video')[0].setAttribute("style", "min-width: " + video.offsetWidth + "px;");
137
+ video.muted = false;
138
+ };
139
+ // Set source for new video and load it into page
140
+ thisTimeline.style.width = '0%';
141
+ // Add event listener to track video progress and run function timeUpdate()
142
+ video.addEventListener('timeupdate', timeUpdate, false);
143
+ // Add event listerer to run function videoEnded() at end of video
144
+ video.addEventListener('ended', videoEnded, false);
145
+ }
146
+ }
147
+
148
+ function timeUpdate() {
149
+
150
+ var percentage = Math.ceil((100 / video.duration) * video.currentTime);
151
+ thisTimeline.style.width = percentage + '%';
152
+
153
+ }
154
+
155
+ function sleep(ms) {
156
+ return new Promise(resolve => setTimeout(resolve, ms));
157
+ }
158
+
159
+ function timeImgUpdate() {
160
+ setTimeout(async function name(){
161
+ thisTimeline.style.width = percentage + '%';
162
+ percentage++;
163
+ await sleep(50);
164
+ if (percentage < 100) {
165
+ name();
166
+ console.log("percentage")
167
+ } else {
168
+ next();
169
+ }
170
+ }, 100)
171
+ }
172
+
173
+ function videoEnded() {
174
+ // Remove all event listeners on video end so they don't get duplicated.
175
+ video.removeEventListener('timeupdate', timeUpdate);
176
+ video.removeEventListener('ended', videoEnded);
177
+ // Run next video
178
+ next();
179
+ }
180
+
181
+ function next() {
182
+ // Set previous video timeline to 100% complete
183
+ thisTimeline.style.width = '100%';
184
+ percentage = 99;
185
+ // Advance play count to next video
186
+ start++;
187
+ // If next video doesn't exist (i.e. the previous video was the last) then close the Social Story popup
188
+ if (start >= defaults.playlist.length) {
189
+ setTimeout(function() {
190
+ close();
191
+ return false;
192
+ }, 400);
193
+ } else {
194
+ // Otherwise run the next video
195
+ launch(start);
196
+ }
197
+ }
198
+
199
+ function prev() {
200
+ // If previous video was not first video set its timeline to 0%
201
+ percentage = 0
202
+ if (start != 0) {
203
+ thisTimeline.style.width = '0%';
204
+ }
205
+ // Subtract play count to previous video
206
+ start--;
207
+ // If next video doesn't exist (i.e. the previous video was the last) then close the Social Story popup
208
+ if (start < 0) {
209
+ start = 0;
210
+ return false;
211
+ } else {
212
+ // Otherwise run the previous video
213
+ launch(start);
214
+ }
215
+ }
216
+
217
+ function close() {
218
+ // Pause currently playing video
219
+ video.pause();
220
+ percentage = -99999;
221
+ // Hide Social Story popup
222
+ storyTime.setAttribute("style", "opacity: 0;");
223
+ // After 500ms set stoyrtime element to display:none and reset all video timelines to 0%
224
+ setTimeout(function() {
225
+ storyTime.setAttribute("style", "opacity: 0; display: none;");
226
+ var i;
227
+ for (i = 0; i < defaults.playlist.length; i++) {
228
+ document.getElementsByClassName('story-timeline-line-active')[i].setAttribute("style", "width: 0%;");
229
+ }
230
+ }, 500);
231
+ }
232
+
233
+ // Plugin functions that can be called from your webpages
234
+
235
+ // socialStory.launch()
236
+ Story.prototype.launch = function(num) {
237
+ // Launch Social Stories - if no number is passed with socialStory.launch() then choose the first story. As the stories are a javascript array the first story is 0
238
+ if(!num) { var num = 0;}
239
+ start = num;
240
+ launch();
241
+ };
242
+
243
+ // socialStory.next()
244
+ Story.prototype.next = function() {
245
+ next();
246
+ };
247
+
248
+ // socialStory.prev()
249
+ Story.prototype.prev = function() {
250
+ prev();
251
+ };
252
+
253
+ // socialStory.close()
254
+ Story.prototype.close = function() {
255
+ close();
256
+ };
257
+
258
+ }());
components/facebook/assets/js/wbfb_masonry_view.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function($) {
2
+ var $container = $('.wbfb_masonry_container');
3
+
4
+ $container.imagesLoaded(function() {
5
+ $container.masonry({
6
+ gutter: Number(5),
7
+ itemSelector: '.wbfb_masonry_post'
8
+ });
9
+ });
10
+ });
components/facebook/html_templates/accounts.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var array $args
4
+ * @var bool $is_premium
5
+ * @var string $authorize_url
6
+ * @var array $accounts
7
+ */
8
+
9
+ $social = $args['social'];
10
+ ?>
11
+ <div id="wis-add-account-button" class="">
12
+ <?php
13
+ if ( count( $accounts ) && ! $is_premium ) : ?>
14
+ <span class="wis-btn-facebook-account btn-instagram-account-disabled">
15
+ <?php _e( 'Add Account', 'instagram-slider-widget' ) ?></span>
16
+ <span class="instagram-account-pro"><?php echo sprintf( __( "More accounts in <a href='%s'>PRO version</a>", 'instagram-slider-widget' ), WIS_Plugin::app()->get_support()->get_pricing_url( true, "wis_settings" ) ); ?></span>
17
+ <?php else: ?>
18
+ <a class="wis-btn-facebook-account" target="_self" href="<?php echo $authorize_url; ?>"
19
+ title="Add Account">
20
+ <?php _e( 'Add Account', 'instagram-slider-widget' ) ?>
21
+ </a>
22
+ <span style="float: none; margin-top: 0;" class="spinner" id="wis-spinner"> </span>
23
+ <?php endif; ?>
24
+ </div>
25
+ <?php
26
+ if ( ! empty( $accounts ) ) :
27
+ ?>
28
+ <br>
29
+ <table class="widefat wis-table">
30
+ <thead>
31
+ <tr>
32
+ <th class="wis-profile-picture"><?php echo __( 'Image', 'instagram-slider-widget' ); ?></th>
33
+ <th class="wis-profile-id"><?php echo __( 'ID', 'instagram-slider-widget' ); ?></th>
34
+ <th class="wis-profile-name"><?php echo __( 'Name', 'instagram-slider-widget' ); ?></th>
35
+ <th class="wis-profile-token"><?php echo __( 'Token', 'instagram-slider-widget' ); ?></th>
36
+ <th class="wis-profile-actions"><?php echo __( 'Action', 'instagram-slider-widget' ); ?></th>
37
+ </tr>
38
+ </thead>
39
+ <tbody>
40
+ <?php
41
+ foreach ( $accounts as $key => $profile_info ) {
42
+ $delete_link = $this->getActionUrl( 'delete', [ 'social' => $social, 'account' => $key ] );
43
+ $image = $profile_info['avatar'];
44
+ $fullname = $profile_info['name'];
45
+ ?>
46
+ <tr>
47
+ <td class="wis-profile-picture">
48
+ <img src="<?php echo esc_url( $image ); ?>"
49
+ width="30" alt=""/>
50
+ </td>
51
+ <td class="wis-profile-id"><?php echo esc_attr( $profile_info['id'] ); ?></td>
52
+ <td class="wis-profile-name">
53
+ <a href="https://www.facebook.com/<?php echo esc_html( $profile_info['id'] ); ?>"><?php echo esc_html( $profile_info['name'] ); ?></a>
54
+ </td>
55
+ <td class="wis-profile-token">
56
+ <input id="<?php echo esc_attr( $profile_info['id'] ); ?>-facebook-access-token"
57
+ type="text"
58
+ value="<?php echo esc_attr( $profile_info['token'] ); ?>"
59
+ class="wis-text-token" readonly/>
60
+ </td>
61
+ <td class="wis-profile-actions">
62
+ <a href="<?php echo $delete_link; ?>" class="btn btn-danger wfb-delete-account">
63
+ <span class="dashicons dashicons-trash"></span><?php echo __( 'Delete', 'instagram-slider-widget' ); ?>
64
+ </a>
65
+ <span class="spinner"
66
+ id="wis-delete-spinner-<?php echo esc_attr( $profile_info['id'] ); ?>"></span>
67
+ </td>
68
+ </tr>
69
+ <?php
70
+ }
71
+ ?>
72
+ </tbody>
73
+ </table>
74
+ <?php wp_nonce_field( $this->plugin->getPrefix() . 'settings_form', $this->plugin->getPrefix() . 'nonce' ); ?>
75
+ <?php endif; ?>
components/facebook/html_templates/feeds.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var WIS_FeedsPage $this
4
+ * @var array $data
5
+ * @var array $feeds
6
+ * @var string $social
7
+ */
8
+ ?>
9
+ <div class="wisw-social-content">
10
+ <div class="wisw-container-row">
11
+ <a href="<?php echo $this->getActionUrl( 'add', [ 'social' => $social ] ); ?>"
12
+ class="button action wis-add-feed-button"><?php _e( 'Add feed', 'instagram-slider-widget' ); ?></a>
13
+ </div>
14
+
15
+ <div class="wisw-container-row">
16
+ <table class="widefat wis-table wis-personal-status">
17
+ <thead>
18
+ <tr>
19
+ <th class="wis-profile-name"><?php echo __( 'Name', 'instagram-slider-widget' ); ?></th>
20
+ <th class="wis-profile-shortcode"><label for="wis_facebook_shortcode"><?php echo __( 'Shortcode', 'instagram-slider-widget' ); ?></label></th>
21
+ <th class="wis-profile-actions"><?php echo __( 'Action', 'instagram-slider-widget' ); ?></th>
22
+ </tr>
23
+ </thead>
24
+ <tbody>
25
+ <?php
26
+ if ( count( $feeds ) ) :
27
+ foreach ( $feeds as $feed_id => $feed ) {
28
+ $edit_link = $this->getActionUrl( 'edit', [ 'social' => $social, 'feed' => $feed_id ] );
29
+ $delete_link = $this->getActionUrl( 'delete', [ 'social' => $social, 'feed' => $feed_id ] );
30
+ ?>
31
+ <tr>
32
+ <td class="wis-profile-name">
33
+ <a href="<?php echo $edit_link; ?>">
34
+ <?php echo $feed->title; ?>
35
+ </a>
36
+ </td>
37
+ <td class="wis-profile-shortcode">
38
+ <input id="wis_facebook_shortcode" onclick="this.setSelectionRange(0, this.value.length)" type="text" class="form-input wis-shortcode-input"
39
+ value="[cm_facebook_feed id=&quot;<?php echo $feed_id ?>&quot;]" readonly="readonly">
40
+ </td>
41
+ <td class="wis-profile-actions">
42
+ <a href="<?php echo $edit_link; ?>" class="btn btn-primary">
43
+ <span class="dashicons dashicons-edit"></span>
44
+ </a>
45
+ <a href="<?php echo $delete_link; ?>" class="btn btn-danger">
46
+ <span class="dashicons dashicons-trash"></span>
47
+ </a>
48
+ </td>
49
+ </tr>
50
+ <?php
51
+ }
52
+ ?>
53
+ <?php else: ?>
54
+ <tr>
55
+ <td class="wis-profile-nofeed" colspan="3"><?php echo __( 'No feeds', 'instagram-slider-widget' ); ?></td>
56
+ </tr>
57
+ <?php endif; ?>
58
+ </tbody>
59
+ </table>
60
+ </div>
61
+ </div>
components/facebook/html_templates/form-feed.php ADDED
@@ -0,0 +1,226 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* @var array $args */
3
+
4
+ $instance = $args['instance'];
5
+ $accounts = $args['accounts'];
6
+ $accounts_business = $args['accounts_business'];
7
+ $sliders = $args['sliders'];
8
+ $options_linkto = $args['options_linkto'];
9
+ $is_update = $args['is_update'];
10
+ $feed_id = $args['instance']['id'] ?? '';
11
+ ?>
12
+ <div class="wisw-social-content">
13
+ <h2>
14
+ <?php if ( $is_update ) {
15
+ _e( 'Edit feed', 'instagram-slider-widget' );
16
+ } else {
17
+ _e( 'Add feed', 'instagram-slider-widget' );
18
+ } ?>
19
+ </h2>
20
+ <form action="" method="post" name="wis-feed-add-form" id="wis-feed-add-form">
21
+ <div class="jr-container">
22
+ <div class="isw-common-settings">
23
+ <div class="wis-flex-content">
24
+ <div class="wis-flex-content-column">
25
+ <div class="form-group">
26
+ <label for="title" class="form-label"><?php _e( 'Title:', 'instagram-slider-widget' ); ?></label>
27
+ <input class="form-input" id="title"
28
+ name="title"
29
+ value="<?php echo $instance['title']; ?>"/>
30
+ </div>
31
+ <div class="form-group" id="wis-feed-account">
32
+ <?php
33
+ if ( count( $accounts ) ) {
34
+ ?>
35
+ <label class="form-label" for="account"><?php _e( 'Account', 'instagram-slider-widget' ); ?></label>
36
+ <select id="account" class="form-select" name="account">
37
+ <?php
38
+ foreach ( $accounts as $acc ) {
39
+ $selected = $instance['account'] == $acc['name'] ? "selected='selected'" : "";
40
+ echo "<option value='{$acc['name']}' {$selected}>{$acc['name']}</option>";
41
+ }
42
+ ?>
43
+ </select>
44
+ <?php
45
+ } else {
46
+ ?>
47
+ <label class="form-label"><?php _e( 'Account', 'instagram-slider-widget' ); ?></label>
48
+ <a href="<?php echo admin_url( 'admin.php?page=settings-wisw' ); ?>"><?php _e( 'Add account in settings', 'instagram-slider-widget' ); ?></a>
49
+ <?php
50
+ }
51
+ ?>
52
+ </div>
53
+ <div class="form-group">
54
+ <div class="input-group">
55
+ <label class="form-label form-inline"
56
+ for="refresh_hour"><?php _e( 'Check for new images every:', 'instagram-slider-widget' ); ?></label>
57
+ <div class="input-group">
58
+ <input class="form-input" type="number" min="1" max="200" id="refresh_hour" name="refresh_hour"
59
+ value="<?php echo $instance['refresh_hour']; ?>"/>
60
+ <span class="input-group-addon"><?php _e( 'hours', 'instagram-slider-widget' ); ?></span>
61
+ </div>
62
+ </div>
63
+ </div>
64
+ </div>
65
+ <div class="wis-flex-content-column">
66
+ <?php if ( $feed_id ) : ?>
67
+ <div id="wis-field-jr_insta_shortcode" class="form-group">
68
+ <label class="form-label" for="jr_insta_shortcode">
69
+ <?php _e( 'Shortcode of this feed:', 'instagram-slider-widget' ); ?>
70
+ </label>
71
+ <input id="jr_insta_shortcode" onclick="this.setSelectionRange(0, this.value.length)" type="text" class="form-input"
72
+ value="[cm_facebook_feed id=&quot;<?php echo $feed_id ?>&quot;]"
73
+ readonly="readonly" style="border:none; color:black; font-family:monospace;">
74
+ <div class="jr-description"><?php _e( 'Use this shortcode in any page or post to display images with this widget configuration!', 'instagram-slider-widget' ) ?></div>
75
+ </div>
76
+ <?php endif; ?>
77
+ </div>
78
+ </div>
79
+ </div>
80
+
81
+ <div class="isw-tabs">
82
+ <ul>
83
+ <li class="desk_tab active" id="desk_tab_<?= $feed_id ?>" data-tab-id="<?= $feed_id ?>"><?php _e( 'Desktop', 'instagram-slider-widget' ); ?></li>
84
+ <li class="mob_tab" id="mob_tab_<?= $feed_id ?>" data-tab-id="<?= $feed_id ?>"><?php _e( 'Mobile', 'instagram-slider-widget' ); ?></li>
85
+ </ul>
86
+ </div>
87
+
88
+ <div class="isw-tabs-content" id="widget_tabs_<?= $feed_id ?>" data-widget-id="<?= $feed_id ?>">
89
+ <div id="desk_tab_content_<?= $feed_id ?>" class="desk_settings">
90
+ <h3 style="width: 100%; text-align: center"><?php _e( 'Desktop settings', 'instagram-slider-widget' ); ?></h3>
91
+
92
+ <div class="wis-flex-content">
93
+ <div class="wis-flex-content-column">
94
+ <div id="wis-field-images_number" class="form-group">
95
+ <div class="input-group">
96
+ <label class="form-label form-inline"
97
+ for="images_number"><?php _e( 'Count of images to show:', 'instagram-slider-widget' ); ?>
98
+ </label>
99
+ <div class="input-group">
100
+ <input class="form-input" type="number" min="1" max="" id="images_number" name="images_number"
101
+ value="<?php echo $instance['images_number']; ?>"/>
102
+ <span class="input-group-addon"><?php _e( 'pcs', 'instagram-slider-widget' ); ?></span>
103
+ </div>
104
+ </div>
105
+ <div class="jr-description">
106
+ <?php if ( ! $this->plugin->is_premium() ) {
107
+ _e( 'Maximum 20 images in free version.', 'instagram-slider-widget' );
108
+ echo " " . sprintf( __( "More in <a href='%s'>PRO version</a>", 'instagram-slider-widget' ), $this->plugin->get_support()->get_pricing_url( true, "wis_widget_settings" ) );
109
+ }
110
+ ?>
111
+ </div>
112
+
113
+ </div>
114
+ <div id="wis-field-words_in_caption" class="form-group">
115
+ <div class="input-group">
116
+ <label class="form-label form-inline" for="title_words">
117
+ <?php _e( 'Number of words in caption:', 'instagram-slider-widget' ); ?>
118
+ </label>
119
+ <div class="input-group">
120
+ <input class="form-input" type="number" min="0" max="" id="title_words" name="title_words"
121
+ value="<?php echo $instance['title_words']; ?>"/>
122
+ <span class="input-group-addon"><?php _e( 'pcs', 'instagram-slider-widget' ); ?></span>
123
+ </div>
124
+ </div>
125
+ </div>
126
+ <div id="wis-field-orderby" class="form-group">
127
+ <label class="form-label" for="orderby"><?php _e( 'Order by', 'instagram-slider-widget' ); ?></label>
128
+ <select class="form-select" name="orderby" id="orderby">
129
+ <option value="date-ASC" <?php selected( $instance['orderby'], 'date-ASC', true ); ?>><?php _e( 'Date - Ascending', 'instagram-slider-widget' ); ?></option>
130
+ <option value="date-DESC" <?php selected( $instance['orderby'], 'date-DESC', true ); ?>><?php _e( 'Date - Descending', 'instagram-slider-widget' ); ?></option>
131
+ <option value="popular-ASC" <?php selected( $instance['orderby'], 'popular-ASC', true ); ?>><?php _e( 'Popularity - Ascending', 'instagram-slider-widget' ); ?></option>
132
+ <option value="popular-DESC" <?php selected( $instance['orderby'], 'popular-DESC', true ); ?>><?php _e( 'Popularity - Descending', 'instagram-slider-widget' ); ?></option>
133
+ <option value="rand" <?php selected( $instance['orderby'], 'rand', true ); ?>><?php _e( 'Random', 'instagram-slider-widget' ); ?></option>
134
+ </select>
135
+ </div>
136
+ <div id="wis-field-images_link" class="form-group">
137
+ <label class="form-label" for="fbimages_link">
138
+ <?php _e( 'Link to', 'instagram-slider-widget' ); ?>
139
+ </label>
140
+ <select class="form-select" name="fbimages_link" id="fbimages_link">
141
+ <?php
142
+ if ( count( $options_linkto ) ) {
143
+ foreach ( $options_linkto as $key => $option ) {
144
+ $selected = selected( $instance['fbimages_link'], $key, false );
145
+ echo "<option value='{$key}' {$selected}>{$option}</option>\n";
146
+ }
147
+ }
148
+ ?>
149
+ </select>
150
+ </div>
151
+ <div id="wis-field-show_feed_header" class="form-group">
152
+ <label class="form-switch" for="show_feed_header">
153
+ <input class="form-input" id="show_feed_header"
154
+ name="show_feed_header" type="checkbox"
155
+ value="1" <?php checked( '1', $instance['show_feed_header'] ); ?> />
156
+ <i class="form-icon"></i>
157
+ <?php _e( 'Show feed header', 'instagram-slider-widget' ); ?>
158
+ </label>
159
+ </div>
160
+ </div>
161
+ <div class="wis-flex-content-column">
162
+ <div id="wis-field-template" class="form-group">
163
+ <label class="form-label" for="template">
164
+ <?php _e( 'Template', 'instagram-slider-widget' ); ?>
165
+ </label>
166
+ <select class="form-select" name="template" id="template">
167
+ <?php
168
+ if ( count( $sliders ) ) {
169
+ foreach ( $sliders as $key => $slider ) {
170
+ $selected = ( $instance['template'] == $key ) ? "selected='selected'" : '';
171
+ echo "<option value='{$key}' {$selected}>{$slider}</option>\n";
172
+ }
173
+ }
174
+ ?>
175
+ </select>
176
+ <div id="masonry_notice"
177
+ class="masonry_notice jr-description <?php if ( 'masonry' != $instance['template'] ) {
178
+ echo 'hidden';
179
+ } ?>">
180
+ <?php _e( "Not recommended for <strong>sidebar</strong>" ) ?></div>
181
+ </div>
182
+ <div class="masonry_settings" <?php echo 'masonry' != $instance['template'] ? 'style="display:none;"' : ''; ?>>
183
+ <div id="wis-field-gutter" class="form-group">
184
+ <div class="input-group">
185
+ <label class="form-label form-inline" for="gutter">
186
+ <?php _e( 'Vertical space between item elements:', 'instagram-slider-widget' ); ?>
187
+ </label>
188
+ <div class="input-group">
189
+ <input class="form-input" id="gutter" name="gutter" type="number" min="0" max=""
190
+ value="<?php echo $instance['gutter']; ?>"/>
191
+ <span class="input-group-addon"><?php _e( 'px', 'instagram-slider-widget' ); ?></span>
192
+ </div>
193
+ </div>
194
+ </div>
195
+ <div id="wis-field-masonry_image_width" class="form-group">
196
+ <div class="input-group">
197
+ <label class="form-label form-inline" for="masonry_post_width">
198
+ <?php _e( 'Post width:', 'instagram-slider-widget' ); ?>
199
+ </label>
200
+ <div class="input-group">
201
+ <input class="form-input" id="masonry_post_width" name="masonry_post_width" type="number" min="0" max=""
202
+ value="<?php echo $instance['masonry_post_width']; ?>"/>
203
+ <span class="input-group-addon"> <?php _e( 'px', 'instagram-slider-widget' ); ?> </span>
204
+ </div>
205
+ </div>
206
+ </div>
207
+ </div>
208
+ </div>
209
+ </div>
210
+ </div>
211
+
212
+ <div id="mob_tab_content_<?= $feed_id ?>" class="mob_settings" style="display: none;">
213
+ <h3 style="width: 100%; text-align: center"><?php _e( 'Mobile settings', 'instagram-slider-widget' ); ?></h3>
214
+ <?php if ( defined( 'WISP_PLUGIN_ACTIVE' ) && $this->plugin->is_premium() ) :
215
+ echo apply_filters( 'wis/facebook/mob_settings', '', $this, $instance, $sliders, $options_linkto, $feed_id );
216
+ else: ?>
217
+ <h3 style="width: 100%; text-align: center"><?php _e( 'Mobile settings available only in premium version', 'instagram-slider-widget' ); ?></h3>
218
+ <?php endif; ?>
219
+ </div>
220
+ </div>
221
+ </div>
222
+ <div class="wis-feed-save-button-container">
223
+ <input name="wis-feed-save-action" class="wbcr-factory-button wbcr-save-button" type="submit" value="<?php _e( 'Save', 'instagram-slider-widget' ); ?>">
224
+ </div>
225
+ </form>
226
+ </div>
components/facebook/html_templates/masonry.php ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /** @var \WIS\Facebook\Includes\Api\FacebookAccount $account */
4
+ $account = $args['account'];
5
+ $i = 1;
6
+ ?>
7
+
8
+ <div class='wbfb_masonry_container'>
9
+ <?php
10
+ /** @var \WIS\Facebook\Includes\Api\WFB_Facebook_Post $post */
11
+ foreach ( $args['posts'] as $post ) :
12
+ if ( empty( $post->picture ) && empty( $post->full_picture ) ) {
13
+ continue;
14
+ }
15
+ ?>
16
+ <div class="wbfb_masonry_post" style="width: <?= $args['masonry_post_width'] ?>px !important;">
17
+ <?php if ( $args['show_feed_header'] ): ?>
18
+ <div class="wbfb_masonry_post_header">
19
+ <div class="wbfb_profile_pic">
20
+ <img src="<?= $account->avatar ?>" alt="" width="50" height="50" style="border-radius: 50px">
21
+ </div>
22
+ <div class="wbfb_profile_data">
23
+ <div class="wbfb_profile_data_name"><a href="https://facebook.com/<?= $account->id ?>"
24
+ target="_blank"><?= $account->name ?></a></div>
25
+ <div class="wbfb_post_data"><?= time_elapsed_string( $post->created_time ) ?></div>
26
+ </div>
27
+ </div>
28
+ <?php endif; ?>
29
+ <div class="wbfb_masonry_post_body">
30
+ <div class="wbfb_masonry_post_text">
31
+ <a <?= 'fb_link' == $args['fbimages_link'] ? "href='https://facebook.com/$post->id' target='_blank'" : '' ?>
32
+ data-remodal-target="<?= $post->id ?>" class="wbfb_popup_link">
33
+ <?= $post->message ?>
34
+ </a>
35
+ </div>
36
+ <?php if ( ! empty( $post->attachments ) ) : ?>
37
+ <?php foreach ( $post->attachments as $attachment ) : ?>
38
+ <a <?= 'fb_link' == $args['fbimages_link'] ? "href='https://facebook.com/$post->id' target='_blank'" : '' ?>
39
+ data-remodal-target="<?= $post->id ?>" class="wbfb_popup_link">
40
+ <div class="wbfb_masonry_post_attachment">
41
+ <?php if ( isset( $post->shared_post ) ): ?>
42
+ <a href="<?= "https://facebook.com/" . $post->shared_post->id ?>">
43
+ <div class="wbfb_masonry_repost">
44
+ <?php if ( ! empty( $post->shared_post->picture ) ): ?>
45
+ <div class="wbfb_repost_picture">
46
+ <img src="<?= $post->shared_post->picture ?>" alt="">
47
+ </div>
48
+ <?php endif; ?>
49
+ <?php if ( ! empty( $post->shared_post->message ) ): ?>
50
+ <div class="wbfb_repost_text">
51
+ <?= $post->shared_post->message ?>
52
+ </div>
53
+ <?php endif; ?>
54
+ </div>
55
+ </a>
56
+ <?php elseif ( 'photo' === $attachment->type || 'gallery' === $attachment->type ): ?>
57
+ <img src="<?= $post->full_picture ?>" alt="">
58
+ <?php elseif ( 'video_inline' === $attachment->type || 'video_autoplay' === $attachment->type ): ?>
59
+ <img src="<?= $attachment->media->image->src ?>" alt="">
60
+ <?php else: ?>
61
+ <img src="<?= $attachment->media->image->src ?? $post->full_picture ?>" alt="">
62
+ <?php endif; ?>
63
+ </div>
64
+ </a>
65
+ <?php endforeach; ?>
66
+ <?php endif; ?>
67
+ </div>
68
+ <div class="wbfb_masonry_post_footer">
69
+ <div class="wbfb_masonry_post_share">
70
+ <a href="https://facebook.com/<?= $post->id ?>" target="_blank">View on Facebook</a> | <a href="">Share</a>
71
+ </div>
72
+ <div class="wbfb_masonry_post_stats">
73
+ <ul class="wfb-meta wfb-light">
74
+ <li class="wfb-likes">
75
+ <span class="wfb-icon wfb-like">
76
+ <svg width="24px" height="24px" role="img" aria-hidden="true" aria-label="Like" alt="Like"
77
+ xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
78
+ <path
79
+ d="M496.656 285.683C506.583 272.809 512 256 512 235.468c-.001-37.674-32.073-72.571-72.727-72.571h-70.15c8.72-17.368 20.695-38.911 20.695-69.817C389.819 34.672 366.518 0 306.91 0c-29.995 0-41.126 37.918-46.829 67.228-3.407 17.511-6.626 34.052-16.525 43.951C219.986 134.75 184 192 162.382 203.625c-2.189.922-4.986 1.648-8.032 2.223C148.577 197.484 138.931 192 128 192H32c-17.673 0-32 14.327-32 32v256c0 17.673 14.327 32 32 32h96c17.673 0 32-14.327 32-32v-8.74c32.495 0 100.687 40.747 177.455 40.726 5.505.003 37.65.03 41.013 0 59.282.014 92.255-35.887 90.335-89.793 15.127-17.727 22.539-43.337 18.225-67.105 12.456-19.526 15.126-47.07 9.628-69.405zM32 480V224h96v256H32zm424.017-203.648C472 288 472 336 450.41 347.017c13.522 22.76 1.352 53.216-15.015 61.996 8.293 52.54-18.961 70.606-57.212 70.974-3.312.03-37.247 0-40.727 0-72.929 0-134.742-40.727-177.455-40.727V235.625c37.708 0 72.305-67.939 106.183-101.818 30.545-30.545 20.363-81.454 40.727-101.817 50.909 0 50.909 35.517 50.909 61.091 0 42.189-30.545 61.09-30.545 101.817h111.999c22.73 0 40.627 20.364 40.727 40.727.099 20.363-8.001 36.375-23.984 40.727zM104 432c0 13.255-10.745 24-24 24s-24-10.745-24-24 10.745-24 24-24 24 10.745 24 24z"></path></svg><span
80
+ class="wfb-count"><?= $post->likes_count ?></span>
81
+ </li>
82
+ <li class="wfb-shares">
83
+ <span class="wfb-icon wfb-share">
84
+ <svg width="24px" height="24px" role="img" aria-hidden="true" aria-label="Share" alt="Share"
85
+ xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path
86
+ d="M564.907 196.35L388.91 12.366C364.216-13.45 320 3.746 320 40.016v88.154C154.548 130.155 0 160.103 0 331.19c0 94.98 55.84 150.231 89.13 174.571 24.233 17.722 58.021-4.992 49.68-34.51C100.937 336.887 165.575 321.972 320 320.16V408c0 36.239 44.19 53.494 68.91 27.65l175.998-184c14.79-15.47 14.79-39.83-.001-55.3zm-23.127 33.18l-176 184c-4.933 5.16-13.78 1.73-13.78-5.53V288c-171.396 0-295.313 9.707-243.98 191.7C72 453.36 32 405.59 32 331.19 32 171.18 194.886 160 352 160V40c0-7.262 8.851-10.69 13.78-5.53l176 184a7.978 7.978 0 0 1 0 11.06z"></path></svg>
87
+ <span class="wfb-count"><?= $post->shares_count ?></span>
88
+ </li>
89
+ <li class="wfb-comments">
90
+ <span class="wfb-icon wfb-comment">
91
+ <svg width="24px" height="24px" role="img" aria-hidden="true" aria-label="Comment"
92
+ alt="Comment"
93
+ xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
94
+ <path d="M448 0H64C28.7 0 0 28.7 0 64v288c0 35.3 28.7 64 64 64h96v84c0 7.1 5.8 12 12 12 2.4 0 4.9-.7 7.1-2.4L304 416h144c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64zm32 352c0 17.6-14.4 32-32 32H293.3l-8.5 6.4L192 460v-76H64c-17.6 0-32-14.4-32-32V64c0-17.6 14.4-32 32-32h384c17.6 0 32 14.4 32 32v288z"></path></svg>
95
+ <span class="wfb-count"><?= $post->comments_count ?></span>
96
+ </li>
97
+ </ul>
98
+ </div>
99
+ </div>
100
+ </div>
101
+ <?php
102
+ if ( $i >= $args['images_number'] ) {
103
+ break;
104
+ }
105
+ $i ++;
106
+ endforeach; ?>
107
+ </div>
components/facebook/html_templates/popup.php ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /** @var WIS\Facebook\Includes\Api\FacebookAccount $account */
3
+ $account = $args['account'];
4
+
5
+
6
+ ?>
7
+
8
+
9
+ <?php
10
+ /** @var \WIS\Facebook\Includes\Api\WFB_Facebook_Post $post */
11
+ foreach ($args['posts'] as $post): ?>
12
+ <div class="remodal" data-remodal-id="<?= $post->id ?>">
13
+ <div class="wfb-remodal-container">
14
+ <div class="wfb-remodal-pic">
15
+ <img src="<?= $post->full_picture ?>" alt="">
16
+ </div>
17
+ <div class="wfb-remodal-data">
18
+ <div class="wfb-remodal-header">
19
+ <div class="wbfb_profile_pic">
20
+ <img src="<?= $account->avatar ?>" alt="" width="50" height="50" style="border-radius: 50px">
21
+ </div>
22
+ <div class="wbfb_profile_data">
23
+ <div class="wbfb_profile_data_name"><a href="https://facebook.com/<?= $account->id ?>"
24
+ target="_blank"><?= $account->name ?></a></div>
25
+ <div class="wbfb_post_data"><?= time_elapsed_string($post->created_time) ?></div>
26
+ </div>
27
+ </div>
28
+ <div class="wfb-remodal-text">
29
+ <?= $post->message ?>
30
+ </div>
31
+ <div class="wfb-remodal-stats">
32
+ <div class="wbfb_masonry_post_footer">
33
+ <div class="wbfb_masonry_post_share">
34
+ <a href="https://facebook.com/<?= $post->id ?>" target="_blank">View on Facebook</a> | <a href="">Share</a>
35
+ </div>
36
+ <div class="wbfb_masonry_post_stats">
37
+ <ul class="wfb-meta wfb-light">
38
+ <li class="wfb-likes">
39
+ <span class="wfb-icon wfb-like">
40
+ <svg width="24px" height="24px" role="img" aria-hidden="true" aria-label="Like" alt="Like"
41
+ xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
42
+ <path
43
+ d="M496.656 285.683C506.583 272.809 512 256 512 235.468c-.001-37.674-32.073-72.571-72.727-72.571h-70.15c8.72-17.368 20.695-38.911 20.695-69.817C389.819 34.672 366.518 0 306.91 0c-29.995 0-41.126 37.918-46.829 67.228-3.407 17.511-6.626 34.052-16.525 43.951C219.986 134.75 184 192 162.382 203.625c-2.189.922-4.986 1.648-8.032 2.223C148.577 197.484 138.931 192 128 192H32c-17.673 0-32 14.327-32 32v256c0 17.673 14.327 32 32 32h96c17.673 0 32-14.327 32-32v-8.74c32.495 0 100.687 40.747 177.455 40.726 5.505.003 37.65.03 41.013 0 59.282.014 92.255-35.887 90.335-89.793 15.127-17.727 22.539-43.337 18.225-67.105 12.456-19.526 15.126-47.07 9.628-69.405zM32 480V224h96v256H32zm424.017-203.648C472 288 472 336 450.41 347.017c13.522 22.76 1.352 53.216-15.015 61.996 8.293 52.54-18.961 70.606-57.212 70.974-3.312.03-37.247 0-40.727 0-72.929 0-134.742-40.727-177.455-40.727V235.625c37.708 0 72.305-67.939 106.183-101.818 30.545-30.545 20.363-81.454 40.727-101.817 50.909 0 50.909 35.517 50.909 61.091 0 42.189-30.545 61.09-30.545 101.817h111.999c22.73 0 40.627 20.364 40.727 40.727.099 20.363-8.001 36.375-23.984 40.727zM104 432c0 13.255-10.745 24-24 24s-24-10.745-24-24 10.745-24 24-24 24 10.745 24 24z"></path></svg><span
44
+ class="wfb-count"><?= $post->likes_count ?></span>
45
+ </li>
46
+ <li class="wfb-shares">
47
+ <span class="wfb-icon wfb-share">
48
+ <svg width="24px" height="24px" role="img" aria-hidden="true" aria-label="Share" alt="Share"
49
+ xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path
50
+ d="M564.907 196.35L388.91 12.366C364.216-13.45 320 3.746 320 40.016v88.154C154.548 130.155 0 160.103 0 331.19c0 94.98 55.84 150.231 89.13 174.571 24.233 17.722 58.021-4.992 49.68-34.51C100.937 336.887 165.575 321.972 320 320.16V408c0 36.239 44.19 53.494 68.91 27.65l175.998-184c14.79-15.47 14.79-39.83-.001-55.3zm-23.127 33.18l-176 184c-4.933 5.16-13.78 1.73-13.78-5.53V288c-171.396 0-295.313 9.707-243.98 191.7C72 453.36 32 405.59 32 331.19 32 171.18 194.886 160 352 160V40c0-7.262 8.851-10.69 13.78-5.53l176 184a7.978 7.978 0 0 1 0 11.06z"></path></svg>
51
+ <span class="wfb-count"><?= $post->shares_count ?></span>
52
+ </li>
53
+ <li class="wfb-comments">
54
+ <span class="wfb-icon wfb-comment">
55
+ <svg width="24px" height="24px" role="img" aria-hidden="true" aria-label="Comment" alt="Comment"
56
+ xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
57
+ <path d="M448 0H64C28.7 0 0 28.7 0 64v288c0 35.3 28.7 64 64 64h96v84c0 7.1 5.8 12 12 12 2.4 0 4.9-.7 7.1-2.4L304 416h144c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64zm32 352c0 17.6-14.4 32-32 32H293.3l-8.5 6.4L192 460v-76H64c-17.6 0-32-14.4-32-32V64c0-17.6 14.4-32 32-32h384c17.6 0 32 14.4 32 32v288z"></path></svg>
58
+ <span class="wfb-count"><?= $post->comments_count ?></span>
59
+ </li>
60
+ </ul>
61
+ </div>
62
+ </div>
63
+ </div>
64
+ </div>
65
+
66
+ </div>
67
+ </div>
68
+ <?php endforeach; ?>
components/facebook/html_templates/widget_settings.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* @var array $args */
3
+ /* @var WIS_Feeds $feeds */
4
+
5
+ $instance = $args['instance'];
6
+ $feeds = $args['feeds'];
7
+ ?>
8
+
9
+ <div class="jr-container">
10
+ <p>
11
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'instagram-slider-widget' ); ?></label>
12
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text"
13
+ value="<?php echo $instance['title']; ?>"/>
14
+ </p>
15
+
16
+ <p>
17
+ <label for="<?php echo $this->get_field_id( 'feed_id' ); ?>"><?php _e( 'Facebook feed', 'instagram-slider-widget' ); ?>:</label>
18
+ <select class="widefat" id="<?php echo $this->get_field_id( 'feed_id' ); ?>" name="<?php echo $this->get_field_name( 'feed_id' ); ?>">
19
+ <?php foreach ( $feeds->feeds as $key => $feed ) {
20
+ $selected = $instance['feed_id'] == $feed->instance['id'] ? "selected='selected'" : "";
21
+ /* @var WIS_Facebook_Feed $feed */ ?>
22
+ <option value="<?php echo $key; ?>" <?php echo $selected; ?>><?php echo $feed->title; ?></option>
23
+ <?php } ?>
24
+ </select>
25
+ </p>
26
+ </div>
components/facebook/includes/Api/facebook-account.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WIS\Facebook\Includes\Api;
4
+
5
+ /**
6
+ * Class Account
7
+ * @property string $name
8
+ * @property string $avatar
9
+ * @property int $id
10
+ * @property string $token
11
+ */
12
+ class FacebookAccount {
13
+ public $name;
14
+ public $avatar;
15
+ public $id;
16
+ public $token;
17
+ public $is_me;
18
+
19
+ /**
20
+ * @param $account_array
21
+ *
22
+ * @return FacebookAccount
23
+ */
24
+ public function fromArray( $account_array ) {
25
+ $this->name = $account_array['name'];
26
+ $this->avatar = $account_array['avatar'];
27
+ $this->id = $account_array['id'];
28
+ $this->token = $account_array['token'];
29
+ $this->is_me = $account_array['is_me'];
30
+
31
+ return $this;
32
+ }
33
+ }
components/facebook/includes/Api/facebook-api.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WIS\Facebook\Includes\Api;
4
+
5
+ use PHPMailer\PHPMailer\Exception;
6
+ use WIS\Facebook\Includes\Api\FacebookAccount;
7
+
8
+ class WFB_Facebook_API {
9
+
10
+ const FACEBOOK_SELF_URL = 'https://graph.facebook.com/';
11
+
12
+
13
+ /**
14
+ * Stores the fetched data from Facebook in WordPress DB using transients
15
+ *
16
+ * @param FacebookAccount $account Facebook page name to fetch
17
+ * @param string $cache_hours Cache hours for transient
18
+ * @param string $nr_images Nr of images to fetch
19
+ * @param \WIS_Facebook_Feed $widget
20
+ *
21
+ * @return string|array of localy saved facebook data
22
+ */
23
+ public function get_data( $account, $cache_hours, $nr_images, $feed ) {
24
+
25
+ $opt_name = 'jr_facebook_' . md5( $account->id );
26
+ $fbData = get_transient( $opt_name );
27
+ $old_opts = (array) get_option( $opt_name );
28
+ $new_opts = [
29
+ 'search_string' => $account->id,
30
+ 'cache_hours' => $cache_hours,
31
+ 'nr_images' => $nr_images,
32
+ ];
33
+
34
+ if ( true === $feed->trigger_refresh_data( $fbData, $old_opts, $new_opts ) ) {
35
+ //if ( true ) {
36
+ $old_opts['search_string'] = $account->id;
37
+ $old_opts['cache_hours'] = $cache_hours;
38
+ $old_opts['nr_images'] = $nr_images;
39
+ $nr_images = ! \WIS_Plugin::app()->is_premium() && $nr_images > 20 ? 20 : $nr_images;
40
+
41
+ $fields = "id,created_time,child_attachments,shares,sharedposts{message,full_picture,created_time},comments{comments_count},message,full_picture,picture,attachments{media_type,media,title,type,url}"; //,comments.summary(true)
42
+
43
+ if ( ! $account->is_me ) {
44
+ $fields .= ",likes.summary(true)";
45
+ }
46
+
47
+ $args = [
48
+ 'access_token' => $account->token,
49
+ 'fields' => $fields,
50
+ 'limit' => $nr_images,
51
+ ];
52
+
53
+ $url = WFB_FACEBOOK_SELF_URL . $account->id . "/feed";
54
+ $response = wp_remote_get( add_query_arg( $args, $url ) );
55
+ if ( is_wp_error( $response ) ) {
56
+ return [ 'error' => __( 'Something went wrong', 'instagram-slider-widget' ) ];
57
+ }
58
+ if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
59
+ try {
60
+ $entry_data = $this->get_posts_from_json( $response['body'] );
61
+ } catch ( Exception $exception ) {
62
+ error_log( "SSW ERROR: " . $exception->getTraceAsString() );
63
+
64
+ return [ 'error' => __( 'API ERROR: Failed to parse data.', 'instagram-slider-widget' ) ];
65
+ }
66
+
67
+ update_option( $opt_name, $old_opts );
68
+ set_transient( $opt_name, $entry_data, $cache_hours * 60 * 60 );
69
+ } else {
70
+ return [ 'error' => __( 'Something went wrong. API error', 'instagram-slider-widget' ) ];
71
+ }
72
+ }
73
+
74
+ return $entry_data;
75
+ }
76
+
77
+ /**
78
+ * @param string $json
79
+ *
80
+ * @return \WIS\Facebook\Includes\Api\WFB_Facebook_Post[]
81
+ */
82
+ public function get_posts_from_json( $json ) {
83
+ $posts = [];
84
+
85
+ $json_posts = json_decode( $json );
86
+
87
+ foreach ( $json_posts->data as $json_post ) {
88
+ $post = ( new WFB_Facebook_Post() )->get_facebook_post_from_object( $json_post );
89
+ $posts[ $post->id ] = $post;
90
+ }
91
+
92
+ return $posts;
93
+ }
94
+ }
components/facebook/includes/Api/facebook-post-attachment.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WIS\Facebook\Includes\Api;
4
+
5
+ /**
6
+ * Class WFB_Post_Attachment
7
+ *
8
+ * @property string $media_type
9
+ * @property \stdClass $media
10
+ * @property string $type
11
+ * @property string $url
12
+ *
13
+ * @package WIS\Facebook\Includes\Api
14
+ */
15
+ class WFB_Post_Attachment{
16
+
17
+ /**
18
+ * @param $attachments
19
+ *
20
+ * @return $this
21
+ */
22
+ public function get_attachment_from_object($attachments)
23
+ {
24
+ $this->media_type = $attachments->media_type;
25
+ $this->media = $attachments->media;
26
+ $this->type = $attachments->type;
27
+ $this->url = $attachments->url;
28
+
29
+ return $this;
30
+ }
31
+ }
components/facebook/includes/Api/facebook-post.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WIS\Facebook\Includes\Api;
4
+
5
+ /**
6
+ * Class WFB_Facebook_Post
7
+ *
8
+ * @property string $id
9
+ * @property string $message
10
+ * @property string $created_time
11
+ * @property int $shares_count
12
+ * @property int $likes_count
13
+ * @property int $comments_count
14
+ * @property string $full_picture
15
+ * @property WFB_Facebook_Post $shared_post
16
+ * @property string $picture
17
+ * @property WFB_Post_Attachment[] $attachments
18
+ *
19
+ * @package WIS\Facebook\Includes\Api
20
+ */
21
+ class WFB_Facebook_Post{
22
+
23
+ /**
24
+ * @param $post
25
+ *
26
+ * @return $this
27
+ */
28
+ public function get_facebook_post_from_object($post)
29
+ {
30
+ $this->id = $post->id;
31
+ $this->message = $post->message ?? '';
32
+ $this->created_time = $post->created_time;
33
+ $this->shares_count = $post->shares->count ?? 0;
34
+ $this->likes_count = $post->likes->summary->total_count ?? 0;
35
+ $this->comments_count = isset($post->comments) ? count($post->comments->data) : 0;
36
+ $this->full_picture = $post->full_picture ?? '';
37
+ $this->picture = $post->picture ?? '';
38
+
39
+ if(isset($post->sharedposts)){
40
+ $sharedpost = $post->sharedposts->data[0];
41
+
42
+ $this->shared_post = new WFB_Facebook_Post();
43
+ $this->shared_post->id = $sharedpost->id ?? '';
44
+ $this->shared_post->message = $sharedpost->message ?? '';
45
+ $this->shared_post->picture = $sharedpost->full_picture ?? '';
46
+ $this->shared_post->created_time = $sharedpost->created_time ?? '';
47
+ }
48
+
49
+ if (isset($post->attachments))
50
+ foreach ($post->attachments->data as $attachment)
51
+ $this->attachments[] = (new WFB_Post_Attachment())->get_attachment_from_object($attachment);
52
+
53
+
54
+ return $this;
55
+ }
56
+ }
components/facebook/includes/class-facebook-feed.php ADDED
@@ -0,0 +1,286 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ use WIS\Facebook\Includes\Api\FacebookAccount;
4
+ use WIS\Facebook\Includes\Api\WFB_Facebook_API;
5
+
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ }
9
+
10
+ /**
11
+ * @property string title
12
+ * @property int|string show_feed_header
13
+ * @property string template
14
+ * @property string account
15
+ * @property int refresh_hour
16
+ * @property int images_number
17
+ * @property int|string enable_stories
18
+ * @property int title_words
19
+ * @property string orderby
20
+ * @property string fbimages_link
21
+ * @property string blocked_words
22
+ * @property int gutter
23
+ * @property int masonry_post_width
24
+ *
25
+ * @property string m_title
26
+ * @property int|string m_show_feed_header
27
+ * @property string m_template
28
+ * @property string m_account
29
+ * @property int m_refresh_hour
30
+ * @property int m_images_number
31
+ * @property int|string m_enable_stories
32
+ * @property int m_title_words
33
+ * @property string m_orderby
34
+ * @property string m_fbimages_link
35
+ * @property string m_blocked_words
36
+ * @property int m_gutter
37
+ * @property int m_masonry_post_width
38
+ */
39
+ class WIS_Facebook_Feed extends WIS_Feed {
40
+
41
+ public $social = 'facebook';
42
+
43
+ /**
44
+ * @var string
45
+ */
46
+ protected $component_dir = WFB_COMPONENT_DIR;
47
+
48
+ /**
49
+ * Facebook feed constructor.
50
+ */
51
+ public function __construct( $feed = [] ) {
52
+ parent::__construct( $feed );
53
+ }
54
+
55
+ /**
56
+ * Set default values
57
+ */
58
+ protected function setDefaults() {
59
+ $this->templates = apply_filters( 'wis/facebook/sliders', [
60
+ 'masonry' => 'Masonry',
61
+ ] );
62
+
63
+ $this->linkto = apply_filters( 'wis/facebook/options/link_to', [
64
+ 'fb_popup' => 'Popup',
65
+ 'fb_link' => 'Facebook link',
66
+ 'fb_none' => 'None',
67
+ ] );
68
+
69
+ $this->defaults = [
70
+ 'id' => null,
71
+ 'title' => __( 'Facebook feed', 'instagram-slider-widget' ),
72
+ 'show_feed_header' => 0,
73
+ 'template' => 'masonry',
74
+ 'account' => '',
75
+ 'refresh_hour' => 5,
76
+ 'images_number' => 20,
77
+ 'enable_stories' => 0,
78
+ 'title_words' => 5,
79
+ 'orderby' => 'rand',
80
+ 'fbimages_link' => 'post_page',
81
+ 'blocked_words' => '',
82
+ 'gutter' => 5,
83
+ 'masonry_post_width' => 200,
84
+
85
+ 'm_images_number' => 20,
86
+ 'm_title_words' => 5,
87
+ 'm_orderby' => 'rand',
88
+ 'm_fbimages_link' => 'post_page',
89
+ 'm_show_feed_header' => 0,
90
+ 'm_template' => 'masonry',
91
+ 'm_gutter' => 5,
92
+ 'm_masonry_post_width' => 200,
93
+ ];
94
+ }
95
+
96
+ /**
97
+ * @return array
98
+ */
99
+ public function getTemplates() {
100
+ return apply_filters( 'wis/facebook/sliders', $this->templates );
101
+ }
102
+
103
+ /**
104
+ * @return array
105
+ */
106
+ public function getLinkto() {
107
+ return apply_filters( 'wis/facebook/options/link_to', $this->linkto );
108
+ }
109
+
110
+ private function getAccounts() {
111
+ $accounts = WIS_Plugin::app()->getPopulateOption( WIS_FACEBOOK_ACCOUNT_PROFILES_OPTION_NAME, [] );
112
+ if ( ! is_array( $accounts ) ) {
113
+ $accounts = [];
114
+ }
115
+
116
+ return $accounts;
117
+ }
118
+
119
+ /**
120
+ * Enqueue public-facing Scripts and style sheet.
121
+ */
122
+ public function public_enqueue() {
123
+ wp_enqueue_style( WIS_Plugin::app()->getPrefix() . 'wfb-font-awesome' );
124
+ wp_enqueue_style( WIS_Plugin::app()->getPrefix() . 'wfb-masonry-view-css' );
125
+
126
+ wp_enqueue_script( 'masonry' );
127
+ wp_enqueue_script( WIS_Plugin::app()->getPrefix() . 'wfb-premium-imagesloaded' );
128
+ wp_enqueue_script( WIS_Plugin::app()->getPrefix() . 'wfb-masonry-view-js' );
129
+ }
130
+
131
+ public function popup_script_enqueue() {
132
+ wp_enqueue_style( WIS_Plugin::app()->getPrefix() . 'wfb-remodal-css' );
133
+ wp_enqueue_style( WIS_Plugin::app()->getPrefix() . 'wfb-remodal-theme-css' );
134
+ wp_enqueue_style( WIS_Plugin::app()->getPrefix() . 'wfb-remodal-view-css' );
135
+
136
+ wp_enqueue_script( WIS_Plugin::app()->getPrefix() . 'wfb-remodal-min-js' );
137
+ wp_enqueue_script( WIS_Plugin::app()->getPrefix() . 'wfb-remodal-view-js' );
138
+ }
139
+
140
+ /**
141
+ * @inerhitDoc
142
+ */
143
+ public function form( $feed_id = 0 ) {
144
+ $feeds = new WIS_Feeds( $this->social );
145
+ $accounts = $this->getAccounts();
146
+
147
+ $args = [
148
+ 'is_update' => $feed_id ? true : false,
149
+ 'add_link' => WIS_Page::instance()->getActionUrl( 'add' ),
150
+ 'feeds' => $feeds->feeds,
151
+ 'instance' => $this->instance,
152
+ 'accounts' => $accounts,
153
+ 'sliders' => $this->getTemplates(),
154
+ 'options_linkto' => $this->getLinkto(),
155
+ ];
156
+
157
+ echo WIS_Page::instance()->render( WFB_COMPONENT_VIEWS_DIR . '/form-feed', $args );
158
+ }
159
+
160
+ /**
161
+ * Selected array function echoes selected if in array
162
+ *
163
+ * @param array $haystack The array to search in
164
+ * @param string $current The string value to search in array;
165
+ */
166
+ public function selected( $haystack, $current ) {
167
+ if ( is_array( $haystack ) && in_array( $current, $haystack ) ) {
168
+ selected( 1, 1, true );
169
+ }
170
+ }
171
+
172
+ /**
173
+ * Display feed
174
+ *
175
+ * @param bool $return Return result or echo
176
+ *
177
+ * @return string|bool
178
+ */
179
+ public function display( $return = false ) {
180
+ $data = $this->display_images();
181
+
182
+ if ( $return ) {
183
+ return $data;
184
+ } else {
185
+ echo $data;
186
+ }
187
+
188
+ return true;
189
+ }
190
+
191
+ /**
192
+ * Stores the fetched data from facebook
193
+ *
194
+ * @return array|string of localy saved facebook data
195
+ * @throws \Exception
196
+ */
197
+ public function feed_query( $search_for, $cache_hours, $nr_images ) {
198
+ $fb_api = new WFB_Facebook_API();
199
+
200
+ return $fb_api->get_data( $search_for, $cache_hours, $nr_images * 2, $this );
201
+ }
202
+
203
+ /**
204
+ * Runs the query for images and returns the html
205
+ *
206
+ * @return string
207
+ */
208
+ public function display_images() {
209
+ $this->public_enqueue();
210
+ $output = '';
211
+
212
+ $args = $this->getAdaptiveInstance();
213
+
214
+ if ( ! $args['account'] ) {
215
+ return $output;
216
+ }
217
+
218
+ $accounts = $this->getAccounts();
219
+ $account = ( new FacebookAccount() )->fromArray( $accounts[ $args['account'] ] );
220
+
221
+ $account_posts = $this->feed_query( $account, $args['refresh_hour'], $args['images_number'] * 2 );
222
+
223
+ if ( empty( $account_posts ) ) {
224
+ return __( 'No posts found', 'instagram-slider-widget' );
225
+ }
226
+
227
+ $orderby = $args['orderby'];
228
+ if ( 'rand' == $orderby ) {
229
+ shuffle( $account_posts );
230
+ } else {
231
+ $orderby = explode( '-', $orderby );
232
+ if ( 'date' == $orderby[0] ) {
233
+ $func = 'sort_timestamp_' . $orderby[1];
234
+ } else {
235
+ $func = 'sort_popularity_' . $orderby[1];
236
+ }
237
+
238
+ usort( $account_posts, [ $this, $func ] );
239
+ }
240
+
241
+ $args['posts'] = $account_posts;
242
+
243
+ if ( $args['show_feed_header'] ) {
244
+ $args['account'] = $account;
245
+ }
246
+
247
+ if ( 'fb_popup' == $args['fbimages_link'] && WIS_Plugin::app()->is_premium() ) {
248
+ $this->popup_script_enqueue();
249
+ $args['account'] = $account;
250
+ $output .= $this->render_template( 'popup', $args );
251
+ }
252
+
253
+ $output .= $this->render_template( $args['template'], $args );
254
+
255
+ return $output;
256
+ }
257
+
258
+ /**
259
+ * Sort Function for timestamp Ascending
260
+ */
261
+ public function sort_timestamp_ASC( $a, $b ) {
262
+ return $a->snippet->publishedAt > $b->snippet->publishedAt;
263
+ }
264
+
265
+ /**
266
+ * Sort Function for timestamp Descending
267
+ */
268
+ public function sort_timestamp_DESC( $a, $b ) {
269
+ return $a->snippet->publishedAt < $b->snippet->publishedAt;
270
+ }
271
+
272
+ /**
273
+ * Sort Function for popularity Ascending
274
+ */
275
+ public function sort_popularity_ASC( $a, $b ) {
276
+ return $a->statistics->viewCount > $b->statistics->viewCount;
277
+ }
278
+
279
+ /**
280
+ * Sort Function for popularity Descending
281
+ */
282
+ public function sort_popularity_DESC( $a, $b ) {
283
+ return $a->statistics->viewCount < $b->statistics->viewCount;
284
+ }
285
+
286
+ }
components/facebook/includes/class-facebook-profiles.php ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+
6
+ class WIS_Facebook_Profiles extends WIS_Profiles {
7
+ /**
8
+ * @var string
9
+ */
10
+ public $social = 'facebook';
11
+
12
+ /**
13
+ * @var string
14
+ */
15
+ public $profiles_option_name = WIS_FACEBOOK_ACCOUNT_PROFILES_OPTION_NAME;
16
+
17
+ /**
18
+ * WIS_Facebook_Profiles constructor.
19
+ *
20
+ * @param $page WIS_ProfilesPage
21
+ */
22
+ public function __construct( $page = null ) {
23
+ if ( $page ) {
24
+ parent::__construct( $page );
25
+ }
26
+
27
+ //AJAX
28
+ add_action( 'wp_ajax_wfb_add_account_by_token', [ $this, 'add_account_by_token' ] );
29
+ }
30
+
31
+ /**
32
+ * @throws Exception
33
+ */
34
+ public function add_account_by_token() {
35
+ if ( isset( $_POST['account'] ) && ! empty( $_POST['account'] ) && isset( $_POST['_ajax_nonce'] ) ) {
36
+ if ( ! current_user_can( 'manage_options' ) ) {
37
+ wp_die( - 2 );
38
+ } else {
39
+ wp_verify_nonce( $_POST['_ajax_nonce'], 'addAccountByToken' );
40
+
41
+ $account = json_decode( stripslashes( $_POST['account'] ), true );
42
+
43
+ if ( ! WIS_Plugin::app()->is_premium() && $this->count_accounts() >= 1 ) {
44
+ wp_die( 'No premium' );
45
+ }
46
+
47
+ $connected_profiles = WIS_Plugin::app()->getOption( $this->profiles_option_name, [] );
48
+ $connected_profiles[ $account['name'] ] = [
49
+ 'name' => $account['name'],
50
+ 'avatar' => $account['picture']['data']['url'],
51
+ 'id' => $account['id'],
52
+ 'token' => $account['access_token'],
53
+ 'is_me' => $account['is_me'],
54
+ ];
55
+ WIS_Plugin::app()->updateOption( $this->profiles_option_name, $connected_profiles );
56
+
57
+ wp_die( 'Ok' );
58
+ }
59
+ }
60
+ }
61
+
62
+ /**
63
+ * @param $access_token
64
+ * @param string $username
65
+ *
66
+ * @return string
67
+ */
68
+ public function update_profiles( $access_token, $username = "" ) {
69
+ $html = '';
70
+ if ( $access_token ) {
71
+ $args = [
72
+ 'access_token' => $access_token,
73
+ 'fields' => 'name,picture',
74
+ 'limit' => 200,
75
+ ];
76
+
77
+ $connected_profiles = [];
78
+
79
+ $url = WFB_FACEBOOK_SELF_URL . "me/accounts";
80
+ $response = wp_remote_get( add_query_arg( $args, $url ) );
81
+ if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
82
+ $pages = json_decode( wp_remote_retrieve_body( $response ), true );
83
+ foreach ( $pages['data'] as $profile ) {
84
+ $profile['access_token'] = $access_token;
85
+ $profile['is_me'] = false;
86
+ $connected_profiles[ $profile['name'] ] = $profile;
87
+ }
88
+ }
89
+
90
+ foreach ( $connected_profiles as $profile ) {
91
+ $html .= "<div class='wis-row wis-row-style' id='wis-facebook-row' data-account='" . json_encode( $profile ) . "'>";
92
+ $html .= "<div class='wis-col-1 wis-col1-style'><img src='{$profile['picture']['data']['url']}' width='50' alt='{$profile['name']}'></div>";
93
+ $html .= "<div class='wis-col-2 wis-col2-style'>{$profile['name']}</div>";
94
+ $html .= "</div>";
95
+ }
96
+ }
97
+
98
+ return $html;
99
+ }
100
+
101
+ /**
102
+ * Логика на вкладке facebook
103
+ *
104
+ * @return string
105
+ */
106
+ public function content() {
107
+ if ( isset( $_GET['tab'] ) && 'facebook' === $_GET['tab'] ) {
108
+ if ( isset( $_GET['token_error'] ) ) {
109
+ $_SERVER['REQUEST_URI'] = str_replace( '#_', '', remove_query_arg( 'token_error' ) );
110
+ } else {
111
+ if ( isset( $_GET['access_token'] ) ) {
112
+ $token = $_GET['access_token'];
113
+ $choose_account_html = $this->update_profiles( $token );
114
+ $_SERVER['REQUEST_URI'] = remove_query_arg( 'access_token' );
115
+ ?>
116
+ <div id="wis_accounts_modal" class="wis_accounts_modal">
117
+ <div class="wis_modal_header">
118
+ Choose Account:
119
+ </div>
120
+ <div class="wis_modal_content">
121
+ <?= $choose_account_html; ?>
122
+ </div>
123
+ </div>
124
+ <div id="wis_modal_overlay" class="wis_modal_overlay"></div>
125
+ <span class="wis-overlay-spinner is-active">&nbsp;</span>
126
+ <?php
127
+ }
128
+ }
129
+ }
130
+
131
+ $accounts = WIS_Plugin::app()->getPopulateOption( WIS_FACEBOOK_ACCOUNT_PROFILES_OPTION_NAME, [] );
132
+
133
+ $data = [
134
+ 'is_premium' => WIS_Plugin::app()->is_premium(),
135
+ 'authorize_url' => "https://instagram.cm-wp.com/facebook?" . http_build_query( [
136
+ "app_id" => WIS_FACEBOOK_CLIENT_ID,
137
+ "state" => $this->getSocialUrl(),
138
+ ] ),
139
+ 'accounts' => $accounts,
140
+ 'social' => $this->social,
141
+ ];
142
+
143
+ $result = $this->page->render( WFB_COMPONENT_VIEWS_DIR . '/accounts', $data );
144
+
145
+ return $result;
146
+ }
147
+
148
+ public function delete_account( $name ) {
149
+ $accounts = WIS_Plugin::app()->getOption( $this->profiles_option_name, [] );
150
+ if ( isset( $accounts[ $name ] ) ) {
151
+ unset( $accounts[ $name ] );
152
+ }
153
+ WIS_Plugin::app()->updateOption( $this->profiles_option_name, $accounts );
154
+ }
155
+
156
+ }
components/facebook/includes/class-facebook-widget.php ADDED
@@ -0,0 +1,214 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ use WIS\Facebook\Includes\Api\FacebookAccount;
5
+ use WIS\Facebook\Includes\Api\WFB_Facebook_API;
6
+
7
+ /**
8
+ * Facebook widget Class
9
+ */
10
+ class WFB_Widget extends WP_Widget {
11
+
12
+ /**
13
+ * Social name
14
+ *
15
+ * @var string
16
+ */
17
+ public $social = 'facebook';
18
+
19
+ private static $app;
20
+
21
+ /**
22
+ * @var WIS_Plugin
23
+ */
24
+ public $plugin;
25
+
26
+ /**
27
+ * @var WIS_Facebook
28
+ */
29
+ public $fb;
30
+
31
+ /**
32
+ * @var array
33
+ */
34
+ public $defaults;
35
+
36
+ /**
37
+ * @var WIS_Feeds
38
+ */
39
+ public $feeds;
40
+
41
+ public static function app() {
42
+ return self::$app;
43
+ }
44
+
45
+ /**
46
+ * Initialize the plugin by registering widget and loading public scripts
47
+ *
48
+ */
49
+ public function __construct() {
50
+ self::$app = $this;
51
+
52
+ // Widget ID and Class Setup
53
+ parent::__construct( 'wfacebook_feed', __( 'Social Slider - Facebook', 'instagram-slider-widget' ), [
54
+ 'show_instance_in_rest' => true,
55
+ 'classname' => 'wfacebook-feed',
56
+ 'description' => __( 'A widget that displays a Facebook posts ', 'instagram-slider-widget' ),
57
+ ] );
58
+
59
+ $this->plugin = WIS_Plugin::app();
60
+ $this->feeds = new WIS_Feeds( $this->social );
61
+
62
+ $this->defaults = [
63
+ 'title' => __( 'Facebook feed', 'instagram-slider-widget' ),
64
+ 'feed_id' => null,
65
+ ];
66
+
67
+ // Action to display posts
68
+ add_action( 'wfacebook_feed', [ $this, 'display_posts' ] );
69
+
70
+ // Enqueue Plugin Styles and scripts
71
+ add_action( 'wp_enqueue_scripts', [ $this, 'public_register' ] );
72
+ }
73
+
74
+ /**
75
+ * Register widget on widgets init
76
+ */
77
+ public static function register_widget() {
78
+ register_widget( __CLASS__ );
79
+ }
80
+
81
+ public function public_register() {
82
+ wp_register_style( WIS_Plugin::app()->getPrefix() . 'wfb-font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );
83
+ wp_register_style( WIS_Plugin::app()->getPrefix() . 'wfb-masonry-view-css', WFB_COMPONENT_URL . '/assets/css/wbfb_masonry_view.css', [], WFB_COMPONENT_VERSION );
84
+ wp_register_style( WIS_Plugin::app()->getPrefix() . 'wfb-remodal-css', WFB_COMPONENT_URL . '/assets/css/remodal.css', [], WFB_COMPONENT_VERSION );
85
+ wp_register_style( WIS_Plugin::app()->getPrefix() . 'wfb-remodal-theme-css', WFB_COMPONENT_URL . '/assets/css/remodal-default-theme.css', [], WFB_COMPONENT_VERSION );
86
+ wp_register_style( WIS_Plugin::app()->getPrefix() . 'wfb-remodal-view-css', WFB_COMPONENT_URL . '/assets/css/remodal-view.css', [], WFB_COMPONENT_VERSION );
87
+
88
+ $ajax = json_encode( [
89
+ 'url' => admin_url( 'admin-ajax.php' ),
90
+ 'nonce' => wp_create_nonce( "addAccountByToken" ),
91
+ ] );
92
+ wp_add_inline_script( WIS_Plugin::app()->getPrefix() . 'wfacebook', "var ajax = $ajax;" );
93
+ wp_register_script( WIS_Plugin::app()->getPrefix() . 'wfb-masonry-view-js', WFB_COMPONENT_URL . '/assets/js/wbfb_masonry_view.js', [], WFB_COMPONENT_VERSION );
94
+ wp_register_script( WIS_Plugin::app()->getPrefix() . 'wfb-premium-imagesloaded', WFB_COMPONENT_URL . '/assets/js/libs/imagesloaded.pkgd.min.js', [], WFB_COMPONENT_VERSION, true );
95
+ wp_register_script( WIS_Plugin::app()->getPrefix() . 'wfb-remodal-min-js', WFB_COMPONENT_URL . '/assets/js/libs/remodal.min.js', [], WFB_COMPONENT_VERSION, true );
96
+ wp_register_script( WIS_Plugin::app()->getPrefix() . 'wfb-remodal-view-js', WFB_COMPONENT_URL . '/assets/js/remodal-view.js', [], WFB_COMPONENT_VERSION, true );
97
+ }
98
+
99
+ /**
100
+ * The Public view of the Widget
101
+ *
102
+ */
103
+ public function widget( $args, $instance ) {
104
+ //Our variables from the widget settings.
105
+ $title = apply_filters( 'widget_title', $instance['title'] );
106
+
107
+ echo $args['before_widget'];
108
+
109
+ // Display the widget title
110
+ if ( $title ) {
111
+ echo $args['before_title'] . $title . $args['after_title'];
112
+ }
113
+
114
+ do_action( 'wfacebook_feed', $instance );
115
+
116
+ echo $args['after_widget'];
117
+ }
118
+
119
+ /**
120
+ * Widget Settings Form
121
+ *
122
+ */
123
+ public function form( $instance ) {
124
+ $instance = wp_parse_args( (array) $instance, $this->defaults );
125
+
126
+ $args = [
127
+ 'widget' => &$this,
128
+ 'instance' => $instance,
129
+ 'feeds' => $this->feeds,
130
+ ];
131
+
132
+ echo $this->render_template( 'widget_settings', $args );
133
+ }
134
+
135
+ /**
136
+ * Update the widget settings
137
+ *
138
+ * @param array $new_instance New instance values
139
+ * @param array $instance Old instance values
140
+ *
141
+ * @return array
142
+ */
143
+ public function update( $new_instance, $instance ) {
144
+ $new_instance = wp_parse_args( (array) $new_instance, $this->defaults );
145
+
146
+ foreach ( $new_instance as $key => &$item ) {
147
+ switch ( $key ) {
148
+ case 'title':
149
+ $item = sanitize_text_field( $item );
150
+ break;
151
+ case 'feed_id':
152
+ $item = absint( $item );
153
+ break;
154
+ }
155
+ }
156
+
157
+ return $new_instance;
158
+ }
159
+
160
+ /**
161
+ * Echoes the Display Instagram Images method
162
+ *
163
+ * @param array $args
164
+ *
165
+ * @return void
166
+ */
167
+ public function display_posts( $args ) {
168
+ echo $this->display_images( $args );
169
+ }
170
+
171
+ /**
172
+ * Runs the query for images and returns the html
173
+ *
174
+ * @param array $args
175
+ *
176
+ * @return string
177
+ */
178
+ private function display_images( $args ) {
179
+ $feed_id = absint( $args['feed_id'] );
180
+ /** @var WIS_Facebook_Feed $feed */
181
+ $feed = $this->feeds->get_feed( $feed_id );
182
+
183
+ return $feed ? $feed->display( true ) : __( 'No feed', 'instagram-slider-widget' );
184
+ }
185
+
186
+ /**
187
+ * Method renders layout template
188
+ *
189
+ * @param string $template_name Template name without ".php"
190
+ *
191
+ * @param array $args Template arguments
192
+ *
193
+ * @return false|string
194
+ */
195
+ private function render_template( $template_name, $args ) {
196
+ $path = "";
197
+ $path_component = WFB_COMPONENT_DIR . "/html_templates/$template_name.php";
198
+ if ( file_exists( $path_component ) ) {
199
+ $path = $path_component;
200
+ }
201
+
202
+ if ( $path ) {
203
+ ob_start();
204
+ include $path;
205
+ extract( $args );
206
+
207
+ return ob_get_clean();
208
+ } else {
209
+ return 'This template does not exist!';
210
+ }
211
+ }
212
+ }
213
+
214
+ ?>
components/facebook/includes/functions.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ add_shortcode( 'cm_facebook_feed', 'cm_facebook_feed_shortcode' );
3
+ /**
4
+ * Add shortcode function
5
+ *
6
+ * @param array $atts shortcode attributes
7
+ *
8
+ * @return string
9
+ */
10
+ function cm_facebook_feed_shortcode( $atts ) {
11
+ $atts = shortcode_atts( [ 'id' => '' ], $atts, 'cm_facebook_feed' );
12
+
13
+ $feeds = new WIS_Feeds( 'facebook' );
14
+ $feed = $feeds->get_feed( $atts['id'] );
15
+
16
+ if ( $feed ) {
17
+ return $feed->display_images();
18
+ }
19
+
20
+ return "";
21
+ }
22
+
components/facebook/load.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ global $wis_compatibility;
3
+
4
+ define( 'WFB_COMPONENT_VERSION', $wis_compatibility->get_plugin_version() );
5
+ define( 'WFB_COMPONENT_URL', WIS_COMPONENTS_URL . '/facebook' );
6
+ define( 'WFB_COMPONENT_DIR', WIS_COMPONENTS_DIR . '/facebook' );
7
+ define( 'WFB_COMPONENT_VIEWS_DIR', WFB_COMPONENT_DIR . '/html_templates' );
8
+
9
+ define( 'WIS_FACEBOOK_ACCOUNT_PROFILES_OPTION_NAME', 'facebook_account_profiles' );
10
+
11
+ define( 'WFB_FACEBOOK_SELF_URL', 'https://graph.facebook.com/' );
12
+
13
+ require_once WFB_COMPONENT_DIR . "/includes/functions.php";
14
+ require_once WFB_COMPONENT_DIR . "/includes/Api/facebook-account.php";
15
+ require_once WFB_COMPONENT_DIR . "/includes/Api/facebook-api.php";
16
+ require_once WFB_COMPONENT_DIR . "/includes/Api/facebook-post.php";
17
+ require_once WFB_COMPONENT_DIR . "/includes/Api/facebook-post-attachment.php";
18
+ require_once WFB_COMPONENT_DIR . "/includes/class-facebook-feed.php";
19
+ require_once WFB_COMPONENT_DIR . "/includes/class-facebook-profiles.php";
20
+ require_once WFB_COMPONENT_DIR . "/includes/class-facebook-widget.php";
21
+
components/instagram/assets/admin/js/instagram-scripts.js ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function ($) {
2
+ $(document).ready(function ($) {
3
+ var modal = jQuery('#wis_accounts_modal');
4
+ var modalOverlay = jQuery('#wis_modal_overlay');
5
+ var spinOverlay = jQuery('.wis-overlay-spinner');
6
+
7
+ modalOverlay.on("click", function () {
8
+ var conf = confirm("You haven't finished adding an account. Are you sure you want to close the window?");
9
+ if (conf) {
10
+ modal.toggleClass("wis_closed");
11
+ modalOverlay.toggleClass("wis_closed");
12
+ spinOverlay.toggleClass("is-active");
13
+ }
14
+ });
15
+
16
+ jQuery('.wis_modal_content #wis-instagram-row').on('click', function (e) {
17
+ modal.toggleClass("wis_closed");
18
+ spinOverlay.addClass('is-active');
19
+ wis_account = $(this).attr('data-account');
20
+ jQuery.post(ajaxurl, {
21
+ action: 'wis_add_account_by_token',
22
+ account: wis_account,
23
+ _ajax_nonce: wig.nonce
24
+ }).done(function (html) {
25
+ //console.log(html);
26
+ window.location.reload();
27
+ });
28
+ });
29
+
30
+ /*
31
+ * Chose API to add account
32
+ * */
33
+ var modal2 = jQuery('#wis_add_account_modal');
34
+ var modal2Overlay = jQuery('#wis_add_account_modal_overlay');
35
+ modal2Overlay.on("click", function () {
36
+ var conf = confirm("You haven't finished adding an account. Are you sure you want to close the window?");
37
+ if (conf) {
38
+ modal2.toggleClass("wis_closed");
39
+ modal2Overlay.toggleClass("wis_closed");
40
+ }
41
+ });
42
+
43
+ jQuery('#wis-add-account-button .wis-btn-instagram-account').on('click', function (e) {
44
+ e.preventDefault();
45
+ modal2.removeClass('wis_closed');
46
+ modal2Overlay.removeClass('wis_closed');
47
+ });
48
+ }); // Document Ready
49
+ })(jQuery);
{assets → components/instagram/assets}/css/instag-slider.css RENAMED
@@ -3,6 +3,7 @@
3
  {
4
  margin: 0;
5
  padding: 0;
 
6
  }
7
 
8
  .pllexislider .slides > li
@@ -549,7 +550,7 @@
549
  {
550
  position: absolute;
551
  content: '';
552
- background-image: url('../in.png');
553
  background-repeat: no-repeat;
554
  background-position: -32px -32px;
555
  background-color: transparent !important;
@@ -569,7 +570,7 @@
569
  {
570
  position: absolute;
571
  content: '';
572
- background-image: url('../in.png');
573
  background-repeat: no-repeat;
574
  background-position: 4px -4px;
575
  height: 32px;
@@ -584,7 +585,7 @@
584
  {
585
  position: absolute;
586
  content: '';
587
- background-image: url('../in.png');
588
  background-repeat: no-repeat;
589
  background-position: 3px -42px;
590
  height: 32px;
3
  {
4
  margin: 0;
5
  padding: 0;
6
+ direction: ltr! important;
7
  }
8
 
9
  .pllexislider .slides > li
550
  {
551
  position: absolute;
552
  content: '';
553
+ background-image: url('../img/in.png');
554
  background-repeat: no-repeat;
555
  background-position: -32px -32px;
556
  background-color: transparent !important;
570
  {
571
  position: absolute;
572
  content: '';
573
+ background-image: url('../img/in.png');
574
  background-repeat: no-repeat;
575
  background-position: 4px -4px;
576
  height: 32px;
585
  {
586
  position: absolute;
587
  content: '';
588
+ background-image: url('../img/in.png');
589
  background-repeat: no-repeat;
590
  background-position: 3px -42px;
591
  height: 32px;
{assets → components/instagram/assets}/css/jr-insta.css RENAMED
File without changes
{assets → components/instagram/assets}/css/wis-header.css RENAMED
File without changes
{assets → components/instagram/assets/img}/image.png RENAMED
File without changes
{assets → components/instagram/assets/img}/in.png RENAMED
File without changes
{assets → components/instagram/assets}/img/spinner.svg RENAMED
File without changes
{assets → components/instagram/assets}/js/jquery.flexslider-min.js RENAMED
File without changes
{assets → components/instagram/assets}/js/jr-insta.js RENAMED
File without changes
components/instagram/html_templates/accounts.php ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var array $args
4
+ * @var bool $is_premium
5
+ * @var string $authorize_url_instagram
6
+ * @var string $authorize_url_business
7
+ * @var array $accounts
8
+ * @var array $accounts_business
9
+ */
10
+
11
+ $social = $args['social'];
12
+ $count_accounts = count( $accounts ) + count( $accounts_business );
13
+ ?>
14
+ <div id="wis-add-account-button" class="">
15
+ <?php
16
+ if ( $count_accounts >= 1 && ! $is_premium ) : ?>
17
+ <span class="wis-btn-instagram-account-disabled btn-instagram-account-disabled">
18
+ <?php _e( 'Add Account', 'instagram-slider-widget' ) ?></span>
19
+ <span class="instagram-account-pro"><?php echo sprintf( __( "More accounts in <a href='%s'>PRO version</a>", 'instagram-slider-widget' ), WIS_Plugin::app()->get_support()->get_pricing_url( true, "wis_settings" ) ); ?></span>
20
+ <?php else: ?>
21
+ <a class="wis-btn-instagram-account" target="_self" href="#" title="Add Account">
22
+ <?php _e( 'Add Account', 'instagram-slider-widget' ) ?>
23
+ </a>
24
+ <span style="float: none; margin-top: 0;" class="spinner" id="wis-spinner"> </span>
25
+ <?php endif; ?>
26
+ </div>
27
+ <!-- Personal accounts -->
28
+ <?php
29
+ if ( count( $accounts ) ) :
30
+ ?>
31
+ <div class="wis-social-group"><?php echo __( 'Personal Accounts', 'instagram-slider-widget' ); ?></div>
32
+ <table class="widefat wis-table wis-personal-status">
33
+ <thead>
34
+ <tr>
35
+ <th class="wis-profile-picture"><?php echo __( 'Image', 'instagram-slider-widget' ); ?></th>
36
+ <th class="wis-profile-id"><?php echo __( 'ID', 'instagram-slider-widget' ); ?></th>
37
+ <th class="wis-profile-name"><?php echo __( 'User', 'instagram-slider-widget' ); ?></th>
38
+ <th class="wis-profile-token"><?php echo __( 'Token', 'instagram-slider-widget' ); ?></th>
39
+ <th class="wis-profile-actions"><?php echo __( 'Action', 'instagram-slider-widget' ); ?></th>
40
+ </tr>
41
+ </thead>
42
+ <tbody>
43
+ <?php
44
+ foreach ( $accounts as $key => $profile_info ) {
45
+ $delete_link = $this->getActionUrl( 'delete', [ 'social' => $social, 'business' => false, 'account' => $key ] );
46
+ ?>
47
+ <tr>
48
+ <td class="wis-profile-picture"></td>
49
+ <td class="wis-profile-id"><?php echo esc_attr( $profile_info['id'] ); ?></td>
50
+ <td class="wis-profile-name">
51
+ <a href="https://www.instagram.com/<?php echo esc_html( $profile_info['username'] ); ?>">@<?php echo esc_html( $profile_info['username'] ); ?></a>
52
+ </td>
53
+ <td class="wis-profile-token">
54
+ <input id="<?php echo esc_attr( $profile_info['id'] ); ?>-account-access-token" type="text" value="<?php echo esc_attr( $profile_info['token'] ); ?>"
55
+ class="wis-text-token" readonly/>
56
+ </td>
57
+ <td class="wis-profile-actions">
58
+ <a href="<?php echo $delete_link; ?>" class="btn btn-danger wis-delete-account">
59
+ <span class="dashicons dashicons-trash"></span><?php echo __( 'Delete', 'instagram-slider-widget' ); ?>
60
+ </a>
61
+ <?php
62
+ if ( isset( $_GET['access_token'] ) && $_GET['access_token'] === $profile_info['token'] ) {
63
+ ?><span class="wis-div-added">Successfully connected</span><?php
64
+ }
65
+ ?>
66
+ </td>
67
+ </tr>
68
+ <?php
69
+ }
70
+ ?>
71
+ </tbody>
72
+ </table>
73
+ <?php wp_nonce_field( $this->plugin->getPrefix() . 'settings_form', $this->plugin->getPrefix() . 'nonce' ); ?>
74
+ <?php endif; ?>
75
+ <!-- Business accounts -->
76
+ <?php
77
+ if ( count( $accounts_business ) ) :
78
+ ?>
79
+ <div class="wis-social-group"><?php echo __( 'Business Accounts', 'instagram-slider-widget' ); ?></div>
80
+ <table class="widefat wis-table wis-business-status">
81
+ <thead>
82
+ <tr>
83
+ <th class="wis-profile-picture"><?php echo __( 'Image', 'instagram-slider-widget' ); ?></th>
84
+ <th class="wis-profile-id"><?php echo __( 'ID', 'instagram-slider-widget' ); ?></th>
85
+ <th class="wis-profile-name"><?php echo __( 'User', 'instagram-slider-widget' ); ?></th>
86
+ <th class="wis-profile-token"><?php echo __( 'Token', 'instagram-slider-widget' ); ?></th>
87
+ <th class="wis-profile-action"><?php echo __( 'Action', 'instagram-slider-widget' ); ?></th>
88
+ </tr>
89
+ </thead>
90
+ <tbody>
91
+ <?php
92
+ foreach ( $accounts_business as $key => $profile_info ) {
93
+ $delete_link = $this->getActionUrl( 'delete', [ 'social' => $social, 'business' => true, 'account' => $key ] );
94
+ $image = $profile_info['profile_picture_url'];
95
+ $fullname = $profile_info['name'];
96
+ ?>
97
+ <tr>
98
+ <td class="wis-profile-picture">
99
+ <img src="<?php echo esc_url( $image ); ?>"
100
+ width="30"/>
101
+ </td>
102
+ <td class="wis-profile-id"><?php echo esc_attr( $profile_info['id'] ); ?></td>
103
+ <td class="wis-profile-name">
104
+ <?php echo esc_html( $fullname ); ?> <a
105
+ href="https://www.instagram.com/<?php echo esc_html( $profile_info['username'] ); ?>">@<?php echo esc_html( $profile_info['username'] ); ?></a>
106
+ </td>
107
+ <td class="wis-profile-token">
108
+ <input id="<?php echo esc_attr( $profile_info['id'] ); ?>-business-account-access-token"
109
+ type="text"
110
+ value="<?php echo esc_attr( $profile_info['token'] ); ?>"
111
+ class="wis-text-token" readonly/>
112
+ </td>
113
+ <td class="wis-profile-actions">
114
+ <a href="<?php echo $delete_link; ?>" class="btn btn-danger wis-delete-account">
115
+ <span class="dashicons dashicons-trash"></span><?php echo __( 'Delete', 'instagram-slider-widget' ); ?>
116
+ </a>
117
+ <span class="spinner"
118
+ id="wis-delete-spinner-<?php echo esc_attr( $profile_info['id'] ); ?>"></span>
119
+ <span class="wis-div-added"
120
+ style="display: none;"><?php _e( 'Successfully connected', 'instagram-slider-widget' ); ?></span>
121
+ </td>
122
+ </tr>
123
+ <?php
124
+ }
125
+ ?>
126
+ </tbody>
127
+ </table>
128
+ <?php wp_nonce_field( $this->plugin->getPrefix() . 'settings_form', $this->plugin->getPrefix() . 'nonce' ); ?>
129
+ <?php endif; ?>
130
+
131
+ <div id="wis_add_account_modal" class="wis_accounts_modal wis_closed">
132
+ <div class="wis_modal_header">
133
+ Select type of account
134
+ </div>
135
+ <div class="wis_modal_content">
136
+
137
+ <div class='wis-row-style'>
138
+ <a href="<?php echo $authorize_url_instagram; ?>" class='wis-btn-instagram-account'>Personal
139
+ account</a>
140
+ </div>
141
+ <div class='wis-row-style'>
142
+ <a href="<?php echo $authorize_url_business; ?>" class='wis-btn-facebook-account'>Business
143
+ account</a>
144
+ </div>
145
+ </div>
146
+ </div>
147
+ <div id="wis_add_account_modal_overlay" class="wis_modal_overlay wis_closed"></div>
components/instagram/html_templates/feeds.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var WIS_FeedsPage $this
4
+ * @var array $data
5
+ * @var array $feeds
6
+ * @var string $social
7
+ */
8
+ ?>
9
+ <div class="wisw-social-content">
10
+ <div class="wisw-container-row">
11
+ <a href="<?php echo $this->getActionUrl( 'add', [ 'social' => $social ] ); ?>"
12
+ class="button action wis-add-feed-button"><?php _e( 'Add feed', 'instagram-slider-widget' ); ?></a>
13
+ </div>
14
+
15
+ <div class="wisw-container-row">
16
+ <table class="widefat wis-table wis-personal-status">
17
+ <thead>
18
+ <tr>
19
+ <th class="wis-profile-name"><?php echo __( 'Name', 'instagram-slider-widget' ); ?></th>
20
+ <th class="wis-profile-shortcode"><label for="jr_insta_shortcode"><?php echo __( 'Shortcode', 'instagram-slider-widget' ); ?></label></th>
21
+ <th class="wis-profile-actions"><?php echo __( 'Action', 'instagram-slider-widget' ); ?></th>
22
+ </tr>
23
+ </thead>
24
+ <tbody>
25
+ <?php
26
+ if ( count( $feeds ) ) :
27
+ foreach ( $feeds as $feed_id => $feed ) {
28
+ $edit_link = $this->getActionUrl( 'edit', [ 'social' => $social, 'feed' => $feed_id ] );
29
+ $delete_link = $this->getActionUrl( 'delete', [ 'social' => $social, 'feed' => $feed_id ] );
30
+ ?>
31
+ <tr>
32
+ <td class="wis-profile-name">
33
+ <a href="<?php echo $edit_link; ?>">
34
+ <?php echo $feed->title; ?>
35
+ </a>
36
+ </td>
37
+ <td class="wis-profile-shortcode">
38
+ <input id="jr_insta_shortcode" onclick="this.setSelectionRange(0, this.value.length)" type="text" class="form-input wis-shortcode-input"
39
+ value="[jr_instagram id=&quot;<?php echo $feed_id ?>&quot;]" readonly="readonly">
40
+ </td>
41
+ <td class="wis-profile-actions">
42
+ <a href="<?php echo $edit_link; ?>" class="btn btn-primary">
43
+ <span class="dashicons dashicons-edit"></span>
44
+ </a>
45
+ <a href="<?php echo $delete_link; ?>" class="btn btn-danger">
46
+ <span class="dashicons dashicons-trash"></span>
47
+ </a>
48
+ </td>
49
+ </tr>
50
+ <?php
51
+ }
52
+ ?>
53
+ <?php else: ?>
54
+ <tr>
55
+ <td class="wis-profile-nofeed" colspan="3"><?php echo __( 'No feeds', 'instagram-slider-widget' ); ?></td>
56
+ </tr>
57
+ <?php endif; ?>
58
+ </tbody>
59
+ </table>
60
+ </div>
61
+ </div>
components/instagram/html_templates/form-feed.php ADDED
@@ -0,0 +1,595 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* @var array $args */
3
+ $this_feed = $args['_this'];
4
+ $instance = $args['instance'];
5
+ $accounts = $args['accounts'];
6
+ $accounts_business = $args['accounts_business'];
7
+ $sliders = $args['sliders'];
8
+ $options_linkto = $args['options_linkto'];
9
+ $is_update = $args['is_update'];
10
+ $feed_id = $args['instance']['id'] ?? '';
11
+
12
+ $search_for = $instance['search_for'] ?? '';
13
+ ?>
14
+ <div class="wisw-social-content">
15
+ <h2>
16
+ <?php if ( $is_update ) {
17
+ _e( 'Edit feed', 'instagram-slider-widget' );
18
+ } else {
19
+ _e( 'Add feed', 'instagram-slider-widget' );
20
+ } ?>
21
+ </h2>
22
+ <form action="" method="post" name="wis-feed-add-form" id="wis-feed-add-form">
23
+ <div class="jr-container">
24
+ <div class="isw-common-settings">
25
+ <div class="wis-flex-content">
26
+ <div class="wis-flex-content-column">
27
+ <div class="form-group">
28
+ <label for="title" class="form-label"><?php _e( 'Title:', 'instagram-slider-widget' ); ?></label>
29
+ <input class="form-input" id="title"
30
+ name="title"
31
+ value="<?php echo $instance['title']; ?>"/>
32
+ </div>
33
+ <div class="form-group">
34
+ <label for="title"
35
+ class="form-label"><?php _e( 'Search Instagram for', 'instagram-slider-widget' ); ?></label>
36
+ <label class="form-radio form-inline">
37
+ <input type="radio" id="search_for" name="search_for"
38
+ value="account" <?php checked( 'account', $search_for ); ?> />
39
+ <i class="form-icon"></i>
40
+ <?php _e( 'Account', 'instagram-slider-widget' ); ?>
41
+ </label>
42
+ <label class="form-radio form-inline">
43
+ <input type="radio" id="search_for" name="search_for"
44
+ value="account_business" <?php checked( 'account_business', $search_for ); ?> />
45
+ <i class="form-icon"></i>
46
+ <?php _e( 'Business account', 'instagram-slider-widget' ); ?>
47
+ </label>
48
+ <label class="form-radio form-inline">
49
+ <input type="radio" class="" id="search_for" name="search_for"
50
+ value="username" <?php checked( 'username', $search_for ); ?> />
51
+ <i class="form-icon"></i>
52
+ <?php _e( 'Username', 'instagram-slider-widget' ); ?>
53
+ </label>
54
+ <label class="form-radio form-inline">
55
+ <input type="radio" id="search_for" name="search_for"
56
+ value="hashtag" <?php checked( 'hashtag', $search_for ); ?> />
57
+ <i class="form-icon"></i>
58
+ <?php _e( 'Hashtag', 'instagram-slider-widget' ); ?>
59
+ </label>
60
+
61
+ </div>
62
+ <div class="form-group" id="wis-feed-account"
63
+ <?php echo 'account' !== $search_for ? 'style="display:none;"' : ''; ?>>
64
+ <?php
65
+ if ( count( $accounts ) ) {
66
+ ?>
67
+ <label class="form-label" for="account"><?php _e( 'Account', 'instagram-slider-widget' ); ?></label>
68
+ <select id="account" class="form-select"
69
+ name="account"><?php
70
+ foreach ( $accounts as $acc ) {
71
+ $selected = $instance['account'] == $acc['username'] ? "selected='selected'" : "";
72
+ echo "<option value='{$acc['username']}' {$selected}>{$acc['username']}</option>";
73
+ }
74
+ ?>
75
+ </select>
76
+ <?php
77
+ } else {
78
+ ?>
79
+ <label class="form-label"><?php _e( 'Account', 'instagram-slider-widget' ); ?></label>
80
+ <a href="<?php echo admin_url( 'admin.php?page=settings-wisw' ); ?>"><?php _e( 'Add account in settings', 'instagram-slider-widget' ); ?></a>
81
+ <?php
82
+ }
83
+ ?>
84
+ </div>
85
+ <div class="form-group" id="wis-feed-account_business"
86
+ <?php echo 'account_business' !== $search_for ? 'style="display:none;"' : ''; ?>>
87
+ <?php
88
+ if ( count( $accounts_business ) ) {
89
+ ?>
90
+ <label class="form-label"
91
+ for="account_business"><?php _e( 'Business account', 'instagram-slider-widget' ); ?></label>
92
+ <select id="account_business" class="form-select"
93
+ name="account_business">
94
+ <?php foreach ( $accounts_business as $acc ) {
95
+ $selected = $instance['account_business'] == $acc['username'] ? "selected='selected'" : "";
96
+ echo "<option value='{$acc['username']}' {$selected}>{$acc['username']}</option>";
97
+ }
98
+ ?>
99
+ </select>
100
+ <?php
101
+ } else {
102
+ echo "<a href='" . admin_url( 'admin.php?page=settings-wisw' ) . "'>" . __( 'Add account in settings', 'instagram-slider-widget' ) . "</a>";
103
+ }
104
+ ?>
105
+ </div>
106
+ <div class="form-group" id="wis-feed-username"
107
+ <?php echo 'username' !== $search_for ? 'style="display:none;"' : ''; ?>>
108
+ <label class="form-label" for="username"><?php _e( 'Username', 'instagram-slider-widget' ); ?></label>
109
+ <div class="input-group">
110
+ <span class="input-group-addon">instagram.com/</span>
111
+ <input id="username" class="form-input" name="username"
112
+ value="<?php echo $instance['username']; ?>"/>
113
+ </div>
114
+ </div>
115
+ <div class="form-group" id="wis-feed-hashtag"
116
+ <?php echo 'hashtag' !== $search_for ? 'style="display:none;"' : ''; ?>>
117
+ <label class="form-label" for="hashtag"><?php _e( 'Hashtag', 'instagram-slider-widget' ); ?></label>
118
+ <div class="input-group">
119
+ <span class="input-group-addon">#</span>
120
+ <input id="hashtag" class="form-input" name="hashtag"
121
+ value="<?php echo $instance['hashtag']; ?>"/>
122
+ </div>
123
+
124
+ <div class="jr-description hashtag-problem-info <?php echo 'hashtag' !== $search_for ? 'hidden' : ''; ?>">
125
+ <?php _e( 'If you have problems displaying by hashtag, please connect your business account and select display by hashtag again', 'instagram-slider-widget' ); ?>
126
+ </div>
127
+
128
+ <label class="form-label"
129
+ for="blocked_users"><?php _e( 'Block Users', 'instagram-slider-widget' ); ?></label>
130
+ <input class="form-input" id="blocked_users" name="blocked_users"
131
+ value="<?php echo $instance['blocked_users']; ?>"/>
132
+ <div class="jr-description"><?php _e( 'Enter words separated by commas whose images you don\'t want to show', 'instagram-slider-widget' ); ?></div>
133
+ </div>
134
+ <div class="form-group">
135
+ <div class="input-group">
136
+ <label class="form-label form-inline"
137
+ for="refresh_hour"><?php _e( 'Check for new images every:', 'instagram-slider-widget' ); ?></label>
138
+ <div class="input-group">
139
+ <input class="form-input" type="number" min="1" max="200" id="refresh_hour" name="refresh_hour"
140
+ value="<?php echo $instance['refresh_hour']; ?>"/>
141
+ <span class="input-group-addon"><?php _e( 'hours', 'instagram-slider-widget' ); ?></span>
142
+ </div>
143
+ </div>
144
+ </div>
145
+ </div>
146
+ <div class="wis-flex-content-column">
147
+ <?php if ( $feed_id ) : ?>
148
+ <div id="wis-field-jr_insta_shortcode" class="form-group">
149
+ <label class="form-label" for="jr_insta_shortcode">
150
+ <?php _e( 'Shortcode of this feed:', 'instagram-slider-widget' ); ?>
151
+ </label>
152
+ <input id="jr_insta_shortcode" onclick="this.setSelectionRange(0, this.value.length)" type="text" class="form-input"
153
+ value="[jr_instagram id=&quot;<?php echo $feed_id ?>&quot;]"
154
+ readonly="readonly" style="border:none; color:black; font-family:monospace;">
155
+ <div class="jr-description"><?php _e( 'Use this shortcode in any page or post to display images with this configuration!', 'instagram-slider-widget' ) ?></div>
156
+ </div>
157
+ <?php endif; ?>
158
+ </div>
159
+ </div>
160
+ </div>
161
+
162
+ <div class="isw-tabs">
163
+ <ul>
164
+ <li class="desk_tab active" id="desk_tab_<?= $feed_id ?>" data-tab-id="<?= $feed_id ?>"><?php _e( 'Desktop', 'instagram-slider-widget' ); ?></li>
165
+ <li class="mob_tab" id="mob_tab_<?= $feed_id ?>" data-tab-id="<?= $feed_id ?>"><?php _e( 'Mobile', 'instagram-slider-widget' ); ?></li>
166
+ </ul>
167
+ </div>
168
+
169
+ <div class="isw-tabs-content" id="widget_tabs_<?= $feed_id ?>" data-widget-id="<?= $feed_id ?>">
170
+ <div id="desk_tab_content_<?= $feed_id ?>" class="desk_settings">
171
+ <h3 style="width: 100%; text-align: center"><?php _e( 'Desktop settings', 'instagram-slider-widget' ); ?></h3>
172
+ <div class="wis-flex-content">
173
+ <div class="wis-flex-content-column">
174
+ <div id="wis-field-images_number" class="form-group">
175
+ <div class="input-group">
176
+ <label class="form-label form-inline"
177
+ for="images_number"><?php _e( 'Count of images to show:', 'instagram-slider-widget' ); ?>
178
+ </label>
179
+ <div class="input-group">
180
+ <input class="form-input" type="number" min="1" max="" id="images_number" name="images_number"
181
+ value="<?php echo $instance['images_number']; ?>"/>
182
+ <span class="input-group-addon"><?php _e( 'pcs', 'instagram-slider-widget' ); ?></span>
183
+ </div>
184
+ </div>
185
+ <div class="jr-description">
186
+ <?php if ( ! $this->plugin->is_premium() ) {
187
+ _e( 'Maximum 20 images in free version.', 'instagram-slider-widget' );
188
+ echo " " . sprintf( __( "More in <a href='%s'>PRO version</a>", 'instagram-slider-widget' ), $this->plugin->get_support()->get_pricing_url( true, "wis_widget_settings" ) );
189
+ }
190
+ ?>
191
+ </div>
192
+
193
+ </div>
194
+ <div id="wis-field-words_in_caption" class="form-group"
195
+ <?php echo ( 'thumbs' == $instance['template'] || 'thumbs-no-border' == $instance['template'] || 'highlight' == $instance['template'] || 'slick_slider' == $instance['template'] ) ? 'style="display:none;"' : ''; ?>>
196
+ <div class="input-group">
197
+ <label class="form-label form-inline" for="caption_words">
198
+ <?php _e( 'Number of words in caption:', 'instagram-slider-widget' ); ?>
199
+ </label>
200
+ <div class="input-group">
201
+ <input class="form-input" type="number" min="0" max="" id="caption_words" name="caption_words"
202
+ value="<?php echo $instance['caption_words']; ?>"/>
203
+ <span class="input-group-addon"><?php _e( 'pcs', 'instagram-slider-widget' ); ?></span>
204
+ </div>
205
+ </div>
206
+ </div>
207
+ <div id="wis-field-orderby" class="form-group">
208
+ <label class="form-label" for="orderby"><?php _e( 'Order by', 'instagram-slider-widget' ); ?></label>
209
+ <select class="form-select" name="orderby" id="orderby">
210
+ <option value="date-ASC" <?php selected( $instance['orderby'], 'date-ASC', true ); ?>><?php _e( 'Date - Ascending', 'instagram-slider-widget' ); ?></option>
211
+ <option value="date-DESC" <?php selected( $instance['orderby'], 'date-DESC', true ); ?>><?php _e( 'Date - Descending', 'instagram-slider-widget' ); ?></option>
212
+ <option value="popular-ASC" <?php selected( $instance['orderby'], 'popular-ASC', true ); ?>><?php _e( 'Popularity - Ascending', 'instagram-slider-widget' ); ?></option>
213
+ <option value="popular-DESC" <?php selected( $instance['orderby'], 'popular-DESC', true ); ?>><?php _e( 'Popularity - Descending', 'instagram-slider-widget' ); ?></option>
214
+ <option value="rand" <?php selected( $instance['orderby'], 'rand', true ); ?>><?php _e( 'Random', 'instagram-slider-widget' ); ?></option>
215
+ </select>
216
+ </div>
217
+ <div id="wis-field-images_link" class="form-group" <?php echo 'showcase' == $instance['template'] ? 'style="display:none;' : '' ?>>
218
+ <label class="form-label" for="images_link">
219
+ <?php _e( 'Link to', 'instagram-slider-widget' ); ?>
220
+ </label>
221
+ <select class="form-select" name="images_link"
222
+ id="images_link">
223
+ <?php
224
+ if ( count( $options_linkto ) ) {
225
+ foreach ( $options_linkto as $key => $option ) {
226
+ $selected = selected( $instance['images_link'], $key, false );
227
+ echo "<option value='{$key}' {$selected}>{$option}</option>\n";
228
+ }
229
+ }
230
+ if ( ! $this->plugin->is_premium() ) {
231
+ ?>
232
+ <optgroup label="Available in PRO">
233
+ <option value='1' disabled="disabled">Pop Up</option>
234
+ </optgroup>
235
+ <?php
236
+ }
237
+ ?>
238
+ </select>
239
+ </div>
240
+ <div id="wis-field-custom_url" class="form-group" <?php echo 'custom_url' !== $instance['images_link'] ? 'style="display:none;' : '' ?>>
241
+ <label class="form-label" for="custom_url"><?php _e( 'Custom link:', 'instagram-slider-widget' ); ?></label>
242
+ <input class="form-input" id="custom_url" name="custom_url" value="<?php echo $instance['custom_url']; ?>"/>
243
+ <span class="jr-description"><?php _e( '* use this field only if the above option is set to <strong>Custom Link</strong>', 'instagram-slider-widget' ); ?></span>
244
+ </div>
245
+ <div id="wis-field-show_feed_header" class="form-group"
246
+ <?php echo 'account_business' !== $search_for ? 'style="display:none;"' : ''; ?>>
247
+ <label class="form-switch" for="show_feed_header">
248
+ <input class="form-input" id="show_feed_header" name="show_feed_header" type="checkbox"
249
+ value="1" <?php checked( '1', $instance['show_feed_header'] ); ?> />
250
+ <i class="form-icon"></i>
251
+ <?php _e( 'Show feed header', 'instagram-slider-widget' ); ?>
252
+ </label>
253
+ </div>
254
+ <div id="wis-field-enable_stories" class="form-group"
255
+ <?php echo 'account_business' !== $search_for ? 'style="display:none;"' : ''; ?>>
256
+ <label class="form-switch" for="enable_stories">
257
+ <input class="form-input" id="enable_stories" name="enable_stories" type="checkbox"
258
+ value="1" <?php echo $this->plugin->is_premium() ? checked( '1', $instance['enable_stories'] ) : ''; ?>
259
+ <?php echo ! $this->plugin->is_premium() ? 'disabled' : ''; ?>/>
260
+ <i class="form-icon"></i><?php _e( 'Show Stories', 'instagram-slider-widget' ); ?>
261
+ </label>
262
+ <div class="jr-description">
263
+ <?php if ( $this->plugin->is_premium() ) {
264
+ _e( 'Works only with business account.', 'instagram-slider-widget' );
265
+ } else {
266
+ _e( 'Available in PRO version.', 'instagram-slider-widget' );
267
+ echo " " . sprintf( __( "More in <a href='%s'>PRO version</a>", 'instagram-slider-widget' ), $this->plugin->get_support()->get_pricing_url( true, "wis_widget_settings" ) );
268
+ }
269
+ ?>
270
+ </div>
271
+ </div>
272
+ <div id="wis-field-enable_ad" class="form-group">
273
+ <label class="form-switch" for="enable_ad">
274
+ <input class="form-input" id="enable_ad" name="enable_ad" type="checkbox"
275
+ value="1" <?php checked( '1', $instance['enable_ad'] ); ?> />
276
+ <i class="form-icon"></i><?php _e( 'Enable author\'s ad', 'instagram-slider-widget' ); ?>
277
+ </label>
278
+ </div>
279
+ <div id="wis-field-enable_icons" class="form-group">
280
+ <label class="form-switch" for="enable_icons">
281
+ <input class="form-input" id="enable_icons" name="enable_icons" type="checkbox"
282
+ value="1" <?php checked( '1', $instance['enable_icons'] ); ?> />
283
+ <i class="form-icon"></i><?php _e( 'Enable instagram icons', 'instagram-slider-widget' ); ?>
284
+ </label>
285
+ </div>
286
+ <div id="wis-field-blocked_words" class="form-group"
287
+ <?php echo 'hashtag' == $search_for ? 'style="display:none;"' : ''; ?>>
288
+ <label class="form-label" for="blocked_words">
289
+ <?php _e( 'Block words', 'instagram-slider-widget' ); ?>
290
+ </label>
291
+ <input class="form-input" id="blocked_words" name="blocked_words"
292
+ value="<?php echo $instance['blocked_words']; ?>"/>
293
+ <div class="jr-description"><?php _e( 'Enter comma-separated words. If one of them occurs in the image description, the image will not be displayed', 'instagram-slider-widget' ); ?></div>
294
+ </div>
295
+ <div id="wis-field-allowed_words" class="form-group"
296
+ <?php echo 'hashtag' == $search_for ? 'style="display:none;"' : ''; ?>>
297
+ <label class="form-label" for="allowed_words">
298
+ <?php _e( 'Allow words', 'instagram-slider-widget' ); ?>
299
+ </label>
300
+ <input class="form-input" id="allowed_words"
301
+ name="allowed_words"
302
+ value="<?php echo $instance['allowed_words']; ?>"/>
303
+ <div class="jr-description"><?php _e( 'Enter comma-separated words. If one of them occurs in the image description, the image will be displayed', 'instagram-slider-widget' ); ?></div>
304
+ </div>
305
+ </div>
306
+ <div class="wis-flex-content-column">
307
+ <div id="wis-field-template" class="form-group">
308
+ <label class="form-label" for="template">
309
+ <?php _e( 'Template', 'instagram-slider-widget' ); ?>
310
+ </label>
311
+ <select class="form-select" name="template" id="template">
312
+ <?php
313
+ if ( count( $sliders ) ) {
314
+ foreach ( $sliders as $key => $slider ) {
315
+ $selected = ( $instance['template'] == $key ) ? "selected='selected'" : '';
316
+ echo "<option value='{$key}' {$selected}>{$slider}</option>\n";
317
+ }
318
+ }
319
+ if ( ! $this->plugin->is_premium() ) {
320
+ ?>
321
+ <optgroup label="Available in PRO">
322
+ <option value='slick_slider' disabled="disabled">Slick</option>
323
+ <option value='masonry' disabled="disabled">Masonry</option>
324
+ <option value='highlight' disabled="disabled">Highlight</option>
325
+ <option value='showcase' disabled="disabled">Shopifeed - Thumbnails</option>
326
+ <option value="masonry_lite" disabled="disabled">Masonry Lite</option>
327
+ </optgroup>
328
+ <?php
329
+ }
330
+ ?>
331
+ </select>
332
+ <div id="masonry_notice"
333
+ class="masonry_notice jr-description <?php if ( 'masonry' != $instance['template'] ) {
334
+ echo 'hidden';
335
+ } ?>">
336
+ <?php _e( "Not recommended for <strong>sidebar</strong>" ) ?></div>
337
+ </div>
338
+ <div class="thumbs_settings" <?php echo ( 'thumbs' != $instance['template'] && 'thumbs-no-border' != $instance['template'] ) ? 'style="display:none;"' : ''; ?>>
339
+ <div id="wis-field-columns" class="form-group">
340
+ <label class="form-label form-inline" for="columns">
341
+ <?php _e( 'Number of Columns:', 'instagram-slider-widget' ); ?>
342
+ </label>
343
+ <input class="form-input" id="columns" name="columns" type="number" min="1" max="10"
344
+ value="<?php echo $instance['columns']; ?>"/>
345
+ <div class='jr-description'><?php _e( 'max is 10 ( only for thumbnails template )', 'instagram-slider-widget' ); ?></div>
346
+ </div>
347
+ </div>
348
+ <div class="masonry_settings" <?php echo 'masonry' != $instance['template'] ? 'style="display:none;"' : ''; ?>>
349
+ <div id="wis-field-gutter" class="form-group">
350
+ <div class="input-group">
351
+ <label class="form-label form-inline" for="gutter">
352
+ <?php _e( 'Vertical space between item elements:', 'instagram-slider-widget' ); ?>
353
+ </label>
354
+ <div class="input-group">
355
+ <input class="form-input" id="gutter" name="gutter" type="number" min="0" max=""
356
+ value="<?php echo $instance['gutter']; ?>"/>
357
+ <span class="input-group-addon"><?php _e( 'px', 'instagram-slider-widget' ); ?></span>
358
+ </div>
359
+ </div>
360
+ </div>
361
+ <div id="wis-field-masonry_image_width" class="form-group">
362
+ <div class="input-group">
363
+ <label class="form-label form-inline" for="masonry_image_width">
364
+ <?php _e( 'Image width:', 'instagram-slider-widget' ); ?>
365
+ </label>
366
+ <div class="input-group">
367
+ <input class="form-input" id="masonry_image_width" name="masonry_image_width" type="number" min="0" max=""
368
+ value="<?php echo $instance['masonry_image_width']; ?>"/>
369
+ <span class="input-group-addon"> <?php _e( 'px', 'instagram-slider-widget' ); ?> </span>
370
+ </div>
371
+ </div>
372
+ </div>
373
+ </div>
374
+ <div class="masonry_lite_settings" <?php echo 'masonry_lite' != $instance['template'] ? 'style="display:none;"' : ''; ?>>
375
+ <div id="wis-field-masonry-cols" class="form-group">
376
+ <div class="input-group">
377
+ <label class="form-label form-inline" for="masonry_lite_cols">
378
+ <?php _e( 'Columns:', 'instagram-slider-widget' ); ?>
379
+ </label>
380
+ <div class="input-group">
381
+ <input class="form-input" id="masonry_lite_cols" name="masonry_lite_cols"
382
+ type="number" min="1"
383
+ max="6"
384
+ value="<?php echo $instance['masonry_lite_cols']; ?>"/>
385
+ <span class="input-group-addon"><?php _e( 'cols', 'instagram-slider-widget' ); ?></span>
386
+ </div>
387
+ </div>
388
+ </div>
389
+
390
+ <div id="wis-field-masonry-gap" class="form-group">
391
+ <div class="input-group">
392
+ <label class="form-label form-inline" for="masonry_lite_gap">
393
+ <?php _e( 'Gap:', 'instagram-slider-widget' ); ?>
394
+ </label>
395
+ <div class="input-group">
396
+ <input class="form-input" id="masonry_lite_gap" name="masonry_lite_gap"
397
+ type="number"
398
+ value="<?php echo $instance['masonry_lite_gap']; ?>"/>
399
+ <span class="input-group-addon"><?php _e( 'px', 'instagram-slider-widget' ); ?></span>
400
+ </div>
401
+ </div>
402
+ </div>
403
+
404
+ </div>
405
+ <div class="slick_settings" <?php echo 'slick_slider' != $instance['template'] ? 'style="display:none;"' : ''; ?>>
406
+ <div id="wis-field-enable_control_buttons" class="form-group">
407
+ <label class="form-switch" for="enable_control_buttons">
408
+ <input class="form-input" id="enable_control_buttons" name="enable_control_buttons" type="checkbox" value="1"
409
+ <?php checked( '1', $instance['enable_control_buttons'] ); ?> />
410
+ <i class="form-icon"></i><?php _e( 'Enable control buttons', 'instagram-slider-widget' ); ?>
411
+ </label>
412
+ </div>
413
+
414
+ <div id="wis-field-keep_ratio" class="form-group">
415
+ <label class="form-switch" for="keep_ratio">
416
+ <input class="form-input" id="keep_ratio" name="keep_ratio" type="checkbox" value="1"
417
+ <?php checked( '1', $instance['keep_ratio'] ); ?> />
418
+ <i class="form-icon"></i><?php _e( 'Keep 1x1 Instagram ratio', 'instagram-slider-widget' ); ?>
419
+ </label>
420
+ </div>
421
+
422
+ <div id="wis-field-slick_img_size" class="form-group">
423
+ <div class="input-group">
424
+ <label class="form-label" for="slick_img_size">
425
+ <?php _e( 'Images size: ', 'instagram-slider-widget' ); ?>
426
+ </label>
427
+ <div class="input-group">
428
+ <input class="form-input" type="number" min="1" max="500" step="1" id="slick_img_size" name="slick_img_size"
429
+ value="<?php echo $instance['slick_img_size']; ?>"/>
430
+ <span class="input-group-addon"><?php _e( 'px', 'instagram-slider-widget' ); ?></span>
431
+ </div>
432
+ </div>
433
+ </div>
434
+
435
+ <div id="wis-field-slick_slides_to_show" class="form-group">
436
+ <div class="input-group">
437
+ <label class="form-label" for="slick_slides_to_show">
438
+ <?php _e( 'Pictures per slide:', 'instagram-slider-widget' ); ?>
439
+ </label>
440
+ <div class="input-group">
441
+ <input class="form-input" id="slick_slides_to_show" type="number" min="1" max="" step="1" name="slick_slides_to_show"
442
+ value="<?php echo $instance['slick_slides_to_show']; ?>"/>
443
+ <span class="input-group-addon"><?php _e( 'pcs', 'instagram-slider-widget' ); ?></span>
444
+ </div>
445
+ </div>
446
+ </div>
447
+
448
+ <div id="wis-field-slick_sliding_speed" class="form-group">
449
+ <div class="input-group">
450
+ <label class="form-label" for="slick_sliding_speed">
451
+ <?php _e( 'Sliding speed:', 'instagram-slider-widget' ); ?>
452
+ </label>
453
+ <div class="input-group">
454
+ <input class="form-input" id="slick_sliding_speed" type="number" min="1" max="" name="slick_sliding_speed"
455
+ value="<?php echo $instance['slick_sliding_speed']; ?>"/>
456
+ <span class="input-group-addon"><?php _e( 'ms', 'instagram-slider-widget' ); ?></span>
457
+ </div>
458
+ </div>
459
+ </div>
460
+
461
+ <div id="wis-field-slick_slides_padding" class="form-group">
462
+ <label class="form-switch" for="slick_slides_padding">
463
+ <input class="form-input" id="slick_slides_padding" name="slick_slides_padding" type="checkbox"
464
+ value="1" <?php checked( '1', $instance['slick_slides_padding'] ); ?> />
465
+ <i class="form-icon"></i><?php _e( 'Space between pictures', 'instagram-slider-widget' ); ?>
466
+ </label>
467
+ </div>
468
+ </div>
469
+ <div class="highlight_settings" <?php echo 'highlight' !== $instance['template'] ? 'style="display:none;"' : ''; ?>>
470
+ <div id="wis-field-highlight_offset" class="form-group">
471
+ <div class="input-group">
472
+ <label class="form-label" for="highlight_offset">
473
+ <?php _e( 'Offset', 'instagram-slider-widget' ); ?>
474
+ </label>
475
+ <div class="input-group">
476
+ <input type="number" min="1" max="" class="form-input" id="highlight_offset" name="highlight_offset"
477
+ value="<?php echo $instance['highlight_offset']; ?>"/>
478
+ </div>
479
+ </div>
480
+ </div>
481
+
482
+ <div id="wis-field-highlight_pattern" class="form-group">
483
+ <div class="input-group">
484
+ <label class="form-label" for="highlight_pattern">
485
+ <?php _e( 'Pattern', 'instagram-slider-widget' ); ?>
486
+ </label>
487
+ <div class="input-group">
488
+ <input type="number" min="0" class="form-input" id="highlight_pattern" name="highlight_pattern"
489
+ value="<?php echo $instance['highlight_pattern']; ?>"/>
490
+ </div>
491
+ </div>
492
+ </div>
493
+
494
+ </div>
495
+ <div class="shopifeed_settings" <?php echo 'showcase' != $instance['template'] ? 'style="display:none;"' : ''; ?>>
496
+ <div id="wis-field-shopifeed_phone" class="form-group">
497
+ <label class="form-label" for="shopifeed_phone">
498
+ <?php _e( 'Phone', 'instagram-slider-widget' ); ?>
499
+ </label>
500
+ <input type="text" class="form-input" id="shopifeed_phone" name="shopifeed_phone"
501
+ value="<?php echo $instance['shopifeed_phone']; ?>"/>
502
+ <div class="jr-description"><?php _e( "Use for whatsapp messages" ) ?></div>
503
+ </div>
504
+
505
+ <div id="wis-field-shopifeed_color" class="form-group">
506
+ <label class="form-label form-inline" for="shopifeed_color">
507
+ <?php _e( 'Buttons Color', 'instagram-slider-widget' ); ?>
508
+ </label>
509
+ <input type="color" class="shopifeed_color form-inline" id="shopifeed_color" name="shopifeed_color"
510
+ style="border: none !important;"
511
+ value="<?php echo $instance['shopifeed_color']; ?>"/>
512
+ </div>
513
+ <div id="wis-field-shopifeed_columns" class="form-group">
514
+ <div class="input-group">
515
+ <label class="form-label" for="shopifeed_columns">
516
+ <?php _e( 'Columns count', 'instagram-slider-widget' ); ?>
517
+ </label>
518
+ <div class="input-group">
519
+ <input type="number" class="shopifeed_columns" min="1" max="6" id="shopifeed_columns" name="shopifeed_columns"
520
+ value="<?php echo $instance['shopifeed_columns']; ?>"/>
521
+ </div>
522
+ </div>
523
+ </div>
524
+
525
+ </div>
526
+ <div class="slider_normal_settings" <?php echo ( 'slider' != $instance['template'] && 'slider-overlay' != $instance['template'] ) ? 'style="display:none;"' : ''; ?>>
527
+ <div id="wis-field-controls" class="form-group">
528
+ <label class="form-label"><?php _e( 'Slider Navigation Controls:', 'instagram-slider-widget' ); ?></label>
529
+ <label class="form-radio form-inline">
530
+ <input type="radio" id="controls" name="controls" value="prev_next" <?php checked( 'prev_next', $instance['controls'] ); ?> />
531
+ <i class="form-icon"></i><?php _e( 'Prev & Next', 'instagram-slider-widget' ); ?>
532
+ </label>
533
+ <label class="form-radio form-inline">
534
+ <input type="radio" id="controls" name="controls"
535
+ value="numberless" <?php checked( 'numberless', $instance['controls'] ); ?> />
536
+ <i class="form-icon"></i><?php _e( 'Dotted', 'instagram-slider-widget' ); ?>
537
+ </label>
538
+ <label class="form-radio form-inline">
539
+ <input type="radio" id="controls" name="controls" value="none" <?php checked( 'none', $instance['controls'] ); ?> />
540
+ <i class="form-icon"></i><?php _e( 'No Navigation', 'instagram-slider-widget' ); ?>
541
+ </label>
542
+ </div>
543
+ <div id="wis-field-animation" class="form-group">
544
+ <label class="form-label"><?php _e( 'Slider Animation:', 'instagram-slider-widget' ); ?></label>
545
+ <label class="form-radio form-inline">
546
+ <input type="radio" id="animation" name="animation" value="slide" <?php checked( 'slide', $instance['animation'] ); ?> />
547
+ <i class="form-icon"></i><?php _e( 'Slide', 'instagram-slider-widget' ); ?>
548
+ </label>
549
+ <label class="form-radio form-inline">
550
+ <input type="radio" id="animation" name="animation" value="fade" <?php checked( 'fade', $instance['animation'] ); ?> />
551
+ <i class="form-icon"></i><?php _e( 'Fade', 'instagram-slider-widget' ); ?>
552
+ </label>
553
+ </div>
554
+ <div id="wis-field-slidespeed" class="form-group">
555
+ <div class="input-group">
556
+ <label class="form-label" for="slidespeed">
557
+ <?php _e( 'Slide Speed:', 'instagram-slider-widget' ); ?>
558
+ </label>
559
+ <div class="input-group">
560
+ <input type="number" min="1000" step="100" class="form-input" id="slidespeed" name="slidespeed"
561
+ value="<?php echo $instance['slidespeed']; ?>"/>
562
+ <span class="input-group-addon"><?php _e( 'ms', 'instagram-slider-widget' ); ?></span>
563
+ </div>
564
+ </div>
565
+ </div>
566
+ <div id="wis-field-description" class="form-group">
567
+ <label class="form-label" for="description"><?php _e( 'Slider Text Description:', 'instagram-slider-widget' ); ?></label>
568
+ <select size='3' class='form-select' id="description" name="description[]" multiple="multiple">
569
+ <option value='username' <?php $this_feed->selected( $instance['description'], 'username' ); ?>
570
+ class="<?php echo 'hashtag' == $search_for ? 'hidden' : '' ?>"><?php _e( 'Username', 'instagram-slider-widget' ); ?></option>
571
+ <option value='time'<?php $this_feed->selected( $instance['description'], 'time' ); ?>><?php _e( 'Time', 'instagram-slider-widget' ); ?></option>
572
+ <option value='caption'<?php $this_feed->selected( $instance['description'], 'caption' ); ?>><?php _e( 'Caption', 'instagram-slider-widget' ); ?></option>
573
+ </select>
574
+ <span class="jr-description"><?php _e( 'Hold ctrl and click the fields you want to show/hide on your slider. Leave all unselected to hide them all. Default all selected.', 'instagram-slider-widget' ) ?></span>
575
+ </div>
576
+ </div>
577
+ </div>
578
+ </div>
579
+ </div>
580
+ <div id="mob_tab_content_<?= $feed_id ?>" class="mob_settings" style="display: none;">
581
+ <h3 style="width: 100%; text-align: center"><?php _e( 'Mobile settings', 'instagram-slider-widget' ); ?></h3>
582
+ <?php if ( defined( 'WISP_PLUGIN_ACTIVE' ) && $this->plugin->is_premium() ) :
583
+ echo apply_filters( 'wis/mob_settings', '', $this_feed, $instance, $sliders, $options_linkto, $feed_id );
584
+ else: ?>
585
+ <h3 style="width: 100%; text-align: center"><?php _e( 'Mobile settings available only in premium version', 'instagram-slider-widget' ); ?></h3>
586
+ <?php endif; ?>
587
+ </div>
588
+
589
+ </div>
590
+ </div>
591
+ <div class="wis-feed-save-button-container">
592
+ <input name="wis-feed-save-action" class="wbcr-factory-button wbcr-save-button" type="submit" value="<?php _e( 'Save', 'instagram-slider-widget' ); ?>">
593
+ </div>
594
+ </form>
595
+ </div>
html_templates/feed_header_template.php → components/instagram/html_templates/templates/feed_header.php RENAMED
File without changes
components/instagram/html_templates/templates/slider-overlay.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /** @var array $args account data */
3
+
4
+ $images = $args['images'];
5
+ $feed_id = $args['feed_id'];
6
+ $args = $args['template_args'];
7
+
8
+ $direction_nav = ( 'prev_next' === $args['controls'] ) ? 'true' : 'false';
9
+ $control_nav = ( 'numberless' === $args['controls'] ) ? 'true' : 'false';
10
+ $icons = $args['enable_icons'] ? "" : " no-isw-icons";
11
+ $type = $args['type'] ?? '';
12
+ ?>
13
+ <div class='pllexislider pllexislider-overlay instaslider-nr-<?php echo $feed_id; ?>'>
14
+ <ul class='no-bullet slides' id='wis-slides'>
15
+ <?php foreach ( $images as $key => $data ) {
16
+ $time = $data['timestamp'];
17
+ $username = $data['username'];
18
+ $image_url = $data['image'];
19
+ $caption = $data['caption'];
20
+ $nopin = ( 1 == $args['no_pin'] ) ? 'nopin="nopin"' : '';
21
+
22
+ $clean_image_url = WIG_COMPONENT_URL . "/assets/img/image.png";
23
+ $image_src = "<img alt='" . $caption . "' src='{$clean_image_url}' $nopin class='{$data['type']}' style='opacity: 0;'>";
24
+ $image_output = $image_src;
25
+
26
+ if ( $data['link_to'] && $args['images_link'] != 'none' ) {
27
+ $image_output = "<a href='{$data['link_to']}' target='_blank' rel='nofollow noreferrer'";
28
+
29
+ if ( ! empty( $args['link_rel'] ) ) {
30
+ $image_output .= " rel={$args['link_rel']}";
31
+ }
32
+
33
+ if ( ! empty( $args['link_class'] ) ) {
34
+ $image_output .= " class={$args['link_class']}";
35
+ }
36
+ $image_output .= "> $image_src</a>";
37
+ }
38
+ ?>
39
+ <li class="<?php echo $type . $icons; ?>">
40
+ <div id="jr-image-overlay"
41
+ style='background: url(<?php echo $image_url; ?>) no-repeat center center; background-size: cover;'><?php echo $image_output; ?>
42
+ </div>
43
+ <?php if ( $args['description'] ) { ?>
44
+ <div class='jr-insta-wrap'>
45
+ <div class='jr-insta-datacontainer' style=''>
46
+ <?php
47
+ if ( $username && in_array( 'username', $args['description'] ) ) {
48
+ echo "<span class='jr-insta-username'>by <a rel='nofollow noreferrer' href='https://www.instagram.com/{$username}/' style='color:black; font-weight: 600' target='_blank'>{$username}</a></span>\n";
49
+ }
50
+ if ( $time && in_array( 'time', $args['description'] ) ) {
51
+ $time = human_time_diff( $time );
52
+ echo "<strong><span class='jr-insta-time pull-right' style='font-size: 0.9em'>{$time} ago</span></strong><br>\n";
53
+ }
54
+
55
+ if ( $caption != '' && in_array( 'caption', $args['description'] ) ) {
56
+ $caption = preg_replace( '/\@([a-z0-9А-Яа-я_-]+)/u', '&nbsp;<a href="https://www.instagram.com/$1/" rel="nofollow noreferrer" style="color:black; font-weight: 600" target="_blank">@$1</a>&nbsp;', $caption );
57
+ $caption = preg_replace( '/\#([a-zA-Z0-9А-Яа-я_-]+)/u', '&nbsp;<a href="https://www.instagram.com/explore/tags/$1/" style="color:black; font-weight: 600" rel="nofollow noreferrer" target="_blank">$0</a>&nbsp;', $caption );
58
+ echo "<span class='jr-insta-caption' style='text-align: left !important;'>{$caption}</span>\n";
59
+ }
60
+ ?>
61
+ </div>
62
+ </div>
63
+ <?php } ?>
64
+ </li>
65
+ <?php } ?>
66
+ </ul>
67
+ </div>
68
+ <script type='text/javascript'>
69
+ jQuery(document).ready(function ($) {
70
+ $('.instaslider-nr-<?php echo $feed_id; ?>').pllexislider({
71
+ animation: '<?php echo $args['animation']; ?>',
72
+ slideshowSpeed: <?php echo $args['slidespeed']; ?>,
73
+ directionNav: <?php echo $direction_nav; ?>,
74
+ controlNav: <?php echo $control_nav; ?>,
75
+ prevText: '',
76
+ nextText: '',
77
+ start: function (slider) {
78
+ slider.hover(function () {
79
+ slider.find('.pllex-control-nav, .pllex-direction-nav').stop(true, true).fadeIn();
80
+ slider.find('.jr-insta-datacontainer').fadeIn();
81
+ }, function () {
82
+ slider.find('.pllex-control-nav, .pllex-direction-nav').stop(true, true).fadeOut();
83
+ slider.find('.jr-insta-datacontainer').fadeOut();
84
+ });
85
+ }
86
+ });
87
+ });
88
+ </script>
components/instagram/html_templates/templates/slider.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /** @var array $args account data */
3
+
4
+ $images = $args['images'];
5
+ $feed_id = $args['feed_id'];
6
+ $args = $args['template_args'];
7
+
8
+ $direction_nav = ( 'prev_next' === $args['controls'] ) ? 'true' : 'false';
9
+ $control_nav = ( 'numberless' === $args['controls'] ) ? 'true' : 'false';
10
+
11
+ ?>
12
+ <div class='pllexislider pllexislider-normal instaslider-nr-<?php echo $feed_id; ?>'>
13
+ <ul class='no-bullet slides' id='wis-slides'>
14
+ <?php foreach ( $images as $key => $data ) {
15
+ $time = $data['timestamp'];
16
+ $username = $data['username'];
17
+ $image_url = $data['image'];
18
+ $caption = $data['caption'];
19
+ $nopin = ( 1 == $args['no_pin'] ) ? 'nopin="nopin"' : '';
20
+
21
+ $clean_image_url = WIG_COMPONENT_URL . "/assets/img/image.png";
22
+ $image_src = "<img alt='" . $caption . "' src='{$clean_image_url}' $nopin class='{$data['type']}' style='opacity: 0;'>";
23
+ $image_output = $image_src;
24
+
25
+ if ( $data['link_to'] && $args['images_link'] != 'none' ) {
26
+ $image_output = "<a href='{$data['link_to']}' target='_blank' rel='nofollow noreferrer'";
27
+
28
+ if ( ! empty( $args['link_rel'] ) ) {
29
+ $image_output .= " rel={$args['link_rel']}";
30
+ }
31
+
32
+ if ( ! empty( $args['link_class'] ) ) {
33
+ $image_output .= " class={$args['link_class']}";
34
+ }
35
+ $image_output .= "> $image_src</a>";
36
+ }
37
+ ?>
38
+ <li style='border:0;'>
39
+ <div style='background: url(<?php echo $image_url; ?>) no-repeat center center; background-size: cover;'><?php echo $image_output; ?></div>
40
+ <?php if ( $args['description'] ) { ?>
41
+ <div class='jr-insta-datacontainer' style=''>
42
+ <?php
43
+ if ( $username && in_array( 'username', $args['description'] ) ) {
44
+ echo "<span class='jr-insta-username'>by <a rel='nofollow noreferrer' href='https://www.instagram.com/{$username}/' style='color:black; font-weight: 600' target='_blank'>{$username}</a></span>\n";
45
+ }
46
+ if ( $time && in_array( 'time', $args['description'] ) ) {
47
+ $time = human_time_diff( $time );
48
+ echo "<strong><span class='jr-insta-time pull-right' style='font-size: 0.9em'>{$time} ago</span></strong><br>\n";
49
+ }
50
+
51
+ if ( $caption != '' && in_array( 'caption', $args['description'] ) ) {
52
+ $caption = preg_replace( '/\@([a-z0-9А-Яа-я_-]+)/u', '&nbsp;<a href="https://www.instagram.com/$1/" rel="nofollow noreferrer" style="color:black; font-weight: 600" target="_blank">@$1</a>&nbsp;', $caption );
53
+ $caption = preg_replace( '/\#([a-zA-Z0-9А-Яа-я_-]+)/u', '&nbsp;<a href="https://www.instagram.com/explore/tags/$1/" style="color:black; font-weight: 600" rel="nofollow noreferrer" target="_blank">$0</a>&nbsp;', $caption );
54
+ echo "<span class='jr-insta-caption' style='text-align: left !important;'>{$caption}</span>\n";
55
+ }
56
+ ?>
57
+ </div>
58
+ <?php } ?>
59
+ </li>
60
+ <?php } ?>
61
+ </ul>
62
+ </div>
63
+ <script type='text/javascript'>
64
+ jQuery(document).ready(function ($) {
65
+ $('.instaslider-nr-<?php echo $feed_id; ?>').pllexislider({
66
+ animation: '<?php echo $args['animation']; ?>',
67
+ slideshowSpeed: <?php echo $args['slidespeed']; ?>,
68
+ directionNav: <?php echo $direction_nav; ?>,
69
+ controlNav: <?php echo $control_nav; ?>,
70
+ prevText: '',
71
+ nextText: '',
72
+ });
73
+ });
74
+ </script>
components/instagram/html_templates/templates/thumbs-no-border.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /** @var array $args account data */
3
+
4
+ $images = $args['images'];
5
+ $feed_id = $args['feed_id'];
6
+ $args = $args['template_args'];
7
+ $enable_icons = $args['enable_icons'] ? "" : " no-isw-icons";
8
+ ?>
9
+ <div class='jr-insta-thumb'>
10
+ <ul class='no-bullet thumbnails no-border jr_col_<?php echo $args['columns']; ?>' id='wis-slides'>
11
+ <?php foreach ( $images as $key => $data ) {
12
+ $image_url = $data['image'];
13
+ $nopin = ( 1 == $args['no_pin'] ) ? 'nopin="nopin"' : '';
14
+
15
+ $clean_image_url = WIG_COMPONENT_URL . "/assets/img/image.png";
16
+ $image_src = "<img alt='" . $data['caption'] . "' src='{$clean_image_url}' $nopin class='{$data['type']}' style='opacity: 0;'>";
17
+ $image_output = $image_src;
18
+
19
+ if ( $data['link_to'] && $args['images_link'] != 'none' ) {
20
+ $image_output = "<a href='{$data['link_to']}' target='_blank' rel='nofollow noreferrer'";
21
+
22
+ if ( ! empty( $args['link_rel'] ) ) {
23
+ $image_output .= " rel={$args['link_rel']}";
24
+ }
25
+
26
+ if ( ! empty( $args['link_class'] ) ) {
27
+ $image_output .= " class={$args['link_class']}";
28
+ }
29
+ $image_output .= "> $image_src</a>";
30
+ }
31
+ ?>
32
+ <li class='<?php echo $enable_icons; ?>'>
33
+ <div style='background: url(<?php echo $image_url; ?>) no-repeat center center; background-size: cover;'><?php echo $image_output; ?></div>
34
+ </li>
35
+ <?php } ?>
36
+ </ul>
37
+ </div>
components/instagram/html_templates/templates/thumbs.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /** @var array $args account data */
3
+
4
+ $images = $args['images'];
5
+ $feed_id = $args['feed_id'];
6
+ $args = $args['template_args'];
7
+ $enable_icons = $args['enable_icons'] ? "" : " no-isw-icons";
8
+ ?>
9
+ <div class='jr-insta-thumb'>
10
+ <ul class='no-bullet thumbnails jr_col_<?php echo $args['columns']; ?>' id='wis-slides'>
11
+ <?php foreach ( $images as $key => $data ) {
12
+ $image_url = $data['image'];
13
+ $nopin = ( 1 == $args['no_pin'] ) ? 'nopin="nopin"' : '';
14
+
15
+ $clean_image_url = WIG_COMPONENT_URL . "/assets/img/image.png";
16
+ $image_src = "<img alt='" . $data['caption'] . "' src='{$clean_image_url}' $nopin class='{$data['type']}' style='opacity: 0;'>";
17
+ $image_output = $image_src;
18
+
19
+ if ( $data['link_to'] && $args['images_link'] != 'none' ) {
20
+ $image_output = "<a href='{$data['link_to']}' target='_blank' rel='nofollow noreferrer'";
21
+
22
+ if ( ! empty( $args['link_rel'] ) ) {
23
+ $image_output .= " rel={$args['link_rel']}";
24
+ }
25
+
26
+ if ( ! empty( $args['link_class'] ) ) {
27
+ $image_output .= " class={$args['link_class']}";
28
+ }
29
+ $image_output .= "> $image_src</a>";
30
+ }
31
+ ?>
32
+ <li class='<?php echo $data['type']; ?> <?php echo $enable_icons; ?>'>
33
+ <div style='background: url(<?php echo $image_url; ?>) no-repeat center center; background-size: cover;'><?php echo $image_output; ?></div>
34
+ </li>
35
+ <?php } ?>
36
+ </ul>
37
+ </div>
components/instagram/html_templates/widget_settings.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* @var array $args */
3
+ /* @var WIS_Feeds $feeds */
4
+
5
+ $instance = $args['instance'];
6
+ $feeds = $args['feeds'];
7
+ ?>
8
+
9
+ <div class="jr-container">
10
+ <p>
11
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'instagram-slider-widget' ); ?></label>
12
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text"
13
+ value="<?php echo $instance['title']; ?>"/>
14
+ </p>
15
+
16
+ <p>
17
+ <label for="<?php echo $this->get_field_id( 'feed_id' ); ?>"><?php _e( 'Instagram feed', 'instagram-slider-widget' ); ?>:</label>
18
+ <select class="widefat" id="<?php echo $this->get_field_id( 'feed_id' ); ?>" name="<?php echo $this->get_field_name( 'feed_id' ); ?>">
19
+ <?php foreach ( $feeds->feeds as $key => $feed ) {
20
+ $selected = $instance['feed_id'] == $feed->instance['id'] ? "selected='selected'" : "";
21
+ /* @var WIS_Instagram_Feed $feed */ ?>
22
+ <option value="<?php echo $key; ?>" <?php echo $selected; ?>><?php echo $feed->title; ?></option>
23
+ <?php } ?>
24
+ </select>
25
+ </p>
26
+ </div>
components/instagram/includes/class-instagram-feed.php ADDED
@@ -0,0 +1,1214 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ }
6
+
7
+ /**
8
+ * @property int|string id
9
+ * @property int|string title
10
+ * @property int|string search_for
11
+ * @property int|string account
12
+ * @property int|string account_business
13
+ * @property int|string username
14
+ * @property int|string hashtag
15
+ * @property int|string blocked_users
16
+ * @property int|string blocked_words
17
+ * @property int|string allowed_words
18
+ * @property int|string attachment
19
+ * @property int|string template
20
+ * @property int|string images_link
21
+ * @property int|string custom_url
22
+ * @property int|string orderby
23
+ * @property int|string images_number
24
+ * @property int|string columns
25
+ * @property int|string refresh_hour
26
+ * @property int|string slick_img_size
27
+ * @property int|string image_size
28
+ * @property int|string image_link_rel
29
+ * @property int|string image_link_class
30
+ * @property int|string no_pin
31
+ * @property int|string controls
32
+ * @property int|string animation
33
+ * @property int|string caption_words
34
+ * @property int|string shopifeed_phone
35
+ * @property int|string shopifeed_color
36
+ * @property int|string shopifeed_columns
37
+ * @property int|string slidespeed
38
+ * @property string description
39
+ * @property int|string support_author
40
+ * @property int|string gutter
41
+ * @property int|string masonry_image_width
42
+ * @property int|string slick_slides_to_show
43
+ * @property int|string slick_sliding_speed
44
+ * @property int|string enable_control_buttons
45
+ * @property int|string keep_ratio
46
+ * @property int|string enable_ad
47
+ * @property int|string enable_icons
48
+ * @property int|string slick_slides_padding
49
+ * @property int|string show_feed_header
50
+ * @property int|string enable_stories
51
+ * @property int|string highlight_offset
52
+ * @property int|string highlight_pattern
53
+ * @property int|string masonry_lite_cols
54
+ * @property int|string masonry_lite_gap
55
+ * @property int|string m_template
56
+ * @property int|string m_images_number
57
+ * @property int|string m_columns
58
+ * @property int|string m_shopifeed_phone
59
+ * @property int|string m_shopifeed_color
60
+ * @property int|string m_shopifeed_columns
61
+ * @property int|string m_controls
62
+ * @property int|string m_animation
63
+ * @property int|string m_slidespeed
64
+ * @property string m_description
65
+ * @property int|string m_caption_words
66
+ * @property int|string m_enable_control_buttons
67
+ * @property int|string m_show_feed_header
68
+ * @property int|string m_enable_stories
69
+ * @property int|string m_keep_ratio
70
+ * @property int|string m_slick_img_size
71
+ * @property int|string m_slick_slides_to_show
72
+ * @property int|string m_slick_sliding_speed
73
+ * @property int|string m_slick_slides_padding
74
+ * @property int|string m_gutter
75
+ * @property int|string m_masonry_image_width
76
+ * @property int|string m_masonry_lite_cols
77
+ * @property int|string m_masonry_lite_gap
78
+ * @property int|string m_highlight_offset
79
+ * @property int|string m_highlight_pattern
80
+ * @property int|string m_enable_ad
81
+ * @property int|string m_enable_icons
82
+ * @property int|string m_orderby
83
+ * @property int|string m_images_link
84
+ * @property int|string m_blocked_words
85
+ * @property int|string m_allowed_words
86
+ * @property int|string m_powered_by_link
87
+ */
88
+ class WIS_Instagram_Feed extends WIS_Feed {
89
+
90
+ public $social = 'instagram';
91
+
92
+ /**
93
+ * @var string
94
+ */
95
+ protected $component_dir = WIG_COMPONENT_DIR;
96
+
97
+ /**
98
+ * @var WIS_Instagram_Profiles
99
+ */
100
+ public $profiles;
101
+
102
+ const USERNAME_URL = 'https://www.instagram.com/{username}/';
103
+ const TAG_URL = 'https://www.instagram.com/explore/tags/{tag}/?__a=1';
104
+ const USERS_SELF_URL = 'https://graph.instagram.com/me';
105
+ const USERS_SELF_MEDIA_URL = 'https://graph.instagram.com/';
106
+ const USERS_SELF_URL_NEW = 'https://graph.facebook.com/';
107
+
108
+ /**
109
+ * Instagram feed constructor.
110
+ */
111
+ public function __construct( $feed = [] ) {
112
+ parent::__construct( $feed );
113
+
114
+ $this->profiles = new WIS_Instagram_Profiles();
115
+ }
116
+
117
+ /**
118
+ * Enqueue public-facing Scripts and style sheet.
119
+ */
120
+ public function widget_scripts_enqueue() {
121
+ wp_enqueue_style( 'jr-insta-styles' );
122
+ wp_enqueue_style( WIS_Plugin::app()->getPrefix() . 'font-awesome' );
123
+ wp_enqueue_style( WIS_Plugin::app()->getPrefix() . 'instag-slider' );
124
+ wp_enqueue_style( WIS_Plugin::app()->getPrefix() . 'wis-header' );
125
+
126
+ $ajax = json_encode( [
127
+ 'url' => admin_url( 'admin-ajax.php' ),
128
+ 'nonce' => wp_create_nonce( 'addAccountByToken' ),
129
+ ] );
130
+ wp_add_inline_script( WIS_Plugin::app()->getPrefix() . 'jr-insta', "var ajax = $ajax;" );
131
+
132
+ wp_enqueue_script( WIS_Plugin::app()->getPrefix() . 'jquery-pllexi-slider' );
133
+ }
134
+
135
+ protected function setDefaults() {
136
+ $this->profiles = new WIS_Instagram_Profiles();
137
+
138
+ $this->templates = apply_filters( 'wis/sliders', [
139
+ 'slider' => 'Slider - Normal',
140
+ 'slider-overlay' => 'Slider - Overlay Text',
141
+ 'thumbs' => 'Thumbnails',
142
+ 'thumbs-no-border' => 'Thumbnails - Without Border',
143
+ ] );
144
+
145
+ $this->linkto = apply_filters( 'wis/options/link_to', [
146
+ 'image_link' => 'Instagram Image',
147
+ 'image_url' => 'Image URL',
148
+ 'custom_url' => 'Custom Link',
149
+ 'none' => 'None',
150
+ ] );
151
+
152
+ $this->defaults = [
153
+ 'id' => null,
154
+ 'title' => __( 'Social Slider', 'instagram-slider-widget' ),
155
+ 'search_for' => 'account',
156
+ 'account' => '',
157
+ 'account_business' => '',
158
+ 'username' => '',
159
+ 'hashtag' => '',
160
+ 'blocked_users' => '',
161
+ 'blocked_words' => '',
162
+ 'allowed_words' => '',
163
+ 'attachment' => 0,
164
+ 'template' => 'slider',
165
+ 'images_link' => 'image_link',
166
+ 'custom_url' => '',
167
+ 'orderby' => 'rand',
168
+ 'images_number' => 20,
169
+ 'columns' => 4,
170
+ 'refresh_hour' => 5,
171
+ 'slick_img_size' => 300,
172
+ 'image_size' => 'standard',
173
+ 'image_link_rel' => '',
174
+ 'image_link_class' => '',
175
+ 'no_pin' => 0,
176
+ 'controls' => 'prev_next',
177
+ 'animation' => 'slide',
178
+ 'caption_words' => 20,
179
+ 'shopifeed_phone' => '',
180
+ 'shopifeed_color' => '#DA004A',
181
+ 'shopifeed_columns' => 3,
182
+ 'slidespeed' => 7000,
183
+ 'description' => [],
184
+ 'support_author' => 0,
185
+ 'gutter' => 0,
186
+ 'masonry_image_width' => 200,
187
+ 'slick_slides_to_show' => 3,
188
+ 'slick_sliding_speed' => 5000,
189
+ 'enable_control_buttons' => 0,
190
+ 'keep_ratio' => 0,
191
+ 'enable_ad' => 0,
192
+ 'enable_icons' => 0,
193
+ 'slick_slides_padding' => 0,
194
+ 'show_feed_header' => 0,
195
+ 'enable_stories' => 0,
196
+ 'highlight_offset' => 1,
197
+ 'highlight_pattern' => 6,
198
+ 'masonry_lite_cols' => 4,
199
+ 'masonry_lite_gap' => 10,
200
+
201
+ 'm_template' => 'slider',
202
+ 'm_images_number' => 20,
203
+ 'm_columns' => 4,
204
+ 'm_shopifeed_phone' => '',
205
+ 'm_shopifeed_color' => '#DA004A',
206
+ 'm_shopifeed_columns' => 3,
207
+ 'm_controls' => 'prev_next',
208
+ 'm_animation' => 'slide',
209
+ 'm_slidespeed' => 7000,
210
+ 'm_description' => [],
211
+ 'm_caption_words' => 20,
212
+ 'm_enable_control_buttons' => 0,
213
+ 'm_show_feed_header' => 0,
214
+ 'm_enable_stories' => 0,
215
+ 'm_keep_ratio' => 0,
216
+ 'm_slick_img_size' => 300,
217
+ 'm_slick_slides_to_show' => 3,
218
+ 'm_slick_sliding_speed' => 5000,
219
+ 'm_slick_slides_padding' => 0,
220
+ 'm_gutter' => 0,
221
+ 'm_masonry_image_width' => 200,
222
+ 'm_highlight_offset' => 1,
223
+ 'm_highlight_pattern' => 6,
224
+ 'm_enable_ad' => 0,
225
+ 'm_enable_icons' => 0,
226
+ 'm_orderby' => 'rand',
227
+ 'm_images_link' => 'image_link',
228
+ 'm_blocked_words' => '',
229
+ 'm_allowed_words' => '',
230
+ 'm_powered_by_link' => '',
231
+ 'm_masonry_lite_cols' => 2,
232
+ 'm_masonry_lite_gap' => 5,
233
+ ];
234
+ }
235
+
236
+ /**
237
+ * @return array
238
+ */
239
+ public function getTemplates() {
240
+ return apply_filters( 'wis/sliders', $this->templates );
241
+ }
242
+
243
+ /**
244
+ * @return array
245
+ */
246
+ public function getLinkto() {
247
+ return apply_filters( 'wis/options/link_to', $this->linkto );
248
+ }
249
+
250
+ /**
251
+ * @inerhitDoc
252
+ */
253
+ public function form( $feed_id = 0 ) {
254
+ $feeds = new WIS_Feeds( $this->social );
255
+ $accounts = $this->getAccounts();
256
+ $accounts_business = $this->getAccountsBusiness();
257
+
258
+ if ( count( $accounts ) ) {
259
+ $s_for = 'account';
260
+ } elseif ( count( $accounts_business ) ) {
261
+ $s_for = 'account_business';
262
+ } else {
263
+ $s_for = 'username';
264
+ }
265
+ $this->updateDefaults( 'search_for', $s_for );
266
+
267
+ $args = [
268
+ '_this' => $this,
269
+ 'is_update' => (bool) $feed_id,
270
+ 'add_link' => WIS_Page::instance()->getActionUrl( 'add' ),
271
+ 'feeds' => $feeds->feeds,
272
+ 'instance' => $this->instance,
273
+ 'accounts' => $accounts,
274
+ 'accounts_business' => $accounts_business,
275
+ 'sliders' => $this->getTemplates(),
276
+ 'options_linkto' => $this->getLinkto(),
277
+ ];
278
+ echo WIS_Page::instance()->render( WIG_COMPONENT_VIEWS_DIR . '/form-feed', $args ); // phpcs:ignore
279
+ }
280
+
281
+ /**
282
+ * Selected array function echoes selected if in array
283
+ *
284
+ * @param array $haystack The array to search in
285
+ * @param string $current The string value to search in array;
286
+ */
287
+ public function selected( $haystack, $current ) {
288
+
289
+ if ( is_array( $haystack ) && in_array( $current, $haystack ) ) {
290
+ selected( 1, 1, true );
291
+ }
292
+ }
293
+
294
+ private function getAccounts() {
295
+ $accounts = WIS_Plugin::app()->getPopulateOption( WIG_PROFILES_OPTION, [] );
296
+ if ( ! is_array( $accounts ) ) {
297
+ $accounts = [];
298
+ }
299
+
300
+ return $accounts;
301
+ }
302
+
303
+ private function getAccountsBusiness() {
304
+ $accounts_business = WIS_Plugin::app()->getPopulateOption( WIG_BUSINESS_PROFILES_OPTION, [] );
305
+ if ( ! is_array( $accounts_business ) ) {
306
+ $accounts_business = [];
307
+ }
308
+
309
+ return $accounts_business;
310
+ }
311
+
312
+ /**
313
+ * Display feed
314
+ *
315
+ * @param bool $return Return result or echo
316
+ *
317
+ * @return string|bool
318
+ */
319
+ public function display( $return = false ) {
320
+ $data = $this->display_images();
321
+
322
+ if ( $return ) {
323
+ return $data;
324
+ } else {
325
+ echo $data; // @codingStandardsIgnoreLine
326
+ }
327
+
328
+ return true;
329
+ }
330
+
331
+ /**
332
+ * Stores the fetched data from instagram in WordPress DB using transients
333
+ *
334
+ * @param $search_for
335
+ * @param $cache_hours
336
+ * @param $nr_images
337
+ *
338
+ * @return array|string of localy saved instagram data
339
+ */
340
+ public function feed_query( $search_for, $cache_hours, $nr_images ) {
341
+ //$nr_images = $nr_images <= 12 ? $nr_images : 12;
342
+ if ( isset( $search_for['account'] ) && ! empty( $search_for['account'] ) ) {
343
+ $search = 'account';
344
+ $search_string = $search_for['account'];
345
+ } elseif ( isset( $search_for['account_business'] ) && ! empty( $search_for['account_business'] ) ) {
346
+ $search = 'account_business';
347
+ $search_string = $search_for['account_business'];
348
+ } elseif ( isset( $search_for['username'] ) && ! empty( $search_for['username'] ) ) {
349
+ $search = 'user';
350
+ $search_string = $search_for['username'];
351
+ } elseif ( isset( $search_for['hashtag'] ) && ! empty( $search_for['hashtag'] ) ) {
352
+ $search = 'hashtag';
353
+ $search_string = $search_for['hashtag'];
354
+ $blocked_users = isset( $search_for['blocked_users'] ) && ! empty( $search_for['blocked_users'] ) ? str_replace( '@', '', $search_for['blocked_users'] ) : false;
355
+ $blocked_users_array = $blocked_users ? $this->get_ids_from_usernames( $blocked_users ) : [];
356
+ } else {
357
+ return __( 'Nothing to search for', 'instagram-slider-widget' );
358
+ }
359
+
360
+ $blocked_users = isset( $blocked_users ) ? $blocked_users : '';
361
+ $blocked_words = isset( $search_for['blocked_words'] ) && ! empty( $search_for['blocked_words'] ) ? $search_for['blocked_words'] : '';
362
+ $allowed_words = isset( $search_for['allowed_words'] ) && ! empty( $search_for['allowed_words'] ) ? $search_for['allowed_words'] : '';
363
+
364
+ //песочница
365
+ if ( isset( $_GET['access_token'] ) && isset( $_GET['id'] ) ) {
366
+ $search = 'account';
367
+ $search_string = htmlspecialchars( $_GET['access_token'] );
368
+ }
369
+
370
+ $feed_id = $this->instance['id'];
371
+ $opt_name = "jr_insta_{$feed_id}_" . md5( $search . '_' . $search_string );
372
+ $instaData = get_transient( $opt_name );
373
+ $old_opts = get_option( $opt_name, [] );
374
+ $new_opts = [
375
+ 'search' => $search,
376
+ 'search_string' => $search_string,
377
+ 'blocked_users' => $blocked_users,
378
+ 'cache_hours' => $cache_hours,
379
+ 'nr_images' => $nr_images,
380
+ ];
381
+
382
+ if ( true === $this->trigger_refresh_data( $instaData, $old_opts, $new_opts ) ) {
383
+ $instaData = [];
384
+
385
+ if ( 'account' == $search || 'account_business' == $search ) {
386
+ $is_business_api = 'account_business' == $search ? true : false;
387
+ $nr_images = ! WIS_Plugin::app()->is_premium() && $nr_images > 20 ? 20 : $nr_images;
388
+ //песочница
389
+ if ( isset( $_GET['access_token'] ) && isset( $_GET['id'] ) ) {
390
+ if ( isset( $_COOKIE['wis-demo-account-data'] ) ) {
391
+ $account = json_decode( stripslashes( $_COOKIE['wis-demo-account-data'] ), true );
392
+ } else {
393
+ $account = $this->get_user_by_token( $_GET['access_token'] );
394
+ }
395
+ } else {
396
+ $account = $this->getAccountById( $search_string, $is_business_api );
397
+ }
398
+
399
+ if ( $is_business_api ) {
400
+ if ( ! isset( $_GET['access_token'] ) && ! isset( $_GET['id'] ) ) {
401
+ //Обновляем данные профиля: подписчики, количество постов
402
+ $this->profiles->update_account_profiles( $account['token'], true, $account['username'] );
403
+ }
404
+
405
+ $args = [
406
+ 'access_token' => $account['token'],
407
+ 'fields' => 'id,username,caption,comments_count,like_count,media_type,media_url,permalink,timestamp,children{media_url,media_type},owner,thumbnail_url',
408
+ 'limit' => 50,
409
+ ];
410
+
411
+ $url = WFB_FACEBOOK_SELF_URL . $account['id'] . '/media';
412
+ $response = wp_remote_get( add_query_arg( $args, $url ) );
413
+ if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
414
+ $media = json_decode( wp_remote_retrieve_body( $response ), true );
415
+ $results = $media['data'];
416
+
417
+ $stories_url = WFB_FACEBOOK_SELF_URL . $account['id'] . '/stories';
418
+ $url = add_query_arg( [
419
+ 'access_token' => $account['token'],
420
+ 'fields' => 'media_type,media_url,permalink,timestamp',
421
+ ], $stories_url );
422
+ $stories_response = wp_remote_get( $url );
423
+ if ( 200 == wp_remote_retrieve_response_code( $stories_response ) ) {
424
+ $stories = json_decode( wp_remote_retrieve_body( $stories_response ), true );
425
+ $results['stories'] = $stories['data'];
426
+ }
427
+ $results = apply_filters( 'wis/images/count', $results, $media, $nr_images, true );
428
+ $next_max_id = null;
429
+ if ( ! empty( $media['pagination'] ) ) {
430
+ $next_max_id = $media['pagination']['next_max_id'];
431
+ }
432
+ if ( ! count( $results ) ) {
433
+ return [ 'error' => __( 'There are no publications in this account yet', 'instagram-slider-widget' ) ];
434
+ }
435
+ } else {
436
+ if ( $instaData ) {
437
+ $results = $instaData;
438
+ }
439
+ }
440
+ } else {
441
+ if ( ! isset( $_GET['access_token'] ) ) {
442
+ //Обновляем данные профиля: подписчики, количество постов
443
+ $this->profiles->update_account_profiles( $account['token'] );
444
+ }
445
+
446
+ $args = [
447
+ 'fields' => 'id,username,media{id,username,caption,media_type,media_url,permalink,thumbnail_url,timestamp,children{id,media_type,media_url,thumbnail_url}}',
448
+ 'limit' => 50,
449
+ 'access_token' => $account['token'],
450
+ ];
451
+ $url = self::USERS_SELF_MEDIA_URL . $account['id'];
452
+ $response = wp_remote_get( add_query_arg( $args, $url ) );
453
+ if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
454
+ $media = json_decode( wp_remote_retrieve_body( $response ), true );
455
+ $results = $media['media']['data'];
456
+ $results = apply_filters( 'wis/images/count', $results, $media, $nr_images, false );
457
+ if ( ! is_array( $results ) || ! count( $results ) ) {
458
+ return [ 'error' => __( 'There are no publications in this account yet', 'instagram-slider-widget' ) ];
459
+ }
460
+ } else {
461
+ if ( $instaData ) {
462
+ $results = $instaData;
463
+ }
464
+ }
465
+ }
466
+ } else { //hashtag
467
+ $account = $this->getAccountForHashtag();
468
+ //$account = false;
469
+ if ( $account ) {
470
+ $args = [
471
+ 'access_token' => $account['token'],
472
+ 'user_id' => $account['id'],
473
+ 'q' => $search_string,
474
+ ];
475
+ $url = WFB_FACEBOOK_SELF_URL . 'ig_hashtag_search';
476
+ $response = wp_remote_get( add_query_arg( $args, $url ) );
477
+ if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
478
+ $media = json_decode( wp_remote_retrieve_body( $response ), true );
479
+ $args = [
480
+ 'access_token' => $account['token'],
481
+ 'user_id' => $account['id'],
482
+ //,timestamp
483
+ 'fields' => 'id,caption,media_type,media_url,comments_count,like_count,permalink,children{media_type,media_url}',
484
+ 'limit' => 50,
485
+ ];
486
+ $url = WFB_FACEBOOK_SELF_URL . $media['data'][0]['id'] . '/recent_media';
487
+ $response = wp_remote_get( add_query_arg( $args, $url ) );
488
+ if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
489
+ $media = json_decode( wp_remote_retrieve_body( $response ), true );
490
+ $media['hashtag'] = true;
491
+ $results = $media;
492
+
493
+ }
494
+ }
495
+ } else {
496
+ $url = str_replace( '{tag}', urlencode( trim( $search_string ) ), self::TAG_URL );
497
+ $response = wp_remote_get( $url, [
498
+ 'sslverify' => false,
499
+ 'timeout' => 60,
500
+ ] );
501
+ $results = json_decode( $response['body'], true );
502
+ $hashtag_response_status = $response['response']['code'];
503
+ }
504
+ }
505
+
506
+ if ( isset( $results ) && is_array( $results ) ) {
507
+ if ( 'user' == $search ) {
508
+ $entry_data = isset( $results['entry_data']['ProfilePage'][0]['graphql']['user']['edge_owner_to_timeline_media']['edges'] ) ? $results['entry_data']['ProfilePage'][0]['graphql']['user']['edge_owner_to_timeline_media']['edges'] : [];
509
+ } elseif ( 'account' == $search || 'account_business' == $search ) {
510
+ $entry_data = $results;
511
+ } elseif ( 'hashtag' == $search ) {
512
+ if ( isset( $results['hashtag'] ) ) {
513
+ $entry_data = $results['data'];
514
+ } else {
515
+ $entry_data = isset( $results['graphql']['hashtag']['edge_hashtag_to_media']['edges'] ) ? $results['graphql']['hashtag']['edge_hashtag_to_media']['edges'] : [];
516
+ }
517
+ }
518
+
519
+ if ( empty( $entry_data ) ) {
520
+ return [ 'error' => __( 'No images found', 'instagram-slider-widget' ) ];
521
+ }
522
+
523
+ $i = 0;
524
+ foreach ( $entry_data as $current => $result ) {
525
+ if ( ! isset( $result['caption'] ) ) {
526
+ $result['caption'] = '';
527
+ }
528
+
529
+ if ( $i >= $nr_images ) {
530
+ if ( isset( $entry_data['stories'] ) ) {
531
+ $instaData['stories'] = $entry_data['stories'];
532
+ }
533
+ break;
534
+ } else {
535
+ $i ++;
536
+ }
537
+
538
+ if ( 'hashtag' == $search ) {
539
+
540
+ //TODO: Доделать черный список с новым API
541
+ //Чёрный список не работает, так как API не отдает имя пользователя, который создал пост
542
+ if ( isset( $results['hashtag'] ) ) {
543
+ $result['fbapi'] = true;
544
+ if ( isset( $result['media_type'] ) && 'VIDEO' === $result['media_type'] ) {
545
+ //$nr_images++;
546
+ continue;
547
+ }
548
+ } else {
549
+ $result = $result['node'];
550
+ if ( in_array( $result['owner']['id'], $blocked_users_array ) ) {
551
+ $nr_images ++;
552
+ continue;
553
+ }
554
+ }
555
+ }
556
+
557
+ if ( 'account' == $search ) {
558
+ $image_data = $this->to_media_model_from_account( $result );
559
+ } elseif ( 'account_business' == $search ) {
560
+ $image_data = $this->to_media_model_from_account_business( $result );
561
+ } elseif ( 'hashtag' == $search && $results['hashtag'] ) {
562
+ $image_data = $this->to_media_model_from_hashtag( $result );
563
+ }
564
+
565
+ if ( $this->is_blocked_by_word( $blocked_words, $image_data['caption'] ) ) {
566
+ $nr_images ++;
567
+ continue;
568
+ }
569
+
570
+ if ( ! $this->is_allowed_by_word( $allowed_words, $image_data['caption'] ) ) {
571
+ $nr_images ++;
572
+ continue;
573
+ }
574
+
575
+ $instaData[] = $image_data;
576
+ } // end -> foreach
577
+ } elseif ( isset( $hashtag_response_status ) && 429 == $hashtag_response_status && is_user_logged_in() && 'hashtag' === $search ) {
578
+ return [ 'error' => __( "Can't receive images by hashtag. Please connect a business account and try again.", 'instagram-slider-widget' ) ];
579
+ }
580
+
581
+ update_option( $opt_name, $new_opts );
582
+
583
+ $insta_imgs_cache = 'insta_imgs_cache';
584
+ if ( is_array( $instaData ) && ! empty( $instaData ) ) {
585
+ set_transient( $opt_name, $instaData, $cache_hours * 60 * 60 );
586
+ WIS_Plugin::app()->updateoption( $insta_imgs_cache, $instaData );
587
+ } else {
588
+ $instaData = WIS_Plugin::app()->getOption( $insta_imgs_cache, [] );
589
+ WIS_Plugin::app()->logger->error( 'Feed query failed! Try reconnecting your account in the plugin settings.' );
590
+ }
591
+ }
592
+
593
+ return $instaData;
594
+ }
595
+
596
+ /**
597
+ * Runs the query for images and returns the html
598
+ *
599
+ * @return string
600
+ */
601
+ public function display_images() {
602
+ $this->widget_scripts_enqueue();
603
+
604
+ $feed_id = $this->id;
605
+ $searchfor = $this->search_for;
606
+ $account = $this->account;
607
+ $account_business = $this->account_business;
608
+ $username = $this->username;
609
+ $hashtag = $this->hashtag;
610
+ $refresh_hour = $this->refresh_hour;
611
+ $template = $this->get( 'template' );
612
+ $images_number = $this->get( 'images_number' );
613
+ $blocked_words = $this->get( 'blocked_words' );
614
+ $allowed_words = $this->get( 'allowed_words' );
615
+ $blocked_users = $this->get( 'blocked_users' );
616
+ $enable_ad = $this->get( 'enable_ad' );
617
+ $orderby = $this->get( 'orderby' );
618
+
619
+ if ( 'hashtag' === $searchfor ) {
620
+ $search_for['hashtag'] = $hashtag;
621
+ } elseif ( 'account' === $searchfor ) {
622
+ $search_for['account'] = $account;
623
+ } elseif ( 'account_business' === $searchfor ) {
624
+ $search_for['account_business'] = $account_business;
625
+ } else {
626
+ $search_for['username'] = $username;
627
+ }
628
+ $search_for['blocked_users'] = $blocked_users;
629
+ $search_for['blocked_words'] = $blocked_words;
630
+ $search_for['allowed_words'] = $allowed_words;
631
+
632
+ $args = $this->getAdaptiveInstance();
633
+ //WIS_Plugin::app()->logger->info( "Feed options: " . json_encode( $args ) );
634
+
635
+ $is_business = ( 'account_business' === $searchfor );
636
+ if ( $is_business ) {
637
+ $accounts = $this->getAccountsBusiness();
638
+ } else {
639
+ $accounts = $this->getAccounts();
640
+ }
641
+
642
+ if ( $template == 'slick_slider' || $template == 'masonry_lite' || $template == 'masonry' || $template == 'highlight' || $template == 'showcase' ) {
643
+ if ( defined( 'WISP_PLUGIN_ACTIVE' ) && WISP_PLUGIN_ACTIVE == true ) {
644
+ return apply_filters( 'wis/pro/display_images', '', $args, $this );
645
+ }
646
+ }
647
+
648
+ $output = '';
649
+ //WIS_Plugin::app()->logger->info( "Feed query: " . json_encode( [ $search_for, $refresh_hour, $images_number ] ) );
650
+ $images_data = $this->feed_query( $search_for, $refresh_hour, $images_number );
651
+ //WIS_Plugin::app()->logger->info( "Feed images: " . json_encode( $images_data ) );
652
+
653
+ if ( isset( $images_data['error'] ) ) {
654
+ return $images_data['error'];
655
+ }
656
+
657
+ if ( $args['show_feed_header'] && $is_business ) {
658
+ $account_data = $accounts[ $images_data[0]['username'] ] ?? [];
659
+ //WIS_Plugin::app()->logger->info( "Account data: " . json_encode( $account_data ) );
660
+
661
+ if ( WIS_Plugin::app()->is_premium() ) {
662
+ $output .= WIS_Premium::app()->display_header_with_stories( $account, $account_data, $images_data['stories'], $args['enable_stories'] );
663
+ } else {
664
+ $output .= $this->render_template( 'templates/feed_header', $account_data );
665
+ }
666
+ }
667
+
668
+ if ( ! empty( $args['description'] ) && ! is_array( $args['description'] ) ) {
669
+ $args['description'] = explode( ',', $args['description'] );
670
+ }
671
+
672
+ if ( isset( $images_data['stories'] ) ) {
673
+ unset( $images_data['stories'] );
674
+ }
675
+
676
+ if ( 'rand' == $orderby ) {
677
+ shuffle( $images_data );
678
+ } else {
679
+ $orderby = explode( '-', $orderby );
680
+ if ( 'date' == $orderby[0] ) {
681
+ $func = 'sort_timestamp_' . $orderby[1];
682
+ } else {
683
+ $func = $is_business ? 'sort_popularity_' . $orderby[1] : 'sort_timestamp_' . $orderby[1];
684
+ }
685
+
686
+ usort( $images_data, [ $this, $func ] );
687
+ }
688
+
689
+ foreach ( $images_data as $key => &$image_data ) {
690
+ if ( 'stories' === $key ) {
691
+ continue;
692
+ }
693
+
694
+ $images_link = $args['images_link'];
695
+ if ( 'image_link' == $images_link || 'popup' == $images_link ) {
696
+ $image_data['link_to'] = $image_data['link'] ?? '';
697
+ } elseif ( 'user_url' == $images_link ) {
698
+ $image_data['link_to'] = 'https://www.instagram.com/' . $username . '/';
699
+ } elseif ( 'image_url' == $images_link ) {
700
+ $image_data['link_to'] = $image_data['url'];
701
+ } elseif ( 'custom_url' == $images_link ) {
702
+ $image_data['link_to'] = $args['custom_url'];
703
+ }
704
+
705
+ $image_data['caption'] = wp_trim_words( $image_data['caption'], $args['caption_words'], '' );
706
+ }
707
+
708
+ $template_args = [
709
+ 'template_args' => $args,
710
+ 'images' => $images_data,
711
+ 'feed_id' => $feed_id,
712
+ ];
713
+
714
+ $output .= $this->render_template( "templates/{$template}", $template_args );
715
+
716
+ if ( $enable_ad && ! defined( 'WISP_PLUGIN_ACTIVE' ) ) {
717
+ $output .= '
718
+ <div class="wis-template-ad" style="font-size: 1.0rem; margin-top: 2%; text-align: center; color: rgba(22,22,22,0.72);" >
719
+ <a target="_blank" style="color: rgba(22,22,22,0.72); text-decoration: none" href="https://cm-wp.com/instagram-slider-widget/" >
720
+ Powered by Social Slider Feed
721
+ </a >
722
+ </div >
723
+ ';
724
+ }
725
+
726
+ return $output;
727
+
728
+ }
729
+
730
+ /**
731
+ * Sanitize 4-byte UTF8 chars; no full utf8mb4 support in drupal7+mysql stack.
732
+ * This solution runs in O(n) time BUT assumes that all incoming input is
733
+ * strictly UTF8.
734
+ *
735
+ * @param string $input The input to be sanitised
736
+ *
737
+ * @return string sanitized input
738
+ */
739
+ private function sanitize( $input ) {
740
+
741
+ if ( ! empty( $input ) ) {
742
+ $utf8_2byte = 0xC0; /*1100 0000*/
743
+ $utf8_2byte_bmask = 0xE0; /*1110 0000*/
744
+ $utf8_3byte = 0xE0; /*1110 0000*/
745
+ $utf8_3byte_bmask = 0XF0; /*1111 0000*/
746
+ $utf8_4byte = 0xF0; /*1111 0000*/
747
+ $utf8_4byte_bmask = 0xF8; /*1111 1000*/
748
+
749
+ $sanitized = '';
750
+ $len = strlen( $input );
751
+ for ( $i = 0; $i < $len; ++ $i ) {
752
+
753
+ $mb_char = $input[ $i ]; // Potentially a multibyte sequence
754
+ $byte = ord( $mb_char );
755
+
756
+ if ( ( $byte & $utf8_2byte_bmask ) == $utf8_2byte ) {
757
+ $mb_char .= $input[ ++ $i ];
758
+ } elseif ( ( $byte & $utf8_3byte_bmask ) == $utf8_3byte ) {
759
+ $mb_char .= $input[ ++ $i ];
760
+ $mb_char .= $input[ ++ $i ];
761
+ } elseif ( ( $byte & $utf8_4byte_bmask ) == $utf8_4byte ) {
762
+ // Replace with ? to avoid MySQL exception
763
+ $mb_char = '';
764
+ $i += 3;
765
+ }
766
+
767
+ $sanitized .= $mb_char;
768
+ }
769
+
770
+ $input = $sanitized;
771
+ }
772
+
773
+ return $input;
774
+ }
775
+
776
+ /**
777
+ * Get data from instagram by username
778
+ *
779
+ * @param string $username
780
+ *
781
+ * @return array
782
+ */
783
+ private function get_data_by_username( $username ) {
784
+
785
+ $url = str_replace( '{username}', urlencode( trim( $username ) ), self::USERNAME_URL );
786
+ $response = wp_remote_get( $url, [
787
+ 'sslverify' => false,
788
+ 'timeout' => 60,
789
+ ] );
790
+
791
+ if ( strstr( $response['body'], '-cx-PRIVATE-Page__main' ) ) {
792
+ return [ 'error' => __( 'Account not found or for this account there are restrictions on Instagram by age', 'instagram-slider-widget' ) ];
793
+ }
794
+
795
+ $json = str_replace( 'window._sharedData = ', '', strstr( $response['body'], 'window._sharedData = ' ) );
796
+
797
+ // Compatibility for version of php where strstr() doesnt accept third parameter
798
+ if ( version_compare( PHP_VERSION, '5.3.0', '>=' ) ) {
799
+ $json = strstr( $json, '</script>', true );
800
+ } else {
801
+ $json = substr( $json, 0, strpos( $json, '</script>' ) );
802
+ }
803
+ $json = rtrim( $json, ';' );
804
+
805
+ // Function json_last_error() is not available before PHP * 5.3.0 version
806
+ if ( function_exists( 'json_last_error' ) ) {
807
+
808
+ ( $results = json_decode( $json, true ) ) && json_last_error() == JSON_ERROR_NONE;
809
+
810
+ } else {
811
+ $results = json_decode( $json, true );
812
+ }
813
+
814
+ return $results;
815
+ }
816
+
817
+ /**
818
+ * Get Instagram Ids from Usernames into array
819
+ *
820
+ * @param string $usernames Comma separated string with instagram users
821
+ *
822
+ * @return array An array with instagram ids
823
+ */
824
+ private function get_ids_from_usernames( $usernames ) {
825
+
826
+ $users = explode( ',', trim( $usernames ) );
827
+ $user_ids = (array) get_transient( 'jr_insta_user_ids' );
828
+ $return_ids = [];
829
+
830
+ if ( is_array( $users ) && ! empty( $users ) ) {
831
+
832
+ foreach ( $users as $user ) {
833
+
834
+ if ( isset( $user_ids[ $user ] ) ) {
835
+ continue;
836
+ }
837
+
838
+ $results = $this->get_data_by_username( $user );
839
+ if ( $results && is_array( $results ) ) {
840
+
841
+ $results = $results['entry_data']['ProfilePage']['0']['graphql']['user'];
842
+ $user_id = isset( $results['id'] ) ? $results['id'] : false;
843
+
844
+ if ( $user_id ) {
845
+
846
+ $user_ids[ $user ] = $user_id;
847
+
848
+ set_transient( 'jr_insta_user_ids', $user_ids );
849
+ }
850
+ }
851
+ }
852
+ }
853
+
854
+ foreach ( $users as $user ) {
855
+ if ( isset( $user_ids[ $user ] ) ) {
856
+ $return_ids[] = $user_ids[ $user ];
857
+ }
858
+ }
859
+
860
+ return $return_ids;
861
+ }
862
+
863
+ public function get_user_by_token( $token ) {
864
+ $args = [
865
+ 'fields' => 'id,media_count,username',
866
+ 'access_token' => $token,
867
+ ];
868
+
869
+ $url = WIG_USERS_SELF_URL;
870
+ $url = add_query_arg( $args, $url );
871
+ $response = wp_remote_get( $url );
872
+ if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
873
+ $user = json_decode( wp_remote_retrieve_body( $response ), true );
874
+ $user['token'] = $token;
875
+
876
+ return $user;
877
+ }
878
+
879
+ return false;
880
+ }
881
+
882
+ /**
883
+ * Get Account data by USERNAME from option in wp_options
884
+ *
885
+ * @param string $name
886
+ * @param bool $is_business
887
+ *
888
+ * @return array
889
+ */
890
+ public function getAccountById( $name, $is_business = false ) {
891
+ if ( $is_business ) {
892
+ $token = WIS_Plugin::app()->getOption( WIG_BUSINESS_PROFILES_OPTION );
893
+ } else {
894
+ $token = WIS_Plugin::app()->getOption( WIG_PROFILES_OPTION );
895
+ }
896
+
897
+ return $token[ $name ];
898
+ }
899
+
900
+ /**
901
+ * Get first Account data from option in wp_options
902
+ *
903
+ * @return bool|array
904
+ */
905
+ public function getAccountForHashtag() {
906
+ $token = WIS_Plugin::app()->getOption( WIG_BUSINESS_PROFILES_OPTION, false );
907
+ if ( $token && is_array( $token ) && ! empty( $token ) ) {
908
+ return array_shift( $token );
909
+ } else {
910
+ return false;
911
+ }
912
+ }
913
+
914
+ /**
915
+ * Media Model from account
916
+ *
917
+ * @param array $media From API
918
+ *
919
+ * @return array To plugin format
920
+ */
921
+ public function to_media_model_from_account( $media ) {
922
+
923
+ $m = [];
924
+ switch ( $media['media_type'] ) {
925
+ case 'IMAGE':
926
+ $m['type'] = 'GraphImage';
927
+ $m['image'] = $media['media_url'];
928
+ break;
929
+ case 'VIDEO':
930
+ $m['type'] = 'GraphVideo';
931
+ $m['video'] = $media['media_url'];
932
+ $m['thumbnail'] = $media['thumbnail_url'];
933
+ $m['image'] = $media['thumbnail_url'];
934
+ break;
935
+ case 'CAROUSEL_ALBUM':
936
+ $m['type'] = 'GraphSidecar';
937
+ $res = [];
938
+ foreach ( $media['children']['data'] as $v ) {
939
+ $type = 'images';
940
+ $t['standard_resolution']['url'] = $v['media_url'];
941
+ $size = getimagesize( $v['media_url'] );
942
+ if ( is_array( $size ) ) {
943
+ $t['standard_resolution']['height'] = $size[1];
944
+ $t['standard_resolution']['width'] = $size[0];
945
+ } else {
946
+ $type = 'videos';
947
+ }
948
+ $res[][ $type ] = $t;
949
+
950
+ }
951
+ $m['sidecar_media'] = $res;
952
+ $m['image'] = $media['media_url'];
953
+ break;
954
+ }
955
+
956
+ $m['id'] = $media['id'];
957
+ $m['username'] = $media['username'];
958
+ $m['caption'] = $this->sanitize( $media['caption'] );
959
+ $m['link'] = $media['permalink'];
960
+ $m['timestamp'] = strtotime( $media['timestamp'] );
961
+ $m['url'] = $media['media_url'];
962
+
963
+ if ( 'VIDEO' == $media['media_type'] ) {
964
+ $size = getimagesize( $media['thumbnail_url'] );
965
+ } else {
966
+ $size = getimagesize( $media['media_url'] );
967
+ }
968
+ if ( is_array( $size ) ) {
969
+ $m['height'] = $size[1];
970
+ $m['width'] = $size[0];
971
+ }
972
+
973
+ $m['popularity'] = 0;
974
+
975
+ return $m;
976
+ }
977
+
978
+ /**
979
+ * Media Model from account
980
+ *
981
+ * @param array $media From API
982
+ *
983
+ * @return array To plugin format
984
+ */
985
+ public function to_media_model_from_account_business( $media ) {
986
+
987
+ $m = [];
988
+ switch ( $media['media_type'] ) {
989
+ case 'IMAGE':
990
+ $m['type'] = 'GraphImage';
991
+ $m['image'] = $media['media_url'];
992
+ break;
993
+ case 'VIDEO':
994
+ $m['type'] = 'GraphVideo';
995
+ $m['video'] = $media['media_url'];
996
+ $m['thumbnail'] = $media['thumbnail_url'];
997
+ $m['image'] = $media['thumbnail_url'];
998
+ break;
999
+ case 'CAROUSEL_ALBUM':
1000
+ $m['type'] = 'GraphSidecar';
1001
+ $res = [];
1002
+ foreach ( $media['children']['data'] as $v ) {
1003
+ $type = 'images';
1004
+ $t['standard_resolution']['url'] = $v['media_url'];
1005
+ $size = getimagesize( $v['media_url'] );
1006
+ if ( is_array( $size ) ) {
1007
+ $t['standard_resolution']['height'] = $size[1];
1008
+ $t['standard_resolution']['width'] = $size[0];
1009
+ } else {
1010
+ $type = 'videos';
1011
+ }
1012
+ $res[][ $type ] = $t;
1013
+ }
1014
+ $m['sidecar_media'] = $res;
1015
+ $m['image'] = $media['media_url'];
1016
+ break;
1017
+ }
1018
+
1019
+ $m['id'] = $media['id'];
1020
+ $m['username'] = $media['username'];
1021
+ $m['caption'] = $this->sanitize( $media['caption'] );
1022
+ $m['link'] = $media['permalink'];
1023
+ $m['user_id'] = $media['owner']['id'];
1024
+ $m['timestamp'] = strtotime( $media['timestamp'] );
1025
+ $m['url'] = $media['media_url'];
1026
+ $m['comments'] = $media['comments_count'];
1027
+ $m['likes'] = $media['like_count'];
1028
+
1029
+ if ( 'VIDEO' == $media['media_type'] ) {
1030
+ $size = getimagesize( $media['thumbnail_url'] );
1031
+ } else {
1032
+ $size = getimagesize( $media['media_url'] );
1033
+ }
1034
+ if ( is_array( $size ) ) {
1035
+ $m['height'] = $size[1];
1036
+ $m['width'] = $size[0];
1037
+ }
1038
+
1039
+ if ( isset( $m['comments'] ) && isset( $m['likes'] ) ) {
1040
+ $m['popularity'] = (int) ( $m['comments'] ) + ( $m['likes'] );
1041
+ }
1042
+
1043
+ return $m;
1044
+ }
1045
+
1046
+ /**
1047
+ * Media Model from hashtag
1048
+ *
1049
+ * @param array $media From API
1050
+ *
1051
+ * @return array To plugin format
1052
+ */
1053
+ public function to_media_model_from_hashtag( $media ) {
1054
+
1055
+ $m = [];
1056
+ if ( isset( $media['fbapi'] ) ) {
1057
+ $value = $media;
1058
+ switch ( $value['media_type'] ) {
1059
+ case 'IMAGE':
1060
+ $m['type'] = 'GraphImage';
1061
+ $m['image'] = $value['media_url'];
1062
+ break;
1063
+ case 'VIDEO':
1064
+ $m['type'] = 'GraphVideo';
1065
+ $m['video'] = $value['media_url'];
1066
+ $m['thumbnail'] = $value['thumbnail_url'];
1067
+ $m['image'] = $value['thumbnail_url'];
1068
+ break;
1069
+ case 'CAROUSEL_ALBUM':
1070
+ $m['type'] = 'GraphSidecar';
1071
+ $res = [];
1072
+ foreach ( $value['children']['data'] as $v ) {
1073
+ $t['standard_resolution']['url'] = $v['media_url'];
1074
+ $res[]['images'] = $t;
1075
+ }
1076
+ $m['sidecar_media'] = $res;
1077
+ $m['image'] = $value['children']['data'][0]['media_url'];
1078
+ break;
1079
+ }
1080
+
1081
+ $media_url = isset( $value['media_url'] ) ? $value['media_url'] : $value['children']['data'][0]['media_url'];
1082
+
1083
+ $m['id'] = $value['id'];
1084
+ $m['caption'] = $this->sanitize( $value['caption'] );
1085
+ $m['link'] = $value['permalink'];
1086
+ $m['comment_count'] = $value['comments_count'];
1087
+ $m['url'] = $media_url;
1088
+ $m['likes_count'] = $value['like_count'];
1089
+
1090
+ $m['sizes']['thumbnail'] = $media_url;
1091
+ $m['sizes']['low'] = $media_url;
1092
+ $m['sizes']['standard'] = $media_url;
1093
+ $m['sizes']['full'] = $media_url;
1094
+
1095
+ if ( 'VIDEO' == $media['media_type'] ) {
1096
+ $size = getimagesize( $value['thumbnail_url'] );
1097
+ } else {
1098
+ $size = getimagesize( $media_url );
1099
+ }
1100
+ if ( is_array( $size ) ) {
1101
+ $m['height'] = $size[1];
1102
+ $m['width'] = $size[0];
1103
+ }
1104
+
1105
+ $m['popularity'] = (int) ( $m['comment_count'] ) + ( $m['likes_count'] );
1106
+ } else {
1107
+ $value = $media;
1108
+ $m['type'] = $value['__typename'];
1109
+ $m['id'] = $value['id'];
1110
+ $m['code'] = $value['shortcode'];
1111
+ $m['link'] = 'https://www.instagram.com/p/' . $value['shortcode'] . '/';
1112
+ $m['user_id'] = $value['owner']['id'];
1113
+
1114
+ $m['caption'] = isset( $value['edge_media_to_caption']['edges'][0]['node']['text'] ) ? $value['edge_media_to_caption']['edges'][0]['node']['text'] : '';
1115
+
1116
+ $m['timestamp'] = $value['taken_at_timestamp'];
1117
+ $m['url'] = $value['display_url'];
1118
+ $m['likes_count'] = $value['edge_liked_by']['count'];
1119
+ $m['comment_count'] = $value['edge_media_to_comment']['count'];
1120
+ $m['sizes'] = $this->get_thumbnail_urls( $value['thumbnail_resources'] );
1121
+ $m['image'] = $value['thumbnail_src'];
1122
+
1123
+ if ( isset( $m['comment_count'] ) && isset( $m['likes_count'] ) ) {
1124
+ $m['popularity'] = (int) ( $m['comment_count'] ) + ( $m['likes_count'] );
1125
+ }
1126
+ }
1127
+
1128
+ return $m;
1129
+ }
1130
+
1131
+ /**
1132
+ * This post is blocked by words?
1133
+ *
1134
+ * @param string $words
1135
+ * @param string $text
1136
+ *
1137
+ * @return bool
1138
+ */
1139
+ public function is_blocked_by_word( $words, $text ) {
1140
+ if ( empty( $words ) || empty( $text ) ) {
1141
+ return false;
1142
+ }
1143
+ $words_array = explode( ',', $words );
1144
+ foreach ( $words_array as $word ) {
1145
+ $pos = stripos( $text, trim( $word ) );
1146
+ if ( $pos !== false ) {
1147
+ return true;
1148
+ }
1149
+ }
1150
+
1151
+ return false;
1152
+ }
1153
+
1154
+ /**
1155
+ * This post is allowed by words?
1156
+ *
1157
+ * @param string $words
1158
+ * @param string $text
1159
+ *
1160
+ * @return bool
1161
+ */
1162
+ public function is_allowed_by_word( $words, $text ) {
1163
+ if ( empty( $words ) ) {
1164
+ return true;
1165
+ }
1166
+ if ( empty( $text ) ) {
1167
+ return false;
1168
+ }
1169
+
1170
+ $words_array = explode( ',', $words );
1171
+ foreach ( $words_array as $word ) {
1172
+ if ( strripos( $text, $word ) !== false ) {
1173
+ return true;
1174
+ }
1175
+ }
1176
+
1177
+ return false;
1178
+ }
1179
+
1180
+ /**
1181
+ * Sort Function for timestamp Ascending
1182
+ */
1183
+ public function sort_timestamp_ASC( $a, $b ) {
1184
+ $a = $a['timestamp'] ?? 0;
1185
+ $b = $b['timestamp'] ?? 0;
1186
+
1187
+ return $a > $b;
1188
+ }
1189
+
1190
+ /**
1191
+ * Sort Function for timestamp Descending
1192
+ */
1193
+ public function sort_timestamp_DESC( $a, $b ) {
1194
+ $a = $a['timestamp'] ?? 0;
1195
+ $b = $b['timestamp'] ?? 0;
1196
+
1197
+ return $a < $b;
1198
+ }
1199
+
1200
+ /**
1201
+ * Sort Function for popularity Ascending
1202
+ */
1203
+ public function sort_popularity_ASC( $a, $b ) {
1204
+ return $a['popularity'] > $b['popularity'];
1205
+ }
1206
+
1207
+ /**
1208
+ * Sort Function for popularity Descending
1209
+ */
1210
+ public function sort_popularity_DESC( $a, $b ) {
1211
+ return $a['popularity'] < $b['popularity'];
1212
+ }
1213
+
1214
+ }
components/instagram/includes/class-instagram-profiles.php ADDED
@@ -0,0 +1,298 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+
6
+ class WIS_Instagram_Profiles extends WIS_Profiles {
7
+ /**
8
+ * @var string
9
+ */
10
+ public $social = 'instagram';
11
+
12
+ /**
13
+ * @var string
14
+ */
15
+ public $profiles_option_name = WIG_PROFILES_OPTION;
16
+
17
+ /**
18
+ * @var string
19
+ */
20
+ public $profiles_business_option_name = WIG_BUSINESS_PROFILES_OPTION;
21
+
22
+ /**
23
+ * WIS_Facebook_Profiles constructor.
24
+ *
25
+ * @param $page WIS_ProfilesPage
26
+ */
27
+ public function __construct( $page = null ) {
28
+ if ( $page ) {
29
+ parent::__construct( $page );
30
+ }
31
+
32
+ add_action( 'wp_ajax_wis_add_account_by_token', [ $this, 'add_account_by_token' ] );
33
+ }
34
+
35
+ /**
36
+ * Ajax Call to add BUSINESS account by token
37
+ *
38
+ * @return void
39
+ * @throws \Exception
40
+ */
41
+ public function add_account_by_token() {
42
+ if ( isset( $_POST['account'] ) && ! empty( $_POST['account'] ) && isset( $_POST['_ajax_nonce'] ) ) {
43
+ if ( ! current_user_can( 'manage_options' ) ) {
44
+ wp_die( - 2 );
45
+ } else {
46
+ wp_verify_nonce( $_POST['_ajax_nonce'], 'addAccountByToken' );
47
+
48
+ $account = json_decode( stripslashes( $_POST['account'] ), true );
49
+ $user_profile = array();
50
+ $user_profile = apply_filters( 'wis/account/profiles', $user_profile, true );
51
+
52
+ if ( ! WIS_Plugin::app()->is_premium() && $this->count_accounts() >= 1 ) {
53
+ wp_die( 'No premium' );
54
+ }
55
+
56
+ $user_profile[ $account['username'] ] = $account;
57
+ WIS_Plugin::app()->updateOption( 'account_profiles_new', $user_profile );
58
+
59
+ wp_die( 'Ok' );
60
+ }
61
+ } elseif ( isset( $_POST['token'] ) && ! empty( $_POST['token'] ) && isset( $_POST['_ajax_nonce'] ) ) {
62
+ if ( ! current_user_can( 'manage_options' ) ) {
63
+ wp_die( - 2 );
64
+ } else {
65
+ wp_verify_nonce( $_POST['_ajax_nonce'], 'addAccountByToken' );
66
+
67
+ $token = $_POST['token'];
68
+ $this->update_account_profiles( $token );
69
+
70
+ wp_die( '1' );
71
+ }
72
+ }
73
+ }
74
+
75
+ /**
76
+ * @param string $token
77
+ * @param string $is_business
78
+ * @param string $username
79
+ *
80
+ * @return bool|array
81
+ */
82
+ public function update_account_profiles( $token, $is_business = false, $username = "" ) {
83
+ if ( $is_business ) {
84
+ //Получаем аккаунты привязанные к фейсбуку
85
+ $args = [
86
+ 'access_token' => $token,
87
+ 'fields' => 'instagram_business_account',
88
+ 'limit' => 200,
89
+ ];
90
+ $url = WFB_FACEBOOK_SELF_URL . "me/accounts";
91
+ $response = wp_remote_get( add_query_arg( $args, $url ) );
92
+ if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
93
+ $pages = json_decode( wp_remote_retrieve_body( $response ), true );
94
+ //$username = $result['data'][0]['name'];
95
+ $html = "";
96
+ $users = [];
97
+ foreach ( $pages['data'] as $key => $r ) {
98
+ if ( isset( $r['instagram_business_account'] ) && isset( $r['instagram_business_account']['id'] ) ) {
99
+ $args = [
100
+ 'fields' => 'username,id,followers_count,follows_count,media_count,name,profile_picture_url',
101
+ 'access_token' => $token,
102
+ ];
103
+ $url = WFB_FACEBOOK_SELF_URL . $r['instagram_business_account']['id'];
104
+ $response = wp_remote_get( add_query_arg( $args, $url ) );
105
+ if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
106
+ $result = json_decode( wp_remote_retrieve_body( $response ), true );
107
+ $result['token'] = $token;
108
+ $users[] = $result;
109
+ $html .= "<div class='wis-row wis-row-style' id='wis-instagram-row' data-account='" . json_encode( $result ) . "'>";
110
+ $html .= "<div class='wis-col-1 wis-col1-style'><img src='{$result['profile_picture_url']}' width='50' alt='{$result['username']}'></div>";
111
+ $html .= "<div class='wis-col-2 wis-col2-style'>{$result['name']}<br>@{$result['username']}</div>";
112
+ $html .= "</div>";
113
+ }
114
+ if ( "" !== $username && $username == $result['username'] ?? '' ) {
115
+ $user_profile = [];
116
+ $user_profile = apply_filters( 'wis/account/profiles', $user_profile, true );
117
+
118
+ $user_profile[ $result['username'] ] = $result;
119
+ WIS_Plugin::app()->updateOption( WIG_BUSINESS_PROFILES_OPTION, $user_profile );
120
+ }
121
+ }
122
+ }
123
+
124
+ return [ $html, $users ];
125
+ }
126
+ } else {
127
+ $expires = 0;
128
+ $profiles = WIS_Plugin::app()->getOption( WIG_PROFILES_OPTION, [] );
129
+ foreach ( $profiles as $profile ) {
130
+ if ( $profile['token'] == $token ) {
131
+ if ( $profile['expires'] <= time() ) {
132
+ $new = $this->refresh_token( $token );
133
+ $token = $new['access_token'];
134
+ $expires = $new['expires_in']; //5183944 sec
135
+ }
136
+ break;
137
+ }
138
+ }
139
+
140
+ $args = [
141
+ 'fields' => 'id,media_count,username',
142
+ 'access_token' => $token,
143
+ ];
144
+
145
+ $url = WIG_USERS_SELF_URL;
146
+ $url = add_query_arg( $args, $url );
147
+ $response = wp_remote_get( $url );
148
+ if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
149
+ $user = json_decode( wp_remote_retrieve_body( $response ), true );
150
+ if ( ! isset( $user['id'] ) || empty( $user['id'] ) ) {
151
+ return false;
152
+ }
153
+
154
+ $user['token'] = $token;
155
+ if ( $expires > 0 ) {
156
+ $user['expires'] = time() + ( $expires - 86344 );
157
+ } //= 5097600 sec = 59 days
158
+ else {
159
+ $user['expires'] = isset( $profiles[ $user['username'] ]['expires'] ) ? $profiles[ $user['username'] ]['expires'] : time() + 5097600;
160
+ }
161
+ $user_profile = [];
162
+ $user_profile = apply_filters( 'wis/account/profiles', $user_profile );
163
+
164
+ if ( ! WIS_Plugin::app()->is_premium() && $this->count_accounts() >= 1 ) {
165
+ return [];
166
+ }
167
+
168
+ $user_profile[ $user['username'] ] = $user;
169
+ WIS_Plugin::app()->updateOption( WIG_PROFILES_OPTION, $user_profile );
170
+
171
+ return $user;
172
+ }
173
+ }
174
+
175
+ return false;
176
+ }
177
+
178
+ /**
179
+ * @param string $token
180
+ *
181
+ * @return array
182
+ */
183
+ public function refresh_token( $token ) {
184
+ $args = [
185
+ 'grant_type' => 'ig_refresh_token',
186
+ 'access_token' => $token,
187
+ ];
188
+
189
+ $url = WIG_USERS_SELF_MEDIA_URL . 'refresh_access_token';
190
+ $url = add_query_arg( $args, $url );
191
+ $response = wp_remote_get( $url );
192
+ if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
193
+ $new = json_decode( wp_remote_retrieve_body( $response ), true );
194
+ if ( is_array( $new ) ) {
195
+ return $new;
196
+ }
197
+ }
198
+
199
+ return [];
200
+ }
201
+
202
+ /**
203
+ * Логика на вкладке facebook
204
+ *
205
+ * @return string
206
+ */
207
+ public function content() {
208
+ if ( isset( $_GET['tab'] ) && 'instagram' === $_GET['tab'] ) {
209
+ if ( isset( $_GET['type'] ) && 'business' === $_GET['type'] ) {
210
+ if ( isset( $_GET['token_error'] ) ) {
211
+ $token_error = wp_strip_all_tags( $_GET['token_error'] );
212
+ echo '<div class="notice notice-error"><p>' . $token_error . '</p></div>';
213
+ $_SERVER['REQUEST_URI'] = str_replace( '#_', '', remove_query_arg( 'token_error' ) );
214
+ } else {
215
+ if ( isset( $_GET['access_token'] ) ) {
216
+ $token = $_GET['access_token'];
217
+ $result = $this->update_account_profiles( $token, true );
218
+ $_SERVER['REQUEST_URI'] = remove_query_arg( 'access_token' );
219
+ ?>
220
+ <div id="wis_accounts_modal" class="wis_accounts_modal">
221
+ <div class="wis_modal_header">
222
+ Choose Account:
223
+ </div>
224
+ <div class="wis_modal_content">
225
+ <?php echo $result[0]; ?>
226
+ </div>
227
+ </div>
228
+ <div id="wis_modal_overlay" class="wis_modal_overlay"></div>
229
+ <span class="wis-overlay-spinner is-active">&nbsp;</span>
230
+ <?php
231
+ }
232
+ }
233
+ } else {
234
+ if ( isset( $_GET['token_error'] ) ) {
235
+ $token_error = wp_strip_all_tags( $_GET['token_error'] );
236
+ echo '<div class="notice notice-error"><p>' . $token_error . '</p></div>';
237
+ $_SERVER['REQUEST_URI'] = str_replace( '#_', '', remove_query_arg( 'token_error' ) );
238
+ } else {
239
+ if ( isset( $_GET['access_token'] ) ) {
240
+ $token = $_GET['access_token'];
241
+ $result = $this->update_account_profiles( $token );
242
+ $_SERVER['REQUEST_URI'] = str_replace( '#_', '', remove_query_arg( 'access_token' ) );
243
+ }
244
+ }
245
+ }
246
+ }
247
+ $authorize_url_instagram = "https://api.instagram.com/oauth/authorize?" . http_build_query( [
248
+ "client_id" => WIS_INSTAGRAM_CLIENT_ID,
249
+ "redirect_uri" => "https://instagram.cm-wp.com/basic-api",
250
+ "scope" => "user_profile,user_media",
251
+ "response_type" => "code",
252
+ "state" => $this->getSocialUrl(),
253
+ ] );
254
+
255
+ $authorize_url_business = "https://instagram.cm-wp.com/api/?" . http_build_query( [
256
+ "app_id" => WIS_FACEBOOK_CLIENT_ID,
257
+ "state" => $this->getSocialUrl() . '&type=business',
258
+ ] );
259
+
260
+ $accounts = WIS_Plugin::app()->getPopulateOption( WIG_PROFILES_OPTION, [] );
261
+ $accounts_business = WIS_Plugin::app()->getPopulateOption( WIG_BUSINESS_PROFILES_OPTION, [] );
262
+
263
+
264
+ $data = [
265
+ 'is_premium' => WIS_Plugin::app()->is_premium(),
266
+ 'authorize_url_instagram' => $authorize_url_instagram,
267
+ 'authorize_url_business' => $authorize_url_business,
268
+ 'accounts' => $accounts,
269
+ 'accounts_business' => $accounts_business,
270
+ 'social' => $this->social,
271
+ ];
272
+ $result = $this->page->render( WIG_COMPONENT_VIEWS_DIR . '/accounts', $data );
273
+
274
+ return $result;
275
+ }
276
+
277
+ /**
278
+ * Get count of accounts
279
+ *
280
+ * @return int
281
+ */
282
+ public function count_accounts() {
283
+ $account = WIS_Plugin::app()->getOption( $this->profiles_option_name, [] );
284
+ $account_business = WIS_Plugin::app()->getOption( $this->profiles_business_option_name, [] );
285
+
286
+ return count( $account + $account_business );
287
+ }
288
+
289
+ public function delete_account( $name, $is_business ) {
290
+ $option_name = $is_business ? $this->profiles_business_option_name : $this->profiles_option_name;
291
+
292
+ $accounts = WIS_Plugin::app()->getOption( $option_name, [] );
293
+ if ( isset( $accounts[ $name ] ) ) {
294
+ unset( $accounts[ $name ] );
295
+ }
296
+ WIS_Plugin::app()->updateOption( $option_name, $accounts );
297
+ }
298
+ }
components/instagram/includes/class-instagram-widget.php ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ /**
5
+ * WIG_Widget Class
6
+ */
7
+ class WIG_Widget extends WP_Widget {
8
+
9
+ /**
10
+ * Social name
11
+ *
12
+ * @var string
13
+ */
14
+ public $social = 'instagram';
15
+
16
+ private static $app;
17
+
18
+ /**
19
+ * @var WIS_Plugin
20
+ */
21
+ public $WIS;
22
+
23
+ public $show_instance_in_rest = true;
24
+
25
+ public $defaults;
26
+ /**
27
+ * @var WIS_Feeds
28
+ */
29
+ public $feeds;
30
+
31
+ public static function app() {
32
+ return self::$app;
33
+ }
34
+
35
+ /**
36
+ * Initialize the plugin by registering widget and loading public scripts
37
+ *
38
+ */
39
+ public function __construct() {
40
+ self::$app = $this;
41
+
42
+ // Widget ID and Class Setup
43
+ parent::__construct( 'jr_insta_slider', __( 'Social Slider - Instagram', 'instagram-slider-widget' ), [
44
+ 'show_instance_in_rest' => true,
45
+ 'classname' => 'jr-insta-slider',
46
+ 'description' => __( 'A widget that displays a slider with instagram images ', 'instagram-slider-widget' ),
47
+ ] );
48
+
49
+ $this->WIS = WIS_Plugin::app();
50
+ $this->feeds = new WIS_Feeds( $this->social );
51
+
52
+ $this->defaults = [
53
+ 'title' => __( 'Instagram feed', 'instagram-slider-widget' ),
54
+ 'feed_id' => null,
55
+ ];
56
+
57
+ // Instagram Action to display images
58
+ add_action( 'jr_instagram', [ $this, 'print_jr_instagram' ] );
59
+
60
+ // Enqueue Plugin Styles and scripts
61
+ add_action( 'wp_enqueue_scripts', function () {
62
+ wp_enqueue_script( 'jquery' );
63
+ } );
64
+ add_action( 'wp_enqueue_scripts', [ $this, 'feed_assets_register' ] );
65
+ }
66
+
67
+ /**
68
+ * Enqueue public-facing Scripts and style sheet.
69
+ */
70
+ public function feed_assets_register() {
71
+ wp_register_style( 'jr-insta-styles', WIG_COMPONENT_URL . '/assets/css/jr-insta.css', [], WIG_COMPONENT_VERSION );
72
+ wp_register_style( WIS_Plugin::app()->getPrefix() . 'instag-slider', WIG_COMPONENT_URL . '/assets/css/instag-slider.css', [], WIG_COMPONENT_VERSION );
73
+ wp_register_style( WIS_Plugin::app()->getPrefix() . 'font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );
74
+ wp_register_style( WIS_Plugin::app()->getPrefix() . 'wis-header', WIG_COMPONENT_URL . '/assets/css/wis-header.css', [], WIG_COMPONENT_VERSION );
75
+
76
+ wp_register_script( WIS_Plugin::app()->getPrefix() . 'jquery-pllexi-slider', WIG_COMPONENT_URL . '/assets/js/jquery.flexslider-min.js', [ 'jquery' ], WIG_COMPONENT_VERSION, false );
77
+ //wp_enqueue_script( WIS_Plugin::app()->getPrefix() . 'jr-insta', WIG_COMPONENT_URL.'/assets/js/jr-insta.js', [], WIG_COMPONENT_VERSION, false );
78
+ }
79
+
80
+ /**
81
+ * Register widget on widgets init
82
+ */
83
+ public static function register_widget() {
84
+ register_widget( __CLASS__ );
85
+ }
86
+
87
+ /**
88
+ * The Public view of the Widget
89
+ *
90
+ */
91
+ public function widget( $args, $instance ) {
92
+
93
+ //Our variables from the widget settings.
94
+ $title = apply_filters( 'widget_title', $instance['title'] );
95
+
96
+ echo $args['before_widget'];
97
+
98
+ // Display the widget title
99
+ if ( $title ) {
100
+ echo $args['before_title'] . $title . $args['after_title'];
101
+ }
102
+
103
+ do_action( 'jr_instagram', $instance );
104
+
105
+ echo $args['after_widget'];
106
+ }
107
+
108
+ /**
109
+ * Update the widget settings
110
+ *
111
+ * @param array $new_instance New instance values
112
+ * @param array $instance Old instance values
113
+ *
114
+ * @return array
115
+ */
116
+ public function update( $new_instance, $instance ) {
117
+ $new_instance = wp_parse_args( (array) $new_instance, $this->defaults );
118
+
119
+ foreach ( $new_instance as $key => &$item ) {
120
+ switch ( $key ) {
121
+ case 'title':
122
+ $item = sanitize_text_field( $item );
123
+ break;
124
+ case 'feed_id':
125
+ $item = absint( $item );
126
+ break;
127
+ }
128
+ }
129
+
130
+ return $new_instance;
131
+ }
132
+
133
+
134
+ /**
135
+ * Widget Settings Form
136
+ *
137
+ */
138
+ public function form( $instance ) {
139
+ $instance = wp_parse_args( (array) $instance, $this->defaults );
140
+
141
+ $args = [
142
+ 'widget' => &$this,
143
+ 'instance' => $instance,
144
+ 'feeds' => $this->feeds,
145
+ ];
146
+
147
+ echo $this->render_template( 'widget_settings', $args );
148
+ }
149
+
150
+ /**
151
+ * Echoes the Display Instagram Images method
152
+ *
153
+ * @param array $args
154
+ *
155
+ * @return void
156
+ */
157
+ public function print_jr_instagram( $args ) {
158
+ echo $this->display_images( $args );
159
+ }
160
+
161
+ /**
162
+ * Runs the query for images and returns the html
163
+ *
164
+ * @param array $args
165
+ *
166
+ * @return string
167
+ */
168
+ private function display_images( $args ) {
169
+ //WIS_Plugin::app()->logger->info( "*** Display widget: " . $args['title'] );
170
+
171
+ $feed_id = absint( $args['feed_id'] );
172
+ /** @var WIS_Instagram_Feed $feed */
173
+ $feed = $this->feeds->get_feed( $feed_id );
174
+
175
+ return $feed ? $feed->display( true ) : __( 'No feed', 'instagram-slider-widget' );
176
+ }
177
+
178
+ /**
179
+ * Method renders layout template
180
+ *
181
+ * @param string $template_name Template name without ".php"
182
+ * @param array $args Template arguments
183
+ *
184
+ * @return false|string
185
+ */
186
+ private function render_template( $template_name, $args ) {
187
+ $path = "";
188
+ $path_component = WIG_COMPONENT_DIR . "/html_templates/$template_name.php";
189
+ if ( file_exists( $path_component ) ) {
190
+ $path = $path_component;
191
+ }
192
+
193
+ if ( $path ) {
194
+ ob_start();
195
+ include $path;
196
+ extract( $args );
197
+
198
+ return ob_get_clean();
199
+ } else {
200
+ return 'This template does not exist!';
201
+ }
202
+ }
203
+ }
204
+
components/instagram/includes/functions.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ add_shortcode( 'jr_instagram', 'jr_instagram_shortcode' );
3
+ /**
4
+ * Add shortcode function
5
+ *
6
+ * @param array $atts shortcode attributes
7
+ *
8
+ * @return string
9
+ */
10
+ function jr_instagram_shortcode( $atts ) {
11
+ $atts = shortcode_atts( [ 'id' => '' ], $atts, 'jr_instagram' );
12
+
13
+ $feeds = new WIS_Feeds( 'instagram' );
14
+ $feed = $feeds->get_feed( $atts['id'] );
15
+
16
+ if ( $feed ) {
17
+ return $feed->display_images();
18
+ }
19
+
20
+ return "";
21
+ }
22
+
components/instagram/load.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ global $wis_compatibility;
3
+
4
+ define( 'WIG_COMPONENT_VERSION', $wis_compatibility->get_plugin_version() );
5
+ define( 'WIG_COMPONENT_URL', WIS_COMPONENTS_URL . '/instagram' );
6
+ define( 'WIG_COMPONENT_DIR', WIS_COMPONENTS_DIR . '/instagram' );
7
+ define( 'WIG_COMPONENT_VIEWS_DIR', WIG_COMPONENT_DIR . '/html_templates' );
8
+
9
+ define( 'WIS_INSTAGRAM_CLIENT_ID', '2555361627845349' );
10
+ define( 'WIS_FACEBOOK_CLIENT_ID', '776212986124330' );
11
+ //define( 'WIS_FACEBOOK_CLIENT_ID', '572623036624544' ); // test APP ID
12
+
13
+ define( 'WIG_PROFILES_OPTION', 'account_profiles' );
14
+ define( 'WIG_BUSINESS_PROFILES_OPTION', 'account_profiles_new' );
15
+
16
+ define( 'WIG_USERS_SELF_URL', 'https://graph.instagram.com/me' );
17
+ define( 'WIG_USERS_SELF_MEDIA_URL', 'https://graph.instagram.com/' );
18
+
19
+ require_once WIG_COMPONENT_DIR . "/includes/functions.php";
20
+ require_once WIG_COMPONENT_DIR . "/includes/class-instagram-feed.php";
21
+ require_once WIG_COMPONENT_DIR . "/includes/class-instagram-profiles.php";
22
+ require_once WIG_COMPONENT_DIR . "/includes/class-instagram-widget.php";
components/youtube/admin/assets/css/wyoutube-admin.css CHANGED
@@ -173,7 +173,7 @@
173
  }
174
 
175
  .wyt-btn-Youtube-account {
176
- padding: 10px 20px;
177
  text-transform: uppercase;
178
  color: rgba(255, 255, 255, 0.8);
179
  text-decoration: none;
@@ -183,7 +183,7 @@
183
  background-color: #4267B2;
184
  box-shadow: none;
185
  border: 0;
186
- margin-top: 5px !important;
187
  }
188
 
189
  .wyt-btn-Youtube-account-disabled {
173
  }
174
 
175
  .wyt-btn-Youtube-account {
176
+ padding: 0 20px;
177
  text-transform: uppercase;
178
  color: rgba(255, 255, 255, 0.8);
179
  text-decoration: none;
183
  background-color: #4267B2;
184
  box-shadow: none;
185
  border: 0;
186
+ height: 30px;
187
  }
188
 
189
  .wyt-btn-Youtube-account-disabled {
components/youtube/admin/assets/js/cbpFWTabs.js DELETED
@@ -1,72 +0,0 @@
1
- /**
2
- * cbpFWTabs.js v1.0.0
3
- * http://www.codrops.com
4
- *
5
- * Licensed under the MIT license.
6
- * http://www.opensource.org/licenses/mit-license.php
7
- *
8
- * Copyright 2014, Codrops
9
- * http://www.codrops.com
10
- */
11
- ;(function (window) {
12
-
13
- 'use strict';
14
-
15
- function extend(a, b) {
16
- for (var key in b) {
17
- if (b.hasOwnProperty(key)) {
18
- a[key] = b[key];
19
- }
20
- }
21
- return a;
22
- }
23
-
24
- function CBPFWTabs(el, options) {
25
- this.el = el;
26
- this.options = extend({}, this.options);
27
- extend(this.options, options);
28
- this._init();
29
- }
30
-
31
- CBPFWTabs.prototype.options = {
32
- start: 0
33
- };
34
-
35
- CBPFWTabs.prototype._init = function () {
36
- // tabs elemes
37
- this.tabs = [].slice.call(this.el.querySelectorAll('nav > ul > li'));
38
- // content items
39
- this.items = [].slice.call(this.el.querySelectorAll('.content > section'));
40
- // current index
41
- this.current = -1;
42
- // show current content item
43
- this._show();
44
- // init events
45
- this._initEvents();
46
- };
47
-
48
- CBPFWTabs.prototype._initEvents = function () {
49
- var self = this;
50
- this.tabs.forEach(function (tab, idx) {
51
- tab.addEventListener('click', function (ev) {
52
- ev.preventDefault();
53
- self._show(idx);
54
- });
55
- });
56
- };
57
-
58
- CBPFWTabs.prototype._show = function (idx) {
59
- if (this.current >= 0) {
60
- this.tabs[this.current].className = '';
61
- this.items[this.current].className = '';
62
- }
63
- // change current
64
- this.current = idx != undefined ? idx : this.options.start >= 0 && this.options.start < this.items.length ? this.options.start : 0;
65
- this.tabs[this.current].className = 'tab-current';
66
- this.items[this.current].className = 'content-current';
67
- };
68
-
69
- // add to global namespace
70
- window.CBPFWTabs = CBPFWTabs;
71
-
72
- })(window);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
components/youtube/admin/assets/js/license-manager.js DELETED
@@ -1,77 +0,0 @@
1
- /**
2
- * Этот файл содержит скрипт исполняелся во время процедур с формой лицензирования.
3
- * Его основная роль отправка ajax запросов на проверку, активацию, деактивацию лицензии
4
- * и вывод уведомлений об ошибка или успешно выполнении проверок.
5
- *
6
- * @author Webcraftic <wordpress.webraftic@gmail.com>
7
- * @copyright (c) 05.10.2018, Webcraftic
8
- * @version 1.1
9
- * @since 1.4.0
10
- */
11
-
12
-
13
- jQuery(function ($) {
14
-
15
- $(document).on('click', '.wyt-control-btn', function () {
16
-
17
- $('.wyt-control-btn').hide();
18
-
19
- var wrapper = $('#wyt-license-wrapper'),
20
- loader = wrapper.data('loader');
21
-
22
- $(this).after('<img class="wyt-loader" src="' + loader + '">');
23
-
24
- var data = {
25
- action: 'wyt_check_license',
26
- _wpnonce: $('#_wpnonce').val(),
27
- license_action: $(this).data('action'),
28
- licensekey: ''
29
- };
30
-
31
- if ($(this).data('action') == 'activate') {
32
- data.licensekey = $('#license-key').val();
33
- }
34
-
35
- $.ajax(ajaxurl, {
36
- type: 'post',
37
- dataType: 'json',
38
- data: data,
39
- success: function (response) {
40
- var noticeId;
41
-
42
- if (!response || !response.success) {
43
-
44
- $('.wyt-control-btn').show();
45
- $('.wyt-loader').remove();
46
-
47
- if (response.data) {
48
- console.log(response.data.error_message);
49
- alert('Error: [' + response.data.error_message + ']');
50
- } else {
51
- console.log(response);
52
- }
53
-
54
- return;
55
- }
56
-
57
- if (response.data && response.data.message) {
58
- alert(response.data.message);
59
-
60
- window.location.reload();
61
- }
62
- },
63
- error: function (xhr, ajaxOptions, thrownError) {
64
-
65
- $('.wyt-control-btn').show();
66
- $('.wyt-loader').remove();
67
-
68
- console.log(xhr.status, xhr.responseText, thrownError);
69
-
70
- alert('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']');
71
- }
72
- });
73
-
74
- return false;
75
- });
76
-
77
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
components/youtube/admin/assets/js/wyoutube-admin.js CHANGED
@@ -1,6 +1,22 @@
1
  (function ($) {
2
 
3
  $(document).ready(function ($) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
  // Modfiy options when search for is changed
6
  $('.wyt_feed_type').on('change', function (e) {
@@ -15,33 +31,6 @@
15
  });
16
 
17
 
18
- $('.wyt-close-icon').on('click', function (e){
19
- e.preventDefault();
20
- let data = $(this).data();
21
-
22
- $.ajax({
23
- url: ajaxurl,
24
- type: 'post',
25
- data: {
26
- action: 'wyt_delete_account',
27
- id: data.id,
28
- nonce: wyt.nonce
29
- },
30
- beforeSend: function () {
31
-
32
- },
33
- success: function (response) {
34
- window.location.reload();
35
- },
36
- complete: function () {
37
-
38
- },
39
- error: function (jqXHR, textStatus) {
40
-
41
- }
42
- });
43
- });
44
-
45
  //------OLD
46
  // Modfiy options when search for is changed
47
  var search = $('.wyt-container select[id$="search"]')
@@ -225,49 +214,6 @@
225
  advanced_container.toggle();
226
  });
227
 
228
- // Delete account with ajax
229
- $('.wyt-delete-account').on('click', function (e) {
230
- e.preventDefault();
231
-
232
- var c = confirm(wyt.remove_account);
233
-
234
- if (!c) {
235
- return false;
236
- }
237
-
238
- var $item = $(this),
239
- $tr = $item.closest('tr'),
240
- $spinner = $('#wyt-delete-spinner-' + $item.data('item_id'));
241
-
242
- $.ajax({
243
- url: ajaxurl,
244
- type: 'post',
245
- data: {
246
- action: 'wyt_delete_account',
247
- item_id: $item.data('item_id'),
248
- is_business: $item.data('is_business'),
249
- nonce: wyt.nonce
250
- },
251
- beforeSend: function () {
252
- $spinner.addClass('is-active');
253
- },
254
- success: function (response) {
255
- if (response.success) {
256
- $tr.fadeOut();
257
- //window.location.reload();
258
- } else {
259
- alert(response.data);
260
- }
261
- },
262
- complete: function () {
263
- $spinner.removeClass('is-active');
264
- },
265
- error: function (jqXHR, textStatus) {
266
- console.log(textStatus);
267
- }
268
- });
269
- });
270
-
271
  jQuery('span.wyt_demo_pro').on('click', function (e) {
272
  e.preventDefault();
273
  window.open('https://cm-wp.com/yft/pricing/', '_blank');
1
  (function ($) {
2
 
3
  $(document).ready(function ($) {
4
+ var modal_yt = $('#wis_add_ytaccount_modal');
5
+ var modal_yt_Overlay = $('#wis_add_ytaccount_modal_overlay');
6
+
7
+ modal_yt_Overlay.on("click", function () {
8
+ var conf = confirm("You haven't finished adding an account. Are you sure you want to close the window?");
9
+ if (conf) {
10
+ modal_yt.toggleClass("wis_closed");
11
+ modal_yt_Overlay.toggleClass("wis_closed");
12
+ }
13
+ });
14
+
15
+ $('.wis-btn-youtube-account').on('click', function (e) {
16
+ e.preventDefault();
17
+ modal_yt.removeClass('wis_closed');
18
+ modal_yt_Overlay.removeClass('wis_closed');
19
+ });
20
 
21
  // Modfiy options when search for is changed
22
  $('.wyt_feed_type').on('change', function (e) {
31
  });
32
 
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  //------OLD
35
  // Modfiy options when search for is changed
36
  var search = $('.wyt-container select[id$="search"]')
214
  advanced_container.toggle();
215
  });
216
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  jQuery('span.wyt_demo_pro').on('click', function (e) {
218
  e.preventDefault();
219
  window.open('https://cm-wp.com/yft/pricing/', '_blank');
components/youtube/html_templates/accounts.php ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var array $args
4
+ * @var \YoutubeFeed\Api\Channel\YoutubeChannelItem[] $accounts
5
+ * @var bool $is_premium
6
+ * @var array $accounts
7
+ */
8
+
9
+ $social = $args['social'];
10
+
11
+ $count_accounts = ! empty( $accounts ) ? count( $accounts ) : 0;
12
+ ?>
13
+ <form action="<?= $_SERVER['REQUEST_URI']; ?>" method="post">
14
+ <div class="wis-youtube-form-row">
15
+ <div class="wyt-add-form">
16
+ <input type="text" name="wyt_api_key" id="wyt_api_key" class="" style="width: 550px;"
17
+ value="<?= WIS_Plugin::app()->getOption( WYT_API_KEY_OPTION_NAME, '' ) ?>"
18
+ placeholder="<?php _e( 'Youtube api key.', 'instagram-slider-widget' ) ?>">
19
+ </div>
20
+ <div class="wyt-add-form">
21
+ <input type="submit" class="wyt-btn-Youtube-account"
22
+ value="<?php _e( 'Save', 'instagram-slider-widget' ) ?>">
23
+ </div>
24
+ <div class="" style="display: inline-block;">
25
+ <a href="<?= admin_url(); ?>?page=manual-wisw" target="_blank">How to get Youtube API
26
+ key</a>
27
+ </div>
28
+ </div>
29
+
30
+ <?php
31
+ if ( $count_accounts >= 1 && ! $is_premium ) : ?>
32
+ <div class="wyt-add-form">
33
+ <span class="instagram-account-pro"><?php echo sprintf( __( "More accounts in <a href='%s'>PRO version</a>", 'instagram-slider-widget' ), WIS_Plugin::app()->get_support()->get_pricing_url( true, "wis_settings" ) ); ?></span>
34
+ </div>
35
+ <?php else: ?>
36
+ <div class="wis-youtube-form-row" style="margin-top: 15px;">
37
+ <a class="wis-btn-youtube-account" target="_self" href="#" title="Add Account">
38
+ <?php _e( 'Add channel', 'instagram-slider-widget' ) ?>
39
+ </a>
40
+ </div>
41
+ <div class="wyt-add-form">
42
+ <span class="instagram-account-pro"><?php echo sprintf( __( "More accounts in <a href='%s'>PRO version</a>", 'instagram-slider-widget' ), WIS_Plugin::app()->get_support()->get_pricing_url( true, "wis_settings" ) ); ?></span>
43
+ </div>
44
+ <?php endif; ?>
45
+
46
+ </form>
47
+
48
+
49
+ <?php
50
+ if ( ! empty( $accounts ) ) :
51
+ ?>
52
+ <div class="wis-social-group"><?php echo __( 'Connected channels', 'instagram-slider-widget' ); ?></div>
53
+ <table class="widefat wis-table">
54
+ <thead>
55
+ <tr>
56
+ <th class="wis-profile-picture"><?php echo __( 'Image', 'instagram-slider-widget' ); ?></th>
57
+ <th class="wis-profile-id"><?php echo __( 'ID', 'instagram-slider-widget' ); ?></th>
58
+ <th class="wis-profile-name"><?php echo __( 'Name', 'instagram-slider-widget' ); ?></th>
59
+ <th class="wis-profile-actions"><?php echo __( 'Action', 'instagram-slider-widget' ); ?></th>
60
+ </tr>
61
+ </thead>
62
+ <tbody>
63
+ <?php
64
+ foreach ( $accounts as $channelId => $account ) {
65
+ $delete_link = $this->getActionUrl( 'delete', [ 'social' => $social, 'account' => $channelId ] );
66
+ ?>
67
+ <tr>
68
+ <td class="wis-profile-picture">
69
+ <img src="<?= $account->snippet->thumbnails->default->url ?>"
70
+ width="30" alt=""/>
71
+ </td>
72
+ <td class="wis-profile-id"><?php echo $channelId; ?></td>
73
+ <td class="wis-profile-name">
74
+ <a href="https://youtube.com/channel/<?= $channelId ?>"><?php echo $account->snippet->title; ?></a>
75
+ </td>
76
+ <td class="wis-profile-actions">
77
+ <a href="<?php echo $delete_link; ?>" class="btn btn-danger wyt-close-button">
78
+ <span class="dashicons dashicons-trash"></span><?php echo __( 'Delete', 'instagram-slider-widget' ); ?>
79
+ </a>
80
+ <span class="spinner"
81
+ id="wis-delete-spinner-<?php echo $channelId; ?>"></span>
82
+ </td>
83
+ </tr>
84
+ <?php
85
+ }
86
+ ?>
87
+ </tbody>
88
+ </table>
89
+ <?php wp_nonce_field( $this->plugin->getPrefix() . 'settings_form', $this->plugin->getPrefix() . 'nonce' ); ?>
90
+ <?php endif; ?>
91
+
92
+ <div id="wis_add_ytaccount_modal" class="wis_accounts_modal wis_closed">
93
+ <div class="wis_modal_header">
94
+ <?php _e( 'Add Youtube channel', 'instagram-slider-widget' ); ?>
95
+ </div>
96
+ <div class="wis_modal_content">
97
+ <form action="<?= $_SERVER['REQUEST_URI']; ?>" method="post">
98
+ <div class="wis-youtube-form-row">
99
+ <div class="wyt-add-form" style="width: 100%;">
100
+ <input type="text" name="wyt_feed_link" id="wyt_feed_link" class=""
101
+ placeholder="<?php _e( 'Channel link. Example: https://www.youtube.com/channel/UC0WP5P-ufpRfjbNrmOWwLBQ', 'instagram-slider-widget' ) ?>">
102
+ </div>
103
+ <div class="">
104
+ <a href="https://support.google.com/youtube/answer/6180214"
105
+ target="_blank"><?php _e( 'How to get channel link', 'instagram-slider-widget' ); ?></a>
106
+ </div>
107
+ </div>
108
+
109
+ <div class='wis-row-style'>
110
+ <input type="submit" class='btn btn-primary' value="<?php _e( 'Add channel', 'instagram-slider-widget' ); ?>">
111
+ </div>
112
+ </form>
113
+ </div>
114
+ </div>
115
+ <div id="wis_add_ytaccount_modal_overlay" class="wis_modal_overlay wis_closed"></div>
components/youtube/html_templates/default.php CHANGED
@@ -15,22 +15,22 @@ $yt_link = "https://www.youtube.com/watch?v=";
15
 
16
  <div class='wyoutube-videos-container'>
17
  <?php foreach ($videos as $video): ?>
18
- <?= $args['yimages_link'] == 'yt_link' ? sprintf('<a href="%s%s" target="_blank" style="text-decoration: none;">', $yt_link, $video->id->videoId) : ''?>
19
  <div class="wyoutube-video-container" data-remodal-target="<?= $video->id->videoId ?>"
20
- style="margin-top: 10px; width: <?=$width-2?>%; <?= $args['yimages_link'] == 'ypopup' ? 'cursor: pointer' : ''?> ">
21
  <img src="<?= $video->snippet->thumbnails->medium->url ?>" alt="">
22
  <div class="wyoutuve-video-title ellipsis-2-lines">
23
  <?= $video->snippet->title ?>
24
  </div>
25
  <div class="woutube-video-specs">
26
  <div class="wyoutube-video-watches">
27
- <?= sprintf("%s %s", $video->statistics->viewCount, __('views', 'yft'))?>
28
  </div>
29
  <div class="wyoutube-video-publish">
30
  <?= time_elapsed_string($video->snippet->publishedAt) ?>
31
  </div>
32
  </div>
33
  </div>
34
- <?= $args['yimages_link'] == 'yt_link' ? "</a>" : ''?>
35
  <?php endforeach; ?>
36
  </div>
15
 
16
  <div class='wyoutube-videos-container'>
17
  <?php foreach ($videos as $video): ?>
18
+ <?= 'yt_link' == $args['yimages_link'] ? sprintf('<a href="%s%s" target="_blank" style="text-decoration: none;">', $yt_link, $video->id->videoId) : ''?>
19
  <div class="wyoutube-video-container" data-remodal-target="<?= $video->id->videoId ?>"
20
+ style="margin-top: 10px; width: <?=$width-2?>%; <?= 'ypopup' == $args['yimages_link'] ? 'cursor: pointer' : ''?> ">
21
  <img src="<?= $video->snippet->thumbnails->medium->url ?>" alt="">
22
  <div class="wyoutuve-video-title ellipsis-2-lines">
23
  <?= $video->snippet->title ?>
24
  </div>
25
  <div class="woutube-video-specs">
26
  <div class="wyoutube-video-watches">
27
+ <?= sprintf("%s %s", $video->statistics->viewCount, __('views', 'instagram-slider-widget'))?>
28
  </div>
29
  <div class="wyoutube-video-publish">
30
  <?= time_elapsed_string($video->snippet->publishedAt) ?>
31
  </div>
32
  </div>
33
  </div>
34
+ <?= 'yt_link' == $args['yimages_link'] ? "</a>" : ''?>
35
  <?php endforeach; ?>
36
  </div>
components/youtube/html_templates/feed_header_template.php CHANGED
@@ -5,7 +5,7 @@ $account = $args['account'];
5
  $username = $account->snippet->title;
6
  $profile_pic_url = $account->snippet->thumbnails->default->url;
7
  $posts_count = $account->statistics->videoCount;
8
- $followers = !$account->statistics->hiddenSubscriberCount ? sprintf('%s %s',$account->statistics->subscriberCount , __('subscribers', 'yft')) : __('user has hidden the number of followers', 'yft');
9
  $profile_url = "https://youtube.com/channel/" . $account->snippet->channelId;
10
  ?>
11
 
@@ -26,7 +26,7 @@ $profile_url = "https://youtube.com/channel/" . $account->snippet->channelId
26
  </div>
27
  <div class="wyt-subscribe-button-container">
28
  <div class="wyt-subscribe-button">
29
- <a href="https://youtube.com/channel/<?= $account->snippet->channelId ?>" target="_blank" style=" text-decoration: none;color: white; font-size: 1rem"><?= __('subscribe', 'yft') ?></a>
30
  </div>
31
  </div>
32
  </div>
5
  $username = $account->snippet->title;
6
  $profile_pic_url = $account->snippet->thumbnails->default->url;
7
  $posts_count = $account->statistics->videoCount;
8
+ $followers = !$account->statistics->hiddenSubscriberCount ? sprintf('%s %s',$account->statistics->subscriberCount , __('subscribers', 'instagram-slider-widget')) : __('user has hidden the number of followers', 'instagram-slider-widget');
9
  $profile_url = "https://youtube.com/channel/" . $account->snippet->channelId;
10
  ?>
11
 
26
  </div>
27
  <div class="wyt-subscribe-button-container">
28
  <div class="wyt-subscribe-button">
29
+ <a href="https://youtube.com/channel/<?= $account->snippet->channelId ?>" target="_blank" style=" text-decoration: none;color: white; font-size: 1rem"><?= __('subscribe', 'instagram-slider-widget') ?></a>
30
  </div>
31
  </div>
32
  </div>
components/youtube/html_templates/feeds.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var WIS_FeedsPage $this
4
+ * @var array $data
5
+ * @var array $feeds
6
+ * @var string $social
7
+ */
8
+ ?>
9
+ <div class="wisw-social-content">
10
+ <div class="wisw-container-row">
11
+ <a href="<?php echo $this->getActionUrl( 'add', [ 'social' => $social ] ); ?>"
12
+ class="button action wis-add-feed-button"><?php _e( 'Add feed', 'instagram-slider-widget' ); ?></a>
13
+ </div>
14
+
15
+ <div class="wisw-container-row">
16
+ <table class="widefat wis-table wis-personal-status">
17
+ <thead>
18
+ <tr>
19
+ <th class="wis-profile-name"><?php echo __( 'Name', 'instagram-slider-widget' ); ?></th>
20
+ <th class="wis-profile-shortcode"><label for="wis_youtube_shortcode"><?php echo __( 'Shortcode', 'instagram-slider-widget' ); ?></label></th>
21
+ <th class="wis-profile-actions"><?php echo __( 'Action', 'instagram-slider-widget' ); ?></th>
22
+ </tr>
23
+ </thead>
24
+ <tbody>
25
+ <?php
26
+ if ( count( $feeds ) ) :
27
+ foreach ( $feeds as $feed_id => $feed ) {
28
+ $edit_link = $this->getActionUrl( 'edit', [ 'social' => $social, 'feed' => $feed_id ] );
29
+ $delete_link = $this->getActionUrl( 'delete', [ 'social' => $social, 'feed' => $feed_id ] );
30
+ ?>
31
+ <tr>
32
+ <td class="wis-profile-name">
33
+ <a href="<?php echo $edit_link; ?>">
34
+ <?php echo $feed->title; ?>
35
+ </a>
36
+ </td>
37
+ <td class="wis-profile-shortcode">
38
+ <input id="wis_youtube_shortcode" onclick="this.setSelectionRange(0, this.value.length)" type="text" class="form-input wis-shortcode-input"
39
+ value="[cm_youtube_feed id=&quot;<?php echo $feed_id ?>&quot;]" readonly="readonly">
40
+ </td>
41
+ <td class="wis-profile-actions">
42
+ <a href="<?php echo $edit_link; ?>" class="btn btn-primary">
43
+ <span class="dashicons dashicons-edit"></span>
44
+ </a>
45
+ <a href="<?php echo $delete_link; ?>" class="btn btn-danger">
46
+ <span class="dashicons dashicons-trash"></span>
47
+ </a>
48
+ </td>
49
+ </tr>
50
+ <?php
51
+ }
52
+ ?>
53
+ <?php else: ?>
54
+ <tr>
55
+ <td class="wis-profile-nofeed" colspan="3"><?php echo __( 'No feeds', 'instagram-slider-widget' ); ?></td>
56
+ </tr>
57
+ <?php endif; ?>
58
+ </tbody>
59
+ </table>
60
+ </div>
61
+ </div>
components/youtube/html_templates/form-feed.php ADDED
@@ -0,0 +1,235 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* @var array $args */
3
+
4
+ use YoutubeFeed\Api\YoutubeApi;
5
+
6
+ $instance = $args['instance'];
7
+ $accounts = $args['accounts'];
8
+ $accounts_business = $args['accounts_business'];
9
+ $sliders = $args['sliders'];
10
+ $options_linkto = $args['options_linkto'];
11
+ $is_update = $args['is_update'];
12
+ $feed_id = $args['instance']['id'] ?? '';
13
+ ?>
14
+ <div class="wisw-social-content">
15
+ <h2>
16
+ <?php if ( $is_update ) {
17
+ _e( 'Edit feed', 'instagram-slider-widget' );
18
+ } else {
19
+ _e( 'Add feed', 'instagram-slider-widget' );
20
+ } ?>
21
+ </h2>
22
+ <form action="" method="post" name="wis-feed-add-form" id="wis-feed-add-form">
23
+ <div class="jr-container">
24
+ <div class="isw-common-settings">
25
+ <div class="wis-flex-content">
26
+ <div class="wis-flex-content-column">
27
+ <div class="form-group">
28
+ <label for="title" class="form-label"><?php _e( 'Title:', 'instagram-slider-widget' ); ?></label>
29
+ <input class="form-input" id="title" name="title" value="<?php echo $instance['title']; ?>"/>
30
+ </div>
31
+ <div class="form-group" id="wis-feed-account">
32
+ <?php
33
+ if ( count( $accounts ) ) {
34
+ ?>
35
+ <label class="form-label" for="search"><?php _e( 'Account', 'instagram-slider-widget' ); ?></label>
36
+ <select id="search" class="form-select" name="search">
37
+ <?php
38
+ foreach ( $accounts as $channelId => $account ) {
39
+ $selected = $instance['search'] == $channelId ? "selected='selected'" : "";
40
+ echo "<option value='" . $channelId . "' {$selected}>{$account->snippet->title}</option>";
41
+ }
42
+ ?>
43
+ </select>
44
+ <?php
45
+ } else {
46
+ ?>
47
+ <label class="form-label" for="search"><?php _e( 'Account', 'instagram-slider-widget' ); ?></label>
48
+ <a href="<?php echo admin_url( 'admin.php?page=settings-wisw' ); ?>"><?php _e( 'Add account in settings', 'instagram-slider-widget' ); ?></a>
49
+ <?php
50
+ }
51
+ ?>
52
+ </div>
53
+ <div class="form-group">
54
+ <div class="input-group">
55
+ <label class="form-label form-inline"
56
+ for="refresh_hour"><?php _e( 'Check for new images every:', 'instagram-slider-widget' ); ?></label>
57
+ <div class="input-group">
58
+ <input class="form-input" type="number" min="1" max="200" id="refresh_hour" name="refresh_hour"
59
+ value="<?php echo $instance['refresh_hour']; ?>"/>
60
+ <span class="input-group-addon"><?php _e( 'hours', 'instagram-slider-widget' ); ?></span>
61
+ </div>
62
+ </div>
63
+ </div>
64
+ </div>
65
+ <div class="wis-flex-content-column">
66
+ <?php if ( $feed_id ) : ?>
67
+ <div id="wis-field-jr_insta_shortcode" class="form-group">
68
+ <label class="form-label" for="jr_insta_shortcode">
69
+ <?php _e( 'Shortcode of this feed:', 'instagram-slider-widget' ); ?>
70
+ </label>
71
+ <input id="jr_insta_shortcode" onclick="this.setSelectionRange(0, this.value.length)" type="text" class="form-input"
72
+ value="[cm_youtube_feed id=&quot;<?php echo $feed_id ?>&quot;]"
73
+ readonly="readonly" style="border:none; color:black; font-family:monospace;">
74
+ <div class="jr-description"><?php _e( 'Use this shortcode in any page or post to display images with this widget configuration!', 'instagram-slider-widget' ) ?></div>
75
+ </div>
76
+ <?php endif; ?>
77
+ </div>
78
+ </div>
79
+ </div>
80
+
81
+ <div class="isw-tabs">
82
+ <ul>
83
+ <li class="desk_tab active" id="desk_tab_<?= $feed_id ?>" data-tab-id="<?= $feed_id ?>"><?php _e( 'Desktop', 'instagram-slider-widget' ); ?></li>
84
+ <li class="mob_tab" id="mob_tab_<?= $feed_id ?>" data-tab-id="<?= $feed_id ?>"><?php _e( 'Mobile', 'instagram-slider-widget' ); ?></li>
85
+ </ul>
86
+ </div>
87
+
88
+ <div class="isw-tabs-content" id="widget_tabs_<?= $feed_id ?>" data-widget-id="<?= $feed_id ?>">
89
+ <div id="desk_tab_content_<?= $feed_id ?>" class="desk_settings">
90
+ <h3 style="width: 100%; text-align: center"><?php _e( 'Desktop settings', 'instagram-slider-widget' ); ?></h3>
91
+
92
+ <div class="wis-flex-content">
93
+ <div class="wis-flex-content-column">
94
+ <div id="wis-field-images_number" class="form-group">
95
+ <div class="input-group">
96
+ <label class="form-label form-inline"
97
+ for="images_number"><?php _e( 'Count of images to show:', 'instagram-slider-widget' ); ?>
98
+ </label>
99
+ <div class="input-group">
100
+ <input class="form-input" type="number" min="1" max="" id="images_number" name="images_number"
101
+ value="<?php echo $instance['images_number']; ?>"/>
102
+ <span class="input-group-addon"><?php _e( 'pcs', 'instagram-slider-widget' ); ?></span>
103
+ </div>
104
+ </div>
105
+ <div class="jr-description">
106
+ <?php if ( ! $this->plugin->is_premium() ) {
107
+ _e( 'Maximum 20 images in free version.', 'instagram-slider-widget' );
108
+ echo " " . sprintf( __( "More in <a href='%s'>PRO version</a>", 'instagram-slider-widget' ), $this->plugin->get_support()->get_pricing_url( true, "wis_widget_settings" ) );
109
+ }
110
+ ?>
111
+ </div>
112
+
113
+ </div>
114
+ <div id="wis-field-words_in_caption" class="form-group">
115
+ <div class="input-group">
116
+ <label class="form-label form-inline" for="title_words">
117
+ <?php _e( 'Number of words in caption:', 'instagram-slider-widget' ); ?>
118
+ </label>
119
+ <div class="input-group">
120
+ <input class="form-input" type="number" min="0" max="" id="title_words" name="title_words"
121
+ value="<?php echo $instance['title_words']; ?>"/>
122
+ <span class="input-group-addon"><?php _e( 'pcs', 'instagram-slider-widget' ); ?></span>
123
+ </div>
124
+ </div>
125
+ </div>
126
+ <div id="wis-field-request_by" class="form-group">
127
+ <label class="form-label" for="request_by">
128
+ <?php _e( 'Request videos by:', 'instagram-slider-widget' ); ?>
129
+ </label>
130
+ <select class="form-select" name="request_by" id="request_by">
131
+ <option value="<?= YoutubeApi::orderByRelevance ?>" <?php selected( $instance['request_by'], YoutubeApi::orderByRelevance, true ); ?>><?php _e( 'Relevance', 'instagram-slider-widget' ); ?></option>
132
+ <option value="<?= YoutubeApi::orderByDate ?>" <?php selected( $instance['request_by'], YoutubeApi::orderByDate, true ); ?>> <?php _e( 'Date', 'instagram-slider-widget' ); ?></option>
133
+ <option value="<?= YoutubeApi::orderByRating ?>" <?php selected( $instance['request_by'], YoutubeApi::orderByRating, true ); ?>> <?php _e( 'Rating', 'instagram-slider-widget' ); ?></option>
134
+ <option value="<?= YoutubeApi::orderByViewCount ?>" <?php selected( $instance['request_by'], YoutubeApi::orderByViewCount, true ); ?>><?php _e( 'View count', 'instagram-slider-widget' ); ?></option>
135
+ <option value="<?= YoutubeApi::orderByUnspec ?>" <?php selected( $instance['request_by'], YoutubeApi::orderByUnspec, true ); ?>> <?php _e( 'Unspecified', 'instagram-slider-widget' ); ?></option>
136
+ </select>
137
+ </div>
138
+ <div id="wis-field-orderby" class="form-group">
139
+ <label class="form-label" for="orderby"><?php _e( 'Order by', 'instagram-slider-widget' ); ?></label>
140
+ <select class="form-select" name="orderby" id="orderby">
141
+ <option value="date-ASC" <?php selected( $instance['orderby'], 'date-ASC', true ); ?>><?php _e( 'Date - Ascending', 'instagram-slider-widget' ); ?></option>
142
+ <option value="date-DESC" <?php selected( $instance['orderby'], 'date-DESC', true ); ?>><?php _e( 'Date - Descending', 'instagram-slider-widget' ); ?></option>
143
+ <option value="popular-ASC" <?php selected( $instance['orderby'], 'popular-ASC', true ); ?>><?php _e( 'Popularity - Ascending', 'instagram-slider-widget' ); ?></option>
144
+ <option value="popular-DESC" <?php selected( $instance['orderby'], 'popular-DESC', true ); ?>><?php _e( 'Popularity - Descending', 'instagram-slider-widget' ); ?></option>
145
+ <option value="rand" <?php selected( $instance['orderby'], 'rand', true ); ?>><?php _e( 'Random', 'instagram-slider-widget' ); ?></option>
146
+ </select>
147
+ </div>
148
+ <div id="wis-field-images_link" class="form-group">
149
+ <label class="form-label" for="yimages_link">
150
+ <?php _e( 'Link to', 'instagram-slider-widget' ); ?>
151
+ </label>
152
+ <select class="form-select" name="yimages_link" id="yimages_link">
153
+ <?php
154
+ if ( count( $options_linkto ) ) {
155
+ foreach ( $options_linkto as $key => $option ) {
156
+ $selected = selected( $instance['yimages_link'], $key, false );
157
+ echo "<option value='{$key}' {$selected}>{$option}</option>\n";
158
+ }
159
+ }
160
+ ?>
161
+ </select>
162
+ </div>
163
+ <div id="wis-field-custom_url" class="form-group" <?php echo 'custom_url' !== $instance['yimages_link'] ? 'style="display:none;' : '' ?>>
164
+ <label class="form-label" for="custom_url"><?php _e( 'Custom link:', 'instagram-slider-widget' ); ?></label>
165
+ <input class="form-input" id="custom_url" name="custom_url" value="<?php echo $instance['custom_url']; ?>"/>
166
+ <span class="jr-description"><?php _e( '* use this field only if the above option is set to <strong>Custom Link</strong>', 'instagram-slider-widget' ); ?></span>
167
+ </div>
168
+ <div id="wis-field-show_feed_header" class="form-group">
169
+ <label class="form-switch" for="show_feed_header">
170
+ <input class="form-input" id="show_feed_header"
171
+ name="show_feed_header" type="checkbox"
172
+ value="1" <?php checked( '1', $instance['show_feed_header'] ); ?> />
173
+ <i class="form-icon"></i>
174
+ <?php _e( 'Show feed header', 'instagram-slider-widget' ); ?>
175
+ </label>
176
+ </div>
177
+ <div id="wis-field-blocked_words" class="form-group">
178
+ <label class="form-label" for="blocked_words">
179
+ <?php _e( 'Block words', 'instagram-slider-widget' ); ?>
180
+ </label>
181
+ <input class="form-input" id="blocked_words" name="blocked_words"
182
+ value="<?php echo $instance['blocked_words']; ?>"/>
183
+ <div class="jr-description"><?php _e( 'Enter comma-separated words. If one of them occurs in the image description, the image will not be displayed', 'instagram-slider-widget' ); ?></div>
184
+ </div>
185
+ </div>
186
+ <div class="wis-flex-content-column">
187
+ <div id="wis-field-template" class="form-group">
188
+ <label class="form-label" for="template">
189
+ <?php _e( 'Template', 'instagram-slider-widget' ); ?>
190
+ </label>
191
+ <select class="form-select" name="template" id="template">
192
+ <?php
193
+ if ( count( $sliders ) ) {
194
+ foreach ( $sliders as $key => $slider ) {
195
+ $selected = ( $instance['template'] == $key ) ? "selected='selected'" : '';
196
+ echo "<option value='{$key}' {$selected}>{$slider}</option>\n";
197
+ }
198
+ }
199
+ ?>
200
+ </select>
201
+ <div id="masonry_notice"
202
+ class="masonry_notice jr-description <?php if ( 'masonry' != $instance['template'] ) {
203
+ echo 'hidden';
204
+ } ?>">
205
+ <?php _e( "Not recommended for <strong>sidebar</strong>" ) ?></div>
206
+ </div>
207
+ <div class="default_settings">
208
+ <div id="wis-field-columns" class="form-group">
209
+ <label class="form-label form-inline" for="columns">
210
+ <?php _e( 'Number of Columns:', 'instagram-slider-widget' ); ?>
211
+ </label>
212
+ <input class="form-input" id="columns" name="columns" type="number" min="1" max="10"
213
+ value="<?php echo $instance['columns']; ?>"/>
214
+ <div class='jr-description'><?php _e( 'max is 10', 'instagram-slider-widget' ); ?></div>
215
+ </div>
216
+ </div>
217
+ </div>
218
+ </div>
219
+ </div>
220
+
221
+ <div id="mob_tab_content_<?= $feed_id ?>" class="mob_settings" style="display: none;">
222
+ <h3 style="width: 100%; text-align: center"><?php _e( 'Mobile settings', 'instagram-slider-widget' ); ?></h3>
223
+ <?php if ( defined( 'WISP_PLUGIN_ACTIVE' ) && $this->plugin->is_premium() ) :
224
+ echo apply_filters( 'wis/youtube/mob_settings', '', $this, $instance, $sliders, $options_linkto, $feed_id );
225
+ else: ?>
226
+ <h3 style="width: 100%; text-align: center"><?php _e( 'Mobile settings available only in premium version', 'instagram-slider-widget' ); ?></h3>
227
+ <?php endif; ?>
228
+ </div>
229
+ </div>
230
+ </div>
231
+ <div class="wis-feed-save-button-container">
232
+ <input name="wis-feed-save-action" class="wbcr-factory-button wbcr-save-button" type="submit" value="<?php _e( 'Save', 'instagram-slider-widget' ); ?>">
233
+ </div>
234
+ </form>
235
+ </div>
components/youtube/html_templates/widget_settings.php CHANGED
@@ -13,7 +13,7 @@ $instance = $args['instance'];
13
 
14
  <div class="wyt-container">
15
  <p>
16
- <label for="<?php echo $this->get_field_id( 'title' ); ?>"><strong><?php _e( 'Title:', 'yft' ); ?></strong></label>
17
  <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
18
  name="<?php echo $this->get_field_name( 'title' ); ?>"
19
  value="<?php echo $instance['title']; ?>"/>
@@ -23,7 +23,7 @@ $instance = $args['instance'];
23
  <?php
24
  if ( count( $accounts ) ) {
25
  ?>
26
- <label for="<?php echo $this->get_field_id( 'search' ); ?>"><strong><?php _e( 'Feed:', 'yft' ); ?></strong></label>
27
  <select id="<?php echo $this->get_field_id( 'search' ); ?>" class="widefat"
28
  name="<?php echo $this->get_field_name( 'search' ); ?>"><?php
29
  foreach ( $accounts as $channelId => $account ) {
@@ -33,37 +33,37 @@ $instance = $args['instance'];
33
  ?>
34
  </select><?php
35
  } else {
36
- echo "<a href='/wp-admin/admin.php?page=settings-wisw&tab=Youtube'>" . __( 'Add feed in settings', 'yft' ) . "</a>";
37
  }
38
  ?>
39
  </span>
40
  </p>
41
  <p id="img_to_show">
42
- <label for="<?php echo $this->get_field_id( 'images_number' ); ?>"><strong><?php _e( 'Count of images to show:', 'yft' ); ?></strong>
43
  <input class="small-text" type="number" min="1" max=""
44
  id="<?php echo $this->get_field_id( 'images_number' ); ?>"
45
  name="<?php echo $this->get_field_name( 'images_number' ); ?>"
46
  value="<?php echo $instance['images_number']; ?>"/>
47
  <span class="wyt-description">
48
  <?php if ( !$this->plugin->is_premium() ) {
49
- _e( 'Maximum 20 images in free version.', 'yft' );
50
- echo " " . sprintf( __( "More in <a href='%s'>PRO version</a>", 'yft' ), $this->plugin->get_support()->get_pricing_url( true, "wyt_widget_settings" ) );
51
  }
52
  ?>
53
  </span>
54
  </label>
55
  </p>
56
  <p>
57
- <label for="<?php echo $this->get_field_id( 'refresh_hour' ); ?>"><strong><?php _e( 'Check for new posts every:', 'yft' ); ?></strong>
58
  <input class="small-text" type="number" min="1" max="200"
59
  id="<?php echo $this->get_field_id( 'refresh_hour' ); ?>"
60
  name="<?php echo $this->get_field_name( 'refresh_hour' ); ?>"
61
  value="<?php echo $instance['refresh_hour']; ?>"/>
62
- <span><?php _e( 'hours', 'yft' ); ?></span>
63
  </label>
64
  </p>
65
  <p class="show_feed_header">
66
- <strong><?php _e( 'Show feed header:', 'yft' ); ?></strong>
67
  <label class="switch" for="<?php echo $this->get_field_id( 'show_feed_header' ); ?>">
68
  <input type="hidden" id="<?php echo $this->get_field_id( 'show_feed_header' );?>"
69
  name="<?php echo $this->get_field_name( 'show_feed_header' ); ?>" value="0">
@@ -74,7 +74,7 @@ $instance = $args['instance'];
74
  </label>
75
  </p>
76
  <p>
77
- <label for="<?php echo $this->get_field_id( 'template' ); ?>"><strong><?php _e( 'Template', 'yft' ); ?></strong>
78
  <select class="widefat" name="<?php echo $this->get_field_name( 'template' ); ?>"
79
  id="<?php echo $this->get_field_id( 'template' ); ?>">
80
  <?php
@@ -88,15 +88,13 @@ $instance = $args['instance'];
88
  </select>
89
  </label>
90
  </p>
91
- <p class="<?php if ( 'default' != $instance['template'] && 'default-no-border' != $instance['template'] ) {
92
- echo 'hidden';
93
- } ?>">
94
- <label for="<?php echo $this->get_field_id( 'columns' ); ?>"><strong><?php _e( 'Number of Columns:', 'yft' ); ?></strong>
95
  <input class="small-text" id="<?php echo $this->get_field_id( 'columns' ); ?>"
96
  type="number" min="1" max="10"
97
  name="<?php echo $this->get_field_name( 'columns' ); ?>"
98
  value="<?php echo $instance['columns']; ?>"/>
99
- <span class='wyt-description'><?php _e( 'max is 10 ( only for thumbnails template )', 'yft' ); ?></span>
100
  </label>
101
  </p>
102
  <p>
@@ -112,19 +110,19 @@ $instance = $args['instance'];
112
  </label>
113
  </p>
114
  <p>
115
- <label for="<?php echo $this->get_field_id( 'orderby' ); ?>"><strong><?php _e( 'Order by', 'yft' ); ?></strong>
116
  <select class="widefat" name="<?php echo $this->get_field_name( 'orderby' ); ?>"
117
  id="<?php echo $this->get_field_id( 'orderby' ); ?>">
118
- <option value="date-ASC" <?php selected( $instance['orderby'], 'date-ASC', true ); ?>><?php _e( 'Date - Ascending', 'yft' ); ?></option>
119
- <option value="date-DESC" <?php selected( $instance['orderby'], 'date-DESC', true ); ?>><?php _e( 'Date - Descending', 'yft' ); ?></option>
120
- <option value="popular-ASC" <?php selected( $instance['orderby'], 'popular-ASC', true ); ?>><?php _e( 'Popularity - Ascending', 'yft' ); ?></option>
121
- <option value="popular-DESC" <?php selected( $instance['orderby'], 'popular-DESC', true ); ?>><?php _e( 'Popularity - Descending', 'yft' ); ?></option>
122
- <option value="rand" <?php selected( $instance['orderby'], 'rand', true ); ?>><?php _e( 'Random', 'yft' ); ?></option>
123
  </select>
124
  </label>
125
  </p>
126
  <p>
127
- <label for="<?php echo $this->get_field_id( 'yimages_link' ); ?>"><strong><?php _e( 'Link to', 'yft' ); ?></strong>
128
  <select class="widefat" name="<?php echo $this->get_field_name( 'yimages_link' ); ?>"
129
  id="<?php echo $this->get_field_id( 'yimages_link' ); ?>">
130
  <?php
@@ -145,31 +143,31 @@ $instance = $args['instance'];
145
  </select>
146
  </label>
147
  </p>
148
- <p class="<?php if ( 'custom_url' != $instance['yimages_link'] ) {
149
- echo 'hidden';
150
- } ?>">
151
- <label for="<?php echo $this->get_field_id( 'custom_url' ); ?>"><?php _e( 'Custom link:', 'yft' ); ?></label>
152
  <input class="widefat" id="<?php echo $this->get_field_id( 'custom_url' ); ?>"
153
  name="<?php echo $this->get_field_name( 'custom_url' ); ?>"
154
  value="<?php echo $instance['custom_url']; ?>"/>
155
- <span><?php _e( '* use this field only if the above option is set to <strong>Custom Link</strong>', 'yft' ); ?></span>
156
  </p>
157
  <p>
158
- <label for="<?php echo $this->get_field_id( 'blocked_words' ); ?>"><?php _e( 'Block words', 'yft' ); ?>
159
  :</label>
160
  <input class="widefat" id="<?php echo $this->get_field_id( 'blocked_words' ); ?>"
161
  name="<?php echo $this->get_field_name( 'blocked_words' ); ?>"
162
  value="<?php echo $instance['blocked_words']; ?>"/>
163
- <span class="wyt-description"><?php _e( 'Enter comma-separated words. If one of them occurs in the image description, the image will not be displayed', 'yft' ); ?></span>
164
  </p>
 
 
165
  <?php $widget_id = preg_replace( '/[^0-9]/', '', $this->id );
166
  if ( $widget_id != '' ) : ?>
167
  <p>
168
- <label for="jr_insta_shortcode"><?php _e( 'Shortcode of this Widget:', 'yft' ); ?></label>
169
  <input id="jr_insta_shortcode" onclick="this.setSelectionRange(0, this.value.length)" type="text"
170
  class="widefat" value="[cm_youtube_feed id=&quot;<?php echo $widget_id ?>&quot;]"
171
  readonly="readonly" style="border:none; color:black; font-family:monospace;">
172
- <span class="wyt-description"><?php _e( 'Use this shortcode in any page or post to display images with this widget configuration!', 'yft' ) ?></span>
173
  </p>
174
  <?php endif; ?>
175
  </div>
13
 
14
  <div class="wyt-container">
15
  <p>
16
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>"><strong><?php _e( 'Title:', 'instagram-slider-widget' ); ?></strong></label>
17
  <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
18
  name="<?php echo $this->get_field_name( 'title' ); ?>"
19
  value="<?php echo $instance['title']; ?>"/>
23
  <?php
24
  if ( count( $accounts ) ) {
25
  ?>
26
+ <label for="<?php echo $this->get_field_id( 'search' ); ?>"><strong><?php _e( 'Youtube feed', 'instagram-slider-widget' ); ?></strong>:</label>
27
  <select id="<?php echo $this->get_field_id( 'search' ); ?>" class="widefat"
28
  name="<?php echo $this->get_field_name( 'search' ); ?>"><?php
29
  foreach ( $accounts as $channelId => $account ) {
33
  ?>
34
  </select><?php
35
  } else {
36
+ echo "<a href='/wp-admin/admin.php?page=settings-wisw&tab=Youtube'>" . __( 'Add feed in settings', 'instagram-slider-widget' ) . "</a>";
37
  }
38
  ?>
39
  </span>
40
  </p>
41
  <p id="img_to_show">
42
+ <label for="<?php echo $this->get_field_id( 'images_number' ); ?>"><strong><?php _e( 'Count of images to show:', 'instagram-slider-widget' ); ?></strong>
43
  <input class="small-text" type="number" min="1" max=""
44
  id="<?php echo $this->get_field_id( 'images_number' ); ?>"
45
  name="<?php echo $this->get_field_name( 'images_number' ); ?>"
46
  value="<?php echo $instance['images_number']; ?>"/>
47
  <span class="wyt-description">
48
  <?php if ( !$this->plugin->is_premium() ) {
49
+ _e( 'Maximum 20 images in free version.', 'instagram-slider-widget' );
50
+ echo " " . sprintf( __( "More in <a href='%s'>PRO version</a>", 'instagram-slider-widget' ), $this->plugin->get_support()->get_pricing_url( true, "wyt_widget_settings" ) );
51
  }
52
  ?>
53
  </span>
54
  </label>
55
  </p>
56
  <p>
57
+ <label for="<?php echo $this->get_field_id( 'refresh_hour' ); ?>"><strong><?php _e( 'Check for new posts every:', 'instagram-slider-widget' ); ?></strong>
58
  <input class="small-text" type="number" min="1" max="200"
59
  id="<?php echo $this->get_field_id( 'refresh_hour' ); ?>"
60
  name="<?php echo $this->get_field_name( 'refresh_hour' ); ?>"
61
  value="<?php echo $instance['refresh_hour']; ?>"/>
62
+ <span><?php _e( 'hours', 'instagram-slider-widget' ); ?></span>
63
  </label>
64
  </p>
65
  <p class="show_feed_header">
66
+ <strong><?php _e( 'Show feed header:', 'instagram-slider-widget' ); ?></strong>
67
  <label class="switch" for="<?php echo $this->get_field_id( 'show_feed_header' ); ?>">
68
  <input type="hidden" id="<?php echo $this->get_field_id( 'show_feed_header' );?>"
69
  name="<?php echo $this->get_field_name( 'show_feed_header' ); ?>" value="0">
74
  </label>
75
  </p>
76
  <p>
77
+ <label for="<?php echo $this->get_field_id( 'template' ); ?>"><strong><?php _e( 'Template', 'instagram-slider-widget' ); ?></strong>
78
  <select class="widefat" name="<?php echo $this->get_field_name( 'template' ); ?>"
79
  id="<?php echo $this->get_field_id( 'template' ); ?>">
80
  <?php
88
  </select>
89
  </label>
90
  </p>
91
+ <p class="<?php if ( 'default' != $instance['template'] && 'default-no-border' != $instance['template'] ) {echo 'hidden';} ?>">
92
+ <label for="<?php echo $this->get_field_id( 'columns' ); ?>"><strong><?php _e( 'Number of Columns:', 'instagram-slider-widget' ); ?></strong>
 
 
93
  <input class="small-text" id="<?php echo $this->get_field_id( 'columns' ); ?>"
94
  type="number" min="1" max="10"
95
  name="<?php echo $this->get_field_name( 'columns' ); ?>"
96
  value="<?php echo $instance['columns']; ?>"/>
97
+ <span class='wyt-description'><?php _e( 'max is 10 ( only for thumbnails template )', 'instagram-slider-widget' ); ?></span>
98
  </label>
99
  </p>
100
  <p>
110
  </label>
111
  </p>
112
  <p>
113
+ <label for="<?php echo $this->get_field_id( 'orderby' ); ?>"><strong><?php _e( 'Order by', 'instagram-slider-widget' ); ?></strong>
114
  <select class="widefat" name="<?php echo $this->get_field_name( 'orderby' ); ?>"
115
  id="<?php echo $this->get_field_id( 'orderby' ); ?>">
116
+ <option value="date-ASC" <?php selected( $instance['orderby'], 'date-ASC', true ); ?>><?php _e( 'Date - Ascending', 'instagram-slider-widget' ); ?></option>
117
+ <option value="date-DESC" <?php selected( $instance['orderby'], 'date-DESC', true ); ?>><?php _e( 'Date - Descending', 'instagram-slider-widget' ); ?></option>
118
+ <option value="popular-ASC" <?php selected( $instance['orderby'], 'popular-ASC', true ); ?>><?php _e( 'Popularity - Ascending', 'instagram-slider-widget' ); ?></option>
119
+ <option value="popular-DESC" <?php selected( $instance['orderby'], 'popular-DESC', true ); ?>><?php _e( 'Popularity - Descending', 'instagram-slider-widget' ); ?></option>
120
+ <option value="rand" <?php selected( $instance['orderby'], 'rand', true ); ?>><?php _e( 'Random', 'instagram-slider-widget' ); ?></option>
121
  </select>
122
  </label>
123
  </p>
124
  <p>
125
+ <label for="<?php echo $this->get_field_id( 'yimages_link' ); ?>"><strong><?php _e( 'Link to', 'instagram-slider-widget' ); ?></strong>
126
  <select class="widefat" name="<?php echo $this->get_field_name( 'yimages_link' ); ?>"
127
  id="<?php echo $this->get_field_id( 'yimages_link' ); ?>">
128
  <?php
143
  </select>
144
  </label>
145
  </p>
146
+ <p class="<?php if ( 'custom_url' != $instance['yimages_link'] ) {echo 'hidden';} ?>">
147
+ <label for="<?php echo $this->get_field_id( 'custom_url' ); ?>"><?php _e( 'Custom link:', 'instagram-slider-widget' ); ?></label>
 
 
148
  <input class="widefat" id="<?php echo $this->get_field_id( 'custom_url' ); ?>"
149
  name="<?php echo $this->get_field_name( 'custom_url' ); ?>"
150
  value="<?php echo $instance['custom_url']; ?>"/>
151
+ <span><?php _e( '* use this field only if the above option is set to <strong>Custom Link</strong>', 'instagram-slider-widget' ); ?></span>
152
  </p>
153
  <p>
154
+ <label for="<?php echo $this->get_field_id( 'blocked_words' ); ?>"><?php _e( 'Block words', 'instagram-slider-widget' ); ?>
155
  :</label>
156
  <input class="widefat" id="<?php echo $this->get_field_id( 'blocked_words' ); ?>"
157
  name="<?php echo $this->get_field_name( 'blocked_words' ); ?>"
158
  value="<?php echo $instance['blocked_words']; ?>"/>
159
+ <span class="wyt-description"><?php _e( 'Enter comma-separated words. If one of them occurs in the image description, the image will not be displayed', 'instagram-slider-widget' ); ?></span>
160
  </p>
161
+
162
+
163
  <?php $widget_id = preg_replace( '/[^0-9]/', '', $this->id );
164
  if ( $widget_id != '' ) : ?>
165
  <p>
166
+ <label for="jr_insta_shortcode"><?php _e( 'Shortcode of this Widget:', 'instagram-slider-widget' ); ?></label>
167
  <input id="jr_insta_shortcode" onclick="this.setSelectionRange(0, this.value.length)" type="text"
168
  class="widefat" value="[cm_youtube_feed id=&quot;<?php echo $widget_id ?>&quot;]"
169
  readonly="readonly" style="border:none; color:black; font-family:monospace;">
170
+ <span class="wyt-description"><?php _e( 'Use this shortcode in any page or post to display images with this widget configuration!', 'instagram-slider-widget' ) ?></span>
171
  </p>
172
  <?php endif; ?>
173
  </div>
components/youtube/includes/Api/YoutubeApi.php CHANGED
@@ -3,7 +3,7 @@
3
  namespace YoutubeFeed\Api;
4
 
5
 
6
- use Instagram\Includes\WIS_Plugin;
7
  use YoutubeFeed\Api\Channel\YoutubeChannelResponse;
8
  use YoutubeFeed\Api\Exceptions\YoutubeException;
9
  use YoutubeFeed\Api\Video\YoutubeComment;
@@ -15,7 +15,7 @@ class YoutubeApi
15
 
16
  public function __construct()
17
  {
18
- $this->apiKey = WIS_Plugin::app()->getOption( WYT_API_KEY_OPTION_NAME, '');
19
  }
20
 
21
  const basePath = "https://www.googleapis.com/youtube/v3";
3
  namespace YoutubeFeed\Api;
4
 
5
 
6
+
7
  use YoutubeFeed\Api\Channel\YoutubeChannelResponse;
8
  use YoutubeFeed\Api\Exceptions\YoutubeException;
9
  use YoutubeFeed\Api\Video\YoutubeComment;
15
 
16
  public function __construct()
17
  {
18
+ $this->apiKey = \WIS_Plugin::app()->getOption( WYT_API_KEY_OPTION_NAME, '');
19
  }
20
 
21
  const basePath = "https://www.googleapis.com/youtube/v3";
components/youtube/includes/class-youtube-feed.php ADDED
@@ -0,0 +1,411 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @property string title
4
+ * @property string search
5
+ * @property int refresh_hour
6
+ * @property string blocked_words
7
+ * @property string template
8
+ * @property string yimages_link
9
+ * @property string custom_url
10
+ * @property string request_by
11
+ * @property string orderby
12
+ * @property int images_number
13
+ * @property string title_words
14
+ * @property int columns
15
+ * @property string m_title
16
+ * @property string m_search
17
+ * @property int m_refresh_hour
18
+ * @property string m_blocked_words
19
+ * @property string m_template
20
+ * @property string m_yimages_link
21
+ * @property string m_custom_url
22
+ * @property string m_request_by
23
+ * @property string m_orderby
24
+ * @property int m_images_number
25
+ * @property string m_title_words
26
+ * @property int m_columns
27
+ */
28
+
29
+ use YoutubeFeed\Api\YoutubeApi;
30
+
31
+ class WIS_Youtube_Feed extends WIS_Feed {
32
+
33
+ public $social = 'youtube';
34
+
35
+ /**
36
+ * @var string
37
+ */
38
+ protected $component_dir = WYT_COMPONENT_DIR;
39
+
40
+ /**
41
+ * @var YoutubeApi
42
+ */
43
+ public $api;
44
+
45
+ /**
46
+ * Instagram feed constructor.
47
+ */
48
+ public function __construct( $feed = [] ) {
49
+ parent::__construct( $feed );
50
+
51
+ $this->api = new YoutubeApi();
52
+ }
53
+
54
+ /**
55
+ * Set default values
56
+ */
57
+ protected function setDefaults() {
58
+ $this->templates = apply_filters( 'wis/youtube/sliders', [
59
+ "default" => 'Default',
60
+ ] );
61
+
62
+ $this->linkto = apply_filters( 'wis/youtube/options/link_to', [
63
+ "yt_link" => __( 'Youtube link', 'instagram-slider-widget' ),
64
+ "custom_url" => __( 'Custom URL', 'instagram-slider-widget' ),
65
+ "none" => __( 'None', 'instagram-slider-widget' ),
66
+ ] );
67
+
68
+ $this->defaults = [
69
+ 'title' => __( 'Youtube feed', 'instagram-slider-widget' ),
70
+ 'search' => '',
71
+ 'refresh_hour' => 5,
72
+ 'blocked_words' => '',
73
+ 'template' => 'slider',
74
+ 'yimages_link' => 'post_page',
75
+ 'custom_url' => '',
76
+ 'request_by' => YoutubeApi::orderByRelevance,
77
+ 'orderby' => 'rand',
78
+ 'images_number' => 20,
79
+ 'title_words' => 50,
80
+ 'columns' => 2,
81
+ 'show_feed_header' => 1,
82
+
83
+ 'm_images_number' => 20,
84
+ 'm_title_words' => 50,
85
+ 'm_request_by' => YoutubeApi::orderByRelevance,
86
+ 'm_orderby' => 'rand',
87
+ 'm_yimages_link' => 'post_page',
88
+ 'm_custom_url' => '',
89
+ 'm_blocked_words' => '',
90
+ 'm_template' => 'slider',
91
+ 'm_columns' => 2,
92
+ 'm_show_feed_header' => 1,
93
+ ];
94
+ }
95
+
96
+ /**
97
+ * @return array
98
+ */
99
+ public function getTemplates() {
100
+ return apply_filters( 'wis/youtube/sliders', $this->templates );
101
+ }
102
+
103
+ /**
104
+ * @return array
105
+ */
106
+ public function getLinkto() {
107
+ return apply_filters( 'wis/youtube/options/link_to', $this->linkto );
108
+ }
109
+
110
+ /**
111
+ * @inerhitDoc
112
+ */
113
+ public function form( $feed_id = 0 ) {
114
+ $feeds = new WIS_Feeds( $this->social );
115
+ $accounts = $this->getAccounts();
116
+
117
+ $args = [
118
+ 'is_update' => $feed_id ? true : false,
119
+ 'add_link' => WIS_Page::instance()->getActionUrl( 'add' ),
120
+ 'feeds' => $feeds->feeds,
121
+ 'instance' => $this->instance,
122
+ 'accounts' => $accounts,
123
+ 'sliders' => $this->getTemplates(),
124
+ 'options_linkto' => $this->getLinkto(),
125
+ ];
126
+
127
+ echo WIS_Page::instance()->render( WYT_COMPONENT_VIEWS_DIR . '/form-feed', $args );
128
+ }
129
+
130
+ /**
131
+ * Selected array function echoes selected if in array
132
+ *
133
+ * @param array $haystack The array to search in
134
+ * @param string $current The string value to search in array;
135
+ *
136
+ */
137
+ public function selected( $haystack, $current ) {
138
+ if ( is_array( $haystack ) && in_array( $current, $haystack ) ) {
139
+ selected( 1, 1, true );
140
+ }
141
+ }
142
+
143
+ /**
144
+ * Display feed
145
+ *
146
+ * @param bool $return Return result or echo
147
+ *
148
+ * @return string|bool
149
+ */
150
+ public function display( $return = false ) {
151
+ $data = $this->display_videos();
152
+
153
+ if ( $return ) {
154
+ return $data;
155
+ } else {
156
+ echo $data;
157
+ }
158
+
159
+ return true;
160
+ }
161
+
162
+ /**
163
+ * Stores the fetched data from facebook
164
+ *
165
+ * @return array|string of localy saved facebook data
166
+ * @throws \Exception
167
+ */
168
+ public function feed_query( $search ) {
169
+ $this->api = new YoutubeApi();
170
+
171
+ $cache_hours = $search['refresh_hour'];
172
+ $images_number = $search['images_number'];
173
+ $search_type = 'channel';
174
+ $search_name = $search['account']->snippet->title;
175
+
176
+ $blocked_users = isset( $search['blocked_users'] ) ? $search['blocked_users'] : '';
177
+ $blocked_words = isset( $search['blocked_words'] ) ? $search['blocked_words'] : '';
178
+
179
+ if ( ! isset( $search ) || empty( $search ) ) {
180
+ return __( 'Nothing to search for', 'instagram-slider-widget' );
181
+ }
182
+
183
+
184
+ $opt_name = "wyoutube_{$search_type}-{$search_name}";
185
+ $resultData = get_transient( $opt_name );
186
+ $old_opts = get_option( $opt_name, [] );
187
+ $new_opts = [
188
+ 'search' => $search_name,
189
+ 'blocked_users' => $blocked_users,
190
+ 'blocked_words' => $blocked_words,
191
+ 'cache_hours' => $cache_hours,
192
+ 'images_number' => $images_number,
193
+ ];
194
+
195
+ if ( $this->trigger_refresh_data( $resultData, $old_opts, $new_opts ) || ( defined( 'WYT_ENABLE_CACHING' ) && ! WYT_ENABLE_CACHING ) ) {
196
+ $resultData = [];
197
+ $old_opts['search'] = $search_name;
198
+ $old_opts['blocked_users'] = $blocked_users;
199
+ $old_opts['blocked_words'] = $blocked_words;
200
+ $old_opts['cache_hours'] = $cache_hours;
201
+ $old_opts['images_number'] = $images_number;
202
+
203
+ $images_number = ! WIS_Plugin::app()->is_premium() && $images_number > 20 ? 20 : $images_number;
204
+
205
+ $response = $this->api->getVideos( $search['search'], $images_number, $search['request_by'] );
206
+ //$response = new \YoutubeFeed\Api\Video\YoutubeVideosResponse('{"kind":"youtube#searchListResponse","etag":"hXs_uL18ouAw3nGoc9-If1nP4fA","nextPageToken":"CAUQAA","regionCode":"RU","pageInfo":{"totalResults":102,"resultsPerPage":5},"items":[{"kind":"youtube#searchResult","etag":"TOnHNzr7OAV_KWMqm_GSriLU5NI","id":{"kind":"youtube#video","videoId":"S93c2zix5L4"},"snippet":{"publishedAt":"2019-08-28T08:54:23Z","channelId":"UCDLBW2M4KsUF7A7aHT8mxHw","title":"\u00ab\u0416\u0438\u0432\u043e\u0435\u00bb. \u041e\u0431\u0437\u043e\u0440 \u00ab\u041a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u0426\u0438\u043d\u0438\u043a\u0430\u00bb","description":"https:\/\/www.patreon.com\/user?u=5206451 \u2014 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043d\u0430 \u041f\u0430\u0442\u0440\u0435\u043e\u043d\u0435 http:\/\/redcynic.com https:\/\/vk.com\/public_redcynic - \u0433\u0440\u0443\u043f\u043f\u0430 \u00ab\u0412 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0435\u00bb \u041d\u0435\u0442 \u043f\u0440\u0435\u0434\u0435\u043b\u0430 ...","thumbnails":{"default":{"url":"https:\/\/i.ytimg.com\/vi\/S93c2zix5L4\/default.jpg","width":120,"height":90},"medium":{"url":"https:\/\/i.ytimg.com\/vi\/S93c2zix5L4\/mqdefault.jpg","width":320,"height":180},"high":{"url":"https:\/\/i.ytimg.com\/vi\/S93c2zix5L4\/hqdefault.jpg","width":480,"height":360}},"channelTitle":"Red Cynic","liveBroadcastContent":"none","publishTime":"2019-08-28T08:54:23Z"}},{"kind":"youtube#searchResult","etag":"jvhpQC20dPda3rXtdKVDY0cB8co","id":{"kind":"youtube#video","videoId":"dW5O5sBUdpE"},"snippet":{"publishedAt":"2017-02-18T12:02:29Z","channelId":"UCDLBW2M4KsUF7A7aHT8mxHw","title":"\u00ab\u0427\u0443\u0436\u043e\u0439 \u043f\u0440\u043e\u0442\u0438\u0432 \u0425\u0438\u0449\u043d\u0438\u043a\u0430\u00bb. \u041e\u0431\u0437\u043e\u0440 \u00ab\u041a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u0426\u0438\u043d\u0438\u043a\u0430\u00bb","description":"https:\/\/www.patreon.com\/user?u=5206451 \u2014 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043d\u0430 \u041f\u0430\u0442\u0440\u0435\u043e\u043d\u0435 http:\/\/redcynic.com https:\/\/vk.com\/public_redcynic - \u0433\u0440\u0443\u043f\u043f\u0430 \u00ab\u0412 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0435\u00bb \u0421\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u044f ...","thumbnails":{"default":{"url":"https:\/\/i.ytimg.com\/vi\/dW5O5sBUdpE\/default.jpg","width":120,"height":90},"medium":{"url":"https:\/\/i.ytimg.com\/vi\/dW5O5sBUdpE\/mqdefault.jpg","width":320,"height":180},"high":{"url":"https:\/\/i.ytimg.com\/vi\/dW5O5sBUdpE\/hqdefault.jpg","width":480,"height":360}},"channelTitle":"Red Cynic","liveBroadcastContent":"none","publishTime":"2017-02-18T12:02:29Z"}}]}');
207
+
208
+ $videos_ids = [];
209
+ foreach ( $response->items as $video ) {
210
+ $videos_ids[] = $video->id->videoId;
211
+ }
212
+
213
+ $videosData = $this->api->getVideosData( $videos_ids );
214
+ //$videosData = new \YoutubeFeed\Api\Video\YoutubeVideosResponse('{"kind": "youtube#videoListResponse","etag": "lzaBG4KxOEt-ECGeWDUuOR2MXfo","items": [{"kind": "youtube#video","etag": "c9XEcFkuSZuBLtF1d5or492heB8","id": "S93c2zix5L4","snippet": {"publishedAt": "2019-08-28T08:54:23Z","channelId": "UCDLBW2M4KsUF7A7aHT8mxHw","title": "«Живое». Обзор «Красного Циника»","description": "https://www.patreon.com/user?u=5206451 — страница на Патреоне\nhttp://redcynic.com \nhttps://vk.com/public_redcynic - группа «В контакте»\n\nНет предела человеческому уму и... глупости. Уже не первый раз мы сталкиваемся с сюжетом о неведомой космической чуде-юде, встречающейся с толпой людей в экстремальной ситуации. Причём, как правило, люди эти все как один опупенные специалисты. Фильм «Живое» тоже посвящён такому. И если уж исследовать подобные истории, то с целью найти идеальный вариант. Ума или глупости... \n\n*****\n\nПатреон: \nhttps://www.patreon.com/bePatron?u=5206451\n\nhttp://www.donationalerts.ru/r/redcynic\n\nКошельки:\n\nWebMoney: \nR223381292090; \nZ222361875129. \n\nYandex.Money: \n410011854513048.","thumbnails": {"default": {"url": "https://i.ytimg.com/vi/S93c2zix5L4/default.jpg","width": 120,"height": 90},"medium": {"url": "https://i.ytimg.com/vi/S93c2zix5L4/mqdefault.jpg","width": 320,"height": 180},"high": {"url": "https://i.ytimg.com/vi/S93c2zix5L4/hqdefault.jpg","width": 480,"height": 360},"standard": {"url": "https://i.ytimg.com/vi/S93c2zix5L4/sddefault.jpg","width": 640,"height": 480}},"channelTitle": "Red Cynic","tags": ["Живое","Джейк Джилленхол","Ребекка Фергюсон","Райан Рейнольдс","Видеорецензия","Рецензия","Обзор","Подкаст","Красный Циник","Циник","Life","Jake Gyllenhaal","Rebecca Ferguson","Ryan Reynolds","Red Cynic","Videoreview","Review","Redcynic","Video Review","Podcast"],"categoryId": "1","liveBroadcastContent": "none","localized": {"title": "«Живое». Обзор «Красного Циника»","description": "https://www.patreon.com/user?u=5206451 — страница на Патреоне\nhttp://redcynic.com \nhttps://vk.com/public_redcynic - группа «В контакте»\n\nНет предела человеческому уму и... глупости. Уже не первый раз мы сталкиваемся с сюжетом о неведомой космической чуде-юде, встречающейся с толпой людей в экстремальной ситуации. Причём, как правило, люди эти все как один опупенные специалисты. Фильм «Живое» тоже посвящён такому. И если уж исследовать подобные истории, то с целью найти идеальный вариант. Ума или глупости... \n\n*****\n\nПатреон: \nhttps://www.patreon.com/bePatron?u=5206451\n\nhttp://www.donationalerts.ru/r/redcynic\n\nКошельки:\n\nWebMoney: \nR223381292090; \nZ222361875129. \n\nYandex.Money: \n410011854513048."}},"statistics": {"viewCount": "286389","likeCount": "25552","dislikeCount": "438","favoriteCount": "0","commentCount": "1302"}},{"kind": "youtube#video","etag": "Pos6oFmOSFs6i4nmag9vcT7k-xo","id": "dW5O5sBUdpE","snippet": {"publishedAt": "2017-02-18T12:02:29Z","channelId": "UCDLBW2M4KsUF7A7aHT8mxHw","title": "«Чужой против Хищника». Обзор «Красного Циника»","description": "https://www.patreon.com/user?u=5206451 — страница на Патреоне\nhttp://redcynic.com \nhttps://vk.com/public_redcynic - группа «В контакте»\n\nСкрашивая ваше ожидание большого обзора, мы рассмотрим начало противоречивого подфранчайза, фильм \"Чужой против Хищника\".\n\n*****\n\nЕсли хотите финансово помочь каналу, то мы будем очень благодарны. \n\nКошельки:\n\nWebMoney: \nR223381292090; \nZ222361875129. \n\nYandex.Money: \n410011854513048.","thumbnails": {"default": {"url": "https://i.ytimg.com/vi/dW5O5sBUdpE/default.jpg","width": 120,"height": 90},"medium": {"url": "https://i.ytimg.com/vi/dW5O5sBUdpE/mqdefault.jpg","width": 320,"height": 180},"high": {"url": "https://i.ytimg.com/vi/dW5O5sBUdpE/hqdefault.jpg","width": 480,"height": 360},"standard": {"url": "https://i.ytimg.com/vi/dW5O5sBUdpE/sddefault.jpg","width": 640,"height": 480}},"channelTitle": "Red Cynic","tags": ["Хищник","Хищники","Чужой","Чужие","Пол Андерсон","Видеорецензия","Рецензия","Обзор","Подкаст","Красный Циник","Циник","Predator","Predators","Alien","Aliens","Paul W. S. Anderson","Red Cynic","Videoreview","Review","Redcynic","Video Review","Podcast"],"categoryId": "1","liveBroadcastContent": "none","defaultLanguage": "ru","localized": {"title": "«Чужой против Хищника». Обзор «Красного Циника»","description": "https://www.patreon.com/user?u=5206451 — страница на Патреоне\nhttp://redcynic.com \nhttps://vk.com/public_redcynic - группа «В контакте»\n\nСкрашивая ваше ожидание большого обзора, мы рассмотрим начало противоречивого подфранчайза, фильм \"Чужой против Хищника\".\n\n*****\n\nЕсли хотите финансово помочь каналу, то мы будем очень благодарны. \n\nКошельки:\n\nWebMoney: \nR223381292090; \nZ222361875129. \n\nYandex.Money: \n410011854513048."},"defaultAudioLanguage": "ru-Latn"},"statistics": {"viewCount": "300141","likeCount": "20796","dislikeCount": "435","favoriteCount": "0","commentCount": "890"}}],"pageInfo": {"totalResults": 5,"resultsPerPage": 5}}');
215
+
216
+ foreach ( $response->items as $key => $video ) {
217
+ $video->snippet = $videosData->items[ $key ]->snippet;
218
+ $video->statistics = $videosData->items[ $key ]->statistics;
219
+ $video->comments = $this->api->getCommentsByVideoId( $video->id->videoId );
220
+ }
221
+
222
+ $this->filter_response_by_words( $response, $blocked_words );
223
+
224
+ if ( $response ) {
225
+ if ( ! is_array( $response->items ) || ! count( $response->items ) ) {
226
+ return [ 'error' => __( 'There are no publications in this account yet', 'instagram-slider-widget' ) ];
227
+ }
228
+ $results = $response;
229
+ } else {
230
+ if ( $resultData ) {
231
+ $results = $resultData;
232
+ }
233
+ }
234
+
235
+ if ( empty( $results ) ) {
236
+ return [ 'error' => __( 'No images found', 'instagram-slider-widget' ) ];
237
+ }
238
+
239
+ foreach ( $results->items as $item ) {
240
+ $resultData[] = $item;
241
+ } // end -> foreach
242
+
243
+ update_option( $opt_name, $old_opts );
244
+
245
+ if ( is_array( $resultData ) && ! empty( $resultData ) ) {
246
+ set_transient( $opt_name, $resultData, $cache_hours * 60 * 60 );
247
+ }
248
+
249
+ }
250
+
251
+ return $resultData;
252
+ }
253
+
254
+ /**
255
+ * Runs the query for images and returns the html
256
+ *
257
+ * @return string
258
+ */
259
+ public function display_videos() {
260
+ $this->public_enqueue();
261
+ $output = "";
262
+
263
+ $args = $this->getAdaptiveInstance();
264
+
265
+ if ( ! empty( $args['description'] ) && ! is_array( $args['description'] ) ) {
266
+ $args['description'] = explode( ',', $args['description'] );
267
+ }
268
+
269
+ if ( $args['search'] ) {
270
+ $account_data = $this->get_youtube_feeds( $args['search'] );
271
+ /**
272
+ * @var $account_data \YoutubeFeed\Api\Channel\YoutubeChannelItem
273
+ */
274
+ $account_data = $account_data[ $args['search'] ];
275
+ $args['account'] = $account_data;
276
+ $template_args = $args;
277
+
278
+ $images_data = $this->feed_query( $args );
279
+
280
+ if ( is_array( $images_data ) && ! empty( $images_data ) ) {
281
+ if ( isset( $images_data['error'] ) ) {
282
+ return $images_data['error'];
283
+ }
284
+
285
+ if ( $args['orderby'] != 'rand' ) {
286
+ $args['orderby'] = explode( '-', $args['orderby'] );
287
+ if ( 'date' == $args['orderby'][0] ) {
288
+ $func = 'sort_timestamp_' . $args['orderby'][1];
289
+ } else {
290
+ $func = 'sort_popularity_' . $args['orderby'][1];
291
+ }
292
+ usort( $images_data, [ $this, $func ] );
293
+ } else {
294
+ shuffle( $images_data );
295
+ }
296
+
297
+ /* @var $images_data \YoutubeFeed\Api\Video\YoutubeVideo[] */
298
+ foreach ( $images_data as $image_data ) {
299
+ $template_args['posts'][] = $image_data;
300
+ }
301
+
302
+ if ( $args['show_feed_header'] ) {
303
+ $output .= $this->render_template( 'feed_header_template', [
304
+ 'account' => $account_data,
305
+ ] );
306
+ }
307
+
308
+ if ( 'ypopup' == $args['yimages_link'] && WIS_Plugin::app()->is_premium() ) {
309
+ $output .= apply_filters( 'wyt/pro/display', $args, $images_data );
310
+ }
311
+
312
+ $output .= $this->render_template( $args['template'], $template_args );
313
+
314
+ return $output;
315
+ } else {
316
+ return __( 'No videos found', 'youtube-feed' );
317
+ }
318
+ }
319
+
320
+ return "&nbsp;";
321
+ }
322
+
323
+ private function getAccounts() {
324
+ $accounts = WIS_Plugin::app()->getPopulateOption( WYT_ACCOUNT_OPTION_NAME, [] );
325
+ if ( ! is_array( $accounts ) ) {
326
+ $accounts = [];
327
+ }
328
+
329
+ return $accounts;
330
+ }
331
+
332
+ /**
333
+ * Enqueue public-facing Scripts and style sheet.
334
+ */
335
+ public function public_enqueue() {
336
+ wp_enqueue_style( WIS_Plugin::app()->getPrefix() . 'wyt-font-awesome' );
337
+ wp_enqueue_style( WIS_Plugin::app()->getPrefix() . 'wyt-instag-slider' );
338
+ wp_enqueue_style( WIS_Plugin::app()->getPrefix() . 'wyt-header' );
339
+ }
340
+
341
+ /**
342
+ * Get feeds or feed from database
343
+ *
344
+ * @param $id
345
+ *
346
+ * @return array
347
+ */
348
+ public function get_youtube_feeds( $id = 0 ) {
349
+ if ( $id ) {
350
+ $feeds = WIS_Plugin::app()->getOption( WYT_ACCOUNT_OPTION_NAME, [] );
351
+ if ( is_array( $feeds ) && ! empty( $feeds ) ) {
352
+ foreach ( $feeds as $feed ) {
353
+ if ( isset( $feed->channelId ) && $feed->channelId == $id ) {
354
+ return $feed;
355
+ }
356
+ }
357
+ }
358
+ }
359
+
360
+ return WIS_Plugin::app()->getOption( WYT_ACCOUNT_OPTION_NAME, [] );
361
+ }
362
+
363
+ /**
364
+ * @param $response \YoutubeFeed\Api\Video\YoutubeVideosResponse
365
+ * @param $blocked_words string
366
+ */
367
+ private function filter_response_by_words( &$response, $blocked_words = '' ) {
368
+ if ( empty( $blocked_words ) ) {
369
+ return;
370
+ } else {
371
+ $blocked_words = explode( ',', $blocked_words );
372
+ }
373
+ foreach ( $response->items as $key => $video ) {
374
+ foreach ( $blocked_words as $blocked_word ) {
375
+ $title = $video->snippet->title;
376
+ if ( stripos( $title, $blocked_word ) ) {
377
+ unset( $response->items[ $key ] );
378
+ }
379
+ }
380
+ }
381
+ }
382
+
383
+ /**
384
+ * Sort Function for timestamp Ascending
385
+ */
386
+ public function sort_timestamp_ASC( $a, $b ) {
387
+ return $a->snippet->publishedAt > $b->snippet->publishedAt;
388
+ }
389
+
390
+ /**
391
+ * Sort Function for timestamp Descending
392
+ */
393
+ public function sort_timestamp_DESC( $a, $b ) {
394
+ return $a->snippet->publishedAt < $b->snippet->publishedAt;
395
+ }
396
+
397
+ /**
398
+ * Sort Function for popularity Ascending
399
+ */
400
+ public function sort_popularity_ASC( $a, $b ) {
401
+ return $a->statistics->viewCount > $b->statistics->viewCount;
402
+ }
403
+
404
+ /**
405
+ * Sort Function for popularity Descending
406
+ */
407
+ public function sort_popularity_DESC( $a, $b ) {
408
+ return $a->statistics->viewCount < $b->statistics->viewCount;
409
+ }
410
+
411
+ }
components/youtube/includes/class-youtube-profiles.php ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+
6
+ class WIS_Youtube_Profiles extends WIS_Profiles {
7
+ /**
8
+ * @var string
9
+ */
10
+ public $social = 'youtube';
11
+
12
+ /**
13
+ * @var string
14
+ */
15
+ public $profiles_option_name = WYT_ACCOUNT_OPTION_NAME;
16
+
17
+ /**
18
+ * @var \YoutubeFeed\Api\YoutubeApi
19
+ */
20
+ public $youtube_api;
21
+
22
+ /**
23
+ * WIS_Facebook_Profiles constructor.
24
+ *
25
+ * @param $page WIS_ProfilesPage
26
+ */
27
+ public function __construct( $page = null ) {
28
+ if ( $page ) {
29
+ parent::__construct( $page );
30
+ }
31
+
32
+ $this->youtube_api = new \YoutubeFeed\Api\YoutubeApi();
33
+
34
+ //AJAX
35
+ add_action( 'wp_ajax_wyt_add_account_by_token', [ $this, 'add_account_by_token' ] );
36
+ }
37
+
38
+ public function update_youtube_api_key( $api_key ) {
39
+ if ( $api_key ) {
40
+ $this->youtube_api->setApiKey( $api_key );
41
+
42
+ return WIS_Plugin::app()->updateOption( WYT_API_KEY_OPTION_NAME, $api_key );
43
+ }
44
+
45
+ return false;
46
+ }
47
+
48
+ public function update_youtube_feed( $profile ) {
49
+ if ( $profile ) {
50
+ $pro = WIS_Plugin::app()->getOption( WYT_ACCOUNT_OPTION_NAME, [] );
51
+ if ( ! is_array( $pro ) ) {
52
+ $pro = [];
53
+ }
54
+ $pro[ $profile->snippet->channelId ] = $profile;
55
+
56
+ return WIS_Plugin::app()->updateOption( WYT_ACCOUNT_OPTION_NAME, $pro );
57
+ }
58
+
59
+ return false;
60
+ }
61
+
62
+ /**
63
+ * Логика на вкладке youtube
64
+ *
65
+ * @return string
66
+ */
67
+ public function content() {
68
+ if ( isset( $_POST['wyt_api_key'] ) && $_POST['wyt_api_key'] != null ) {
69
+ $this->update_youtube_api_key( $_POST['wyt_api_key'] );
70
+ }
71
+
72
+ if ( isset( $_POST['wyt_feed_link'] ) && $_POST['wyt_feed_link'] != null ) {
73
+
74
+ $link = $_POST['wyt_feed_link'];
75
+ $start_with_string = 'youtube.com/channel/';
76
+
77
+ if ( stripos( $link, $start_with_string ) === false ) {
78
+ return false;
79
+ }
80
+
81
+ $id = explode( '/channel/', $link )[1];
82
+ $id = explode( '/', $id )[0];
83
+
84
+ $profile = $this->youtube_api->getUserById( $id )->items[0];
85
+ $profile->snippet->channelId = $id;
86
+ $this->update_youtube_feed( $profile );
87
+ }
88
+
89
+ $accounts = WIS_Plugin::app()->getPopulateOption( WYT_ACCOUNT_OPTION_NAME, [] );
90
+ $data = [
91
+ 'is_premium' => WIS_Plugin::app()->is_premium(),
92
+ 'accounts' => $accounts,
93
+ 'social' => $this->social,
94
+ ];
95
+ $result = $this->page->render( WYT_COMPONENT_VIEWS_DIR . '/accounts', $data );
96
+
97
+ return $result;
98
+ }
99
+
100
+ /**
101
+ * Get count of accounts
102
+ *
103
+ * @return int
104
+ */
105
+ public function count_accounts() {
106
+ $account = WIS_Plugin::app()->getOption( WYT_ACCOUNT_OPTION_NAME, [] );
107
+
108
+ return count( $account );
109
+ }
110
+
111
+ public function delete_account( $name ) {
112
+ $accounts = WIS_Plugin::app()->getOption( $this->profiles_option_name, [] );
113
+ if ( isset( $accounts[ $name ] ) ) {
114
+ unset( $accounts[ $name ] );
115
+ }
116
+ WIS_Plugin::app()->updateOption( $this->profiles_option_name, $accounts );
117
+ }
118
+
119
+
120
+ }
components/youtube/includes/class-youtube-widget.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- use Instagram\Includes\WIS_Plugin;
4
  use YoutubeFeed\Api\YoutubeApi;
5
 
6
  /**
@@ -8,6 +8,13 @@ use YoutubeFeed\Api\YoutubeApi;
8
  */
9
  class WYT_Widget extends WP_Widget {
10
 
 
 
 
 
 
 
 
11
  private static $app;
12
 
13
  /**
@@ -32,9 +39,9 @@ class WYT_Widget extends WP_Widget {
32
  public $defaults;
33
 
34
  /**
35
- * @var YoutubeApi
36
  */
37
- public $api;
38
 
39
  public static function app() {
40
  return self::$app;
@@ -48,61 +55,24 @@ class WYT_Widget extends WP_Widget {
48
  self::$app = $this;
49
 
50
  // Widget ID and Class Setup
51
- parent::__construct( 'wyoutube_feed', __( 'Social Slider - Youtube', 'youtube-feed' ), array(
52
  'classname' => 'wyoutube-feed',
53
- 'description' => __( 'A widget that displays a Youtube videos ', 'youtube-feed' )
54
- ) );
55
-
56
- $this->plugin = WIS_Plugin::app();
57
- $this->sliders = array(
58
- "default" => 'Default'
59
- );
60
- $this->options_linkto = array(
61
- "none" => 'None',
62
- "yt_link" => 'Youtube link',
63
- );
64
-
65
- $this->defaults = array(
66
- 'title' => __( 'Youtube Feed', 'yft' ),
67
- 'search' => '',
68
- 'blocked_users' => '',
69
- 'blocked_words' => '',
70
- 'template' => 'slider',
71
- 'yimages_link' => 'post_page',
72
- 'custom_url' => '',
73
- 'request_by' => YoutubeApi::orderByRelevance,
74
- 'orderby' => 'rand',
75
- 'images_number' => 20,
76
- 'columns' => 2,
77
- 'refresh_hour' => 5,
78
- );
79
-
80
- $this->api = new YoutubeApi();
81
-
82
- /**
83
- * Фильтр для добавления слайдеров
84
- */
85
- $this->sliders = apply_filters( 'wyt/sliders', $this->sliders );
86
-
87
- /**
88
- * Фильтр для добавления popup
89
- */
90
- $this->options_linkto = apply_filters( 'wyt/options/link_to', $this->options_linkto );
91
 
 
 
 
 
 
 
 
92
 
93
  // Enqueue Plugin Styles and scripts
94
- add_action( 'wp_enqueue_scripts', array( $this, 'public_register' ) );
95
- // Enqueue Plugin Styles and scripts for admin pages
96
- add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue' ) );
97
 
98
- // Shortcode
99
- add_shortcode( 'cm_youtube_feed', array( $this, 'shortcode' ) );
100
  // Action to display posts
101
- add_action( 'wyoutube_feed', array( $this, 'display_posts' ) );
102
-
103
- //AJAX
104
- add_action( 'wp_ajax_wyt_add_account_by_token', array( $this, 'add_account_by_token' ) );
105
-
106
  }
107
 
108
  /**
@@ -110,48 +80,19 @@ class WYT_Widget extends WP_Widget {
110
  */
111
  public static function register_widget() {
112
  register_widget( __CLASS__ );
113
- register_sidebar( array(
114
- 'name' => __( 'Youtube Feed - Shortcode Generator', 'yft' ),
115
- 'id' => 'wyoutube-shortcodes',
116
- 'description' => __( "1. Drag Youtube Feed Widget here. 2. Fill in the fields and hit save. 3. Copy the shortocde generated at the bottom of the widget form and use it on posts or pages.", 'yft' )
117
- ) );
118
  }
119
 
120
- /**
121
- * Enqueue public-facing Scripts and style sheet.
122
- */
123
- public function public_enqueue() {
124
- wp_enqueue_style( WIS_Plugin::app()->getPrefix() . 'wyt-font-awesome');
125
- wp_enqueue_style( WIS_Plugin::app()->getPrefix() . 'wyt-instag-slider');
126
- wp_enqueue_style( WIS_Plugin::app()->getPrefix() . 'wyt-header');
127
- }
128
 
129
  public function public_register() {
130
  wp_register_style( WIS_Plugin::app()->getPrefix() . 'wyt-font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );
131
- wp_register_style( WIS_Plugin::app()->getPrefix() . 'wyt-instag-slider', WYT_PLUGIN_URL . '/assets/css/templates.css', array(), WIS_Plugin::app()->getPluginVersion() );
132
- wp_register_style( WIS_Plugin::app()->getPrefix() . 'wyt-header', WYT_PLUGIN_URL . '/assets/css/wyt-header.css', array(), WIS_Plugin::app()->getPluginVersion() );
133
 
134
- $ajax = json_encode([
135
  'url' => admin_url( 'admin-ajax.php' ),
136
  'nonce' => wp_create_nonce( "addAccountByToken" ),
137
- ]);
138
- wp_add_inline_script( WIS_Plugin::app()->getPrefix() . 'wyoutube', "var ajax = $ajax;");
139
- }
140
-
141
- /**
142
- * Enqueue admin side scripts and styles
143
- *
144
- * @param string $hook
145
- */
146
- public function admin_enqueue( $hook ) {
147
-
148
-
149
- if ( 'widgets.php' != $hook && 'post.php' != $hook ) {
150
- return;
151
- }
152
- wp_enqueue_style( 'wyoutube-admin-styles', WYT_PLUGIN_URL . '/admin/assets/css/wyoutube-admin.css', array(), WIS_Plugin::app()->getPluginVersion() );
153
- wp_enqueue_script( 'wyoutube-admin-script', WYT_PLUGIN_URL . '/admin/assets/js/wyoutube-admin.js', array( 'jquery' ), WIS_Plugin::app()->getPluginVersion(), true );
154
-
155
  }
156
 
157
  /**
@@ -160,7 +101,7 @@ class WYT_Widget extends WP_Widget {
160
  */
161
  public function widget( $args, $instance ) {
162
 
163
- //Our variables from the widget settings.
164
  $title = apply_filters( 'widget_title', $instance['title'] );
165
 
166
  echo $args['before_widget'];
@@ -180,25 +121,18 @@ class WYT_Widget extends WP_Widget {
180
  *
181
  */
182
  public function form( $instance ) {
 
183
 
184
- /* @var $accounts \YoutubeFeed\Api\Channel\YoutubeChannelItem[] */
185
- $accounts = WIS_Plugin::app()->getPopulateOption( WYT_ACCOUNT_OPTION_NAME, array() );
 
 
 
186
 
187
- if ( ! is_array( $accounts ) ) {
188
- $accounts = array();
189
- }
190
- $sliders = $this->sliders;
191
- $options_linkto = $this->options_linkto;
192
 
193
- $instance = wp_parse_args( (array) $instance, $this->defaults );
194
-
195
- echo $this->render_layout_template('widget_settings', [
196
- 'this' => $this,
197
- 'accounts' => $accounts,
198
- 'sliders' => $sliders,
199
- 'options_linkto' => $options_linkto,
200
- 'instance' => $instance
201
- ]);
202
  }
203
 
204
  /**
@@ -210,83 +144,22 @@ class WYT_Widget extends WP_Widget {
210
  * @return array
211
  */
212
  public function update( $new_instance, $instance ) {
213
- foreach ( $new_instance as $key => $item ) {
214
- $new_instance[ $key ] = isset( $new_instance[ $key ] ) ? $new_instance[ $key ] : $this->defaults[ $key ];
215
- if ( $key == 'title' ) {
216
- $new_instance[ $key ] = strip_tags( $new_instance[ $key ] );
217
- }
218
- $new_instance['widget_id'] = preg_replace( '/[^0-9]/', '', $this->id );
219
- }
220
-
221
- return $new_instance;
222
- }
223
 
224
- /**
225
- * Update the widget settings
226
- *
227
- * @param array $instance instance values
228
- *
229
- * @return array
230
- */
231
- public function defaults( $instance ) {
232
- $new_instance = [];
233
- foreach ( $instance as $key => $item ) {
234
  switch ( $key ) {
235
- case 'search':
236
- case 'blocked_users':
237
- case 'blocked_words':
238
- $new_instance[ $key ] = ! empty( $instance[ $key ] ) ? $instance[ $key ] : $this->defaults[ $key ];
239
- break;
240
- case 'images_number':
241
- case 'columns':
242
- case 'refresh_hour':
243
- $new_instance[ $key ] = absint( $instance[ $key ] );
244
  break;
245
- default:
246
- $new_instance[ $key ] = $instance[ $key ];
247
  break;
248
  }
249
  }
250
 
251
- $new_instance = wp_parse_args( (array) $new_instance, $this->defaults );
252
-
253
  return $new_instance;
254
  }
255
 
256
- /**
257
- * Selected array function echoes selected if in array
258
- *
259
- * @param array $haystack The array to search in
260
- * @param string $current The string value to search in array;
261
- *
262
- */
263
- public function selected( $haystack, $current ) {
264
-
265
- if ( is_array( $haystack ) && in_array( $current, $haystack ) ) {
266
- selected( 1, 1, true );
267
- }
268
- }
269
-
270
-
271
- /**
272
- * Add shortcode function
273
- *
274
- * @param array $atts shortcode attributes
275
- *
276
- * @return mixed
277
- */
278
- public function shortcode( $atts ) {
279
- $atts = shortcode_atts( array( 'id' => '' ), $atts, 'cm_youtube_feed' );
280
- $args = get_option( 'widget_wyoutube_feed' );
281
- if ( isset( $args[ $atts['id'] ] ) ) {
282
- $args[ $atts['id'] ]['widget_id'] = $atts['id'];
283
-
284
- return $this->display( $args[ $atts['id'] ] );
285
- }
286
-
287
- return "";
288
- }
289
-
290
  /**
291
  * Echoes the Display Instagram Images method
292
  *
@@ -295,7 +168,7 @@ class WYT_Widget extends WP_Widget {
295
  * @return void
296
  */
297
  public function display_posts( $args ) {
298
- echo $this->display( $args );
299
  }
300
 
301
  /**
@@ -305,76 +178,12 @@ class WYT_Widget extends WP_Widget {
305
  *
306
  * @return string
307
  */
308
- private function display( $args ) {
309
-
310
- $this->public_enqueue();
 
311
 
312
- $args = $this->defaults( $args );
313
-
314
- if ( ! empty( $args['description'] ) && ! is_array( $args['description'] ) ) {
315
- $args['description'] = explode( ',', $args['description'] );
316
- }
317
-
318
- if ( $args['refresh_hour'] == 0 ) {
319
- $args['refresh_hour'] = 5;
320
- }
321
-
322
- if ( $args['search'] ) {
323
- $account_data = WIS_Plugin::app()->get_youtube_feeds( $args['search'] );
324
- /**
325
- * @var $account_data \YoutubeFeed\Api\Channel\YoutubeChannelItem
326
- */
327
- $account_data = $account_data[$args['search']];
328
- $args['account'] = $account_data;
329
- $template_args = $args;
330
-
331
- $images_data = $this->get_data( $args );
332
-
333
- if ( is_array( $images_data ) && ! empty( $images_data ) ) {
334
- if ( isset( $images_data['error'] ) ) {
335
- return $images_data['error'];
336
- }
337
-
338
- if ( $args['orderby'] != 'rand' ) {
339
- $args['orderby'] = explode( '-', $args['orderby'] );
340
- if ( $args['orderby'][0] == 'date' ) {
341
- $func = 'sort_timestamp_' . $args['orderby'][1];
342
- } else {
343
- $func = 'sort_popularity_' . $args['orderby'][1];
344
- }
345
- usort( $images_data, array( $this, $func ) );
346
- } else {
347
- shuffle( $images_data );
348
- }
349
-
350
- /* @var $images_data \YoutubeFeed\Api\Video\YoutubeVideo[] */
351
- foreach ( $images_data as $image_data )
352
- $template_args['posts'][] = $image_data;
353
-
354
-
355
- $return = "";
356
-
357
- if ( $args['show_feed_header'] ) {
358
- $return .= $this->render_layout_template( 'feed_header_template', [
359
- 'account' => $account_data
360
- ]);
361
- }
362
-
363
- if($args['yimages_link'] == 'ypopup' && $this->plugin->is_premium()){
364
- $return .= apply_filters( 'wyt/pro/display', $args, $images_data );
365
- }
366
-
367
- $return .= $this->render_layout_template( $args['template'], $template_args );
368
-
369
- return $return;
370
- } else {
371
- return __( 'No videos found', 'youtube-feed' );
372
- }
373
- }
374
-
375
-
376
-
377
- return "&nbsp;";
378
  }
379
 
380
  /**
@@ -386,211 +195,23 @@ class WYT_Widget extends WP_Widget {
386
  *
387
  * @return false|string
388
  */
389
- private function render_layout_template( $template_name, $args ) {
390
- $path = WYT_PLUGIN_DIR . "/html_templates/$template_name.php";
391
- if ( file_exists( $path ) ) {
 
 
 
 
 
392
  ob_start();
393
  include $path;
 
394
 
395
  return ob_get_clean();
396
  } else {
397
  return 'This template does not exist!';
398
  }
399
  }
 
400
 
401
-
402
-
403
- /**
404
- * @param $response \YoutubeFeed\Api\Video\YoutubeVideosResponse
405
- * @param $blocked_words string
406
- */
407
- private function filter_response_by_words(&$response, $blocked_words = ''){
408
- if(empty($blocked_words))
409
- return;
410
- else
411
- $blocked_words = explode(',', $blocked_words);
412
- foreach ($response->items as $key => $video){
413
- foreach ($blocked_words as $blocked_word){
414
- $title = $video->snippet->title;
415
- if(stripos($title, $blocked_word))
416
- unset($response->items[$key]);
417
- }
418
- }
419
- }
420
-
421
- /**
422
- * Trigger refresh for new data
423
- *
424
- * @param bool $instaData
425
- * @param array $old_args
426
- * @param array $new_args
427
- *
428
- * @return bool
429
- */
430
- private function trigger_refresh_data( $instaData, $old_args, $new_args ) {
431
-
432
- $trigger = 0;
433
-
434
- if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
435
- return false;
436
- }
437
-
438
- if ( false === $instaData ) {
439
- $trigger = 1;
440
- }
441
-
442
-
443
- if ( isset( $old_args['saved_images'] ) ) {
444
- unset( $old_args['saved_images'] );
445
- }
446
-
447
- if ( isset( $old_args['deleted_images'] ) ) {
448
- unset( $old_args['deleted_images'] );
449
- }
450
-
451
- if ( is_array( $old_args ) && is_array( $new_args ) && array_diff( $old_args, $new_args ) !== array_diff( $new_args, $old_args ) ) {
452
- $trigger = 1;
453
- }
454
-
455
- if ( $trigger == 1 ) {
456
- return true;
457
- }
458
-
459
- return false;
460
- }
461
-
462
- /**
463
- * Stores the fetched data from instagram in WordPress DB using transients
464
- *
465
- * @param array $search Array of widget settings
466
- *
467
- * @return array|string data
468
- * @throws \Exception
469
- */
470
- public function get_data( $search ) {
471
- $cache_hours = $search['refresh_hour'];
472
- $images_number = $search['images_number'];
473
- $search_type = 'channel';
474
- $search_name = $search['account']->snippet->title;
475
-
476
- $blocked_users = isset( $search['blocked_users'] ) ? $search['blocked_users'] : '';
477
- $blocked_words = isset( $search['blocked_words'] ) ? $search['blocked_words'] : '';
478
-
479
- if ( ! isset( $search ) || empty( $search ) ) {
480
- return __( 'Nothing to search for', 'yft' );
481
- }
482
-
483
-
484
- $opt_name = "wyoutube_{$search_type}-{$search_name}";
485
- $resultData = get_transient( $opt_name );
486
- $old_opts = get_option( $opt_name, [] );
487
- $new_opts = array(
488
- 'search' => $search_name,
489
- 'blocked_users' => $blocked_users,
490
- 'blocked_words' => $blocked_words,
491
- 'cache_hours' => $cache_hours,
492
- 'images_number' => $images_number,
493
- );
494
-
495
- if ( $this->trigger_refresh_data( $resultData, $old_opts, $new_opts ) || ( defined( 'WYT_ENABLE_CACHING' ) && ! WYT_ENABLE_CACHING ) ) {
496
- //if ( true ) {
497
-
498
- $resultData = array();
499
- $old_opts['search'] = $search_name;
500
- $old_opts['blocked_users'] = $blocked_users;
501
- $old_opts['blocked_words'] = $blocked_words;
502
- $old_opts['cache_hours'] = $cache_hours;
503
- $old_opts['images_number'] = $images_number;
504
-
505
- $images_number = ! $this->plugin->is_premium() && $images_number > 20 ? 20 : $images_number;
506
-
507
- $response = $this->api->getVideos( $search['search'], $images_number, $search['request_by'] );
508
- //$response = new \YoutubeFeed\Api\Video\YoutubeVideosResponse('{"kind":"youtube#searchListResponse","etag":"hXs_uL18ouAw3nGoc9-If1nP4fA","nextPageToken":"CAUQAA","regionCode":"RU","pageInfo":{"totalResults":102,"resultsPerPage":5},"items":[{"kind":"youtube#searchResult","etag":"TOnHNzr7OAV_KWMqm_GSriLU5NI","id":{"kind":"youtube#video","videoId":"S93c2zix5L4"},"snippet":{"publishedAt":"2019-08-28T08:54:23Z","channelId":"UCDLBW2M4KsUF7A7aHT8mxHw","title":"\u00ab\u0416\u0438\u0432\u043e\u0435\u00bb. \u041e\u0431\u0437\u043e\u0440 \u00ab\u041a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u0426\u0438\u043d\u0438\u043a\u0430\u00bb","description":"https:\/\/www.patreon.com\/user?u=5206451 \u2014 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043d\u0430 \u041f\u0430\u0442\u0440\u0435\u043e\u043d\u0435 http:\/\/redcynic.com https:\/\/vk.com\/public_redcynic - \u0433\u0440\u0443\u043f\u043f\u0430 \u00ab\u0412 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0435\u00bb \u041d\u0435\u0442 \u043f\u0440\u0435\u0434\u0435\u043b\u0430 ...","thumbnails":{"default":{"url":"https:\/\/i.ytimg.com\/vi\/S93c2zix5L4\/default.jpg","width":120,"height":90},"medium":{"url":"https:\/\/i.ytimg.com\/vi\/S93c2zix5L4\/mqdefault.jpg","width":320,"height":180},"high":{"url":"https:\/\/i.ytimg.com\/vi\/S93c2zix5L4\/hqdefault.jpg","width":480,"height":360}},"channelTitle":"Red Cynic","liveBroadcastContent":"none","publishTime":"2019-08-28T08:54:23Z"}},{"kind":"youtube#searchResult","etag":"jvhpQC20dPda3rXtdKVDY0cB8co","id":{"kind":"youtube#video","videoId":"dW5O5sBUdpE"},"snippet":{"publishedAt":"2017-02-18T12:02:29Z","channelId":"UCDLBW2M4KsUF7A7aHT8mxHw","title":"\u00ab\u0427\u0443\u0436\u043e\u0439 \u043f\u0440\u043e\u0442\u0438\u0432 \u0425\u0438\u0449\u043d\u0438\u043a\u0430\u00bb. \u041e\u0431\u0437\u043e\u0440 \u00ab\u041a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u0426\u0438\u043d\u0438\u043a\u0430\u00bb","description":"https:\/\/www.patreon.com\/user?u=5206451 \u2014 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043d\u0430 \u041f\u0430\u0442\u0440\u0435\u043e\u043d\u0435 http:\/\/redcynic.com https:\/\/vk.com\/public_redcynic - \u0433\u0440\u0443\u043f\u043f\u0430 \u00ab\u0412 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0435\u00bb \u0421\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u044f ...","thumbnails":{"default":{"url":"https:\/\/i.ytimg.com\/vi\/dW5O5sBUdpE\/default.jpg","width":120,"height":90},"medium":{"url":"https:\/\/i.ytimg.com\/vi\/dW5O5sBUdpE\/mqdefault.jpg","width":320,"height":180},"high":{"url":"https:\/\/i.ytimg.com\/vi\/dW5O5sBUdpE\/hqdefault.jpg","width":480,"height":360}},"channelTitle":"Red Cynic","liveBroadcastContent":"none","publishTime":"2017-02-18T12:02:29Z"}}]}');
509
-
510
- $videos_ids = [];
511
- foreach ($response->items as $video)
512
- $videos_ids[] = $video->id->videoId;
513
-
514
- $videosData = $this->api->getVideosData($videos_ids);
515
- //$videosData = new \YoutubeFeed\Api\Video\YoutubeVideosResponse('{"kind": "youtube#videoListResponse","etag": "lzaBG4KxOEt-ECGeWDUuOR2MXfo","items": [{"kind": "youtube#video","etag": "c9XEcFkuSZuBLtF1d5or492heB8","id": "S93c2zix5L4","snippet": {"publishedAt": "2019-08-28T08:54:23Z","channelId": "UCDLBW2M4KsUF7A7aHT8mxHw","title": "«Живое». Обзор «Красного Циника»","description": "https://www.patreon.com/user?u=5206451 — страница на Патреоне\nhttp://redcynic.com \nhttps://vk.com/public_redcynic - группа «В контакте»\n\nНет предела человеческому уму и... глупости. Уже не первый раз мы сталкиваемся с сюжетом о неведомой космической чуде-юде, встречающейся с толпой людей в экстремальной ситуации. Причём, как правило, люди эти все как один опупенные специалисты. Фильм «Живое» тоже посвящён такому. И если уж исследовать подобные истории, то с целью найти идеальный вариант. Ума или глупости... \n\n*****\n\nПатреон: \nhttps://www.patreon.com/bePatron?u=5206451\n\nhttp://www.donationalerts.ru/r/redcynic\n\nКошельки:\n\nWebMoney: \nR223381292090; \nZ222361875129. \n\nYandex.Money: \n410011854513048.","thumbnails": {"default": {"url": "https://i.ytimg.com/vi/S93c2zix5L4/default.jpg","width": 120,"height": 90},"medium": {"url": "https://i.ytimg.com/vi/S93c2zix5L4/mqdefault.jpg","width": 320,"height": 180},"high": {"url": "https://i.ytimg.com/vi/S93c2zix5L4/hqdefault.jpg","width": 480,"height": 360},"standard": {"url": "https://i.ytimg.com/vi/S93c2zix5L4/sddefault.jpg","width": 640,"height": 480}},"channelTitle": "Red Cynic","tags": ["Живое","Джейк Джилленхол","Ребекка Фергюсон","Райан Рейнольдс","Видеорецензия","Рецензия","Обзор","Подкаст","Красный Циник","Циник","Life","Jake Gyllenhaal","Rebecca Ferguson","Ryan Reynolds","Red Cynic","Videoreview","Review","Redcynic","Video Review","Podcast"],"categoryId": "1","liveBroadcastContent": "none","localized": {"title": "«Живое». Обзор «Красного Циника»","description": "https://www.patreon.com/user?u=5206451 — страница на Патреоне\nhttp://redcynic.com \nhttps://vk.com/public_redcynic - группа «В контакте»\n\nНет предела человеческому уму и... глупости. Уже не первый раз мы сталкиваемся с сюжетом о неведомой космической чуде-юде, встречающейся с толпой людей в экстремальной ситуации. Причём, как правило, люди эти все как один опупенные специалисты. Фильм «Живое» тоже посвящён такому. И если уж исследовать подобные истории, то с целью найти идеальный вариант. Ума или глупости... \n\n*****\n\nПатреон: \nhttps://www.patreon.com/bePatron?u=5206451\n\nhttp://www.donationalerts.ru/r/redcynic\n\nКошельки:\n\nWebMoney: \nR223381292090; \nZ222361875129. \n\nYandex.Money: \n410011854513048."}},"statistics": {"viewCount": "286389","likeCount": "25552","dislikeCount": "438","favoriteCount": "0","commentCount": "1302"}},{"kind": "youtube#video","etag": "Pos6oFmOSFs6i4nmag9vcT7k-xo","id": "dW5O5sBUdpE","snippet": {"publishedAt": "2017-02-18T12:02:29Z","channelId": "UCDLBW2M4KsUF7A7aHT8mxHw","title": "«Чужой против Хищника». Обзор «Красного Циника»","description": "https://www.patreon.com/user?u=5206451 — страница на Патреоне\nhttp://redcynic.com \nhttps://vk.com/public_redcynic - группа «В контакте»\n\nСкрашивая ваше ожидание большого обзора, мы рассмотрим начало противоречивого подфранчайза, фильм \"Чужой против Хищника\".\n\n*****\n\nЕсли хотите финансово помочь каналу, то мы будем очень благодарны. \n\nКошельки:\n\nWebMoney: \nR223381292090; \nZ222361875129. \n\nYandex.Money: \n410011854513048.","thumbnails": {"default": {"url": "https://i.ytimg.com/vi/dW5O5sBUdpE/default.jpg","width": 120,"height": 90},"medium": {"url": "https://i.ytimg.com/vi/dW5O5sBUdpE/mqdefault.jpg","width": 320,"height": 180},"high": {"url": "https://i.ytimg.com/vi/dW5O5sBUdpE/hqdefault.jpg","width": 480,"height": 360},"standard": {"url": "https://i.ytimg.com/vi/dW5O5sBUdpE/sddefault.jpg","width": 640,"height": 480}},"channelTitle": "Red Cynic","tags": ["Хищник","Хищники","Чужой","Чужие","Пол Андерсон","Видеорецензия","Рецензия","Обзор","Подкаст","Красный Циник","Циник","Predator","Predators","Alien","Aliens","Paul W. S. Anderson","Red Cynic","Videoreview","Review","Redcynic","Video Review","Podcast"],"categoryId": "1","liveBroadcastContent": "none","defaultLanguage": "ru","localized": {"title": "«Чужой против Хищника». Обзор «Красного Циника»","description": "https://www.patreon.com/user?u=5206451 — страница на Патреоне\nhttp://redcynic.com \nhttps://vk.com/public_redcynic - группа «В контакте»\n\nСкрашивая ваше ожидание большого обзора, мы рассмотрим начало противоречивого подфранчайза, фильм \"Чужой против Хищника\".\n\n*****\n\nЕсли хотите финансово помочь каналу, то мы будем очень благодарны. \n\nКошельки:\n\nWebMoney: \nR223381292090; \nZ222361875129. \n\nYandex.Money: \n410011854513048."},"defaultAudioLanguage": "ru-Latn"},"statistics": {"viewCount": "300141","likeCount": "20796","dislikeCount": "435","favoriteCount": "0","commentCount": "890"}}],"pageInfo": {"totalResults": 5,"resultsPerPage": 5}}');
516
-
517
- foreach ($response->items as $key => $video){
518
- $video->snippet = $videosData->items[$key]->snippet;
519
- $video->statistics = $videosData->items[$key]->statistics;
520
- $video->comments = $this->api->getCommentsByVideoId($video->id->videoId);
521
- }
522
-
523
- $this->filter_response_by_words($response, $blocked_words);
524
-
525
-
526
- if ( $response ) {
527
- if ( ! is_array( $response->items ) || ! count( $response->items ) ) {
528
- return [ 'error' => __( 'There are no publications in this account yet', 'yft' ) ];
529
- }
530
- $results = $response;
531
- } else {
532
- if ( $resultData ) {
533
- $results = $resultData;
534
- }
535
- }
536
-
537
- if ( empty( $results ) ) {
538
- return [ 'error' => __( 'No images found', 'yft' ) ];
539
- }
540
-
541
- foreach ( $results->items as $item ) {
542
- $resultData[] = $item;
543
- } // end -> foreach
544
-
545
- update_option( $opt_name, $old_opts );
546
-
547
- if ( is_array( $resultData ) && ! empty( $resultData ) ) {
548
- set_transient( $opt_name, $resultData, $cache_hours * 60 * 60 );
549
- }
550
-
551
- } // end -> false === $instaData
552
-
553
- return $resultData;
554
- }
555
-
556
- /**
557
- * Sort Function for timestamp Ascending
558
- */
559
- public function sort_timestamp_ASC( $a, $b ) {
560
- return $a->snippet->publishedAt > $b->snippet->publishedAt;
561
- }
562
-
563
- /**
564
- * Sort Function for timestamp Descending
565
- */
566
- public function sort_timestamp_DESC( $a, $b ) {
567
- return $a->snippet->publishedAt < $b->snippet->publishedAt;
568
- }
569
-
570
- /**
571
- * Sort Function for popularity Ascending
572
- */
573
- public function sort_popularity_ASC( $a, $b ) {
574
- return $a->statistics->viewCount > $b->statistics->viewCount;
575
- }
576
-
577
- /**
578
- * Sort Function for popularity Descending
579
- */
580
- public function sort_popularity_DESC( $a, $b ) {
581
- return $a->statistics->viewCount < $b->statistics->viewCount;
582
- }
583
-
584
- /**
585
- * Get count of accounts
586
- *
587
- * @return int
588
- */
589
- public function count_accounts() {
590
- $account = WIS_Plugin::app()->getOption( WYT_ACCOUNT_OPTION_NAME, array() );
591
-
592
- return count( $account );
593
- }
594
-
595
- } // end of class WYT_Widget
596
  ?>
1
  <?php
2
 
3
+
4
  use YoutubeFeed\Api\YoutubeApi;
5
 
6
  /**
8
  */
9
  class WYT_Widget extends WP_Widget {
10
 
11
+ /**
12
+ * Social name
13
+ *
14
+ * @var string
15
+ */
16
+ public $social = 'youtube';
17
+
18
  private static $app;
19
 
20
  /**
39
  public $defaults;
40
 
41
  /**
42
+ * @var WIS_Feeds
43
  */
44
+ public $feeds;
45
 
46
  public static function app() {
47
  return self::$app;
55
  self::$app = $this;
56
 
57
  // Widget ID and Class Setup
58
+ parent::__construct( 'wyoutube_feed', __( 'Social Slider - Youtube', 'youtube-feed' ), [
59
  'classname' => 'wyoutube-feed',
60
+ 'description' => __( 'A widget that displays a Youtube videos ', 'youtube-feed' ),
61
+ ] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
 
63
+ $this->plugin = WIS_Plugin::app();
64
+ $this->feeds = new WIS_Feeds( $this->social );
65
+
66
+ $this->defaults = [
67
+ 'title' => __( 'Youtube feed', 'instagram-slider-widget' ),
68
+ 'feed_id' => null,
69
+ ];
70
 
71
  // Enqueue Plugin Styles and scripts
72
+ add_action( 'wp_enqueue_scripts', [ $this, 'public_register' ] );
 
 
73
 
 
 
74
  // Action to display posts
75
+ add_action( 'wyoutube_feed', [ $this, 'display_posts' ] );
 
 
 
 
76
  }
77
 
78
  /**
80
  */
81
  public static function register_widget() {
82
  register_widget( __CLASS__ );
 
 
 
 
 
83
  }
84
 
 
 
 
 
 
 
 
 
85
 
86
  public function public_register() {
87
  wp_register_style( WIS_Plugin::app()->getPrefix() . 'wyt-font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );
88
+ wp_register_style( WIS_Plugin::app()->getPrefix() . 'wyt-instag-slider', WYT_COMPONENT_URL . '/assets/css/templates.css', [], WYT_COMPONENT_VERSION );
89
+ wp_register_style( WIS_Plugin::app()->getPrefix() . 'wyt-header', WYT_COMPONENT_URL . '/assets/css/wyt-header.css', [], WYT_COMPONENT_VERSION );
90
 
91
+ $ajax = json_encode( [
92
  'url' => admin_url( 'admin-ajax.php' ),
93
  'nonce' => wp_create_nonce( "addAccountByToken" ),
94
+ ] );
95
+ wp_add_inline_script( WIS_Plugin::app()->getPrefix() . 'wyoutube', "var ajax = $ajax;" );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  }
97
 
98
  /**
101
  */
102
  public function widget( $args, $instance ) {
103
 
104
+ //Our variables from the widget settings.
105
  $title = apply_filters( 'widget_title', $instance['title'] );
106
 
107
  echo $args['before_widget'];
121
  *
122
  */
123
  public function form( $instance ) {
124
+ $instance = wp_parse_args( (array) $instance, $this->defaults );
125
 
126
+ $args = [
127
+ 'widget' => &$this,
128
+ 'instance' => $instance,
129
+ 'feeds' => $this->feeds,
130
+ ];
131
 
132
+ echo $this->render_template( 'widget_settings', $args );
 
 
 
 
133
 
134
+ /* @var $accounts \YoutubeFeed\Api\Channel\YoutubeChannelItem[] */
135
+ //$accounts = WIS_Plugin::app()->getPopulateOption( WYT_ACCOUNT_OPTION_NAME, [] );
 
 
 
 
 
 
 
136
  }
137
 
138
  /**
144
  * @return array
145
  */
146
  public function update( $new_instance, $instance ) {
147
+ $new_instance = wp_parse_args( (array) $new_instance, $this->defaults );
 
 
 
 
 
 
 
 
 
148
 
149
+ foreach ( $new_instance as $key => &$item ) {
 
 
 
 
 
 
 
 
 
150
  switch ( $key ) {
151
+ case 'title':
152
+ $item = sanitize_text_field( $item );
 
 
 
 
 
 
 
153
  break;
154
+ case 'feed_id':
155
+ $item = absint( $item );
156
  break;
157
  }
158
  }
159
 
 
 
160
  return $new_instance;
161
  }
162
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
163
  /**
164
  * Echoes the Display Instagram Images method
165
  *
168
  * @return void
169
  */
170
  public function display_posts( $args ) {
171
+ echo $this->display_videos( $args );
172
  }
173
 
174
  /**
178
  *
179
  * @return string
180
  */
181
+ private function display_videos( $args ) {
182
+ $feed_id = absint( $args['feed_id'] );
183
+ /** @var WIS_Youtube_Feed $feed */
184
+ $feed = $this->feeds->get_feed( $feed_id );
185
 
186
+ return $feed ? $feed->display( true ) : __( 'No feed', 'instagram-slider-widget' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187
  }
188
 
189
  /**
195
  *
196
  * @return false|string
197
  */
198
+ private function render_template( $template_name, $args ) {
199
+ $path = "";
200
+ $path_component = WFB_COMPONENT_DIR . "/html_templates/$template_name.php";
201
+ if ( file_exists( $path_component ) ) {
202
+ $path = $path_component;
203
+ }
204
+
205
+ if ( $path ) {
206
  ob_start();
207
  include $path;
208
+ extract( $args );
209
 
210
  return ob_get_clean();
211
  } else {
212
  return 'This template does not exist!';
213
  }
214
  }
215
+ }
216
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  ?>
components/youtube/includes/functions.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ add_shortcode( 'cm_youtube_feed', 'cm_youtube_feed_shortcode' );
3
+ /**
4
+ * Add shortcode function
5
+ *
6
+ * @param array $atts shortcode attributes
7
+ *
8
+ * @return string
9
+ */
10
+ function cm_youtube_feed_shortcode( $atts ) {
11
+ $atts = shortcode_atts( [ 'id' => '' ], $atts, 'cm_youtube_feed' );
12
+
13
+ $feeds = new WIS_Feeds( 'youtube' );
14
+ $feed = $feeds->get_feed( $atts['id'] );
15
+
16
+ if ( $feed ) {
17
+ return $feed->display_videos();
18
+ }
19
+
20
+ return "";
21
+ }
22
+
components/youtube/load.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ global $wis_compatibility;
3
+
4
+ define( 'WYT_COMPONENT_VERSION', $wis_compatibility->get_plugin_version() );
5
+ define( 'WYT_COMPONENT_URL', WIS_COMPONENTS_URL . '/youtube' );
6
+ define( 'WYT_COMPONENT_DIR', WIS_COMPONENTS_DIR . '/youtube' );
7
+ define( 'WYT_COMPONENT_VIEWS_DIR', WYT_COMPONENT_DIR . '/html_templates' );
8
+ /*
9
+ * Константа определяет какое имя опции для хранения данных.
10
+ * Нужно для отладки и последующего бесшовного перехода
11
+ */
12
+ define( 'WYT_ACCOUNT_OPTION_NAME', 'youtube_account' );
13
+ define( 'WYT_API_KEY_OPTION_NAME', 'yt_api_key' );
14
+
15
+
16
+ require_once WYT_COMPONENT_DIR . '/includes/helpers.php';
17
+ require_once WYT_COMPONENT_DIR . '/includes/Api/load.php';
18
+ require_once WYT_COMPONENT_DIR . "/includes/class-youtube-feed.php";
19
+ require_once WYT_COMPONENT_DIR . "/includes/class-youtube-profiles.php";
20
+ require_once WYT_COMPONENT_DIR . "/includes/class-youtube-widget.php";
html_templates/facebook_slider_template.php DELETED
@@ -1,15 +0,0 @@
1
- <?php
2
- /** @var array $posts data */
3
- /** @var array $template template */
4
- /** @var string $images_link link */
5
- /** @var string $account account */
6
- /** @var string $orderby order */
7
-
8
- $account = isset( $args['account'] ) ? $args['account'] : array();
9
- $template = isset( $args['template'] ) ? $args['template'] : '';
10
- $images_link = isset( $args['images_link'] ) ? $args['images_link'] : '';
11
- $posts = isset( $args['posts'] ) ? $args['posts'] : array();
12
-
13
- foreach ( $posts as $post ) {
14
- echo "<img src='{$post['full_picture']}' alt=''><br>";
15
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
html_templates/widget_settings_template.php DELETED
@@ -1,505 +0,0 @@
1
- <?php
2
- /* @var array $args */
3
-
4
- $instance = $args['instance'];
5
- $accounts = $args['accounts'];
6
- $accounts_business = $args['accounts_business'];
7
- $sliders = $args['sliders'];
8
- $options_linkto = $args['options_linkto'];
9
-
10
- $w_id = explode('-', $this->id)[1];
11
- ?>
12
-
13
- <div class="jr-container">
14
- <div class="isw-tabs" id="widget_tabs_<?=$w_id?>" data-widget-id="<?=$w_id?>">
15
- <div class="isw-common-settings">
16
- <p>
17
- <label for="<?php echo $this->get_field_id('title'); ?>"><strong><?php _e('Title:', 'instagram-slider-widget'); ?></strong></label>
18
- <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>"
19
- name="<?php echo $this->get_field_name('title'); ?>"
20
- value="<?php echo $instance['title']; ?>"/>
21
- </p>
22
- <p>
23
- <strong><?php _e('Search Instagram for:', 'instagram-slider-widget'); ?></strong>
24
- <span class="jr-search-for-container">
25
- <label class="jr-seach-for">
26
- <input type="radio" id="<?php echo $this->get_field_id('search_for'); ?>"
27
- name="<?php echo $this->get_field_name('search_for'); ?>"
28
- value="account" <?php checked('account', $instance['search_for']); ?> />
29
- <?php _e('Account:', 'instagram-slider-widget'); ?>
30
- </label>
31
- <?php
32
- if (count($accounts)) {
33
- ?>
34
-
35
- <select id="<?php echo $this->get_field_id('account'); ?>" class="isw-float-right "
36
- name="<?php echo $this->get_field_name('account'); ?>"><?php
37
- foreach ($accounts as $acc) {
38
- $selected = $instance['account'] == $acc['username'] ? "selected='selected'" : "";
39
- echo "<option value='{$acc['username']}' {$selected}>{$acc['username']}</option>";
40
- }
41
- ?>
42
- </select><?php
43
- } else {
44
- echo "<a href='" . admin_url('admin.php?page=settings-wisw') . "'>" . __('Add account in settings', 'instagram-slider-widget') . "</a>";
45
- }
46
- ?>
47
- </span>
48
- <span class="jr-search-for-container" style="margin-top: 11px !important;">
49
- <label class="jr-seach-for">
50
- <input type="radio" id="<?php echo $this->get_field_id('search_for'); ?>"
51
- name="<?php echo $this->get_field_name('search_for'); ?>"
52
- value="account_business" <?php checked('account_business', $instance['search_for']); ?> />
53
- <?php _e('Business account:', 'instagram-slider-widget'); ?>
54
- </label>
55
- <?php
56
- if (count($accounts_business)) {
57
- ?>
58
-
59
- <select id="<?php echo $this->get_field_id('account_business'); ?>" class="isw-float-right "
60
- name="<?php echo $this->get_field_name('account_business'); ?>"><?php
61
- foreach ($accounts_business as $acc) {
62
- $selected = $instance['account_business'] == $acc['username'] ? "selected='selected'" : "";
63
- echo "<option value='{$acc['username']}' {$selected}>{$acc['username']}</option>";
64
- }
65
- ?>
66
- </select><?php
67
- } else {
68
- echo "<a href='" . admin_url('admin.php?page=settings-wisw') . "'>" . __('Add account in settings', 'instagram-slider-widget') . "</a>";
69
- }
70
- ?>
71
- </span>
72
- <span class="jr-search-for-container"><label class="jr-seach-for"><input type="radio" class=""
73
- id="<?php echo $this->get_field_id('search_for'); ?>"
74
- name="<?php echo $this->get_field_name('search_for'); ?>"
75
- value="username" <?php checked('username', $instance['search_for']); ?> /> <?php _e('Username:', 'instagram-slider-widget'); ?></label> <input
76
- id="<?php echo $this->get_field_id('username'); ?>" class="isw-float-right inline-field-text"
77
- name="<?php echo $this->get_field_name('username'); ?>"
78
- value="<?php echo $instance['username']; ?>"
79
- style="height: 30px"
80
- /></span>
81
- <span class="jr-search-for-container"><label class="jr-seach-for"><input type="radio" class=""
82
- id="<?php echo $this->get_field_id('search_for'); ?>"
83
- name="<?php echo $this->get_field_name('search_for'); ?>"
84
- value="hashtag" <?php checked('hashtag', $instance['search_for']); ?> /> <?php _e('Hashtag:', 'instagram-slider-widget'); ?></label> <input
85
- id="<?php echo $this->get_field_id('hashtag'); ?>" class="isw-float-right inline-field-text"
86
- name="<?php echo $this->get_field_name('hashtag'); ?>"
87
- value="<?php echo $instance['hashtag']; ?>"
88
- placeholder="<?php _e('without # sign', 'instagram-slider-widget') ?>"
89
- style="height: 30px"
90
- /></span>
91
- <span class="jr-description hashtag-problem-info <?php if ( 'hashtag' != $instance['search_for'] ) {
92
- echo 'hidden';
93
- } ?>"><?php _e( 'If you have problems displaying by hashtag, please connect your business account and select display by hashtag again', 'instagram-slider-widget' ); ?></span>
94
- </p>
95
- <p class="<?php if ('hashtag' != $instance['search_for']) {
96
- echo 'hidden';
97
- } ?>">
98
- <label for="<?php echo $this->get_field_id('blocked_users'); ?>"><?php _e('Block Users', 'instagram-slider-widget'); ?>
99
- :</label>
100
- <input class="widefat" id="<?php echo $this->get_field_id('blocked_users'); ?>"
101
- name="<?php echo $this->get_field_name('blocked_users'); ?>"
102
- value="<?php echo $instance['blocked_users']; ?>"/>
103
- <span class="jr-description"><?php _e('Enter words separated by commas whose images you don\'t want to show', 'instagram-slider-widget'); ?></span>
104
- </p>
105
- <p class="<?php if ('username' != $instance['search_for']) {
106
- echo 'hidden';
107
- } ?>"><strong><?php _e('Save in Media Library: ', 'instagram-slider-widget'); ?></strong>
108
-
109
- <label class="switch" for="<?php echo $this->get_field_id('attachment'); ?>">
110
- <input class="widefat" id="<?php echo $this->get_field_id('attachment'); ?>"
111
- name="<?php echo $this->get_field_name('attachment'); ?>" type="checkbox"
112
- value="1" <?php checked('1', $instance['attachment']); ?> /><span
113
- class="slider round"></span></label>
114
- <br><span
115
- class="jr-description"><?php _e(' Turn on to save Instagram Images into WordPress media library.', 'instagram-slider-widget') ?></span>
116
- <?php
117
- if (isset ($instance['username']) && !empty($instance['username'])) {
118
- echo '<br><button class="button action jr-delete-instagram-dupes" type="button" data-username="' . $instance['username'] . '"><strong>Remove</strong> duplicate images for <strong>' . $instance['username'] . '</strong></button><span class="jr-spinner"></span>';
119
- echo '<br><br><strong><span class="deleted-dupes-info"></span></strong>';
120
- wp_nonce_field('jr_delete_instagram_dupes', 'delete_insta_dupes_nonce');
121
- }
122
- ?>
123
- </p>
124
- <p>
125
- <label for="<?php echo $this->get_field_id('refresh_hour'); ?>"><strong><?php _e('Check for new images every:', 'instagram-slider-widget'); ?></strong>
126
- <input class="small-text isw-float-right" type="number" min="1" max="200"
127
- id="<?php echo $this->get_field_id('refresh_hour'); ?>"
128
- name="<?php echo $this->get_field_name('refresh_hour'); ?>"
129
- value="<?php echo $instance['refresh_hour']; ?>"/>
130
- <span><?php _e('hours', 'instagram-slider-widget'); ?></span>
131
- </label>
132
- </p>
133
- </div>
134
- <ul>
135
- <li class="desk_tab active" id="desk_tab_<?=$w_id?>" data-tab-id="<?=$w_id?>">Desktop</li>
136
- <li class="mob_tab" id="mob_tab_<?=$w_id?>" data-tab-id="<?=$w_id?>">Mobile</li>
137
- </ul>
138
- <div>
139
- <div id="desk_tab_content_<?=$w_id?>" class="desk_settings">
140
- <h3 style="width: 100%; text-align: center">DESKTOP SETTINGS</h3>
141
- <p class="<?php if ('hashtag' == $instance['search_for']) {
142
- echo 'hidden';
143
- } ?>">
144
- <label for="<?php echo $this->get_field_id('blocked_words'); ?>"><?php _e('Block words', 'instagram-slider-widget'); ?>
145
- :</label>
146
- <input class="widefat" id="<?php echo $this->get_field_id('blocked_words'); ?>"
147
- name="<?php echo $this->get_field_name('blocked_words'); ?>"
148
- value="<?php echo $instance['blocked_words']; ?>"/>
149
- <span class="jr-description"><?php _e('Enter comma-separated words. If one of them occurs in the image description, the image will not be displayed', 'instagram-slider-widget'); ?></span>
150
- </p>
151
- <p class="<?php if ('hashtag' == $instance['search_for']) {
152
- echo 'hidden';
153
- } ?>">
154
- <label for="<?php echo $this->get_field_id('allowed_words'); ?>"><?php _e('Allow words', 'instagram-slider-widget'); ?>
155
- :</label>
156
- <input class="widefat" id="<?php echo $this->get_field_id('allowed_words'); ?>"
157
- name="<?php echo $this->get_field_name('allowed_words'); ?>"
158
- value="<?php echo $instance['allowed_words']; ?>"/>
159
- <span class="jr-description"><?php _e('Enter comma-separated words. If one of them occurs in the image description, the image will be displayed', 'instagram-slider-widget'); ?></span>
160
- </p>
161
- <p id="img_to_show">
162
- <label for="<?php echo $this->get_field_id('images_number'); ?>"><strong><?php _e('Count of images to show:', 'instagram-slider-widget'); ?></strong>
163
- <input class="small-text isw-float-right" type="number" min="1" max=""
164
- id="<?php echo $this->get_field_id('images_number'); ?>"
165
- name="<?php echo $this->get_field_name('images_number'); ?>"
166
- value="<?php echo $instance['images_number']; ?>"/>
167
- <span class="jr-description">
168
- <?php if (!$this->WIS->is_premium()) {
169
- _e('Maximum 20 images in free version.', 'instagram-slider-widget');
170
- echo " " . sprintf(__("More in <a href='%s'>PRO version</a>", 'instagram-slider-widget'), $this->WIS->get_support()->get_pricing_url(true, "wis_widget_settings"));
171
- }
172
- ?>
173
- </span>
174
- </label>
175
- </p>
176
-
177
- <p class="show_feed_header <?php if ('account_business' != $instance['search_for']) {
178
- echo 'hidden';
179
- } ?>">
180
- <strong><?php _e('Show feed header:', 'instagram-slider-widget'); ?></strong>
181
- <label class="switch" for="<?php echo $this->get_field_id('show_feed_header'); ?>">
182
- <input class="widefat" id="<?php echo $this->get_field_id('show_feed_header'); ?>"
183
- name="<?php echo $this->get_field_name('show_feed_header'); ?>" type="checkbox"
184
- value="1" <?php checked('1', $instance['show_feed_header']); ?> />
185
- <span class="slider round"></span>
186
- </label>
187
- </p>
188
- <?php if($this->WIS->is_premium()) : ?>
189
- <p class="enable_stories">
190
- <strong><?php _e('Enable Stories:', 'instagram-slider-widget'); ?></strong>
191
- <label class="switch" for="<?php echo $this->get_field_id('enable_stories'); ?>">
192
- <input class="widefat" id="<?php echo $this->get_field_id('enable_stories'); ?>"
193
- name="<?php echo $this->get_field_name('enable_stories'); ?>" type="checkbox"
194
- value="1" <?php checked('1', $instance['enable_stories']); ?>/>
195
- <span class="slider round" <?= !$this->WIS->is_premium() ? 'style="background-color:grey;"' : '' ?> ></span>
196
- </label>
197
- <span class="jr-description">
198
- <?php
199
- _e('Works only with business account.', 'instagram-slider-widget');
200
- ?>
201
- </span>
202
- </p>
203
- <?php else: ?>
204
- <p class="enable_stories" style="color:grey;">
205
- <strong><?php _e('Enable Stories:', 'instagram-slider-widget'); ?></strong>
206
- <label class="switch" for="<?php echo $this->get_field_id('enable_stories'); ?>">
207
- <input class="widefat" id="<?php echo $this->get_field_id('enable_stories'); ?>"
208
- name="<?php echo $this->get_field_name('enable_stories'); ?>" type="checkbox"
209
- value="1" <?php checked('1', $instance['enable_stories']); ?>
210
- disabled
211
- />
212
- <span class="slider round" style="background-color:grey;"></span>
213
- </label>
214
- <span class="jr-description">
215
- <?php
216
- _e('Available in PRO version.', 'instagram-slider-widget');
217
- echo " " . sprintf(__("More in <a href='%s'>PRO version</a>", 'instagram-slider-widget'), $this->WIS->get_support()->get_pricing_url(true, "wis_widget_settings"));
218
- ?>
219
- </span>
220
- </p>
221
- <?php endif;?>
222
- <p>
223
- <label for="<?php echo $this->get_field_id('template'); ?>"><strong><?php _e('Template', 'instagram-slider-widget'); ?></strong>
224
- <select class="widefat" name="<?php echo $this->get_field_name('template'); ?>"
225
- id="<?php echo $this->get_field_id('template'); ?>">
226
- <?php
227
- if (count($sliders)) {
228
- foreach ($sliders as $key => $slider) {
229
- $selected = ($instance['template'] == $key) ? "selected='selected'" : '';
230
- echo "<option value='{$key}' {$selected}>{$slider}</option>\n";
231
- }
232
- }
233
- if (!$this->WIS->is_premium()) {
234
- ?>
235
- <optgroup label="Available in PRO">
236
- <option value='slick_slider' disabled="disabled">Slick</option>
237
- <option value='masonry' disabled="disabled">Masonry</option>
238
- <option value='highlight' disabled="disabled">Highlight</option>
239
- <option value='showcase' disabled="disabled">Shopifeed - Thumbnails</option>
240
- </optgroup>
241
- <?php
242
- }
243
- ?>
244
- </select>
245
- </label>
246
- </p>
247
- <span id="masonry_notice"
248
- class="masonry_notice jr-description <?php if ('masonry' != $instance['template']) {
249
- echo 'hidden';
250
- } ?>"><?php _e("Not recommended for <strong>sidebar</strong>") ?></span>
251
- <p class="<?php if ('thumbs' != $instance['template'] && 'thumbs-no-border' != $instance['template']) {
252
- echo 'hidden';
253
- } ?>">
254
- <label for="<?php echo $this->get_field_id('columns'); ?>"><strong><?php _e('Number of Columns:', 'instagram-slider-widget'); ?></strong>
255
- <input class="small-text isw-float-right" id="<?php echo $this->get_field_id('columns'); ?>"
256
- name="<?php echo $this->get_field_name('columns'); ?>"
257
- value="<?php echo $instance['columns']; ?>"/>
258
- <span class='jr-description'><?php _e('max is 10 ( only for thumbnails template )', 'instagram-slider-widget'); ?></span>
259
- </label>
260
- </p>
261
- <p class="masonry_settings <?php if ('masonry' != $instance['template']) {
262
- echo 'hidden';
263
- } ?>">
264
- <label for="<?php echo $this->get_field_id('gutter'); ?>"><strong><?php _e('Vertical space between item elements:', 'instagram-slider-widget'); ?></strong>
265
- <input class="small-text isw-float-right" id="<?php echo $this->get_field_id('gutter'); ?>"
266
- name="<?php echo $this->get_field_name('gutter'); ?>"
267
- value="<?php echo $instance['gutter']; ?>"/>
268
- <span><?php _e('px', 'instagram-slider-widget'); ?></span>
269
- </label>
270
- <br>
271
- <label for="<?php echo $this->get_field_id('masonry_image_width'); ?>"><strong><?php _e('Image width:', 'instagram-slider-widget'); ?></strong>
272
- <input class="small-text isw-float-right" id="<?php echo $this->get_field_id('masonry_image_width'); ?>"
273
- name="<?php echo $this->get_field_name('masonry_image_width'); ?>"
274
- value="<?php echo $instance['masonry_image_width']; ?>"/>
275
- <span><?php _e('px', 'instagram-slider-widget'); ?></span>
276
- </label>
277
- </p>
278
- <p class="slick_settings <?php if ('slick_slider' != $instance['template']) {
279
- echo 'hidden';
280
- } ?>">
281
- <strong><?php _e('Enable control buttons:', 'instagram-slider-widget'); ?></strong>
282
- <label class="switch" for="<?php echo $this->get_field_id('enable_control_buttons'); ?>">
283
- <input class="widefat" id="<?php echo $this->get_field_id('enable_control_buttons'); ?>"
284
- name="<?php echo $this->get_field_name('enable_control_buttons'); ?>" type="checkbox"
285
- value="1" <?php checked('1', $instance['enable_control_buttons']); ?> />
286
- <span class="slider round"></span>
287
- </label>
288
- <br>
289
- <strong><?php _e('Keep 1x1 Instagram ratio:', 'instagram-slider-widget'); ?></strong>
290
- <label class="switch" for="<?php echo $this->get_field_id('keep_ratio'); ?>">
291
- <input class="widefat" id="<?php echo $this->get_field_id('keep_ratio'); ?>"
292
- name="<?php echo $this->get_field_name('keep_ratio'); ?>" type="checkbox"
293
- value="1" <?php checked('1', $instance['keep_ratio']); ?> />
294
- <span class="slider round"></span>
295
- </label>
296
- <br>
297
- <label class="slick_img_size"
298
- for="<?php echo $this->get_field_id('slick_img_size'); ?>"><strong><?php _e('Images size: ', 'instagram-slider-widget'); ?></strong>
299
- <input class="small-text" type="number" min="1" max="500" step="1"
300
- id="<?php echo $this->get_field_id('slick_img_size'); ?>"
301
- name="<?php echo $this->get_field_name('slick_img_size'); ?>"
302
- value="<?php echo $instance['slick_img_size']; ?>"/>
303
- <span><?php _e('px', 'instagram-slider-widget'); ?></span>
304
- </label>
305
- <br>
306
- <label for="<?php echo $this->get_field_id('slick_slides_to_show'); ?>"><strong><?php _e('Pictures per slide:', 'instagram-slider-widget'); ?></strong>
307
- <input class="small-text" id="<?php echo $this->get_field_id('slick_slides_to_show'); ?>"
308
- name="<?php echo $this->get_field_name('slick_slides_to_show'); ?>"
309
- value="<?php echo $instance['slick_slides_to_show']; ?>"/>
310
- <span><?php _e('pictures', 'instagram-slider-widget'); ?></span>
311
- </label>
312
- <br>
313
- <strong><?php _e('Space between pictures:', 'instagram-slider-widget'); ?></strong>
314
- <label class="switch" for="<?php echo $this->get_field_id('slick_slides_padding'); ?>">
315
- <input class="widefat" id="<?php echo $this->get_field_id('slick_slides_padding'); ?>"
316
- name="<?php echo $this->get_field_name('slick_slides_padding'); ?>" type="checkbox"
317
- value="1" <?php checked('1', $instance['slick_slides_padding']); ?> />
318
- <span class="slider round"></span>
319
- </label>
320
- <br>
321
- </p>
322
- <p class="highlight_settings <?php if ('highlight' != $instance['template']) {
323
- echo 'hidden';
324
- } ?>">
325
- <label for="<?php echo $this->get_field_id('highlight_offset'); ?>"><strong><?php _e('Offset', 'instagram-slider-widget'); ?></strong>
326
- <input type="number" min="1" class="small-text"
327
- id="<?php echo $this->get_field_id('highlight_offset'); ?>"
328
- name="<?php echo $this->get_field_name('highlight_offset'); ?>"
329
- value="<?php echo $instance['highlight_offset']; ?>"/>
330
- </label>
331
- <p></p>
332
- <label for="<?php echo $this->get_field_id('highlight_pattern'); ?>"><strong><?php _e('Pattern', 'instagram-slider-widget'); ?></strong>
333
- <input type="number" min="0" class="small-text"
334
- id="<?php echo $this->get_field_id('highlight_pattern'); ?>"
335
- name="<?php echo $this->get_field_name('highlight_pattern'); ?>"
336
- value="<?php echo $instance['highlight_pattern']; ?>"/>
337
- </label>
338
- </p>
339
- <p class="shopifeed_settings <?php if ('showcase' != $instance['template']) {
340
- echo 'hidden';
341
- } ?>">
342
- <label for="<?php echo $this->get_field_id('shopifeed_phone'); ?>"><strong><?php _e('Phone', 'instagram-slider-widget'); ?></strong>
343
- <input type="text" class="shopifeed_phone isw-float-right"
344
- id="<?php echo $this->get_field_id('shopifeed_phone'); ?>"
345
- name="<?php echo $this->get_field_name('shopifeed_phone'); ?>"
346
- value="<?php echo $instance['shopifeed_phone']; ?>"/>
347
- <span id="" class="jr-description"><?php _e("Use for whatsapp messages") ?></span>
348
- </label>
349
- <label for="<?php echo $this->get_field_id('shopifeed_color'); ?>"><strong><?php _e('Buttons Color', 'instagram-slider-widget'); ?></strong>
350
- <input type="color" class="shopifeed_color isw-float-right"
351
- id="<?php echo $this->get_field_id('shopifeed_color'); ?>"
352
- name="<?php echo $this->get_field_name('shopifeed_color'); ?>"
353
- value="<?php echo $instance['shopifeed_color']; ?>"
354
- style="border: none !important;"/>
355
- </label>
356
-
357
- <br>
358
- <label for="<?php echo $this->get_field_id('shopifeed_columns'); ?>"><strong><?php _e('Columns count', 'instagram-slider-widget'); ?></strong>
359
- <input type="number" class="isw-float-right shopifeed_columns" min="1" max="6" step="1"
360
- id="<?php echo $this->get_field_id('shopifeed_columns'); ?>"
361
- name="<?php echo $this->get_field_name('shopifeed_columns'); ?>"
362
- value="<?php echo $instance['shopifeed_columns']; ?>"/>
363
- </label>
364
- </p>
365
- <p class="slider_normal_settings jr-slider-options <?php if ('slider' != $instance['template'] && 'slider-overlay' != $instance['template']) { echo 'hidden'; } ?>">
366
- <?php _e('Slider Navigation Controls:', 'instagram-slider-widget'); ?>
367
- <br>
368
- <label class="jr-radio"><input type="radio" id="<?php echo $this->get_field_id('controls'); ?>"
369
- name="<?php echo $this->get_field_name('controls'); ?>"
370
- value="prev_next" <?php checked('prev_next', $instance['controls']); ?> /> <?php _e('Prev & Next', 'instagram-slider-widget'); ?>
371
- </label>
372
- <label class="jr-radio"><input type="radio" id="<?php echo $this->get_field_id('controls'); ?>"
373
- name="<?php echo $this->get_field_name('controls'); ?>"
374
- value="numberless" <?php checked('numberless', $instance['controls']); ?> /> <?php _e('Dotted', 'instagram-slider-widget'); ?>
375
- </label>
376
- <label class="jr-radio"><input type="radio" id="<?php echo $this->get_field_id('controls'); ?>"
377
- name="<?php echo $this->get_field_name('controls'); ?>"
378
- value="none" <?php checked('none', $instance['controls']); ?> /> <?php _e('No Navigation', 'instagram-slider-widget'); ?>
379
- </label>
380
- <br>
381
- <?php _e('Slider Animation:', 'instagram-slider-widget'); ?>
382
- <br>
383
- <label class="jr-radio"><input type="radio" id="<?php echo $this->get_field_id('animation'); ?>"
384
- name="<?php echo $this->get_field_name('animation'); ?>"
385
- value="slide" <?php checked('slide', $instance['animation']); ?> /> <?php _e('Slide', 'instagram-slider-widget'); ?>
386
- </label>
387
- <label class="jr-radio"><input type="radio" id="<?php echo $this->get_field_id('animation'); ?>"
388
- name="<?php echo $this->get_field_name('animation'); ?>"
389
- value="fade" <?php checked('fade', $instance['animation']); ?> /> <?php _e('Fade', 'instagram-slider-widget'); ?>
390
- </label>
391
- <br>
392
- <br>
393
- <label for="<?php echo $this->get_field_id('slidespeed'); ?>"><?php _e('Slide Speed:', 'instagram-slider-widget'); ?>
394
- <input type="number" min="1000" step="100" class="small-text"
395
- id="<?php echo $this->get_field_id('slidespeed'); ?>"
396
- name="<?php echo $this->get_field_name('slidespeed'); ?>"
397
- value="<?php echo $instance['slidespeed']; ?>"/>
398
- <span><?php _e('milliseconds', 'instagram-slider-widget'); ?></span>
399
- <span class='jr-description'><?php _e('1000 milliseconds = 1 second', 'instagram-slider-widget'); ?></span>
400
- </label>
401
- <label for="<?php echo $this->get_field_id('description'); ?>"><?php _e('Slider Text Description:', 'instagram-slider-widget'); ?></label>
402
- <select size=3 class='widefat' id="<?php echo $this->get_field_id('description'); ?>"
403
- name="<?php echo $this->get_field_name('description'); ?>[]" multiple="multiple">
404
- <option class="<?php if ('hashtag' == $instance['search_for']) {
405
- echo 'hidden';
406
- } ?>"
407
- value='username' <?php $this->selected($instance['description'], 'username'); ?>><?php _e('Username', 'instagram-slider-widget'); ?></option>
408
- <option value='time'<?php $this->selected($instance['description'], 'time'); ?>><?php _e('Time', 'instagram-slider-widget'); ?></option>
409
- <option value='caption'<?php $this->selected($instance['description'], 'caption'); ?>><?php _e('Caption', 'instagram-slider-widget'); ?></option>
410
- </select>
411
- <span class="jr-description"><?php _e('Hold ctrl and click the fields you want to show/hide on your slider. Leave all unselected to hide them all. Default all selected.', 'instagram-slider-widget') ?></span>
412
- </p>
413
- <p class="words_in_caption <?php if ('thumbs' == $instance['template'] || 'thumbs-no-border' == $instance['template'] || 'highlight' == $instance['template'] || 'slick_slider' == $instance['template']) {
414
- echo 'hidden';
415
- } ?>">
416
- <label for="<?php echo $this->get_field_id('caption_words'); ?>"><strong><?php _e('Number of words in caption:', 'instagram-slider-widget'); ?></strong>
417
- <input class="isw-float-right small-text" type="number" min="0" max="200"
418
- id="<?php echo $this->get_field_id('caption_words'); ?>"
419
- name="<?php echo $this->get_field_name('caption_words'); ?>"
420
- value="<?php echo $instance['caption_words']; ?>"/>
421
- </label>
422
- </p>
423
- <br>
424
- <strong><?php _e('Enable author\'s ad:', 'instagram-slider-widget'); ?></strong>
425
- <label class="switch" for="<?php echo $this->get_field_id('enable_ad'); ?>">
426
- <input class="widefat" id="<?php echo $this->get_field_id('enable_ad'); ?>"
427
- name="<?php echo $this->get_field_name('enable_ad'); ?>" type="checkbox"
428
- value="1" <?php checked('1', $instance['enable_ad']); ?> />
429
- <span class="slider round"></span>
430
- </label>
431
- <br>
432
- <strong><?php _e('Enable instagram icons:', 'instagram-slider-widget'); ?></strong>
433
- <label class="switch" for="<?php echo $this->get_field_id('enable_icons'); ?>">
434
- <input class="widefat" id="<?php echo $this->get_field_id('enable_icons'); ?>"
435
- name="<?php echo $this->get_field_name('enable_icons'); ?>" type="checkbox"
436
- value="1" <?php checked('1', $instance['enable_icons']); ?> />
437
- <span class="slider round"></span>
438
- </label>
439
- <p>
440
- <label for="<?php echo $this->get_field_id('orderby'); ?>"><strong><?php _e('Order by', 'instagram-slider-widget'); ?></strong>
441
- <select class="widefat" name="<?php echo $this->get_field_name('orderby'); ?>"
442
- id="<?php echo $this->get_field_id('orderby'); ?>">
443
- <option value="date-ASC" <?php selected($instance['orderby'], 'date-ASC', true); ?>><?php _e('Date - Ascending', 'instagram-slider-widget'); ?></option>
444
- <option value="date-DESC" <?php selected($instance['orderby'], 'date-DESC', true); ?>><?php _e('Date - Descending', 'instagram-slider-widget'); ?></option>
445
- <option value="popular-ASC" <?php selected($instance['orderby'], 'popular-ASC', true); ?>><?php _e('Popularity - Ascending', 'instagram-slider-widget'); ?></option>
446
- <option value="popular-DESC" <?php selected($instance['orderby'], 'popular-DESC', true); ?>><?php _e('Popularity - Descending', 'instagram-slider-widget'); ?></option>
447
- <option value="rand" <?php selected($instance['orderby'], 'rand', true); ?>><?php _e('Random', 'instagram-slider-widget'); ?></option>
448
- </select>
449
- </label>
450
- </p>
451
- <p class="isw-linkto <?php if ('showcase' == $instance['template']) {
452
- echo 'hidden';
453
- } ?>">
454
- <label for="<?php echo $this->get_field_id('images_link'); ?>"><strong><?php _e('Link to', 'instagram-slider-widget'); ?></strong>
455
- <select class="widefat" name="<?php echo $this->get_field_name('images_link'); ?>"
456
- id="<?php echo $this->get_field_id('images_link'); ?>">
457
- <?php
458
- if (count($options_linkto)) {
459
- foreach ($options_linkto as $key => $option) {
460
- $selected = selected($instance['images_link'], $key, false);
461
- echo "<option value='{$key}' {$selected}>{$option}</option>\n";
462
- }
463
- }
464
- if (!$this->WIS->is_premium()) {
465
- ?>
466
- <optgroup label="Available in PRO">
467
- <option value='1' disabled="disabled">Pop Up</option>
468
- </optgroup>
469
- <?php
470
- }
471
- ?>
472
- </select>
473
- </label>
474
- </p>
475
- <p class="<?php if ('custom_url' != $instance['images_link']) {
476
- echo 'hidden';
477
- } ?>">
478
- <label for="<?php echo $this->get_field_id('custom_url'); ?>"><?php _e('Custom link:', 'instagram-slider-widget'); ?></label>
479
- <input class="widefat" id="<?php echo $this->get_field_id('custom_url'); ?>"
480
- name="<?php echo $this->get_field_name('custom_url'); ?>"
481
- value="<?php echo $instance['custom_url']; ?>"/>
482
- <span><?php _e('* use this field only if the above option is set to <strong>Custom Link</strong>', 'instagram-slider-widget'); ?></span>
483
- </p>
484
- </div>
485
- <?php
486
- if(defined('WISP_PLUGIN_ACTIVE') && $this->WIS->is_premium()) :
487
- echo apply_filters('wis/mob_settings', $this, $instance, $sliders, $options_linkto, $w_id);
488
- else: ?>
489
- <div id="mob_tab_content_<?=$w_id?>" class="mob_settings" style="display: none;">
490
- <h3 style="width: 100%; text-align: center">MOBILE SETTINGS AVAILABLE ONLY IN PREMIUM VERSION</h3>
491
- </div>
492
- <?php endif; ?>
493
- </div>
494
- <?php $widget_id = preg_replace('/[^0-9]/', '', $this->id);
495
- if ($widget_id != '') : ?>
496
- <p>
497
- <label for="jr_insta_shortcode"><?php _e('Shortcode of this Widget:', 'instagram-slider-widget'); ?></label>
498
- <input id="jr_insta_shortcode" onclick="this.setSelectionRange(0, this.value.length)" type="text"
499
- class="widefat" value="[jr_instagram id=&quot;<?php echo $widget_id ?>&quot;]"
500
- readonly="readonly" style="border:none; color:black; font-family:monospace;">
501
- <span class="jr-description"><?php _e('Use this shortcode in any page or post to display images with this widget configuration!', 'instagram-slider-widget') ?></span>
502
- </p>
503
- <?php endif; ?>
504
- </div>
505
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/class-feed.php ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ abstract class WIS_Feed {
4
+
5
+ /**
6
+ * @var string
7
+ */
8
+ protected $component_dir;
9
+
10
+ /**
11
+ * @var array
12
+ */
13
+ public $instance = [];
14
+
15
+ /**
16
+ * @var array
17
+ */
18
+ protected $defaults = [];
19
+
20
+ /**
21
+ * @var array
22
+ */
23
+ protected $templates = [];
24
+
25
+ /**
26
+ * @var array
27
+ */
28
+ protected $linkto = [];
29
+
30
+ /**
31
+ * @var bool
32
+ */
33
+ protected $is_mobile = false;
34
+
35
+ /**
36
+ * WIS_Feed constructor.
37
+ *
38
+ * @param array $feed
39
+ */
40
+ public function __construct( $feed = [] ) {
41
+ $this->setDefaults();
42
+ $this->is_mobile = self::isMobile();
43
+ $this->instance = wp_parse_args( $feed, $this->defaults );
44
+ }
45
+
46
+ /**
47
+ * Get feed option
48
+ *
49
+ * @param $name
50
+ *
51
+ * @return mixed|null
52
+ */
53
+ public function __get( $name ) {
54
+ if ( isset( $this->instance[ $name ] ) ) {
55
+ return $this->instance[ $name ];
56
+ }
57
+
58
+ return null;
59
+ }
60
+
61
+ public function __sleep() {
62
+ return [ 'instance' ];
63
+ }
64
+
65
+ public function __wakeup() {
66
+ $this->setDefaults();
67
+ $this->instance = wp_parse_args( $this->instance, $this->defaults );
68
+ $this->is_mobile = self::isMobile();
69
+ }
70
+
71
+ public function updateDefaults( $key, $value ) {
72
+ $this->defaults[ $key ] = $value;
73
+ }
74
+
75
+ /**
76
+ * Set default values
77
+ */
78
+ protected function setDefaults() { }
79
+
80
+ /**
81
+ * @return array
82
+ */
83
+ public function getTemplates() {
84
+ return $this->templates;
85
+ }
86
+
87
+ /**
88
+ * @return array
89
+ */
90
+ public function getLinkto() {
91
+ return $this->linkto;
92
+ }
93
+
94
+ public static function isMobile() {
95
+ return preg_match( '/(android|ios|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i', $_SERVER['HTTP_USER_AGENT'] );
96
+ }
97
+
98
+ /**
99
+ * Get feed option (mobile or desktop)
100
+ *
101
+ * @param $name
102
+ *
103
+ * @return mixed|null
104
+ */
105
+ public function get( $name ) {
106
+ if ( $this->is_mobile ) {
107
+ if ( isset( $this->instance["m_{$name}"] ) ) {
108
+ return $this->instance["m_{$name}"];
109
+ }
110
+ }
111
+
112
+ return $this->__get( $name );
113
+ }
114
+
115
+ /**
116
+ * Get feed options (mobile or desktop)
117
+ *
118
+ * @return array
119
+ */
120
+ public function getAdaptiveInstance() {
121
+ $new_instance = [];
122
+ foreach ( $this->instance as $key => $item ) {
123
+ $new_instance[ $key ] = $this->get( $key );
124
+ }
125
+
126
+ return $new_instance;
127
+ }
128
+
129
+ /**
130
+ * Trigger refresh for new data
131
+ *
132
+ * @param bool $instaData
133
+ * @param array $old_args
134
+ * @param array $new_args
135
+ *
136
+ * @return bool
137
+ */
138
+ public function trigger_refresh_data( $instaData, $old_args, $new_args ) {
139
+
140
+ $trigger = 0;
141
+
142
+ if ( defined( 'WIS_PLUGIN_DEV' ) && WIS_PLUGIN_DEV ) {
143
+ return true;
144
+ }
145
+
146
+ if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
147
+ return false;
148
+ }
149
+
150
+ if ( false === $instaData ) {
151
+ $trigger = 1;
152
+ }
153
+
154
+ if ( isset( $old_args['saved_images'] ) ) {
155
+ unset( $old_args['saved_images'] );
156
+ }
157
+
158
+ if ( isset( $old_args['deleted_images'] ) ) {
159
+ unset( $old_args['deleted_images'] );
160
+ }
161
+
162
+ if ( is_array( $old_args ) && is_array( $new_args ) && array_diff( $old_args, $new_args ) !== array_diff( $new_args, $old_args ) ) {
163
+ $trigger = 1;
164
+ }
165
+
166
+ if ( 1 === $trigger ) {
167
+ return true;
168
+ }
169
+
170
+ return false;
171
+ }
172
+
173
+ /**
174
+ * Method renders layout template
175
+ *
176
+ * @param string $template_name Template name without ".php"
177
+ * @param array $args Template arguments
178
+ *
179
+ * @return false|string
180
+ */
181
+ protected function render_template( $template_name, $args ) {
182
+ $path = '';
183
+ $path_component = $this->component_dir . "/html_templates/$template_name.php";
184
+ if ( file_exists( $path_component ) ) {
185
+ $path = $path_component;
186
+ }
187
+
188
+ if ( $path ) {
189
+ ob_start();
190
+ include $path;
191
+ extract( $args ); // @codingStandardsIgnoreLine
192
+
193
+ return ob_get_clean();
194
+ } else {
195
+ return 'This template does not exist!';
196
+ }
197
+ }
198
+
199
+ /**
200
+ * Render feed form
201
+ */
202
+ abstract public function form();
203
+ }
includes/class-feeds.php ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class WIS_Feeds {
5
+
6
+ /**
7
+ * Social name
8
+ *
9
+ * @var string
10
+ */
11
+ public $social;
12
+
13
+ /**
14
+ * Array of feeds
15
+ *
16
+ * @var WIS_Feed[]
17
+ */
18
+ public $feeds = [];
19
+
20
+ /**
21
+ * Latest fedd id
22
+ *
23
+ * @var int
24
+ */
25
+ private $last_id;
26
+
27
+ /**
28
+ * Current social feeds option name
29
+ *
30
+ * @var string
31
+ */
32
+ private $option_name;
33
+
34
+ /**
35
+ * Feeds constructor.
36
+ *
37
+ * @param string $social_name
38
+ */
39
+ public function __construct( $social_name ) {
40
+ if ( empty( $social_name ) ) {
41
+ return null;
42
+ }
43
+
44
+ $this->social = $social_name;
45
+ $this->option_name = WIS_FEEDS_OPTION . '_' . $social_name;
46
+ $this->last_id = WIS_Plugin::app()->getPopulateOption( WIS_FEEDS_OPTION . '_last_id', 0 );
47
+ $this->get_feeds();
48
+ }
49
+
50
+ /**
51
+ * Get social feeds
52
+ *
53
+ * @return WIS_Feed[]
54
+ */
55
+ public function get_feeds() {
56
+ $this->feeds = WIS_Plugin::app()->getPopulateOption( $this->option_name, [] );
57
+
58
+ return $this->feeds;
59
+ }
60
+
61
+ /**
62
+ * Get social feeds
63
+ *
64
+ * @return WIS_Feed|false
65
+ */
66
+ public function get_feed( $feed_id ) {
67
+ $this->feeds = WIS_Plugin::app()->getPopulateOption( $this->option_name, [] );
68
+
69
+ return $this->feeds[ $feed_id ] ?? false;
70
+ }
71
+
72
+ /**
73
+ * Update social feeds
74
+ *
75
+ * @param WIS_Feed $feed
76
+ *
77
+ * @return int
78
+ */
79
+ public function add_feed( $feed ) {
80
+ $this->last_id ++;
81
+ $feed->instance['id'] = $this->last_id;
82
+
83
+ $this->feeds[ $this->last_id ] = $feed;
84
+ WIS_Plugin::app()->updatePopulateOption( $this->option_name, $this->feeds );
85
+ WIS_Plugin::app()->updatePopulateOption( WIS_FEEDS_OPTION . '_last_id', $this->last_id );
86
+
87
+ return $this->last_id;
88
+ }
89
+
90
+ /**
91
+ * Update social feeds
92
+ *
93
+ * @param array $feeds
94
+ */
95
+ public function update_feeds( $feeds ) {
96
+ $this->feeds = $feeds;
97
+ WIS_Plugin::app()->updatePopulateOption( $this->option_name, $feeds );
98
+ }
99
+
100
+ /**
101
+ * Update social feeds
102
+ *
103
+ * @param array $feeds
104
+ */
105
+ public function update_feed( $feed_id, $feed ) {
106
+ $feed->instance['id'] = $feed_id;
107
+ $this->feeds[ $feed_id ] = $feed;
108
+ WIS_Plugin::app()->updatePopulateOption( $this->option_name, $this->feeds );
109
+ }
110
+
111
+ /**
112
+ * Delete social feeds
113
+ *
114
+ * @param $id
115
+ */
116
+ public function delete_feed( $id ) {
117
+ $feeds = $this->get_feeds();
118
+ unset( $feeds[ $id ] );
119
+ $this->update_feeds( $feeds );
120
+ }
121
+
122
+ /**
123
+ * Delete social feeds
124
+ */
125
+ public function delete_feeds() {
126
+ $this->feeds = [];
127
+ WIS_Plugin::app()->deletePopulateOption( $this->option_name );
128
+ }
129
+ }
includes/class-helper.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class WIS_Helper {
4
+
5
+ /**
6
+ * Get social feeds
7
+ *
8
+ * @return array
9
+ */
10
+ public static function get_feeds(): array {
11
+ return WIS_Plugin::app()->getPopulateOption( WIS_FEEDS_OPTION, [] );
12
+ }
13
+ }
includes/class-plugin.php ADDED
@@ -0,0 +1,273 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+
5
+ if ( ! defined( 'ABSPATH' ) ) {
6
+ exit;
7
+ }
8
+
9
+ /**
10
+ * Основной класс плагина Social Slider Feed
11
+ *
12
+ * @author Artem Prihodko <webtemyk@yandex.ru>
13
+ * @copyright (c) 2019 Webraftic Ltd
14
+ * @version 1.0
15
+ */
16
+ class WIS_Plugin extends \Wbcr_Factory453_Plugin {
17
+
18
+ /**
19
+ * @see self::app()
20
+ * @var \Wbcr_Factory453_Plugin
21
+ */
22
+ private static $app;
23
+
24
+ /**
25
+ * @var array Список слайдеров
26
+ */
27
+ public $sliders = [];
28
+
29
+ /**
30
+ * Статический метод для быстрого доступа к интерфейсу плагина.
31
+ *
32
+ * Позволяет разработчику глобально получить доступ к экземпляру класса плагина в любом месте
33
+ * плагина, но при этом разработчик не может вносить изменения в основной класс плагина.
34
+ *
35
+ * Используется для получения настроек плагина, информации о плагине, для доступа к вспомогательным
36
+ * классам.
37
+ *
38
+ * @return \Wbcr_Factory453_Plugin
39
+ */
40
+ public static function app() {
41
+ return self::$app;
42
+ }
43
+
44
+ /**
45
+ * Статический метод для быстрого доступа к классу соцсети.
46
+ *
47
+ * @param string $class
48
+ *
49
+ * @return $class
50
+ */
51
+ public static function social( $class ) {
52
+ return new $class;
53
+ }
54
+
55
+ /**
56
+ * Конструктор
57
+ *
58
+ * Подробнее о свойстве $app см. self::app()
59
+ *
60
+ * @param string $plugin_path
61
+ * @param array $data
62
+ *
63
+ * @throws \Exception
64
+ */
65
+ public function __construct( $plugin_path, $data ) {
66
+ $this->load_components();
67
+
68
+ parent::__construct( $plugin_path, $data );
69
+ self::$app = $this;
70
+
71
+ if ( is_admin() ) {
72
+ // Регистрации класса активации/деактивации плагина
73
+ $this->init_activation();
74
+
75
+ // Инициализация скриптов для бэкенда
76
+ $this->admin_scripts();
77
+
78
+ //Подключение файла проверки лицензии
79
+ require( WIS_PLUGIN_DIR . '/admin/ajax/check-license.php' );
80
+ } else {
81
+ $this->front_scripts();
82
+ }
83
+
84
+ $this->global_scripts();
85
+ }
86
+
87
+ protected function init_activation() {
88
+ include_once( WIS_PLUGIN_DIR . '/admin/class-wis-activation.php' );
89
+ $this->registerActivation( 'WIS_Activation' );
90
+ }
91
+
92
+ public function load_components() {
93
+ $components = scandir( WIS_COMPONENTS_DIR );
94
+ foreach ( $components as $key => $value ) {
95
+ if ( ! in_array( $value, [ ".", ".." ] ) ) {
96
+ $comp = WIS_COMPONENTS_DIR . "/" . $value;
97
+ if ( is_dir( $comp ) ) {
98
+ if ( file_exists( $comp . "/load.php" ) ) {
99
+ require_once $comp . "/load.php";
100
+ }
101
+ }
102
+ }
103
+ }
104
+ }
105
+
106
+ /**
107
+ * Регистрирует классы страниц в плагине
108
+ */
109
+ private function register_pages() {
110
+ require_once WIS_PLUGIN_DIR . '/admin/class-page.php';
111
+
112
+ self::app()->registerPage( 'WIS_FeedsPage', WIS_PLUGIN_DIR . '/admin/pages/feeds.php' );
113
+ self::app()->registerPage( 'WIS_ProfilesPage', WIS_PLUGIN_DIR . '/admin/pages/profiles.php' );
114
+ self::app()->registerPage( 'WIS_LicensePage', WIS_PLUGIN_DIR . '/admin/pages/license.php' );
115
+ self::app()->registerPage( 'WIS_LogPage', WIS_PLUGIN_DIR . '/admin/pages/log.php' );
116
+ self::app()->registerPage( 'Manual', WIS_PLUGIN_DIR . '/admin/pages/manual.php' );
117
+
118
+ self::app()->registerPage( 'WIS_AboutPage', WIS_PLUGIN_DIR . '/admin/pages/about.php' );
119
+
120
+ }
121
+
122
+ /**
123
+ * Выполняет php сценарии, когда все Wordpress плагины будут загружены
124
+ *
125
+ * @throws \Exception
126
+ * @since 1.0.0
127
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
128
+ */
129
+ public function plugins_loaded() {
130
+ if ( is_admin() ) {
131
+ $this->register_pages();
132
+ }
133
+ }
134
+
135
+ /**
136
+ * Код для админки
137
+ */
138
+ private function admin_scripts() {
139
+ add_action( 'plugins_loaded', [ $this, 'plugins_loaded' ] );
140
+
141
+ add_action( 'admin_enqueue_scripts', [ $this, 'admin_enqueue_assets' ] );
142
+ add_action( 'admin_notices', [ $this, 'new_api_admin_notice' ] );
143
+ add_action( 'admin_notices', [ $this, 'check_token_admin_notice' ] );
144
+ }
145
+
146
+ /**
147
+ * Код для админки и фронтенда
148
+ */
149
+ private function global_scripts() {
150
+ /**
151
+ * On widgets Init register Widget
152
+ */
153
+ add_action( 'plugins_loaded', function () {
154
+ add_action( 'widgets_init', [ 'WIG_Widget', 'register_widget' ] );
155
+ add_action( 'widgets_init', [ 'WFB_Widget', 'register_widget' ] );
156
+ add_action( 'widgets_init', [ 'WYT_Widget', 'register_widget' ] );
157
+ } );
158
+ }
159
+
160
+ /**
161
+ * Код для фронтенда
162
+ */
163
+ private function front_scripts() {
164
+ add_action( 'wp_enqueue_scripts', [ $this, 'enqueue_assets' ] );
165
+ }
166
+
167
+ public function admin_enqueue_assets( $hook ) {
168
+ if ( 'widgets.php' == $hook || 'post.php' == $hook ) {
169
+ //wp_enqueue_style( 'jr-insta-admin-styles', WIS_PLUGIN_URL . '/admin/assets/css/jr-insta-admin.css', array(), WIS_PLUGIN_VERSION );
170
+ //wp_enqueue_script( 'jr-insta-admin-script', WIS_PLUGIN_URL . '/admin/assets/js/jr-insta-admin.js', array( 'jquery' ), WIS_PLUGIN_VERSION, true );
171
+ wp_enqueue_script( 'jr-tinymce-button', WIS_PLUGIN_URL . '/admin/assets/js/tinymce_button.js', [ 'jquery' ], WIS_PLUGIN_VERSION, false );
172
+
173
+ $wis_shortcodes = json_encode( $this->get_isw_widgets() );
174
+ wp_add_inline_script( 'jr-tinymce-button', "var wis_shortcodes = $wis_shortcodes;" );
175
+
176
+ /*
177
+ $account_nonce = json_encode( [ 'nonce' => wp_create_nonce( "addAccountByToken" ) ] );
178
+ $wis_nonce = json_encode( [
179
+ 'nonce' => wp_create_nonce( 'wis_nonce' ),
180
+ 'remove_account' => __( 'Are you sure want to delete this account?', 'instagram-slider-widget' ),
181
+ ] );
182
+ wp_add_inline_script( 'jr-insta-admin-script', "var add_account_nonce = $account_nonce; var wis = $wis_nonce;" );
183
+ */
184
+ }
185
+
186
+ }
187
+
188
+ public function enqueue_assets() {
189
+
190
+ }
191
+
192
+ /**
193
+ * Метод проверяет активацию премиум плагина и наличие действующего лицензионного ключа
194
+ *
195
+ * @return bool
196
+ */
197
+ public function is_premium() {
198
+ if ( $this->premium->is_active() && $this->premium->is_activate() //&& is_plugin_active( "{$this->premium->get_setting('slug')}/{$this->premium->get_setting('slug')}.php" )
199
+ ) {
200
+ return true;
201
+ } else {
202
+ return false;
203
+ }
204
+ }
205
+
206
+ /**
207
+ * Получает все виджеты этого плагина
208
+ *
209
+ * @return array
210
+ */
211
+ public function get_isw_widgets() {
212
+ $settings = WIG_Widget::app()->get_settings();
213
+ $result = [];
214
+ foreach ( $settings as $key => $widget ) {
215
+ $result[] = [
216
+ 'title' => $widget['title'],
217
+ 'id' => $key,
218
+ ];
219
+ }
220
+
221
+ return $result;
222
+ }
223
+
224
+ /**
225
+ * Выводит нотис о том, что изменилось в новой версии
226
+ *
227
+ */
228
+ public function new_api_admin_notice() {
229
+ $text = "";
230
+ $accounts = $this->getOption( WIG_PROFILES_OPTION, [] );
231
+ if ( count( $accounts ) ) {
232
+ foreach ( $accounts as $account ) {
233
+ if ( strlen( $account['token'] ) < 55 ) {
234
+ $text .= "<p><b>@" . $account['username'] . "</b></p>";
235
+ }
236
+ }
237
+ }
238
+ if ( ! empty( $text ) ) {
239
+ ?>
240
+ <div class="notice notice-info is-dismissible">
241
+ <p>
242
+ <b>Social Slider Feed:</b><br>
243
+ The plugin has moved to the new Instagram Basic Display API.<br>
244
+ To make your widgets work again, reconnect your instagram accounts in the plugin settings.
245
+ <a href="https://cm-wp.com/important-update-social-slider-widget/" class="">Read more about the
246
+ changes</a>
247
+ </p>
248
+ </div>
249
+ <?php
250
+ }
251
+ }
252
+
253
+ /**
254
+ * Выводит нотис о том, что нужно обновить токены
255
+ *
256
+ */
257
+ public function check_token_admin_notice() {
258
+ $text = "";
259
+ $accounts = $this->getOption( WIG_PROFILES_OPTION, [] );
260
+ if ( count( $accounts ) ) {
261
+ foreach ( $accounts as $account ) {
262
+ if ( strlen( $account['token'] ) < 55 ) {
263
+ $text .= "<p><b>@" . $account['username'] . "</b></p>";
264
+ }
265
+ }
266
+ }
267
+ if ( ! empty( $text ) ) {
268
+ echo '<div class="notice notice-warning">
269
+ <p><b>Social Slider Feed:</b><br>You need to reconnect this accounts in the <a href="' . admin_url( "admin.php?page=settings-wisw&tab=instagram" ) . '">plugin settings</a>' . $text . '</p>
270
+ </div>';
271
+ }
272
+ }
273
+ }
includes/class-profiles.php ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+
6
+ abstract class WIS_Profiles {
7
+ public $social;
8
+
9
+ public $page;
10
+
11
+ public $profiles_option_name;
12
+
13
+ /**
14
+ * WIS_Profiles constructor.
15
+ *
16
+ * @param $page WIS_ProfilesPage
17
+ */
18
+ public function __construct( $page ) {
19
+ $this->page = $page;
20
+ }
21
+
22
+ /**
23
+ * @return string
24
+ */
25
+ abstract public function content();
26
+
27
+ /**
28
+ * @param $social
29
+ *
30
+ * @return string
31
+ */
32
+ public function getSocialUrl() {
33
+ $args = [
34
+ 'page' => "settings-" . WIS_Plugin::app()->getPluginName(),
35
+ ];
36
+ if ( $this->social ) {
37
+ $args['tab'] = sanitize_text_field( $this->social );
38
+ }
39
+
40
+ return admin_url( "admin.php?" ) . http_build_query( $args );
41
+ }
42
+
43
+
44
+ /**
45
+ * Get count of accounts
46
+ *
47
+ * @return int
48
+ */
49
+ public function count_accounts() {
50
+ $account = WIS_Plugin::app()->getOption( $this->profiles_option_name, [] );
51
+
52
+ return count( $account );
53
+ }
54
+ }
includes/class-wis-plugin-temp.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Instagram\Includes;
4
+
5
+ // Exit if accessed directly
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ }
9
+
10
+ /*
11
+ * Temporary class to migrate to 2.0.0
12
+ * */
13
+
14
+ class WIS_Plugin {
15
+
16
+ public static function app() {
17
+ return \WIS_Plugin::app();
18
+ }
19
+
20
+ /**
21
+ * Метод проверяет активацию премиум плагина и наличие действующего лицензионного ключа
22
+ *
23
+ * @return bool
24
+ */
25
+ public function is_premium() {
26
+ if ( \WIS_Plugin::app()->premium->is_active() && \WIS_Plugin::app()->premium->is_activate() //&& is_plugin_active( "{$this->premium->get_setting('slug')}/{$this->premium->get_setting('slug')}.php" )
27
+ ) {
28
+ return true;
29
+ } else {
30
+ return false;
31
+ }
32
+ }
33
+ }
includes/class-wis-plugin.php DELETED
@@ -1,323 +0,0 @@
1
- <?php
2
-
3
- namespace Instagram\Includes;
4
-
5
- // Exit if accessed directly
6
- use WIS_InstagramSlider;
7
-
8
- if ( ! defined( 'ABSPATH' ) ) {
9
- exit;
10
- }
11
-
12
- /**
13
- * Основной класс плагина Social Slider Widget
14
- *
15
- * @author Artem Prihodko <webtemyk@yandex.ru>
16
- * @copyright (c) 2019 Webraftic Ltd
17
- * @version 1.0
18
- */
19
- class WIS_Plugin extends \Wbcr_Factory445_Plugin {
20
-
21
- /**
22
- * @see self::app()
23
- * @var \Wbcr_Factory445_Plugin
24
- */
25
- private static $app;
26
-
27
- /**
28
- * @var array Список слайдеров
29
- */
30
- public $sliders = array();
31
-
32
-
33
- /** @var \YoutubeFeed\Api\YoutubeApi $youtube_api */
34
- public $youtube_api;
35
-
36
- /**
37
- * Статический метод для быстрого доступа к интерфейсу плагина.
38
- *
39
- * Позволяет разработчику глобально получить доступ к экземпляру класса плагина в любом месте
40
- * плагина, но при этом разработчик не может вносить изменения в основной класс плагина.
41
- *
42
- * Используется для получения настроек плагина, информации о плагине, для доступа к вспомогательным
43
- * классам.
44
- *
45
- * @return \Wbcr_Factory445_Plugin
46
- */
47
- public static function app() {
48
- return self::$app;
49
- }
50
-
51
- /**
52
- * Статический метод для быстрого доступа к классу соцсети.
53
- *
54
- * @param string $class
55
- *
56
- * @return $class
57
- */
58
- public static function social( $class ) {
59
- return new $class;
60
- }
61
-
62
- /**
63
- * Конструктор
64
- *
65
- * Применяет конструктор родительского класса и записывает экземпляр текущего класса в свойство $app.
66
- * Подробнее о свойстве $app см. self::app()
67
- *
68
- * @param string $plugin_path
69
- * @param array $data
70
- *
71
- * @throws \Exception
72
- */
73
- public function __construct( $plugin_path, $data ) {
74
- parent::__construct( $plugin_path, $data );
75
-
76
- self::$app = $this;
77
-
78
- if ( is_admin() ) {
79
- // Регистрации класса активации/деактивации плагина
80
- $this->init_activation();
81
-
82
- // Инициализация скриптов для бэкенда
83
- $this->admin_scripts();
84
-
85
- //Подключение файла проверки лицензии
86
- require( WIS_PLUGIN_DIR . '/admin/ajax/check-license.php' );
87
- } else {
88
- $this->front_scripts();
89
- }
90
-
91
- $this->youtube_api = new \YoutubeFeed\Api\YoutubeApi();
92
-
93
- $this->global_scripts();
94
-
95
- add_action( 'wp_ajax_wyt_delete_account', array( $this, 'delete_feed' ) );
96
- }
97
-
98
- protected function init_activation() {
99
- include_once( WIS_PLUGIN_DIR . '/admin/class-wis-activation.php' );
100
- $this->registerActivation( 'WIS_Activation' );
101
- }
102
-
103
- /**
104
- * Регистрирует классы страниц в плагине
105
- */
106
- private function register_pages() {
107
- require_once WIS_PLUGIN_DIR . '/admin/class-wis-page.php';
108
-
109
- //$fb = new WIS_Facebook();
110
-
111
- self::app()->registerPage( 'WIS_WidgetsPage', WIS_PLUGIN_DIR . '/admin/pages/widgets.php' );
112
- self::app()->registerPage( 'WIS_SettingsPage', WIS_PLUGIN_DIR . '/admin/pages/settings.php' );
113
- self::app()->registerPage( 'WIS_AboutPage', WIS_PLUGIN_DIR . '/admin/pages/about.php' );
114
- self::app()->registerPage( 'WIS_LicensePage', WIS_PLUGIN_DIR . '/admin/pages/license.php' );
115
- self::app()->registerPage( 'WIS_ComponentsPage', WIS_PLUGIN_DIR . '/admin/pages/components.php' );
116
- self::app()->registerPage( 'Manual', WIS_PLUGIN_DIR . '/admin/pages/manual.php' );
117
-
118
- add_action('plugins_loaded', function (){
119
- if( defined('SPFD_PLUGIN_DIR')){
120
- self::app()->registerPage( 'WBCR\Shopifeed\Page\ShopifeedLicensePage', SPFD_PLUGIN_DIR . '/admin/pages/LicensePage.php' );
121
- }
122
- self::app()->registerPage( 'Licenses', WIS_PLUGIN_DIR . '/admin/pages/Licenses.php' );
123
-
124
- }, 2);
125
- }
126
-
127
- /**
128
- * Код для админки
129
- */
130
- private function admin_scripts() {
131
- // Регистрация страниц
132
- $this->register_pages();
133
-
134
- add_action( 'admin_enqueue_scripts', [ $this, 'admin_enqueue_assets' ] );
135
- add_action( 'admin_notices', [ $this, 'new_api_admin_notice' ] );
136
- add_action( 'admin_notices', [ $this, 'check_token_admin_notice' ] );
137
- }
138
-
139
- /**
140
- * Код для админки и фронтенда
141
- */
142
- private function global_scripts() {
143
-
144
- }
145
-
146
- /**
147
- * Код для фронтенда
148
- */
149
- private function front_scripts() {
150
- add_action( 'wp_enqueue_scripts', [ $this, 'enqueue_assets' ] );
151
- }
152
-
153
- public function admin_enqueue_assets( $hook_suffix ) {
154
- wp_enqueue_style( 'jr-insta-admin-styles', WIS_PLUGIN_URL . '/admin/assets/css/jr-insta-admin.css', array(), WIS_PLUGIN_VERSION );
155
- wp_enqueue_script( 'jr-insta-admin-script', WIS_PLUGIN_URL . '/admin/assets/js/jr-insta-admin.js', array( 'jquery' ), WIS_PLUGIN_VERSION, true );
156
- wp_enqueue_script( 'jr-tinymce-button', WIS_PLUGIN_URL . '/admin/assets/js/tinymce_button.js', array( 'jquery' ), WIS_PLUGIN_VERSION, false );
157
-
158
- $wis_shortcodes = json_encode($this->get_isw_widgets());
159
- wp_add_inline_script( 'jr-tinymce-button', "var wis_shortcodes = $wis_shortcodes;");
160
-
161
- $account_nonce = json_encode([ 'nonce' => wp_create_nonce( "addAccountByToken" ) ]);
162
- $wis_nonce = json_encode([
163
- 'nonce' => wp_create_nonce( 'wis_nonce' ),
164
- 'remove_account' => __( 'Are you sure want to delete this account?', 'instagram-slider-widget' ),
165
- ]);
166
- wp_add_inline_script( 'jr-insta-admin-script', "var add_account_nonce = $account_nonce; var wis = $wis_nonce;");
167
- }
168
-
169
- public function enqueue_assets() {
170
-
171
- }
172
-
173
- /**
174
- * Метод проверяет активацию премиум плагина и наличие действующего лицензионнного ключа
175
- *
176
- * @return bool
177
- */
178
- public function is_premium() {
179
- if ( $this->premium->is_active() && $this->premium->is_activate() //&& is_plugin_active( "{$this->premium->get_setting('slug')}/{$this->premium->get_setting('slug')}.php" )
180
- ) {
181
- return true;
182
- } else {
183
- return false;
184
- }
185
- }
186
-
187
- /**
188
- * Получает все виджеты этого плагина
189
- *
190
- * @return array
191
- */
192
- public function get_isw_widgets() {
193
- $settings = WIS_InstagramSlider::app()->get_settings();
194
- $result = array();
195
- foreach ( $settings as $key => $widget ) {
196
- $result[] = array(
197
- 'title' => $widget['title'],
198
- 'id' => $key,
199
- );
200
- }
201
-
202
- return $result;
203
- }
204
-
205
- /**
206
- * Выводит нотис о том, что изменилось в новой версии
207
- *
208
- */
209
- public function new_api_admin_notice() {
210
- $text = "";
211
- $accounts = $this->getOption( 'account_profiles', array() );
212
- if ( count( $accounts ) ) {
213
- foreach ( $accounts as $account ) {
214
- if ( strlen( $account['token'] ) < 55 ) {
215
- $text .= "<p><b>@" . $account['username'] . "</b></p>";
216
- }
217
- }
218
- }
219
- if ( ! empty( $text ) ) {
220
- ?>
221
- <div class="notice notice-info is-dismissible">
222
- <p>
223
- <b>Social Slider Widget:</b><br>
224
- The plugin has moved to the new Instagram Basic Display API.<br>
225
- To make your widgets work again, reconnect your instagram accounts in the plugin settings.
226
- <a href="https://cm-wp.com/important-update-social-slider-widget/" class="">Read more about the
227
- changes</a>
228
- </p>
229
- </div>
230
- <?php
231
- }
232
- }
233
-
234
- /**
235
- * Выводит нотис о том, что нужно обновить токены
236
- *
237
- */
238
- public function check_token_admin_notice() {
239
- $text = "";
240
- $accounts = $this->getOption( 'account_profiles', array() );
241
- if ( count( $accounts ) ) {
242
- foreach ( $accounts as $account ) {
243
- if ( strlen( $account['token'] ) < 55 ) {
244
- $text .= "<p><b>@" . $account['username'] . "</b></p>";
245
- }
246
- }
247
- }
248
- if ( ! empty( $text ) ) {
249
- echo '<div class="notice notice-warning">
250
- <p><b>Social Slider Widget:</b><br>You need to reconnect this accounts in the <a href="' . admin_url( "admin.php?page=settings-wisw&tab=instagram" ) . '">plugin settings</a>' . $text . '</p>
251
- </div>';
252
- }
253
- }
254
-
255
- public function update_youtube_api_key( $api_key ) {
256
- if($api_key){
257
- $this->youtube_api->setApiKey($api_key);
258
- return WIS_Plugin::app()->updateOption(WYT_API_KEY_OPTION_NAME, $api_key);
259
- }
260
- return false;
261
- }
262
-
263
- public function update_youtube_feed( $profile ) {
264
- if ( $profile ) {
265
- $pro = WIS_Plugin::app()->getOption( WYT_ACCOUNT_OPTION_NAME, [] );
266
- if ( ! is_array( $pro ) ) {
267
- $pro = [];
268
- }
269
- $pro[$profile->snippet->channelId] = $profile;
270
-
271
- return WIS_Plugin::app()->updateOption( WYT_ACCOUNT_OPTION_NAME, $pro );
272
- }
273
-
274
- return false;
275
- }
276
-
277
- /**
278
- * Ajax Call to delete account
279
- * @return void
280
- */
281
- public function delete_feed() {
282
- if ( isset( $_POST['id'] ) && ! empty( $_POST['id'] ) ) {
283
- if ( ! current_user_can( 'manage_options' ) ) {
284
- wp_die( - 1 );
285
- } else {
286
- check_ajax_referer( 'wyt_nonce', 'nonce' );
287
-
288
- $accounts = WIS_Plugin::app()->getPopulateOption( WYT_ACCOUNT_OPTION_NAME, [] );
289
- $item_id = esc_html( $_POST['id']);
290
- if ( isset( $accounts[ $item_id ] ) ) {
291
- unset( $accounts[ $item_id ] );
292
- }
293
-
294
- WIS_Plugin::app()->updatePopulateOption( WYT_ACCOUNT_OPTION_NAME, $accounts );
295
-
296
- wp_send_json_success( __( 'Feed deleted successfully', 'yft' ) );
297
- }
298
- }
299
- }
300
-
301
- /**
302
- * Get feeds or feed from database
303
- *
304
- * @param $id
305
- *
306
- * @return array
307
- */
308
- public function get_youtube_feeds( $id = 0 ) {
309
- if ( $id ) {
310
- $feeds = $this->getOption( WYT_ACCOUNT_OPTION_NAME, [] );
311
- if ( is_array( $feeds ) && ! empty( $feeds ) ) {
312
- foreach ( $feeds as $feed ) {
313
- if ( isset( $feed->channelId ) && $feed->channelId == $id ) {
314
- return $feed;
315
- }
316
- }
317
- }
318
- }
319
-
320
- return $this->getOption( WYT_ACCOUNT_OPTION_NAME, [] );
321
- }
322
-
323
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/class-wis_facebook_slider.php DELETED
@@ -1,490 +0,0 @@
1
- <?php
2
-
3
- use Instagram\Includes\WIS_Plugin;
4
-
5
- require_once WIS_PLUGIN_DIR . '/includes/socials/class.wis_facebook.php';
6
-
7
- /**
8
- * WIS_FacebookSlider Class
9
- */
10
- class WIS_FacebookSlider extends WP_Widget {
11
-
12
- private static $app;
13
-
14
- /**
15
- * @var WIS_Plugin
16
- */
17
- public $WIS;
18
-
19
- /**
20
- * @var WIS_Facebook
21
- */
22
- public $FACEBOOK;
23
-
24
- /**
25
- * @var array
26
- */
27
- public $sliders;
28
-
29
- /**
30
- * @var array
31
- */
32
- public $options_linkto;
33
-
34
- public static function app() {
35
- return self::$app;
36
- }
37
-
38
- /**
39
- * Initialize the plugin by registering widget and loading public scripts
40
- *
41
- */
42
- public function __construct() {
43
- self::$app = $this;
44
-
45
- // Widget ID and Class Setup
46
- parent::__construct( 'wis_facebook_slider', __( 'Social Slider - Facebook', 'instagram-slider-widget' ), array(
47
- 'classname' => 'jr-insta-slider',
48
- 'description' => __( 'A widget that displays a slider with Facebook posts ', 'instagram-slider-widget' )
49
- ) );
50
-
51
- $this->WIS = WIS_Plugin::app();
52
- $this->FACEBOOK = WIS_Plugin::social( 'WIS_Facebook' );
53
-
54
- $this->sliders = array(
55
- "slider" => 'Slider - Normal',
56
- );
57
- $this->options_linkto = array(
58
- "image_link" => 'Facebook post',
59
- "image_url" => 'Facebook page',
60
- "none" => 'None'
61
- );
62
-
63
- /**
64
- * Фильтр для добавления слайдеров
65
- */
66
- $this->sliders = apply_filters( 'wis/facebook/sliders', $this->sliders );
67
-
68
- /**
69
- * Фильтр для добавления popup
70
- */
71
- $this->options_linkto = apply_filters( 'wis/options/link_to', $this->options_linkto );
72
-
73
- // Shortcode
74
- add_shortcode( 'jr_facebook', array( $this, 'shortcode' ) );
75
-
76
- // Instgram Action to display images
77
- add_action( 'jr_facebook', array( $this, 'facebook_images' ) );
78
-
79
- // Enqueue Plugin Styles and scripts
80
- add_action( 'wp_enqueue_scripts', array( $this, 'public_enqueue' ) );
81
-
82
- // Enqueue Plugin Styles and scripts for admin pages
83
- add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue' ) );
84
- }
85
-
86
- /**
87
- * Register widget on widgets init
88
- */
89
- public static function register_widget() {
90
- register_widget( __CLASS__ );
91
- register_sidebar( array(
92
- 'name' => __( 'Social Slider - Shortcode Generator', 'instagram-slider-widget' ),
93
- 'id' => 'jr-insta-shortcodes',
94
- 'description' => __( "1. Drag Social Slider Widget here. 2. Fill in the fields and hit save. 3. Copy the shortocde generated at the bottom of the widget form and use it on posts or pages.", 'instagram-slider-widget' )
95
- ) );
96
- }
97
-
98
- /**
99
- * Enqueue public-facing Scripts and style sheet.
100
- */
101
- public function public_enqueue() {
102
-
103
- wp_enqueue_style( WIS_Plugin::app()->getPrefix() . 'font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );
104
-
105
- wp_enqueue_style( WIS_Plugin::app()->getPrefix() . 'fb-slider', WIS_PLUGIN_URL . '/assets/css/instag-slider.css', array(), WIS_Plugin::app()->getPluginVersion() );
106
- wp_enqueue_style( WIS_Plugin::app()->getPrefix() . 'fb-header', WIS_PLUGIN_URL . '/assets/css/wis-header.css', array(), WIS_Plugin::app()->getPluginVersion() );
107
-
108
- wp_enqueue_script( WIS_Plugin::app()->getPrefix() . 'jquery-pllexi-slider', WIS_PLUGIN_URL . '/assets/js/jquery.flexslider-min.js', array( 'jquery' ), WIS_Plugin::app()->getPluginVersion(), false );
109
- //wp_enqueue_script( WIS_Plugin::app()->getPrefix() . 'jr-fb', WIS_PLUGIN_URL.'/assets/js/jr-insta.js', array( ), WIS_Plugin::app()->getPluginVersion(), false );
110
- }
111
-
112
- /**
113
- * Enqueue admin side scripts and styles
114
- *
115
- * @param string $hook
116
- */
117
- public function admin_enqueue( $hook ) {
118
-
119
- if ( 'widgets.php' != $hook ) {
120
- return;
121
- }
122
- wp_enqueue_style( WIS_Plugin::app()->getPrefix() . 'fb-admin-styles', WIS_PLUGIN_DIR . '/admin/assets/css/jr-insta-admin.css', array(), WIS_Plugin::app()->getPluginVersion() );
123
- wp_enqueue_script( WIS_Plugin::app()->getPrefix() . 'fb-admin-script', WIS_PLUGIN_DIR . '/admin/assets/js/jr-insta-admin.js', array( 'jquery' ), WIS_Plugin::app()->getPluginVersion(), true );
124
-
125
- }
126
-
127
- /**
128
- * The Public view of the Widget
129
- *
130
- */
131
- public function widget( $args, $instance ) {
132
-
133
- //Our variables from the widget settings.
134
- $title = apply_filters( 'widget_title', $instance['title'] );
135
-
136
- echo $args['before_widget'];
137
-
138
- // Display the widget title
139
- if ( $title ) {
140
- echo $args['before_title'] . $title . $args['after_title'];
141
- }
142
-
143
- do_action( 'jr_instagram', $instance );
144
-
145
- echo $args['after_widget'];
146
- }
147
-
148
- /**
149
- * Update the widget settings
150
- *
151
- * @param array $new_instance New instance values
152
- * @param array $instance Old instance values
153
- *
154
- * @return array
155
- */
156
- public function update( $new_instance, $instance ) {
157
-
158
- $instance['title'] = strip_tags( isset( $new_instance['title'] ) ? $new_instance['title'] : null );
159
- $instance['account'] = isset( $new_instance['account'] ) ? $new_instance['account'] : null;
160
- $instance['images_number'] = isset( $new_instance['images_number'] ) ? $new_instance['images_number'] : 20;
161
- $instance['refresh_hour'] = isset( $new_instance['refresh_hour'] ) ? $new_instance['refresh_hour'] : 5;
162
- $instance['template'] = isset( $new_instance['template'] ) ? $new_instance['template'] : 'slider';
163
- $instance['images_link'] = isset( $new_instance['images_link'] ) ? $new_instance['images_link'] : 'image_link';
164
- $instance['orderby'] = isset( $new_instance['orderby'] ) ? $new_instance['orderby'] : 'rand';
165
-
166
- return $instance;
167
- }
168
-
169
-
170
- /**
171
- * Widget Settings Form
172
- *
173
- */
174
- public function form( $instance ) {
175
-
176
- $accounts = WIS_Plugin::app()->getOption( WIS_FACEBOOK_ACCOUNT_PROFILES_OPTION_NAME, array() );
177
- $sliders = $this->sliders;
178
- $options_linkto = $this->options_linkto;
179
-
180
- $defaults = array(
181
- 'title' => __( 'Facebook feed', 'instagram-slider-widget' ),
182
- 'account' => '',
183
- 'images_number' => 20,
184
- 'refresh_hour' => 5,
185
- 'template' => 'slider',
186
- 'images_link' => 'image_link',
187
- 'orderby' => 'date-DESC',
188
- );
189
-
190
- $instance = wp_parse_args( (array) $instance, $defaults );
191
-
192
- ?>
193
- <div class="jr-container">
194
- <p>
195
- <label for="<?php echo $this->get_field_id( 'title' ); ?>"><strong><?php _e( 'Title:', 'instagram-slider-widget' ); ?></strong></label>
196
- <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
197
- name="<?php echo $this->get_field_name( 'title' ); ?>"
198
- value="<?php echo $instance['title']; ?>"/>
199
- </p>
200
- <p>
201
- <label for="<?php echo $this->get_field_id( 'account' ); ?>"><strong><?php _e( 'Search Facebook for:', 'instagram-slider-widget' ); ?></strong></label>
202
- <span class="jr-search-for-container">
203
- <?php
204
- if ( count( $accounts ) ) {
205
- ?>
206
-
207
- <select id="<?php echo $this->get_field_id( 'account' ); ?>" class="widefat"
208
- name="<?php echo $this->get_field_name( 'account' ); ?>"><?php
209
- foreach ( $accounts as $acc ) {
210
- $selected = $instance['account'] == $acc['username'] ? "selected='selected'" : "";
211
- echo "<option value='{$acc['username']}' {$selected}>{$acc['username']}</option>";
212
- }
213
- ?>
214
- </select><?php
215
- } else {
216
- echo "<a href='" . admin_url( 'admin.php?page=settings-wisw&tab=facebook' ) . "'>" . __( 'Add account in settings', 'instagram-slider-widget' ) . "</a>";
217
- }
218
- ?>
219
- </span>
220
- </p>
221
- <p id="img_to_show">
222
- <label for="<?php echo $this->get_field_id( 'images_number' ); ?>"><strong><?php _e( 'Count of images to show:', 'instagram-slider-widget' ); ?></strong>
223
- <input class="small-text" type="number" min="1" max=""
224
- id="<?php echo $this->get_field_id( 'images_number' ); ?>"
225
- name="<?php echo $this->get_field_name( 'images_number' ); ?>"
226
- value="<?php echo $instance['images_number']; ?>"/>
227
- <span class="jr-description">
228
- <?php if ( ! $this->WIS->is_premium() ) {
229
- _e( 'Maximum 20 images in free version.', 'instagram-slider-widget' );
230
- echo " " . sprintf( __( "More in <a href='%s'>PRO version</a>", 'instagram-slider-widget' ), $this->WIS->get_support()->get_pricing_url( true, "wis_widget_settings" ) );
231
- }
232
- ?>
233
- </span>
234
- </label>
235
- </p>
236
- <p>
237
- <label for="<?php echo $this->get_field_id( 'refresh_hour' ); ?>"><strong><?php _e( 'Check for new images every:', 'instagram-slider-widget' ); ?></strong>
238
- <input class="small-text" type="number" min="1" max="200"
239
- id="<?php echo $this->get_field_id( 'refresh_hour' ); ?>"
240
- name="<?php echo $this->get_field_name( 'refresh_hour' ); ?>"
241
- value="<?php echo $instance['refresh_hour']; ?>"/>
242
- <span><?php _e( 'hours', 'instagram-slider-widget' ); ?></span>
243
- </label>
244
- </p>
245
- <p>
246
- <label for="<?php echo $this->get_field_id( 'template' ); ?>"><strong><?php _e( 'Template', 'instagram-slider-widget' ); ?></strong>
247
- <select class="widefat" name="<?php echo $this->get_field_name( 'template' ); ?>"
248
- id="<?php echo $this->get_field_id( 'template' ); ?>">
249
- <?php
250
- if ( count( $sliders ) ) {
251
- foreach ( $sliders as $key => $slider ) {
252
- $selected = ( $instance['template'] == $key ) ? "selected='selected'" : '';
253
- echo "<option value='{$key}' {$selected}>{$slider}</option>\n";
254
- }
255
- }
256
- /*if(!$this->WIS->is_premium())
257
- {
258
- ?>
259
- <optgroup label="Available in PRO">
260
- <option value='1' disabled="disabled">Slick</option>
261
- <option value='2' disabled="disabled">Masonry</option>
262
- <option value='3' disabled="disabled">Highlight</option>
263
- </optgroup>
264
- <?php
265
- }*/ ?>
266
- </select>
267
- </label>
268
- </p>
269
- <p>
270
- <label for="<?php echo $this->get_field_id( 'orderby' ); ?>"><strong><?php _e( 'Order by', 'instagram-slider-widget' ); ?></strong>
271
- <select class="widefat" name="<?php echo $this->get_field_name( 'orderby' ); ?>"
272
- id="<?php echo $this->get_field_id( 'orderby' ); ?>">
273
- <option value="date-ASC" <?php selected( $instance['orderby'], 'date-ASC', true ); ?>><?php _e( 'Date - Ascending', 'instagram-slider-widget' ); ?></option>
274
- <option value="date-DESC" <?php selected( $instance['orderby'], 'date-DESC', true ); ?>><?php _e( 'Date - Descending', 'instagram-slider-widget' ); ?></option>
275
- <option value="popular-ASC" <?php selected( $instance['orderby'], 'popular-ASC', true ); ?>><?php _e( 'Popularity - Ascending', 'instagram-slider-widget' ); ?></option>
276
- <option value="popular-DESC" <?php selected( $instance['orderby'], 'popular-DESC', true ); ?>><?php _e( 'Popularity - Descending', 'instagram-slider-widget' ); ?></option>
277
- <option value="rand" <?php selected( $instance['orderby'], 'rand', true ); ?>><?php _e( 'Random', 'instagram-slider-widget' ); ?></option>
278
- </select>
279
- </label>
280
- </p>
281
- <p>
282
- <label for="<?php echo $this->get_field_id( 'images_link' ); ?>"><strong><?php _e( 'Link to', 'instagram-slider-widget' ); ?></strong>
283
- <select class="widefat" name="<?php echo $this->get_field_name( 'images_link' ); ?>"
284
- id="<?php echo $this->get_field_id( 'images_link' ); ?>">
285
- <?php
286
- if ( count( $options_linkto ) ) {
287
- foreach ( $options_linkto as $key => $option ) {
288
- $selected = selected( $instance['images_link'], $key, false );
289
- echo "<option value='{$key}' {$selected}>{$option}</option>\n";
290
- }
291
- }
292
- if ( ! $this->WIS->is_premium() ) {
293
- ?>
294
- <optgroup label="Available in PRO">
295
- <option value='1' disabled="disabled">Pop Up</option>
296
- </optgroup>
297
- <?php
298
- }
299
- ?>
300
- </select>
301
- </label>
302
- </p>
303
- <p>
304
- <label for="jr_insta_shortcode"><?php _e( 'Shortcode of this Widget:', 'instagram-slider-widget' ); ?></label>
305
- <?php
306
- $widget_id = preg_replace( '/[^0-9]/', '', $this->id );
307
- if ( $widget_id != '' ) {
308
- ?>
309
- <input id="jr_insta_shortcode" onclick="this.setSelectionRange(0, this.value.length)" type="text"
310
- class="widefat" value="[jr_facebook id=&quot;<?php echo $widget_id ?>&quot;]"
311
- readonly="readonly" style="border:none; color:black; font-family:monospace;">
312
- <?php
313
- } else {
314
- ?>
315
- <input id="jr_insta_shortcode" type="text" class="widefat"
316
- value="<?php echo __( 'Click Save and refresh page', 'instagram-slider-widget' ); ?>"
317
- readonly="readonly" style="border:none; color:black; font-family:monospace;">
318
- <?php
319
- }
320
- ?>
321
- <span class="jr-description"><?php _e( 'Use this shortcode in any page or post to display images with this widget configuration!', 'instagram-slider-widget' ) ?></span>
322
- </p>
323
- </div>
324
- <?php
325
- }
326
-
327
- /**
328
- * Selected array function echoes selected if in array
329
- *
330
- * @param array $haystack The array to search in
331
- * @param string $current The string value to search in array;
332
- *
333
- */
334
- public function selected( $haystack, $current ) {
335
-
336
- if ( is_array( $haystack ) && in_array( $current, $haystack ) ) {
337
- selected( 1, 1, true );
338
- }
339
- }
340
-
341
-
342
- /**
343
- * Add shorcode function
344
- *
345
- * @param array $atts shortcode attributes
346
- *
347
- * @return mixed
348
- */
349
- public function shortcode( $atts ) {
350
-
351
- $atts = shortcode_atts( array( 'id' => '' ), $atts, 'jr_facebook' );
352
- $args = get_option( 'widget_wis_facebook_slider' );
353
- if ( isset( $args[ $atts['id'] ] ) ) {
354
- $args[ $atts['id'] ]['widget_id'] = $atts['id'];
355
-
356
- return $this->display_images( $args[ $atts['id'] ] );
357
- }
358
-
359
- return "";
360
- }
361
-
362
- /**
363
- * Echoes the Display Instagram Images method
364
- *
365
- * @param array $args
366
- *
367
- * @return void
368
- */
369
- public function facebook_images( $args ) {
370
- echo $this->display_images( $args );
371
- }
372
-
373
- /**
374
- * Cron Trigger Function
375
- *
376
- * @param [type] $username [description]
377
- * @param [type] $refresh_hour [description]
378
- * @param [type] $images [description]
379
- */
380
- public function jr_cron_trigger( $username, $refresh_hour, $images ) {
381
- $search_for = array();
382
- $search_for['username'] = $username;
383
- $this->instagram_data( $search_for, $refresh_hour, $images, true );
384
- }
385
-
386
- /**
387
- * Runs the query for images and returns the html
388
- *
389
- * @param array $args
390
- *
391
- * @return string
392
- */
393
- private function display_images( $args ) {
394
- $account = isset( $args['account'] ) && ! empty( $args['account'] ) ? $args['account'] : false;
395
- $images_number = isset( $args['images_number'] ) ? absint( $args['images_number'] ) : 20;
396
- $refresh_hour = isset( $args['refresh_hour'] ) ? absint( $args['refresh_hour'] ) : 5;
397
- $template = isset( $args['template'] ) ? $args['template'] : 'slider';
398
- $orderby = isset( $args['orderby'] ) ? $args['orderby'] : 'rand';
399
- $images_link = isset( $args['images_link'] ) ? $args['images_link'] : 'image_url';
400
- $widget_id = isset( $args['widget_id'] ) ? $args['widget_id'] : preg_replace( '/[^0-9]/', '', $this->id );
401
-
402
- $images_data = $this->FACEBOOK->get_data( $account, $refresh_hour, $images_number );
403
- $account_data = $this->FACEBOOK->getAccountByName( $account );
404
-
405
- if ( is_array( $images_data ) && ! empty( $images_data ) ) {
406
- if ( isset( $images_data['error'] ) ) {
407
- return $images_data['error'];
408
- }
409
-
410
- if ( $orderby == 'rand' ) {
411
- shuffle( $images_data );
412
- } else {
413
- $orderby = explode( '-', $orderby );
414
- $func = $orderby[0] == 'date' ? 'sort_timestamp_' . $orderby[1] : 'sort_popularity_' . $orderby[1];
415
- usort( $images_data, array( $this, $func ) );
416
- }
417
-
418
- $template_args = array(
419
- 'account' => $account_data,
420
- 'template' => $template,
421
- 'images_link' => $images_link,
422
- 'posts' => $images_data,
423
- );
424
-
425
- $output = "";
426
- switch ( $template ) {
427
- case 'slider':
428
- $output = $this->render_layout_template( 'facebook_slider_template', $template_args );
429
- break;
430
- }
431
- } else {
432
- $output = __( 'No images found!', 'instagram-slider-widget' );
433
- }
434
-
435
- return $output;
436
-
437
- }
438
-
439
- /**
440
- * Method renders layout template
441
- *
442
- * @param string $template_name Template name without ".php"
443
- *
444
- * @param array $args Template arguments
445
- *
446
- * @return false|string
447
- */
448
- private function render_layout_template( $template_name, $args ) {
449
- $path = WIS_PLUGIN_DIR . "/html_templates/$template_name.php";
450
- if ( file_exists( $path ) ) {
451
- ob_start();
452
- include $path;
453
-
454
- return ob_get_clean();
455
- } else {
456
- return 'This template does not exist!';
457
- }
458
- }
459
-
460
- /**
461
- * Sort Function for timestamp Ascending
462
- */
463
- public function sort_timestamp_ASC( $a, $b ) {
464
- return $a['timestamp'] > $b['timestamp'];
465
- }
466
-
467
- /**
468
- * Sort Function for timestamp Descending
469
- */
470
- public function sort_timestamp_DESC( $a, $b ) {
471
- return $a['timestamp'] < $b['timestamp'];
472
- }
473
-
474
- /**
475
- * Sort Function for popularity Ascending
476
- */
477
- public function sort_popularity_ASC( $a, $b ) {
478
- return $a['popularity'] > $b['popularity'];
479
- }
480
-
481
- /**
482
- * Sort Function for popularity Descending
483
- */
484
- public function sort_popularity_DESC( $a, $b ) {
485
- return $a['popularity'] < $b['popularity'];
486
- }
487
-
488
- }
489
-
490
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/class-wis_instagram_slider.php DELETED
@@ -1,2427 +0,0 @@
1
- <?php
2
-
3
- use Instagram\Includes\WIS_Plugin;
4
-
5
- /**
6
- * WIS_InstagramSlider Class
7
- */
8
- class WIS_InstagramSlider extends WP_Widget {
9
-
10
- private static $app;
11
-
12
- const USERNAME_URL = 'https://www.instagram.com/{username}/';
13
- const TAG_URL = 'https://www.instagram.com/explore/tags/{tag}/?__a=1';
14
- //const USERS_SELF_URL = 'https://api.instagram.com/v1/users/self/';
15
- //const USERS_SELF_MEDIA_URL = 'https://api.instagram.com/v1/users/self/media/recent/';
16
- const USERS_SELF_URL = 'https://graph.instagram.com/me';
17
- const USERS_SELF_MEDIA_URL = 'https://graph.instagram.com/';
18
-
19
- const USERS_SELF_URL_NEW = 'https://graph.facebook.com/';
20
-
21
- /**
22
- * @var WIS_Plugin
23
- */
24
- public $WIS;
25
-
26
- /**
27
- * @var array
28
- */
29
- public $sliders;
30
-
31
- /**
32
- * @var array
33
- */
34
- public $options_linkto;
35
-
36
- /** @var WYT_Widget $wyt_widget */
37
- public $wyt_widget;
38
-
39
- public static function app() {
40
- return self::$app;
41
- }
42
-
43
- /**
44
- * Initialize the plugin by registering widget and loading public scripts
45
- *
46
- */
47
- public function __construct() {
48
- self::$app = $this;
49
-
50
- // Widget ID and Class Setup
51
- parent::__construct( 'jr_insta_slider', __( 'Social Slider - Instagram', 'instagram-slider-widget' ), array(
52
- 'classname' => 'jr-insta-slider',
53
- 'description' => __( 'A widget that displays a slider with instagram images ', 'instagram-slider-widget' )
54
- ) );
55
-
56
- $this->WIS = WIS_Plugin::app();
57
- $this->sliders = array(
58
- "slider" => 'Slider - Normal',
59
- "slider-overlay" => 'Slider - Overlay Text',
60
- "thumbs" => 'Thumbnails',
61
- "thumbs-no-border" => 'Thumbnails - Without Border',
62
- );
63
- $this->options_linkto = array(
64
- "image_link" => 'Instagram Image',
65
- "image_url" => 'Image URL',
66
- "custom_url" => 'Custom Link',
67
- "none" => 'None'
68
- );
69
-
70
- /**
71
- * Фильтр для добавления слайдеров
72
- */
73
- $this->sliders = apply_filters( 'wis/sliders', $this->sliders );
74
-
75
- /**
76
- * Фильтр для добавления popup
77
- */
78
- $this->options_linkto = apply_filters( 'wis/options/link_to', $this->options_linkto );
79
-
80
- // Shortcode
81
- add_shortcode( 'jr_instagram', array( $this, 'shortcode' ) );
82
-
83
- // Instgram Action to display images
84
- add_action( 'jr_instagram', array( $this, 'instagram_images' ) );
85
-
86
- // Enqueue Plugin Styles and scripts
87
- add_action( 'wp_enqueue_scripts', function (){
88
- wp_enqueue_script('jquery');
89
- });
90
- add_action( 'wp_enqueue_scripts', array($this, 'widget_scripts_register'));
91
-
92
- // Enqueue Plugin Styles and scripts for admin pages
93
- add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue' ) );
94
-
95
- // Ajax action to unblock images from widget
96
- add_action( 'wp_ajax_jr_delete_insta_dupes', array( $this, 'delete_dupes' ) );
97
-
98
- // Add new attachment field desctiptions
99
- add_filter( 'attachment_fields_to_edit', array( $this, 'insta_attachment_fields' ), 10, 2 );
100
-
101
- // Add action for single cron events
102
- add_action( 'jr_insta_cron', array( $this, 'jr_cron_trigger' ), 10, 3 );
103
-
104
- add_action( 'wp_ajax_wis_add_account_by_token', array( $this, 'add_account_by_token' ) );
105
-
106
- add_action( 'wp_ajax_wis_delete_account', array( $this, 'delete_account' ) );
107
-
108
- }
109
-
110
- /**
111
- * Register widget on widgets init
112
- */
113
- public static function register_widget() {
114
- register_widget( __CLASS__ );
115
- register_sidebar( array(
116
- 'name' => __( 'Social Slider - Shortcode Generator', 'instagram-slider-widget' ),
117
- 'id' => 'jr-insta-shortcodes',
118
- 'description' => __( "1. Drag Social Slider Widget here. 2. Fill in the fields and hit save. 3. Copy the shortocde generated at the bottom of the widget form and use it on posts or pages.", 'instagram-slider-widget' )
119
- ) );
120
-
121
- register_sidebar( array(
122
- 'name' => __( 'Youtube Widget - Shortcode Generator', 'instagram-slider-widget' ),
123
- 'id' => 'wyoutube-shortcodes',
124
- 'description' => __( "1. Drag Youtube Widget here. 2. Fill in the fields and hit save. 3. Copy the shortocde generated at the bottom of the widget form and use it on posts or pages.", 'instagram-slider-widget' )
125
- ) );
126
- }
127
-
128
- /**
129
- * Enqueue public-facing Scripts and style sheet.
130
- */
131
- public function widget_scripts_register() {
132
-
133
- wp_register_style( 'jr-insta-styles', WIS_PLUGIN_URL . '/assets/css/jr-insta.css', array(), WIS_PLUGIN_VERSION );
134
-
135
- wp_register_style( WIS_Plugin::app()->getPrefix() . 'font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );
136
-
137
- wp_register_style( WIS_Plugin::app()->getPrefix() . 'instag-slider', WIS_PLUGIN_URL . '/assets/css/instag-slider.css', array(), WIS_Plugin::app()->getPluginVersion() );
138
- wp_register_script( WIS_Plugin::app()->getPrefix() . 'jquery-pllexi-slider', WIS_PLUGIN_URL . '/assets/js/jquery.flexslider-min.js', array( 'jquery' ), WIS_Plugin::app()->getPluginVersion(), false );
139
- //wp_enqueue_script( WIS_Plugin::app()->getPrefix() . 'jr-insta', WIS_PLUGIN_URL.'/assets/js/jr-insta.js', array( ), WIS_Plugin::app()->getPluginVersion(), false );
140
- wp_register_style( WIS_Plugin::app()->getPrefix() . 'wis-header', WIS_PLUGIN_URL . '/assets/css/wis-header.css', array(), WIS_Plugin::app()->getPluginVersion() );
141
- }
142
-
143
- /**
144
- * Enqueue public-facing Scripts and style sheet.
145
- */
146
- public function widget_scripts_enqueue() {
147
-
148
- wp_enqueue_style( 'jr-insta-styles');
149
- wp_enqueue_style( WIS_Plugin::app()->getPrefix() . 'font-awesome');
150
- wp_enqueue_style( WIS_Plugin::app()->getPrefix() . 'instag-slider');
151
- wp_enqueue_style( WIS_Plugin::app()->getPrefix() . 'wis-header');
152
-
153
- $ajax = json_encode([
154
- 'url' => admin_url( 'admin-ajax.php' ),
155
- 'nonce' => wp_create_nonce( "addAccountByToken" )
156
- ]);
157
- wp_add_inline_script( WIS_Plugin::app()->getPrefix() . 'jr-insta', "var ajax = $ajax;");
158
-
159
- wp_enqueue_script( WIS_Plugin::app()->getPrefix() . 'jquery-pllexi-slider');
160
- }
161
-
162
-
163
- /**
164
- * @param $widget_name
165
- *
166
- * @return bool
167
- */
168
- private function has_widget($widget_name){
169
- $places = get_option('sidebars_widgets');
170
- unset($places['wp_inactive_widgets']);
171
- unset($places['wyoutube-shortcodes']);
172
- unset($places['jr-insta-shortcodes']);
173
- unset($places['array_version']);
174
-
175
- foreach ($places as $place){
176
- foreach ($place as $key => $place_widget_name){
177
- if(mb_stripos($place_widget_name, $widget_name) !== false){
178
- return true;
179
- }
180
- }
181
- }
182
- return false;
183
- }
184
-
185
- /**
186
- * Enqueue admin side scripts and styles
187
- *
188
- * @param string $hook
189
- */
190
- public function admin_enqueue( $hook ) {
191
-
192
- if ( 'widgets.php' != $hook ) {
193
- return;
194
- }
195
- wp_enqueue_style( 'jr-insta-admin-styles', WIS_PLUGIN_DIR . '/admin/assets/css/jr-insta-admin.css', array(), WIS_Plugin::app()->getPluginVersion() );
196
- wp_enqueue_script( 'jr-insta-admin-script', WIS_PLUGIN_DIR . '/admin/assets/js/jr-insta-admin.js', array( 'jquery' ), WIS_Plugin::app()->getPluginVersion(), true );
197
-
198
- }
199
-
200
- /**
201
- * The Public view of the Widget
202
- *
203
- */
204
- public function widget( $args, $instance ) {
205
-
206
- //Our variables from the widget settings.
207
- $title = apply_filters( 'widget_title', $instance['title'] );
208
-
209
- echo $args['before_widget'];
210
-
211
- // Display the widget title
212
- if ( $title ) {
213
- echo $args['before_title'] . $title . $args['after_title'];
214
- }
215
-
216
- do_action( 'jr_instagram', $instance );
217
-
218
- echo $args['after_widget'];
219
- }
220
-
221
- /**
222
- * Update the widget settings
223
- *
224
- * @param array $new_instance New instance values
225
- * @param array $instance Old instance values
226
- *
227
- * @return array
228
- */
229
- public function update( $new_instance, $instance ) {
230
-
231
- $instance['title'] = strip_tags( isset( $new_instance['title'] ) ? $new_instance['title'] : null );
232
- $instance['account'] = isset( $new_instance['account'] ) && ! empty( $new_instance['account'] ) ? $new_instance['account'] : false;
233
- $instance['account_business'] = isset( $new_instance['account_business'] ) && ! empty( $new_instance['account_business'] ) ? $new_instance['account_business'] : false;
234
- $instance['search_for'] = isset( $new_instance['search_for'] ) && ! empty( $new_instance['search_for'] ) ? $new_instance['search_for'] : 'username';
235
- $instance['username'] = isset( $new_instance['username'] ) && ! empty( $new_instance['username'] ) ? str_replace( '@', '', $new_instance['username'] ) : false;
236
- $instance['hashtag'] = isset( $new_instance['hashtag'] ) && ! empty( $new_instance['hashtag'] ) ? str_replace( '#', '', $new_instance['hashtag'] ) : false;
237
- $instance['blocked_users'] = isset( $new_instance['blocked_users'] ) && ! empty( $new_instance['blocked_users'] ) ? $new_instance['blocked_users'] : false;
238
- $instance['attachment'] = isset( $new_instance['attachment'] ) ? true : false;
239
- $instance['custom_url'] = isset( $new_instance['custom_url'] ) ? $new_instance['custom_url'] : '';
240
- $instance['refresh_hour'] = isset( $new_instance['refresh_hour'] ) ? absint( $new_instance['refresh_hour'] ) : 5;
241
- $instance['image_size'] = isset( $new_instance['image_size'] ) ? $new_instance['image_size'] : 'standard';
242
- $instance['image_link_rel'] = isset( $new_instance['image_link_rel'] ) ? $new_instance['image_link_rel'] : '';
243
- $instance['no_pin'] = isset( $new_instance['no_pin'] ) ? $new_instance['no_pin'] : 0;
244
- $instance['image_link_class'] = isset( $new_instance['image_link_class'] ) ? $new_instance['image_link_class'] : '';
245
- $instance['widget_id'] = isset( $new_instance['widget_id'] ) ? $new_instance['widget_id'] : preg_replace( '/[^0-9]/', '', $this->id );
246
-
247
- $instance['template'] = isset( $new_instance['template'] ) ? $new_instance['template'] : 'slider';
248
- $instance['images_number'] = isset( $new_instance['images_number'] ) ? absint( $new_instance['images_number'] ) : 20;
249
- $instance['columns'] = isset( $new_instance['columns'] ) ? absint( $new_instance['columns'] ) : 4;
250
- $instance['shopifeed_phone'] = isset( $new_instance['shopifeed_phone'] ) ? $new_instance['shopifeed_phone'] : '';
251
- $instance['shopifeed_color'] = isset( $new_instance['shopifeed_color'] ) ? $new_instance['shopifeed_color'] : "#DA004A";
252
- $instance['shopifeed_columns'] = isset( $new_instance['shopifeed_columns'] ) ? $new_instance['shopifeed_columns'] : 3;
253
- $instance['controls'] = isset( $new_instance['controls'] ) ? $new_instance['controls'] : 'prev_next';
254
- $instance['animation'] = isset( $new_instance['animation'] ) ? $new_instance['animation'] : 'slide';
255
- $instance['slidespeed'] = isset( $new_instance['slidespeed'] ) ? $new_instance['slidespeed'] : 7000;
256
- $instance['description'] = isset( $new_instance['description'] ) ? $new_instance['description'] : array();
257
- $instance['caption_words'] = isset( $new_instance['caption_words'] ) ? $new_instance['caption_words'] : 20;
258
- $instance['enable_control_buttons'] = isset( $new_instance['enable_control_buttons'] ) ? $new_instance['enable_control_buttons'] : 0;
259
- $instance['show_feed_header'] = isset( $new_instance['show_feed_header'] ) ? $new_instance['show_feed_header'] : 0;
260
- $instance['enable_stories'] = isset( $new_instance['enable_stories'] ) ? $new_instance['enable_stories'] : 0;
261
- $instance['keep_ratio'] = isset( $new_instance['keep_ratio'] ) ? $new_instance['keep_ratio'] : 0;
262
- $instance['slick_img_size'] = isset( $new_instance['slick_img_size'] ) ? absint( $new_instance['slick_img_size'] ) : 300;
263
- $instance['slick_slides_to_show'] = isset( $new_instance['slick_slides_to_show'] ) ? $new_instance['slick_slides_to_show'] : 3;
264
- $instance['slick_slides_padding'] = isset( $new_instance['slick_slides_padding'] ) ? $new_instance['slick_slides_padding'] : 0;
265
- $instance['gutter'] = isset( $new_instance['gutter'] ) ? $new_instance['gutter'] : 0;
266
- $instance['masonry_image_width'] = isset( $new_instance['masonry_image_width'] ) ? $new_instance['masonry_image_width'] : 200;
267
- $instance['highlight_offset'] = isset( $new_instance['highlight_offset'] ) ? $new_instance['highlight_offset'] : 1;
268
- $instance['highlight_pattern'] = isset( $new_instance['highlight_pattern'] ) ? $new_instance['highlight_pattern'] : 6;
269
- $instance['enable_ad'] = isset( $new_instance['enable_ad'] ) ? $new_instance['enable_ad'] : 0;
270
- $instance['enable_icons'] = isset( $new_instance['enable_icons'] ) ? $new_instance['enable_icons'] : 0;
271
- $instance['orderby'] = isset( $new_instance['orderby'] ) ? $new_instance['orderby'] : 'rand';
272
- $instance['images_link'] = isset( $new_instance['images_link'] ) ? $new_instance['images_link'] : 'image_url';
273
- $instance['blocked_words'] = isset( $new_instance['blocked_words'] ) && ! empty( $new_instance['blocked_words'] ) ? $new_instance['blocked_words'] : false;
274
- $instance['allowed_words'] = isset( $new_instance['allowed_words'] ) && ! empty( $new_instance['allowed_words'] ) ? $new_instance['allowed_words'] : false;
275
- $instance['powered_by_link'] = isset( $new_instance['support_author'] );
276
-
277
- $instance['m_template'] = isset( $new_instance['m_template'] ) ? $new_instance['m_template'] : (isset( $new_instance['template'] ) ? $new_instance['template'] : 'slider') ;
278
- $instance['m_images_number'] = isset( $new_instance['m_images_number'] ) ? absint( $new_instance['m_images_number'] ) : (isset( $new_instance['images_number'] ) ? absint( $new_instance['images_number'] ) : 20) ;
279
- $instance['m_columns'] = isset( $new_instance['m_columns'] ) ? absint( $new_instance['m_columns'] ) : (isset( $new_instance['columns'] ) ? absint( $new_instance['columns'] ) : 4) ;
280
- $instance['m_shopifeed_phone'] = isset( $new_instance['m_shopifeed_phone'] ) ? $new_instance['m_shopifeed_phone'] : (isset( $new_instance['shopifeed_phone'] ) ? $new_instance['shopifeed_phone'] : '') ;
281
- $instance['m_shopifeed_color'] = isset( $new_instance['m_shopifeed_color'] ) ? $new_instance['m_shopifeed_color'] : (isset( $new_instance['shopifeed_color'] ) ? $new_instance['shopifeed_color'] : "#DA004A") ;
282
- $instance['m_shopifeed_columns'] = isset( $new_instance['m_shopifeed_columns'] ) ? $new_instance['m_shopifeed_columns'] : (isset( $new_instance['shopifeed_columns'] ) ? $new_instance['shopifeed_columns'] : 3) ;
283
- $instance['m_controls'] = isset( $new_instance['m_controls'] ) ? $new_instance['m_controls'] : (isset( $new_instance['controls'] ) ? $new_instance['controls'] : 'prev_next') ;
284
- $instance['m_animation'] = isset( $new_instance['m_animation'] ) ? $new_instance['m_animation'] : (isset( $new_instance['animation'] ) ? $new_instance['animation'] : 'slide') ;
285
- $instance['m_slidespeed'] = isset( $new_instance['m_slidespeed'] ) ? $new_instance['m_slidespeed'] : (isset( $new_instance['slidespeed'] ) ? $new_instance['slidespeed'] : 7000) ;
286
- $instance['m_description'] = isset( $new_instance['m_description'] ) ? $new_instance['m_description'] : (isset( $new_instance['description'] ) ? $new_instance['description'] : array()) ;
287
- $instance['m_caption_words'] = isset( $new_instance['m_caption_words'] ) ? $new_instance['m_caption_words'] : (isset( $new_instance['caption_words'] ) ? $new_instance['caption_words'] : 20) ;
288
- $instance['m_enable_control_buttons'] = isset( $new_instance['m_enable_control_buttons'] ) ? $new_instance['m_enable_control_buttons'] : (isset( $new_instance['enable_control_buttons'] ) ? $new_instance['enable_control_buttons'] : 0) ;
289
- $instance['m_show_feed_header'] = isset( $new_instance['m_show_feed_header'] ) ? $new_instance['m_show_feed_header'] : (isset( $new_instance['show_feed_header'] ) ? $new_instance['show_feed_header'] : 0) ;
290
- $instance['m_enable_stories'] = isset( $new_instance['m_enable_stories'] ) ? $new_instance['m_enable_stories'] : (isset( $new_instance['enable_stories'] ) ? $new_instance['enable_stories'] : 0) ;
291
- $instance['m_keep_ratio'] = isset( $new_instance['m_keep_ratio'] ) ? $new_instance['m_keep_ratio'] : (isset( $new_instance['keep_ratio'] ) ? $new_instance['keep_ratio'] : 0) ;
292
- $instance['m_slick_img_size'] = isset( $new_instance['m_slick_img_size'] ) ? absint( $new_instance['m_slick_img_size'] ) : (isset( $new_instance['slick_img_size'] ) ? absint( $new_instance['slick_img_size'] ) : 300) ;
293
- $instance['m_slick_slides_to_show'] = isset( $new_instance['m_slick_slides_to_show'] ) ? $new_instance['m_slick_slides_to_show'] : (isset( $new_instance['slick_slides_to_show'] ) ? $new_instance['slick_slides_to_show'] : 3) ;
294
- $instance['m_slick_slides_padding'] = isset( $new_instance['m_slick_slides_padding'] ) ? $new_instance['m_slick_slides_padding'] : (isset( $new_instance['slick_slides_padding'] ) ? $new_instance['slick_slides_padding'] : 0) ;
295
- $instance['m_gutter'] = isset( $new_instance['m_gutter'] ) ? $new_instance['m_gutter'] : (isset( $new_instance['gutter'] ) ? $new_instance['gutter'] : 0) ;
296
- $instance['m_masonry_image_width'] = isset( $new_instance['m_masonry_image_width'] ) ? $new_instance['m_masonry_image_width'] : (isset( $new_instance['masonry_image_width'] ) ? $new_instance['masonry_image_width'] : 200) ;
297
- $instance['m_highlight_offset'] = isset( $new_instance['m_highlight_offset'] ) ? $new_instance['m_highlight_offset'] : (isset( $new_instance['highlight_offset'] ) ? $new_instance['highlight_offset'] : 1) ;
298
- $instance['m_highlight_pattern'] = isset( $new_instance['m_highlight_pattern'] ) ? $new_instance['m_highlight_pattern'] : (isset( $new_instance['highlight_pattern'] ) ? $new_instance['highlight_pattern'] : 6) ;
299
- $instance['m_enable_ad'] = isset( $new_instance['m_enable_ad'] ) ? $new_instance['m_enable_ad'] : (isset( $new_instance['enable_ad'] ) ? $new_instance['enable_ad'] : 0) ;
300
- $instance['m_enable_icons'] = isset( $new_instance['m_enable_icons'] ) ? $new_instance['m_enable_icons'] : (isset( $new_instance['enable_icons'] ) ? $new_instance['enable_icons'] : 0) ;
301
- $instance['m_orderby'] = isset( $new_instance['m_orderby'] ) ? $new_instance['m_orderby'] : (isset( $new_instance['orderby'] ) ? $new_instance['orderby'] : 'rand') ;
302
- $instance['m_images_link'] = isset( $new_instance['m_images_link'] ) ? $new_instance['m_images_link'] : (isset( $new_instance['images_link'] ) ? $new_instance['images_link'] : 'image_url') ; 'image_url';
303
- $instance['m_blocked_words'] = isset( $new_instance['m_blocked_words'] ) && ! empty( $new_instance['m_blocked_words'] ) ? $new_instance['m_blocked_words'] : (isset( $new_instance['blocked_words'] ) && ! empty( $new_instance['blocked_words'] ) ? $new_instance['blocked_words'] : false) ;
304
- $instance['m_allowed_words'] = isset( $new_instance['m_allowed_words'] ) && ! empty( $new_instance['m_allowed_words'] ) ? $new_instance['m_allowed_words'] : (isset( $new_instance['allowed_words'] ) && ! empty( $new_instance['allowed_words'] ) ? $new_instance['allowed_words'] : false) ;
305
- $instance['m_powered_by_link'] = isset( $new_instance['m_support_author'] ) ? true : isset( $new_instance['support_author'] );
306
-
307
- return $instance;
308
- }
309
-
310
-
311
- /**
312
- * Widget Settings Form
313
- *
314
- */
315
- public function form( $instance ) {
316
-
317
- $accounts = WIS_Plugin::app()->getPopulateOption( 'account_profiles', array() );
318
- $accounts_business = WIS_Plugin::app()->getPopulateOption( 'account_profiles_new', array() );
319
- if ( ! is_array( $accounts ) ) {
320
- $accounts = array();
321
- }
322
- if ( ! is_array( $accounts_business ) ) {
323
- $accounts_business = array();
324
- }
325
- $sliders = $this->sliders;
326
- $options_linkto = $this->options_linkto;
327
-
328
- if ( count( $accounts ) ) {
329
- $s_for = 'account';
330
- } else if ( count( $accounts_business ) ) {
331
- $s_for = 'account_business';
332
- } else {
333
- $s_for = 'username';
334
- }
335
- $defaults = array(
336
- 'title' => __( 'Social Slider', 'instagram-slider-widget' ),
337
- 'search_for' => $s_for,
338
- 'account' => '',
339
- 'account_business' => '',
340
- 'username' => '',
341
- 'hashtag' => '',
342
- 'blocked_users' => '',
343
- 'blocked_words' => '',
344
- 'allowed_words' => '',
345
- 'attachment' => 0,
346
- 'template' => 'slider',
347
- 'images_link' => 'image_link',
348
- 'custom_url' => '',
349
- 'orderby' => 'rand',
350
- 'images_number' => 20,
351
- 'columns' => 4,
352
- 'refresh_hour' => 5,
353
- 'slick_img_size' => 300,
354
- 'image_size' => 'standard',
355
- 'image_link_rel' => '',
356
- 'image_link_class' => '',
357
- 'no_pin' => 0,
358
- 'controls' => 'prev_next',
359
- 'animation' => 'slide',
360
- 'caption_words' => 20,
361
- 'shopifeed_phone' => '',
362
- 'shopifeed_color' => "#DA004A",
363
- 'shopifeed_columns' => 3,
364
- 'slidespeed' => 7000,
365
- 'description' => array( 'username', 'time', 'caption' ),
366
- 'support_author' => 0,
367
- 'gutter' => 0,
368
- 'masonry_image_width' => 200,
369
- 'slick_slides_to_show' => 3,
370
- 'enable_control_buttons' => 0,
371
- 'keep_ratio' => 0,
372
- 'enable_ad' => 0,
373
- 'enable_icons' => 0,
374
- 'slick_slides_padding' => 0,
375
- 'show_feed_header' => 1,
376
- 'enable_stories' => 1,
377
- 'highlight_offset' => 1,
378
- 'highlight_pattern' => 6,
379
-
380
- 'm_template' => 'slider',
381
- 'm_images_number' => 20,
382
- 'm_columns' => 4,
383
- 'm_shopifeed_phone' => '',
384
- 'm_shopifeed_color' => "#DA004A",
385
- 'm_shopifeed_columns' => 3,
386
- 'm_controls' => 'prev_next',
387
- 'm_animation' => 'slide',
388
- 'm_slidespeed' => 7000,
389
- 'm_description' => array( 'username', 'time', 'caption' ),
390
- 'm_caption_words' => 20,
391
- 'm_enable_control_buttons' => 0,
392
- 'm_show_feed_header' => 1,
393
- 'm_enable_stories' => 1,
394
- 'm_keep_ratio' => 0,
395
- 'm_slick_img_size' => 300,
396
- 'm_slick_slides_to_show' => 3,
397
- 'm_slick_slides_padding' => 0,
398
- 'm_gutter' => 0,
399
- 'm_masonry_image_width' => 200,
400
- 'm_highlight_offset' => 1,
401
- 'm_highlight_pattern' => 6,
402
- 'm_enable_ad' => 0,
403
- 'm_enable_icons' => 0,
404
- 'm_orderby' => 'rand',
405
- 'm_images_link' => 'image_link',
406
- 'm_blocked_words' => '',
407
- 'm_allowed_words' => '',
408
- 'm_powered_by_link' => '',
409
- );
410
-
411
- $instance = wp_parse_args( (array) $instance, $defaults );
412
-
413
- $args = array(
414
- 'instance' => $instance,
415
- 'accounts' => $accounts,
416
- 'accounts_business' => $accounts_business,
417
- 'sliders' => $sliders,
418
- 'options_linkto' => $options_linkto,
419
-
420
- );
421
-
422
- echo $this->render_layout_template('widget_settings_template', $args);
423
- }
424
-
425
- /**
426
- * Selected array function echoes selected if in array
427
- *
428
- * @param array $haystack The array to search in
429
- * @param string $current The string value to search in array;
430
- *
431
- */
432
- public function selected( $haystack, $current ) {
433
-
434
- if ( is_array( $haystack ) && in_array( $current, $haystack ) ) {
435
- selected( 1, 1, true );
436
- }
437
- }
438
-
439
-
440
- /**
441
- * Add shorcode function
442
- *
443
- * @param array $atts shortcode attributes
444
- *
445
- * @return mixed
446
- */
447
- public function shortcode( $atts ) {
448
-
449
- $atts = shortcode_atts( array( 'id' => '' ), $atts, 'jr_instagram' );
450
- $args = get_option( 'widget_jr_insta_slider' );
451
- if ( isset( $args[ $atts['id'] ] ) ) {
452
- $args[ $atts['id'] ]['widget_id'] = $atts['id'];
453
-
454
- return $this->display_images( $args[ $atts['id'] ] );
455
- }
456
- }
457
-
458
- /**
459
- * Echoes the Display Instagram Images method
460
- *
461
- * @param array $args
462
- *
463
- * @return void
464
- */
465
- public function instagram_images( $args ) {
466
- echo $this->display_images( $args );
467
- }
468
-
469
- /**
470
- * Cron Trigger Function
471
- *
472
- * @param string $search_for
473
- * @param int $cache_hours
474
- * @param int $nr_images
475
- * @param bool $attachment
476
- */
477
- public function jr_cron_trigger( $username, $refresh_hour, $images ) {
478
- $search_for = array();
479
- $search_for['username'] = $username;
480
- $this->instagram_data( $search_for, $refresh_hour, $images, true );
481
- }
482
-
483
- /**
484
- * Runs the query for images and returns the html
485
- *
486
- * @param array $args
487
- *
488
- * @return string
489
- */
490
- private function display_images( $args ) {
491
- $this->widget_scripts_enqueue();
492
- $account = isset( $args['account'] ) && ! empty( $args['account'] ) ? $args['account'] : false;
493
- $account_business = isset( $args['account_business'] ) && ! empty( $args['account_business'] ) ? $args['account_business'] : false;
494
- $username = isset( $args['username'] ) && ! empty( $args['username'] ) ? str_replace( '@', '', $args['username'] ) : false;
495
- $hashtag = isset( $args['hashtag'] ) && ! empty( $args['hashtag'] ) ? str_replace( '#', '', $args['hashtag'] ) : false;
496
- $blocked_users = isset( $args['blocked_users'] ) && ! empty( $args['blocked_users'] ) ? $args['blocked_users'] : false;
497
- $attachment = isset( $args['attachment'] ) ? true : false;
498
- $custom_url = isset( $args['custom_url'] ) ? $args['custom_url'] : '';
499
- $refresh_hour = isset( $args['refresh_hour'] ) ? absint( $args['refresh_hour'] ) : 5;
500
- $image_size = isset( $args['image_size'] ) ? $args['image_size'] : 'standard';
501
- $image_link_rel = isset( $args['image_link_rel'] ) ? $args['image_link_rel'] : '';
502
- $no_pin = isset( $args['no_pin'] ) ? $args['no_pin'] : 0;
503
- $image_link_class = isset( $args['image_link_class'] ) ? $args['image_link_class'] : '';
504
- $widget_id = isset( $args['widget_id'] ) ? $args['widget_id'] : preg_replace( '/[^0-9]/', '', $this->id );
505
-
506
- if(!self::isMobile()){
507
- $template = isset( $args['template'] ) ? $args['template'] : 'slider';
508
- $images_number = isset( $args['images_number'] ) ? absint( $args['images_number'] ) : 20;
509
- $columns = isset( $args['columns'] ) ? absint( $args['columns'] ) : 4;
510
- $shopifeed_phone = isset( $args['shopifeed_phone'] ) ? $args['shopifeed_phone'] : '';
511
- $shopifeed_color = isset( $args['shopifeed_color'] ) ? $args['shopifeed_color'] : "#DA004A";
512
- $shopifeed_columns = isset( $args['shopifeed_columns'] ) ? $args['shopifeed_columns'] : 3;
513
- $controls = isset( $args['controls'] ) ? $args['controls'] : 'prev_next';
514
- $animation = isset( $args['animation'] ) ? $args['animation'] : 'slide';
515
- $slidespeed = isset( $args['slidespeed'] ) ? $args['slidespeed'] : 7000;
516
- $description = isset( $args['description'] ) ? $args['description'] : array();
517
- $caption_words = isset( $args['caption_words'] ) ? $args['caption_words'] : 20;
518
- $enable_control_buttons = isset( $args['enable_control_buttons'] ) ? $args['enable_control_buttons'] : 0;
519
- $show_feed_header = isset( $args['show_feed_header'] ) ? $args['show_feed_header'] : 0;
520
- $enable_stories = isset( $args['enable_stories'] ) ? $args['enable_stories'] : 0;
521
- $keep_ratio = isset( $args['keep_ratio'] ) ? $args['keep_ratio'] : 0;
522
- $slick_img_size = isset( $args['slick_img_size'] ) ? absint( $args['slick_img_size'] ) : 300;
523
- $slick_slides_to_show = isset( $args['slick_slides_to_show'] ) ? $args['slick_slides_to_show'] : 3;
524
- $slick_slides_padding = isset( $args['slick_slides_padding'] ) ? $args['slick_slides_padding'] : 0;
525
- $gutter = isset( $args['gutter'] ) ? $args['gutter'] : 0;
526
- $masonry_image_width = isset( $args['masonry_image_width'] ) ? $args['masonry_image_width'] : 200;
527
- $highlight_offset = isset( $args['highlight_offset'] ) ? $args['highlight_offset'] : 1;
528
- $highlight_pattern = isset( $args['highlight_pattern'] ) ? $args['highlight_pattern'] : 6;
529
- $enable_ad = isset( $args['enable_ad'] ) ? $args['enable_ad'] : 0;
530
- $enable_icons = isset( $args['enable_icons'] ) ? $args['enable_icons'] : 0;
531
- $orderby = isset( $args['orderby'] ) ? $args['orderby'] : 'rand';
532
- $images_link = isset( $args['images_link'] ) ? $args['images_link'] : 'image_url';
533
- $blocked_words = isset( $args['blocked_words'] ) && ! empty( $args['blocked_words'] ) ? $args['blocked_words'] : false;
534
- $allowed_words = isset( $args['allowed_words'] ) && ! empty( $args['allowed_words'] ) ? $args['allowed_words'] : false;
535
- $powered_by_link = isset( $args['support_author'] ) ? true : false;
536
- } else {
537
- $template = isset( $args['m_template'] ) ? $args['m_template'] : (isset( $args['template'] ) ? $args['template'] : 'slider');
538
- $images_number = isset( $args['m_images_number'] ) ? absint( $args['m_images_number'] ) : (isset( $args['images_number'] ) ? $args['images_number'] : 20);
539
- $columns = isset( $args['m_columns'] ) ? absint( $args['m_columns'] ) : (isset( $args['columns'] ) ? $args['columns'] : 4);
540
- $shopifeed_phone = isset( $args['m_shopifeed_phone'] ) ? $args['m_shopifeed_phone'] : (isset( $args['shopifeed_phone'] ) ? $args['shopifeed_phone'] : '');
541
- $shopifeed_color = isset( $args['m_shopifeed_color'] ) ? $args['m_shopifeed_color'] : (isset( $args['shopifeed_color'] ) ? $args['shopifeed_color'] : "#DA004A");
542
- $shopifeed_columns = isset( $args['m_shopifeed_columns'] ) ? $args['m_shopifeed_columns'] : (isset( $args['shopifeed_columns'] ) ? $args['shopifeed_columns'] : 3);
543
- $controls = isset( $args['m_controls'] ) ? $args['m_controls'] : (isset( $args['controls'] ) ? $args['controls'] : 'prev_next');
544
- $animation = isset( $args['m_animation'] ) ? $args['m_animation'] : (isset( $args['animation'] ) ? $args['animation'] : 'slide');
545
- $slidespeed = isset( $args['m_slidespeed'] ) ? $args['m_slidespeed'] : (isset( $args['slidespeed'] ) ? $args['slidespeed'] : 7000);
546
- $description = isset( $args['m_description'] ) ? $args['m_description'] : (isset( $args['description'] ) ? $args['description'] : array());
547
- $caption_words = isset( $args['m_caption_words'] ) ? $args['m_caption_words'] : (isset( $args['caption_words'] ) ? $args['caption_words'] : 20);
548
- $enable_control_buttons = isset( $args['m_enable_control_buttons'] ) ? $args['m_enable_control_buttons'] : (isset( $args['enable_control_buttons'] ) ? $args['enable_control_buttons'] : 0);
549
- $show_feed_header = isset( $args['m_show_feed_header'] ) ? $args['m_show_feed_header'] : (isset( $args['show_feed_header'] ) ? $args['show_feed_header'] : 0);
550
- $enable_stories = isset( $args['m_enable_stories'] ) ? $args['m_enable_stories'] : (isset( $args['enable_stories'] ) ? $args['enable_stories'] : 0);
551
- $keep_ratio = isset( $args['m_keep_ratio'] ) ? $args['m_keep_ratio'] : (isset( $args['keep_ratio'] ) ? $args['keep_ratio'] : 0);
552
- $slick_img_size = isset( $args['m_slick_img_size'] ) ? absint( $args['m_slick_img_size'] ) : (isset( $args['slick_img_size'] ) ? $args['slick_img_size'] : 300);
553
- $slick_slides_to_show = isset( $args['m_slick_slides_to_show'] ) ? $args['m_slick_slides_to_show'] : (isset( $args['slick_slides_to_show'] ) ? $args['slick_slides_to_show'] : 3);
554
- $slick_slides_padding = isset( $args['m_slick_slides_padding'] ) ? $args['m_slick_slides_padding'] : (isset( $args['slick_slides_padding'] ) ? $args['slick_slides_padding'] : 0);
555
- $gutter = isset( $args['m_gutter'] ) ? $args['m_gutter'] : (isset( $args['gutter'] ) ? $args['gutter'] : 0);
556
- $masonry_image_width = isset( $args['m_masonry_image_width'] ) ? $args['m_masonry_image_width'] : (isset( $args['masonry_image_width'] ) ? $args['masonry_image_width'] : 200);
557
- $highlight_offset = isset( $args['m_highlight_offset'] ) ? $args['m_highlight_offset'] : (isset( $args['highlight_offset'] ) ? $args['highlight_offset'] : 1);
558
- $highlight_pattern = isset( $args['m_highlight_pattern'] ) ? $args['m_highlight_pattern'] : (isset( $args['highlight_pattern'] ) ? $args['highlight_pattern'] : 6);
559
- $enable_ad = isset( $args['m_enable_ad'] ) ? $args['m_enable_ad'] : (isset( $args['enable_ad'] ) ? $args['enable_ad'] : 0);
560
- $enable_icons = isset( $args['m_enable_icons'] ) ? $args['m_enable_icons'] : (isset( $args['enable_icons'] ) ? $args['enable_icons'] : 0);
561
- $orderby = isset( $args['m_orderby'] ) ? $args['m_orderby'] : (isset( $args['orderby'] ) ? $args['orderby'] : 'rand');
562
- $images_link = isset( $args['m_images_link'] ) ? $args['m_images_link'] : (isset( $args['images_link'] ) ? $args['images_link'] : 'image_url');
563
- $blocked_words = isset( $args['m_blocked_words'] ) && ! empty( $args['m_blocked_words'] ) ? $args['m_blocked_words'] : (isset( $args['images_link'] ) ? $args['images_link'] : false);
564
- $allowed_words = isset( $args['m_allowed_words'] ) && ! empty( $args['m_allowed_words'] ) ? $args['m_allowed_words'] : (isset( $args['blocked_words'] ) ? $args['blocked_words'] : false);
565
- $powered_by_link = isset( $args['m_support_author'] ) ? true : (isset( $args['support_author'] ) ? $args['support_author'] : false);
566
- }
567
-
568
- if ( ! empty( $description ) && ! is_array( $description ) ) {
569
- $description = explode( ',', $description );
570
- }
571
-
572
- if ( isset ( $args['search_for'] ) && $args['search_for'] == 'hashtag' ) {
573
- $search = 'hashtag';
574
- $search_for['hashtag'] = $hashtag;
575
- $search_for['blocked_users'] = $blocked_users;
576
- $search_for['blocked_words'] = $blocked_words;
577
- $search_for['allowed_words'] = $allowed_words;
578
- } elseif ( isset ( $args['search_for'] ) && $args['search_for'] == 'account' ) {
579
- $search = 'account';
580
- $search_for['account'] = $account;
581
- $search_for['blocked_words'] = $blocked_words;
582
- $search_for['allowed_words'] = $allowed_words;
583
- } elseif ( isset ( $args['search_for'] ) && $args['search_for'] == 'account_business' ) {
584
- $search = 'account_business';
585
- $search_for['account_business'] = $account_business;
586
- $search_for['blocked_words'] = $blocked_words;
587
- $search_for['allowed_words'] = $allowed_words;
588
- } else {
589
- $search = 'user';
590
- $search_for['username'] = $username;
591
- $search_for['allowed_words'] = $allowed_words;
592
- $search_for['blocked_words'] = $blocked_words;
593
- }
594
-
595
- if ( $refresh_hour == 0 ) {
596
- $refresh_hour = 5;
597
- }
598
-
599
- $template_args = array(
600
- 'search_for' => $search,
601
- 'attachment' => $attachment,
602
- 'image_size' => $image_size,
603
- 'link_rel' => $image_link_rel,
604
- 'link_class' => $image_link_class,
605
- 'no_pin' => $no_pin,
606
- 'caption_words' => $caption_words,
607
- 'masonry_image_width' => $masonry_image_width,
608
- 'enable_control_buttons' => $enable_control_buttons,
609
- 'keep_ratio' => $keep_ratio,
610
- 'enable_ad' => $enable_ad,
611
- 'enable_icons' => $enable_icons,
612
- 'slick_slides_padding' => $slick_slides_padding,
613
- 'slick_slides_to_show' => $slick_slides_to_show,
614
- 'highlight_offset' => $highlight_offset,
615
- 'highlight_pattern' => $highlight_pattern,
616
-
617
- );
618
-
619
- $images_div_class = 'jr-insta-thumb';
620
- $ul_class = ( $template == 'thumbs-no-border' ) ? 'thumbnails no-border jr_col_' . $columns : 'thumbnails jr_col_' . $columns;
621
- $slider_script = '';
622
-
623
- //enqueue widget scripts and styles
624
- //$this->widget_scripts_enqueue();
625
-
626
- if ( $template != 'thumbs' && $template != 'thumbs-no-border' ) {
627
- $template_args['description'] = $description;
628
- $direction_nav = ( $controls == 'prev_next' ) ? 'true' : 'false';
629
- $control_nav = ( $controls == 'numberless' ) ? 'true' : 'false';
630
- $ul_class = 'slides';
631
-
632
- if ( $template == 'slider' ) {
633
- $images_div_class = 'pllexislider pllexislider-normal instaslider-nr-' . $widget_id;
634
- $slider_script = "<script type='text/javascript'>" . "\n" . " jQuery(document).ready(function($) {" . "\n" . " $('.instaslider-nr-{$widget_id}').pllexislider({" . "\n" . " animation: '{$animation}'," . "\n" . " slideshowSpeed: {$slidespeed}," . "\n" . " directionNav: {$direction_nav}," . "\n" . " controlNav: {$control_nav}," . "\n" . " prevText: ''," . "\n" . " nextText: ''," . "\n" . " });" . "\n" . " });" . "\n" . "</script>" . "\n";
635
- }
636
-
637
- if ( $template == 'slider-overlay' ) {
638
- $images_div_class = 'pllexislider pllexislider-overlay instaslider-nr-' . $widget_id;
639
- $slider_script = "<script type='text/javascript'>" . "\n" . " jQuery(document).ready(function($) {" . "\n" . " $('.instaslider-nr-{$widget_id}').pllexislider({" . "\n" . " animation: '{$animation}'," . "\n" . " slideshowSpeed: {$slidespeed}," . "\n" . " directionNav: {$direction_nav}," . "\n" . " controlNav: {$control_nav}," . "\n" . " prevText: ''," . "\n" . " nextText: ''," . "\n" . " start: function(slider){" . "\n" . " slider.hover(" . "\n" . " function () {" . "\n" . " slider.find('.pllex-control-nav, .pllex-direction-nav').stop(true,true).fadeIn();" . "\n" . " slider.find('.jr-insta-datacontainer').fadeIn();" . "\n" . " }," . "\n" . " function () {" . "\n" . " slider.find('.pllex-control-nav, .pllex-direction-nav').stop(true,true).fadeOut();" . "\n" . " slider.find('.jr-insta-datacontainer').fadeOut();" . "\n" . " }" . "\n" . " );" . "\n" . " }" . "\n" . " });" . "\n" . " });" . "\n" . "</script>" . "\n";
640
- }
641
-
642
- if ( $template == 'slick_slider' || $template == 'masonry' || $template == 'highlight' || $template == 'showcase') {
643
- //return $this->pro_display_images($args);
644
- if(defined('WISP_PLUGIN_ACTIVE') && WISP_PLUGIN_ACTIVE == true){
645
- return apply_filters( 'wis/pro/display_images', "", $args, $this );
646
- } else {
647
- $images_div_class = 'pllexislider pllexislider-normal instaslider-nr-' . $widget_id;
648
- $slider_script = "<script type='text/javascript'>" . "\n" . " jQuery(document).ready(function($) {" . "\n" . " $('.instaslider-nr-{$widget_id}').pllexislider({" . "\n" . " animation: '{$animation}'," . "\n" . " slideshowSpeed: {$slidespeed}," . "\n" . " directionNav: {$direction_nav}," . "\n" . " controlNav: {$control_nav}," . "\n" . " prevText: ''," . "\n" . " nextText: ''," . "\n" . " });" . "\n" . " });" . "\n" . "</script>" . "\n";
649
- $template = 'slider';
650
- }
651
- }
652
- }
653
-
654
- //$account = $accounts[$images_data[0]['username']];
655
- $images_div = '';
656
- $images_ul = "<ul class='no-bullet {$ul_class}' id='wis-slides'>\n";
657
-
658
- $output = '';
659
- $output .= __( 'No images found! <br> Try some other hashtag or username', 'instagram-slider-widget' );
660
-
661
- if ( ( $search == 'user' && $attachment && false ) ) {
662
-
663
- if ( ! wp_next_scheduled( 'jr_insta_cron', array(
664
- $search_for['username'],
665
- $refresh_hour,
666
- $images_number
667
- ) ) ) {
668
- wp_schedule_single_event( time(), 'jr_insta_cron', array(
669
- $search_for['username'],
670
- $refresh_hour,
671
- $images_number
672
- ) );
673
- }
674
-
675
- $opt_name = 'jr_insta_' . md5( $search . '_' . $search_for['username'] );
676
- $attachment_ids = (array) get_option( $opt_name );
677
-
678
- $query_args = array(
679
- 'post_type' => 'attachment',
680
- 'post_status' => 'inherit',
681
- 'post_mime_type' => 'image',
682
- 'posts_per_page' => $images_number,
683
- 'no_found_rows' => true
684
- );
685
-
686
- if ( $orderby != 'rand' ) {
687
- $orderby = explode( '-', $orderby );
688
- $meta_key = $orderby[0] == 'date' ? 'jr_insta_timestamp' : 'jr_insta_popularity';
689
-
690
- $query_args['meta_key'] = $meta_key;
691
- $query_args['orderby'] = 'meta_value_num';
692
- $query_args['order'] = $orderby[1];
693
- }
694
-
695
- if ( isset( $attachment_ids['saved_images'] ) && ! empty( $attachment_ids['saved_images'] ) ) {
696
-
697
- $query_args['post__in'] = $attachment_ids['saved_images'];
698
-
699
- } else {
700
-
701
- $query_args['meta_query'] = array(
702
- array(
703
- 'key' => 'jr_insta_username',
704
- 'value' => $username,
705
- 'compare' => '='
706
- )
707
- );
708
- }
709
-
710
- $instagram_images = new WP_Query( $query_args );
711
-
712
- //if ( $instagram_images->have_posts() ) {
713
- if ( false ) {
714
-
715
- $output = $slider_script . $images_div . $images_ul;
716
-
717
- while ( $instagram_images->have_posts() ) : $instagram_images->the_post();
718
-
719
- $id = get_the_id();
720
-
721
- if ( 'image_link' == $images_link ) {
722
- $template_args['link_to'] = get_post_meta( $id, 'jr_insta_link', true );
723
- } elseif ( 'user_url' == $images_link ) {
724
- $template_args['link_to'] = 'https://www.instagram.com/' . $username . '/';
725
- } elseif ( 'image_url' == $images_link ) {
726
- $template_args['link_to'] = wp_get_attachment_url( $id );
727
- } elseif ( 'attachment' == $images_link ) {
728
- $template_args['link_to'] = get_permalink( $id );
729
- } elseif ( 'custom_url' == $images_link ) {
730
- $template_args['link_to'] = $custom_url;
731
- } elseif( 'none' == $images_link ) {
732
- $template_args['link_to'] = 'none';
733
- }
734
-
735
- $image_thumb_url = get_post_meta( $id, 'jr_insta_sizes', true );
736
- $template_args['image'] = $image_thumb_url[ $image_size ];
737
-
738
- $output .= $this->get_template( $template, $template_args );
739
-
740
- endwhile;
741
-
742
- $output .= "</ul>\n</div>";
743
-
744
- } else {
745
-
746
- $images_data = $this->instagram_data( $search_for, $refresh_hour, $images_number, false );
747
-
748
- if ( is_array( $images_data ) && ! empty( $images_data ) ) {
749
- if ( isset( $images_data['error'] ) ) {
750
- return $images_data['error'];
751
- }
752
-
753
- if ( $orderby != 'rand' ) {
754
-
755
- $func = $orderby[0] == 'date' ? 'sort_timestamp_' . $orderby[1] : 'sort_popularity_' . $orderby[1];
756
-
757
- usort( $images_data, array( $this, $func ) );
758
-
759
- } else {
760
-
761
- shuffle( $images_data );
762
- }
763
-
764
- $output = $slider_script . $images_div . $images_ul;
765
-
766
- foreach ( $images_data as $image_data ) {
767
-
768
- if ( 'image_link' == $images_link ) {
769
- $template_args['link_to'] = $image_data['link'];
770
- } elseif ( 'user_url' == $images_link ) {
771
- $template_args['link_to'] = 'https://www.instagram.com/' . $username . '/';
772
- } elseif ( 'image_url' == $images_link ) {
773
- $template_args['link_to'] = $image_data['url'];
774
- } elseif ( 'custom_url' == $images_link ) {
775
- $template_args['link_to'] = $custom_url;
776
- } elseif( 'none' == $images_link ) {
777
- $template_args['link_to'] = 'none';
778
- }
779
-
780
- $template_args['type'] = $image_data['type'];
781
- $template_args['image'] = $image_data['image'];
782
- $template_args['caption'] = $image_data['caption'];
783
- $template_args['timestamp'] = $image_data['timestamp'];
784
- $template_args['username'] = isset( $image_data['username'] ) ? $image_data['username'] : '';
785
- $template_args['attachment'] = false;
786
-
787
- $output .= $this->get_template( $template, $template_args );
788
- }
789
-
790
- $output .= "</ul>\n</div>";
791
- }
792
-
793
- }
794
-
795
- wp_reset_postdata();
796
-
797
- } else {
798
- $is_business = ( $search == 'account_business' );
799
- if ( $is_business ) {
800
- $accounts = WIS_Plugin::app()->getOption( 'account_profiles_new' );
801
- } else {
802
- $accounts = WIS_Plugin::app()->getOption( 'account_profiles' );
803
- }
804
- $images_data = $this->instagram_data( $search_for, $refresh_hour, $images_number, false );
805
-
806
- /*
807
- * Песочница
808
- */
809
- if ( isset( $_GET['access_token'] ) && isset( $_GET['id'] ) ) {
810
- if ( $is_business ) {
811
- if ( isset( $_COOKIE['wis-demo-account-data'] ) ) {
812
- $account = json_decode( stripslashes( $_COOKIE['wis-demo-account-data'] ), true );
813
- }
814
- } else {
815
- $args = array(
816
- 'fields' => 'id,media_count,username',
817
- 'access_token' => $_GET['access_token'],
818
- );
819
-
820
- $url = self::USERS_SELF_URL;
821
- $url = add_query_arg( $args, $url );
822
- $response = wp_remote_get( $url );
823
- if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
824
- $user = json_decode( wp_remote_retrieve_body( $response ), true );
825
- $user['token'] = $_GET['access_token'];
826
- $account = $user;
827
- }
828
- }
829
- } // конец песочницы
830
- else {
831
- if ( $search !== 'hashtag' && $search !== 'user' ) {
832
- $account = $accounts[ $images_data[0]['username'] ];
833
- }
834
- }
835
-
836
- $images_div = '';
837
- if ( $account ) {
838
- $account_data = $account;
839
- } else if ( $search !== 'hashtag' ) {
840
- $data = WIS_Plugin::app()->getOption( 'profiles_data_by_username' );
841
- $data = $data['entry_data']['ProfilePage']['0']['graphql']['user'];
842
- $account_data = array(
843
- 'username' => $data['username'],
844
- 'profile_picture' => $data['profile_pic_url'],
845
- 'counts' => array(
846
- 'media' => $data['edge_owner_to_timeline_media']['count'],
847
- 'followed_by' => $data['edge_followed_by']['count']
848
- ),
849
- );
850
- }
851
-
852
- if ( $show_feed_header && $search == 'account_business' ) {
853
- if($this->WIS->is_premium()){
854
- $images_div .= WIS_Premium::app()->display_header_with_stories($account, $account_data, $images_data['stories'], $enable_stories);
855
- } else {
856
- $images_div .= $this->render_layout_template( 'feed_header_template', $account_data );
857
- }
858
- }
859
- $images_div .= "<div class='{$images_div_class}'>\n";
860
-
861
- if( isset( $images_data['stories'] ) ) unset( $images_data['stories'] );
862
-
863
- if ( is_array( $images_data ) && ! empty( $images_data ) ) {
864
- if ( isset( $images_data['error'] ) ) {
865
- return $images_data['error'];
866
- }
867
-
868
- if ( $orderby != 'rand' ) {
869
-
870
- $orderby = explode( '-', $orderby );
871
- if ( $orderby[0] == 'date' ) {
872
- $func = 'sort_timestamp_' . $orderby[1];
873
- } else {
874
- $func = $is_business ? 'sort_popularity_' . $orderby[1] : 'sort_timestamp_' . $orderby[1];
875
- }
876
-
877
- usort( $images_data, array( $this, $func ) );
878
-
879
- } else {
880
-
881
- shuffle( $images_data );
882
- }
883
-
884
- $output = $slider_script . $images_div . $images_ul;
885
-
886
- foreach ( $images_data as $key => $image_data ) {
887
-
888
- if($key === 'stories') continue;
889
-
890
- if ( 'image_link' == $images_link ) {
891
- $template_args['link_to'] = $image_data['link'] ?? '';
892
- } elseif ( 'user_url' == $images_link ) {
893
- $template_args['link_to'] = 'https://www.instagram.com/' . $username . '/';
894
- } elseif ( 'image_url' == $images_link ) {
895
- $template_args['link_to'] = $image_data['url'];
896
- } elseif ( 'custom_url' == $images_link ) {
897
- $template_args['link_to'] = $custom_url;
898
- }
899
-
900
- $template_args['type'] = $image_data['type'] ?? '';
901
- $template_args['image'] = $image_data['image'] ?? '';
902
- $template_args['caption'] = $image_data['caption'] ?? '';
903
- $template_args['timestamp'] = isset($image_data['timestamp']) ? $image_data['timestamp'] : false;
904
- $template_args['username'] = isset( $image_data['username'] ) ? $image_data['username'] : '';
905
-
906
- $output .= $this->get_template( $template, $template_args );
907
- }
908
-
909
- $output .= "</ul>";
910
- }
911
- }
912
-
913
- $output .= "</div>";
914
- if ($enable_ad && !defined("WISP_PLUGIN_ACTIVE")) {
915
- $output .= '
916
- <div class="wis-template-ad" style="font-size: 1.3rem !important; margin-top: 2%; text-align: center; color: rgba(22,22,22,0.72) !important;" >
917
- <a target="_blank" style="color: rgba(22,22,22,0.72) !important; text-decoration: none" href="https://cm-wp.com/instagram-slider-widget/" ><h3 style="font-size: 1.15rem !important;"> Powered by Social Slider Widget </h3 ></a >
918
- </div >
919
- ';
920
- }
921
- return $output;
922
-
923
- }
924
-
925
- /**
926
- * Method renders layout template
927
- *
928
- * @param string $template_name Template name without ".php"
929
- *
930
- * @param array $args Template arguments
931
- *
932
- * @return false|string
933
- */
934
- private function render_layout_template( $template_name, $args ) {
935
- $path = WIS_PLUGIN_DIR . "/html_templates/$template_name.php";
936
- if ( file_exists( $path ) ) {
937
- ob_start();
938
- include $path;
939
- extract($args);
940
- return ob_get_clean();
941
- } else {
942
- return 'This template does not exist!';
943
- }
944
- }
945
-
946
- /**
947
- * Function to display Templates styles
948
- *
949
- * @param string $template
950
- * @param array $args
951
- *
952
- * return mixed
953
- */
954
- private function get_template( $template, $args ) {
955
-
956
- $link_to = isset( $args['link_to'] ) ? $args['link_to'] : 'none';
957
- $image_url = isset( $args['image'] ) ? $args['image'] : false;
958
- $type = isset( $args['type'] ) ? $args['type'] : '';
959
-
960
- if ( ( $args['search_for'] == 'user' && $args['attachment'] !== true ) || ( $args['search_for'] == 'account' && $args['attachment'] !== true ) || ( $args['search_for'] == 'account_business' && $args['attachment'] !== true ) || $args['search_for'] == 'hashtag' ) {
961
- $caption = $args['caption'];
962
- $time = $args['timestamp'];
963
- $username = $args['username'];
964
- } else {
965
- $attach_id = get_the_id();
966
- $caption = get_the_excerpt();
967
- $time = get_post_meta( $attach_id, 'jr_insta_timestamp', true );
968
- $username = get_post_meta( $attach_id, 'jr_insta_username', true );
969
- }
970
-
971
- $caption = $args['caption'];
972
- $time = $args['timestamp'];
973
- $username = $args['username'];
974
-
975
- $short_caption = wp_trim_words( $caption, 10, '' );
976
- $short_caption = strip_tags( $short_caption );
977
-
978
- $caption = wp_trim_words( $caption, $args['caption_words'], '' );
979
- $nopin = ( 1 == $args['no_pin'] ) ? 'nopin="nopin"' : '';
980
-
981
- $clean_image_url = WIS_PLUGIN_URL . "/assets/image.png";
982
- $image_src = "<img alt='" . $caption . "' src='{$clean_image_url}' $nopin class='{$type}' style='opacity: 0;'>";
983
- $image_output = $image_src;
984
-
985
- if ( $link_to && $link_to != 'none') {
986
- $image_output = "<a href='$link_to' target='_blank' rel='nofollow noreferrer'";
987
-
988
- if ( ! empty( $args['link_rel'] ) ) {
989
- $image_output .= " rel={$args['link_rel']}";
990
- }
991
-
992
- if ( ! empty( $args['link_class'] ) ) {
993
- $image_output .= " class={$args['link_class']}";
994
- }
995
- $image_output .= "> $image_src</a>";
996
- }
997
-
998
- $output = '';
999
-
1000
- if ( $template == 'slider' ) {
1001
- $output .= "<li style='border:0;' >";
1002
-
1003
- //$output .= $image_output;
1004
- $output .= "<div style='background: url({$image_url}) no-repeat center center; background-size: cover;'>{$image_output}</div>";
1005
-
1006
- if ( is_array( $args['description'] ) && count( $args['description'] ) >= 1 ) {
1007
-
1008
- $output .= "<div class='jr-insta-datacontainer' style=''>\n";
1009
-
1010
- if ( in_array( 'username', $args['description'] ) && $username ) {
1011
-
1012
- $output .= "<span class='jr-insta-username'>by <a rel='nofollow noreferrer' href='https://www.instagram.com/{$username}/' style='color:black; font-weight: 600' target='_blank'>{$username}</a></span>\n";
1013
- }
1014
- if ( $time && in_array( 'time', $args['description'] ) ) {
1015
- $time = human_time_diff( $time );
1016
- $output .= "<strong><span class='jr-insta-time pull-right' style='font-size: 0.9em'>{$time} ago</span></strong>\n";
1017
- $output .= "<br>";
1018
- }
1019
-
1020
-
1021
- if ( $caption != '' && in_array( 'caption', $args['description'] ) ) {
1022
- $caption = preg_replace( '/\@([a-z0-9А-Яа-я_-]+)/u', '&nbsp;<a href="https://www.instagram.com/$1/" rel="nofollow noreferrer" style="color:black; font-weight: 600" target="_blank">@$1</a>&nbsp;', $caption );
1023
- $caption = preg_replace( '/\#([a-zA-Z0-9А-Яа-я_-]+)/u', '&nbsp;<a href="https://www.instagram.com/explore/tags/$1/" style="color:black; font-weight: 600" rel="nofollow noreferrer" target="_blank">$0</a>&nbsp;', $caption );
1024
- $output .= "<span class='jr-insta-caption' style='text-align: left !important;'>{$caption}</span>\n";
1025
- }
1026
-
1027
- $output .= "</div>\n";
1028
- }
1029
-
1030
- $output .= "</li>";
1031
- // Template : Slider with text Overlay on mouse over
1032
- } elseif ( $template == 'slider-overlay' ) {
1033
- $icons = $args['enable_icons'] ? "" : " no-isw-icons";
1034
- $output .= "<li class='" . $type . $icons . "'>";
1035
-
1036
- //$output .= $image_output;
1037
- $output .= "<div id='jr-image-overlay' style='background: url({$image_url}) no-repeat center center; background-size: cover;'>{$image_output}</div>";
1038
-
1039
- if ( is_array( $args['description'] ) && count( $args['description'] ) >= 1 ) {
1040
-
1041
- $output .= "<div class='jr-insta-wrap'>\n";
1042
-
1043
- $output .= "<div class='jr-insta-datacontainer'>\n";
1044
-
1045
- if ( $time && in_array( 'time', $args['description'] ) ) {
1046
- $time = human_time_diff( $time );
1047
- $output .= "<span class='jr-insta-time'>{$time} ago</span>\n";
1048
- }
1049
-
1050
- if ( in_array( 'username', $args['description'] ) && $username ) {
1051
- $output .= "<span class='jr-insta-username'>by <a rel='nofollow noreferrer' target='_blank' href='https://www.instagram.com/{$username}/'>{$username}</a></span>\n";
1052
- }
1053
-
1054
- if ( $caption != '' && in_array( 'caption', $args['description'] ) ) {
1055
- $caption = preg_replace( '/@([a-z0-9_]+)/i', '&nbsp;<a href="https://www.instagram.com/$1/" rel="nofollow noreferrer" target="_blank">@$1</a>&nbsp;', $caption );
1056
- $caption = preg_replace( '/\#([a-zA-Z0-9_-]+)/i', '&nbsp;<a href="https://www.instagram.com/explore/tags/$1/" rel="nofollow noreferrer" target="_blank">$0</a>&nbsp;', $caption );
1057
- $output .= "<span class='jr-insta-caption' style='text-align: left !important;'>{$caption}</span>\n";
1058
- }
1059
-
1060
- $output .= "</div>\n";
1061
-
1062
- $output .= "</div>\n";
1063
- }
1064
-
1065
- $output .= "</li>";
1066
-
1067
- // Template : Thumbnails no text
1068
- } elseif ( $template == 'thumbs' || $template == 'thumbs-no-border' ) {
1069
- $type .= $args['enable_icons'] ? "" : " no-isw-icons";
1070
- $output .= "<li class='{$type}'>";
1071
- $output .= "<div style='background: url({$image_url}) no-repeat center center; background-size: cover;'>{$image_output}</div>";
1072
- //$output .= "<div></div>";
1073
- $output .= "</li>";
1074
-
1075
- } else {
1076
-
1077
- $output .= 'This template does not exist!';
1078
- }
1079
-
1080
- return $output;
1081
- }
1082
-
1083
-
1084
- /**
1085
- * Trigger refresh for new data
1086
- *
1087
- * @param bool $instaData
1088
- * @param array $old_args
1089
- * @param array $new_args
1090
- *
1091
- * @return bool
1092
- */
1093
- private function trigger_refresh_data( $instaData, $old_args, $new_args ) {
1094
-
1095
- $trigger = 0;
1096
-
1097
- if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
1098
- return false;
1099
- }
1100
-
1101
- if ( false === $instaData ) {
1102
- $trigger = 1;
1103
- }
1104
-
1105
-
1106
- if ( isset( $old_args['saved_images'] ) ) {
1107
- unset( $old_args['saved_images'] );
1108
- }
1109
-
1110
- if ( isset( $old_args['deleted_images'] ) ) {
1111
- unset( $old_args['deleted_images'] );
1112
- }
1113
-
1114
- if ( is_array( $old_args ) && is_array( $new_args ) && array_diff( $old_args, $new_args ) !== array_diff( $new_args, $old_args ) ) {
1115
- $trigger = 1;
1116
- }
1117
-
1118
- if ( $trigger == 1 ) {
1119
- return true;
1120
- }
1121
-
1122
- return false;
1123
- }
1124
-
1125
- /**
1126
- * Get data from instagram by username
1127
- *
1128
- * @param string $username
1129
- *
1130
- * @return array
1131
- */
1132
- private function get_data_by_username( $username ) {
1133
-
1134
- $url = str_replace( '{username}', urlencode( trim( $username ) ), self::USERNAME_URL );
1135
- $response = wp_remote_get( $url, array( 'sslverify' => false, 'timeout' => 60 ) );
1136
-
1137
- if ( strstr( $response['body'], '-cx-PRIVATE-Page__main' ) ) {
1138
- return [ 'error' => __( 'Account not found or for this account there are restrictions on Instagram by age', 'instagram-slider-widget' ) ];
1139
- }
1140
-
1141
- $json = str_replace( 'window._sharedData = ', '', strstr( $response['body'], 'window._sharedData = ' ) );
1142
-
1143
- // Compatibility for version of php where strstr() doesnt accept third parameter
1144
- if ( version_compare( PHP_VERSION, '5.3.0', '>=' ) ) {
1145
- $json = strstr( $json, '</script>', true );
1146
- } else {
1147
- $json = substr( $json, 0, strpos( $json, '</script>' ) );
1148
- }
1149
- $json = rtrim( $json, ';' );
1150
-
1151
- // Function json_last_error() is not available before PHP * 5.3.0 version
1152
- if ( function_exists( 'json_last_error' ) ) {
1153
-
1154
- ( $results = json_decode( $json, true ) ) && json_last_error() == JSON_ERROR_NONE;
1155
-
1156
- } else {
1157
- $results = json_decode( $json, true );
1158
- }
1159
-
1160
- return $results;
1161
- }
1162
-
1163
- /**
1164
- * Stores the fetched data from instagram in WordPress DB using transients
1165
- *
1166
- * @param array $search_for Array of widget settings
1167
- * @param string $cache_hours Cache hours for transient
1168
- * @param string $nr_images Nr of images to fetch from instagram
1169
- * @param bool $attachment Is attachment
1170
- *
1171
- * @return array of localy saved instagram data
1172
- * @throws \Exception
1173
- */
1174
- public function instagram_data( $search_for, $cache_hours, $nr_images, $attachment ) {
1175
- //$nr_images = $nr_images <= 12 ? $nr_images : 12;
1176
- if ( isset( $search_for['account'] ) && ! empty( $search_for['account'] ) ) {
1177
- $search = 'account';
1178
- $search_string = $search_for['account'];
1179
- } elseif ( isset( $search_for['account_business'] ) && ! empty( $search_for['account_business'] ) ) {
1180
- $search = 'account_business';
1181
- $search_string = $search_for['account_business'];
1182
- } elseif ( isset( $search_for['username'] ) && ! empty( $search_for['username'] ) ) {
1183
- $search = 'user';
1184
- $search_string = $search_for['username'];
1185
- } elseif ( isset( $search_for['hashtag'] ) && ! empty( $search_for['hashtag'] ) ) {
1186
- $search = 'hashtag';
1187
- $search_string = $search_for['hashtag'];
1188
- $blocked_users = isset( $search_for['blocked_users'] ) && ! empty( $search_for['blocked_users'] ) ? str_replace( '@', '', $search_for['blocked_users'] ) : false;
1189
- $blocked_users_array = $blocked_users ? $this->get_ids_from_usernames( $blocked_users ) : array();
1190
- } else {
1191
- return __( 'Nothing to search for', 'instagram-slider-widget' );
1192
- }
1193
-
1194
- $blocked_users = isset( $blocked_users ) ? $blocked_users : '';
1195
- $blocked_words = isset( $search_for['blocked_words'] ) && ! empty( $search_for['blocked_words'] ) ? $search_for['blocked_words'] : '';
1196
- $allowed_words = isset( $search_for['allowed_words'] ) && ! empty( $search_for['allowed_words'] ) ? $search_for['allowed_words'] : '';
1197
-
1198
- //песочница
1199
- if ( isset( $_GET['access_token'] ) && isset( $_GET['id'] ) ) {
1200
- $search = 'account';
1201
- $search_string = htmlspecialchars( $_GET['access_token'] );
1202
- }
1203
-
1204
-
1205
- $opt_name = 'jr_insta_' . md5( $search . '_' . $search_string );
1206
- $instaData = get_transient( $opt_name );
1207
- $old_opts = (array) get_option( $opt_name );
1208
- $new_opts = array(
1209
- 'search' => $search,
1210
- 'search_string' => $search_string,
1211
- 'blocked_users' => $blocked_users,
1212
- 'cache_hours' => $cache_hours,
1213
- 'nr_images' => $nr_images,
1214
- 'attachment' => $attachment
1215
- );
1216
-
1217
- if ( true === $this->trigger_refresh_data( $instaData, $old_opts, $new_opts ) ) {
1218
- // if ( true ) {
1219
-
1220
- $instaData = array();
1221
- $old_opts['search'] = $search;
1222
- $old_opts['search_string'] = $search_string;
1223
- $old_opts['blocked_users'] = $blocked_users;
1224
- $old_opts['cache_hours'] = $cache_hours;
1225
- $old_opts['nr_images'] = $nr_images;
1226
- $old_opts['attachment'] = $attachment;
1227
-
1228
- if ( 'user' == $search ) {
1229
-
1230
- $results = $this->get_data_by_username( $search_string );
1231
- if ( isset( $results['error'] ) ) {
1232
- return $results['error'];
1233
- }
1234
-
1235
- WIS_Plugin::app()->updateOption( 'profiles_data_by_username', $results );
1236
- // ************************************
1237
- // if instagram not return list of posts
1238
- // ************************************
1239
- $is_instaLoginPage = ! isset( $results['entry_data']['ProfilePage'] );
1240
- if ( $is_instaLoginPage ) {
1241
- return [ 'error' => __( 'Instagram requires authorization to view a user profile. Use authorized account in widget settings', 'instagram-slider-widget' ) ];
1242
- }
1243
- // ************************************
1244
- } elseif ( 'account' == $search || 'account_business' == $search ) {
1245
- $is_business_api = 'account_business' == $search ? true : false;
1246
- $nr_images = ! $this->WIS->is_premium() && $nr_images > 20 ? 20 : $nr_images;
1247
- //песочница
1248
- if ( isset( $_GET['access_token'] ) && isset( $_GET['id'] ) ) {
1249
- if ( isset( $_COOKIE['wis-demo-account-data'] ) ) {
1250
- $account = json_decode( stripslashes( $_COOKIE['wis-demo-account-data'] ), true );
1251
- } else {
1252
- $account = $this->get_user_by_token( $_GET['access_token'] );
1253
- }
1254
- // $account = array(
1255
- // 'token' => $_GET['access_token'],
1256
- // 'id' => $_GET['id'],
1257
- // );
1258
- } else {
1259
- $account = $this->getAccountById( $search_string, $is_business_api );
1260
- }
1261
-
1262
- if ( $is_business_api ) {
1263
- if ( ! isset( $_GET['access_token'] ) && ! isset( $_GET['id'] ) ) {
1264
- //Обновляем данные профиля: подписчики, количество постов
1265
- $this->update_account_profiles( $account['token'], true, $account['username'] );
1266
- }
1267
-
1268
- $args = array(
1269
- 'access_token' => $account['token'],
1270
- 'fields' => "id,username,caption,comments_count,like_count,media_type,media_url,permalink,timestamp,children{media_url,media_type},owner,thumbnail_url",
1271
- 'limit' => 50,
1272
- );
1273
-
1274
- $url = self::USERS_SELF_URL_NEW . $account['id'] . "/media";
1275
- $response = wp_remote_get( add_query_arg( $args, $url ) );
1276
- if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
1277
- $media = json_decode( wp_remote_retrieve_body( $response ), true );
1278
- $results = $media['data'];
1279
-
1280
- $stories_url = self::USERS_SELF_URL_NEW . $account['id'] . "/stories";
1281
- $url = add_query_arg(['access_token' => $account['token'], 'fields' => 'media_type,media_url,permalink,timestamp'], $stories_url);
1282
- $stories_response = wp_remote_get($url);
1283
- if(200 == wp_remote_retrieve_response_code( $stories_response )){
1284
- $stories = json_decode( wp_remote_retrieve_body( $stories_response ), true );
1285
- $results['stories'] = $stories['data'];
1286
- }
1287
- $results = apply_filters('wis/images/count', $results, $media, $nr_images, true);
1288
- $next_max_id = null;
1289
- if ( ! empty( $media['pagination'] ) ) {
1290
- $next_max_id = $media['pagination']['next_max_id'];
1291
- }
1292
- if ( ! count( $results ) ) {
1293
- return [ 'error' => __( 'There are no publications in this account yet', 'instagram-slider-widget' ) ];
1294
- }
1295
-
1296
-
1297
- } else {
1298
- if ( $instaData ) {
1299
- $results = $instaData;
1300
- }
1301
- }
1302
-
1303
- } else {
1304
- if ( ! isset( $_GET['access_token'] ) ) {
1305
- //Обновляем данные профиля: подписчики, количество постов
1306
- $this->update_account_profiles( $account['token'] );
1307
- }
1308
-
1309
- $args = array(
1310
- 'fields' => 'id,username,media{id,username,caption,media_type,media_url,permalink,thumbnail_url,timestamp,children{id,media_type,media_url,thumbnail_url}}',
1311
- 'limit' => 50,
1312
- 'access_token' => $account['token'],
1313
- );
1314
- $url = self::USERS_SELF_MEDIA_URL . $account['id'];
1315
- $response = wp_remote_get( add_query_arg( $args, $url ) );
1316
- if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
1317
- $media = json_decode( wp_remote_retrieve_body( $response ), true );
1318
- $results = $media['media']['data'];
1319
- $results = apply_filters('wis/images/count', $results, $media, $nr_images, false);
1320
- if ( ! is_array( $results ) || ! count( $results ) ) {
1321
- return [ 'error' => __( 'There are no publications in this account yet', 'instagram-slider-widget' ) ];
1322
- }
1323
- } else {
1324
- if ( $instaData ) {
1325
- $results = $instaData;
1326
- }
1327
- }
1328
- }
1329
-
1330
- } else { //hashtag
1331
- $account = $this->getAccountForHashtag();
1332
- //$account = false;
1333
- if ( $account ) {
1334
- $args = array(
1335
- 'access_token' => $account['token'],
1336
- 'user_id' => $account['id'],
1337
- 'q' => $search_string,
1338
- );
1339
- $url = self::USERS_SELF_URL_NEW . "ig_hashtag_search";
1340
- $response = wp_remote_get( add_query_arg( $args, $url ) );
1341
- if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
1342
- $media = json_decode( wp_remote_retrieve_body( $response ), true );
1343
- $args = array(
1344
- 'access_token' => $account['token'],
1345
- 'user_id' => $account['id'],
1346
- //,timestamp
1347
- 'fields' => "id,caption,media_type,media_url,comments_count,like_count,permalink,children{media_type,media_url}",
1348
- 'limit' => 50,
1349
- );
1350
- $url = self::USERS_SELF_URL_NEW . $media['data'][0]['id'] . "/recent_media";
1351
- $response = wp_remote_get( add_query_arg( $args, $url ) );
1352
- if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
1353
- $media = json_decode( wp_remote_retrieve_body( $response ), true );
1354
- $media['hashtag'] = true;
1355
- $results = $media;
1356
-
1357
- }
1358
- }
1359
- } else {
1360
- $url = str_replace( '{tag}', urlencode( trim( $search_string ) ), self::TAG_URL );
1361
- $response = wp_remote_get( $url, array( 'sslverify' => false, 'timeout' => 60 ) );
1362
- $results = json_decode( $response['body'], true );
1363
- $hashtag_response_status = $response['response']['code'];
1364
- }
1365
-
1366
- }
1367
-
1368
- if ( true ) {
1369
-
1370
- if ( $results && is_array( $results ) ) {
1371
-
1372
- if ( 'user' == $search ) {
1373
- $entry_data = isset( $results['entry_data']['ProfilePage'][0]['graphql']['user']['edge_owner_to_timeline_media']['edges'] ) ? $results['entry_data']['ProfilePage'][0]['graphql']['user']['edge_owner_to_timeline_media']['edges'] : array();
1374
- } elseif ( 'account' == $search || 'account_business' == $search ) {
1375
- $entry_data = $results;
1376
- } elseif ( 'hashtag' == $search ) {
1377
- if ( isset( $results['hashtag'] ) ) {
1378
- $entry_data = $results['data'];
1379
- } else {
1380
- $entry_data = isset( $results['graphql']['hashtag']['edge_hashtag_to_media']['edges'] ) ? $results['graphql']['hashtag']['edge_hashtag_to_media']['edges'] : array();
1381
- }
1382
- }
1383
-
1384
- if ( empty( $entry_data ) ) {
1385
- return [ 'error' => __( 'No images found', 'instagram-slider-widget' ) ];
1386
- }
1387
-
1388
- $i = 0;
1389
- foreach ( $entry_data as $current => $result ) {
1390
- if ( ! isset( $result['caption'] ) ) {
1391
- $result['caption'] = "";
1392
- }
1393
-
1394
- if ( $i >= $nr_images ) {
1395
- if(isset($entry_data['stories'])){
1396
- $instaData['stories'] = $entry_data['stories'];
1397
- }
1398
- break;
1399
- } else {
1400
- $i ++;
1401
- }
1402
-
1403
- if ( 'hashtag' == $search ) {
1404
-
1405
- //TODO: Доделать черный список с новым API
1406
- //Чёрный список не работает, так как API не отдает имя пользователя, который создал пост
1407
- if ( isset( $results['hashtag'] ) ) {
1408
- $result['fbapi'] = true;
1409
- if ( isset( $result['media_type'] ) && $result['media_type'] == 'VIDEO' ) {
1410
- //$nr_images++;
1411
- continue;
1412
- }
1413
- } else {
1414
- $result = $result['node'];
1415
- if ( in_array( $result['owner']['id'], $blocked_users_array ) ) {
1416
- $nr_images ++;
1417
- continue;
1418
- }
1419
- }
1420
- }
1421
-
1422
- if ( 'account' == $search ) {
1423
- $image_data = $this->to_media_model_from_account( $result );
1424
- } elseif ( 'account_business' == $search ) {
1425
- $image_data = $this->to_media_model_from_account_business( $result );
1426
- } elseif ( 'hashtag' == $search && $results['hashtag'] ) {
1427
- $image_data = $this->to_media_model_from_hashtag( $result );
1428
- } elseif ( 'user' == $search ) {
1429
- $image_data = $this->media_model( $result['node'] );
1430
- $image_data['username'] = $search_string;
1431
- }
1432
-
1433
-
1434
- if ( $this->is_blocked_by_word( $blocked_words, $image_data['caption'] ) ) {
1435
- $nr_images ++;
1436
- continue;
1437
- }
1438
-
1439
- if( !$this->is_allowed_by_word($allowed_words, $image_data['caption']) ){
1440
- $nr_images ++;
1441
- continue;
1442
- }
1443
-
1444
- if ( ! $attachment ) {
1445
-
1446
- $instaData[] = $image_data;
1447
-
1448
- } else {
1449
-
1450
- if ( isset( $old_opts['saved_images'][ $image_data['id'] ] ) ) {
1451
-
1452
- if ( is_string( get_post_status( $old_opts['saved_images'][ $image_data['id'] ] ) ) ) {
1453
-
1454
- $this->update_wp_attachment( $old_opts['saved_images'][ $image_data['id'] ], $image_data );
1455
-
1456
- $instaData[ $image_data['id'] ] = $old_opts['saved_images'][ $image_data['id'] ];
1457
-
1458
- } else {
1459
- unset( $old_opts['saved_images'][ $image_data['id'] ] );
1460
- }
1461
-
1462
- } else {
1463
-
1464
- $id = $this->save_wp_attachment( $image_data );
1465
-
1466
- if ( $id && is_numeric( $id ) ) {
1467
-
1468
- $old_opts['saved_images'][ $image_data['id'] ] = $id;
1469
-
1470
- $instaData[ $image_data['id'] ] = $id;
1471
-
1472
- } else {
1473
-
1474
- return $id;
1475
- }
1476
-
1477
- } // end isset $saved_images
1478
-
1479
- } // false to save attachments
1480
-
1481
- } // end -> foreach
1482
-
1483
- } // end -> ( $results ) && is_array( $results ) )
1484
- elseif( isset($hashtag_response_status) && $hashtag_response_status == 429 && is_user_logged_in() && $search == 'hashtag'){
1485
- return [ 'error' => __( "Can't receive images by hashtag. Please connect a business account and try again.", 'instagram-slider-widget' ) ];
1486
- }
1487
- } else {
1488
-
1489
- return $response['response']['message'];
1490
-
1491
- } // end -> $response['response']['code'] === 200 )
1492
-
1493
- update_option( $opt_name, $old_opts );
1494
-
1495
- if ( is_array( $instaData ) && ! empty( $instaData ) ) {
1496
-
1497
- set_transient( $opt_name, $instaData, $cache_hours * 60 * 60 );
1498
- }
1499
-
1500
- } // end -> false === $instaData
1501
-
1502
- //if('account' == $search)
1503
- //$instaData = array_merge($instaData, ['next_max_id' => $next_max_id]);
1504
- return $instaData;
1505
- }
1506
-
1507
- /**
1508
- * @param string $imageUrl
1509
- *
1510
- * @return array
1511
- */
1512
- private function get_thumbnail_urls( $thumbnails ) {
1513
-
1514
- $image_thumbnails = array();
1515
-
1516
- foreach ( $thumbnails as $thumbnail ) {
1517
-
1518
- switch ( $thumbnail['config_width'] ) {
1519
- case '150':
1520
- $image_thumbnails['thumbnail'] = $thumbnail['src'];
1521
- break;
1522
- case '320':
1523
- $image_thumbnails['low'] = $thumbnail['src'];
1524
- break;
1525
- case '640':
1526
- $image_thumbnails['standard'] = $thumbnail['src'];
1527
- break;
1528
- }
1529
- }
1530
-
1531
- return $image_thumbnails;
1532
- }
1533
-
1534
-
1535
- /**
1536
- * Media Model
1537
- *
1538
- * @param [type] $medias_array [description]
1539
- *
1540
- * @return [type] [description]
1541
- */
1542
- private function media_model( $medias_array ) {
1543
-
1544
- $m = array();
1545
-
1546
- foreach ( $medias_array as $prop => $value ) {
1547
-
1548
- switch ( $prop ) {
1549
- case 'id':
1550
- $m['id'] = $value;
1551
- break;
1552
- case 'code':
1553
- case '__typename':
1554
- $m['type'] = $value;
1555
- break;
1556
- case 'shortcode':
1557
- $m['code'] = $value;
1558
- $m['link'] = 'https://www.instagram.com/p/' . $value . '/';
1559
- break;
1560
- case 'owner':
1561
- $m['user_id'] = $value['id'];
1562
- break;
1563
- case 'caption':
1564
- $m['caption'] = $this->sanitize( $value );
1565
- break;
1566
- case 'edge_media_to_caption':
1567
- if ( ! empty( $value['edges'] ) ) {
1568
- $first_caption = $value['edges'][0];
1569
- if ( isset( $first_caption['node']['text'] ) ) {
1570
- $m['caption'] = $this->sanitize( $value['edges'][0]['node']['text'] );
1571
- }
1572
- }
1573
- break;
1574
- case 'date':
1575
- case 'taken_at_timestamp':
1576
- $m['timestamp'] = (float) $value;
1577
- break;
1578
- case 'dimensions':
1579
- $m['height'] = $value['height'];
1580
- $m['width'] = $value['width'];
1581
- break;
1582
- case 'display_url':
1583
- case 'display_src':
1584
- $m['url'] = $value;
1585
- $m['image'] = $value;
1586
- if ( isset( $m['sizes'] ) ) {
1587
- $m['sizes']['full'] = $value;
1588
- }
1589
- break;
1590
- case 'edge_liked_by':
1591
- case 'likes':
1592
- $m['likes_count'] = $value['count'];
1593
- break;
1594
- case 'edge_media_to_comment':
1595
- case 'comments':
1596
- $m['comment_count'] = $value['count'];
1597
- break;
1598
- case 'thumbnail_resources':
1599
- $m['sizes'] = $this->get_thumbnail_urls( $value );
1600
- if ( isset( $m['url'] ) ) {
1601
- $m['sizes']['full'] = $m['url'];
1602
- }
1603
- break;
1604
- }
1605
-
1606
- if ( isset( $m['comment_count'] ) && isset( $m['likes_count'] ) ) {
1607
- $m['popularity'] = (int) ( $m['comment_count'] ) + ( $m['likes_count'] );
1608
- }
1609
- }
1610
-
1611
- return $m;
1612
- }
1613
-
1614
- /**
1615
- * Media Model from account
1616
- *
1617
- * @param array $media From API
1618
- *
1619
- * @return array To plugin format
1620
- */
1621
- public function to_media_model_from_account( $media ) {
1622
-
1623
- $m = array();
1624
- switch ( $media['media_type'] ) {
1625
- case 'IMAGE':
1626
- $m['type'] = 'GraphImage';
1627
- $m['image'] = $media['media_url'];
1628
- break;
1629
- case 'VIDEO':
1630
- $m['type'] = 'GraphVideo';
1631
- $m['video'] = $media['media_url'];
1632
- $m['thumbnail'] = $media['thumbnail_url'];
1633
- $m['image'] = $media['thumbnail_url'];
1634
- break;
1635
- case 'CAROUSEL_ALBUM':
1636
- $m['type'] = 'GraphSidecar';
1637
- $res = array();
1638
- foreach ( $media['children']['data'] as $v ) {
1639
- $type = 'images';
1640
- $t['standard_resolution']['url'] = $v['media_url'];
1641
- $size = getimagesize( $v['media_url'] );
1642
- if ( is_array( $size ) ) {
1643
- $t['standard_resolution']['height'] = $size[1];
1644
- $t['standard_resolution']['width'] = $size[0];
1645
- } else {
1646
- $type = 'videos';
1647
- }
1648
- $res[][ $type ] = $t;
1649
-
1650
- }
1651
- $m['sidecar_media'] = $res;
1652
- $m['image'] = $media['media_url'];
1653
- break;
1654
- }
1655
-
1656
- $m['id'] = $media['id'];
1657
- $m['username'] = $media['username'];
1658
- $m['caption'] = $this->sanitize( $media['caption'] );
1659
- $m['link'] = $media['permalink'];
1660
- $m['timestamp'] = strtotime( $media['timestamp'] );
1661
- $m['url'] = $media['media_url'];
1662
-
1663
- if ( $media['media_type'] == 'VIDEO' ) {
1664
- $size = getimagesize( $media['thumbnail_url'] );
1665
- } else {
1666
- $size = getimagesize( $media['media_url'] );
1667
- }
1668
- if ( is_array( $size ) ) {
1669
- $m['height'] = $size[1];
1670
- $m['width'] = $size[0];
1671
- }
1672
-
1673
- $m['popularity'] = 0;
1674
-
1675
- return $m;
1676
- }
1677
-
1678
- /**
1679
- * Media Model from account
1680
- *
1681
- * @param array $media From API
1682
- *
1683
- * @return array To plugin format
1684
- */
1685
- public function to_media_model_from_account_business( $media ) {
1686
-
1687
- $m = array();
1688
- switch ( $media['media_type'] ) {
1689
- case 'IMAGE':
1690
- $m['type'] = 'GraphImage';
1691
- $m['image'] = $media['media_url'];
1692
- break;
1693
- case 'VIDEO':
1694
- $m['type'] = 'GraphVideo';
1695
- $m['video'] = $media['media_url'];
1696
- $m['thumbnail'] = $media['thumbnail_url'];
1697
- $m['image'] = $media['thumbnail_url'];
1698
- break;
1699
- case 'CAROUSEL_ALBUM':
1700
- $m['type'] = 'GraphSidecar';
1701
- $res = array();
1702
- foreach ( $media['children']['data'] as $v ) {
1703
- $type = 'images';
1704
- $t['standard_resolution']['url'] = $v['media_url'];
1705
- $size = getimagesize( $v['media_url'] );
1706
- if ( is_array( $size ) ) {
1707
- $t['standard_resolution']['height'] = $size[1];
1708
- $t['standard_resolution']['width'] = $size[0];
1709
- } else {
1710
- $type = 'videos';
1711
- }
1712
- $res[][ $type ] = $t;
1713
- }
1714
- $m['sidecar_media'] = $res;
1715
- $m['image'] = $media['media_url'];
1716
- break;
1717
- }
1718
-
1719
- $m['id'] = $media['id'];
1720
- $m['username'] = $media['username'];
1721
- $m['caption'] = $this->sanitize( $media['caption'] );
1722
- $m['link'] = $media['permalink'];
1723
- $m['user_id'] = $media['owner']['id'];
1724
- $m['timestamp'] = strtotime( $media['timestamp'] );
1725
- $m['url'] = $media['media_url'];
1726
- $m['comments'] = $media['comments_count'];
1727
- $m['likes'] = $media['like_count'];
1728
-
1729
- if ( $media['media_type'] == 'VIDEO' ) {
1730
- $size = getimagesize( $media['thumbnail_url'] );
1731
- } else {
1732
- $size = getimagesize( $media['media_url'] );
1733
- }
1734
- if ( is_array( $size ) ) {
1735
- $m['height'] = $size[1];
1736
- $m['width'] = $size[0];
1737
- }
1738
-
1739
- if ( isset( $m['comments'] ) && isset( $m['likes'] ) ) {
1740
- $m['popularity'] = (int) ( $m['comments'] ) + ( $m['likes'] );
1741
- }
1742
-
1743
- return $m;
1744
- }
1745
-
1746
- /**
1747
- * Media Model from hashtag
1748
- *
1749
- * @param array $media From API
1750
- *
1751
- * @return array To plugin format
1752
- */
1753
- public function to_media_model_from_hashtag( $media ) {
1754
-
1755
- $m = array();
1756
- if ( isset( $media['fbapi'] ) ) {
1757
- $value = $media;
1758
- switch ( $value['media_type'] ) {
1759
- case 'IMAGE':
1760
- $m['type'] = 'GraphImage';
1761
- $m['image'] = $value['media_url'];
1762
- break;
1763
- case 'VIDEO':
1764
- $m['type'] = 'GraphVideo';
1765
- $m['video'] = $value['media_url'];
1766
- $m['thumbnail'] = $value['thumbnail_url'];
1767
- $m['image'] = $value['thumbnail_url'];
1768
- break;
1769
- case 'CAROUSEL_ALBUM':
1770
- $m['type'] = 'GraphSidecar';
1771
- $res = array();
1772
- foreach ( $value['children']['data'] as $v ) {
1773
- $t['standard_resolution']['url'] = $v['media_url'];
1774
- $res[]['images'] = $t;
1775
- }
1776
- $m['sidecar_media'] = $res;
1777
- $m['image'] = $value['children']['data'][0]['media_url'];
1778
- break;
1779
- }
1780
-
1781
- $media_url = isset($value['media_url']) ? $value['media_url'] : $value['children']['data'][0]['media_url'];
1782
-
1783
- $m['id'] = $value['id'];
1784
- $m['caption'] = $this->sanitize( $value['caption'] );
1785
- $m['link'] = $value['permalink'];
1786
- $m['comment_count'] = $value['comments_count'];
1787
- $m['url'] = $media_url;
1788
- $m['likes_count'] = $value['like_count'];
1789
-
1790
- $m['sizes']['thumbnail'] = $media_url;
1791
- $m['sizes']['low'] = $media_url;
1792
- $m['sizes']['standard'] = $media_url;
1793
- $m['sizes']['full'] = $media_url;
1794
-
1795
- if ( $media['media_type'] == 'VIDEO' ) {
1796
- $size = getimagesize( $value['thumbnail_url'] );
1797
- } else {
1798
- $size = getimagesize( $media_url );
1799
- }
1800
- if ( is_array( $size ) ) {
1801
- $m['height'] = $size[1];
1802
- $m['width'] = $size[0];
1803
- }
1804
-
1805
- $m['popularity'] = (int) ( $m['comment_count'] ) + ( $m['likes_count'] );
1806
- } else {
1807
- $value = $media;
1808
- $m['type'] = $value['__typename'];
1809
- $m['id'] = $value['id'];
1810
- $m['code'] = $value['shortcode'];
1811
- $m['link'] = 'https://www.instagram.com/p/' . $value['shortcode'] . '/';
1812
- $m['user_id'] = $value['owner']['id'];
1813
-
1814
- $m['caption'] = isset( $value['edge_media_to_caption']['edges'][0]['node']['text'] ) ? $value['edge_media_to_caption']['edges'][0]['node']['text'] : "";
1815
-
1816
- $m['timestamp'] = $value['taken_at_timestamp'];
1817
- $m['url'] = $value['display_url'];
1818
- $m['likes_count'] = $value['edge_liked_by']['count'];
1819
- $m['comment_count'] = $value['edge_media_to_comment']['count'];
1820
- $m['sizes'] = $this->get_thumbnail_urls( $value['thumbnail_resources'] );
1821
- $m['image'] = $value['thumbnail_src'];
1822
-
1823
- if ( isset( $m['comment_count'] ) && isset( $m['likes_count'] ) ) {
1824
- $m['popularity'] = (int) ( $m['comment_count'] ) + ( $m['likes_count'] );
1825
- }
1826
- }
1827
-
1828
- return $m;
1829
- }
1830
-
1831
- /**
1832
- * Remove Duplicates
1833
- * @return [type] [description]
1834
- */
1835
- private function clean_duplicates( $username ) {
1836
-
1837
- $savedinsta_args = array(
1838
- 'post_type' => 'attachment',
1839
- 'post_status' => 'inherit',
1840
- 'post_mime_type' => 'image',
1841
- 'orderby' => 'rand',
1842
- 'posts_per_page' => - 1,
1843
- 'meta_query' => array(
1844
- array(
1845
- 'key' => 'jr_insta_username',
1846
- 'compare' => '=',
1847
- 'value' => $username
1848
- ),
1849
- ),
1850
- );
1851
-
1852
- $savedinsta = new WP_Query( $savedinsta_args );
1853
-
1854
- $opt_name = 'jr_insta_' . md5( 'user' . '_' . $username );
1855
-
1856
- $attachment_ids = (array) get_option( $opt_name );
1857
-
1858
- $deleted_count = 0;
1859
-
1860
- foreach ( $savedinsta->posts as $post ) {
1861
-
1862
- if ( ! in_array( $post->ID, $attachment_ids['saved_images'] ) ) {
1863
-
1864
- if ( false !== wp_delete_attachment( $post->ID, true ) ) {
1865
- $deleted_count ++;
1866
- }
1867
- }
1868
- }
1869
-
1870
- wp_reset_postdata();
1871
-
1872
- return $deleted_count;
1873
- }
1874
-
1875
- /**
1876
- * Ajax Call to unblock images
1877
- * @return void
1878
- */
1879
- public function delete_dupes() {
1880
-
1881
- if ( function_exists( 'check_ajax_referer' ) ) {
1882
- check_ajax_referer( 'jr_delete_instagram_dupes' );
1883
- }
1884
-
1885
- $post = $_POST;
1886
- $return = array(
1887
- 'deleted' => $this->clean_duplicates( $post['username'] )
1888
- );
1889
-
1890
- wp_send_json( $return );
1891
- }
1892
-
1893
- /**
1894
- * Ajax Call to add BUSINESS account by token
1895
- *
1896
- * @return void
1897
- * @throws \Exception
1898
- */
1899
- public function add_account_by_token() {
1900
- if ( isset( $_POST['account'] ) && ! empty( $_POST['account'] ) && isset( $_POST['_ajax_nonce'] ) ) {
1901
- if ( ! current_user_can( 'manage_options' ) ) {
1902
- wp_die( - 2 );
1903
- } else {
1904
- wp_verify_nonce( $_POST['_ajax_nonce'], 'addAccountByToken' );
1905
-
1906
- $account = json_decode( stripslashes( $_POST['account'] ), true );
1907
- $user_profile = array();
1908
- $user_profile = apply_filters( 'wis/account/profiles', $user_profile, true );
1909
-
1910
- if ( ! WIS_Plugin::app()->is_premium() && $this->count_accounts() >= 1 ) {
1911
- wp_die( 'No premium' );
1912
- }
1913
-
1914
- $user_profile[ $account['username'] ] = $account;
1915
- WIS_Plugin::app()->updateOption( 'account_profiles_new', $user_profile );
1916
-
1917
- wp_die( 'Ok' );
1918
- }
1919
- } elseif ( isset( $_POST['token'] ) && ! empty( $_POST['token'] ) && isset( $_POST['_ajax_nonce'] ) ) {
1920
- if ( ! current_user_can( 'manage_options' ) ) {
1921
- wp_die( - 2 );
1922
- } else {
1923
- wp_verify_nonce( $_POST['_ajax_nonce'], 'addAccountByToken' );
1924
-
1925
- $token = $_POST['token'];
1926
- $this->update_account_profiles( $token );
1927
-
1928
- wp_die( '1' );
1929
- }
1930
- }
1931
- }
1932
-
1933
- /**
1934
- * Ajax Call to delete account
1935
- * @return void
1936
- */
1937
- public function delete_account() {
1938
- if ( isset( $_POST['item_id'] ) && isset( $_POST['is_business'] ) ) {
1939
- if ( ! current_user_can( 'manage_options' ) ) {
1940
- wp_die( - 1 );
1941
- } else {
1942
- check_ajax_referer( 'wis_nonce' );
1943
-
1944
- if ( (bool) $_POST['is_business'] ) {
1945
- $option_name = 'account_profiles_new';
1946
- } else {
1947
- $option_name = 'account_profiles';
1948
- }
1949
- $accounts = WIS_Plugin::app()->getPopulateOption( $option_name );
1950
- $accounts_new = array();
1951
- foreach ( $accounts as $name => $acc ) {
1952
- $id = isset( $acc['id'] ) ? $acc['id'] : 0;
1953
- if ( (int) $id != (int) $_POST['item_id'] && ! empty( $name ) ) {
1954
- $accounts_new[ $name ] = $acc;
1955
- }
1956
- }
1957
- WIS_Plugin::app()->updatePopulateOption( $option_name, $accounts_new );
1958
-
1959
- wp_send_json_success( __( 'Account deleted successfully', 'instagram-slider-widget' ) );
1960
- }
1961
- }
1962
- }
1963
-
1964
- /**
1965
- * Get Account data by USERNAME from option in wp_options
1966
- *
1967
- * @param string $name
1968
- * @param bool $is_business
1969
- *
1970
- * @return array
1971
- */
1972
- public function getAccountById( $name, $is_business = false ) {
1973
- if ( $is_business ) {
1974
- $token = WIS_Plugin::app()->getOption( 'account_profiles_new' );
1975
- } else {
1976
- $token = WIS_Plugin::app()->getOption( 'account_profiles' );
1977
- }
1978
-
1979
- return $token[ $name ];
1980
- }
1981
-
1982
- /**
1983
- * Get first Account data from option in wp_options
1984
- *
1985
- * @return bool|array
1986
- */
1987
- public function getAccountForHashtag() {
1988
- $token = WIS_Plugin::app()->getOption( 'account_profiles_new', false );
1989
- if ( $token && is_array( $token ) && ! empty( $token ) ) {
1990
- return $token[ array_key_first( $token ) ];
1991
- } else {
1992
- return false;
1993
- }
1994
- }
1995
-
1996
- /**
1997
- * Get Instagram Ids from Usernames into array
1998
- *
1999
- * @param string $usernames Comma separated string with instagram users
2000
- *
2001
- * @return array An array with instagram ids
2002
- */
2003
- private function get_ids_from_usernames( $usernames ) {
2004
-
2005
- $users = explode( ',', trim( $usernames ) );
2006
- $user_ids = (array) get_transient( 'jr_insta_user_ids' );
2007
- $return_ids = array();
2008
-
2009
- if ( is_array( $users ) && ! empty( $users ) ) {
2010
-
2011
- foreach ( $users as $user ) {
2012
-
2013
- if ( isset( $user_ids[ $user ] ) ) {
2014
- continue;
2015
- }
2016
-
2017
- $results = $this->get_data_by_username( $user );
2018
- if ( $results && is_array( $results ) ) {
2019
-
2020
- $results = $results['entry_data']['ProfilePage']['0']['graphql']['user'];
2021
- $user_id = isset( $results['id'] ) ? $results['id'] : false;
2022
-
2023
- if ( $user_id ) {
2024
-
2025
- $user_ids[ $user ] = $user_id;
2026
-
2027
- set_transient( 'jr_insta_user_ids', $user_ids );
2028
- }
2029
- }
2030
- }
2031
- }
2032
-
2033
- foreach ( $users as $user ) {
2034
- if ( isset( $user_ids[ $user ] ) ) {
2035
- $return_ids[] = $user_ids[ $user ];
2036
- }
2037
- }
2038
-
2039
- return $return_ids;
2040
- }
2041
-
2042
-
2043
- /**
2044
- * Updates attachment using the id
2045
- *
2046
- * @param int $attachment_ID
2047
- * @param array image_data
2048
- *
2049
- * @return void
2050
- */
2051
- private function update_wp_attachment( $attachment_ID, $image_data ) {
2052
- update_post_meta( $attachment_ID, 'jr_insta_popularity', $image_data['popularity'] );
2053
- update_post_meta( $attachment_ID, 'jr_insta_likes_count', $image_data['likes_count'] );
2054
- update_post_meta( $attachment_ID, 'jr_insta_comment_count', $image_data['comment_count'] );
2055
- }
2056
-
2057
- /**
2058
- * Save Instagram images to upload folder and ads to media.
2059
- * If the upload fails it returns the remote image url.
2060
- *
2061
- * @param string $url Url of image to download
2062
- * @param string $file File path for image
2063
- *
2064
- * @return string $url Url to image
2065
- */
2066
- private function save_wp_attachment( $image_data ) {
2067
-
2068
- $image_info = pathinfo( $image_data['url'] );
2069
-
2070
- if ( ! in_array( $image_info['extension'], array( 'jpg', 'jpe', 'jpeg' ) ) ) {
2071
- return false;
2072
- }
2073
-
2074
- $attachment = array(
2075
- 'guid' => $image_data['url'],
2076
- 'post_mime_type' => 'image/jpeg',
2077
- 'post_title' => preg_replace( '/\.[^.]+$/', '', $image_info['basename'] ),
2078
- 'post_excerpt' => $image_data['caption']
2079
- );
2080
-
2081
- $attachment_metadata = array(
2082
- 'width' => $image_data['width'],
2083
- 'height' => $image_data['height'],
2084
- 'file' => $image_info['basename']
2085
- );
2086
- $attachment_metadata['sizes'] = array( 'full' => $attachment_metadata );
2087
- $id = wp_insert_attachment( $attachment );
2088
- wp_update_attachment_metadata( $id, $attachment_metadata );
2089
-
2090
-
2091
- unset( $image_data['caption'] );
2092
-
2093
- foreach ( $image_data as $meta_key => $meta_value ) {
2094
- update_post_meta( $id, 'jr_insta_' . $meta_key, $meta_value );
2095
- }
2096
-
2097
- return $id;
2098
- }
2099
-
2100
- /**
2101
- * Add new attachment Description only for instgram images
2102
- *
2103
- * @param array $form_fields
2104
- * @param object $post
2105
- *
2106
- * @return array
2107
- */
2108
- public function insta_attachment_fields( $form_fields, $post ) {
2109
-
2110
- $instagram_username = get_post_meta( $post->ID, 'jr_insta_username', true );
2111
-
2112
- if ( ! empty( $instagram_username ) ) {
2113
-
2114
- $form_fields["jr_insta_username"] = array(
2115
- "label" => __( "Instagram Username" ),
2116
- "input" => "html",
2117
- "html" => "<span style='line-height:31px'><a target='_blank' href='https://www.instagram.com/{$instagram_username}/'>{$instagram_username}</a></span>"
2118
- );
2119
-
2120
- $instagram_link = get_post_meta( $post->ID, 'jr_insta_link', true );
2121
- if ( ! empty( $instagram_link ) ) {
2122
- $form_fields["jr_insta_link"] = array(
2123
- "label" => __( "Instagram Image" ),
2124
- "input" => "html",
2125
- "html" => "<span style='line-height:31px'><a target='_blank' href='{$instagram_link}'>{$instagram_link}</a></span>"
2126
- );
2127
- }
2128
-
2129
- $instagram_date = get_post_meta( $post->ID, 'jr_insta_timestamp', true );
2130
- if ( ! empty( $instagram_date ) ) {
2131
- $instagram_date = date( "F j, Y, g:i a", $instagram_date );
2132
- $form_fields["jr_insta_time"] = array(
2133
- "label" => __( "Posted on Instagram" ),
2134
- "input" => "html",
2135
- "html" => "<span style='line-height:31px'>{$instagram_date}</span>"
2136
- );
2137
- }
2138
- }
2139
-
2140
- return $form_fields;
2141
- }
2142
-
2143
- /**
2144
- * Sort Function for timestamp Ascending
2145
- */
2146
- public function sort_timestamp_ASC( $a, $b ) {
2147
- return $a['timestamp'] > $b['timestamp'];
2148
- }
2149
-
2150
- /**
2151
- * Sort Function for timestamp Descending
2152
- */
2153
- public function sort_timestamp_DESC( $a, $b ) {
2154
- return $a['timestamp'] < $b['timestamp'];
2155
- }
2156
-
2157
- /**
2158
- * Sort Function for popularity Ascending
2159
- */
2160
- public function sort_popularity_ASC( $a, $b ) {
2161
- return $a['popularity'] > $b['popularity'];
2162
- }
2163
-
2164
- /**
2165
- * Sort Function for popularity Descending
2166
- */
2167
- public function sort_popularity_DESC( $a, $b ) {
2168
- return $a['popularity'] < $b['popularity'];
2169
- }
2170
-
2171
- /**
2172
- * Sanitize 4-byte UTF8 chars; no full utf8mb4 support in drupal7+mysql stack.
2173
- * This solution runs in O(n) time BUT assumes that all incoming input is
2174
- * strictly UTF8.
2175
- *
2176
- * @param string $input The input to be sanitised
2177
- *
2178
- * @return string sanitized input
2179
- */
2180
- private function sanitize( $input ) {
2181
-
2182
- if ( ! empty( $input ) ) {
2183
- $utf8_2byte = 0xC0 /*1100 0000*/
2184
- ;
2185
- $utf8_2byte_bmask = 0xE0 /*1110 0000*/
2186
- ;
2187
- $utf8_3byte = 0xE0 /*1110 0000*/
2188
- ;
2189
- $utf8_3byte_bmask = 0XF0 /*1111 0000*/
2190
- ;
2191
- $utf8_4byte = 0xF0 /*1111 0000*/
2192
- ;
2193
- $utf8_4byte_bmask = 0xF8 /*1111 1000*/
2194
- ;
2195
-
2196
- $sanitized = "";
2197
- $len = strlen( $input );
2198
- for ( $i = 0; $i < $len; ++ $i ) {
2199
-
2200
- $mb_char = $input[ $i ]; // Potentially a multibyte sequence
2201
- $byte = ord( $mb_char );
2202
-
2203
- if ( ( $byte & $utf8_2byte_bmask ) == $utf8_2byte ) {
2204
- $mb_char .= $input[ ++ $i ];
2205
- } else if ( ( $byte & $utf8_3byte_bmask ) == $utf8_3byte ) {
2206
- $mb_char .= $input[ ++ $i ];
2207
- $mb_char .= $input[ ++ $i ];
2208
- } else if ( ( $byte & $utf8_4byte_bmask ) == $utf8_4byte ) {
2209
- // Replace with ? to avoid MySQL exception
2210
- $mb_char = '';
2211
- $i += 3;
2212
- }
2213
-
2214
- $sanitized .= $mb_char;
2215
- }
2216
-
2217
- $input = $sanitized;
2218
- }
2219
-
2220
- return $input;
2221
- }
2222
-
2223
- /**
2224
- * @param string $token
2225
- * @param string $is_business
2226
- * @param string $username
2227
- *
2228
- * @return bool|array
2229
- */
2230
- public function update_account_profiles( $token, $is_business = false, $username = "" ) {
2231
- if ( $is_business ) {
2232
- //Получаем аккаунты привязанные к фейсбуку
2233
- $args = array(
2234
- 'access_token' => $token,
2235
- 'fields' => 'instagram_business_account',
2236
- 'limit' => 200,
2237
- );
2238
- $url = self::USERS_SELF_URL_NEW . "me/accounts";
2239
- $response = wp_remote_get( add_query_arg( $args, $url ) );
2240
- if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
2241
- $pages = json_decode( wp_remote_retrieve_body( $response ), true );
2242
- //$username = $result['data'][0]['name'];
2243
- $html = "";
2244
- $users = array();
2245
- foreach ( $pages['data'] as $key => $r ) {
2246
- if ( isset( $r['instagram_business_account'] ) && isset( $r['instagram_business_account']['id'] ) ) {
2247
- $args = array(
2248
- 'fields' => 'username,id,followers_count,follows_count,media_count,name,profile_picture_url',
2249
- 'access_token' => $token
2250
- );
2251
- $url = self::USERS_SELF_URL_NEW . $r['instagram_business_account']['id'];
2252
- $response = wp_remote_get( add_query_arg( $args, $url ) );
2253
- if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
2254
- $result = json_decode( wp_remote_retrieve_body( $response ), true );
2255
- $result['token'] = $token;
2256
- $users[] = $result;
2257
- $html .= "<div class='wis-row wis-row-style' id='wis-instagram-row' data-account='" . json_encode( $result ) . "'>";
2258
- $html .= "<div class='wis-col-1 wis-col1-style'><img src='{$result['profile_picture_url']}' width='50' alt='{$result['username']}'></div>";
2259
- $html .= "<div class='wis-col-2 wis-col2-style'>{$result['name']}<br>@{$result['username']}</div>";
2260
- $html .= "</div>";
2261
- }
2262
- if ( "" !== $username && $username == $result['username'] ) {
2263
- $user_profile = array();
2264
- $user_profile = apply_filters( 'wis/account/profiles', $user_profile, true );
2265
-
2266
- $user_profile[ $result['username'] ] = $result;
2267
- WIS_Plugin::app()->updateOption( 'account_profiles_new', $user_profile );
2268
- }
2269
- }
2270
- }
2271
-
2272
- return array( $html, $users );
2273
- }
2274
- } else {
2275
- $expires = 0;
2276
- $profiles = WIS_Plugin::app()->getOption( 'account_profiles', array() );
2277
- foreach ( $profiles as $profile ) {
2278
- if ( $profile['token'] == $token ) {
2279
- if ( $profile['expires'] <= time() ) {
2280
- $new = $this->refresh_token( $token );
2281
- $token = $new['access_token'];
2282
- $expires = $new['expires_in']; //5183944 sec
2283
- }
2284
- break;
2285
- }
2286
- }
2287
-
2288
- $args = array(
2289
- 'fields' => 'id,media_count,username',
2290
- 'access_token' => $token,
2291
- );
2292
-
2293
- $url = self::USERS_SELF_URL;
2294
- $url = add_query_arg( $args, $url );
2295
- $response = wp_remote_get( $url );
2296
- if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
2297
- $user = json_decode( wp_remote_retrieve_body( $response ), true );
2298
- if ( ! isset( $user['id'] ) || empty( $user['id'] ) ) {
2299
- return false;
2300
- }
2301
-
2302
- $user['token'] = $token;
2303
- if ( $expires > 0 ) {
2304
- $user['expires'] = time() + ( $expires - 86344 );
2305
- } //= 5097600 sec = 59 days
2306
- else {
2307
- $user['expires'] = isset( $profiles[ $user['username'] ]['expires'] ) ? $profiles[ $user['username'] ]['expires'] : time() + 5097600;
2308
- }
2309
- $user_profile = array();
2310
- $user_profile = apply_filters( 'wis/account/profiles', $user_profile );
2311
-
2312
- if ( ! WIS_Plugin::app()->is_premium() && $this->count_accounts() >= 1 ) {
2313
- return array();
2314
- }
2315
-
2316
- $user_profile[ $user['username'] ] = $user;
2317
- WIS_Plugin::app()->updateOption( 'account_profiles', $user_profile );
2318
-
2319
- return $user;
2320
- }
2321
- }
2322
-
2323
- return false;
2324
- }
2325
-
2326
- /**
2327
- * @param string $token
2328
- *
2329
- * @return array
2330
- */
2331
- public function refresh_token( $token ) {
2332
- $args = array(
2333
- 'grant_type' => 'ig_refresh_token',
2334
- 'access_token' => $token,
2335
- );
2336
-
2337
- $url = self::USERS_SELF_MEDIA_URL . 'refresh_access_token';
2338
- $url = add_query_arg( $args, $url );
2339
- $response = wp_remote_get( $url );
2340
- if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
2341
- $new = json_decode( wp_remote_retrieve_body( $response ), true );
2342
- if ( is_array( $new ) ) {
2343
- return $new;
2344
- }
2345
- }
2346
-
2347
- return array();
2348
- }
2349
-
2350
- /**
2351
- * This post is blocked by words?
2352
- *
2353
- * @param string $words
2354
- * @param string $text
2355
- *
2356
- * @return bool
2357
- */
2358
- public function is_blocked_by_word( $words, $text ) {
2359
- if ( empty( $words ) || empty( $text ) ) {
2360
- return false;
2361
- }
2362
- $words_array = explode( ',', $words );
2363
- foreach ( $words_array as $word ) {
2364
- $pos = stripos( $text, trim( $word ) );
2365
- if ( $pos !== false ) {
2366
- return true;
2367
- }
2368
- }
2369
-
2370
- return false;
2371
- }
2372
-
2373
- public function is_allowed_by_word($words, $text)
2374
- {
2375
- if(empty($words)) return true;
2376
- if(empty($text)) return false;
2377
-
2378
- $words_array = explode( ',', $words );
2379
- foreach ($words_array as $word) {
2380
- if(strripos($text, $word) !== false){
2381
- return true;
2382
- }
2383
- }
2384
- return false;
2385
- }
2386
-
2387
- public function get_user_by_token( $token ) {
2388
- $args = array(
2389
- 'fields' => 'id,media_count,username',
2390
- 'access_token' => $token,
2391
- );
2392
-
2393
- $url = self::USERS_SELF_URL;
2394
- $url = add_query_arg( $args, $url );
2395
- $response = wp_remote_get( $url );
2396
- if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
2397
- $user = json_decode( wp_remote_retrieve_body( $response ), true );
2398
- $user['token'] = $token;
2399
-
2400
- return $user;
2401
- }
2402
-
2403
- return false;
2404
- }
2405
-
2406
- /**
2407
- * Get count of accounts
2408
- *
2409
- * @return int
2410
- */
2411
- public function count_accounts() {
2412
- $account = WIS_Plugin::app()->getOption( 'account_profiles', array() );
2413
- $accont_b = WIS_Plugin::app()->getOption( 'account_profiles_new', array() );
2414
-
2415
- return count( $account ) + count( $accont_b );
2416
- }
2417
-
2418
- public static function isMobile() {
2419
- return preg_match("/(android|ios|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i", $_SERVER["HTTP_USER_AGENT"]);
2420
- }
2421
-
2422
- private function to_stories_from_account_business( $result ) {
2423
-
2424
- }
2425
-
2426
- } // end of class WIS_InstagramSlider
2427
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/class.wis_social.php DELETED
@@ -1,75 +0,0 @@
1
- <?php
2
- /**
3
- * Class of Social feed
4
- *
5
- * @author Artem Prihodko <webtemyk@yandex.ru>, Github: https://github.com/temyk
6
- * @copyright (c) 28.12.2019, Webcraftic
7
- *
8
- * @version 1.0.0
9
- */
10
-
11
- // Exit if accessed directly
12
- if ( ! defined( 'ABSPATH' ) ) {
13
- exit;
14
- }
15
-
16
- class WIS_Social {
17
-
18
- /**
19
- * @see self::app()
20
- * @var WIS_Social
21
- */
22
- private static $app;
23
-
24
- /**
25
- * @var WIS_Plugin
26
- */
27
- public $WIS;
28
-
29
- /**
30
- * Name of the Social
31
- *
32
- * @var string
33
- */
34
- public $social_name = "";
35
-
36
- /**
37
- * Статический метод для быстрого доступа к интерфейсу плагина.
38
- *
39
- * @return WIS_Social
40
- */
41
- public static function app() {
42
- return self::$app;
43
- }
44
-
45
- /**
46
- * WIS_Social constructor.
47
- */
48
- public function __construct() {
49
- self::$app = $this;
50
- $this->WIS = WIS_Plugin::app();
51
- }
52
-
53
- /**
54
- * @return string
55
- */
56
- public function getSocialName() {
57
- return $this->social_name;
58
- }
59
-
60
- /**
61
- * Обработка данных на вкладке соцсети
62
- */
63
- public function tabAction() {
64
- echo $this->social_name;
65
- }
66
-
67
- /**
68
- * Add account
69
- *
70
- */
71
- public function addAccount() {
72
-
73
- }
74
-
75
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/demo_widgets.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- use Instagram\Includes\WIS_Plugin;
4
 
5
  $premium = "";
6
  if ( ! WIS_Plugin::app()->is_premium() ) {
@@ -40,6 +40,7 @@ $demo_widgets[] = [
40
  'gutter' => '0',
41
  'masonry_image_width' => '200',
42
  'slick_slides_to_show' => '3',
 
43
  'enable_control_buttons' => '0',
44
  'slick_slides_padding' => '3',
45
  'show_feed_header' => '1',
@@ -82,6 +83,7 @@ $demo_widgets[] = [
82
  'gutter' => '0',
83
  'masonry_image_width' => '200',
84
  'slick_slides_to_show' => '3',
 
85
  'enable_control_buttons' => '0',
86
  'slick_slides_padding' => '3',
87
  'show_feed_header' => '1',
@@ -124,6 +126,7 @@ $demo_widgets[] = [
124
  'gutter' => '0',
125
  'masonry_image_width' => '200',
126
  'slick_slides_to_show' => '3',
 
127
  'enable_control_buttons' => '0',
128
  'slick_slides_padding' => '3',
129
  'show_feed_header' => '1',
@@ -166,6 +169,7 @@ $demo_widgets[] = [
166
  'gutter' => '0',
167
  'masonry_image_width' => '205',
168
  'slick_slides_to_show' => '3',
 
169
  'enable_control_buttons' => '0',
170
  'slick_slides_padding' => '3',
171
  'show_feed_header' => '1',
@@ -210,6 +214,7 @@ $demo_widgets[] = [
210
  'gutter' => '0',
211
  'masonry_image_width' => '220',
212
  'slick_slides_to_show' => '3',
 
213
  'enable_control_buttons' => '0',
214
  'slick_slides_padding' => '3',
215
  'show_feed_header' => '1',
@@ -253,6 +258,7 @@ $demo_widgets[] = [
253
  'gutter' => '0',
254
  'masonry_image_width' => '200',
255
  'slick_slides_to_show' => '3',
 
256
  'enable_control_buttons' => '0',
257
  'slick_slides_padding' => '3',
258
  'show_feed_header' => '1',
@@ -296,6 +302,7 @@ $demo_widgets[] = [
296
  'gutter' => '0',
297
  'masonry_image_width' => '200',
298
  'slick_slides_to_show' => '3',
 
299
  'enable_control_buttons' => '0',
300
  'slick_slides_padding' => '3',
301
  'show_feed_header' => '1',
@@ -339,6 +346,7 @@ $demo_widgets[] = [
339
  'gutter' => '0',
340
  'masonry_image_width' => '200',
341
  'slick_slides_to_show' => '3',
 
342
  'enable_control_buttons' => '0',
343
  'slick_slides_padding' => '1',
344
  'show_feed_header' => '1',
@@ -382,6 +390,7 @@ $demo_widgets[] = [
382
  'gutter' => '0',
383
  'masonry_image_width' => '200',
384
  'slick_slides_to_show' => '4',
 
385
  'enable_control_buttons' => '0',
386
  'slick_slides_padding' => '1',
387
  'show_feed_header' => '1',
1
  <?php
2
 
3
+
4
 
5
  $premium = "";
6
  if ( ! WIS_Plugin::app()->is_premium() ) {
40
  'gutter' => '0',
41
  'masonry_image_width' => '200',
42
  'slick_slides_to_show' => '3',
43
+ 'slick_sliding_speed' => '5000',
44
  'enable_control_buttons' => '0',
45
  'slick_slides_padding' => '3',
46
  'show_feed_header' => '1',
83
  'gutter' => '0',
84
  'masonry_image_width' => '200',
85
  'slick_slides_to_show' => '3',
86
+ 'slick_sliding_speed' => '5000',
87
  'enable_control_buttons' => '0',
88
  'slick_slides_padding' => '3',
89
  'show_feed_header' => '1',
126
  'gutter' => '0',
127
  'masonry_image_width' => '200',
128
  'slick_slides_to_show' => '3',
129
+ 'slick_sliding_speed' => '5000',
130
  'enable_control_buttons' => '0',
131
  'slick_slides_padding' => '3',
132
  'show_feed_header' => '1',
169
  'gutter' => '0',
170
  'masonry_image_width' => '205',
171
  'slick_slides_to_show' => '3',
172
+ 'slick_sliding_speed' => '5000',
173
  'enable_control_buttons' => '0',
174
  'slick_slides_padding' => '3',
175
  'show_feed_header' => '1',
214
  'gutter' => '0',
215
  'masonry_image_width' => '220',
216
  'slick_slides_to_show' => '3',
217
+ 'slick_sliding_speed' => '5000',
218
  'enable_control_buttons' => '0',
219
  'slick_slides_padding' => '3',
220
  'show_feed_header' => '1',
258
  'gutter' => '0',
259
  'masonry_image_width' => '200',
260
  'slick_slides_to_show' => '3',
261
+ 'slick_sliding_speed' => '5000',
262
  'enable_control_buttons' => '0',
263
  'slick_slides_padding' => '3',
264
  'show_feed_header' => '1',
302
  'gutter' => '0',
303
  'masonry_image_width' => '200',
304
  'slick_slides_to_show' => '3',
305
+ 'slick_sliding_speed' => '5000',
306
  'enable_control_buttons' => '0',
307
  'slick_slides_padding' => '3',
308
  'show_feed_header' => '1',
346
  'gutter' => '0',
347
  'masonry_image_width' => '200',
348
  'slick_slides_to_show' => '3',
349
+ 'slick_sliding_speed' => '5000',
350
  'enable_control_buttons' => '0',
351
  'slick_slides_padding' => '1',
352
  'show_feed_header' => '1',
390
  'gutter' => '0',
391
  'masonry_image_width' => '200',
392
  'slick_slides_to_show' => '4',
393
+ 'slick_sliding_speed' => '5000',
394
  'enable_control_buttons' => '0',
395
  'slick_slides_padding' => '1',
396
  'show_feed_header' => '1',
includes/socials/class.wis_facebook.php DELETED
@@ -1,280 +0,0 @@
1
- <?php
2
- /**
3
- * Class of Facebook feed
4
- *
5
- * @author Artem Prihodko <webtemyk@yandex.ru>, Github: https://github.com/temyk
6
- * @copyright (c) 28.12.2019, Webcraftic
7
- *
8
- * @version 1.0.0
9
- */
10
-
11
- // Exit if accessed directly
12
- if ( ! defined( 'ABSPATH' ) ) {
13
- exit;
14
- }
15
-
16
- class WIS_Facebook extends WIS_Social {
17
-
18
- const FACEBOOK_SELF_URL = 'https://graph.facebook.com/';
19
-
20
- /**
21
- * Name of the Social
22
- *
23
- * @var string
24
- */
25
- public $social_name = "facebook";
26
-
27
- /**
28
- * WIS_Facebook constructor.
29
- */
30
- public function __construct() {
31
- parent::__construct();
32
-
33
- add_action( 'wp_ajax_wis_add_facebook_page_by_token', array( $this, 'add_account' ) );
34
- }
35
-
36
- /**
37
- * @return string
38
- */
39
- public function getSocialName() {
40
- return $this->social_name;
41
- }
42
-
43
- /**
44
- * Обработка данных на вкладке соцсети
45
- */
46
- public function tabAction() {
47
- if ( isset( $_GET['token_error'] ) ) {
48
- //TODO: Обрабатывать ошибки, возможно логировать
49
- $_SERVER['REQUEST_URI'] = str_replace( '#_', '', remove_query_arg( 'token_error' ) );
50
- } else {
51
- if ( isset( $_GET['access_token'] ) ) {
52
- $token = $_GET['access_token'];
53
- $result = $this->update_account_profiles( $token );
54
- $_SERVER['REQUEST_URI'] = remove_query_arg( 'access_token' );
55
- ?>
56
- <div id="wis_accounts_modal" class="wis_accounts_modal">
57
- <div class="wis_modal_header">
58
- Choose Account:
59
- </div>
60
- <div class="wis_modal_content">
61
- <?php echo $result[0]; ?>
62
- </div>
63
- </div>
64
- <div id="wis_modal_overlay" class="wis_modal_overlay"></div>
65
- <span class="wis-overlay-spinner is-active">&nbsp;</span>
66
- <?php
67
- }
68
- }
69
- }
70
-
71
- /**
72
- * Stores the fetched data from Facebook in WordPress DB using transients
73
- *
74
- * @param string $search_for Facebook page name to fetch
75
- * @param string $cache_hours Cache hours for transient
76
- * @param string $nr_images Nr of images to fetch
77
- *
78
- * @return string|array of localy saved facebook data
79
- */
80
- public function get_data( $search_for, $cache_hours, $nr_images ) {
81
-
82
- if ( ! isset( $search_for ) || empty( $search_for ) ) {
83
- return __( 'Nothing to search', 'instagram-slider-widget' );
84
- }
85
-
86
- $opt_name = 'jr_facebook_' . md5( $search_for );
87
- $fbData = get_transient( $opt_name );
88
- $old_opts = (array) get_option( $opt_name );
89
- $new_opts = array(
90
- 'search_string' => $search_for,
91
- 'cache_hours' => $cache_hours,
92
- 'nr_images' => $nr_images,
93
- );
94
-
95
- if ( true === $this->trigger_refresh_data( $fbData, $old_opts, $new_opts ) ) {
96
-
97
- $entry_data = array();
98
- $old_opts['search_string'] = $search_for;
99
- $old_opts['cache_hours'] = $cache_hours;
100
- $old_opts['nr_images'] = $nr_images;
101
-
102
- $nr_images = ! $this->WIS->is_premium() && $nr_images > 20 ? 20 : $nr_images;
103
- $account = $this->getAccountByName( $search_for );
104
-
105
- $args = array(
106
- 'access_token' => $account['token'],
107
- 'fields' => "id,created_time,message,full_picture,picture,attachments{media_type,media,title,type,url},comments{comment_count,id},likes{id}",
108
- 'limit' => $nr_images,
109
- );
110
-
111
- $url = self::FACEBOOK_SELF_URL . $account['id'] . "/feed";
112
- $response = wp_remote_get( add_query_arg( $args, $url ) );
113
- if ( is_wp_error( $response ) ) {
114
- return [ 'error' => __( 'Something went wrong', 'instagram-slider-widget' ) ];
115
- }
116
- if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
117
- $media = json_decode( wp_remote_retrieve_body( $response ), true );
118
- if ( $media ) {
119
- if ( isset( $media['data'] ) && is_array( $media['data'] ) ) {
120
- $entry_data = $media['data'];
121
-
122
- if ( ! count( $entry_data ) ) {
123
- return [ 'error' => __( 'There are no publications in this account yet', 'instagram-slider-widget' ) ];
124
- }
125
-
126
- update_option( $opt_name, $old_opts );
127
- set_transient( $opt_name, $entry_data, $cache_hours * 60 * 60 );
128
- } else {
129
- return [ 'error' => __( 'No images found', 'instagram-slider-widget' ) ];
130
- }
131
- } else {
132
- return [ 'error' => __( 'Something went wrong (json)', 'instagram-slider-widget' ) ];
133
- }
134
- } else {
135
- return [ 'error' => __( 'Something went wrong. API error', 'instagram-slider-widget' ) ];
136
- }
137
-
138
- //Обновляем данные профиля: подписчики, количество постов
139
- //$this->update_account_profiles( $account['token'], $account['username'] );
140
- }
141
-
142
- return $entry_data;
143
- }
144
-
145
- /**
146
- * Get Account data by NAME from option in wp_options
147
- *
148
- * @param string $name
149
- *
150
- * @return array
151
- */
152
- public function getAccountByName( $name ) {
153
- $token = WIS_Plugin::app()->getOption( WIS_FACEBOOK_ACCOUNT_PROFILES_OPTION_NAME );
154
-
155
- return $token[ $name ];
156
- }
157
-
158
- /**
159
- * Trigger refresh for new data
160
- *
161
- * @param array $fbData
162
- * @param array $old_args
163
- * @param array $new_args
164
- *
165
- * @return bool
166
- */
167
- private function trigger_refresh_data( $fbData, $old_args, $new_args ) {
168
-
169
- $trigger = 0;
170
-
171
- if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
172
- return false;
173
- }
174
-
175
- if ( false === $fbData ) {
176
- $trigger = 1;
177
- }
178
-
179
-
180
- if ( isset( $old_args['saved_images'] ) ) {
181
- unset( $old_args['saved_images'] );
182
- }
183
-
184
- if ( isset( $old_args['deleted_images'] ) ) {
185
- unset( $old_args['deleted_images'] );
186
- }
187
-
188
- if ( is_array( $old_args ) && is_array( $new_args ) && array_diff( $old_args, $new_args ) !== array_diff( $new_args, $old_args ) ) {
189
- $trigger = 1;
190
- }
191
-
192
- if ( $trigger == 1 ) {
193
- return true;
194
- }
195
-
196
- return false;
197
- }
198
-
199
- /**
200
- * @param $token
201
- * @param $username
202
- *
203
- * @return bool|array
204
- */
205
- public function update_account_profiles( $token, $username = "" ) {
206
- //Получаем аккаунты привязанные к фейсбуку
207
- $args = array(
208
- 'access_token' => $token,
209
- 'fields' => 'id,name,username,picture,photos',
210
- 'limit' => 200,
211
- );
212
- $url = self::FACEBOOK_SELF_URL . "me/accounts";
213
- $response = wp_remote_get( add_query_arg( $args, $url ) );
214
- if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
215
- $pages = json_decode( wp_remote_retrieve_body( $response ), true );
216
- $html = "";
217
- foreach ( $pages['data'] as $key => $result ) {
218
- $result['token'] = $token;
219
- $users[] = $result;
220
- $picture = isset( $result['picture']['data']['url'] ) ? $result['picture']['data']['url'] : "";
221
- $html .= "<div class='wis-row wis-row-style' id='wis-facebook-row' data-account='" . json_encode( $result ) . "'>";
222
- $html .= "<div class='wis-col-1 wis-col1-style'><img src='{$picture}' width='50' alt='{$result['name']}'></div>";
223
- $html .= "<div class='wis-col-2 wis-col2-style'><a href='https://www.facebook.com/{$result['username']}'>{$result['name']}</a></div>";
224
- $html .= "</div>";
225
- }
226
- }
227
-
228
- return array( $html, $users );
229
- }
230
-
231
- /**
232
- * Ajax Call to Add account
233
- *
234
- * @return void
235
- */
236
- public function add_account() {
237
- if ( isset( $_POST['account'] ) && ! empty( $_POST['account'] ) && isset( $_POST['_ajax_nonce'] ) ) {
238
- if ( ! current_user_can( 'manage_options' ) ) {
239
- wp_die( - 2 );
240
- } else {
241
- wp_verify_nonce( $_POST['_ajax_nonce'], 'addAccountByToken' );
242
-
243
- $account = json_decode( stripslashes( $_POST['account'] ), true );
244
- $user_profile = array();
245
- //$user_profile = apply_filters( 'wis/account/profiles', $user_profile );
246
-
247
- $user_profile[ $account['username'] ] = $account;
248
- WIS_Plugin::app()->updateOption( WIS_FACEBOOK_ACCOUNT_PROFILES_OPTION_NAME, $user_profile );
249
- wp_die( '' );
250
- }
251
- }
252
- }
253
-
254
- /**
255
- * Ajax Call to delete account
256
- * @return void
257
- */
258
- public function delete_account() {
259
- if ( isset( $_POST['item_id'] ) && ! empty( $_POST['item_id'] ) ) {
260
- if ( ! current_user_can( 'manage_options' ) ) {
261
- wp_die( - 1 );
262
- } else {
263
- check_ajax_referer( 'wis_nonce' );
264
-
265
- $accounts = WIS_Plugin::app()->getPopulateOption( WIS_FACEBOOK_ACCOUNT_PROFILES_OPTION_NAME );
266
- $accounts_new = array();
267
- foreach ( $accounts as $name => $acc ) {
268
- if ( $acc['id'] !== $_POST['item_id'] ) {
269
- $accounts_new[ $name ] = $acc;
270
- }
271
- }
272
- WIS_Plugin::app()->updatePopulateOption( WIS_FACEBOOK_ACCOUNT_PROFILES_OPTION_NAME, $accounts_new );
273
-
274
- wp_send_json_success( __( 'Account deleted successfully', 'instagram-slider-widget' ) );
275
- }
276
- }
277
- }
278
-
279
-
280
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/socials/class.wis_youtube.php DELETED
File without changes
instaram_slider.php CHANGED
@@ -1,11 +1,12 @@
1
  <?php
2
  /*
3
- Plugin Name: Social Slider Widget
4
  Plugin URI: https://cm-wp.com/instagram-slider-widget
5
- Version: 1.9.5
6
- Description: Social Slider Widget is a responsive slider widget that shows 12 latest images from a public Instagram user and up to 18 images from a hashtag and Youtube videos
7
  Author: creativemotion
8
  Author URI: https://cm-wp.com/
 
9
  Text Domain: instagram-slider-widget
10
  Domain Path: /languages
11
  License: GPL2
@@ -18,82 +19,85 @@ if ( ! defined( 'ABSPATH' ) ) {
18
  }
19
 
20
  // Подключаем класс проверки совместимости
21
- require_once( dirname( __FILE__ ) . '/libs/factory/core/includes/class-factory-requirements.php' );
22
- require_once( dirname( __FILE__ ) . '/vendor/autoload.php');
23
 
24
- $plugin_info = array(
25
- 'prefix' => 'wis_',
26
- 'plugin_name' => 'wisw',
27
- 'plugin_title' => __( 'Social Slider Widget', 'instagram-slider-widget' ),
28
- 'plugin_text_domain' => 'instagram-slider-widget',
29
 
30
  // Служба поддержки
31
- 'support_details' => array(
32
  'url' => 'https://cm-wp.com/instagram-slider-widget',// Ссылка на сайт плагина
33
- 'pages_map' => array(
34
  'features' => 'premium-features', // {site}/premium-features "страница возможности"
35
  'pricing' => 'pricing', // {site}/prices страница "цены"
36
  'support' => 'support', // {site}/support страница "служба поддержки"
37
  'docs' => 'docs' // {site}/docs страница "документация"
38
- )
39
- ),
40
 
41
  // Настройка обновлений плагина
42
- 'has_updates' => true,
43
- 'updates_settings' => array(
44
  'repository' => 'wordpress',
45
  'slug' => 'instagram-slider-widget',
46
  'maybe_rollback' => true,
47
- 'rollback_settings' => array(
48
- 'prev_stable_version' => '0.0.0'
49
- )
50
- ),
51
 
52
  // Настройка премиум плагина
53
- 'has_premium' => true,
54
- 'license_settings' => array(
55
  'has_updates' => true,
56
  'provider' => 'freemius',
57
  'slug' => 'instagram-slider-widget-premium',
58
  'plugin_id' => '4272',
59
  'public_key' => 'pk_5152229a4aba03187267a8bc88874',
60
  'price' => 39,
61
- 'updates_settings' => array(
62
  'maybe_rollback' => true, // Можно ли делать откат к предыдущей версии плагина?
63
- 'rollback_settings' => array(
64
- 'prev_stable_version' => '0.0.0'
65
- )
66
- )
67
- ),
68
 
69
  // Настройки рекламы от CreativeMotion
70
- 'render_adverts' => true,
71
- 'adverts_settings' => array(
72
  'dashboard_widget' => true,
73
  'right_sidebar' => true,
74
  'notice' => true,
75
- ),
76
 
77
  // PLUGIN SUBSCRIBE FORM
78
- 'subscribe_widget' => true,
79
- 'subscribe_settings' => [ 'group_id' => '105407119' ],
80
-
81
- 'load_factory_modules' => array(
82
- array( 'libs/factory/bootstrap', 'factory_bootstrap_445', 'admin' ),
83
- array( 'libs/factory/forms', 'factory_forms_442', 'admin' ),
84
- array( 'libs/factory/pages', 'factory_pages_444', 'admin' ),
85
- array( 'libs/factory/freemius', 'factory_freemius_133', 'all' ),
86
- array( 'libs/factory/adverts', 'factory_adverts_123', 'admin' ),
87
- array( 'libs/factory/clearfy', 'factory_clearfy_236', 'admin' ),
88
- )
89
- );
90
-
91
- $wis_compatibility = new Wbcr_Factory445_Requirements( __FILE__, array_merge( $plugin_info, array(
 
 
 
92
  'plugin_already_activate' => defined( 'WIS_PLUGIN_ACTIVE' ),
93
  'required_php_version' => '7.0',
94
  'required_wp_version' => '4.8.0',
95
- 'required_clearfy_check_component' => false
96
- ) ) );
97
 
98
  /**
99
  * If the plugin is compatible, then it will continue its work, otherwise it will be stopped,
@@ -103,44 +107,21 @@ if ( ! $wis_compatibility->check() ) {
103
  return;
104
  }
105
  /********************************************/
106
- // Устанавливает статус плагина, как активный
107
  define( 'WIS_PLUGIN_ACTIVE', true );
108
- // Версия плагина
109
  define( 'WIS_PLUGIN_VERSION', $wis_compatibility->get_plugin_version() );
110
  define( 'WIS_PLUGIN_FILE', __FILE__ );
111
  define( 'WIS_ABSPATH', dirname( __FILE__ ) );
112
  define( 'WIS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
113
  define( 'WIS_PLUGIN_SLUG', dirname( plugin_basename( __FILE__ ) ) );
114
- // Ссылка к директории плагина
115
  define( 'WIS_PLUGIN_URL', plugins_url( null, __FILE__ ) );
116
- // Директория плагина
117
  define( 'WIS_PLUGIN_DIR', dirname( __FILE__ ) );
118
- /********************************************/
119
-
120
 
121
- /**************БЛОК ЮТУБА*************/
122
- // Устанавливает статус плагина, как активный
123
- define( 'WYT_PLUGIN_ACTIVE', true );
124
- // Версия плагина
125
- define( 'WYT_PLUGIN_FILE', __FILE__ . '/components/youtube' );
126
- define( 'WYT_PLUGIN_VERSION', $wis_compatibility->get_plugin_version() );
127
- define( 'WYT_ABSPATH', dirname( __FILE__ ) . '/components/youtube' );
128
- define( 'WYT_PLUGIN_BASENAME', plugin_basename( __FILE__ ) . '/components/youtube' );
129
- define( 'WYT_PLUGIN_SLUG', dirname( plugin_basename( __FILE__) . '/components/youtube' ) );
130
- // Ссылка к директории плагина
131
- define( 'WYT_PLUGIN_URL', plugins_url( null, __FILE__) . '/components/youtube' );
132
- // Директория плагина
133
- define( 'WYT_PLUGIN_DIR', dirname( __FILE__ ) . '/components/youtube' );
134
 
135
- /*
136
- * Константа определяет какое имя опции для хранения данных.
137
- * Нужно для отладки и последующего бесшовного перехода
138
- */
139
- define( 'WYT_ACCOUNT_OPTION_NAME', 'account' );
140
- define( 'WYT_API_KEY_OPTION_NAME', 'yt_api_key' );
141
- /***************************************************/
142
 
143
- require_once WYT_PLUGIN_DIR . '/includes/helpers.php';
144
 
145
 
146
 
@@ -149,53 +130,27 @@ require_once WYT_PLUGIN_DIR . '/includes/helpers.php';
149
  * PLUGIN INIT
150
  * -----------------------------------------------------------------------------
151
  */
152
- require_once( WIS_PLUGIN_DIR . '/libs/factory/core/boot.php' );
153
- require_once( WIS_PLUGIN_DIR . '/includes/class-wis-plugin.php' );
 
 
 
 
 
154
 
155
  try {
156
- require_once (WIS_PLUGIN_DIR . '/components/youtube/includes/Api/load.php');
157
- new \Instagram\Includes\WIS_Plugin( __FILE__, array_merge( $plugin_info, array(
158
- 'plugin_version' => WIS_PLUGIN_VERSION
159
- ) ) );
160
  } catch ( Exception $e ) {
161
  // Plugin wasn't initialized due to an error
162
  define( 'WIS_PLUGIN_THROW_ERROR', true );
163
 
164
  $wis_plugin_error_func = function () use ( $e ) {
165
- $error = sprintf( "The %s plugin has stopped. <b>Error:</b> %s Code: %s", 'Social Slider Widget', $e->getMessage(), $e->getCode() );
166
  echo '<div class="notice notice-error"><p>' . $error . '</p></div>';
167
  };
168
 
169
  add_action( 'admin_notices', $wis_plugin_error_func );
170
  add_action( 'network_admin_notices', $wis_plugin_error_func );
171
  }
172
-
173
- define( 'WIS_INSTAGRAM_CLIENT_ID', '2555361627845349' );
174
- define( 'WIS_FACEBOOK_CLIENT_ID', '776212986124330' );
175
- //define( 'WIS_FACEBOOK_CLIENT_ID', '572623036624544' );
176
-
177
- /*
178
- * Константа определяет какое имя опции для хранения данных.
179
- * Нужно для отладки и последующего бесшовного перехода
180
- */
181
- define( 'WIS_ACCOUNT_PROFILES_OPTION_NAME', 'account_profiles' );
182
- define( 'WIS_ACCOUNT_PROFILES_NEW_OPTION_NAME', 'account_profiles_new' );
183
-
184
- define( 'WIS_FACEBOOK_ACCOUNT_PROFILES_OPTION_NAME', 'facebook_account_profiles' );
185
-
186
- /*******************************************************************************/
187
- /**
188
- * On widgets Init register Widget
189
- */
190
- require_once WIS_PLUGIN_DIR . '/includes/class.wis_social.php';
191
-
192
- require_once WIS_PLUGIN_DIR . "/includes/class-wis_instagram_slider.php";
193
- require_once WIS_PLUGIN_DIR . "/components/youtube/includes/class-youtube-widget.php";
194
- add_action( 'plugins_loaded', function () {
195
- add_action( 'widgets_init', array( 'WIS_InstagramSlider', 'register_widget' ) );
196
- add_action( 'widgets_init', array( 'WYT_Widget', 'register_widget' ) );
197
- } );
198
-
199
- //require_once WIS_PLUGIN_DIR."/includes/class-wis_facebook_slider.php";
200
- //add_action( 'widgets_init', array( 'WIS_FacebookSlider', 'register_widget' ) );
201
- ?>
1
  <?php
2
  /*
3
+ Plugin Name: Social Slider Feed
4
  Plugin URI: https://cm-wp.com/instagram-slider-widget
5
+ Version: 2.0.3
6
+ Description: Shows Instagram, Facebook and YouTube responsive feeds in widgets, posts, pages, or anywhere else using shortcodes
7
  Author: creativemotion
8
  Author URI: https://cm-wp.com/
9
+ Requires PHP: 7.0
10
  Text Domain: instagram-slider-widget
11
  Domain Path: /languages
12
  License: GPL2
19
  }
20
 
21
  // Подключаем класс проверки совместимости
22
+ require_once dirname( __FILE__ ) . '/libs/factory/core/includes/class-factory-requirements.php';
23
+ //require_once( dirname( __FILE__ ) . '/vendor/autoload.php' );
24
 
25
+ $plugin_info = [
26
+ 'prefix' => 'wis_',
27
+ 'plugin_name' => 'wisw',
28
+ 'plugin_title' => __( 'Social Slider Feed', 'instagram-slider-widget' ),
29
+ 'plugin_text_domain' => 'instagram-slider-widget',
30
 
31
  // Служба поддержки
32
+ 'support_details' => [
33
  'url' => 'https://cm-wp.com/instagram-slider-widget',// Ссылка на сайт плагина
34
+ 'pages_map' => [
35
  'features' => 'premium-features', // {site}/premium-features "страница возможности"
36
  'pricing' => 'pricing', // {site}/prices страница "цены"
37
  'support' => 'support', // {site}/support страница "служба поддержки"
38
  'docs' => 'docs' // {site}/docs страница "документация"
39
+ ],
40
+ ],
41
 
42
  // Настройка обновлений плагина
43
+ 'has_updates' => true,
44
+ 'updates_settings' => [
45
  'repository' => 'wordpress',
46
  'slug' => 'instagram-slider-widget',
47
  'maybe_rollback' => true,
48
+ 'rollback_settings' => [
49
+ 'prev_stable_version' => '0.0.0',
50
+ ],
51
+ ],
52
 
53
  // Настройка премиум плагина
54
+ 'has_premium' => true,
55
+ 'license_settings' => [
56
  'has_updates' => true,
57
  'provider' => 'freemius',
58
  'slug' => 'instagram-slider-widget-premium',
59
  'plugin_id' => '4272',
60
  'public_key' => 'pk_5152229a4aba03187267a8bc88874',
61
  'price' => 39,
62
+ 'updates_settings' => [
63
  'maybe_rollback' => true, // Можно ли делать откат к предыдущей версии плагина?
64
+ 'rollback_settings' => [
65
+ 'prev_stable_version' => '0.0.0',
66
+ ],
67
+ ],
68
+ ],
69
 
70
  // Настройки рекламы от CreativeMotion
71
+ 'render_adverts' => true,
72
+ 'adverts_settings' => [
73
  'dashboard_widget' => true,
74
  'right_sidebar' => true,
75
  'notice' => true,
76
+ ],
77
 
78
  // PLUGIN SUBSCRIBE FORM
79
+ 'subscribe_widget' => true,
80
+ 'subscribe_settings' => [ 'group_id' => '105407119' ],
81
+
82
+ 'load_factory_modules' => [
83
+ [ 'libs/factory/bootstrap', 'factory_bootstrap_454', 'admin' ],
84
+ [ 'libs/factory/forms', 'factory_forms_450', 'admin' ],
85
+ [ 'libs/factory/pages', 'factory_pages_452', 'admin' ],
86
+ [ 'libs/factory/freemius', 'factory_freemius_140', 'all' ],
87
+ [ 'libs/factory/adverts', 'factory_adverts_130', 'admin' ],
88
+ [ 'libs/factory/templates', 'factory_templates_106', 'admin' ],
89
+ [ 'libs/factory/logger', 'factory_logger_118', 'all' ],
90
+ ],
91
+ ];
92
+
93
+ global $wis_compatibility;
94
+
95
+ $wis_compatibility = new Wbcr_Factory453_Requirements( __FILE__, array_merge( $plugin_info, [
96
  'plugin_already_activate' => defined( 'WIS_PLUGIN_ACTIVE' ),
97
  'required_php_version' => '7.0',
98
  'required_wp_version' => '4.8.0',
99
+ 'required_clearfy_check_component' => false,
100
+ ] ) );
101
 
102
  /**
103
  * If the plugin is compatible, then it will continue its work, otherwise it will be stopped,
107
  return;
108
  }
109
  /********************************************/
 
110
  define( 'WIS_PLUGIN_ACTIVE', true );
 
111
  define( 'WIS_PLUGIN_VERSION', $wis_compatibility->get_plugin_version() );
112
  define( 'WIS_PLUGIN_FILE', __FILE__ );
113
  define( 'WIS_ABSPATH', dirname( __FILE__ ) );
114
  define( 'WIS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
115
  define( 'WIS_PLUGIN_SLUG', dirname( plugin_basename( __FILE__ ) ) );
 
116
  define( 'WIS_PLUGIN_URL', plugins_url( null, __FILE__ ) );
 
117
  define( 'WIS_PLUGIN_DIR', dirname( __FILE__ ) );
 
 
118
 
119
+ define( 'WIS_COMPONENTS_URL', WIS_PLUGIN_URL . "/components" );
120
+ define( 'WIS_COMPONENTS_DIR', WIS_PLUGIN_DIR . "/components" );
 
 
 
 
 
 
 
 
 
 
 
121
 
122
+ define( 'WIS_FEEDS_OPTION', 'feeds' );
 
 
 
 
 
 
123
 
124
+ /********************************************/
125
 
126
 
127
 
130
  * PLUGIN INIT
131
  * -----------------------------------------------------------------------------
132
  */
133
+ require_once WIS_PLUGIN_DIR . '/libs/factory/core/boot.php';
134
+ require_once WIS_PLUGIN_DIR . '/includes/class-helper.php';
135
+ require_once WIS_PLUGIN_DIR . '/includes/class-feed.php';
136
+ require_once WIS_PLUGIN_DIR . '/includes/class-feeds.php';
137
+ require_once WIS_PLUGIN_DIR . '/includes/class-profiles.php';
138
+ require_once WIS_PLUGIN_DIR . '/includes/class-plugin.php';
139
+ require_once WIS_PLUGIN_DIR . '/includes/class-wis-plugin-temp.php';
140
 
141
  try {
142
+ new WIS_Plugin( __FILE__, array_merge( $plugin_info, [
143
+ 'plugin_version' => WIS_PLUGIN_VERSION,
144
+ ] ) );
 
145
  } catch ( Exception $e ) {
146
  // Plugin wasn't initialized due to an error
147
  define( 'WIS_PLUGIN_THROW_ERROR', true );
148
 
149
  $wis_plugin_error_func = function () use ( $e ) {
150
+ $error = sprintf( "The %s plugin has stopped. <b>Error:</b> %s Code: %s", 'Social Slider Feed', $e->getMessage(), $e->getCode() );
151
  echo '<div class="notice notice-error"><p>' . $error . '</p></div>';
152
  };
153
 
154
  add_action( 'admin_notices', $wis_plugin_error_func );
155
  add_action( 'network_admin_notices', $wis_plugin_error_func );
156
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/instagram-slider-widget-en_US.mo DELETED
Binary file
languages/instagram-slider-widget-en_US.po DELETED
@@ -1,628 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Social Slider Widget\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2019-11-08 05:43+0000\n"
6
- "PO-Revision-Date: 2019-11-08 05:46+0000\n"
7
- "Last-Translator: admin <webtemyk@yandex.ru>\n"
8
- "Language-Team: \n"
9
- "Language: en_US\n"
10
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
11
- "MIME-Version: 1.0\n"
12
- "Content-Type: text/plain; charset=UTF-8\n"
13
- "Content-Transfer-Encoding: 8bit\n"
14
- "X-Generator: Loco https://localise.biz/\n"
15
- "X-Loco-Version: 2.3.1; wp-5.2.4"
16
-
17
- #: includes/class-wis_instagram_slider.php:283
18
- msgid " Turn on to save Instagram Images into WordPress media library."
19
- msgstr ""
20
-
21
- #: includes/class-wis_instagram_slider.php:450
22
- msgid ""
23
- "* use this field only if the above option is set to <strong>Custom "
24
- "Link</strong>"
25
- msgstr ""
26
-
27
- #: includes/class-wis_instagram_slider.php:94
28
- msgid ""
29
- "1. Drag Social Slider Widget here. 2. Fill in the fields and hit save. 3. "
30
- "Copy the shortocde generated at the bottom of the widget form and use it on "
31
- "posts or pages."
32
- msgstr ""
33
-
34
- #: includes/class-wis_instagram_slider.php:394
35
- msgid "1000 milliseconds = 1 second"
36
- msgstr ""
37
-
38
- #: admin/views/tab-license.php:134
39
- #, php-format
40
- msgid ""
41
- "<a href=\"%s\" target=\"_blank\" rel=\"noopener\">Lean more</a> about the "
42
- "premium version and get the license key to activate it now!"
43
- msgstr ""
44
-
45
- #: includes/class-wis_instagram_slider.php:422
46
- msgid ""
47
- "<strong>Square - Cropped</strong> - option will show square cropped images "
48
- "in 640x640 pixels. <br/><strong>Original - No Crop</strong> - will display "
49
- "the original user uploaded image size."
50
- msgstr ""
51
-
52
- #: includes/class-wis_instagram_slider.php:42
53
- msgid "A widget that displays a slider with instagram images "
54
- msgstr ""
55
-
56
- #: admin/pages/about.php:44
57
- msgid "About"
58
- msgstr ""
59
-
60
- #: admin/pages/about.php:43
61
- msgid "About Social Slider Widget"
62
- msgstr ""
63
-
64
- #: includes/class-wis_instagram_slider.php:1552
65
- msgid "Account deleted successfully"
66
- msgstr ""
67
-
68
- #: includes/class-wis_instagram_slider.php:1131
69
- msgid ""
70
- "Account not found or for this account there are restrictions on Instagram by "
71
- "age"
72
- msgstr ""
73
-
74
- #: includes/class-wis_instagram_slider.php:250
75
- msgid "Account:"
76
- msgstr ""
77
-
78
- #: admin/views/tab-settings.php:51
79
- msgid "Action"
80
- msgstr ""
81
-
82
- #: admin/views/tab-license.php:11
83
- #, php-format
84
- msgid "Activate %s"
85
- msgstr ""
86
-
87
- #: admin/views/tab-license.php:84
88
- msgid "active sites"
89
- msgstr ""
90
-
91
- #: admin/views/tab-settings.php:32 admin/views/tab-settings.php:36
92
- msgid "Add Account"
93
- msgstr ""
94
-
95
- #: includes/class-wis_instagram_slider.php:267
96
- msgid "Add account in settings"
97
- msgstr ""
98
-
99
- #: includes/class-wis-plugin.php:127
100
- msgid "Are you sure want to delete this account?"
101
- msgstr ""
102
-
103
- #: includes/class-wis_instagram_slider.php:441
104
- msgid "Attachment Page"
105
- msgstr ""
106
-
107
- #: admin/views/tab-about.php:149
108
- msgid "BENEFITS"
109
- msgstr ""
110
-
111
- #: includes/class-wis_instagram_slider.php:275
112
- msgid "Block Users"
113
- msgstr ""
114
-
115
- #: admin/views/tab-license.php:138
116
- #, php-format
117
- msgid ""
118
- "Can’t find your key? Go to <a href=\"%s\" target=\"_blank\" rel=\"noopener\">"
119
- "this page</a> and login using the e-mail address associated with your "
120
- "purchase."
121
- msgstr ""
122
-
123
- #: includes/class-wis_instagram_slider.php:400
124
- msgid "Caption"
125
- msgstr ""
126
-
127
- #: includes/class-wis_instagram_slider.php:305
128
- msgid "Check for new images every:"
129
- msgstr ""
130
-
131
- #: includes/class-wis_instagram_slider.php:293
132
- msgid "Count of images to show:"
133
- msgstr ""
134
-
135
- #. Author of the plugin
136
- msgid "creativemotion"
137
- msgstr ""
138
-
139
- #: includes/class-wis_instagram_slider.php:442
140
- msgid "Custom Link"
141
- msgstr ""
142
-
143
- #: includes/class-wis_instagram_slider.php:448
144
- msgid "Custom link:"
145
- msgstr ""
146
-
147
- #: includes/class-wis_instagram_slider.php:427
148
- msgid "Date - Ascending"
149
- msgstr ""
150
-
151
- #: includes/class-wis_instagram_slider.php:428
152
- msgid "Date - Descending"
153
- msgstr ""
154
-
155
- #: admin/views/tab-license.php:105
156
- msgid "day(s)"
157
- msgstr ""
158
-
159
- #: admin/views/tab-settings.php:72
160
- msgid "Delete"
161
- msgstr ""
162
-
163
- #: admin/views/tab-license.php:31
164
- msgid "Delete Key"
165
- msgstr ""
166
-
167
- #: admin/views/tab-about.php:123
168
- msgid ""
169
- "Display Instagram feeds in widgets, posts, pages, or anywhere else using "
170
- "shortcodes."
171
- msgstr ""
172
-
173
- #: admin/views/tab-license.php:72
174
- msgid "domain"
175
- msgstr ""
176
-
177
- #: includes/class-wis_instagram_slider.php:384
178
- msgid "Dotted"
179
- msgstr ""
180
-
181
- #: includes/class-wis_instagram_slider.php:277
182
- msgid "Enter usernames separated by commas whose images you don't want to show"
183
- msgstr ""
184
-
185
- #: admin/views/tab-license.php:94
186
- msgid "EXPIRED!"
187
- msgstr ""
188
-
189
- #: includes/class-wis_instagram_slider.php:389
190
- msgid "Fade"
191
- msgstr ""
192
-
193
- #: admin/views/tab-about.php:128
194
- msgid "FEATURES"
195
- msgstr ""
196
-
197
- #: admin/views/tab-about.php:200
198
- msgid "FEEDBACK AND SUPPORT"
199
- msgstr ""
200
-
201
- #: includes/class-wis_instagram_slider.php:420
202
- msgid "Full Size"
203
- msgstr ""
204
-
205
- #: admin/pages/settings.php:148
206
- msgid "General"
207
- msgstr ""
208
-
209
- #: includes/class-wis_instagram_slider.php:272
210
- msgid "Hashtag:"
211
- msgstr ""
212
-
213
- #: admin/views/tab-license.php:120
214
- msgid "Have a key to activate the plugin? Paste it here:"
215
- msgstr ""
216
-
217
- #: admin/views/tab-license.php:118
218
- msgid "Have a key to activate the premium version? Paste it here:"
219
- msgstr ""
220
-
221
- #: includes/class-wis_instagram_slider.php:402
222
- msgid ""
223
- "Hold ctrl and click the fields you want to show/hide on your slider. Leave "
224
- "all unselected to hide them all. Default all selected."
225
- msgstr ""
226
-
227
- #: includes/class-wis_instagram_slider.php:307
228
- msgid "hours"
229
- msgstr ""
230
-
231
- #. Author URI of the plugin
232
- msgid "https://cm-wp.com/"
233
- msgstr ""
234
-
235
- #. URI of the plugin
236
- msgid "https://cm-wp.com/instagram-slider-widget"
237
- msgstr ""
238
-
239
- #: admin/views/tab-settings.php:47
240
- msgid "ID"
241
- msgstr ""
242
-
243
- #: admin/views/tab-settings.php:46
244
- msgid "Image"
245
- msgstr ""
246
-
247
- #: includes/class-wis_instagram_slider.php:415
248
- msgid "Image format"
249
- msgstr ""
250
-
251
- #: includes/class-wis_instagram_slider.php:440
252
- msgid "Image URL"
253
- msgstr ""
254
-
255
- #: includes/class-wis_instagram_slider.php:354
256
- msgid "Image width:"
257
- msgstr ""
258
-
259
- #: admin/pages/settings.php:158
260
- msgid "Instagram account"
261
- msgstr ""
262
-
263
- #: includes/class-wis_instagram_slider.php:438
264
- msgid "Instagram Image"
265
- msgstr ""
266
-
267
- #: admin/pages/settings.php:166
268
- msgid "Instagram password"
269
- msgstr ""
270
-
271
- #: includes/class-wis_instagram_slider.php:439
272
- msgid "Instagram Profile"
273
- msgstr ""
274
-
275
- #: includes/class-wis_instagram_slider.php:1161
276
- msgid ""
277
- "Instagram requires authorization to view a user profile. Use autorized "
278
- "account in widget settings"
279
- msgstr ""
280
-
281
- #: admin/pages/license.php:90
282
- msgid "License"
283
- msgstr ""
284
-
285
- #: admin/ajax/check-license.php:39
286
- msgid ""
287
- "License key is empty or license key too long (license key is 32 characters "
288
- "long)"
289
- msgstr ""
290
-
291
- #: admin/pages/license.php:91
292
- msgid "License of Social Slider Widget"
293
- msgstr ""
294
-
295
- #: admin/ajax/check-license.php:27
296
- msgid "Licensing action not passed or this action is prohibited!"
297
- msgstr ""
298
-
299
- #: includes/class-wis_instagram_slider.php:436
300
- msgid "Link to"
301
- msgstr ""
302
-
303
- #: includes/class-wis_instagram_slider.php:418
304
- msgid "Low - 320x320"
305
- msgstr ""
306
-
307
- #: includes/class-wis_instagram_slider.php:345
308
- msgid "max is 10 ( only for thumbnails template )"
309
- msgstr ""
310
-
311
- #: includes/class-wis_instagram_slider.php:297
312
- msgid "Maximum 20 images in free version."
313
- msgstr ""
314
-
315
- #: includes/class-wis_instagram_slider.php:393
316
- msgid "milliseconds"
317
- msgstr ""
318
-
319
- #: admin/views/tab-settings.php:33
320
- #, php-format
321
- msgid "More accounts in <a href='%s'>PRO version</a>"
322
- msgstr ""
323
-
324
- #: includes/class-wis_instagram_slider.php:298
325
- #, php-format
326
- msgid "More in <a href='%s'>PRO version</a>"
327
- msgstr ""
328
-
329
- #: admin/views/tab-settings.php:49
330
- msgid "Name"
331
- msgstr ""
332
-
333
- #: includes/class-wis_instagram_slider.php:1214
334
- msgid "No images found"
335
- msgstr ""
336
-
337
- #: includes/class-wis_instagram_slider.php:688
338
- msgid "No images found! <br> Try some other hashtag or username"
339
- msgstr ""
340
-
341
- #: includes/class-wis_instagram_slider.php:385
342
- msgid "No Navigation"
343
- msgstr ""
344
-
345
- #: includes/class-wis_instagram_slider.php:443
346
- msgid "None"
347
- msgstr ""
348
-
349
- #: includes/class-wis_instagram_slider.php:1100
350
- msgid "Nothing to search for"
351
- msgstr ""
352
-
353
- #: includes/class-wis_instagram_slider.php:343
354
- msgid "Number of Columns:"
355
- msgstr ""
356
-
357
- #: includes/class-wis_instagram_slider.php:410
358
- msgid "Number of words in caption:"
359
- msgstr ""
360
-
361
- #: admin/views/tab-license.php:82
362
- msgid "of"
363
- msgstr ""
364
-
365
- #: includes/class-wis_instagram_slider.php:372
366
- msgid "Offset"
367
- msgstr ""
368
-
369
- #: includes/class-wis_instagram_slider.php:425
370
- msgid "Order by"
371
- msgstr ""
372
-
373
- #: admin/pages/settings.php:168
374
- msgid "Password of your Instagram account"
375
- msgstr ""
376
-
377
- #: includes/class-wis_instagram_slider.php:376
378
- msgid "Pattern"
379
- msgstr ""
380
-
381
- #: includes/class-wis_instagram_slider.php:362
382
- msgid "pictures"
383
- msgstr ""
384
-
385
- #: includes/class-wis_instagram_slider.php:360
386
- msgid "Pictures per slide:"
387
- msgstr ""
388
-
389
- #: admin/views/tab-license.php:76
390
- msgid "plan"
391
- msgstr ""
392
-
393
- #: admin/views/tab-license.php:95
394
- msgid "please update the key"
395
- msgstr ""
396
-
397
- #: includes/class-wis_instagram_slider.php:429
398
- msgid "Popularity - Ascending"
399
- msgstr ""
400
-
401
- #: includes/class-wis_instagram_slider.php:430
402
- msgid "Popularity - Descending"
403
- msgstr ""
404
-
405
- #: includes/class-wis_instagram_slider.php:383
406
- msgid "Prev & Next"
407
- msgstr ""
408
-
409
- #: admin/views/tab-about.php:163
410
- msgid "PRO VERSION"
411
- msgstr ""
412
-
413
- #: admin/views/tab-license.php:54
414
- msgid ""
415
- "Public License is a GPLv2 compatible license allowing you to change and use "
416
- "this version of the plugin for free. Please keep in mind this license covers "
417
- "only free edition of the plugin. Premium versions are distributed with other "
418
- "type of a license."
419
- msgstr ""
420
-
421
- #: includes/class-wis_instagram_slider.php:351
422
- #: includes/class-wis_instagram_slider.php:356
423
- msgid "px"
424
- msgstr ""
425
-
426
- #: includes/class-wis_instagram_slider.php:431
427
- msgid "Random"
428
- msgstr ""
429
-
430
- #: admin/views/tab-license.php:107
431
- msgid "remained"
432
- msgstr ""
433
-
434
- #: includes/class-wis_instagram_slider.php:279
435
- msgid "Save in Media Library: "
436
- msgstr ""
437
-
438
- #: includes/class-wis_instagram_slider.php:246
439
- msgid "Search Instagram for:"
440
- msgstr ""
441
-
442
- #: admin/pages/settings.php:108
443
- msgid "Settings"
444
- msgstr ""
445
-
446
- #: admin/pages/settings.php:107
447
- msgid "Settings of Social Slider Widget"
448
- msgstr ""
449
-
450
- #: includes/class-wis_instagram_slider.php:486
451
- msgid "Shortcode of this Widget:"
452
- msgstr ""
453
-
454
- #: includes/class-wis_instagram_slider.php:311
455
- msgid "Show feed header:"
456
- msgstr ""
457
-
458
- #: includes/class-wis_instagram_slider.php:388
459
- msgid "Slide"
460
- msgstr ""
461
-
462
- #: includes/class-wis_instagram_slider.php:391
463
- msgid "Slide Speed:"
464
- msgstr ""
465
-
466
- #: includes/class-wis_instagram_slider.php:387
467
- msgid "Slider Animation:"
468
- msgstr ""
469
-
470
- #: includes/class-wis_instagram_slider.php:382
471
- msgid "Slider Navigation Controls:"
472
- msgstr ""
473
-
474
- #: includes/class-wis_instagram_slider.php:396
475
- msgid "Slider Text Description:"
476
- msgstr ""
477
-
478
- #: includes/class-wis_instagram_slider.php:40
479
- #: includes/class-wis_instagram_slider.php:204
480
- msgid "Social Slider"
481
- msgstr ""
482
-
483
- #: includes/class-wis_instagram_slider.php:92
484
- msgid "Social Slider - Shortcode Generator"
485
- msgstr ""
486
-
487
- #. Name of the plugin
488
- #: instaram_slider.php:26 admin/views/tab-about.php:122
489
- msgid "Social Slider Widget"
490
- msgstr ""
491
-
492
- #. Description of the plugin
493
- msgid ""
494
- "Social Slider Widget is a responsive slider widget that shows 12 latest "
495
- "images from a public Instagram user and up to 18 images from a hashtag."
496
- msgstr ""
497
-
498
- #: admin/pages/widgets.php:107 admin/pages/widgets.php:108
499
- msgid "Social Slider Widgets"
500
- msgstr ""
501
-
502
- #: includes/class-wis_instagram_slider.php:365
503
- msgid "Space between pictures:"
504
- msgstr ""
505
-
506
- #: includes/class-wis_instagram_slider.php:419
507
- msgid "Standard - 640x640"
508
- msgstr ""
509
-
510
- #: admin/views/tab-license.php:126
511
- msgid "Submit Key"
512
- msgstr ""
513
-
514
- #: admin/ajax/check-license.php:55
515
- msgid "Subscription success cancelled"
516
- msgstr ""
517
-
518
- #: admin/views/tab-license.php:35
519
- msgid "Synchronization"
520
- msgstr ""
521
-
522
- #: includes/class-wis_instagram_slider.php:318
523
- msgid "Template"
524
- msgstr ""
525
-
526
- #: admin/ajax/check-license.php:51
527
- msgid "The license has been updated"
528
- msgstr ""
529
-
530
- #: admin/ajax/check-license.php:47
531
- msgid "The license is deactivated"
532
- msgstr ""
533
-
534
- #: includes/class-wis_instagram_slider.php:1182
535
- msgid "There are no publications in this account yet"
536
- msgstr ""
537
-
538
- #: includes/class-wis_instagram_slider.php:417
539
- msgid "Thumbnail - 150x150"
540
- msgstr ""
541
-
542
- #: includes/class-wis_instagram_slider.php:399
543
- msgid "Time"
544
- msgstr ""
545
-
546
- #: includes/class-wis_instagram_slider.php:242
547
- msgid "Title:"
548
- msgstr ""
549
-
550
- #: admin/views/tab-settings.php:50
551
- msgid "Token"
552
- msgstr ""
553
-
554
- #: admin/views/tab-license.php:22
555
- #, php-format
556
- msgid "Upgrade to Premium for $%s"
557
- msgstr ""
558
-
559
- #: includes/class-wis_instagram_slider.php:488
560
- msgid ""
561
- "Use this shortcode in any page or post to display images with this widget "
562
- "configuration!"
563
- msgstr ""
564
-
565
- #: admin/views/tab-settings.php:48
566
- msgid "User"
567
- msgstr ""
568
-
569
- #: includes/class-wis_instagram_slider.php:398
570
- msgid "Username"
571
- msgstr ""
572
-
573
- #: admin/pages/settings.php:160
574
- msgid "Username of your Instagram account"
575
- msgstr ""
576
-
577
- #: includes/class-wis_instagram_slider.php:271
578
- msgid "Username:"
579
- msgstr ""
580
-
581
- #: admin/views/tab-license.php:89
582
- msgid "version"
583
- msgstr ""
584
-
585
- #: includes/class-wis_instagram_slider.php:349
586
- msgid "Vertical space between item elements:"
587
- msgstr ""
588
-
589
- #: admin/views/tab-about.php:209
590
- msgid "WHY DO YOU NEED IT?"
591
- msgstr ""
592
-
593
- #: admin/pages/widgets.php:109
594
- msgid "Widgets"
595
- msgstr ""
596
-
597
- #: includes/class-wis_instagram_slider.php:272
598
- msgid "without # sign"
599
- msgstr ""
600
-
601
- #: admin/views/tab-settings.php:21
602
- msgid ""
603
- "Without authorization Instagram limits the number of requests, and after "
604
- "exceeding the limit asks to log in, so an error is displayed that no images "
605
- "were found."
606
- msgstr ""
607
-
608
- #: admin/views/tab-license.php:58
609
- msgid ""
610
- "You use a paid subscription for the plugin updates. In case you don’t want "
611
- "to receive paid updates, please, click <a data-action=\"unsubscribe\" "
612
- "class=\"wis-control-btn\" href=\"#\">cancel subscription</a>"
613
- msgstr ""
614
-
615
- #: admin/views/tab-license.php:25
616
- #, php-format
617
- msgid "Your current license for %1$s:"
618
- msgstr ""
619
-
620
- #: admin/ajax/check-license.php:42
621
- msgid "Your license has been successfully activated"
622
- msgstr ""
623
-
624
- #: admin/views/tab-license.php:64
625
- msgid ""
626
- "Your license has expired, please extend the license to get updates and "
627
- "support."
628
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/instagram-slider-widget-ru_RU.mo CHANGED
Binary file
languages/instagram-slider-widget-ru_RU.po CHANGED
@@ -1,644 +1,1074 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Social Slider Widget\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2019-11-08 05:43+0000\n"
6
- "PO-Revision-Date: 2019-11-08 07:03+0000\n"
7
- "Last-Translator: admin <webtemyk@yandex.ru>\n"
8
- "Language-Team: Русский\n"
9
- "Language: ru_RU\n"
10
- "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10 >= 2 && "
11
- "n%10<=4 &&(n%100<10||n%100 >= 20)? 1 : 2);\n"
12
- "MIME-Version: 1.0\n"
13
- "Content-Type: text/plain; charset=UTF-8\n"
14
- "Content-Transfer-Encoding: 8bit\n"
15
- "X-Generator: Loco https://localise.biz/\n"
16
- "X-Loco-Version: 2.3.1; wp-5.2.4"
17
-
18
- #: includes/class-wis_instagram_slider.php:283
19
- msgid " Turn on to save Instagram Images into WordPress media library."
20
- msgstr "Сохранять изображения в медиабиблиотеке Wordpress"
21
-
22
- #: includes/class-wis_instagram_slider.php:450
23
- msgid ""
24
- "* use this field only if the above option is set to <strong>Custom "
25
- "Link</strong>"
26
- msgstr ""
27
- "* используйте это поле только в том случае, если для параметра выше задано "
28
- "значение <strong>Произвольная ссылка</strong>"
29
-
30
- #: includes/class-wis_instagram_slider.php:94
31
- msgid ""
32
- "1. Drag Social Slider Widget here. 2. Fill in the fields and hit save. 3. "
33
- "Copy the shortocde generated at the bottom of the widget form and use it on "
34
- "posts or pages."
35
- msgstr ""
36
- "1. Перетащите Social Slider Widget сюда. 2. Заполните поля и нажмите "
37
- "Сохранить. 3. Скопируйте шорткод, созданный в нижней части формы виджета, и "
38
- "используйте его в постах или страницах."
39
-
40
- #: includes/class-wis_instagram_slider.php:394
41
- msgid "1000 milliseconds = 1 second"
42
- msgstr "1000 миллисекунд = 1 секунда"
43
-
44
- #: admin/views/tab-license.php:134
45
- #, php-format
46
- msgid ""
47
- "<a href=\"%s\" target=\"_blank\" rel=\"noopener\">Lean more</a> about the "
48
- "premium version and get the license key to activate it now!"
49
- msgstr ""
50
- "<a href=\"%s\" target=\"_blank\" rel=\"noopener\">Узнайте больше</a> о "
51
- "премиум версии и получите лицензионный ключ, чтобы активировать его сейчас!"
52
-
53
- #: includes/class-wis_instagram_slider.php:422
54
- msgid ""
55
- "<strong>Square - Cropped</strong> - option will show square cropped images "
56
- "in 640x640 pixels. <br/><strong>Original - No Crop</strong> - will display "
57
- "the original user uploaded image size."
58
- msgstr ""
59
-
60
- #: includes/class-wis_instagram_slider.php:42
61
- msgid "A widget that displays a slider with instagram images "
62
- msgstr "Виджет, который отображает слайдер с изображениями instagram"
63
-
64
- #: admin/pages/about.php:44
65
- msgid "About"
66
- msgstr "О плагине"
67
-
68
- #: admin/pages/about.php:43
69
- msgid "About Social Slider Widget"
70
- msgstr "Описание Social Slider Widget"
71
-
72
- #: includes/class-wis_instagram_slider.php:1552
73
- msgid "Account deleted successfully"
74
- msgstr ""
75
-
76
- #: includes/class-wis_instagram_slider.php:1131
77
- msgid ""
78
- "Account not found or for this account there are restrictions on Instagram by "
79
- "age"
80
- msgstr ""
81
- "Аккаунт не найден или для этого аккаунта действуют возрастные ограничения"
82
-
83
- #: includes/class-wis_instagram_slider.php:250
84
- msgid "Account:"
85
- msgstr "Аккаунт:"
86
-
87
- #: admin/views/tab-settings.php:51
88
- msgid "Action"
89
- msgstr "Действия"
90
-
91
- #: admin/views/tab-license.php:11
92
- #, php-format
93
- msgid "Activate %s"
94
- msgstr ""
95
-
96
- #: admin/views/tab-license.php:84
97
- msgid "active sites"
98
- msgstr ""
99
-
100
- #: admin/views/tab-settings.php:32 admin/views/tab-settings.php:36
101
- msgid "Add Account"
102
- msgstr "Добавить аккаунт"
103
-
104
- #: includes/class-wis_instagram_slider.php:267
105
- msgid "Add account in settings"
106
- msgstr "Добавить аккаунт в настройках"
107
-
108
- #: includes/class-wis-plugin.php:127
109
- msgid "Are you sure want to delete this account?"
110
- msgstr "Вы уверена, что хотите удалить этот аккаунт?"
111
-
112
- #: includes/class-wis_instagram_slider.php:441
113
- msgid "Attachment Page"
114
- msgstr ""
115
-
116
- #: admin/views/tab-about.php:149
117
- msgid "BENEFITS"
118
- msgstr ""
119
-
120
- #: includes/class-wis_instagram_slider.php:275
121
- msgid "Block Users"
122
- msgstr "Заблокированные пользователи"
123
-
124
- #: admin/views/tab-license.php:138
125
- #, php-format
126
- msgid ""
127
- "Can’t find your key? Go to <a href=\"%s\" target=\"_blank\" rel=\"noopener\">"
128
- "this page</a> and login using the e-mail address associated with your "
129
- "purchase."
130
- msgstr ""
131
-
132
- #: includes/class-wis_instagram_slider.php:400
133
- msgid "Caption"
134
- msgstr "Заголовок"
135
-
136
- #: includes/class-wis_instagram_slider.php:305
137
- msgid "Check for new images every:"
138
- msgstr "Проверять новые изображения каждые:"
139
-
140
- #: includes/class-wis_instagram_slider.php:293
141
- msgid "Count of images to show:"
142
- msgstr "Кол-во изображений для показа:"
143
-
144
- #. Author of the plugin
145
- msgid "creativemotion"
146
- msgstr "creativemotion"
147
-
148
- #: includes/class-wis_instagram_slider.php:442
149
- msgid "Custom Link"
150
- msgstr "Произвольная ссылка"
151
-
152
- #: includes/class-wis_instagram_slider.php:448
153
- msgid "Custom link:"
154
- msgstr "Произвольная ссылка:"
155
-
156
- #: includes/class-wis_instagram_slider.php:427
157
- msgid "Date - Ascending"
158
- msgstr "Дата - по возрастанию"
159
-
160
- #: includes/class-wis_instagram_slider.php:428
161
- msgid "Date - Descending"
162
- msgstr "Дата - по убыванию"
163
-
164
- #: admin/views/tab-license.php:105
165
- msgid "day(s)"
166
- msgstr ""
167
-
168
- #: admin/views/tab-settings.php:72
169
- msgid "Delete"
170
- msgstr ""
171
-
172
- #: admin/views/tab-license.php:31
173
- msgid "Delete Key"
174
- msgstr ""
175
-
176
- #: admin/views/tab-about.php:123
177
- msgid ""
178
- "Display Instagram feeds in widgets, posts, pages, or anywhere else using "
179
- "shortcodes."
180
- msgstr ""
181
-
182
- #: admin/views/tab-license.php:72
183
- msgid "domain"
184
- msgstr ""
185
-
186
- #: includes/class-wis_instagram_slider.php:384
187
- msgid "Dotted"
188
- msgstr ""
189
-
190
- #: includes/class-wis_instagram_slider.php:277
191
- msgid "Enter usernames separated by commas whose images you don't want to show"
192
- msgstr ""
193
- "Введите имена пользователей, разделенные запятыми, изображения которых вы не "
194
- "хотите показывать"
195
-
196
- #: admin/views/tab-license.php:94
197
- msgid "EXPIRED!"
198
- msgstr ""
199
-
200
- #: includes/class-wis_instagram_slider.php:389
201
- msgid "Fade"
202
- msgstr ""
203
-
204
- #: admin/views/tab-about.php:128
205
- msgid "FEATURES"
206
- msgstr ""
207
-
208
- #: admin/views/tab-about.php:200
209
- msgid "FEEDBACK AND SUPPORT"
210
- msgstr ""
211
-
212
- #: includes/class-wis_instagram_slider.php:420
213
- msgid "Full Size"
214
- msgstr ""
215
-
216
- #: admin/pages/settings.php:148
217
- msgid "General"
218
- msgstr ""
219
-
220
- #: includes/class-wis_instagram_slider.php:272
221
- msgid "Hashtag:"
222
- msgstr "Хэштэг:"
223
-
224
- #: admin/views/tab-license.php:120
225
- msgid "Have a key to activate the plugin? Paste it here:"
226
- msgstr ""
227
-
228
- #: admin/views/tab-license.php:118
229
- msgid "Have a key to activate the premium version? Paste it here:"
230
- msgstr ""
231
-
232
- #: includes/class-wis_instagram_slider.php:402
233
- msgid ""
234
- "Hold ctrl and click the fields you want to show/hide on your slider. Leave "
235
- "all unselected to hide them all. Default all selected."
236
- msgstr ""
237
-
238
- #: includes/class-wis_instagram_slider.php:307
239
- msgid "hours"
240
- msgstr "часов"
241
-
242
- #. Author URI of the plugin
243
- msgid "https://cm-wp.com/"
244
- msgstr ""
245
-
246
- #. URI of the plugin
247
- msgid "https://cm-wp.com/instagram-slider-widget"
248
- msgstr ""
249
-
250
- #: admin/views/tab-settings.php:47
251
- msgid "ID"
252
- msgstr ""
253
-
254
- #: admin/views/tab-settings.php:46
255
- msgid "Image"
256
- msgstr "Аватар"
257
-
258
- #: includes/class-wis_instagram_slider.php:415
259
- msgid "Image format"
260
- msgstr "Формат изображения"
261
-
262
- #: includes/class-wis_instagram_slider.php:440
263
- msgid "Image URL"
264
- msgstr "Ссылка на изображение"
265
-
266
- #: includes/class-wis_instagram_slider.php:354
267
- msgid "Image width:"
268
- msgstr "Ширина изображения:"
269
-
270
- #: admin/pages/settings.php:158
271
- msgid "Instagram account"
272
- msgstr ""
273
-
274
- #: includes/class-wis_instagram_slider.php:438
275
- msgid "Instagram Image"
276
- msgstr "Страница поста"
277
-
278
- #: admin/pages/settings.php:166
279
- msgid "Instagram password"
280
- msgstr ""
281
-
282
- #: includes/class-wis_instagram_slider.php:439
283
- msgid "Instagram Profile"
284
- msgstr "Страница Инстаграм"
285
-
286
- #: includes/class-wis_instagram_slider.php:1161
287
- msgid ""
288
- "Instagram requires authorization to view a user profile. Use autorized "
289
- "account in widget settings"
290
- msgstr ""
291
-
292
- #: admin/pages/license.php:90
293
- msgid "License"
294
- msgstr ""
295
-
296
- #: admin/ajax/check-license.php:39
297
- msgid ""
298
- "License key is empty or license key too long (license key is 32 characters "
299
- "long)"
300
- msgstr ""
301
-
302
- #: admin/pages/license.php:91
303
- msgid "License of Social Slider Widget"
304
- msgstr ""
305
-
306
- #: admin/ajax/check-license.php:27
307
- msgid "Licensing action not passed or this action is prohibited!"
308
- msgstr ""
309
-
310
- #: includes/class-wis_instagram_slider.php:436
311
- msgid "Link to"
312
- msgstr "Ссылка на:"
313
-
314
- #: includes/class-wis_instagram_slider.php:418
315
- msgid "Low - 320x320"
316
- msgstr ""
317
-
318
- #: includes/class-wis_instagram_slider.php:345
319
- msgid "max is 10 ( only for thumbnails template )"
320
- msgstr "максимум 10 (только для шаблона thumbnails)"
321
-
322
- #: includes/class-wis_instagram_slider.php:297
323
- msgid "Maximum 20 images in free version."
324
- msgstr "Максимум 20 изображений в бесплатной версии"
325
-
326
- #: includes/class-wis_instagram_slider.php:393
327
- msgid "milliseconds"
328
- msgstr "миллисекунд"
329
-
330
- #: admin/views/tab-settings.php:33
331
- #, php-format
332
- msgid "More accounts in <a href='%s'>PRO version</a>"
333
- msgstr "Больше аккаунтов в <a href='%s'>PRO версии</a>"
334
-
335
- #: includes/class-wis_instagram_slider.php:298
336
- #, php-format
337
- msgid "More in <a href='%s'>PRO version</a>"
338
- msgstr "Больше в <a href='%s'>PRO версии</a>"
339
-
340
- #: admin/views/tab-settings.php:49
341
- msgid "Name"
342
- msgstr "Имя"
343
-
344
- #: includes/class-wis_instagram_slider.php:1214
345
- msgid "No images found"
346
- msgstr ""
347
-
348
- #: includes/class-wis_instagram_slider.php:688
349
- msgid "No images found! <br> Try some other hashtag or username"
350
- msgstr ""
351
-
352
- #: includes/class-wis_instagram_slider.php:385
353
- msgid "No Navigation"
354
- msgstr ""
355
-
356
- #: includes/class-wis_instagram_slider.php:443
357
- msgid "None"
358
- msgstr ""
359
-
360
- #: includes/class-wis_instagram_slider.php:1100
361
- msgid "Nothing to search for"
362
- msgstr ""
363
-
364
- #: includes/class-wis_instagram_slider.php:343
365
- msgid "Number of Columns:"
366
- msgstr "Кол-во колонок:"
367
-
368
- #: includes/class-wis_instagram_slider.php:410
369
- msgid "Number of words in caption:"
370
- msgstr "Кол-во слов в тексте:"
371
-
372
- #: admin/views/tab-license.php:82
373
- msgid "of"
374
- msgstr ""
375
-
376
- #: includes/class-wis_instagram_slider.php:372
377
- msgid "Offset"
378
- msgstr ""
379
-
380
- #: includes/class-wis_instagram_slider.php:425
381
- msgid "Order by"
382
- msgstr "Сортировка"
383
-
384
- #: admin/pages/settings.php:168
385
- msgid "Password of your Instagram account"
386
- msgstr ""
387
-
388
- #: includes/class-wis_instagram_slider.php:376
389
- msgid "Pattern"
390
- msgstr ""
391
-
392
- #: includes/class-wis_instagram_slider.php:362
393
- msgid "pictures"
394
- msgstr "изображений"
395
-
396
- #: includes/class-wis_instagram_slider.php:360
397
- msgid "Pictures per slide:"
398
- msgstr "Изображений на слайд:"
399
-
400
- #: admin/views/tab-license.php:76
401
- msgid "plan"
402
- msgstr ""
403
-
404
- #: admin/views/tab-license.php:95
405
- msgid "please update the key"
406
- msgstr ""
407
-
408
- #: includes/class-wis_instagram_slider.php:429
409
- msgid "Popularity - Ascending"
410
- msgstr "Популярность - по возрастанию"
411
-
412
- #: includes/class-wis_instagram_slider.php:430
413
- msgid "Popularity - Descending"
414
- msgstr "Популярность - по убыванию"
415
-
416
- #: includes/class-wis_instagram_slider.php:383
417
- msgid "Prev & Next"
418
- msgstr ""
419
-
420
- #: admin/views/tab-about.php:163
421
- msgid "PRO VERSION"
422
- msgstr ""
423
-
424
- #: admin/views/tab-license.php:54
425
- msgid ""
426
- "Public License is a GPLv2 compatible license allowing you to change and use "
427
- "this version of the plugin for free. Please keep in mind this license covers "
428
- "only free edition of the plugin. Premium versions are distributed with other "
429
- "type of a license."
430
- msgstr ""
431
-
432
- #: includes/class-wis_instagram_slider.php:351
433
- #: includes/class-wis_instagram_slider.php:356
434
- msgid "px"
435
- msgstr ""
436
-
437
- #: includes/class-wis_instagram_slider.php:431
438
- msgid "Random"
439
- msgstr "Рандом"
440
-
441
- #: admin/views/tab-license.php:107
442
- msgid "remained"
443
- msgstr ""
444
-
445
- #: includes/class-wis_instagram_slider.php:279
446
- msgid "Save in Media Library: "
447
- msgstr "Сохранять в медиабиблиотеке:"
448
-
449
- #: includes/class-wis_instagram_slider.php:246
450
- msgid "Search Instagram for:"
451
- msgstr "Искать в Instagram по:"
452
-
453
- #: admin/pages/settings.php:108
454
- msgid "Settings"
455
- msgstr "Настройки"
456
-
457
- #: admin/pages/settings.php:107
458
- msgid "Settings of Social Slider Widget"
459
- msgstr "Настройки Social Slider Widget"
460
-
461
- #: includes/class-wis_instagram_slider.php:486
462
- msgid "Shortcode of this Widget:"
463
- msgstr "Шорткод виджета:"
464
-
465
- #: includes/class-wis_instagram_slider.php:311
466
- msgid "Show feed header:"
467
- msgstr "Отображать шапку:"
468
-
469
- #: includes/class-wis_instagram_slider.php:388
470
- msgid "Slide"
471
- msgstr ""
472
-
473
- #: includes/class-wis_instagram_slider.php:391
474
- msgid "Slide Speed:"
475
- msgstr ""
476
-
477
- #: includes/class-wis_instagram_slider.php:387
478
- msgid "Slider Animation:"
479
- msgstr ""
480
-
481
- #: includes/class-wis_instagram_slider.php:382
482
- msgid "Slider Navigation Controls:"
483
- msgstr ""
484
-
485
- #: includes/class-wis_instagram_slider.php:396
486
- msgid "Slider Text Description:"
487
- msgstr ""
488
-
489
- #: includes/class-wis_instagram_slider.php:40
490
- #: includes/class-wis_instagram_slider.php:204
491
- msgid "Social Slider"
492
- msgstr ""
493
-
494
- #: includes/class-wis_instagram_slider.php:92
495
- msgid "Social Slider - Shortcode Generator"
496
- msgstr ""
497
-
498
- #. Name of the plugin
499
- #: instaram_slider.php:26 admin/views/tab-about.php:122
500
- msgid "Social Slider Widget"
501
- msgstr ""
502
-
503
- #. Description of the plugin
504
- msgid ""
505
- "Social Slider Widget is a responsive slider widget that shows 12 latest "
506
- "images from a public Instagram user and up to 18 images from a hashtag."
507
- msgstr ""
508
-
509
- #: admin/pages/widgets.php:107 admin/pages/widgets.php:108
510
- msgid "Social Slider Widgets"
511
- msgstr ""
512
-
513
- #: includes/class-wis_instagram_slider.php:365
514
- msgid "Space between pictures:"
515
- msgstr "Расстояние между изображениями:"
516
-
517
- #: includes/class-wis_instagram_slider.php:419
518
- msgid "Standard - 640x640"
519
- msgstr ""
520
-
521
- #: admin/views/tab-license.php:126
522
- msgid "Submit Key"
523
- msgstr ""
524
-
525
- #: admin/ajax/check-license.php:55
526
- msgid "Subscription success cancelled"
527
- msgstr ""
528
-
529
- #: admin/views/tab-license.php:35
530
- msgid "Synchronization"
531
- msgstr ""
532
-
533
- #: includes/class-wis_instagram_slider.php:318
534
- msgid "Template"
535
- msgstr "Шаблон"
536
-
537
- #: admin/ajax/check-license.php:51
538
- msgid "The license has been updated"
539
- msgstr ""
540
-
541
- #: admin/ajax/check-license.php:47
542
- msgid "The license is deactivated"
543
- msgstr ""
544
-
545
- #: includes/class-wis_instagram_slider.php:1182
546
- msgid "There are no publications in this account yet"
547
- msgstr ""
548
-
549
- #: includes/class-wis_instagram_slider.php:417
550
- msgid "Thumbnail - 150x150"
551
- msgstr ""
552
-
553
- #: includes/class-wis_instagram_slider.php:399
554
- msgid "Time"
555
- msgstr ""
556
-
557
- #: includes/class-wis_instagram_slider.php:242
558
- msgid "Title:"
559
- msgstr "Заголовок:"
560
-
561
- #: admin/views/tab-settings.php:50
562
- msgid "Token"
563
- msgstr "Токен"
564
-
565
- #: admin/views/tab-license.php:22
566
- #, php-format
567
- msgid "Upgrade to Premium for $%s"
568
- msgstr ""
569
-
570
- #: includes/class-wis_instagram_slider.php:488
571
- msgid ""
572
- "Use this shortcode in any page or post to display images with this widget "
573
- "configuration!"
574
- msgstr ""
575
- "Используйте этот шорткод на любой странице или посте для отображения "
576
- "изображений с этой конфигурацией виджета."
577
-
578
- #: admin/views/tab-settings.php:48
579
- msgid "User"
580
- msgstr "Аккаунт"
581
-
582
- #: includes/class-wis_instagram_slider.php:398
583
- msgid "Username"
584
- msgstr ""
585
-
586
- #: admin/pages/settings.php:160
587
- msgid "Username of your Instagram account"
588
- msgstr ""
589
-
590
- #: includes/class-wis_instagram_slider.php:271
591
- msgid "Username:"
592
- msgstr "Имя аккаунта:"
593
-
594
- #: admin/views/tab-license.php:89
595
- msgid "version"
596
- msgstr ""
597
-
598
- #: includes/class-wis_instagram_slider.php:349
599
- msgid "Vertical space between item elements:"
600
- msgstr "Вертикальное расстояние между элементами:"
601
-
602
- #: admin/views/tab-about.php:209
603
- msgid "WHY DO YOU NEED IT?"
604
- msgstr ""
605
-
606
- #: admin/pages/widgets.php:109
607
- msgid "Widgets"
608
- msgstr "Виджеты"
609
-
610
- #: includes/class-wis_instagram_slider.php:272
611
- msgid "without # sign"
612
- msgstr "без #"
613
-
614
- #: admin/views/tab-settings.php:21
615
- msgid ""
616
- "Without authorization Instagram limits the number of requests, and after "
617
- "exceeding the limit asks to log in, so an error is displayed that no images "
618
- "were found."
619
- msgstr ""
620
- "Без авторизации Instagram ограничивает количество запросов, а после "
621
- "превышения лимита просит войти в систему, поэтому выводится сообщение, что "
622
- "изображения не найдены."
623
-
624
- #: admin/views/tab-license.php:58
625
- msgid ""
626
- "You use a paid subscription for the plugin updates. In case you don’t want "
627
- "to receive paid updates, please, click <a data-action=\"unsubscribe\" "
628
- "class=\"wis-control-btn\" href=\"#\">cancel subscription</a>"
629
- msgstr ""
630
-
631
- #: admin/views/tab-license.php:25
632
- #, php-format
633
- msgid "Your current license for %1$s:"
634
- msgstr ""
635
-
636
- #: admin/ajax/check-license.php:42
637
- msgid "Your license has been successfully activated"
638
- msgstr ""
639
-
640
- #: admin/views/tab-license.php:64
641
- msgid ""
642
- "Your license has expired, please extend the license to get updates and "
643
- "support."
644
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Social Slider Feed\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2019-11-08 05:43+0000\n"
6
+ "PO-Revision-Date: 2021-09-21 11:14+0000\n"
7
+ "Last-Translator: admin <webtemyk@yandex.ru>\n"
8
+ "Language-Team: Русский\n"
9
+ "Language: ru_RU\n"
10
+ "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10 >= 2 && "
11
+ "n%10<=4 &&(n%100<10||n%100 >= 20)? 1 : 2);\n"
12
+ "MIME-Version: 1.0\n"
13
+ "Content-Type: text/plain; charset=UTF-8\n"
14
+ "Content-Transfer-Encoding: 8bit\n"
15
+ "X-Generator: Loco https://localise.biz/\n"
16
+ "X-Loco-Version: 2.3.1; wp-5.2.4"
17
+
18
+ #: components/instagram/html_templates/form-feed.php:243
19
+ #: components/youtube/html_templates/form-feed.php:166
20
+ #: components/youtube/html_templates/widget_settings.php:151
21
+ msgid ""
22
+ "* use this field only if the above option is set to <strong>Custom "
23
+ "Link</strong>"
24
+ msgstr ""
25
+ "* используйте это поле только в том случае, если для параметра выше задано "
26
+ "значение <strong>Произвольная ссылка</strong>"
27
+
28
+ #: admin/views/page-license.php:134 admin/views/page-showcase-license.php:134
29
+ #, php-format
30
+ msgid ""
31
+ "<a href=\"%s\" target=\"_blank\" rel=\"noopener\">Lean more</a> about the "
32
+ "premium version and get the license key to activate it now!"
33
+ msgstr ""
34
+ "<a href=\"%s\" target=\"_blank\" rel=\"noopener\">Узнайте больше</a> о "
35
+ "премиум версии и получите лицензионный ключ, чтобы активировать его сейчас!"
36
+
37
+ #: components/facebook/includes/class-facebook-widget.php:56
38
+ msgid "A widget that displays a Facebook posts "
39
+ msgstr "Виджет, который отображает посты с Facebook"
40
+
41
+ #: components/instagram/includes/class-instagram-widget.php:46
42
+ msgid "A widget that displays a slider with instagram images "
43
+ msgstr "Виджет, который отображает слайдер с изображениями instagram"
44
+
45
+ #: admin/pages/about.php:67
46
+ msgid "About"
47
+ msgstr "О плагине"
48
+
49
+ #: components/facebook/html_templates/form-feed.php:35
50
+ #: components/facebook/html_templates/form-feed.php:47
51
+ #: components/instagram/html_templates/form-feed.php:40
52
+ #: components/instagram/html_templates/form-feed.php:67
53
+ #: components/instagram/html_templates/form-feed.php:79
54
+ #: components/youtube/html_templates/form-feed.php:35
55
+ #: components/youtube/html_templates/form-feed.php:47
56
+ #| msgid "Account:"
57
+ msgid "Account"
58
+ msgstr "Аккаунт"
59
+
60
+ #: components/instagram/includes/class-instagram-feed.php:780
61
+ msgid ""
62
+ "Account not found or for this account there are restrictions on Instagram by "
63
+ "age"
64
+ msgstr ""
65
+ "Аккаунт не найден или для этого аккаунта действуют возрастные ограничения"
66
+
67
+ #: components/facebook/html_templates/accounts.php:36
68
+ #: components/facebook/html_templates/feeds.php:21
69
+ #: components/instagram/html_templates/accounts.php:39
70
+ #: components/instagram/html_templates/accounts.php:87
71
+ #: components/instagram/html_templates/feeds.php:21
72
+ #: components/youtube/html_templates/accounts.php:57
73
+ #: components/youtube/html_templates/feeds.php:21
74
+ msgid "Action"
75
+ msgstr "Действия"
76
+
77
+ #: admin/views/page-license.php:11 admin/views/page-showcase-license.php:11
78
+ #, php-format
79
+ msgid "Activate %s"
80
+ msgstr "Активировать %s"
81
+
82
+ #: admin/views/page-license.php:84 admin/views/page-showcase-license.php:84
83
+ msgid "active sites"
84
+ msgstr "активных сайтов"
85
+
86
+ #: components/facebook/html_templates/accounts.php:15
87
+ #: components/facebook/html_templates/accounts.php:20
88
+ #: components/instagram/html_templates/accounts.php:18
89
+ #: components/instagram/html_templates/accounts.php:22
90
+ msgid "Add Account"
91
+ msgstr "Добавить аккаунт"
92
+
93
+ #: components/facebook/html_templates/form-feed.php:48
94
+ #: components/instagram/html_templates/form-feed.php:80
95
+ #: components/instagram/html_templates/form-feed.php:102
96
+ #: components/youtube/html_templates/form-feed.php:48
97
+ msgid "Add account in settings"
98
+ msgstr "Добавить аккаунт в настройках"
99
+
100
+ #: components/youtube/html_templates/accounts.php:31
101
+ #: components/youtube/html_templates/accounts.php:108
102
+ msgid "Add channel"
103
+ msgstr "Добавить канал"
104
+
105
+ #: components/facebook/html_templates/feeds.php:12
106
+ #: components/facebook/html_templates/form-feed.php:17
107
+ #: components/instagram/html_templates/feeds.php:12
108
+ #: components/instagram/html_templates/form-feed.php:19
109
+ #: components/youtube/html_templates/feeds.php:12
110
+ #: components/youtube/html_templates/form-feed.php:19
111
+ msgid "Add feed"
112
+ msgstr "Добавить ленту"
113
+
114
+ #: components/youtube/html_templates/widget_settings.php:36
115
+ msgid "Add feed in settings"
116
+ msgstr "Добавить ленту в настройках"
117
+
118
+ #: admin/views/page-widgets.php:57
119
+ msgid "Add instagram account in plugin settings"
120
+ msgstr "Добавить аккаунт инстаграм в настройках"
121
+
122
+ #: components/youtube/html_templates/accounts.php:92
123
+ msgid "Add Youtube channel"
124
+ msgstr "Добавить Youtube канал"
125
+
126
+ #: components/instagram/html_templates/form-feed.php:300
127
+ msgid "Allow words"
128
+ msgstr "Разрешенные слова"
129
+
130
+ #: components/facebook/includes/Api/facebook-api.php:64
131
+ msgid "API ERROR: Failed to parse data."
132
+ msgstr "Ошибка API: Не удалось проанализировать данные."
133
+
134
+ #: admin/pages/profiles.php:124 admin/pages/profiles.php:130
135
+ #: admin/pages/profiles.php:136
136
+ msgid "Are you sure want to delete this account?"
137
+ msgstr "Вы уверены, что хотите удалить этот аккаунт?"
138
+
139
+ #: admin/pages/feeds.php:85
140
+ msgid "Are you sure want to delete this feed?"
141
+ msgstr "Вы уверены, что хотите удалить эту ленту?"
142
+
143
+ #: components/instagram/html_templates/form-feed.php:268
144
+ msgid "Available in PRO version."
145
+ msgstr "Доступно в PRO версии"
146
+
147
+ #: admin/views/page-about.php:173
148
+ msgid "BENEFITS"
149
+ msgstr "BENEFITS"
150
+
151
+ #: components/instagram/html_templates/form-feed.php:129
152
+ msgid "Block Users"
153
+ msgstr "Заблокированные пользователи"
154
+
155
+ #: components/instagram/html_templates/form-feed.php:291
156
+ #: components/youtube/html_templates/form-feed.php:179
157
+ #: components/youtube/html_templates/widget_settings.php:154
158
+ msgid "Block words"
159
+ msgstr "Запрещённые слова"
160
+
161
+ #: components/instagram/html_templates/form-feed.php:46
162
+ #: components/instagram/html_templates/form-feed.php:91
163
+ msgid "Business account"
164
+ msgstr "Бизнес аккаунт"
165
+
166
+ #: components/instagram/html_templates/accounts.php:79
167
+ msgid "Business Accounts"
168
+ msgstr "Бизнес аккаунты"
169
+
170
+ #: components/instagram/html_templates/form-feed.php:477
171
+ msgid "Buttons Color"
172
+ msgstr "Цвет кнопок"
173
+
174
+ #: components/instagram/includes/class-instagram-feed.php:553
175
+ msgid ""
176
+ "Can't receive images by hashtag. Please connect a business account and try "
177
+ "again."
178
+ msgstr ""
179
+ "Не удается получить изображения по хэштегу. Пожалуйста, подключите бизнес-"
180
+ "аккаунт и повторите попытку."
181
+
182
+ #: admin/views/page-license.php:138 admin/views/page-showcase-license.php:138
183
+ #, php-format
184
+ msgid ""
185
+ "Can’t find your key? Go to <a href=\"%s\" target=\"_blank\" rel=\"noopener\">"
186
+ "this page</a> and login using the e-mail address associated with your "
187
+ "purchase."
188
+ msgstr ""
189
+ "Не можете найти свой ключ? Перейдите на <a href=\"%s\" target=\"_blank\" "
190
+ "rel=\"noopener\">эту страницу</a> и войдите в систему, используя адрес "
191
+ "электронной почты, связанный с вашей покупкой."
192
+
193
+ #: components/instagram/html_templates/form-feed.php:543
194
+ msgid "Caption"
195
+ msgstr "Заголовок"
196
+
197
+ #: components/youtube/html_templates/accounts.php:99
198
+ msgid ""
199
+ "Channel link. Example: https://www.youtube.com/channel/UC0WP5P-"
200
+ "ufpRfjbNrmOWwLBQ"
201
+ msgstr ""
202
+ "Ссылка на канал. Пример: https://www.youtube.com/channel/UC0WP5P-"
203
+ "ufpRfjbNrmOWwLBQ"
204
+
205
+ #: components/facebook/html_templates/form-feed.php:56
206
+ #: components/instagram/html_templates/form-feed.php:137
207
+ #: components/youtube/html_templates/form-feed.php:56
208
+ msgid "Check for new images every:"
209
+ msgstr "Проверять новые изображения каждые:"
210
+
211
+ #: components/youtube/html_templates/widget_settings.php:57
212
+ msgid "Check for new posts every:"
213
+ msgstr "Проверять новые посты каждые:"
214
+
215
+ #: components/instagram/html_templates/form-feed.php:486
216
+ msgid "Columns count"
217
+ msgstr "Количество колонок"
218
+
219
+ #: components/youtube/html_templates/accounts.php:50
220
+ msgid "Connected channels"
221
+ msgstr "Подключенные каналы"
222
+
223
+ #: components/facebook/html_templates/form-feed.php:97
224
+ #: components/instagram/html_templates/form-feed.php:177
225
+ #: components/youtube/html_templates/form-feed.php:97
226
+ #: components/youtube/html_templates/widget_settings.php:42
227
+ msgid "Count of images to show:"
228
+ msgstr "Кол-во изображений для показа:"
229
+
230
+ #. Author of the plugin
231
+ msgid "creativemotion"
232
+ msgstr "creativemotion"
233
+
234
+ #: components/instagram/html_templates/form-feed.php:241
235
+ #: components/youtube/html_templates/form-feed.php:164
236
+ #: components/youtube/html_templates/widget_settings.php:147
237
+ msgid "Custom link:"
238
+ msgstr "Произвольная ссылка:"
239
+
240
+ #: components/youtube/includes/class-youtube-feed.php:64
241
+ msgid "Custom URL"
242
+ msgstr "Произвольный URL"
243
+
244
+ #: components/youtube/html_templates/form-feed.php:132
245
+ #: components/youtube/html_templates/widget_settings.php:105
246
+ msgid "Date"
247
+ msgstr "Дата"
248
+
249
+ #: components/facebook/html_templates/form-feed.php:129
250
+ #: components/instagram/html_templates/form-feed.php:210
251
+ #: components/youtube/html_templates/form-feed.php:141
252
+ #: components/youtube/html_templates/widget_settings.php:116
253
+ msgid "Date - Ascending"
254
+ msgstr "Дата - по возрастанию"
255
+
256
+ #: components/facebook/html_templates/form-feed.php:130
257
+ #: components/instagram/html_templates/form-feed.php:211
258
+ #: components/youtube/html_templates/form-feed.php:142
259
+ #: components/youtube/html_templates/widget_settings.php:117
260
+ msgid "Date - Descending"
261
+ msgstr "Дата - по убыванию"
262
+
263
+ #: admin/views/page-license.php:105 admin/views/page-showcase-license.php:105
264
+ msgid "day(s)"
265
+ msgstr "дней"
266
+
267
+ #: components/facebook/html_templates/accounts.php:63
268
+ #: components/instagram/html_templates/accounts.php:59
269
+ #: components/instagram/html_templates/accounts.php:115
270
+ #: components/youtube/html_templates/accounts.php:76
271
+ msgid "Delete"
272
+ msgstr "Удалить"
273
+
274
+ #: admin/views/page-license.php:31 admin/views/page-showcase-license.php:31
275
+ msgid "Delete Key"
276
+ msgstr "Удалить ключ"
277
+
278
+ #: components/facebook/html_templates/form-feed.php:83
279
+ #: components/instagram/html_templates/form-feed.php:164
280
+ #: components/youtube/html_templates/form-feed.php:83
281
+ msgid "Desktop"
282
+ msgstr "Десктоп"
283
+
284
+ #: components/facebook/html_templates/form-feed.php:90
285
+ #: components/instagram/html_templates/form-feed.php:171
286
+ #: components/youtube/html_templates/form-feed.php:90
287
+ msgid "Desktop settings"
288
+ msgstr "Настройки для ПК версии"
289
+
290
+ #: admin/views/page-license.php:72 admin/views/page-showcase-license.php:72
291
+ msgid "domain"
292
+ msgstr "домен"
293
+
294
+ #: components/instagram/html_templates/form-feed.php:506
295
+ msgid "Dotted"
296
+ msgstr "Пунктирный"
297
+
298
+ #: components/facebook/html_templates/form-feed.php:15
299
+ #: components/instagram/html_templates/form-feed.php:17
300
+ #: components/youtube/html_templates/form-feed.php:17
301
+ msgid "Edit feed"
302
+ msgstr "Редактирование ленты"
303
+
304
+ #: components/instagram/html_templates/form-feed.php:278
305
+ msgid "Enable author's ad"
306
+ msgstr "Включить рекламу автора"
307
+
308
+ #: components/instagram/html_templates/form-feed.php:380
309
+ msgid "Enable control buttons"
310
+ msgstr "Включить кнопки управления"
311
+
312
+ #: components/instagram/html_templates/form-feed.php:285
313
+ msgid "Enable instagram icons"
314
+ msgstr "Включить иконки инстаграм"
315
+
316
+ #: components/instagram/html_templates/form-feed.php:305
317
+ msgid ""
318
+ "Enter comma-separated words. If one of them occurs in the image description, "
319
+ "the image will be displayed"
320
+ msgstr ""
321
+ "Введите слова, разделенные запятыми. Если одно из них встречается в описании "
322
+ "изображения, изображение будет отображено"
323
+
324
+ #: components/instagram/html_templates/form-feed.php:295
325
+ #: components/youtube/html_templates/form-feed.php:183
326
+ #: components/youtube/html_templates/widget_settings.php:159
327
+ msgid ""
328
+ "Enter comma-separated words. If one of them occurs in the image description, "
329
+ "the image will not be displayed"
330
+ msgstr ""
331
+ "Введите слова, разделенные запятыми. Если одно из них встречается в описании "
332
+ "изображения, изображение не будет отображаться"
333
+
334
+ #: components/instagram/html_templates/form-feed.php:132
335
+ #, fuzzy
336
+ #| msgid ""
337
+ #| "Enter usernames separated by commas whose images you don't want to show"
338
+ msgid "Enter words separated by commas whose images you don't want to show"
339
+ msgstr ""
340
+ "Введите имена пользователей, разделенные запятыми, изображения которых вы не "
341
+ "хотите показывать"
342
+
343
+ #: admin/views/page-license.php:94 admin/views/page-showcase-license.php:94
344
+ msgid "EXPIRED!"
345
+ msgstr "ИСТЕКЛО!"
346
+
347
+ #: admin/pages/profiles.php:183
348
+ msgid "Facebook"
349
+ msgstr "Facebook"
350
+
351
+ #: components/facebook/html_templates/widget_settings.php:17
352
+ #: components/facebook/includes/class-facebook-feed.php:71
353
+ #: components/facebook/includes/class-facebook-widget.php:63
354
+ msgid "Facebook feed"
355
+ msgstr "Лента Facebook"
356
+
357
+ #: admin/pages/feeds.php:131
358
+ msgid "Facebook feeds"
359
+ msgstr "Ленты Facebook"
360
+
361
+ #: components/instagram/html_templates/form-feed.php:521
362
+ msgid "Fade"
363
+ msgstr "Затухать"
364
+
365
+ #: admin/views/page-about.php:140
366
+ msgid "FEATURES"
367
+ msgstr "FEATURES"
368
+
369
+ #: admin/views/page-about.php:254
370
+ msgid "FEEDBACK AND SUPPORT"
371
+ msgstr "FEEDBACK AND SUPPORT"
372
+
373
+ #: admin/pages/feeds.php:65 admin/pages/feeds.php:66
374
+ msgid "Feeds"
375
+ msgstr "Ленты"
376
+
377
+ #: components/instagram/html_templates/form-feed.php:58
378
+ #: components/instagram/html_templates/form-feed.php:117
379
+ #, fuzzy
380
+ #| msgid "Hashtag:"
381
+ msgid "Hashtag"
382
+ msgstr "Хэштэг:"
383
+
384
+ #: admin/views/page-license.php:120 admin/views/page-showcase-license.php:120
385
+ msgid "Have a key to activate the plugin? Paste it here:"
386
+ msgstr "У вас есть ключ для активации плагина? Вставьте его сюда:"
387
+
388
+ #: admin/views/page-license.php:118 admin/views/page-showcase-license.php:118
389
+ msgid "Have a key to activate the premium version? Paste it here:"
390
+ msgstr "У вас есть ключ для активации премиум-версии? Вставьте его сюда:"
391
+
392
+ #: components/instagram/html_templates/form-feed.php:545
393
+ msgid ""
394
+ "Hold ctrl and click the fields you want to show/hide on your slider. Leave "
395
+ "all unselected to hide them all. Default all selected."
396
+ msgstr ""
397
+ "Удерживая нажатой клавишу ctrl, щелкните поля, которые вы хотите "
398
+ "отобразить/скрыть на своем слайдере. Оставьте все невыбранными, чтобы скрыть "
399
+ "их все. По умолчанию все выбрано."
400
+
401
+ #: components/facebook/html_templates/form-feed.php:60
402
+ #: components/instagram/html_templates/form-feed.php:141
403
+ #: components/youtube/html_templates/form-feed.php:60
404
+ #: components/youtube/html_templates/widget_settings.php:62
405
+ msgid "hours"
406
+ msgstr "часов"
407
+
408
+ #: components/youtube/html_templates/accounts.php:103
409
+ msgid "How to get channel link"
410
+ msgstr "Как получить ссылку на канал"
411
+
412
+ #: admin/pages/manual.php:41
413
+ msgid "How to get Youtube API key"
414
+ msgstr "Как получить API ключ Youtube"
415
+
416
+ #. Author URI of the plugin
417
+ msgid "https://cm-wp.com/"
418
+ msgstr "https://cm-wp.com/"
419
+
420
+ #. URI of the plugin
421
+ msgid "https://cm-wp.com/instagram-slider-widget"
422
+ msgstr "https://cm-wp.com/instagram-slider-widget"
423
+
424
+ #: components/facebook/html_templates/accounts.php:33
425
+ #: components/instagram/html_templates/accounts.php:36
426
+ #: components/instagram/html_templates/accounts.php:84
427
+ #: components/youtube/html_templates/accounts.php:55
428
+ msgid "ID"
429
+ msgstr "ID"
430
+
431
+ #: components/instagram/html_templates/form-feed.php:125
432
+ msgid ""
433
+ "If you have problems displaying by hashtag, please connect your business "
434
+ "account and select display by hashtag again"
435
+ msgstr ""
436
+ "Если у вас возникли проблемы с отображением по хэштегу, пожалуйста, "
437
+ "подключите свой бизнес-аккаунт и снова выберите отображать по хэштегу"
438
+
439
+ #: components/facebook/html_templates/accounts.php:32
440
+ #: components/instagram/html_templates/accounts.php:35
441
+ #: components/instagram/html_templates/accounts.php:83
442
+ #: components/youtube/html_templates/accounts.php:54
443
+ msgid "Image"
444
+ msgstr "Аватар"
445
+
446
+ #: components/instagram/html_templates/form-feed.php:365
447
+ msgid "Image width:"
448
+ msgstr "Ширина изображения:"
449
+
450
+ #: components/instagram/html_templates/form-feed.php:395
451
+ msgid "Images size: "
452
+ msgstr "Размер изображений: "
453
+
454
+ #: admin/pages/profiles.php:178
455
+ msgid "Instagram"
456
+ msgstr "Instagram"
457
+
458
+ #: components/instagram/html_templates/widget_settings.php:17
459
+ #: components/instagram/includes/class-instagram-widget.php:53
460
+ msgid "Instagram feed"
461
+ msgstr "Лента Instagram"
462
+
463
+ #: admin/pages/feeds.php:126
464
+ msgid "Instagram feeds"
465
+ msgstr "Ленты Instagram"
466
+
467
+ #: admin/views/page-addon_licenses.php:60
468
+ msgid "Install"
469
+ msgstr "Установить"
470
+
471
+ #: components/instagram/html_templates/form-feed.php:388
472
+ msgid "Keep 1x1 Instagram ratio"
473
+ msgstr "Сохранять соотношение Instagram 1x1"
474
+
475
+ #: admin/pages/license.php:90
476
+ msgid "License"
477
+ msgstr "Лицензия"
478
+
479
+ #: admin/ajax/check-license.php:40
480
+ msgid ""
481
+ "License key is empty or license key too long (license key is 32 characters "
482
+ "long)"
483
+ msgstr ""
484
+ "Лицензионный ключ пуст или лицензионный ключ слишком длинный (длина "
485
+ "лицензионного ключа составляет 32 символа)"
486
+
487
+ #: admin/ajax/check-license.php:28
488
+ msgid "Licensing action not passed or this action is prohibited!"
489
+ msgstr "Licensing action not passed or this action is prohibited!"
490
+
491
+ #: components/facebook/html_templates/form-feed.php:138
492
+ #: components/instagram/html_templates/form-feed.php:219
493
+ #: components/youtube/html_templates/form-feed.php:150
494
+ #: components/youtube/html_templates/widget_settings.php:125
495
+ msgid "Link to"
496
+ msgstr "Ссылка на:"
497
+
498
+ #: admin/pages/log.php:89
499
+ msgid "Logs"
500
+ msgstr "Логи"
501
+
502
+ #: admin/pages/profiles.php:184
503
+ msgid "Manage Facebook accounts"
504
+ msgstr "Управление Facebook аккаунтами"
505
+
506
+ #: admin/pages/feeds.php:132
507
+ msgid "Manage Facebook feeds"
508
+ msgstr "Управление лентами Facebook"
509
+
510
+ #: admin/pages/profiles.php:179
511
+ msgid "Manage Instagram accounts"
512
+ msgstr "Управление Instagram аккаунтами"
513
+
514
+ #: admin/pages/feeds.php:127
515
+ msgid "Manage Instagram feeds"
516
+ msgstr "Управление лентами Instagram"
517
+
518
+ #: admin/pages/profiles.php:189
519
+ msgid "Manage Youtube accounts"
520
+ msgstr "Управление Youtube аккаунтами"
521
+
522
+ #: admin/pages/feeds.php:137
523
+ msgid "Manage Youtube feeds"
524
+ msgstr "Управление лентами Youtube"
525
+
526
+ #: components/youtube/html_templates/form-feed.php:214
527
+ msgid "max is 10"
528
+ msgstr "максимум 10"
529
+
530
+ #: components/instagram/html_templates/form-feed.php:346
531
+ #: components/youtube/html_templates/widget_settings.php:97
532
+ msgid "max is 10 ( only for thumbnails template )"
533
+ msgstr "максимум 10 (только для шаблона thumbnails)"
534
+
535
+ #: components/facebook/html_templates/form-feed.php:107
536
+ #: components/instagram/html_templates/form-feed.php:187
537
+ #: components/youtube/html_templates/form-feed.php:107
538
+ #: components/youtube/html_templates/widget_settings.php:49
539
+ msgid "Maximum 20 images in free version."
540
+ msgstr "Максимум 20 изображений в бесплатной версии"
541
+
542
+ #: components/facebook/html_templates/form-feed.php:84
543
+ #: components/instagram/html_templates/form-feed.php:165
544
+ #: components/youtube/html_templates/form-feed.php:84
545
+ msgid "Mobile"
546
+ msgstr "Мобильные"
547
+
548
+ msgid "Mobile settings"
549
+ msgstr "Мобильные настройки"
550
+
551
+ #: components/facebook/html_templates/form-feed.php:216
552
+ #: components/instagram/html_templates/form-feed.php:555
553
+ #: components/youtube/html_templates/form-feed.php:225
554
+ msgid "Mobile settings available only in premium version"
555
+ msgstr "Мобильные настройки доступны только в премиум-версии"
556
+
557
+ #: components/facebook/html_templates/accounts.php:16
558
+ #: components/instagram/html_templates/accounts.php:19
559
+ #: components/youtube/html_templates/accounts.php:40
560
+ #, php-format
561
+ msgid "More accounts in <a href='%s'>PRO version</a>"
562
+ msgstr "Больше аккаунтов в <a href='%s'>PRO версии</a>"
563
+
564
+ #: components/facebook/html_templates/form-feed.php:108
565
+ #: components/instagram/html_templates/form-feed.php:188
566
+ #: components/instagram/html_templates/form-feed.php:269
567
+ #: components/youtube/html_templates/form-feed.php:108
568
+ #: components/youtube/html_templates/widget_settings.php:50
569
+ #, php-format
570
+ msgid "More in <a href='%s'>PRO version</a>"
571
+ msgstr "Больше в <a href='%s'>PRO версии</a>"
572
+
573
+ #: components/instagram/html_templates/form-feed.php:426
574
+ #: components/instagram/html_templates/form-feed.php:532
575
+ msgid "ms"
576
+ msgstr "мс"
577
+
578
+ #: components/facebook/html_templates/accounts.php:34
579
+ #: components/facebook/html_templates/feeds.php:19
580
+ #: components/instagram/html_templates/feeds.php:19
581
+ #: components/youtube/html_templates/accounts.php:56
582
+ #: components/youtube/html_templates/feeds.php:19
583
+ msgid "Name"
584
+ msgstr "Имя"
585
+
586
+ #: components/facebook/html_templates/feeds.php:55
587
+ #: components/instagram/html_templates/feeds.php:55
588
+ #: components/youtube/html_templates/feeds.php:55
589
+ msgid "No feeds"
590
+ msgstr "Нет лент"
591
+
592
+ #: components/instagram/includes/class-instagram-feed.php:493
593
+ #: components/youtube/includes/class-youtube-feed.php:224
594
+ msgid "No images found"
595
+ msgstr "Изображения не найдены"
596
+
597
+ #: components/instagram/html_templates/form-feed.php:510
598
+ msgid "No Navigation"
599
+ msgstr "Без навигации"
600
+
601
+ #: components/facebook/includes/class-facebook-feed.php:217
602
+ msgid "No posts found"
603
+ msgstr "Посты не найдены"
604
+
605
+ #: components/youtube/includes/class-youtube-feed.php:65
606
+ msgid "None"
607
+ msgstr "Нет"
608
+
609
+ #: components/instagram/includes/class-instagram-feed.php:329
610
+ #: components/youtube/includes/class-youtube-feed.php:168
611
+ msgid "Nothing to search for"
612
+ msgstr "Нечего искать"
613
+
614
+ #: components/instagram/html_templates/form-feed.php:342
615
+ #: components/youtube/html_templates/form-feed.php:210
616
+ #: components/youtube/html_templates/widget_settings.php:92
617
+ msgid "Number of Columns:"
618
+ msgstr "Кол-во колонок:"
619
+
620
+ #: components/facebook/html_templates/form-feed.php:117
621
+ #: components/instagram/html_templates/form-feed.php:198
622
+ #: components/youtube/html_templates/form-feed.php:117
623
+ msgid "Number of words in caption:"
624
+ msgstr "Кол-во слов в тексте:"
625
+
626
+ #: admin/views/page-license.php:82 admin/views/page-showcase-license.php:82
627
+ msgid "of"
628
+ msgstr "из"
629
+
630
+ #: components/instagram/html_templates/form-feed.php:443
631
+ msgid "Offset"
632
+ msgstr "Offset"
633
+
634
+ #: components/facebook/html_templates/form-feed.php:127
635
+ #: components/instagram/html_templates/form-feed.php:208
636
+ #: components/youtube/html_templates/form-feed.php:139
637
+ #: components/youtube/html_templates/widget_settings.php:113
638
+ msgid "Order by"
639
+ msgstr "Сортировка"
640
+
641
+ #: components/instagram/html_templates/form-feed.php:455
642
+ msgid "Pattern"
643
+ msgstr "Pattern"
644
+
645
+ #: components/facebook/html_templates/form-feed.php:102
646
+ #: components/facebook/html_templates/form-feed.php:122
647
+ #: components/instagram/html_templates/form-feed.php:182
648
+ #: components/instagram/html_templates/form-feed.php:203
649
+ #: components/instagram/html_templates/form-feed.php:413
650
+ #: components/youtube/html_templates/form-feed.php:102
651
+ #: components/youtube/html_templates/form-feed.php:122
652
+ msgid "pcs"
653
+ msgstr "шт"
654
+
655
+ #: components/instagram/html_templates/accounts.php:31
656
+ msgid "Personal Accounts"
657
+ msgstr "Личные аккаунты"
658
+
659
+ #: components/instagram/html_templates/form-feed.php:468
660
+ msgid "Phone"
661
+ msgstr "Телефон"
662
+
663
+ #: components/instagram/html_templates/form-feed.php:408
664
+ msgid "Pictures per slide:"
665
+ msgstr "Изображений на слайд:"
666
+
667
+ #: admin/views/page-license.php:76 admin/views/page-showcase-license.php:76
668
+ msgid "plan"
669
+ msgstr "план"
670
+
671
+ #: admin/views/page-license.php:95 admin/views/page-showcase-license.php:95
672
+ msgid "please update the key"
673
+ msgstr ""
674
+
675
+ #: admin/pages/log.php:77
676
+ msgid "Plugin logs"
677
+ msgstr "Логи плагина"
678
+
679
+ #: components/facebook/html_templates/form-feed.php:131
680
+ #: components/instagram/html_templates/form-feed.php:212
681
+ #: components/youtube/html_templates/form-feed.php:143
682
+ #: components/youtube/html_templates/widget_settings.php:118
683
+ msgid "Popularity - Ascending"
684
+ msgstr "Популярность - по возрастанию"
685
+
686
+ #: components/facebook/html_templates/form-feed.php:132
687
+ #: components/instagram/html_templates/form-feed.php:213
688
+ #: components/youtube/html_templates/form-feed.php:144
689
+ #: components/youtube/html_templates/widget_settings.php:119
690
+ msgid "Popularity - Descending"
691
+ msgstr "Популярность - по убыванию"
692
+
693
+ #: components/facebook/html_templates/form-feed.php:198
694
+ msgid "Post width:"
695
+ msgstr "Ширина поста:"
696
+
697
+ #: components/instagram/html_templates/form-feed.php:501
698
+ msgid "Prev & Next"
699
+ msgstr "Предыдущий & Следующий"
700
+
701
+ #: admin/views/page-about.php:196
702
+ msgid "PRO VERSION"
703
+ msgstr "PRO ВЕРСИЯ"
704
+
705
+ #: admin/pages/profiles.php:79
706
+ msgid "Profiles"
707
+ msgstr "Профили"
708
+
709
+ #: admin/views/page-license.php:54 admin/views/page-showcase-license.php:54
710
+ msgid ""
711
+ "Public License is a GPLv2 compatible license allowing you to change and use "
712
+ "this version of the plugin for free. Please keep in mind this license covers "
713
+ "only free edition of the plugin. Premium versions are distributed with other "
714
+ "type of a license."
715
+ msgstr ""
716
+
717
+ #: components/facebook/html_templates/form-feed.php:191
718
+ #: components/facebook/html_templates/form-feed.php:203
719
+ #: components/instagram/html_templates/form-feed.php:358
720
+ #: components/instagram/html_templates/form-feed.php:370
721
+ #: components/instagram/html_templates/form-feed.php:400
722
+ msgid "px"
723
+ msgstr "px"
724
+
725
+ #: components/facebook/html_templates/form-feed.php:133
726
+ #: components/instagram/html_templates/form-feed.php:214
727
+ #: components/youtube/html_templates/form-feed.php:145
728
+ #: components/youtube/html_templates/widget_settings.php:120
729
+ msgid "Random"
730
+ msgstr "Рандом"
731
+
732
+ #: components/youtube/html_templates/form-feed.php:133
733
+ #: components/youtube/html_templates/widget_settings.php:106
734
+ msgid "Rating"
735
+ msgstr "Рейтинг"
736
+
737
+ #: admin/views/page-addon_licenses.php:57
738
+ msgid "Read more"
739
+ msgstr ""
740
+
741
+ #: admin/views/page-widgets.php:14
742
+ msgid "Recommended widget templates"
743
+ msgstr "Рекомендованные шаблоны виджетов"
744
+
745
+ #: components/youtube/html_templates/form-feed.php:131
746
+ #: components/youtube/html_templates/widget_settings.php:104
747
+ msgid "Relevance"
748
+ msgstr "Релевантность"
749
+
750
+ #: admin/views/page-license.php:107 admin/views/page-showcase-license.php:107
751
+ msgid "remained"
752
+ msgstr ""
753
+
754
+ #: components/youtube/html_templates/form-feed.php:128
755
+ #: components/youtube/html_templates/widget_settings.php:101
756
+ msgid "Request videos by:"
757
+ msgstr "Сортировать видео по:"
758
+
759
+ #: components/facebook/html_templates/form-feed.php:222
760
+ #: components/instagram/html_templates/form-feed.php:562
761
+ #: components/youtube/html_templates/accounts.php:22
762
+ #: components/youtube/html_templates/accounts.php:39
763
+ #: components/youtube/html_templates/form-feed.php:231
764
+ msgid "Save"
765
+ msgstr "Сохранить"
766
+
767
+ #: components/instagram/html_templates/form-feed.php:35
768
+ #, fuzzy
769
+ #| msgid "Search Instagram for:"
770
+ msgid "Search Instagram for"
771
+ msgstr "Искать в Instagram по:"
772
+
773
+ #: admin/views/page-addon_licenses.php:53
774
+ msgid "Settings"
775
+ msgstr "Настройки"
776
+
777
+ #: components/facebook/html_templates/feeds.php:20
778
+ #: components/instagram/html_templates/feeds.php:20
779
+ #: components/youtube/html_templates/feeds.php:20
780
+ msgid "Shortcode"
781
+ msgstr "Шорткод"
782
+
783
+ #: admin/views/page-widgets.php:34
784
+ msgid "Shortcode for this widget"
785
+ msgstr "Шорткод для этого виджета"
786
+
787
+ #: components/facebook/html_templates/form-feed.php:69
788
+ #: components/instagram/html_templates/form-feed.php:150
789
+ #: components/youtube/html_templates/form-feed.php:69
790
+ msgid "Shortcode of this feed:"
791
+ msgstr "Шорткод для этой ленты:"
792
+
793
+ #: components/youtube/html_templates/widget_settings.php:166
794
+ msgid "Shortcode of this Widget:"
795
+ msgstr "Шорткод виджета:"
796
+
797
+ #: components/facebook/html_templates/form-feed.php:157
798
+ #: components/instagram/html_templates/form-feed.php:252
799
+ #: components/youtube/html_templates/form-feed.php:174
800
+ msgid "Show feed header"
801
+ msgstr "Отображать шапку"
802
+
803
+ #: components/youtube/html_templates/widget_settings.php:66
804
+ msgid "Show feed header:"
805
+ msgstr "Отображать шапку:"
806
+
807
+ #: components/instagram/html_templates/form-feed.php:262
808
+ msgid "Show Stories"
809
+ msgstr "Показать Stories"
810
+
811
+ #. Description of the plugin
812
+ msgid ""
813
+ "Shows Instagram, Facebook and YouTube responsive feeds in widgets, posts, "
814
+ "pages, or anywhere else using shortcodes"
815
+ msgstr ""
816
+ "Показывает адаптивную ленту Instagram, Facebook и YouTube в виджетах, постах,"
817
+ " страницах или где-либо еще с использованием шорткодов"
818
+
819
+ #: components/instagram/html_templates/form-feed.php:517
820
+ msgid "Slide"
821
+ msgstr "Слайд"
822
+
823
+ #: components/instagram/html_templates/form-feed.php:527
824
+ msgid "Slide Speed:"
825
+ msgstr "Скорость перелистывания:"
826
+
827
+ #: components/instagram/html_templates/form-feed.php:514
828
+ msgid "Slider Animation:"
829
+ msgstr "Анимация слайдера:"
830
+
831
+ #: components/instagram/html_templates/form-feed.php:498
832
+ msgid "Slider Navigation Controls:"
833
+ msgstr "Навигация слайдера:"
834
+
835
+ #: components/instagram/html_templates/form-feed.php:537
836
+ msgid "Slider Text Description:"
837
+ msgstr "Описание слайдера"
838
+
839
+ #: components/instagram/html_templates/form-feed.php:421
840
+ msgid "Sliding speed:"
841
+ msgstr "Скорость перелистывания:"
842
+
843
+ #: admin/pages/profiles.php:78
844
+ msgid "Social profiles"
845
+ msgstr "Профили соцсетей"
846
+
847
+ #: components/instagram/includes/class-instagram-feed.php:132
848
+ msgid "Social Slider"
849
+ msgstr "Social Slider"
850
+
851
+ #: components/facebook/includes/class-facebook-widget.php:53
852
+ msgid "Social Slider - Facebook"
853
+ msgstr "Social Slider - Facebook"
854
+
855
+ #: components/instagram/includes/class-instagram-widget.php:43
856
+ msgid "Social Slider - Instagram"
857
+ msgstr "Social Slider - Instagram"
858
+
859
+ #. Name of the plugin
860
+ #: instagram-slider-widget.php:29
861
+ msgid "Social Slider Feed"
862
+ msgstr "Social Slider Feed"
863
+
864
+ #: admin/pages/feeds.php:63 admin/pages/feeds.php:64 admin/pages/widgets.php:96
865
+ #: admin/pages/widgets.php:97
866
+ msgid "Social Slider Feeds"
867
+ msgstr "Social Slider Feeds"
868
+
869
+ #: components/facebook/includes/Api/facebook-api.php:56
870
+ msgid "Something went wrong"
871
+ msgstr "Что-то пошло не так"
872
+
873
+ #: components/facebook/includes/Api/facebook-api.php:70
874
+ msgid "Something went wrong. API error"
875
+ msgstr "Что-то пошло не так. Ошибка API"
876
+
877
+ #: components/instagram/html_templates/form-feed.php:435
878
+ #, fuzzy
879
+ #| msgid "Space between pictures:"
880
+ msgid "Space between pictures"
881
+ msgstr "Расстояние между изображениями:"
882
+
883
+ #: admin/views/page-license.php:126 admin/views/page-showcase-license.php:126
884
+ msgid "Submit Key"
885
+ msgstr "Отправить"
886
+
887
+ #: components/youtube/html_templates/feed_header_template.php:29
888
+ msgid "subscribe"
889
+ msgstr ""
890
+
891
+ #: components/youtube/html_templates/feed_header_template.php:8
892
+ msgid "subscribers"
893
+ msgstr ""
894
+
895
+ #: admin/ajax/check-license.php:56
896
+ msgid "Subscription success cancelled"
897
+ msgstr ""
898
+
899
+ #: components/instagram/html_templates/accounts.php:120
900
+ msgid "Successfully connected"
901
+ msgstr ""
902
+
903
+ #: admin/views/page-license.php:35 admin/views/page-showcase-license.php:35
904
+ msgid "Synchronization"
905
+ msgstr "Синхронизация"
906
+
907
+ #: components/facebook/html_templates/form-feed.php:164
908
+ #: components/instagram/html_templates/form-feed.php:311
909
+ #: components/youtube/html_templates/form-feed.php:189
910
+ #: components/youtube/html_templates/widget_settings.php:77
911
+ msgid "Template"
912
+ msgstr "Шаблон"
913
+
914
+ #: admin/ajax/check-license.php:52
915
+ msgid "The license has been updated"
916
+ msgstr "Лицензия обновлена"
917
+
918
+ #: admin/ajax/check-license.php:48
919
+ msgid "The license is deactivated"
920
+ msgstr "Лицензия деактивирована"
921
+
922
+ #: components/instagram/includes/class-instagram-feed.php:405
923
+ #: components/instagram/includes/class-instagram-feed.php:433
924
+ #: components/youtube/includes/class-youtube-feed.php:214
925
+ msgid "There are no publications in this account yet"
926
+ msgstr "В этом аккаунте пока нет публикаций"
927
+
928
+ #: components/instagram/html_templates/form-feed.php:542
929
+ msgid "Time"
930
+ msgstr "Время"
931
+
932
+ #: components/facebook/html_templates/form-feed.php:26
933
+ #: components/facebook/html_templates/widget_settings.php:11
934
+ #: components/instagram/html_templates/form-feed.php:28
935
+ #: components/instagram/html_templates/widget_settings.php:11
936
+ #: components/youtube/html_templates/form-feed.php:28
937
+ #: components/youtube/html_templates/widget_settings.php:16
938
+ msgid "Title:"
939
+ msgstr "Заголовок:"
940
+
941
+ #: components/facebook/html_templates/accounts.php:35
942
+ #: components/instagram/html_templates/accounts.php:38
943
+ #: components/instagram/html_templates/accounts.php:86
944
+ msgid "Token"
945
+ msgstr "Токен"
946
+
947
+ #: components/youtube/html_templates/form-feed.php:135
948
+ #: components/youtube/html_templates/widget_settings.php:108
949
+ msgid "Unspecified"
950
+ msgstr "По умолчанию"
951
+
952
+ #: admin/views/page-license.php:22 admin/views/page-showcase-license.php:22
953
+ msgid "Upgrade to Premium"
954
+ msgstr ""
955
+
956
+ #: components/instagram/html_templates/form-feed.php:155
957
+ msgid ""
958
+ "Use this shortcode in any page or post to display images with this "
959
+ "configuration!"
960
+ msgstr ""
961
+ "Используйте этот шорткод на любой странице или публикации для отображения "
962
+ "изображений с такой конфигурацией!"
963
+
964
+ #: components/facebook/html_templates/form-feed.php:74
965
+ #: components/youtube/html_templates/form-feed.php:74
966
+ #: components/youtube/html_templates/widget_settings.php:170
967
+ msgid ""
968
+ "Use this shortcode in any page or post to display images with this widget "
969
+ "configuration!"
970
+ msgstr ""
971
+ "Используйте этот шорткод на любой странице или посте для отображения "
972
+ "изображений с этой конфигурацией виджета."
973
+
974
+ #: components/instagram/html_templates/accounts.php:37
975
+ #: components/instagram/html_templates/accounts.php:85
976
+ msgid "User"
977
+ msgstr "Аккаунт"
978
+
979
+ #: components/youtube/html_templates/feed_header_template.php:8
980
+ msgid "user has hidden the number of followers"
981
+ msgstr "пользователь скрыл количество подписчиков"
982
+
983
+ #: components/instagram/html_templates/form-feed.php:52
984
+ #: components/instagram/html_templates/form-feed.php:108
985
+ #: components/instagram/html_templates/form-feed.php:541
986
+ msgid "Username"
987
+ msgstr "Имя пользователя"
988
+
989
+ #: admin/views/page-license.php:89 admin/views/page-showcase-license.php:89
990
+ msgid "version"
991
+ msgstr "версия"
992
+
993
+ #: components/facebook/html_templates/form-feed.php:186
994
+ #: components/instagram/html_templates/form-feed.php:353
995
+ msgid "Vertical space between item elements:"
996
+ msgstr "Вертикальное расстояние между элементами:"
997
+
998
+ #: components/youtube/html_templates/form-feed.php:134
999
+ #: components/youtube/html_templates/widget_settings.php:107
1000
+ msgid "View count"
1001
+ msgstr "Количество просмотров"
1002
+
1003
+ #: components/youtube/html_templates/default.php:27
1004
+ msgid "views"
1005
+ msgstr "просмотров"
1006
+
1007
+ #: admin/views/page-about.php:265
1008
+ msgid "WHY DO YOU NEED IT?"
1009
+ msgstr "WHY DO YOU NEED IT?"
1010
+
1011
+ #: admin/pages/widgets.php:98 admin/pages/widgets.php:99
1012
+ msgid "Widgets"
1013
+ msgstr "Виджеты"
1014
+
1015
+ #: components/instagram/html_templates/form-feed.php:266
1016
+ msgid "Works only with business account."
1017
+ msgstr "Работает только с бизнес-аккаунтом."
1018
+
1019
+ #: admin/pages/widgets.php:177
1020
+ #, php-format
1021
+ msgid ""
1022
+ "You don't have any Social Slider Feeds. Go to the Wordpress <a href='%1s'>"
1023
+ "Widgets</a> page and add it."
1024
+ msgstr ""
1025
+
1026
+ #: admin/pages/feeds.php:87
1027
+ msgid ""
1028
+ "You haven't finished adding the feed. Are you sure you want to close the "
1029
+ "window?"
1030
+ msgstr ""
1031
+
1032
+ #: admin/views/page-license.php:58 admin/views/page-showcase-license.php:58
1033
+ msgid ""
1034
+ "You use a paid subscription for the plugin updates. In case you don’t want "
1035
+ "to receive paid updates, please, click <a data-action=\"unsubscribe\" "
1036
+ "class=\"wis-control-btn\" href=\"#\">cancel subscription</a>"
1037
+ msgstr ""
1038
+
1039
+ #: admin/views/page-license.php:25 admin/views/page-showcase-license.php:25
1040
+ #, php-format
1041
+ msgid "Your current license for %1$s:"
1042
+ msgstr ""
1043
+
1044
+ #: admin/ajax/check-license.php:43
1045
+ msgid "Your license has been successfully activated"
1046
+ msgstr ""
1047
+
1048
+ #: admin/views/page-license.php:64 admin/views/page-showcase-license.php:64
1049
+ msgid ""
1050
+ "Your license has expired, please extend the license to get updates and "
1051
+ "support."
1052
+ msgstr ""
1053
+
1054
+ #: admin/pages/profiles.php:188
1055
+ msgid "Youtube"
1056
+ msgstr "Youtube"
1057
+
1058
+ #: components/youtube/html_templates/accounts.php:18
1059
+ msgid "Youtube api key."
1060
+ msgstr "API ключ Youtube"
1061
+
1062
+ #: components/youtube/html_templates/widget_settings.php:26
1063
+ #: components/youtube/includes/class-youtube-feed.php:69
1064
+ #: components/youtube/includes/class-youtube-widget.php:67
1065
+ msgid "Youtube feed"
1066
+ msgstr "Лента Youtube"
1067
+
1068
+ #: admin/pages/feeds.php:136
1069
+ msgid "Youtube feeds"
1070
+ msgstr "Ленты Youtube"
1071
+
1072
+ #: components/youtube/includes/class-youtube-feed.php:63
1073
+ msgid "Youtube link"
1074
+ msgstr "Ссылка на Youtube"
languages/instagram-slider-widget.pot CHANGED
@@ -1,629 +1,1033 @@
1
- #, fuzzy
2
- msgid ""
3
- msgstr ""
4
- "Project-Id-Version: Social Slider Widget\n"
5
- "Report-Msgid-Bugs-To: \n"
6
- "POT-Creation-Date: 2019-11-08 05:43+0000\n"
7
- "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
- "Language-Team: \n"
10
- "Language: \n"
11
- "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
12
- "MIME-Version: 1.0\n"
13
- "Content-Type: text/plain; charset=UTF-8\n"
14
- "Content-Transfer-Encoding: 8bit\n"
15
- "X-Generator: Loco https://localise.biz/\n"
16
- "X-Loco-Version: 2.3.1; wp-5.2.4"
17
-
18
- #: includes/class-wis_instagram_slider.php:283
19
- msgid " Turn on to save Instagram Images into WordPress media library."
20
- msgstr ""
21
-
22
- #: includes/class-wis_instagram_slider.php:450
23
- msgid ""
24
- "* use this field only if the above option is set to <strong>Custom "
25
- "Link</strong>"
26
- msgstr ""
27
-
28
- #: includes/class-wis_instagram_slider.php:94
29
- msgid ""
30
- "1. Drag Social Slider Widget here. 2. Fill in the fields and hit save. 3. "
31
- "Copy the shortocde generated at the bottom of the widget form and use it on "
32
- "posts or pages."
33
- msgstr ""
34
-
35
- #: includes/class-wis_instagram_slider.php:394
36
- msgid "1000 milliseconds = 1 second"
37
- msgstr ""
38
-
39
- #: admin/views/tab-license.php:134
40
- #, php-format
41
- msgid ""
42
- "<a href=\"%s\" target=\"_blank\" rel=\"noopener\">Lean more</a> about the "
43
- "premium version and get the license key to activate it now!"
44
- msgstr ""
45
-
46
- #: includes/class-wis_instagram_slider.php:422
47
- msgid ""
48
- "<strong>Square - Cropped</strong> - option will show square cropped images "
49
- "in 640x640 pixels. <br/><strong>Original - No Crop</strong> - will display "
50
- "the original user uploaded image size."
51
- msgstr ""
52
-
53
- #: includes/class-wis_instagram_slider.php:42
54
- msgid "A widget that displays a slider with instagram images "
55
- msgstr ""
56
-
57
- #: admin/pages/about.php:44
58
- msgid "About"
59
- msgstr ""
60
-
61
- #: admin/pages/about.php:43
62
- msgid "About Social Slider Widget"
63
- msgstr ""
64
-
65
- #: includes/class-wis_instagram_slider.php:1552
66
- msgid "Account deleted successfully"
67
- msgstr ""
68
-
69
- #: includes/class-wis_instagram_slider.php:1131
70
- msgid ""
71
- "Account not found or for this account there are restrictions on Instagram by "
72
- "age"
73
- msgstr ""
74
-
75
- #: includes/class-wis_instagram_slider.php:250
76
- msgid "Account:"
77
- msgstr ""
78
-
79
- #: admin/views/tab-settings.php:51
80
- msgid "Action"
81
- msgstr ""
82
-
83
- #: admin/views/tab-license.php:11
84
- #, php-format
85
- msgid "Activate %s"
86
- msgstr ""
87
-
88
- #: admin/views/tab-license.php:84
89
- msgid "active sites"
90
- msgstr ""
91
-
92
- #: admin/views/tab-settings.php:32 admin/views/tab-settings.php:36
93
- msgid "Add Account"
94
- msgstr ""
95
-
96
- #: includes/class-wis_instagram_slider.php:267
97
- msgid "Add account in settings"
98
- msgstr ""
99
-
100
- #: includes/class-wis-plugin.php:127
101
- msgid "Are you sure want to delete this account?"
102
- msgstr ""
103
-
104
- #: includes/class-wis_instagram_slider.php:441
105
- msgid "Attachment Page"
106
- msgstr ""
107
-
108
- #: admin/views/tab-about.php:149
109
- msgid "BENEFITS"
110
- msgstr ""
111
-
112
- #: includes/class-wis_instagram_slider.php:275
113
- msgid "Block Users"
114
- msgstr ""
115
-
116
- #: admin/views/tab-license.php:138
117
- #, php-format
118
- msgid ""
119
- "Can’t find your key? Go to <a href=\"%s\" target=\"_blank\" rel=\"noopener\">"
120
- "this page</a> and login using the e-mail address associated with your "
121
- "purchase."
122
- msgstr ""
123
-
124
- #: includes/class-wis_instagram_slider.php:400
125
- msgid "Caption"
126
- msgstr ""
127
-
128
- #: includes/class-wis_instagram_slider.php:305
129
- msgid "Check for new images every:"
130
- msgstr ""
131
-
132
- #: includes/class-wis_instagram_slider.php:293
133
- msgid "Count of images to show:"
134
- msgstr ""
135
-
136
- #. Author of the plugin
137
- msgid "creativemotion"
138
- msgstr ""
139
-
140
- #: includes/class-wis_instagram_slider.php:442
141
- msgid "Custom Link"
142
- msgstr ""
143
-
144
- #: includes/class-wis_instagram_slider.php:448
145
- msgid "Custom link:"
146
- msgstr ""
147
-
148
- #: includes/class-wis_instagram_slider.php:427
149
- msgid "Date - Ascending"
150
- msgstr ""
151
-
152
- #: includes/class-wis_instagram_slider.php:428
153
- msgid "Date - Descending"
154
- msgstr ""
155
-
156
- #: admin/views/tab-license.php:105
157
- msgid "day(s)"
158
- msgstr ""
159
-
160
- #: admin/views/tab-settings.php:72
161
- msgid "Delete"
162
- msgstr ""
163
-
164
- #: admin/views/tab-license.php:31
165
- msgid "Delete Key"
166
- msgstr ""
167
-
168
- #: admin/views/tab-about.php:123
169
- msgid ""
170
- "Display Instagram feeds in widgets, posts, pages, or anywhere else using "
171
- "shortcodes."
172
- msgstr ""
173
-
174
- #: admin/views/tab-license.php:72
175
- msgid "domain"
176
- msgstr ""
177
-
178
- #: includes/class-wis_instagram_slider.php:384
179
- msgid "Dotted"
180
- msgstr ""
181
-
182
- #: includes/class-wis_instagram_slider.php:277
183
- msgid "Enter usernames separated by commas whose images you don't want to show"
184
- msgstr ""
185
-
186
- #: admin/views/tab-license.php:94
187
- msgid "EXPIRED!"
188
- msgstr ""
189
-
190
- #: includes/class-wis_instagram_slider.php:389
191
- msgid "Fade"
192
- msgstr ""
193
-
194
- #: admin/views/tab-about.php:128
195
- msgid "FEATURES"
196
- msgstr ""
197
-
198
- #: admin/views/tab-about.php:200
199
- msgid "FEEDBACK AND SUPPORT"
200
- msgstr ""
201
-
202
- #: includes/class-wis_instagram_slider.php:420
203
- msgid "Full Size"
204
- msgstr ""
205
-
206
- #: admin/pages/settings.php:148
207
- msgid "General"
208
- msgstr ""
209
-
210
- #: includes/class-wis_instagram_slider.php:272
211
- msgid "Hashtag:"
212
- msgstr ""
213
-
214
- #: admin/views/tab-license.php:120
215
- msgid "Have a key to activate the plugin? Paste it here:"
216
- msgstr ""
217
-
218
- #: admin/views/tab-license.php:118
219
- msgid "Have a key to activate the premium version? Paste it here:"
220
- msgstr ""
221
-
222
- #: includes/class-wis_instagram_slider.php:402
223
- msgid ""
224
- "Hold ctrl and click the fields you want to show/hide on your slider. Leave "
225
- "all unselected to hide them all. Default all selected."
226
- msgstr ""
227
-
228
- #: includes/class-wis_instagram_slider.php:307
229
- msgid "hours"
230
- msgstr ""
231
-
232
- #. Author URI of the plugin
233
- msgid "https://cm-wp.com/"
234
- msgstr ""
235
-
236
- #. URI of the plugin
237
- msgid "https://cm-wp.com/instagram-slider-widget"
238
- msgstr ""
239
-
240
- #: admin/views/tab-settings.php:47
241
- msgid "ID"
242
- msgstr ""
243
-
244
- #: admin/views/tab-settings.php:46
245
- msgid "Image"
246
- msgstr ""
247
-
248
- #: includes/class-wis_instagram_slider.php:415
249
- msgid "Image format"
250
- msgstr ""
251
-
252
- #: includes/class-wis_instagram_slider.php:440
253
- msgid "Image URL"
254
- msgstr ""
255
-
256
- #: includes/class-wis_instagram_slider.php:354
257
- msgid "Image width:"
258
- msgstr ""
259
-
260
- #: admin/pages/settings.php:158
261
- msgid "Instagram account"
262
- msgstr ""
263
-
264
- #: includes/class-wis_instagram_slider.php:438
265
- msgid "Instagram Image"
266
- msgstr ""
267
-
268
- #: admin/pages/settings.php:166
269
- msgid "Instagram password"
270
- msgstr ""
271
-
272
- #: includes/class-wis_instagram_slider.php:439
273
- msgid "Instagram Profile"
274
- msgstr ""
275
-
276
- #: includes/class-wis_instagram_slider.php:1161
277
- msgid ""
278
- "Instagram requires authorization to view a user profile. Use autorized "
279
- "account in widget settings"
280
- msgstr ""
281
-
282
- #: admin/pages/license.php:90
283
- msgid "License"
284
- msgstr ""
285
-
286
- #: admin/ajax/check-license.php:39
287
- msgid ""
288
- "License key is empty or license key too long (license key is 32 characters "
289
- "long)"
290
- msgstr ""
291
-
292
- #: admin/pages/license.php:91
293
- msgid "License of Social Slider Widget"
294
- msgstr ""
295
-
296
- #: admin/ajax/check-license.php:27
297
- msgid "Licensing action not passed or this action is prohibited!"
298
- msgstr ""
299
-
300
- #: includes/class-wis_instagram_slider.php:436
301
- msgid "Link to"
302
- msgstr ""
303
-
304
- #: includes/class-wis_instagram_slider.php:418
305
- msgid "Low - 320x320"
306
- msgstr ""
307
-
308
- #: includes/class-wis_instagram_slider.php:345
309
- msgid "max is 10 ( only for thumbnails template )"
310
- msgstr ""
311
-
312
- #: includes/class-wis_instagram_slider.php:297
313
- msgid "Maximum 20 images in free version."
314
- msgstr ""
315
-
316
- #: includes/class-wis_instagram_slider.php:393
317
- msgid "milliseconds"
318
- msgstr ""
319
-
320
- #: admin/views/tab-settings.php:33
321
- #, php-format
322
- msgid "More accounts in <a href='%s'>PRO version</a>"
323
- msgstr ""
324
-
325
- #: includes/class-wis_instagram_slider.php:298
326
- #, php-format
327
- msgid "More in <a href='%s'>PRO version</a>"
328
- msgstr ""
329
-
330
- #: admin/views/tab-settings.php:49
331
- msgid "Name"
332
- msgstr ""
333
-
334
- #: includes/class-wis_instagram_slider.php:1214
335
- msgid "No images found"
336
- msgstr ""
337
-
338
- #: includes/class-wis_instagram_slider.php:688
339
- msgid "No images found! <br> Try some other hashtag or username"
340
- msgstr ""
341
-
342
- #: includes/class-wis_instagram_slider.php:385
343
- msgid "No Navigation"
344
- msgstr ""
345
-
346
- #: includes/class-wis_instagram_slider.php:443
347
- msgid "None"
348
- msgstr ""
349
-
350
- #: includes/class-wis_instagram_slider.php:1100
351
- msgid "Nothing to search for"
352
- msgstr ""
353
-
354
- #: includes/class-wis_instagram_slider.php:343
355
- msgid "Number of Columns:"
356
- msgstr ""
357
-
358
- #: includes/class-wis_instagram_slider.php:410
359
- msgid "Number of words in caption:"
360
- msgstr ""
361
-
362
- #: admin/views/tab-license.php:82
363
- msgid "of"
364
- msgstr ""
365
-
366
- #: includes/class-wis_instagram_slider.php:372
367
- msgid "Offset"
368
- msgstr ""
369
-
370
- #: includes/class-wis_instagram_slider.php:425
371
- msgid "Order by"
372
- msgstr ""
373
-
374
- #: admin/pages/settings.php:168
375
- msgid "Password of your Instagram account"
376
- msgstr ""
377
-
378
- #: includes/class-wis_instagram_slider.php:376
379
- msgid "Pattern"
380
- msgstr ""
381
-
382
- #: includes/class-wis_instagram_slider.php:362
383
- msgid "pictures"
384
- msgstr ""
385
-
386
- #: includes/class-wis_instagram_slider.php:360
387
- msgid "Pictures per slide:"
388
- msgstr ""
389
-
390
- #: admin/views/tab-license.php:76
391
- msgid "plan"
392
- msgstr ""
393
-
394
- #: admin/views/tab-license.php:95
395
- msgid "please update the key"
396
- msgstr ""
397
-
398
- #: includes/class-wis_instagram_slider.php:429
399
- msgid "Popularity - Ascending"
400
- msgstr ""
401
-
402
- #: includes/class-wis_instagram_slider.php:430
403
- msgid "Popularity - Descending"
404
- msgstr ""
405
-
406
- #: includes/class-wis_instagram_slider.php:383
407
- msgid "Prev & Next"
408
- msgstr ""
409
-
410
- #: admin/views/tab-about.php:163
411
- msgid "PRO VERSION"
412
- msgstr ""
413
-
414
- #: admin/views/tab-license.php:54
415
- msgid ""
416
- "Public License is a GPLv2 compatible license allowing you to change and use "
417
- "this version of the plugin for free. Please keep in mind this license covers "
418
- "only free edition of the plugin. Premium versions are distributed with other "
419
- "type of a license."
420
- msgstr ""
421
-
422
- #: includes/class-wis_instagram_slider.php:351
423
- #: includes/class-wis_instagram_slider.php:356
424
- msgid "px"
425
- msgstr ""
426
-
427
- #: includes/class-wis_instagram_slider.php:431
428
- msgid "Random"
429
- msgstr ""
430
-
431
- #: admin/views/tab-license.php:107
432
- msgid "remained"
433
- msgstr ""
434
-
435
- #: includes/class-wis_instagram_slider.php:279
436
- msgid "Save in Media Library: "
437
- msgstr ""
438
-
439
- #: includes/class-wis_instagram_slider.php:246
440
- msgid "Search Instagram for:"
441
- msgstr ""
442
-
443
- #: admin/pages/settings.php:108
444
- msgid "Settings"
445
- msgstr ""
446
-
447
- #: admin/pages/settings.php:107
448
- msgid "Settings of Social Slider Widget"
449
- msgstr ""
450
-
451
- #: includes/class-wis_instagram_slider.php:486
452
- msgid "Shortcode of this Widget:"
453
- msgstr ""
454
-
455
- #: includes/class-wis_instagram_slider.php:311
456
- msgid "Show feed header:"
457
- msgstr ""
458
-
459
- #: includes/class-wis_instagram_slider.php:388
460
- msgid "Slide"
461
- msgstr ""
462
-
463
- #: includes/class-wis_instagram_slider.php:391
464
- msgid "Slide Speed:"
465
- msgstr ""
466
-
467
- #: includes/class-wis_instagram_slider.php:387
468
- msgid "Slider Animation:"
469
- msgstr ""
470
-
471
- #: includes/class-wis_instagram_slider.php:382
472
- msgid "Slider Navigation Controls:"
473
- msgstr ""
474
-
475
- #: includes/class-wis_instagram_slider.php:396
476
- msgid "Slider Text Description:"
477
- msgstr ""
478
-
479
- #: includes/class-wis_instagram_slider.php:40
480
- #: includes/class-wis_instagram_slider.php:204
481
- msgid "Social Slider"
482
- msgstr ""
483
-
484
- #: includes/class-wis_instagram_slider.php:92
485
- msgid "Social Slider - Shortcode Generator"
486
- msgstr ""
487
-
488
- #. Name of the plugin
489
- #: instaram_slider.php:26 admin/views/tab-about.php:122
490
- msgid "Social Slider Widget"
491
- msgstr ""
492
-
493
- #. Description of the plugin
494
- msgid ""
495
- "Social Slider Widget is a responsive slider widget that shows 12 latest "
496
- "images from a public Instagram user and up to 18 images from a hashtag."
497
- msgstr ""
498
-
499
- #: admin/pages/widgets.php:107 admin/pages/widgets.php:108
500
- msgid "Social Slider Widgets"
501
- msgstr ""
502
-
503
- #: includes/class-wis_instagram_slider.php:365
504
- msgid "Space between pictures:"
505
- msgstr ""
506
-
507
- #: includes/class-wis_instagram_slider.php:419
508
- msgid "Standard - 640x640"
509
- msgstr ""
510
-
511
- #: admin/views/tab-license.php:126
512
- msgid "Submit Key"
513
- msgstr ""
514
-
515
- #: admin/ajax/check-license.php:55
516
- msgid "Subscription success cancelled"
517
- msgstr ""
518
-
519
- #: admin/views/tab-license.php:35
520
- msgid "Synchronization"
521
- msgstr ""
522
-
523
- #: includes/class-wis_instagram_slider.php:318
524
- msgid "Template"
525
- msgstr ""
526
-
527
- #: admin/ajax/check-license.php:51
528
- msgid "The license has been updated"
529
- msgstr ""
530
-
531
- #: admin/ajax/check-license.php:47
532
- msgid "The license is deactivated"
533
- msgstr ""
534
-
535
- #: includes/class-wis_instagram_slider.php:1182
536
- msgid "There are no publications in this account yet"
537
- msgstr ""
538
-
539
- #: includes/class-wis_instagram_slider.php:417
540
- msgid "Thumbnail - 150x150"
541
- msgstr ""
542
-
543
- #: includes/class-wis_instagram_slider.php:399
544
- msgid "Time"
545
- msgstr ""
546
-
547
- #: includes/class-wis_instagram_slider.php:242
548
- msgid "Title:"
549
- msgstr ""
550
-
551
- #: admin/views/tab-settings.php:50
552
- msgid "Token"
553
- msgstr ""
554
-
555
- #: admin/views/tab-license.php:22
556
- #, php-format
557
- msgid "Upgrade to Premium for $%s"
558
- msgstr ""
559
-
560
- #: includes/class-wis_instagram_slider.php:488
561
- msgid ""
562
- "Use this shortcode in any page or post to display images with this widget "
563
- "configuration!"
564
- msgstr ""
565
-
566
- #: admin/views/tab-settings.php:48
567
- msgid "User"
568
- msgstr ""
569
-
570
- #: includes/class-wis_instagram_slider.php:398
571
- msgid "Username"
572
- msgstr ""
573
-
574
- #: admin/pages/settings.php:160
575
- msgid "Username of your Instagram account"
576
- msgstr ""
577
-
578
- #: includes/class-wis_instagram_slider.php:271
579
- msgid "Username:"
580
- msgstr ""
581
-
582
- #: admin/views/tab-license.php:89
583
- msgid "version"
584
- msgstr ""
585
-
586
- #: includes/class-wis_instagram_slider.php:349
587
- msgid "Vertical space between item elements:"
588
- msgstr ""
589
-
590
- #: admin/views/tab-about.php:209
591
- msgid "WHY DO YOU NEED IT?"
592
- msgstr ""
593
-
594
- #: admin/pages/widgets.php:109
595
- msgid "Widgets"
596
- msgstr ""
597
-
598
- #: includes/class-wis_instagram_slider.php:272
599
- msgid "without # sign"
600
- msgstr ""
601
-
602
- #: admin/views/tab-settings.php:21
603
- msgid ""
604
- "Without authorization Instagram limits the number of requests, and after "
605
- "exceeding the limit asks to log in, so an error is displayed that no images "
606
- "were found."
607
- msgstr ""
608
-
609
- #: admin/views/tab-license.php:58
610
- msgid ""
611
- "You use a paid subscription for the plugin updates. In case you don’t want "
612
- "to receive paid updates, please, click <a data-action=\"unsubscribe\" "
613
- "class=\"wis-control-btn\" href=\"#\">cancel subscription</a>"
614
- msgstr ""
615
-
616
- #: admin/views/tab-license.php:25
617
- #, php-format
618
- msgid "Your current license for %1$s:"
619
- msgstr ""
620
-
621
- #: admin/ajax/check-license.php:42
622
- msgid "Your license has been successfully activated"
623
- msgstr ""
624
-
625
- #: admin/views/tab-license.php:64
626
- msgid ""
627
- "Your license has expired, please extend the license to get updates and "
628
- "support."
629
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #, fuzzy
2
+ msgid ""
3
+ msgstr ""
4
+ "Project-Id-Version: Social Slider Feed\n"
5
+ "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2021-09-21 11:13+0000\n"
7
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
+ "Language-Team: \n"
10
+ "Language: \n"
11
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
12
+ "MIME-Version: 1.0\n"
13
+ "Content-Type: text/plain; charset=UTF-8\n"
14
+ "Content-Transfer-Encoding: 8bit\n"
15
+ "X-Generator: Loco https://localise.biz/\n"
16
+ "X-Loco-Version: 2.3.1; wp-5.2.4"
17
+
18
+ #: components/instagram/html_templates/form-feed.php:243
19
+ #: components/youtube/html_templates/form-feed.php:166
20
+ #: components/youtube/html_templates/widget_settings.php:151
21
+ msgid ""
22
+ "* use this field only if the above option is set to <strong>Custom "
23
+ "Link</strong>"
24
+ msgstr ""
25
+
26
+ #: admin/views/page-license.php:134 admin/views/page-showcase-license.php:134
27
+ #, php-format
28
+ msgid ""
29
+ "<a href=\"%s\" target=\"_blank\" rel=\"noopener\">Lean more</a> about the "
30
+ "premium version and get the license key to activate it now!"
31
+ msgstr ""
32
+
33
+ #: components/facebook/includes/class-facebook-widget.php:56
34
+ msgid "A widget that displays a Facebook posts "
35
+ msgstr ""
36
+
37
+ #: components/instagram/includes/class-instagram-widget.php:46
38
+ msgid "A widget that displays a slider with instagram images "
39
+ msgstr ""
40
+
41
+ #: admin/pages/about.php:67
42
+ msgid "About"
43
+ msgstr ""
44
+
45
+ #: components/facebook/html_templates/form-feed.php:35
46
+ #: components/facebook/html_templates/form-feed.php:47
47
+ #: components/instagram/html_templates/form-feed.php:40
48
+ #: components/instagram/html_templates/form-feed.php:67
49
+ #: components/instagram/html_templates/form-feed.php:79
50
+ #: components/youtube/html_templates/form-feed.php:35
51
+ #: components/youtube/html_templates/form-feed.php:47
52
+ msgid "Account"
53
+ msgstr ""
54
+
55
+ #: components/instagram/includes/class-instagram-feed.php:780
56
+ msgid ""
57
+ "Account not found or for this account there are restrictions on Instagram by "
58
+ "age"
59
+ msgstr ""
60
+
61
+ #: components/facebook/html_templates/accounts.php:36
62
+ #: components/facebook/html_templates/feeds.php:21
63
+ #: components/instagram/html_templates/accounts.php:39
64
+ #: components/instagram/html_templates/accounts.php:87
65
+ #: components/instagram/html_templates/feeds.php:21
66
+ #: components/youtube/html_templates/accounts.php:57
67
+ #: components/youtube/html_templates/feeds.php:21
68
+ msgid "Action"
69
+ msgstr ""
70
+
71
+ #: admin/views/page-license.php:11 admin/views/page-showcase-license.php:11
72
+ #, php-format
73
+ msgid "Activate %s"
74
+ msgstr ""
75
+
76
+ #: admin/views/page-license.php:84 admin/views/page-showcase-license.php:84
77
+ msgid "active sites"
78
+ msgstr ""
79
+
80
+ #: components/facebook/html_templates/accounts.php:15
81
+ #: components/facebook/html_templates/accounts.php:20
82
+ #: components/instagram/html_templates/accounts.php:18
83
+ #: components/instagram/html_templates/accounts.php:22
84
+ msgid "Add Account"
85
+ msgstr ""
86
+
87
+ #: components/facebook/html_templates/form-feed.php:48
88
+ #: components/instagram/html_templates/form-feed.php:80
89
+ #: components/instagram/html_templates/form-feed.php:102
90
+ #: components/youtube/html_templates/form-feed.php:48
91
+ msgid "Add account in settings"
92
+ msgstr ""
93
+
94
+ #: components/youtube/html_templates/accounts.php:31
95
+ #: components/youtube/html_templates/accounts.php:108
96
+ msgid "Add channel"
97
+ msgstr ""
98
+
99
+ #: components/facebook/html_templates/feeds.php:12
100
+ #: components/facebook/html_templates/form-feed.php:17
101
+ #: components/instagram/html_templates/feeds.php:12
102
+ #: components/instagram/html_templates/form-feed.php:19
103
+ #: components/youtube/html_templates/feeds.php:12
104
+ #: components/youtube/html_templates/form-feed.php:19
105
+ msgid "Add feed"
106
+ msgstr ""
107
+
108
+ #: components/youtube/html_templates/widget_settings.php:36
109
+ msgid "Add feed in settings"
110
+ msgstr ""
111
+
112
+ #: admin/views/page-widgets.php:57
113
+ msgid "Add instagram account in plugin settings"
114
+ msgstr ""
115
+
116
+ #: components/youtube/html_templates/accounts.php:92
117
+ msgid "Add Youtube channel"
118
+ msgstr ""
119
+
120
+ #: components/instagram/html_templates/form-feed.php:300
121
+ msgid "Allow words"
122
+ msgstr ""
123
+
124
+ #: components/facebook/includes/Api/facebook-api.php:64
125
+ msgid "API ERROR: Failed to parse data."
126
+ msgstr ""
127
+
128
+ #: admin/pages/profiles.php:124 admin/pages/profiles.php:130
129
+ #: admin/pages/profiles.php:136
130
+ msgid "Are you sure want to delete this account?"
131
+ msgstr ""
132
+
133
+ #: admin/pages/feeds.php:85
134
+ msgid "Are you sure want to delete this feed?"
135
+ msgstr ""
136
+
137
+ #: components/instagram/html_templates/form-feed.php:268
138
+ msgid "Available in PRO version."
139
+ msgstr ""
140
+
141
+ #: admin/views/page-about.php:173
142
+ msgid "BENEFITS"
143
+ msgstr ""
144
+
145
+ #: components/instagram/html_templates/form-feed.php:129
146
+ msgid "Block Users"
147
+ msgstr ""
148
+
149
+ #: components/instagram/html_templates/form-feed.php:291
150
+ #: components/youtube/html_templates/form-feed.php:179
151
+ #: components/youtube/html_templates/widget_settings.php:154
152
+ msgid "Block words"
153
+ msgstr ""
154
+
155
+ #: components/instagram/html_templates/form-feed.php:46
156
+ #: components/instagram/html_templates/form-feed.php:91
157
+ msgid "Business account"
158
+ msgstr ""
159
+
160
+ #: components/instagram/html_templates/accounts.php:79
161
+ msgid "Business Accounts"
162
+ msgstr ""
163
+
164
+ #: components/instagram/html_templates/form-feed.php:477
165
+ msgid "Buttons Color"
166
+ msgstr ""
167
+
168
+ #: components/instagram/includes/class-instagram-feed.php:553
169
+ msgid ""
170
+ "Can't receive images by hashtag. Please connect a business account and try "
171
+ "again."
172
+ msgstr ""
173
+
174
+ #: admin/views/page-license.php:138 admin/views/page-showcase-license.php:138
175
+ #, php-format
176
+ msgid ""
177
+ "Can’t find your key? Go to <a href=\"%s\" target=\"_blank\" rel=\"noopener\">"
178
+ "this page</a> and login using the e-mail address associated with your "
179
+ "purchase."
180
+ msgstr ""
181
+
182
+ #: components/instagram/html_templates/form-feed.php:543
183
+ msgid "Caption"
184
+ msgstr ""
185
+
186
+ #: components/youtube/html_templates/accounts.php:99
187
+ msgid ""
188
+ "Channel link. Example: https://www.youtube.com/channel/UC0WP5P-"
189
+ "ufpRfjbNrmOWwLBQ"
190
+ msgstr ""
191
+
192
+ #: components/facebook/html_templates/form-feed.php:56
193
+ #: components/instagram/html_templates/form-feed.php:137
194
+ #: components/youtube/html_templates/form-feed.php:56
195
+ msgid "Check for new images every:"
196
+ msgstr ""
197
+
198
+ #: components/youtube/html_templates/widget_settings.php:57
199
+ msgid "Check for new posts every:"
200
+ msgstr ""
201
+
202
+ #: components/instagram/html_templates/form-feed.php:486
203
+ msgid "Columns count"
204
+ msgstr ""
205
+
206
+ #: components/youtube/html_templates/accounts.php:50
207
+ msgid "Connected channels"
208
+ msgstr ""
209
+
210
+ #: components/facebook/html_templates/form-feed.php:97
211
+ #: components/instagram/html_templates/form-feed.php:177
212
+ #: components/youtube/html_templates/form-feed.php:97
213
+ #: components/youtube/html_templates/widget_settings.php:42
214
+ msgid "Count of images to show:"
215
+ msgstr ""
216
+
217
+ #. Author of the plugin
218
+ msgid "creativemotion"
219
+ msgstr ""
220
+
221
+ #: components/instagram/html_templates/form-feed.php:241
222
+ #: components/youtube/html_templates/form-feed.php:164
223
+ #: components/youtube/html_templates/widget_settings.php:147
224
+ msgid "Custom link:"
225
+ msgstr ""
226
+
227
+ #: components/youtube/includes/class-youtube-feed.php:64
228
+ msgid "Custom URL"
229
+ msgstr ""
230
+
231
+ #: components/youtube/html_templates/form-feed.php:132
232
+ #: components/youtube/html_templates/widget_settings.php:105
233
+ msgid "Date"
234
+ msgstr ""
235
+
236
+ #: components/facebook/html_templates/form-feed.php:129
237
+ #: components/instagram/html_templates/form-feed.php:210
238
+ #: components/youtube/html_templates/form-feed.php:141
239
+ #: components/youtube/html_templates/widget_settings.php:116
240
+ msgid "Date - Ascending"
241
+ msgstr ""
242
+
243
+ #: components/facebook/html_templates/form-feed.php:130
244
+ #: components/instagram/html_templates/form-feed.php:211
245
+ #: components/youtube/html_templates/form-feed.php:142
246
+ #: components/youtube/html_templates/widget_settings.php:117
247
+ msgid "Date - Descending"
248
+ msgstr ""
249
+
250
+ #: admin/views/page-license.php:105 admin/views/page-showcase-license.php:105
251
+ msgid "day(s)"
252
+ msgstr ""
253
+
254
+ #: components/facebook/html_templates/accounts.php:63
255
+ #: components/instagram/html_templates/accounts.php:59
256
+ #: components/instagram/html_templates/accounts.php:115
257
+ #: components/youtube/html_templates/accounts.php:76
258
+ msgid "Delete"
259
+ msgstr ""
260
+
261
+ #: admin/views/page-license.php:31 admin/views/page-showcase-license.php:31
262
+ msgid "Delete Key"
263
+ msgstr ""
264
+
265
+ #: components/facebook/html_templates/form-feed.php:83
266
+ #: components/instagram/html_templates/form-feed.php:164
267
+ #: components/youtube/html_templates/form-feed.php:83
268
+ msgid "Desktop"
269
+ msgstr ""
270
+
271
+ #: components/facebook/html_templates/form-feed.php:90
272
+ #: components/instagram/html_templates/form-feed.php:171
273
+ #: components/youtube/html_templates/form-feed.php:90
274
+ msgid "Desktop settings"
275
+ msgstr ""
276
+
277
+ #: admin/views/page-license.php:72 admin/views/page-showcase-license.php:72
278
+ msgid "domain"
279
+ msgstr ""
280
+
281
+ #: components/instagram/html_templates/form-feed.php:506
282
+ msgid "Dotted"
283
+ msgstr ""
284
+
285
+ #: components/facebook/html_templates/form-feed.php:15
286
+ #: components/instagram/html_templates/form-feed.php:17
287
+ #: components/youtube/html_templates/form-feed.php:17
288
+ msgid "Edit feed"
289
+ msgstr ""
290
+
291
+ #: components/instagram/html_templates/form-feed.php:278
292
+ msgid "Enable author's ad"
293
+ msgstr ""
294
+
295
+ #: components/instagram/html_templates/form-feed.php:380
296
+ msgid "Enable control buttons"
297
+ msgstr ""
298
+
299
+ #: components/instagram/html_templates/form-feed.php:285
300
+ msgid "Enable instagram icons"
301
+ msgstr ""
302
+
303
+ #: components/instagram/html_templates/form-feed.php:305
304
+ msgid ""
305
+ "Enter comma-separated words. If one of them occurs in the image description, "
306
+ "the image will be displayed"
307
+ msgstr ""
308
+
309
+ #: components/instagram/html_templates/form-feed.php:295
310
+ #: components/youtube/html_templates/form-feed.php:183
311
+ #: components/youtube/html_templates/widget_settings.php:159
312
+ msgid ""
313
+ "Enter comma-separated words. If one of them occurs in the image description, "
314
+ "the image will not be displayed"
315
+ msgstr ""
316
+
317
+ #: components/instagram/html_templates/form-feed.php:132
318
+ msgid "Enter words separated by commas whose images you don't want to show"
319
+ msgstr ""
320
+
321
+ #: admin/views/page-license.php:94 admin/views/page-showcase-license.php:94
322
+ msgid "EXPIRED!"
323
+ msgstr ""
324
+
325
+ #: admin/pages/profiles.php:183
326
+ msgid "Facebook"
327
+ msgstr ""
328
+
329
+ #: components/facebook/html_templates/widget_settings.php:17
330
+ #: components/facebook/includes/class-facebook-feed.php:71
331
+ #: components/facebook/includes/class-facebook-widget.php:63
332
+ msgid "Facebook feed"
333
+ msgstr ""
334
+
335
+ #: admin/pages/feeds.php:131
336
+ msgid "Facebook feeds"
337
+ msgstr ""
338
+
339
+ #: components/instagram/html_templates/form-feed.php:521
340
+ msgid "Fade"
341
+ msgstr ""
342
+
343
+ #: admin/views/page-about.php:140
344
+ msgid "FEATURES"
345
+ msgstr ""
346
+
347
+ #: admin/views/page-about.php:254
348
+ msgid "FEEDBACK AND SUPPORT"
349
+ msgstr ""
350
+
351
+ #: admin/pages/feeds.php:65 admin/pages/feeds.php:66
352
+ msgid "Feeds"
353
+ msgstr ""
354
+
355
+ #: components/instagram/html_templates/form-feed.php:58
356
+ #: components/instagram/html_templates/form-feed.php:117
357
+ msgid "Hashtag"
358
+ msgstr ""
359
+
360
+ #: admin/views/page-license.php:120 admin/views/page-showcase-license.php:120
361
+ msgid "Have a key to activate the plugin? Paste it here:"
362
+ msgstr ""
363
+
364
+ #: admin/views/page-license.php:118 admin/views/page-showcase-license.php:118
365
+ msgid "Have a key to activate the premium version? Paste it here:"
366
+ msgstr ""
367
+
368
+ #: components/instagram/html_templates/form-feed.php:545
369
+ msgid ""
370
+ "Hold ctrl and click the fields you want to show/hide on your slider. Leave "
371
+ "all unselected to hide them all. Default all selected."
372
+ msgstr ""
373
+
374
+ #: components/facebook/html_templates/form-feed.php:60
375
+ #: components/instagram/html_templates/form-feed.php:141
376
+ #: components/youtube/html_templates/form-feed.php:60
377
+ #: components/youtube/html_templates/widget_settings.php:62
378
+ msgid "hours"
379
+ msgstr ""
380
+
381
+ #: components/youtube/html_templates/accounts.php:103
382
+ msgid "How to get channel link"
383
+ msgstr ""
384
+
385
+ #: admin/pages/manual.php:41
386
+ msgid "How to get Youtube API key"
387
+ msgstr ""
388
+
389
+ #. Author URI of the plugin
390
+ msgid "https://cm-wp.com/"
391
+ msgstr ""
392
+
393
+ #. URI of the plugin
394
+ msgid "https://cm-wp.com/instagram-slider-widget"
395
+ msgstr ""
396
+
397
+ #: components/facebook/html_templates/accounts.php:33
398
+ #: components/instagram/html_templates/accounts.php:36
399
+ #: components/instagram/html_templates/accounts.php:84
400
+ #: components/youtube/html_templates/accounts.php:55
401
+ msgid "ID"
402
+ msgstr ""
403
+
404
+ #: components/instagram/html_templates/form-feed.php:125
405
+ msgid ""
406
+ "If you have problems displaying by hashtag, please connect your business "
407
+ "account and select display by hashtag again"
408
+ msgstr ""
409
+
410
+ #: components/facebook/html_templates/accounts.php:32
411
+ #: components/instagram/html_templates/accounts.php:35
412
+ #: components/instagram/html_templates/accounts.php:83
413
+ #: components/youtube/html_templates/accounts.php:54
414
+ msgid "Image"
415
+ msgstr ""
416
+
417
+ #: components/instagram/html_templates/form-feed.php:365
418
+ msgid "Image width:"
419
+ msgstr ""
420
+
421
+ #: components/instagram/html_templates/form-feed.php:395
422
+ msgid "Images size: "
423
+ msgstr ""
424
+
425
+ #: admin/pages/profiles.php:178
426
+ msgid "Instagram"
427
+ msgstr ""
428
+
429
+ #: components/instagram/html_templates/widget_settings.php:17
430
+ #: components/instagram/includes/class-instagram-widget.php:53
431
+ msgid "Instagram feed"
432
+ msgstr ""
433
+
434
+ #: admin/pages/feeds.php:126
435
+ msgid "Instagram feeds"
436
+ msgstr ""
437
+
438
+ #: admin/views/page-addon_licenses.php:60
439
+ msgid "Install"
440
+ msgstr ""
441
+
442
+ #: components/instagram/html_templates/form-feed.php:388
443
+ msgid "Keep 1x1 Instagram ratio"
444
+ msgstr ""
445
+
446
+ #: admin/pages/license.php:90
447
+ msgid "License"
448
+ msgstr ""
449
+
450
+ #: admin/ajax/check-license.php:40
451
+ msgid ""
452
+ "License key is empty or license key too long (license key is 32 characters "
453
+ "long)"
454
+ msgstr ""
455
+
456
+ #: admin/ajax/check-license.php:28
457
+ msgid "Licensing action not passed or this action is prohibited!"
458
+ msgstr ""
459
+
460
+ #: components/facebook/html_templates/form-feed.php:138
461
+ #: components/instagram/html_templates/form-feed.php:219
462
+ #: components/youtube/html_templates/form-feed.php:150
463
+ #: components/youtube/html_templates/widget_settings.php:125
464
+ msgid "Link to"
465
+ msgstr ""
466
+
467
+ #: admin/pages/log.php:89
468
+ msgid "Logs"
469
+ msgstr ""
470
+
471
+ #: admin/pages/profiles.php:184
472
+ msgid "Manage Facebook accounts"
473
+ msgstr ""
474
+
475
+ #: admin/pages/feeds.php:132
476
+ msgid "Manage Facebook feeds"
477
+ msgstr ""
478
+
479
+ #: admin/pages/profiles.php:179
480
+ msgid "Manage Instagram accounts"
481
+ msgstr ""
482
+
483
+ #: admin/pages/feeds.php:127
484
+ msgid "Manage Instagram feeds"
485
+ msgstr ""
486
+
487
+ #: admin/pages/profiles.php:189
488
+ msgid "Manage Youtube accounts"
489
+ msgstr ""
490
+
491
+ #: admin/pages/feeds.php:137
492
+ msgid "Manage Youtube feeds"
493
+ msgstr ""
494
+
495
+ #: components/youtube/html_templates/form-feed.php:214
496
+ msgid "max is 10"
497
+ msgstr ""
498
+
499
+ #: components/instagram/html_templates/form-feed.php:346
500
+ #: components/youtube/html_templates/widget_settings.php:97
501
+ msgid "max is 10 ( only for thumbnails template )"
502
+ msgstr ""
503
+
504
+ #: components/facebook/html_templates/form-feed.php:107
505
+ #: components/instagram/html_templates/form-feed.php:187
506
+ #: components/youtube/html_templates/form-feed.php:107
507
+ #: components/youtube/html_templates/widget_settings.php:49
508
+ msgid "Maximum 20 images in free version."
509
+ msgstr ""
510
+
511
+ #: components/facebook/html_templates/form-feed.php:84
512
+ #: components/instagram/html_templates/form-feed.php:165
513
+ #: components/youtube/html_templates/form-feed.php:84
514
+ msgid "Mobile"
515
+ msgstr ""
516
+
517
+ #: components/facebook/html_templates/form-feed.php:216
518
+ #: components/instagram/html_templates/form-feed.php:555
519
+ #: components/youtube/html_templates/form-feed.php:225
520
+ msgid "Mobile settings available only in premium version"
521
+ msgstr ""
522
+
523
+ #: components/facebook/html_templates/accounts.php:16
524
+ #: components/instagram/html_templates/accounts.php:19
525
+ #: components/youtube/html_templates/accounts.php:40
526
+ #, php-format
527
+ msgid "More accounts in <a href='%s'>PRO version</a>"
528
+ msgstr ""
529
+
530
+ #: components/facebook/html_templates/form-feed.php:108
531
+ #: components/instagram/html_templates/form-feed.php:188
532
+ #: components/instagram/html_templates/form-feed.php:269
533
+ #: components/youtube/html_templates/form-feed.php:108
534
+ #: components/youtube/html_templates/widget_settings.php:50
535
+ #, php-format
536
+ msgid "More in <a href='%s'>PRO version</a>"
537
+ msgstr ""
538
+
539
+ #: components/instagram/html_templates/form-feed.php:426
540
+ #: components/instagram/html_templates/form-feed.php:532
541
+ msgid "ms"
542
+ msgstr ""
543
+
544
+ #: components/facebook/html_templates/accounts.php:34
545
+ #: components/facebook/html_templates/feeds.php:19
546
+ #: components/instagram/html_templates/feeds.php:19
547
+ #: components/youtube/html_templates/accounts.php:56
548
+ #: components/youtube/html_templates/feeds.php:19
549
+ msgid "Name"
550
+ msgstr ""
551
+
552
+ #: components/facebook/html_templates/feeds.php:55
553
+ #: components/instagram/html_templates/feeds.php:55
554
+ #: components/youtube/html_templates/feeds.php:55
555
+ msgid "No feeds"
556
+ msgstr ""
557
+
558
+ #: components/instagram/includes/class-instagram-feed.php:493
559
+ #: components/youtube/includes/class-youtube-feed.php:224
560
+ msgid "No images found"
561
+ msgstr ""
562
+
563
+ #: components/instagram/html_templates/form-feed.php:510
564
+ msgid "No Navigation"
565
+ msgstr ""
566
+
567
+ #: components/facebook/includes/class-facebook-feed.php:217
568
+ msgid "No posts found"
569
+ msgstr ""
570
+
571
+ #: components/youtube/includes/class-youtube-feed.php:65
572
+ msgid "None"
573
+ msgstr ""
574
+
575
+ #: components/instagram/includes/class-instagram-feed.php:329
576
+ #: components/youtube/includes/class-youtube-feed.php:168
577
+ msgid "Nothing to search for"
578
+ msgstr ""
579
+
580
+ #: components/instagram/html_templates/form-feed.php:342
581
+ #: components/youtube/html_templates/form-feed.php:210
582
+ #: components/youtube/html_templates/widget_settings.php:92
583
+ msgid "Number of Columns:"
584
+ msgstr ""
585
+
586
+ #: components/facebook/html_templates/form-feed.php:117
587
+ #: components/instagram/html_templates/form-feed.php:198
588
+ #: components/youtube/html_templates/form-feed.php:117
589
+ msgid "Number of words in caption:"
590
+ msgstr ""
591
+
592
+ #: admin/views/page-license.php:82 admin/views/page-showcase-license.php:82
593
+ msgid "of"
594
+ msgstr ""
595
+
596
+ #: components/instagram/html_templates/form-feed.php:443
597
+ msgid "Offset"
598
+ msgstr ""
599
+
600
+ #: components/facebook/html_templates/form-feed.php:127
601
+ #: components/instagram/html_templates/form-feed.php:208
602
+ #: components/youtube/html_templates/form-feed.php:139
603
+ #: components/youtube/html_templates/widget_settings.php:113
604
+ msgid "Order by"
605
+ msgstr ""
606
+
607
+ #: components/instagram/html_templates/form-feed.php:455
608
+ msgid "Pattern"
609
+ msgstr ""
610
+
611
+ #: components/facebook/html_templates/form-feed.php:102
612
+ #: components/facebook/html_templates/form-feed.php:122
613
+ #: components/instagram/html_templates/form-feed.php:182
614
+ #: components/instagram/html_templates/form-feed.php:203
615
+ #: components/instagram/html_templates/form-feed.php:413
616
+ #: components/youtube/html_templates/form-feed.php:102
617
+ #: components/youtube/html_templates/form-feed.php:122
618
+ msgid "pcs"
619
+ msgstr ""
620
+
621
+ #: components/instagram/html_templates/accounts.php:31
622
+ msgid "Personal Accounts"
623
+ msgstr ""
624
+
625
+ #: components/instagram/html_templates/form-feed.php:468
626
+ msgid "Phone"
627
+ msgstr ""
628
+
629
+ #: components/instagram/html_templates/form-feed.php:408
630
+ msgid "Pictures per slide:"
631
+ msgstr ""
632
+
633
+ #: admin/views/page-license.php:76 admin/views/page-showcase-license.php:76
634
+ msgid "plan"
635
+ msgstr ""
636
+
637
+ #: admin/views/page-license.php:95 admin/views/page-showcase-license.php:95
638
+ msgid "please update the key"
639
+ msgstr ""
640
+
641
+ #: admin/pages/log.php:77
642
+ msgid "Plugin logs"
643
+ msgstr ""
644
+
645
+ #: components/facebook/html_templates/form-feed.php:131
646
+ #: components/instagram/html_templates/form-feed.php:212
647
+ #: components/youtube/html_templates/form-feed.php:143
648
+ #: components/youtube/html_templates/widget_settings.php:118
649
+ msgid "Popularity - Ascending"
650
+ msgstr ""
651
+
652
+ #: components/facebook/html_templates/form-feed.php:132
653
+ #: components/instagram/html_templates/form-feed.php:213
654
+ #: components/youtube/html_templates/form-feed.php:144
655
+ #: components/youtube/html_templates/widget_settings.php:119
656
+ msgid "Popularity - Descending"
657
+ msgstr ""
658
+
659
+ #: components/facebook/html_templates/form-feed.php:198
660
+ msgid "Post width:"
661
+ msgstr ""
662
+
663
+ #: components/instagram/html_templates/form-feed.php:501
664
+ msgid "Prev & Next"
665
+ msgstr ""
666
+
667
+ #: admin/views/page-about.php:196
668
+ msgid "PRO VERSION"
669
+ msgstr ""
670
+
671
+ #: admin/pages/profiles.php:79
672
+ msgid "Profiles"
673
+ msgstr ""
674
+
675
+ #: admin/views/page-license.php:54 admin/views/page-showcase-license.php:54
676
+ msgid ""
677
+ "Public License is a GPLv2 compatible license allowing you to change and use "
678
+ "this version of the plugin for free. Please keep in mind this license covers "
679
+ "only free edition of the plugin. Premium versions are distributed with other "
680
+ "type of a license."
681
+ msgstr ""
682
+
683
+ #: components/facebook/html_templates/form-feed.php:191
684
+ #: components/facebook/html_templates/form-feed.php:203
685
+ #: components/instagram/html_templates/form-feed.php:358
686
+ #: components/instagram/html_templates/form-feed.php:370
687
+ #: components/instagram/html_templates/form-feed.php:400
688
+ msgid "px"
689
+ msgstr ""
690
+
691
+ #: components/facebook/html_templates/form-feed.php:133
692
+ #: components/instagram/html_templates/form-feed.php:214
693
+ #: components/youtube/html_templates/form-feed.php:145
694
+ #: components/youtube/html_templates/widget_settings.php:120
695
+ msgid "Random"
696
+ msgstr ""
697
+
698
+ #: components/youtube/html_templates/form-feed.php:133
699
+ #: components/youtube/html_templates/widget_settings.php:106
700
+ msgid "Rating"
701
+ msgstr ""
702
+
703
+ #: admin/views/page-addon_licenses.php:57
704
+ msgid "Read more"
705
+ msgstr ""
706
+
707
+ #: admin/views/page-widgets.php:14
708
+ msgid "Recommended widget templates"
709
+ msgstr ""
710
+
711
+ #: components/youtube/html_templates/form-feed.php:131
712
+ #: components/youtube/html_templates/widget_settings.php:104
713
+ msgid "Relevance"
714
+ msgstr ""
715
+
716
+ #: admin/views/page-license.php:107 admin/views/page-showcase-license.php:107
717
+ msgid "remained"
718
+ msgstr ""
719
+
720
+ #: components/youtube/html_templates/form-feed.php:128
721
+ #: components/youtube/html_templates/widget_settings.php:101
722
+ msgid "Request videos by:"
723
+ msgstr ""
724
+
725
+ #: components/facebook/html_templates/form-feed.php:222
726
+ #: components/instagram/html_templates/form-feed.php:562
727
+ #: components/youtube/html_templates/accounts.php:22
728
+ #: components/youtube/html_templates/accounts.php:39
729
+ #: components/youtube/html_templates/form-feed.php:231
730
+ msgid "Save"
731
+ msgstr ""
732
+
733
+ #: components/instagram/html_templates/form-feed.php:35
734
+ msgid "Search Instagram for"
735
+ msgstr ""
736
+
737
+ #: admin/views/page-addon_licenses.php:53
738
+ msgid "Settings"
739
+ msgstr ""
740
+
741
+ #: components/facebook/html_templates/feeds.php:20
742
+ #: components/instagram/html_templates/feeds.php:20
743
+ #: components/youtube/html_templates/feeds.php:20
744
+ msgid "Shortcode"
745
+ msgstr ""
746
+
747
+ #: admin/views/page-widgets.php:34
748
+ msgid "Shortcode for this widget"
749
+ msgstr ""
750
+
751
+ #: components/facebook/html_templates/form-feed.php:69
752
+ #: components/instagram/html_templates/form-feed.php:150
753
+ #: components/youtube/html_templates/form-feed.php:69
754
+ msgid "Shortcode of this feed:"
755
+ msgstr ""
756
+
757
+ #: components/youtube/html_templates/widget_settings.php:166
758
+ msgid "Shortcode of this Widget:"
759
+ msgstr ""
760
+
761
+ #: components/facebook/html_templates/form-feed.php:157
762
+ #: components/instagram/html_templates/form-feed.php:252
763
+ #: components/youtube/html_templates/form-feed.php:174
764
+ msgid "Show feed header"
765
+ msgstr ""
766
+
767
+ #: components/youtube/html_templates/widget_settings.php:66
768
+ msgid "Show feed header:"
769
+ msgstr ""
770
+
771
+ #: components/instagram/html_templates/form-feed.php:262
772
+ msgid "Show Stories"
773
+ msgstr ""
774
+
775
+ #. Description of the plugin
776
+ msgid ""
777
+ "Shows Instagram, Facebook and YouTube responsive feeds in widgets, posts, "
778
+ "pages, or anywhere else using shortcodes"
779
+ msgstr ""
780
+
781
+ #: components/instagram/html_templates/form-feed.php:517
782
+ msgid "Slide"
783
+ msgstr ""
784
+
785
+ #: components/instagram/html_templates/form-feed.php:527
786
+ msgid "Slide Speed:"
787
+ msgstr ""
788
+
789
+ #: components/instagram/html_templates/form-feed.php:514
790
+ msgid "Slider Animation:"
791
+ msgstr ""
792
+
793
+ #: components/instagram/html_templates/form-feed.php:498
794
+ msgid "Slider Navigation Controls:"
795
+ msgstr ""
796
+
797
+ #: components/instagram/html_templates/form-feed.php:537
798
+ msgid "Slider Text Description:"
799
+ msgstr ""
800
+
801
+ #: components/instagram/html_templates/form-feed.php:421
802
+ msgid "Sliding speed:"
803
+ msgstr ""
804
+
805
+ #: admin/pages/profiles.php:78
806
+ msgid "Social profiles"
807
+ msgstr ""
808
+
809
+ #: components/instagram/includes/class-instagram-feed.php:132
810
+ msgid "Social Slider"
811
+ msgstr ""
812
+
813
+ #: components/facebook/includes/class-facebook-widget.php:53
814
+ msgid "Social Slider - Facebook"
815
+ msgstr ""
816
+
817
+ #: components/instagram/includes/class-instagram-widget.php:43
818
+ msgid "Social Slider - Instagram"
819
+ msgstr ""
820
+
821
+ #. Name of the plugin
822
+ #: instagram-slider-widget.php:29
823
+ msgid "Social Slider Feed"
824
+ msgstr ""
825
+
826
+ #: admin/pages/feeds.php:63 admin/pages/feeds.php:64 admin/pages/widgets.php:96
827
+ #: admin/pages/widgets.php:97
828
+ msgid "Social Slider Feeds"
829
+ msgstr ""
830
+
831
+ #: components/facebook/includes/Api/facebook-api.php:56
832
+ msgid "Something went wrong"
833
+ msgstr ""
834
+
835
+ #: components/facebook/includes/Api/facebook-api.php:70
836
+ msgid "Something went wrong. API error"
837
+ msgstr ""
838
+
839
+ #: components/instagram/html_templates/form-feed.php:435
840
+ msgid "Space between pictures"
841
+ msgstr ""
842
+
843
+ #: admin/views/page-license.php:126 admin/views/page-showcase-license.php:126
844
+ msgid "Submit Key"
845
+ msgstr ""
846
+
847
+ #: components/youtube/html_templates/feed_header_template.php:29
848
+ msgid "subscribe"
849
+ msgstr ""
850
+
851
+ #: components/youtube/html_templates/feed_header_template.php:8
852
+ msgid "subscribers"
853
+ msgstr ""
854
+
855
+ #: admin/ajax/check-license.php:56
856
+ msgid "Subscription success cancelled"
857
+ msgstr ""
858
+
859
+ #: components/instagram/html_templates/accounts.php:120
860
+ msgid "Successfully connected"
861
+ msgstr ""
862
+
863
+ #: admin/views/page-license.php:35 admin/views/page-showcase-license.php:35
864
+ msgid "Synchronization"
865
+ msgstr ""
866
+
867
+ #: components/facebook/html_templates/form-feed.php:164
868
+ #: components/instagram/html_templates/form-feed.php:311
869
+ #: components/youtube/html_templates/form-feed.php:189
870
+ #: components/youtube/html_templates/widget_settings.php:77
871
+ msgid "Template"
872
+ msgstr ""
873
+
874
+ #: admin/ajax/check-license.php:52
875
+ msgid "The license has been updated"
876
+ msgstr ""
877
+
878
+ #: admin/ajax/check-license.php:48
879
+ msgid "The license is deactivated"
880
+ msgstr ""
881
+
882
+ #: components/instagram/includes/class-instagram-feed.php:405
883
+ #: components/instagram/includes/class-instagram-feed.php:433
884
+ #: components/youtube/includes/class-youtube-feed.php:214
885
+ msgid "There are no publications in this account yet"
886
+ msgstr ""
887
+
888
+ #: components/instagram/html_templates/form-feed.php:542
889
+ msgid "Time"
890
+ msgstr ""
891
+
892
+ #: components/facebook/html_templates/form-feed.php:26
893
+ #: components/facebook/html_templates/widget_settings.php:11
894
+ #: components/instagram/html_templates/form-feed.php:28
895
+ #: components/instagram/html_templates/widget_settings.php:11
896
+ #: components/youtube/html_templates/form-feed.php:28
897
+ #: components/youtube/html_templates/widget_settings.php:16
898
+ msgid "Title:"
899
+ msgstr ""
900
+
901
+ #: components/facebook/html_templates/accounts.php:35
902
+ #: components/instagram/html_templates/accounts.php:38
903
+ #: components/instagram/html_templates/accounts.php:86
904
+ msgid "Token"
905
+ msgstr ""
906
+
907
+ #: components/youtube/html_templates/form-feed.php:135
908
+ #: components/youtube/html_templates/widget_settings.php:108
909
+ msgid "Unspecified"
910
+ msgstr ""
911
+
912
+ #: admin/views/page-license.php:22 admin/views/page-showcase-license.php:22
913
+ msgid "Upgrade to Premium"
914
+ msgstr ""
915
+
916
+ #: components/instagram/html_templates/form-feed.php:155
917
+ msgid ""
918
+ "Use this shortcode in any page or post to display images with this "
919
+ "configuration!"
920
+ msgstr ""
921
+
922
+ #: components/facebook/html_templates/form-feed.php:74
923
+ #: components/youtube/html_templates/form-feed.php:74
924
+ #: components/youtube/html_templates/widget_settings.php:170
925
+ msgid ""
926
+ "Use this shortcode in any page or post to display images with this widget "
927
+ "configuration!"
928
+ msgstr ""
929
+
930
+ #: components/instagram/html_templates/accounts.php:37
931
+ #: components/instagram/html_templates/accounts.php:85
932
+ msgid "User"
933
+ msgstr ""
934
+
935
+ #: components/youtube/html_templates/feed_header_template.php:8
936
+ msgid "user has hidden the number of followers"
937
+ msgstr ""
938
+
939
+ #: components/instagram/html_templates/form-feed.php:52
940
+ #: components/instagram/html_templates/form-feed.php:108
941
+ #: components/instagram/html_templates/form-feed.php:541
942
+ msgid "Username"
943
+ msgstr ""
944
+
945
+ #: admin/views/page-license.php:89 admin/views/page-showcase-license.php:89
946
+ msgid "version"
947
+ msgstr ""
948
+
949
+ #: components/facebook/html_templates/form-feed.php:186
950
+ #: components/instagram/html_templates/form-feed.php:353
951
+ msgid "Vertical space between item elements:"
952
+ msgstr ""
953
+
954
+ #: components/youtube/html_templates/form-feed.php:134
955
+ #: components/youtube/html_templates/widget_settings.php:107
956
+ msgid "View count"
957
+ msgstr ""
958
+
959
+ #: components/youtube/html_templates/default.php:27
960
+ msgid "views"
961
+ msgstr ""
962
+
963
+ #: admin/views/page-about.php:265
964
+ msgid "WHY DO YOU NEED IT?"
965
+ msgstr ""
966
+
967
+ #: admin/pages/widgets.php:98 admin/pages/widgets.php:99
968
+ msgid "Widgets"
969
+ msgstr ""
970
+
971
+ #: components/instagram/html_templates/form-feed.php:266
972
+ msgid "Works only with business account."
973
+ msgstr ""
974
+
975
+ #: admin/pages/widgets.php:177
976
+ #, php-format
977
+ msgid ""
978
+ "You don't have any Social Slider Feeds. Go to the Wordpress <a href='%1s'>"
979
+ "Widgets</a> page and add it."
980
+ msgstr ""
981
+
982
+ #: admin/pages/feeds.php:87
983
+ msgid ""
984
+ "You haven't finished adding the feed. Are you sure you want to close the "
985
+ "window?"
986
+ msgstr ""
987
+
988
+ #: admin/views/page-license.php:58 admin/views/page-showcase-license.php:58
989
+ msgid ""
990
+ "You use a paid subscription for the plugin updates. In case you don’t want "
991
+ "to receive paid updates, please, click <a data-action=\"unsubscribe\" "
992
+ "class=\"wis-control-btn\" href=\"#\">cancel subscription</a>"
993
+ msgstr ""
994
+
995
+ #: admin/views/page-license.php:25 admin/views/page-showcase-license.php:25
996
+ #, php-format
997
+ msgid "Your current license for %1$s:"
998
+ msgstr ""
999
+
1000
+ #: admin/ajax/check-license.php:43
1001
+ msgid "Your license has been successfully activated"
1002
+ msgstr ""
1003
+
1004
+ #: admin/views/page-license.php:64 admin/views/page-showcase-license.php:64
1005
+ msgid ""
1006
+ "Your license has expired, please extend the license to get updates and "
1007
+ "support."
1008
+ msgstr ""
1009
+
1010
+ #: admin/pages/profiles.php:188
1011
+ msgid "Youtube"
1012
+ msgstr ""
1013
+
1014
+ #: components/youtube/html_templates/accounts.php:18
1015
+ msgid "Youtube api key."
1016
+ msgstr ""
1017
+
1018
+ #: components/youtube/html_templates/widget_settings.php:26
1019
+ #: components/youtube/includes/class-youtube-feed.php:69
1020
+ #: components/youtube/includes/class-youtube-widget.php:67
1021
+ msgid "Youtube feed"
1022
+ msgstr ""
1023
+
1024
+ #: admin/pages/feeds.php:136
1025
+ msgid "Youtube feeds"
1026
+ msgstr ""
1027
+
1028
+ #: components/youtube/includes/class-youtube-feed.php:63
1029
+ msgid "Youtube link"
1030
+ msgstr ""
1031
+
1032
+ msgid "Mobile settings"
1033
+ msgstr ""
libs/factory/adverts/boot.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- use WBCR\Factory_Adverts_123\Base;
4
 
5
  /**
6
  * Factory Adverts
@@ -12,7 +12,7 @@ use WBCR\Factory_Adverts_123\Base;
12
  * @package factory-ad-inserter
13
  * @copyright (c) 2019, Webcraftic Ltd
14
  *
15
- * @version 1.2.3
16
  */
17
 
18
  // Exit if accessed directly
@@ -20,31 +20,31 @@ if( !defined('ABSPATH') ) {
20
  exit;
21
  }
22
 
23
- if( defined('FACTORY_ADVERTS_123_LOADED') || (defined('FACTORY_ADVERTS_BLOCK') && FACTORY_ADVERTS_BLOCK) ) {
24
  return;
25
  }
26
 
27
  # Устанавливаем константу, что модуль уже загружен
28
- define('FACTORY_ADVERTS_123_LOADED', true);
29
 
30
  # Устанавливаем версию модуля
31
- define('FACTORY_ADVERTS_123_VERSION', '1.2.3');
32
 
33
  # Регистрируем тектовый домен, для интернализации интерфейса модуля
34
- load_plugin_textdomain('wbcr_factory_adverts_123', false, dirname(plugin_basename(__FILE__)) . '/langs');
35
 
36
  # Устанавливаем директорию модуля
37
- define('FACTORY_ADVERTS_123_DIR', dirname(__FILE__));
38
 
39
  # Устанавливаем url модуля
40
- define('FACTORY_ADVERTS_123_URL', plugins_url(null, __FILE__));
41
 
42
- require_once(FACTORY_ADVERTS_123_DIR . '/includes/class-rest-request.php');
43
- require_once(FACTORY_ADVERTS_123_DIR . '/includes/class-base.php');
44
 
45
  /**
46
- * @param Wbcr_Factory445_Plugin $plugin
47
  */
48
- add_action('wbcr_factory_adverts_123_plugin_created', function ($plugin) {
49
- $plugin->set_adverts_manager("WBCR\Factory_Adverts_123\Base");
50
  });
1
  <?php
2
 
3
+ use WBCR\Factory_Adverts_130\Base;
4
 
5
  /**
6
  * Factory Adverts
12
  * @package factory-ad-inserter
13
  * @copyright (c) 2019, Webcraftic Ltd
14
  *
15
+ * @version 1.2.4
16
  */
17
 
18
  // Exit if accessed directly
20
  exit;
21
  }
22
 
23
+ if( defined('FACTORY_ADVERTS_130_LOADED') || (defined('FACTORY_ADVERTS_BLOCK') && FACTORY_ADVERTS_BLOCK) ) {
24
  return;
25
  }
26
 
27
  # Устанавливаем константу, что модуль уже загружен
28
+ define('FACTORY_ADVERTS_130_LOADED', true);
29
 
30
  # Устанавливаем версию модуля
31
+ define('FACTORY_ADVERTS_130_VERSION', '1.3.0');
32
 
33
  # Регистрируем тектовый домен, для интернализации интерфейса модуля
34
+ load_plugin_textdomain('wbcr_factory_adverts_130', false, dirname(plugin_basename(__FILE__)) . '/langs');
35
 
36
  # Устанавливаем директорию модуля
37
+ define('FACTORY_ADVERTS_130_DIR', dirname(__FILE__));
38
 
39
  # Устанавливаем url модуля
40
+ define('FACTORY_ADVERTS_130_URL', plugins_url(null, __FILE__));
41
 
42
+ require_once(FACTORY_ADVERTS_130_DIR . '/includes/class-rest-request.php');
43
+ require_once(FACTORY_ADVERTS_130_DIR . '/includes/class-base.php');
44
 
45
  /**
46
+ * @param Wbcr_Factory453_Plugin $plugin
47
  */
48
+ add_action('wbcr_factory_adverts_130_plugin_created', function ($plugin) {
49
+ $plugin->set_adverts_manager("WBCR\Factory_Adverts_130\Base");
50
  });
libs/factory/adverts/includes/class-base.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- namespace WBCR\Factory_Adverts_123;
4
 
5
  // Exit if accessed directly
6
  if ( ! defined( 'ABSPATH' ) ) {
@@ -28,7 +28,7 @@ class Base {
28
  *
29
  * @author Alexander Kovalev <alex.kovalevv@gmail.com>
30
  * @since 1.0.1
31
- * @var \Wbcr_Factory445_Plugin
32
  */
33
  private $plugin;
34
 
@@ -53,7 +53,7 @@ class Base {
53
  *
54
  * @author Alexander Kovalev <alex.kovalevv@gmail.com>
55
  * @since 1.0.1
56
- * @var \WBCR\Factory_Adverts_123\Creative_Motion_API
57
  */
58
  private $api;
59
 
@@ -82,9 +82,9 @@ class Base {
82
  *
83
  * @since 1.0.0 Added
84
  *
85
- * @param \Wbcr_Factory445_Plugin $plugin
86
  */
87
- public function __construct( \Wbcr_Factory445_Plugin $plugin, $settings ) {
88
  $this->plugin = $plugin;
89
 
90
  $this->settings = wp_parse_args( $settings, [
@@ -257,7 +257,7 @@ class Base {
257
  $content = $this->get_debug_message( 'dashboard_widget' );
258
  }
259
 
260
- require_once FACTORY_ADVERTS_123_DIR . '/includes/class-dashboard-widget.php';
261
  new Dashboard_Widget( $this->plugin, $content );
262
  }
263
  }
1
  <?php
2
 
3
+ namespace WBCR\Factory_Adverts_130;
4
 
5
  // Exit if accessed directly
6
  if ( ! defined( 'ABSPATH' ) ) {
28
  *
29
  * @author Alexander Kovalev <alex.kovalevv@gmail.com>
30
  * @since 1.0.1
31
+ * @var \Wbcr_Factory453_Plugin
32
  */
33
  private $plugin;
34
 
53
  *
54
  * @author Alexander Kovalev <alex.kovalevv@gmail.com>
55
  * @since 1.0.1
56
+ * @var \WBCR\Factory_Adverts_130\Creative_Motion_API
57
  */
58
  private $api;
59
 
82
  *
83
  * @since 1.0.0 Added
84
  *
85
+ * @param \Wbcr_Factory453_Plugin $plugin
86
  */
87
+ public function __construct( \Wbcr_Factory453_Plugin $plugin, $settings ) {
88
  $this->plugin = $plugin;
89
 
90
  $this->settings = wp_parse_args( $settings, [
257
  $content = $this->get_debug_message( 'dashboard_widget' );
258
  }
259
 
260
+ require_once FACTORY_ADVERTS_130_DIR . '/includes/class-dashboard-widget.php';
261
  new Dashboard_Widget( $this->plugin, $content );
262
  }
263
  }
libs/factory/adverts/includes/class-dashboard-widget.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- namespace WBCR\Factory_Adverts_123;
4
 
5
  // Exit if accessed directly
6
  if ( ! defined( 'ABSPATH' ) ) {
@@ -35,7 +35,7 @@ class Dashboard_Widget {
35
  *
36
  * @author Alexander Kovalev <alex.kovalevv@gmail.com>
37
  * @since 1.0.1
38
- * @var \Wbcr_Factory445_Plugin
39
  */
40
  private $plugin;
41
 
@@ -46,10 +46,10 @@ class Dashboard_Widget {
46
  *
47
  * @since 1.0.0 Added
48
  *
49
- * @param \Wbcr_Factory445_Plugin $plugin
50
  * @param string $content
51
  */
52
- public function __construct( \Wbcr_Factory445_Plugin $plugin, $content ) {
53
 
54
  $this->plugin = $plugin;
55
  $this->content = $content;
1
  <?php
2
 
3
+ namespace WBCR\Factory_Adverts_130;
4
 
5
  // Exit if accessed directly
6
  if ( ! defined( 'ABSPATH' ) ) {
35
  *
36
  * @author Alexander Kovalev <alex.kovalevv@gmail.com>
37
  * @since 1.0.1
38
+ * @var \Wbcr_Factory453_Plugin
39
  */
40
  private $plugin;
41
 
46
  *
47
  * @since 1.0.0 Added
48
  *
49
+ * @param \Wbcr_Factory453_Plugin $plugin
50
  * @param string $content
51
  */
52
+ public function __construct( \Wbcr_Factory453_Plugin $plugin, $content ) {
53
 
54
  $this->plugin = $plugin;
55
  $this->content = $content;
libs/factory/adverts/includes/class-rest-request.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- namespace WBCR\Factory_Adverts_123;
4
 
5
  // Exit if accessed directly
6
  if( !defined('ABSPATH') ) {
@@ -65,7 +65,7 @@ class Creative_Motion_API {
65
  *
66
  * @author Alexander Kovalev <alex.kovalevv@gmail.com>
67
  * @since 1.0.1
68
- * @var \Wbcr_Factory445_Plugin
69
  */
70
  private $plugin;
71
 
@@ -75,11 +75,11 @@ class Creative_Motion_API {
75
  *
76
  * Variable initialization.
77
  *
78
- * @param \Wbcr_Factory445_Plugin $plugin_name
79
  * @since 1.0.0 Added
80
  *
81
  */
82
- public function __construct(\Wbcr_Factory445_Plugin $plugin)
83
  {
84
  $this->plugin = $plugin;
85
  }
1
  <?php
2
 
3
+ namespace WBCR\Factory_Adverts_130;
4
 
5
  // Exit if accessed directly
6
  if( !defined('ABSPATH') ) {
65
  *
66
  * @author Alexander Kovalev <alex.kovalevv@gmail.com>
67
  * @since 1.0.1
68
+ * @var \Wbcr_Factory453_Plugin
69
  */
70
  private $plugin;
71
 
75
  *
76
  * Variable initialization.
77
  *
78
+ * @param \Wbcr_Factory453_Plugin $plugin_name
79
  * @since 1.0.0 Added
80
  *
81
  */
82
+ public function __construct(\Wbcr_Factory453_Plugin $plugin)
83
  {
84
  $this->plugin = $plugin;
85
  }
libs/factory/adverts/langs/{wbcr_factory_adverts_123-ru_RU.mo → wbcr_factory_adverts_130-ru_RU.mo} RENAMED
File without changes
libs/factory/adverts/langs/{wbcr_factory_adverts_123-ru_RU.po → wbcr_factory_adverts_130-ru_RU.po} RENAMED
File without changes
libs/factory/bootstrap/assets/css-min/bootstrap.accordion.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /*!
2
- * Bootstrap generator - v1.0.1, 2021-02-04
3
  * Webcraftic factory build
4
  *
5
  * Copyright 2018, Alex Kovalev <alex.kovalevv@gmail.com>, Webcraftic <wordpress.webraftic@gmail.com>
@@ -8,4 +8,4 @@
8
  */
9
 
10
 
11
- .factory-bootstrap-445 .factory-accordion{margin:0 0 30px;border-top:1px solid #DDD;border-right:1px solid #DDD;border-left:1px solid #DDD;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.factory-bootstrap-445 .factory-accordion>h3{border-bottom:1px solid #DDD;cursor:pointer;padding:8px 15px;margin:0}.factory-bootstrap-445 .factory-accordion>div{display:none;margin:0;border-bottom:1px solid #DDD}.factory-bootstrap-445 .factory-accordion-item{display:none}.factory-bootstrap-445 .inner-factory-accordion-item{padding:10px 0}.factory-bootstrap-445 .factory-accordion>h3.active:hover{cursor:default}
1
  /*!
2
+ * Bootstrap generator - v1.0.1, 2021-11-19
3
  * Webcraftic factory build
4
  *
5
  * Copyright 2018, Alex Kovalev <alex.kovalevv@gmail.com>, Webcraftic <wordpress.webraftic@gmail.com>
8
  */
9
 
10
 
11
+ .factory-bootstrap-454 .factory-accordion{margin:0 0 30px;border-top:1px solid #DDD;border-right:1px solid #DDD;border-left:1px solid #DDD;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.factory-bootstrap-454 .factory-accordion>h3{border-bottom:1px solid #DDD;cursor:pointer;padding:8px 15px;margin:0}.factory-bootstrap-454 .factory-accordion>div{display:none;margin:0;border-bottom:1px solid #DDD}.factory-bootstrap-454 .factory-accordion-item{display:none}.factory-bootstrap-454 .inner-factory-accordion-item{padding:10px 0}.factory-bootstrap-454 .factory-accordion>h3.active:hover{cursor:default}
libs/factory/bootstrap/assets/css-min/bootstrap.blue.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /*!
2
- * Bootstrap generator - v1.0.1, 2021-02-04
3
  * Webcraftic factory build
4
  *
5
  * Copyright 2018, Alex Kovalev <alex.kovalevv@gmail.com>, Webcraftic <wordpress.webraftic@gmail.com>
@@ -8,4 +8,4 @@
8
  */
9
 
10
 
11
- .factory-bootstrap-445 .btn-primary{background:#e1a948;border-color:#d39323;color:#fff;-webkit-box-shadow:inset 0 1px 0 #ecc88a,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #ecc88a,0 1px 0 rgba(0,0,0,.15)}.factory-bootstrap-445 .btn-primary:focus,.factory-bootstrap-445 .btn-primary:hover{background:#db9825;border-color:#bd831f;color:#fff;-webkit-box-shadow:inset 0 1px 0 #e8be74,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #e8be74,0 1px 0 rgba(0,0,0,.15)}.factory-bootstrap-445 .btn-primary:active{background:#db9825;border-color:#bd831f;color:#fff;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.factory-bootstrap-445 .btn-primary:disabled,.factory-bootstrap-445 .btn-primary[disabled]{color:#d1cdc7!important;background:#db9825!important;border-color:#bd831f!important;text-shadow:none!important}.factory-bootstrap-445 .btn-group .btn.active.value{background-color:#e1a948;-webkit-box-shadow:inset 0 1px 2px #d39323;box-shadow:inset 0 1px 2px #d39323;border-top:1px solid #d39323;border-bottom:1px solid #d39323;border-left:1px solid #d39323}.factory-bootstrap-445 .pagination>.active>a,.factory-bootstrap-445 .pagination>.active>a:focus,.factory-bootstrap-445 .pagination>.active>a:hover,.factory-bootstrap-445 .pagination>.active>span,.factory-bootstrap-445 .pagination>.active>span:focus,.factory-bootstrap-445 .pagination>.active>span:hover{background-color:#e1a948;border-color:#d39323}
1
  /*!
2
+ * Bootstrap generator - v1.0.1, 2021-11-19
3
  * Webcraftic factory build
4
  *
5
  * Copyright 2018, Alex Kovalev <alex.kovalevv@gmail.com>, Webcraftic <wordpress.webraftic@gmail.com>
8
  */
9
 
10
 
11
+ .factory-bootstrap-454 .btn-primary{background:#e1a948;border-color:#d39323;color:#fff;-webkit-box-shadow:inset 0 1px 0 #ecc88a,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #ecc88a,0 1px 0 rgba(0,0,0,.15)}.factory-bootstrap-454 .btn-primary:focus,.factory-bootstrap-454 .btn-primary:hover{background:#db9825;border-color:#bd831f;color:#fff;-webkit-box-shadow:inset 0 1px 0 #e8be74,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #e8be74,0 1px 0 rgba(0,0,0,.15)}.factory-bootstrap-454 .btn-primary:active{background:#db9825;border-color:#bd831f;color:#fff;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.factory-bootstrap-454 .btn-primary:disabled,.factory-bootstrap-454 .btn-primary[disabled]{color:#d1cdc7!important;background:#db9825!important;border-color:#bd831f!important;text-shadow:none!important}.factory-bootstrap-454 .btn-group .btn.active.value{background-color:#e1a948;-webkit-box-shadow:inset 0 1px 2px #d39323;box-shadow:inset 0 1px 2px #d39323;border-top:1px solid #d39323;border-bottom:1px solid #d39323;border-left:1px solid #d39323}.factory-bootstrap-454 .pagination>.active>a,.factory-bootstrap-454 .pagination>.active>a:focus,.factory-bootstrap-454 .pagination>.active>a:hover,.factory-bootstrap-454 .pagination>.active>span,.factory-bootstrap-454 .pagination>.active>span:focus,.factory-bootstrap-454 .pagination>.active>span:hover{background-color:#e1a948;border-color:#d39323}
libs/factory/bootstrap/assets/css-min/bootstrap.coffee.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /*!
2
- * Bootstrap generator - v1.0.1, 2021-02-04
3
  * Webcraftic factory build
4
  *
5
  * Copyright 2018, Alex Kovalev <alex.kovalevv@gmail.com>, Webcraftic <wordpress.webraftic@gmail.com>
@@ -8,4 +8,4 @@
8
  */
9
 
10
 
11
- .factory-bootstrap-445 .btn-primary{background:#c7a589;border-color:#b78a66;color:#fff;-webkit-box-shadow:inset 0 1px 0 #e0cdbd,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #e0cdbd,0 1px 0 rgba(0,0,0,.15)}.factory-bootstrap-445 .btn-primary:focus,.factory-bootstrap-445 .btn-primary:hover{background:#ba906d;border-color:#ae7d55;color:#fff;-webkit-box-shadow:inset 0 1px 0 #d7bfac,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #d7bfac,0 1px 0 rgba(0,0,0,.15)}.factory-bootstrap-445 .btn-primary:active{background:#ba906d;border-color:#ae7d55;color:#fff;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.factory-bootstrap-445 .btn-primary:disabled,.factory-bootstrap-445 .btn-primary[disabled]{color:#d1cbc7!important;background:#ba906d!important;border-color:#ae7d55!important;text-shadow:none!important}.factory-bootstrap-445 .btn-group .btn.active.value{background-color:#c7a589;-webkit-box-shadow:inset 0 1px 2px #b78a66;box-shadow:inset 0 1px 2px #b78a66;border-top:1px solid #b78a66;border-bottom:1px solid #b78a66;border-left:1px solid #b78a66}.factory-bootstrap-445 .pagination>.active>a,.factory-bootstrap-445 .pagination>.active>a:focus,.factory-bootstrap-445 .pagination>.active>a:hover,.factory-bootstrap-445 .pagination>.active>span,.factory-bootstrap-445 .pagination>.active>span:focus,.factory-bootstrap-445 .pagination>.active>span:hover{background-color:#c7a589;border-color:#b78a66}
1
  /*!
2
+ * Bootstrap generator - v1.0.1, 2021-11-19
3
  * Webcraftic factory build
4
  *
5
  * Copyright 2018, Alex Kovalev <alex.kovalevv@gmail.com>, Webcraftic <wordpress.webraftic@gmail.com>
8
  */
9
 
10
 
11
+ .factory-bootstrap-454 .btn-primary{background:#c7a589;border-color:#b78a66;color:#fff;-webkit-box-shadow:inset 0 1px 0 #e0cdbd,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #e0cdbd,0 1px 0 rgba(0,0,0,.15)}.factory-bootstrap-454 .btn-primary:focus,.factory-bootstrap-454 .btn-primary:hover{background:#ba906d;border-color:#ae7d55;color:#fff;-webkit-box-shadow:inset 0 1px 0 #d7bfac,0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 #d7bfac,0 1px 0 rgba(0,0,0,.15)}.factory-bootstrap-454 .btn-primary:active{background:#ba906d;border-color:#ae7d55;color:#fff;-webkit-box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5);box-shadow:inset 0 2px 5px -3px rgba(0,0,0,.5)}.factory-bootstrap-454 .btn-primary:disabled,.factory-bootstrap-454 .btn-primary[disabled]{color:#d1cbc7!important;background:#ba906d!important;border-color:#ae7d55!important;text-shadow:none!important}.factory-bootstrap-454 .btn-group .btn.active.value{background-color:#c7a589;-webkit-box-shadow:inset 0 1px 2px #b78a66;box-shadow:inset 0 1px 2px #b78a66;border-top:1px solid #b78a66;border-bottom:1px solid #b78a66;border-left:1px solid #b78a66}.factory-bootstrap-454 .pagination>.active>a,.factory-bootstrap-454 .pagination>.active>a:focus,.factory-bootstrap-454 .pagination>.active>a:hover,.factory-bootstrap-454 .pagination>.active>span,.factory-bootstrap-454 .pagination>.active>span:focus,.factory-bootstrap-454 .pagination>.active>span:hover{background-color:#c7a589;border-color:#b78a66}
libs/factory/bootstrap/assets/css-min/bootstrap.core.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /*!
2
- * Bootstrap generator - v1.0.1, 2021-02-04
3
  * Webcraftic factory build
4
  *
5
  * Copyright 2018, Alex Kovalev <alex.kovalevv@gmail.com>, Webcraftic <wordpress.webraftic@gmail.com>
@@ -8,18 +8,4 @@
8
  */
9
 
10
 
11
- .factory-bootstrap-445 article,.factory-bootstrap-445 aside,.factory-bootstrap-445 details,.factory-bootstrap-445 figcaption,.factory-bootstrap-445 figure,.factory-bootstrap-445 footer,.factory-bootstrap-445 header,.factory-bootstrap-445 hgroup,.factory-bootstrap-445 main,.factory-bootstrap-445 nav,.factory-bootstrap-445 section,.factory-bootstrap-445 summary{display:block}.factory-bootstrap-445 audio,.factory-bootstrap-445 canvas,.factory-bootstrap-445 video{display:inline-block}.factory-bootstrap-445 audio:not([controls]){display:none;height:0}.factory-bootstrap-445 [hidden],.factory-bootstrap-445 template{display:none}.factory-bootstrap-445 body{margin:0}.factory-bootstrap-445 a{background:0 0}.factory-bootstrap-445 a:focus{outline:thin dotted}.factory-bootstrap-445 a:active,.factory-bootstrap-445 a:hover{outline:0}.factory-bootstrap-445 h1{margin:.67em 0}.factory-bootstrap-445 b,.factory-bootstrap-445 strong{font-weight:700}.factory-bootstrap-445 dfn{font-style:italic}.factory-bootstrap-445 hr{height:0;-moz-box-sizing:content-box;box-sizing:content-box}.factory-bootstrap-445 mark{color:#000;background:#ff0}.factory-bootstrap-445 code,.factory-bootstrap-445 kbd,.factory-bootstrap-445 pre,.factory-bootstrap-445 samp{font-size:1em}.factory-bootstrap-445 pre{white-space:pre-wrap}.factory-bootstrap-445 q{quotes:"\201C" "\201D" "\2018" "\2019"}.factory-bootstrap-445 sub,.factory-bootstrap-445 sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}.factory-bootstrap-445 sup{top:-.5em}.factory-bootstrap-445 sub{bottom:-.25em}.factory-bootstrap-445 img{border:0}.factory-bootstrap-445 svg:not(:root){overflow:hidden}.factory-bootstrap-445 figure{margin:0}.factory-bootstrap-445 button,.factory-bootstrap-445 input,.factory-bootstrap-445 select,.factory-bootstrap-445 textarea{margin:0}.factory-bootstrap-445 button,.factory-bootstrap-445 select{text-transform:none}.factory-bootstrap-445 select{padding-right:4px!important}.factory-bootstrap-445 button,.factory-bootstrap-445 input[type=reset],.factory-bootstrap-445 input[type=submit],html .factory-bootstrap-445 input[type=button]{cursor:pointer;-webkit-appearance:button}.factory-bootstrap-445 button[disabled],html .factory-bootstrap-445 input[disabled]{cursor:default}.factory-bootstrap-445 input[type=checkbox],.factory-bootstrap-445 input[type=radio]{padding:0;box-sizing:border-box}.factory-bootstrap-445 input[type=search]{-webkit-appearance:textfield}.factory-bootstrap-445 input[type=search]::-webkit-search-cancel-button,.factory-bootstrap-445 input[type=search]::-webkit-search-decoration{-webkit-appearance:none}.factory-bootstrap-445 button::-moz-focus-inner,.factory-bootstrap-445 input::-moz-focus-inner{padding:0;border:0}.factory-bootstrap-445 textarea{overflow:auto;vertical-align:top}.factory-bootstrap-445 table{border-collapse:collapse;border-spacing:0}@media print{.factory-bootstrap-445 *{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}.factory-bootstrap-445 a,.factory-bootstrap-445 a:visited{text-decoration:underline}.factory-bootstrap-445 a[href]:after{content:" (" attr(href) ")"}.factory-bootstrap-445 abbr[title]:after{content:" (" attr(title) ")"}.factory-bootstrap-445 a[href^="javascript:"]:after,.factory-bootstrap-445 a[href^="#"]:after{content:""}.factory-bootstrap-445 blockquote,.factory-bootstrap-445 pre{border:1px solid #999;page-break-inside:avoid}.factory-bootstrap-445 thead{display:table-header-group}.factory-bootstrap-445 img,.factory-bootstrap-445 tr{page-break-inside:avoid}.factory-bootstrap-445 img{max-width:100%!important}@page{margin:2cm .5cm}.factory-bootstrap-445 h2,.factory-bootstrap-445 h3,.factory-bootstrap-445 p{orphans:3;widows:3}.factory-bootstrap-445 h2,.factory-bootstrap-445 h3{page-break-after:avoid}.factory-bootstrap-445 select{background:#fff!important}.factory-bootstrap-445 .navbar{display:none}.factory-bootstrap-445 .table td,.factory-bootstrap-445 .table th{background-color:#fff!important}.factory-bootstrap-445 .btn>.caret,.factory-bootstrap-445 .dropup>.btn>.caret{border-top-color:#000!important}.factory-bootstrap-445 .label{border:1px solid #000}.factory-bootstrap-445 .table{border-collapse:collapse!important}.factory-bootstrap-445 .table-bordered td,.factory-bootstrap-445 .table-bordered th{border:1px solid #ddd!important}}.factory-bootstrap-445 *,.factory-bootstrap-445 :after,.factory-bootstrap-445 :before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html .factory-bootstrap-445{-webkit-tap-highlight-color:rgba(0,0,0,0)}.factory-bootstrap-445 body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.428571429;color:#333;background-color:#fff}.factory-bootstrap-445 button,.factory-bootstrap-445 input,.factory-bootstrap-445 select,.factory-bootstrap-445 textarea{font-family:inherit;font-size:inherit;line-height:inherit}.factory-bootstrap-445 img{vertical-align:middle}.factory-bootstrap-445 .img-responsive{display:block;height:auto;max-width:100%}.factory-bootstrap-445 .img-rounded{border-radius:6px}.factory-bootstrap-445 .img-thumbnail{display:inline-block;height:auto;max-width:100%;padding:4px;line-height:1.428571429;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.factory-bootstrap-445 .img-circle{border-radius:50%}.factory-bootstrap-445 hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.factory-bootstrap-445 .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.factory-bootstrap-445 .h1,.factory-bootstrap-445 .h2,.factory-bootstrap-445 .h3,.factory-bootstrap-445 .h4,.factory-bootstrap-445 .h5,.factory-bootstrap-445 .h6,.factory-bootstrap-445 h1,.factory-bootstrap-445 h2,.factory-bootstrap-445 h3,.factory-bootstrap-445 h4,.factory-bootstrap-445 h5,.factory-bootstrap-445 h6{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:500;line-height:1.1;color:inherit}.factory-bootstrap-445 .h1 .small,.factory-bootstrap-445 .h1 small,.factory-bootstrap-445 .h2 .small,.factory-bootstrap-445 .h2 small,.factory-bootstrap-445 .h3 .small,.factory-bootstrap-445 .h3 small,.factory-bootstrap-445 .h4 .small,.factory-bootstrap-445 .h4 small,.factory-bootstrap-445 .h5 .small,.factory-bootstrap-445 .h5 small,.factory-bootstrap-445 .h6 .small,.factory-bootstrap-445 .h6 small,.factory-bootstrap-445 h1 .small,.factory-bootstrap-445 h1 small,.factory-bootstrap-445 h2 .small,.factory-bootstrap-445 h2 small,.factory-bootstrap-445 h3 .small,.factory-bootstrap-445 h3 small,.factory-bootstrap-445 h4 .small,.factory-bootstrap-445 h4 small,.factory-bootstrap-445 h5 .small,.factory-bootstrap-445 h5 small,.factory-bootstrap-445 h6 .small,.factory-bootstrap-445 h6 small{font-weight:400;line-height:1;color:#999}.factory-bootstrap-445 h1,.factory-bootstrap-445 h2,.factory-bootstrap-445 h3{margin-top:20px;margin-bottom:10px}.factory-bootstrap-445 h1 .small,.factory-bootstrap-445 h1 small,.factory-bootstrap-445 h2 .small,.factory-bootstrap-445 h2 small,.factory-bootstrap-445 h3 .small,.factory-bootstrap-445 h3 small{font-size:65%}.factory-bootstrap-445 h4,.factory-bootstrap-445 h5,.factory-bootstrap-445 h6{margin-top:10px;margin-bottom:10px}.factory-bootstrap-445 h4 .small,.factory-bootstrap-445 h4 small,.factory-bootstrap-445 h5 .small,.factory-bootstrap-445 h5 small,.factory-bootstrap-445 h6 .small,.factory-bootstrap-445 h6 small{font-size:75%}.factory-bootstrap-445 .h1,.factory-bootstrap-445 h1{font-size:36px}.factory-bootstrap-445 .h2,.factory-bootstrap-445 h2{font-size:30px}.factory-bootstrap-445 .h3,.factory-bootstrap-445 h3{font-size:24px}.factory-bootstrap-445 .h4,.factory-bootstrap-445 h4{font-size:18px}.factory-bootstrap-445 .h5,.factory-bootstrap-445 h5{font-size:14px}.factory-bootstrap-445 .h6,.factory-bootstrap-445 h6{font-size:12px}.factory-bootstrap-445 p{margin:0 0 10px}.factory-bootstrap-445 .lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.factory-bootstrap-445 .small,.factory-bootstrap-445 small{font-size:85%}.factory-bootstrap-445 cite{font-style:normal}.factory-bootstrap-445 .text-muted{color:#999}.factory-bootstrap-445 .text-primary{color:#428bca}.factory-bootstrap-445 .text-primary:hover{color:#3071a9}.factory-bootstrap-445 .text-warning{color:#8a6d3b}.factory-bootstrap-445 .text-warning:hover{color:#66512c}.factory-bootstrap-445 .text-danger{color:#a94442}.factory-bootstrap-445 .text-danger:hover{color:#843534}.factory-bootstrap-445 .text-success{color:#3c763d}.factory-bootstrap-445 .text-success:hover{color:#2b542c}.factory-bootstrap-445 .text-info{color:#31708f}.factory-bootstrap-445 .text-info:hover{color:#245269}.factory-bootstrap-445 .text-left{text-align:left}.factory-bootstrap-445 .text-right{text-align:right}.factory-bootstrap-445 .text-center{text-align:center}.factory-bootstrap-445 .page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}.factory-bootstrap-445 ol,.factory-bootstrap-445 ul{margin-top:0;margin-bottom:10px}.factory-bootstrap-445 ol ol,.factory-bootstrap-445 ol ul,.factory-bootstrap-445 ul ol,.factory-bootstrap-445 ul ul{margin-bottom:0}.factory-bootstrap-445 .list-inline,.factory-bootstrap-445 .list-unstyled{padding-left:0;list-style:none}.factory-bootstrap-445 .list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}.factory-bootstrap-445 .list-inline>li:first-child{padding-left:0}.factory-bootstrap-445 dl{margin-top:0;margin-bottom:20px}.factory-bootstrap-445 dd,.factory-bootstrap-445 dt{line-height:1.428571429}.factory-bootstrap-445 dt{font-weight:700}.factory-bootstrap-445 dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}.dl-horizontal dd:after,.dl-horizontal dd:before{display:table;content:" "}.dl-horizontal dd:after{clear:both}}.factory-bootstrap-445 abbr[data-original-title],.factory-bootstrap-445 abbr[title]{cursor:help;border-bottom:1px dotted #999}.factory-bootstrap-445 .initialism{font-size:90%;text-transform:uppercase}.factory-bootstrap-445 blockquote{padding:10px 20px;margin:0 0 20px;border-left:5px solid #eee}.factory-bootstrap-445 blockquote p{font-size:17.5px;font-weight:300;line-height:1.25}.factory-bootstrap-445 blockquote p:last-child{margin-bottom:0}.factory-bootstrap-445 blockquote .small,.factory-bootstrap-445 blockquote small{display:block;line-height:1.428571429;color:#999}.factory-bootstrap-445 blockquote .small:before,.factory-bootstrap-445 blockquote small:before{content:'\2014 \00A0'}.factory-bootstrap-445 blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}.factory-bootstrap-445 blockquote.pull-right .small,.factory-bootstrap-445 blockquote.pull-right p,.factory-bootstrap-445 blockquote.pull-right small{text-align:right}.factory-bootstrap-445 blockquote.pull-right .small:before,.factory-bootstrap-445 blockquote.pull-right small:before{content:''}.factory-bootstrap-445 blockquote.pull-right .small:after,.factory-bootstrap-445 blockquote.pull-right small:after{content:'\00A0 \2014'}.factory-bootstrap-445 blockquote:after,.factory-bootstrap-445 blockquote:before{content:""}.factory-bootstrap-445 address{margin-bottom:20px;font-style:normal;line-height:1.428571429}.factory-bootstrap-445 code,.factory-bootstrap-445 kbd,.factory-bootstrap-445 pre,.factory-bootstrap-445 samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}.factory-bootstrap-445 code{padding:2px 4px;font-size:90%;color:#c7254e;white-space:nowrap;background-color:#f9f2f4;border-radius:4px}.factory-bootstrap-445 pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.428571429;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}.factory-bootstrap-445 pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.factory-bootstrap-445 .pre-scrollable{max-height:340px;overflow-y:scroll}.factory-bootstrap-445 .container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.factory-bootstrap-445 .container:after,.factory-bootstrap-445 .container:before{display:table;content:" "}.factory-bootstrap-445 .container:after{clear:both}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.factory-bootstrap-445 .row{margin-right:-15px;margin-left:-15px}.factory-bootstrap-445 .row:after,.factory-bootstrap-445 .row:before{display:table;content:" "}.factory-bootstrap-445 .row:after{clear:both}.factory-bootstrap-445 .col-lg-1,.factory-bootstrap-445 .col-lg-10,.factory-bootstrap-445 .col-lg-11,.factory-bootstrap-445 .col-lg-12,.factory-bootstrap-445 .col-lg-2,.factory-bootstrap-445 .col-lg-3,.factory-bootstrap-445 .col-lg-4,.factory-bootstrap-445 .col-lg-5,.factory-bootstrap-445 .col-lg-6,.factory-bootstrap-445 .col-lg-7,.factory-bootstrap-445 .col-lg-8,.factory-bootstrap-445 .col-lg-9,.factory-bootstrap-445 .col-md-1,.factory-bootstrap-445 .col-md-10,.factory-bootstrap-445 .col-md-11,.factory-bootstrap-445 .col-md-12,.factory-bootstrap-445 .col-md-2,.factory-bootstrap-445 .col-md-3,.factory-bootstrap-445 .col-md-4,.factory-bootstrap-445 .col-md-5,.factory-bootstrap-445 .col-md-6,.factory-bootstrap-445 .col-md-7,.factory-bootstrap-445 .col-md-8,.factory-bootstrap-445 .col-md-9,.factory-bootstrap-445 .col-sm-1,.factory-bootstrap-445 .col-sm-10,.factory-bootstrap-445 .col-sm-11,.factory-bootstrap-445 .col-sm-12,.factory-bootstrap-445 .col-sm-2,.factory-bootstrap-445 .col-sm-3,.factory-bootstrap-445 .col-sm-4,.factory-bootstrap-445 .col-sm-5,.factory-bootstrap-445 .col-sm-6,.factory-bootstrap-445 .col-sm-7,.factory-bootstrap-445 .col-sm-8,.factory-bootstrap-445 .col-sm-9,.factory-bootstrap-445 .col-xs-1,.factory-bootstrap-445 .col-xs-10,.factory-bootstrap-445 .col-xs-11,.factory-bootstrap-445 .col-xs-12,.factory-bootstrap-445 .col-xs-2,.factory-bootstrap-445 .col-xs-3,.factory-bootstrap-445 .col-xs-4,.factory-bootstrap-445 .col-xs-5,.factory-bootstrap-445 .col-xs-6,.factory-bootstrap-445 .col-xs-7,.factory-bootstrap-445 .col-xs-8,.factory-bootstrap-445 .col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.factory-bootstrap-445 .col-xs-1,.factory-bootstrap-445 .col-xs-10,.factory-bootstrap-445 .col-xs-11,.factory-bootstrap-445 .col-xs-12,.factory-bootstrap-445 .col-xs-2,.factory-bootstrap-445 .col-xs-3,.factory-bootstrap-445 .col-xs-4,.factory-bootstrap-445 .col-xs-5,.factory-bootstrap-445 .col-xs-6,.factory-bootstrap-445 .col-xs-7,.factory-bootstrap-445 .col-xs-8,.factory-bootstrap-445 .col-xs-9{float:left}.factory-bootstrap-445 .col-xs-12{width:100%}.factory-bootstrap-445 .col-xs-11{width:91.66666666666666%}.factory-bootstrap-445 .col-xs-10{width:83.33333333333334%}.factory-bootstrap-445 .col-xs-9{width:75%}.factory-bootstrap-445 .col-xs-8{width:66.66666666666666%}.factory-bootstrap-445 .col-xs-7{width:58.333333333333336%}.factory-bootstrap-445 .col-xs-6{width:50%}.factory-bootstrap-445 .col-xs-5{width:41.66666666666667%}.factory-bootstrap-445 .col-xs-4{width:33.33333333333333%}.factory-bootstrap-445 .col-xs-3{width:25%}.factory-bootstrap-445 .col-xs-2{width:16.666666666666664%}.factory-bootstrap-445 .col-xs-1{width:8.333333333333332%}.factory-bootstrap-445 .col-xs-pull-12{right:100%}.factory-bootstrap-445 .col-xs-pull-11{right:91.66666666666666%}.factory-bootstrap-445 .col-xs-pull-10{right:83.33333333333334%}.factory-bootstrap-445 .col-xs-pull-9{right:75%}.factory-bootstrap-445 .col-xs-pull-8{right:66.66666666666666%}.factory-bootstrap-445 .col-xs-pull-7{right:58.333333333333336%}.factory-bootstrap-445 .col-xs-pull-6{right:50%}.factory-bootstrap-445 .col-xs-pull-5{right:41.66666666666667%}.factory-bootstrap-445 .col-xs-pull-4{right:33.33333333333333%}.factory-bootstrap-445 .col-xs-pull-3{right:25%}.factory-bootstrap-445 .col-xs-pull-2{right:16.666666666666664%}.factory-bootstrap-445 .col-xs-pull-1{right:8.333333333333332%}.factory-bootstrap-445 .col-xs-pull-0{right:0}.factory-bootstrap-445 .col-xs-push-12{left:100%}.factory-bootstrap-445 .col-xs-push-11{left:91.66666666666666%}.factory-bootstrap-445 .col-xs-push-10{left:83.33333333333334%}.factory-bootstrap-445 .col-xs-push-9{left:75%}.factory-bootstrap-445 .col-xs-push-8{left:66.66666666666666%}.factory-bootstrap-445 .col-xs-push-7{left:58.333333333333336%}.factory-bootstrap-445 .col-xs-push-6{left:50%}.factory-bootstrap-445 .col-xs-push-5{left:41.66666666666667%}.factory-bootstrap-445 .col-xs-push-4{left:33.33333333333333%}.factory-bootstrap-445 .col-xs-push-3{left:25%}.factory-bootstrap-445 .col-xs-push-2{left:16.666666666666664%}.factory-bootstrap-445 .col-xs-push-1{left:8.333333333333332%}.factory-bootstrap-445 .col-xs-push-0{left:0}.factory-bootstrap-445 .col-xs-offset-12{margin-left:100%}.factory-bootstrap-445 .col-xs-offset-11{margin-left:91.66666666666666%}.factory-bootstrap-445 .col-xs-offset-10{margin-left:83.33333333333334%}.factory-bootstrap-445 .col-xs-offset-9{margin-left:75%}.factory-bootstrap-445 .col-xs-offset-8{margin-left:66.66666666666666%}.factory-bootstrap-445 .col-xs-offset-7{margin-left:58.333333333333336%}.factory-bootstrap-445 .col-xs-offset-6{margin-left:50%}.factory-bootstrap-445 .col-xs-offset-5{margin-left:41.66666666666667%}.factory-bootstrap-445 .col-xs-offset-4{margin-left:33.33333333333333%}.factory-bootstrap-445 .col-xs-offset-3{margin-left:25%}.factory-bootstrap-445 .col-xs-offset-2{margin-left:16.666666666666664%}.factory-bootstrap-445 .col-xs-offset-1{margin-left:8.333333333333332%}.factory-bootstrap-445 .col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666666666666%}.col-sm-10{width:83.33333333333334%}.col-sm-9{width:75%}.col-sm-8{width:66.66666666666666%}.col-sm-7{width:58.333333333333336%}.col-sm-6{width:50%}.col-sm-5{width:41.66666666666667%}.col-sm-4{width:33.33333333333333%}.col-sm-3{width:25%}.col-sm-2{width:16.666666666666664%}.col-sm-1{width:8.333333333333332%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666666666666%}.col-sm-pull-10{right:83.33333333333334%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666666666666%}.col-sm-pull-7{right:58.333333333333336%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666666666667%}.col-sm-pull-4{right:33.33333333333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.666666666666664%}.col-sm-pull-1{right:8.333333333333332%}.col-sm-pull-0{right:0}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666666666666%}.col-sm-push-10{left:83.33333333333334%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666666666666%}.col-sm-push-7{left:58.333333333333336%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666666666667%}.col-sm-push-4{left:33.33333333333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.666666666666664%}.col-sm-push-1{left:8.333333333333332%}.col-sm-push-0{left:0}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666666666666%}.col-sm-offset-10{margin-left:83.33333333333334%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666666666666%}.col-sm-offset-7{margin-left:58.333333333333336%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666666666667%}.col-sm-offset-4{margin-left:33.33333333333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.666666666666664%}.col-sm-offset-1{margin-left:8.333333333333332%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666666666666%}.col-md-10{width:83.33333333333334%}.col-md-9{width:75%}.col-md-8{width:66.66666666666666%}.col-md-7{width:58.333333333333336%}.col-md-6{width:50%}.col-md-5{width:41.66666666666667%}.col-md-4{width:33.33333333333333%}.col-md-3{width:25%}.col-md-2{width:16.666666666666664%}.col-md-1{width:8.333333333333332%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666666666666%}.col-md-pull-10{right:83.33333333333334%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666666666666%}.col-md-pull-7{right:58.333333333333336%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666666666667%}.col-md-pull-4{right:33.33333333333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.666666666666664%}.col-md-pull-1{right:8.333333333333332%}.col-md-pull-0{right:0}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666666666666%}.col-md-push-10{left:83.33333333333334%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666666666666%}.col-md-push-7{left:58.333333333333336%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666666666667%}.col-md-push-4{left:33.33333333333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.666666666666664%}.col-md-push-1{left:8.333333333333332%}.col-md-push-0{left:0}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666666666666%}.col-md-offset-10{margin-left:83.33333333333334%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666666666666%}.col-md-offset-7{margin-left:58.333333333333336%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666666666667%}.col-md-offset-4{margin-left:33.33333333333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.666666666666664%}.col-md-offset-1{margin-left:8.333333333333332%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666666666666%}.col-lg-10{width:83.33333333333334%}.col-lg-9{width:75%}.col-lg-8{width:66.66666666666666%}.col-lg-7{width:58.333333333333336%}.col-lg-6{width:50%}.col-lg-5{width:41.66666666666667%}.col-lg-4{width:33.33333333333333%}.col-lg-3{width:25%}.col-lg-2{width:16.666666666666664%}.col-lg-1{width:8.333333333333332%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666666666666%}.col-lg-pull-10{right:83.33333333333334%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666666666666%}.col-lg-pull-7{right:58.333333333333336%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666666666667%}.col-lg-pull-4{right:33.33333333333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.666666666666664%}.col-lg-pull-1{right:8.333333333333332%}.col-lg-pull-0{right:0}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666666666666%}.col-lg-push-10{left:83.33333333333334%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666666666666%}.col-lg-push-7{left:58.333333333333336%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666666666667%}.col-lg-push-4{left:33.33333333333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.666666666666664%}.col-lg-push-1{left:8.333333333333332%}.col-lg-push-0{left:0}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666666666666%}.col-lg-offset-10{margin-left:83.33333333333334%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666666666666%}.col-lg-offset-7{margin-left:58.333333333333336%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666666666667%}.col-lg-offset-4{margin-left:33.33333333333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.666666666666664%}.col-lg-offset-1{margin-left:8.333333333333332%}.col-lg-offset-0{margin-left:0}}.factory-bootstrap-445 table{max-width:100%;background-color:transparent}.factory-bootstrap-445 th{text-align:left}.factory-bootstrap-445 .table{width:100%;margin-bottom:20px}.factory-bootstrap-445 .table>tbody>tr>td,.factory-bootstrap-445 .table>tbody>tr>th,.factory-bootstrap-445 .table>tfoot>tr>td,.factory-bootstrap-445 .table>tfoot>tr>th,.factory-bootstrap-445 .table>thead>tr>td,.factory-bootstrap-445 .table>thead>tr>th{padding:8px;line-height:1.428571429;vertical-align:top;border-top:1px solid #ddd}.factory-bootstrap-445 .table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.factory-bootstrap-445 .table>caption+thead>tr:first-child>td,.factory-bootstrap-445 .table>caption+thead>tr:first-child>th,.factory-bootstrap-445 .table>colgroup+thead>tr:first-child>td,.factory-bootstrap-445 .table>colgroup+thead>tr:first-child>th,.factory-bootstrap-445 .table>thead:first-child>tr:first-child>td,.factory-bootstrap-445 .table>thead:first-child>tr:first-child>th{border-top:0}.factory-bootstrap-445 .table>tbody+tbody{border-top:2px solid #ddd}.factory-bootstrap-445 .table .table{background-color:#fff}.factory-bootstrap-445 .table-condensed>tbody>tr>td,.factory-bootstrap-445 .table-condensed>tbody>tr>th,.factory-bootstrap-445 .table-condensed>tfoot>tr>td,.factory-bootstrap-445 .table-condensed>tfoot>tr>th,.factory-bootstrap-445 .table-condensed>thead>tr>td,.factory-bootstrap-445 .table-condensed>thead>tr>th{padding:5px}.factory-bootstrap-445 .table-bordered,.factory-bootstrap-445 .table-bordered>tbody>tr>td,.factory-bootstrap-445 .table-bordered>tbody>tr>th,.factory-bootstrap-445 .table-bordered>tfoot>tr>td,.factory-bootstrap-445 .table-bordered>tfoot>tr>th,.factory-bootstrap-445 .table-bordered>thead>tr>td,.factory-bootstrap-445 .table-bordered>thead>tr>th{border:1px solid #ddd}.factory-bootstrap-445 .table-bordered>thead>tr>td,.factory-bootstrap-445 .table-bordered>thead>tr>th{border-bottom-width:2px}.factory-bootstrap-445 .table-striped>tbody>tr:nth-child(odd)>td,.factory-bootstrap-445 .table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.factory-bootstrap-445 .table-hover>tbody>tr:hover>td,.factory-bootstrap-445 .table-hover>tbody>tr:hover>th{background-color:#f5f5f5}.factory-bootstrap-445 table col[class*=col-]{position:static;display:table-column;float:none}.factory-bootstrap-445 table td[class*=col-],.factory-bootstrap-445 table th[class*=col-]{display:table-cell;float:none}.factory-bootstrap-445 .table>tbody>.active>td,.factory-bootstrap-445 .table>tbody>.active>th,.factory-bootstrap-445 .table>tbody>tr>.active,.factory-bootstrap-445 .table>tfoot>.active>td,.factory-bootstrap-445 .table>tfoot>.active>th,.factory-bootstrap-445 .table>tfoot>tr>.active,.factory-bootstrap-445 .table>thead>.active>td,.factory-bootstrap-445 .table>thead>.active>th,.factory-bootstrap-445 .table>thead>tr>.active{background-color:#f5f5f5}.factory-bootstrap-445 .table-hover>tbody>.active:hover>td,.factory-bootstrap-445 .table-hover>tbody>.active:hover>th,.factory-bootstrap-445 .table-hover>tbody>tr>.active:hover{background-color:#e8e8e8}.factory-bootstrap-445 .table>tbody>.success>td,.factory-bootstrap-445 .table>tbody>.success>th,.factory-bootstrap-445 .table>tbody>tr>.success,.factory-bootstrap-445 .table>tfoot>.success>td,.factory-bootstrap-445 .table>tfoot>.success>th,.factory-bootstrap-445 .table>tfoot>tr>.success,.factory-bootstrap-445 .table>thead>.success>td,.factory-bootstrap-445 .table>thead>.success>th,.factory-bootstrap-445 .table>thead>tr>.success{background-color:#dff0d8}.factory-bootstrap-445 .table-hover>tbody>.success:hover>td,.factory-bootstrap-445 .table-hover>tbody>.success:hover>th,.factory-bootstrap-445 .table-hover>tbody>tr>.success:hover{background-color:#d0e9c6}.factory-bootstrap-445 .table>tbody>.danger>td,.factory-bootstrap-445 .table>tbody>.danger>th,.factory-bootstrap-445 .table>tbody>tr>.danger,.factory-bootstrap-445 .table>tfoot>.danger>td,.factory-bootstrap-445 .table>tfoot>.danger>th,.factory-bootstrap-445 .table>tfoot>tr>.danger,.factory-bootstrap-445 .table>thead>.danger>td,.factory-bootstrap-445 .table>thead>.danger>th,.factory-bootstrap-445 .table>thead>tr>.danger{background-color:#f2dede}.factory-bootstrap-445 .table-hover>tbody>.danger:hover>td,.factory-bootstrap-445 .table-hover>tbody>.danger:hover>th,.factory-bootstrap-445 .table-hover>tbody>tr>.danger:hover{background-color:#ebcccc}.factory-bootstrap-445 .table>tbody>.warning>td,.factory-bootstrap-445 .table>tbody>.warning>th,.factory-bootstrap-445 .table>tbody>tr>.warning,.factory-bootstrap-445 .table>tfoot>.warning>td,.factory-bootstrap-445 .table>tfoot>.warning>th,.factory-bootstrap-445 .table>tfoot>tr>.warning,.factory-bootstrap-445 .table>thead>.warning>td,.factory-bootstrap-445 .table>thead>.warning>th,.factory-bootstrap-445 .table>thead>tr>.warning{background-color:#fcf8e3}.factory-bootstrap-445 .table-hover>tbody>.warning:hover>td,.factory-bootstrap-445 .table-hover>tbody>.warning:hover>th,.factory-bootstrap-445 .table-hover>tbody>tr>.warning:hover{background-color:#faf2cc}@media (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-x:scroll;overflow-y:hidden;border:1px solid #ddd;-ms-overflow-style:-ms-autohiding-scrollbar;-webkit-overflow-scrolling:touch}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}.factory-bootstrap-445 fieldset{padding:0;margin:0;border:0}.factory-bootstrap-445 legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5;-moz-box-sizing:content-box;box-sizing:content-box}.factory-bootstrap-445 label{display:inline-block;margin-bottom:5px;font-weight:700}.factory-bootstrap-445 input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.factory-bootstrap-445 input[type=checkbox],.factory-bootstrap-445 input[type=radio]{margin:4px 0 0;margin-top:1px \9;line-height:normal}.factory-bootstrap-445 input[type=file]{display:block}.factory-bootstrap-445 select[multiple],.factory-bootstrap-445 select[size]{height:auto}.factory-bootstrap-445 select optgroup{font-family:inherit;font-size:inherit;font-style:inherit}.factory-bootstrap-445 input[type=checkbox]:focus,.factory-bootstrap-445 input[type=file]:focus,.factory-bootstrap-445 input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.factory-bootstrap-445 input[type=number]::-webkit-inner-spin-button,.factory-bootstrap-445 input[type=number]::-webkit-outer-spin-button{height:auto}.factory-bootstrap-445 output{display:block;padding-top:7px;font-size:14px;line-height:1.428571429;color:#555;vertical-align:middle}.factory-bootstrap-445 .form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.428571429;color:#555;vertical-align:middle;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.factory-bootstrap-445 .form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.factory-bootstrap-445 .form-control:-moz-placeholder{color:#999}.factory-bootstrap-445 .form-control::-moz-placeholder{color:#999;opacity:1}.factory-bootstrap-445 .form-control:-ms-input-placeholder{color:#999}.factory-bootstrap-445 .form-control::-webkit-input-placeholder{color:#999}.factory-bootstrap-445 .form-control[disabled],.factory-bootstrap-445 .form-control[readonly],.factory-bootstrap-445 fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee}.factory-bootstrap-445 textarea.form-control{height:auto}.factory-bootstrap-445 .form-group{margin-bottom:15px}.factory-bootstrap-445 .checkbox,.factory-bootstrap-445 .radio{display:block;min-height:20px;padding-left:20px;margin-top:10px;margin-bottom:10px;vertical-align:middle}.factory-bootstrap-445 .checkbox label,.factory-bootstrap-445 .radio label{display:inline;margin-bottom:0;font-weight:400;cursor:pointer}.factory-bootstrap-445 .checkbox input[type=checkbox],.factory-bootstrap-445 .checkbox-inline input[type=checkbox],.factory-bootstrap-445 .radio input[type=radio],.factory-bootstrap-445 .radio-inline input[type=radio]{float:left;margin-left:-20px}.factory-bootstrap-445 .checkbox+.checkbox,.factory-bootstrap-445 .radio+.radio{margin-top:-5px}.factory-bootstrap-445 .checkbox-inline,.factory-bootstrap-445 .radio-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.factory-bootstrap-445 .checkbox-inline+.checkbox-inline,.factory-bootstrap-445 .radio-inline+.radio-inline{margin-top:0;margin-left:10px}.factory-bootstrap-445 .checkbox-inline[disabled],.factory-bootstrap-445 .checkbox[disabled],.factory-bootstrap-445 .radio-inline[disabled],.factory-bootstrap-445 .radio[disabled],.factory-bootstrap-445 fieldset[disabled] .checkbox,.factory-bootstrap-445 fieldset[disabled] .checkbox-inline,.factory-bootstrap-445 fieldset[disabled] .radio,.factory-bootstrap-445 fieldset[disabled] .radio-inline,.factory-bootstrap-445 fieldset[disabled] input[type=checkbox],.factory-bootstrap-445 fieldset[disabled] input[type=radio],.factory-bootstrap-445 input[type=checkbox][disabled],.factory-bootstrap-445 input[type=radio][disabled]{cursor:not-allowed}.factory-bootstrap-445 .input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.factory-bootstrap-445 select.input-sm{height:30px;line-height:30px}.factory-bootstrap-445 textarea.input-sm{height:auto}.factory-bootstrap-445 .input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.factory-bootstrap-445 select.input-lg{height:46px;line-height:46px}.factory-bootstrap-445 textarea.input-lg{height:auto}.factory-bootstrap-445 .has-warning .checkbox,.factory-bootstrap-445 .has-warning .checkbox-inline,.factory-bootstrap-445 .has-warning .control-label,.factory-bootstrap-445 .has-warning .help-block,.factory-bootstrap-445 .has-warning .radio,.factory-bootstrap-445 .has-warning .radio-inline{color:#8a6d3b}.factory-bootstrap-445 .has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.factory-bootstrap-445 .has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.factory-bootstrap-445 .has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.factory-bootstrap-445 .has-error .checkbox,.factory-bootstrap-445 .has-error .checkbox-inline,.factory-bootstrap-445 .has-error .control-label,.factory-bootstrap-445 .has-error .help-block,.factory-bootstrap-445 .has-error .radio,.factory-bootstrap-445 .has-error .radio-inline{color:#a94442}.factory-bootstrap-445 .controls{display:block}.factory-bootstrap-445 .has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.factory-bootstrap-445 .has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.factory-bootstrap-445 .has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.factory-bootstrap-445 .has-success .checkbox,.factory-bootstrap-445 .has-success .checkbox-inline,.factory-bootstrap-445 .has-success .control-label,.factory-bootstrap-445 .has-success .help-block,.factory-bootstrap-445 .has-success .radio,.factory-bootstrap-445 .has-success .radio-inline{color:#3c763d}.factory-bootstrap-445 .has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.factory-bootstrap-445 .has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.factory-bootstrap-445 .has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.factory-bootstrap-445 .form-control-static{margin-bottom:0}.factory-bootstrap-445 .help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373;font-weight:400}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block}.form-inline select.form-control{width:auto}.form-inline .checkbox,.form-inline .radio{display:inline-block;padding-left:0;margin-top:0;margin-bottom:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{float:none;margin-left:0}}.factory-bootstrap-445 .form-horizontal .checkbox,.factory-bootstrap-445 .form-horizontal .checkbox-inline,.factory-bootstrap-445 .form-horizontal .control-label,.factory-bootstrap-445 .form-horizontal .radio,.factory-bootstrap-445 .form-horizontal .radio-inline{position:relative;padding-top:7px;margin-top:0;margin-bottom:0}.factory-bootstrap-445 .form-horizontal .control-label{max-width:200px}.factory-bootstrap-445 .form-horizontal .checkbox,.factory-bootstrap-445 .form-horizontal .radio{min-height:27px}.factory-bootstrap-445 .form-horizontal .form-group{margin-right:-15px;margin-left:-15px}.factory-bootstrap-445 .form-horizontal .form-group:after,.factory-bootstrap-445 .form-horizontal .form-group:before{display:table;content:" "}.factory-bootstrap-445 .form-horizontal .form-group:after{clear:both}.factory-bootstrap-445 .form-horizontal .form-control-static{padding-top:7px}@media (min-width:768px){.form-horizontal .control-label{text-align:right}}.factory-bootstrap-445 .btn{display:inline-block;padding:5px 12px;margin-bottom:0;font-size:13px;font-weight:400;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;border-radius:3px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.factory-bootstrap-445 .btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.factory-bootstrap-445 .btn{text-decoration:none}.factory-bootstrap-445 .btn:focus,.factory-bootstrap-445 .btn:hover{color:#333;text-decoration:none}.factory-bootstrap-445 .btn.disabled,.factory-bootstrap-445 .btn[disabled],.factory-bootstrap-445 fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.factory-bootstrap-445 .btn-default.active,.factory-bootstrap-445 .btn-default:active,.factory-bootstrap-445 .btn-default:focus,.factory-bootstrap-445 .btn-default:hover,.factory-bootstrap-445 .open .dropdown-toggle.btn-default{background:#fafafa;border-color:#999;color:#222}.factory-bootstrap-445 .btn-default.active,.factory-bootstrap-445 .btn-default:active,.factory-bootstrap-445 .open .dropdown-toggle.btn-default{background-image:none}.factory-bootstrap-445 .btn-default.disabled,.factory-bootstrap-445 .btn-default.disabled.active,.factory-bootstrap-445 .btn-default.disabled:active,.factory-bootstrap-445 .btn-default.disabled:focus,.factory-bootstrap-445 .btn-default.disabled:hover,.factory-bootstrap-445 .btn-default[disabled],.factory-bootstrap-445 .btn-default[disabled].active,.factory-bootstrap-445 .btn-default[disabled]:active,.factory-bootstrap-445 .btn-default[disabled]:focus,.factory-bootstrap-445 .btn-default[disabled]:hover,.factory-bootstrap-445 fieldset[disabled] .btn-default,.factory-bootstrap-445 fieldset[disabled] .btn-default.active,.factory-bootstrap-445 fieldset[disabled] .btn-default:active,.factory-bootstrap-445 fieldset[disabled] .btn-default:focus,.factory-bootstrap-445 fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.factory-bootstrap-445 .btn-default .badge{color:#fff;background-color:#fff}.factory-bootstrap-445 .btn-primary.active,.factory-bootstrap-445 .btn-primary:active,.factory-bootstrap-445 .btn-primary:focus,.factory-bootstrap-445 .btn-primary:hover,.factory-bootstrap-445 .open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.factory-bootstrap-445 .btn-primary.active,.factory-bootstrap-445 .btn-primary:active,.factory-bootstrap-445 .open .dropdown-toggle.btn-primary{background-image:none}.factory-bootstrap-445 .btn-primary.disabled,.factory-bootstrap-445 .btn-primary.disabled.active,.factory-bootstrap-445 .btn-primary.disabled:active,.factory-bootstrap-445 .btn-primary.disabled:focus,.factory-bootstrap-445 .btn-primary.disabled:hover,.factory-bootstrap-445 .btn-primary[disabled],.factory-bootstrap-445 .btn-primary[disabled].active,.factory-bootstrap-445 .btn-primary[disabled]:active,.factory-bootstrap-445 .btn-primary[disabled]:focus,.factory-bootstrap-445 .btn-primary[disabled]:hover,.factory-bootstrap-445 fieldset[disabled] .btn-primary,.factory-bootstrap-445 fieldset[disabled] .btn-primary.active,.factory-bootstrap-445 fieldset[disabled] .btn-primary:active,.factory-bootstrap-445 fieldset[disabled] .btn-primary:focus,.factory-bootstrap-445 fieldset[disabled] .btn-primary:hover{background-color:#428bca;border-color:#357ebd}.factory-bootstrap-445 .btn-primary .badge{color:#428bca;background-color:#fff}.factory-bootstrap-445 .btn-warning{color:#fff;background-color:#f0ad4e}.factory-bootstrap-445 .btn-warning.active,.factory-bootstrap-445 .btn-warning:active,.factory-bootstrap-445 .btn-warning:focus,.factory-bootstrap-445 .btn-warning:hover,.factory-bootstrap-445 .open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.factory-bootstrap-445 .btn-warning.active,.factory-bootstrap-445 .btn-warning:active,.factory-bootstrap-445 .open .dropdown-toggle.btn-warning{background-image:none}.factory-bootstrap-445 .btn-warning.disabled,.factory-bootstrap-445 .btn-warning.disabled.active,.factory-bootstrap-445 .btn-warning.disabled:active,.factory-bootstrap-445 .btn-warning.disabled:focus,.factory-bootstrap-445 .btn-warning.disabled:hover,.factory-bootstrap-445 .btn-warning[disabled],.factory-bootstrap-445 .btn-warning[disabled].active,.factory-bootstrap-445 .btn-warning[disabled]:active,.factory-bootstrap-445 .btn-warning[disabled]:focus,.factory-bootstrap-445 .btn-warning[disabled]:hover,.factory-bootstrap-445 fieldset[disabled] .btn-warning,.factory-bootstrap-445 fieldset[disabled] .btn-warning.active,.factory-bootstrap-445 fieldset[disabled] .btn-warning:active,.factory-bootstrap-445 fieldset[disabled] .btn-warning:focus,.factory-bootstrap-445 fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.factory-bootstrap-445 .btn-warning .badge{color:#f0ad4e;background-color:#fff}.factory-bootstrap-445 .btn-success{color:#fff;background-color:#5cb85c}.factory-bootstrap-445 .btn-success.active,.factory-bootstrap-445 .btn-success:active,.factory-bootstrap-445 .btn-success:focus,.factory-bootstrap-445 .btn-success:hover,.factory-bootstrap-445 .open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.factory-bootstrap-445 .btn-success.active,.factory-bootstrap-445 .btn-success:active,.factory-bootstrap-445 .open .dropdown-toggle.btn-success{background-image:none}.factory-bootstrap-445 .btn-success.disabled,.factory-bootstrap-445 .btn-success.disabled.active,.factory-bootstrap-445 .btn-success.disabled:active,.factory-bootstrap-445 .btn-success.disabled:focus,.factory-bootstrap-445 .btn-success.disabled:hover,.factory-bootstrap-445 .btn-success[disabled],.factory-bootstrap-445 .btn-success[disabled].active,.factory-bootstrap-445 .btn-success[disabled]:active,.factory-bootstrap-445 .btn-success[disabled]:focus,.factory-bootstrap-445 .btn-success[disabled]:hover,.factory-bootstrap-445 fieldset[disabled] .btn-success,.factory-bootstrap-445 fieldset[disabled] .btn-success.active,.factory-bootstrap-445 fieldset[disabled] .btn-success:active,.factory-bootstrap-445 fieldset[disabled] .btn-success:focus,.factory-bootstrap-445 fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.factory-bootstrap-445 .btn-success .badge{color:#5cb85c;background-color:#fff}.factory-bootstrap-445 .btn-info{color:#fff;background-color:#5bc0de}.factory-bootstrap-445 .btn-info.active,.factory-bootstrap-445 .btn-info:active,.factory-bootstrap-445 .btn-info:focus,.factory-bootstrap-445 .btn-info:hover,.factory-bootstrap-445 .open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.factory-bootstrap-445 .btn-info.active,.factory-bootstrap-445 .btn-info:active,.factory-bootstrap-445 .open .dropdown-toggle.btn-info{background-image:none}.factory-bootstrap-445 .btn-info.disabled,.factory-bootstrap-445 .btn-info.disabled.active,.factory-bootstrap-445 .btn-info.disabled:active,.factory-bootstrap-445 .btn-info.disabled:focus,.factory-bootstrap-445 .btn-info.disabled:hover,.factory-bootstrap-445 .btn-info[disabled],.factory-bootstrap-445 .btn-info[disabled].active,.factory-bootstrap-445 .btn-info[disabled]:active,.factory-bootstrap-445 .btn-info[disabled]:focus,.factory-bootstrap-445 .btn-info[disabled]:hover,.factory-bootstrap-445 fieldset[disabled] .btn-info,.factory-bootstrap-445 fieldset[disabled] .btn-info.active,.factory-bootstrap-445 fieldset[disabled] .btn-info:active,.factory-bootstrap-445 fieldset[disabled] .btn-info:focus,.factory-bootstrap-445 fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.factory-bootstrap-445 .btn-info .badge{color:#5bc0de;background-color:#fff}.factory-bootstrap-445 .btn-link{font-weight:400;color:#428bca;cursor:pointer;border-radius:0}.factory-bootstrap-445 .btn-link,.factory-bootstrap-445 .btn-link:active,.factory-bootstrap-445 .btn-link[disabled],.factory-bootstrap-445 fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.factory-bootstrap-445 .btn-link,.factory-bootstrap-445 .btn-link:active,.factory-bootstrap-445 .btn-link:focus,.factory-bootstrap-445 .btn-link:hover{border-color:transparent}.factory-bootstrap-445 .btn-link:focus,.factory-bootstrap-445 .btn-link:hover{color:#2a6496;text-decoration:underline;background-color:transparent}.factory-bootstrap-445 .btn-link[disabled]:focus,.factory-bootstrap-445 .btn-link[disabled]:hover,.factory-bootstrap-445 fieldset[disabled] .btn-link:focus,.factory-bootstrap-445 fieldset[disabled] .btn-link:hover{color:#999;text-decoration:none}.factory-bootstrap-445 .btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.factory-bootstrap-445 .btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.factory-bootstrap-445 .btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.factory-bootstrap-445 .btn-block{display:block;width:100%;padding-right:0;padding-left:0}.factory-bootstrap-445 .btn-block+.btn-block{margin-top:5px}.factory-bootstrap-445 input[type=button].btn-block,.factory-bootstrap-445 input[type=reset].btn-block,.factory-bootstrap-445 input[type=submit].btn-block{width:100%}.factory-bootstrap-445 .fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.factory-bootstrap-445 .fade.in{opacity:1}.factory-bootstrap-445 .collapse{display:none}.factory-bootstrap-445 .collapse.in{display:block}.factory-bootstrap-445 .collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular) format('svg')}.factory-bootstrap-445 .glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';-webkit-font-smoothing:antialiased;font-style:normal;font-weight:400;line-height:1;-moz-osx-font-smoothing:grayscale}.factory-bootstrap-445 .glyphicon:empty{width:1em}.factory-bootstrap-445 .glyphicon-asterisk:before{content:"\2a"}.factory-bootstrap-445 .glyphicon-plus:before{content:"\2b"}.factory-bootstrap-445 .glyphicon-euro:before{content:"\20ac"}.factory-bootstrap-445 .glyphicon-minus:before{content:"\2212"}.factory-bootstrap-445 .glyphicon-cloud:before{content:"\2601"}.factory-bootstrap-445 .glyphicon-envelope:before{content:"\2709"}.factory-bootstrap-445 .glyphicon-pencil:before{content:"\270f"}.factory-bootstrap-445 .glyphicon-glass:before{content:"\e001"}.factory-bootstrap-445 .glyphicon-music:before{content:"\e002"}.factory-bootstrap-445 .glyphicon-search:before{content:"\e003"}.factory-bootstrap-445 .glyphicon-heart:before{content:"\e005"}.factory-bootstrap-445 .glyphicon-star:before{content:"\e006"}.factory-bootstrap-445 .glyphicon-star-empty:before{content:"\e007"}.factory-bootstrap-445 .glyphicon-user:before{content:"\e008"}.factory-bootstrap-445 .glyphicon-film:before{content:"\e009"}.factory-bootstrap-445 .glyphicon-th-large:before{content:"\e010"}.factory-bootstrap-445 .glyphicon-th:before{content:"\e011"}.factory-bootstrap-445 .glyphicon-th-list:before{content:"\e012"}.factory-bootstrap-445 .glyphicon-ok:before{content:"\e013"}.factory-bootstrap-445 .glyphicon-remove:before{content:"\e014"}.factory-bootstrap-445 .glyphicon-zoom-in:before{content:"\e015"}.factory-bootstrap-445 .glyphicon-zoom-out:before{content:"\e016"}.factory-bootstrap-445 .glyphicon-off:before{content:"\e017"}.factory-bootstrap-445 .glyphicon-signal:before{content:"\e018"}.factory-bootstrap-445 .glyphicon-cog:before{content:"\e019"}.factory-bootstrap-445 .glyphicon-trash:before{content:"\e020"}.factory-bootstrap-445 .glyphicon-home:before{content:"\e021"}.factory-bootstrap-445 .glyphicon-file:before{content:"\e022"}.factory-bootstrap-445 .glyphicon-time:before{content:"\e023"}.factory-bootstrap-445 .glyphicon-road:before{content:"\e024"}.factory-bootstrap-445 .glyphicon-download-alt:before{content:"\e025"}.factory-bootstrap-445 .glyphicon-download:before{content:"\e026"}.factory-bootstrap-445 .glyphicon-upload:before{content:"\e027"}.factory-bootstrap-445 .glyphicon-inbox:before{content:"\e028"}.factory-bootstrap-445 .glyphicon-play-circle:before{content:"\e029"}.factory-bootstrap-445 .glyphicon-repeat:before{content:"\e030"}.factory-bootstrap-445 .glyphicon-refresh:before{content:"\e031"}.factory-bootstrap-445 .glyphicon-list-alt:before{content:"\e032"}.factory-bootstrap-445 .glyphicon-lock:before{content:"\e033"}.factory-bootstrap-445 .glyphicon-flag:before{content:"\e034"}.factory-bootstrap-445 .glyphicon-headphones:before{content:"\e035"}.factory-bootstrap-445 .glyphicon-volume-off:before{content:"\e036"}.factory-bootstrap-445 .glyphicon-volume-down:before{content:"\e037"}.factory-bootstrap-445 .glyphicon-volume-up:before{content:"\e038"}.factory-bootstrap-445 .glyphicon-qrcode:before{content:"\e039"}.factory-bootstrap-445 .glyphicon-barcode:before{content:"\e040"}.factory-bootstrap-445 .glyphicon-tag:before{content:"\e041"}.factory-bootstrap-445 .glyphicon-tags:before{content:"\e042"}.factory-bootstrap-445 .glyphicon-book:before{content:"\e043"}.factory-bootstrap-445 .glyphicon-bookmark:before{content:"\e044"}.factory-bootstrap-445 .glyphicon-print:before{content:"\e045"}.factory-bootstrap-445 .glyphicon-camera:before{content:"\e046"}.factory-bootstrap-445 .glyphicon-font:before{content:"\e047"}.factory-bootstrap-445 .glyphicon-bold:before{content:"\e048"}.factory-bootstrap-445 .glyphicon-italic:before{content:"\e049"}.factory-bootstrap-445 .glyphicon-text-height:before{content:"\e050"}.factory-bootstrap-445 .glyphicon-text-width:before{content:"\e051"}.factory-bootstrap-445 .glyphicon-align-left:before{content:"\e052"}.factory-bootstrap-445 .glyphicon-align-center:before{content:"\e053"}.factory-bootstrap-445 .glyphicon-align-right:before{content:"\e054"}.factory-bootstrap-445 .glyphicon-align-justify:before{content:"\e055"}.factory-bootstrap-445 .glyphicon-list:before{content:"\e056"}.factory-bootstrap-445 .glyphicon-indent-left:before{content:"\e057"}.factory-bootstrap-445 .glyphicon-indent-right:before{content:"\e058"}.factory-bootstrap-445 .glyphicon-facetime-video:before{content:"\e059"}.factory-bootstrap-445 .glyphicon-picture:before{content:"\e060"}.factory-bootstrap-445 .glyphicon-map-marker:before{content:"\e062"}.factory-bootstrap-445 .glyphicon-adjust:before{content:"\e063"}.factory-bootstrap-445 .glyphicon-tint:before{content:"\e064"}.factory-bootstrap-445 .glyphicon-edit:before{content:"\e065"}.factory-bootstrap-445 .glyphicon-share:before{content:"\e066"}.factory-bootstrap-445 .glyphicon-check:before{content:"\e067"}.factory-bootstrap-445 .glyphicon-move:before{content:"\e068"}.factory-bootstrap-445 .glyphicon-step-backward:before{content:"\e069"}.factory-bootstrap-445 .glyphicon-fast-backward:before{content:"\e070"}.factory-bootstrap-445 .glyphicon-backward:before{content:"\e071"}.factory-bootstrap-445 .glyphicon-play:before{content:"\e072"}.factory-bootstrap-445 .glyphicon-pause:before{content:"\e073"}.factory-bootstrap-445 .glyphicon-stop:before{content:"\e074"}.factory-bootstrap-445 .glyphicon-forward:before{content:"\e075"}.factory-bootstrap-445 .glyphicon-fast-forward:before{content:"\e076"}.factory-bootstrap-445 .glyphicon-step-forward:before{content:"\e077"}.factory-bootstrap-445 .glyphicon-eject:before{content:"\e078"}.factory-bootstrap-445 .glyphicon-chevron-left:before{content:"\e079"}.factory-bootstrap-445 .glyphicon-chevron-right:before{content:"\e080"}.factory-bootstrap-445 .glyphicon-plus-sign:before{content:"\e081"}.factory-bootstrap-445 .glyphicon-minus-sign:before{content:"\e082"}.factory-bootstrap-445 .glyphicon-remove-sign:before{content:"\e083"}.factory-bootstrap-445 .glyphicon-ok-sign:before{content:"\e084"}.factory-bootstrap-445 .glyphicon-question-sign:before{content:"\e085"}.factory-bootstrap-445 .glyphicon-info-sign:before{content:"\e086"}.factory-bootstrap-445 .glyphicon-screenshot:before{content:"\e087"}.factory-bootstrap-445 .glyphicon-remove-circle:before{content:"\e088"}.factory-bootstrap-445 .glyphicon-ok-circle:before{content:"\e089"}.factory-bootstrap-445 .glyphicon-ban-circle:before{content:"\e090"}.factory-bootstrap-445 .glyphicon-arrow-left:before{content:"\e091"}.factory-bootstrap-445 .glyphicon-arrow-right:before{content:"\e092"}.factory-bootstrap-445 .glyphicon-arrow-up:before{content:"\e093"}.factory-bootstrap-445 .glyphicon-arrow-down:before{content:"\e094"}.factory-bootstrap-445 .glyphicon-share-alt:before{content:"\e095"}.factory-bootstrap-445 .glyphicon-resize-full:before{content:"\e096"}.factory-bootstrap-445 .glyphicon-resize-small:before{content:"\e097"}.factory-bootstrap-445 .glyphicon-exclamation-sign:before{content:"\e101"}.factory-bootstrap-445 .glyphicon-gift:before{content:"\e102"}.factory-bootstrap-445 .glyphicon-leaf:before{content:"\e103"}.factory-bootstrap-445 .glyphicon-fire:before{content:"\e104"}.factory-bootstrap-445 .glyphicon-eye-open:before{content:"\e105"}.factory-bootstrap-445 .glyphicon-eye-close:before{content:"\e106"}.factory-bootstrap-445 .glyphicon-warning-sign:before{content:"\e107"}.factory-bootstrap-445 .glyphicon-plane:before{content:"\e108"}.factory-bootstrap-445 .glyphicon-calendar:before{content:"\e109"}.factory-bootstrap-445 .glyphicon-random:before{content:"\e110"}.factory-bootstrap-445 .glyphicon-comment:before{content:"\e111"}.factory-bootstrap-445 .glyphicon-magnet:before{content:"\e112"}.factory-bootstrap-445 .glyphicon-chevron-up:before{content:"\e113"}.factory-bootstrap-445 .glyphicon-chevron-down:before{content:"\e114"}.factory-bootstrap-445 .glyphicon-retweet:before{content:"\e115"}.factory-bootstrap-445 .glyphicon-shopping-cart:before{content:"\e116"}.factory-bootstrap-445 .glyphicon-folder-close:before{content:"\e117"}.factory-bootstrap-445 .glyphicon-folder-open:before{content:"\e118"}.factory-bootstrap-445 .glyphicon-resize-vertical:before{content:"\e119"}.factory-bootstrap-445 .glyphicon-resize-horizontal:before{content:"\e120"}.factory-bootstrap-445 .glyphicon-hdd:before{content:"\e121"}.factory-bootstrap-445 .glyphicon-bullhorn:before{content:"\e122"}.factory-bootstrap-445 .glyphicon-bell:before{content:"\e123"}.factory-bootstrap-445 .glyphicon-certificate:before{content:"\e124"}.factory-bootstrap-445 .glyphicon-thumbs-up:before{content:"\e125"}.factory-bootstrap-445 .glyphicon-thumbs-down:before{content:"\e126"}.factory-bootstrap-445 .glyphicon-hand-right:before{content:"\e127"}.factory-bootstrap-445 .glyphicon-hand-left:before{content:"\e128"}.factory-bootstrap-445 .glyphicon-hand-up:before{content:"\e129"}.factory-bootstrap-445 .glyphicon-hand-down:before{content:"\e130"}.factory-bootstrap-445 .glyphicon-circle-arrow-right:before{content:"\e131"}.factory-bootstrap-445 .glyphicon-circle-arrow-left:before{content:"\e132"}.factory-bootstrap-445 .glyphicon-circle-arrow-up:before{content:"\e133"}.factory-bootstrap-445 .glyphicon-circle-arrow-down:before{content:"\e134"}.factory-bootstrap-445 .glyphicon-globe:before{content:"\e135"}.factory-bootstrap-445 .glyphicon-wrench:before{content:"\e136"}.factory-bootstrap-445 .glyphicon-tasks:before{content:"\e137"}.factory-bootstrap-445 .glyphicon-filter:before{content:"\e138"}.factory-bootstrap-445 .glyphicon-briefcase:before{content:"\e139"}.factory-bootstrap-445 .glyphicon-fullscreen:before{content:"\e140"}.factory-bootstrap-445 .glyphicon-dashboard:before{content:"\e141"}.factory-bootstrap-445 .glyphicon-paperclip:before{content:"\e142"}.factory-bootstrap-445 .glyphicon-heart-empty:before{content:"\e143"}.factory-bootstrap-445 .glyphicon-link:before{content:"\e144"}.factory-bootstrap-445 .glyphicon-phone:before{content:"\e145"}.factory-bootstrap-445 .glyphicon-pushpin:before{content:"\e146"}.factory-bootstrap-445 .glyphicon-usd:before{content:"\e148"}.factory-bootstrap-445 .glyphicon-gbp:before{content:"\e149"}.factory-bootstrap-445 .glyphicon-sort:before{content:"\e150"}.factory-bootstrap-445 .glyphicon-sort-by-alphabet:before{content:"\e151"}.factory-bootstrap-445 .glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.factory-bootstrap-445 .glyphicon-sort-by-order:before{content:"\e153"}.factory-bootstrap-445 .glyphicon-sort-by-order-alt:before{content:"\e154"}.factory-bootstrap-445 .glyphicon-sort-by-attributes:before{content:"\e155"}.factory-bootstrap-445 .glyphicon-sort-by-attributes-alt:before{content:"\e156"}.factory-bootstrap-445 .glyphicon-unchecked:before{content:"\e157"}.factory-bootstrap-445 .glyphicon-expand:before{content:"\e158"}.factory-bootstrap-445 .glyphicon-collapse-down:before{content:"\e159"}.factory-bootstrap-445 .glyphicon-collapse-up:before{content:"\e160"}.factory-bootstrap-445 .glyphicon-log-in:before{content:"\e161"}.factory-bootstrap-445 .glyphicon-flash:before{content:"\e162"}.factory-bootstrap-445 .glyphicon-log-out:before{content:"\e163"}.factory-bootstrap-445 .glyphicon-new-window:before{content:"\e164"}.factory-bootstrap-445 .glyphicon-record:before{content:"\e165"}.factory-bootstrap-445 .glyphicon-save:before{content:"\e166"}.factory-bootstrap-445 .glyphicon-open:before{content:"\e167"}.factory-bootstrap-445 .glyphicon-saved:before{content:"\e168"}.factory-bootstrap-445 .glyphicon-import:before{content:"\e169"}.factory-bootstrap-445 .glyphicon-export:before{content:"\e170"}.factory-bootstrap-445 .glyphicon-send:before{content:"\e171"}.factory-bootstrap-445 .glyphicon-floppy-disk:before{content:"\e172"}.factory-bootstrap-445 .glyphicon-floppy-saved:before{content:"\e173"}.factory-bootstrap-445 .glyphicon-floppy-remove:before{content:"\e174"}.factory-bootstrap-445 .glyphicon-floppy-save:before{content:"\e175"}.factory-bootstrap-445 .glyphicon-floppy-open:before{content:"\e176"}.factory-bootstrap-445 .glyphicon-credit-card:before{content:"\e177"}.factory-bootstrap-445 .glyphicon-transfer:before{content:"\e178"}.factory-bootstrap-445 .glyphicon-cutlery:before{content:"\e179"}.factory-bootstrap-445 .glyphicon-header:before{content:"\e180"}.factory-bootstrap-445 .glyphicon-compressed:before{content:"\e181"}.factory-bootstrap-445 .glyphicon-earphone:before{content:"\e182"}.factory-bootstrap-445 .glyphicon-phone-alt:before{content:"\e183"}.factory-bootstrap-445 .glyphicon-tower:before{content:"\e184"}.factory-bootstrap-445 .glyphicon-stats:before{content:"\e185"}.factory-bootstrap-445 .glyphicon-sd-video:before{content:"\e186"}.factory-bootstrap-445 .glyphicon-hd-video:before{content:"\e187"}.factory-bootstrap-445 .glyphicon-subtitles:before{content:"\e188"}.factory-bootstrap-445 .glyphicon-sound-stereo:before{content:"\e189"}.factory-bootstrap-445 .glyphicon-sound-dolby:before{content:"\e190"}.factory-bootstrap-445 .glyphicon-sound-5-1:before{content:"\e191"}.factory-bootstrap-445 .glyphicon-sound-6-1:before{content:"\e192"}.factory-bootstrap-445 .glyphicon-sound-7-1:before{content:"\e193"}.factory-bootstrap-445 .glyphicon-copyright-mark:before{content:"\e194"}.factory-bootstrap-445 .glyphicon-registration-mark:before{content:"\e195"}.factory-bootstrap-445 .glyphicon-cloud-download:before{content:"\e197"}.factory-bootstrap-445 .glyphicon-cloud-upload:before{content:"\e198"}.factory-bootstrap-445 .glyphicon-tree-conifer:before{content:"\e199"}.factory-bootstrap-445 .glyphicon-tree-deciduous:before{content:"\e200"}.factory-bootstrap-445 .caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.factory-bootstrap-445 .dropdown{position:relative}.factory-bootstrap-445 .dropdown-toggle:focus{outline:0}.factory-bootstrap-445 .dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.factory-bootstrap-445 .dropdown-menu.pull-right{right:0;left:auto}.factory-bootstrap-445 .dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.factory-bootstrap-445 .dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.428571429;color:#333;white-space:nowrap}.factory-bootstrap-445 .dropdown-menu>li>a:focus,.factory-bootstrap-445 .dropdown-menu>li>a:hover{color:#262626;text-decoration:none}.factory-bootstrap-445 .dropdown-menu>.active>a,.factory-bootstrap-445 .dropdown-menu>.active>a:focus,.factory-bootstrap-445 .dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;outline:0}.factory-bootstrap-445 .dropdown-menu>.disabled>a,.factory-bootstrap-445 .dropdown-menu>.disabled>a:focus,.factory-bootstrap-445 .dropdown-menu>.disabled>a:hover{color:#999}.factory-bootstrap-445 .dropdown-menu>.disabled>a:focus,.factory-bootstrap-445 .dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.factory-bootstrap-445 .open>.dropdown-menu{display:block}.factory-bootstrap-445 .open>a{outline:0}.factory-bootstrap-445 .dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.428571429;color:#999}.factory-bootstrap-445 .dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.factory-bootstrap-445 .pull-right>.dropdown-menu{right:0;left:auto}.factory-bootstrap-445 .dropup .caret,.factory-bootstrap-445 .navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid;content:""}.factory-bootstrap-445 .dropup .dropdown-menu,.factory-bootstrap-445 .navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}}.factory-bootstrap-445 .btn-group,.factory-bootstrap-445 .btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.factory-bootstrap-445 .btn-group-vertical>.btn,.factory-bootstrap-445 .btn-group>.btn{position:relative;float:left}.factory-bootstrap-445 .btn-group-vertical>.btn.active,.factory-bootstrap-445 .btn-group-vertical>.btn:active,.factory-bootstrap-445 .btn-group-vertical>.btn:focus,.factory-bootstrap-445 .btn-group-vertical>.btn:hover,.factory-bootstrap-445 .btn-group>.btn.active,.factory-bootstrap-445 .btn-group>.btn:active,.factory-bootstrap-445 .btn-group>.btn:focus,.factory-bootstrap-445 .btn-group>.btn:hover{z-index:2}.factory-bootstrap-445 .btn-group-vertical>.btn:focus,.factory-bootstrap-445 .btn-group>.btn:focus{outline:0}.factory-bootstrap-445 .btn-group .btn+.btn,.factory-bootstrap-445 .btn-group .btn+.btn-group,.factory-bootstrap-445 .btn-group .btn-group+.btn,.factory-bootstrap-445 .btn-group .btn-group+.btn-group{margin-left:-1px}.factory-bootstrap-445 .btn-toolbar:after,.factory-bootstrap-445 .btn-toolbar:before{display:table;content:" "}.factory-bootstrap-445 .btn-toolbar:after{clear:both}.factory-bootstrap-445 .btn-toolbar .btn-group{float:left}.factory-bootstrap-445 .btn-toolbar>.btn+.btn,.factory-bootstrap-445 .btn-toolbar>.btn+.btn-group,.factory-bootstrap-445 .btn-toolbar>.btn-group+.btn,.factory-bootstrap-445 .btn-toolbar>.btn-group+.btn-group{margin-left:5px}.factory-bootstrap-445 .btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.factory-bootstrap-445 .btn-group>.btn:first-child{margin-left:0}.factory-bootstrap-445 .btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.factory-bootstrap-445 .btn-group>.btn:last-child:not(:first-child),.factory-bootstrap-445 .btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.factory-bootstrap-445 .btn-group>.btn-group{float:left}.factory-bootstrap-445 .btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.factory-bootstrap-445 .btn-group>.btn-group:first-child>.btn:last-child,.factory-bootstrap-445 .btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.factory-bootstrap-445 .btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.factory-bootstrap-445 .btn-group .dropdown-toggle:active,.factory-bootstrap-445 .btn-group.open .dropdown-toggle{outline:0}.factory-bootstrap-445 .btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.factory-bootstrap-445 .btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.factory-bootstrap-445 .btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.factory-bootstrap-445 .btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.factory-bootstrap-445 .btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.factory-bootstrap-445 .btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.factory-bootstrap-445 .btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.factory-bootstrap-445 .btn-group{border:4px solid #f9f9f9;border-radius:4px}.factory-bootstrap-445 .btn-group .btn.active.value{text-shadow:none;color:#fff;background-color:#33aad5;-webkit-box-shadow:inset 0 1px 1px #0074a2;box-shadow:inset 0 1px 3px #0074a2;border-top:1px solid #0074a2;border-bottom:1px solid #0074a2;border-left:1px solid #0074a2}.factory-bootstrap-445 .btn .caret{margin-left:0}.factory-bootstrap-445 .btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.factory-bootstrap-445 .dropup .btn-lg .caret{border-width:0 5px 5px}.factory-bootstrap-445 .btn-group-vertical>.btn,.factory-bootstrap-445 .btn-group-vertical>.btn-group,.factory-bootstrap-445 .btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.factory-bootstrap-445 .btn-group-vertical>.btn-group:after,.factory-bootstrap-445 .btn-group-vertical>.btn-group:before{display:table;content:" "}.factory-bootstrap-445 .btn-group-vertical>.btn-group:after{clear:both}.factory-bootstrap-445 .btn-group-vertical>.btn-group>.btn{float:none}.factory-bootstrap-445 .btn-group-vertical>.btn+.btn,.factory-bootstrap-445 .btn-group-vertical>.btn+.btn-group,.factory-bootstrap-445 .btn-group-vertical>.btn-group+.btn,.factory-bootstrap-445 .btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.factory-bootstrap-445 .btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.factory-bootstrap-445 .btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.factory-bootstrap-445 .btn-group-vertical>.btn:last-child:not(:first-child){border-top-right-radius:0;border-bottom-left-radius:4px;border-top-left-radius:0}.factory-bootstrap-445 .btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.factory-bootstrap-445 .btn-group-vertical>.btn-group:first-child>.btn:last-child,.factory-bootstrap-445 .btn-group-vertical>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.factory-bootstrap-445 .btn-group-vertical>.btn-group:last-child>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.factory-bootstrap-445 .btn-group-justified{display:table;width:100%;border-collapse:separate;table-layout:fixed}.factory-bootstrap-445 .btn-group-justified>.btn,.factory-bootstrap-445 .btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.factory-bootstrap-445 .btn-group-justified>.btn-group .btn{width:100%}[data-toggle=buttons]>.btn>input[type=checkbox],[data-toggle=buttons]>.btn>input[type=radio]{display:none}.factory-bootstrap-445 .input-group{position:relative;display:table;border-collapse:separate}.factory-bootstrap-445 .input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.factory-bootstrap-445 .input-group .form-control{width:100%;margin-bottom:0}.factory-bootstrap-445 .input-group-lg>.form-control,.factory-bootstrap-445 .input-group-lg>.input-group-addon,.factory-bootstrap-445 .input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.factory-bootstrap-445 select.input-group-lg>.form-control,.factory-bootstrap-445 select.input-group-lg>.input-group-addon,.factory-bootstrap-445 select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}.factory-bootstrap-445 textarea.input-group-lg>.form-control,.factory-bootstrap-445 textarea.input-group-lg>.input-group-addon,.factory-bootstrap-445 textarea.input-group-lg>.input-group-btn>.btn{height:auto}.factory-bootstrap-445 .input-group-sm>.form-control,.factory-bootstrap-445 .input-group-sm>.input-group-addon,.factory-bootstrap-445 .input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.factory-bootstrap-445 select.input-group-sm>.form-control,.factory-bootstrap-445 select.input-group-sm>.input-group-addon,.factory-bootstrap-445 select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}.factory-bootstrap-445 textarea.input-group-sm>.form-control,.factory-bootstrap-445 textarea.input-group-sm>.input-group-addon,.factory-bootstrap-445 textarea.input-group-sm>.input-group-btn>.btn{height:auto}.factory-bootstrap-445 .input-group .form-control,.factory-bootstrap-445 .input-group-addon,.factory-bootstrap-445 .input-group-btn{display:table-cell}.factory-bootstrap-445 .input-group .form-control:not(:first-child):not(:last-child),.factory-bootstrap-445 .input-group-addon:not(:first-child):not(:last-child),.factory-bootstrap-445 .input-group-btn:not(:first-child):not(:last-child){border-radius:0}.factory-bootstrap-445 .input-group-addon,.factory-bootstrap-445 .input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.factory-bootstrap-445 .input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.factory-bootstrap-445 .input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.factory-bootstrap-445 .input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.factory-bootstrap-445 .input-group-addon input[type=checkbox],.factory-bootstrap-445 .input-group-addon input[type=radio]{margin-top:0}.factory-bootstrap-445 .input-group .form-control:first-child,.factory-bootstrap-445 .input-group-addon:first-child,.factory-bootstrap-445 .input-group-btn:first-child>.btn,.factory-bootstrap-445 .input-group-btn:first-child>.dropdown-toggle,.factory-bootstrap-445 .input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.factory-bootstrap-445 .input-group-addon:first-child{border-right:0}.factory-bootstrap-445 .input-group .form-control:last-child,.factory-bootstrap-445 .input-group-addon:last-child,.factory-bootstrap-445 .input-group-btn:first-child>.btn:not(:first-child),.factory-bootstrap-445 .input-group-btn:last-child>.btn,.factory-bootstrap-445 .input-group-btn:last-child>.dropdown-toggle{border-bottom-left-radius:0;border-top-left-radius:0}.factory-bootstrap-445 .input-group-addon:last-child{border-left:0}.factory-bootstrap-445 .input-group-btn{position:relative;white-space:nowrap}.factory-bootstrap-445 .input-group-btn:first-child>.btn{margin-right:-1px}.factory-bootstrap-445 .input-group-btn:last-child>.btn{margin-left:-1px}.factory-bootstrap-445 .input-group-btn>.btn{position:relative}.factory-bootstrap-445 .input-group-btn>.btn+.btn{margin-left:-4px}.factory-bootstrap-445 .input-group-btn>.btn:active,.factory-bootstrap-445 .input-group-btn>.btn:hover{z-index:2}.factory-bootstrap-445 .nav{padding-left:0;margin-bottom:0;list-style:none}.factory-bootstrap-445 .nav:after,.factory-bootstrap-445 .nav:before{display:table;content:" "}.factory-bootstrap-445 .nav:after{clear:both}.factory-bootstrap-445 .nav>li{position:relative;display:block}.factory-bootstrap-445 .nav>li>a{position:relative;display:block;padding:10px 15px}.factory-bootstrap-445 .nav>li>a:focus,.factory-bootstrap-445 .nav>li>a:hover{text-decoration:none;background-color:#eee}.factory-bootstrap-445 .nav>li.disabled>a{color:#999}.factory-bootstrap-445 .nav>li.disabled>a:focus,.factory-bootstrap-445 .nav>li.disabled>a:hover{color:#999;text-decoration:none;cursor:not-allowed;background-color:transparent}.factory-bootstrap-445 .nav .open>a,.factory-bootstrap-445 .nav .open>a:focus,.factory-bootstrap-445 .nav .open>a:hover{background-color:#eee;border-color:#428bca}.factory-bootstrap-445 .nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.factory-bootstrap-445 .nav>li>a>img{max-width:none}.factory-bootstrap-445 .nav-tabs{border-bottom:1px solid #ddd}.factory-bootstrap-445 .nav-tabs>li{float:left;margin-bottom:-1px}.factory-bootstrap-445 .nav-tabs>li>a{margin-right:2px;line-height:1.428571429;border:1px solid transparent;border-radius:4px 4px 0 0}.factory-bootstrap-445 .nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.factory-bootstrap-445 .nav-tabs>li.active>a,.factory-bootstrap-445 .nav-tabs>li.active>a:focus,.factory-bootstrap-445 .nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.factory-bootstrap-445 .nav-tabs.nav-justified{width:100%;border-bottom:0}.factory-bootstrap-445 .nav-tabs.nav-justified>li{float:none}.factory-bootstrap-445 .nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.factory-bootstrap-445 .nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.factory-bootstrap-445 .nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.factory-bootstrap-445 .nav-tabs.nav-justified>.active>a,.factory-bootstrap-445 .nav-tabs.nav-justified>.active>a:focus,.factory-bootstrap-445 .nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.factory-bootstrap-445 .nav-pills>li{float:left}.factory-bootstrap-445 .nav-pills>li>a{border-radius:4px}.factory-bootstrap-445 .nav-pills>li+li{margin-left:2px}.factory-bootstrap-445 .nav-pills>li.active>a,.factory-bootstrap-445 .nav-pills>li.active>a:focus,.factory-bootstrap-445 .nav-pills>li.active>a:hover{color:#fff;background-color:#428bca}.factory-bootstrap-445 .nav-stacked>li{float:none}.factory-bootstrap-445 .nav-stacked>li+li{margin-top:2px;margin-left:0}.factory-bootstrap-445 .nav-justified{width:100%}.factory-bootstrap-445 .nav-justified>li{float:none}.factory-bootstrap-445 .nav-justified>li>a{margin-bottom:5px;text-align:center}.factory-bootstrap-445 .nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.factory-bootstrap-445 .nav-tabs-justified{border-bottom:0}.factory-bootstrap-445 .nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.factory-bootstrap-445 .nav-tabs-justified>.active>a,.factory-bootstrap-445 .nav-tabs-justified>.active>a:focus,.factory-bootstrap-445 .nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.factory-bootstrap-445 .tab-content>.tab-pane{display:none}.factory-bootstrap-445 .tab-content>.active{display:block}.factory-bootstrap-445 .nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.factory-bootstrap-445 .navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}.factory-bootstrap-445 .navbar:after,.factory-bootstrap-445 .navbar:before{display:table;content:" "}.factory-bootstrap-445 .navbar:after{clear:both}@media (min-width:768px){.navbar{border-radius:4px}}.factory-bootstrap-445 .navbar-header:after,.factory-bootstrap-445 .navbar-header:before{display:table;content:" "}.factory-bootstrap-445 .navbar-header:after{clear:both}@media (min-width:768px){.navbar-header{float:left}}.factory-bootstrap-445 .navbar-collapse{max-height:340px;padding-right:15px;padding-left:15px;overflow-x:visible;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch}.factory-bootstrap-445 .navbar-collapse:after,.factory-bootstrap-445 .navbar-collapse:before{display:table;content:" "}.factory-bootstrap-445 .navbar-collapse:after{clear:both}.factory-bootstrap-445 .navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.factory-bootstrap-445 .container>.navbar-collapse,.factory-bootstrap-445 .container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.factory-bootstrap-445 .navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.factory-bootstrap-445 .navbar-fixed-bottom,.factory-bootstrap-445 .navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.factory-bootstrap-445 .navbar-fixed-top{top:0;border-width:0 0 1px}.factory-bootstrap-445 .navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.factory-bootstrap-445 .navbar-brand{float:left;padding:15px;font-size:18px;line-height:20px}.factory-bootstrap-445 .navbar-brand:focus,.factory-bootstrap-445 .navbar-brand:hover{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand{margin-left:-15px}}.factory-bootstrap-445 .navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.factory-bootstrap-445 .navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.factory-bootstrap-445 .navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.factory-bootstrap-445 .navbar-nav{margin:7.5px
1
  /*!
2
+ * Bootstrap generator - v1.0.1, 2021-11-19
3
  * Webcraftic factory build
4
  *
5
  * Copyright 2018, Alex Kovalev <alex.kovalevv@gmail.com>, Webcraftic <wordpress.webraftic@gmail.com>
8
  */
9
 
10