Real Testimonials - Version 2.1.5

Version Description

  • Dec 17, 2019 =
  • Improved: Dashboard UI.
  • Fix: WordPress 5.3.1 compatible issue.
Download this release

Release Info

Developer shapedplugin
Plugin Icon 128x128 Real Testimonials
Version 2.1.5
Comparing to
See all releases

Code changes from version 2.1.4 to 2.1.5

Files changed (124) hide show
  1. admin/assets/css/admin-meta.css +0 -804
  2. admin/assets/css/admin.css +156 -7
  3. admin/assets/css/admin.min.css +1 -0
  4. admin/assets/css/chosen.css +0 -448
  5. admin/assets/images/chosen-sprite.png +0 -0
  6. admin/assets/images/chosen-sprite@2x.png +0 -0
  7. admin/assets/images/icon-256.png +0 -0
  8. admin/assets/images/logo.png +0 -0
  9. admin/assets/images/nav-1.png +0 -0
  10. admin/assets/images/nav-10.png +0 -0
  11. admin/assets/images/nav-11.png +0 -0
  12. admin/assets/images/nav-12.png +0 -0
  13. admin/assets/images/nav-13.png +0 -0
  14. admin/assets/images/nav-2.png +0 -0
  15. admin/assets/images/nav-3.png +0 -0
  16. admin/assets/images/nav-4.png +0 -0
  17. admin/assets/images/nav-5.png +0 -0
  18. admin/assets/images/nav-6.png +0 -0
  19. admin/assets/images/nav-7.png +0 -0
  20. admin/assets/images/nav-8.png +0 -0
  21. admin/assets/images/nav-9.png +0 -0
  22. admin/assets/images/sp-icon.png +0 -0
  23. admin/assets/images/testimonial-logo.png +0 -0
  24. admin/assets/images/tiny-mce.png +0 -0
  25. admin/assets/js/admin-meta.js +0 -32
  26. admin/assets/js/chosen.js +0 -1269
  27. admin/assets/js/help.js +0 -12
  28. admin/views/metabox/assets/css/sp-custom.css +0 -183
  29. admin/views/metabox/assets/css/sp-framework-rtl.css +0 -220
  30. admin/views/metabox/assets/css/sp-framework.css +0 -1323
  31. admin/views/metabox/assets/js/sp-framework.js +0 -356
  32. admin/views/metabox/assets/js/sp-framework.min.js +0 -2
  33. admin/views/metabox/assets/js/sp-plugins.js +0 -1148
  34. admin/views/metabox/assets/js/sp-plugins.min.js +0 -3
  35. admin/views/metabox/classes/abstract.class.php +0 -23
  36. admin/views/metabox/classes/framework.class.php +0 -442
  37. admin/views/metabox/classes/metabox.class.php +0 -252
  38. admin/views/metabox/classes/options.class.php +0 -374
  39. admin/views/metabox/config/metabox.config.php +0 -155
  40. admin/views/metabox/fields/d_text/d_text.php +0 -24
  41. admin/views/metabox/fields/notice/notice.php +0 -24
  42. admin/views/metabox/fields/rating/rating.php +0 -43
  43. admin/views/metabox/fields/text/text.php +0 -24
  44. admin/views/metabox/functions/actions.php +0 -25
  45. admin/views/metabox/functions/enqueue.php +0 -35
  46. admin/views/metabox/functions/fallback.php +0 -86
  47. admin/views/metabox/functions/helpers.php +0 -205
  48. admin/views/metabox/functions/sanitize.php +0 -135
  49. admin/views/metabox/functions/validate.php +0 -55
  50. admin/views/metabox/sp-framework-path.php +0 -398
  51. admin/views/metabox/sp-framework.php +0 -39
  52. admin/views/notices/review.php +131 -0
  53. admin/views/partials/general-settings.php +0 -95
  54. admin/views/partials/slider-settings.php +0 -130
  55. admin/views/partials/stylization.php +0 -97
  56. admin/views/partials/typography.php +0 -123
  57. admin/views/partials/upgrade-to-pro.php +0 -404
  58. admin/views/scripts.php +2 -18
  59. admin/views/tab-navigation.php +0 -74
  60. admin/views/testimonial-metaboxs.php +914 -0
  61. admin/views/testimonial-settings.php +128 -0
  62. admin/views/tp-metabox/assets/css/spftestimonial-rtl.css +381 -0
  63. admin/views/tp-metabox/assets/css/spftestimonial-rtl.min.css +1 -0
  64. admin/views/tp-metabox/assets/css/spftestimonial.css +3044 -0
  65. admin/views/tp-metabox/assets/css/spftestimonial.min.css +1 -0
  66. admin/views/tp-metabox/assets/images/checkerboard.png +0 -0
  67. admin/views/tp-metabox/assets/images/tpro-tiny-mce.png +0 -0
  68. admin/views/tp-metabox/assets/js/spftestimonial-plugins.js +2092 -0
  69. admin/views/tp-metabox/assets/js/spftestimonial-plugins.min.js +1 -0
  70. admin/views/tp-metabox/assets/js/spftestimonial.js +2078 -0
  71. admin/views/tp-metabox/assets/js/spftestimonial.min.js +1 -0
  72. admin/views/tp-metabox/classes/abstract.class.php +37 -0
  73. admin/views/tp-metabox/classes/fields.class.php +384 -0
  74. admin/views/tp-metabox/classes/metabox.class.php +444 -0
  75. admin/views/tp-metabox/classes/options.class.php +700 -0
  76. admin/views/tp-metabox/classes/setup.class.php +411 -0
  77. admin/views/tp-metabox/classes/widgets.class.php +128 -0
  78. admin/views/tp-metabox/fields/button_set/button_set.php +59 -0
  79. admin/views/tp-metabox/fields/checkbox/checkbox.php +82 -0
  80. admin/views/tp-metabox/fields/code_editor/code_editor.php +58 -0
  81. admin/views/tp-metabox/fields/color/color.php +52 -0
  82. admin/views/tp-metabox/fields/color_group/color_group.php +44 -0
  83. admin/views/tp-metabox/fields/image_select/image_select.php +78 -0
  84. admin/views/{metabox → tp-metabox/fields}/index.php +0 -0
  85. admin/views/tp-metabox/fields/notice/notice.php +26 -0
  86. admin/views/tp-metabox/fields/radio/radio.php +76 -0
  87. admin/views/tp-metabox/fields/rating/rating.php +56 -0
  88. admin/views/tp-metabox/fields/select/select.php +131 -0
  89. admin/views/tp-metabox/fields/select_f/select_f.php +111 -0
  90. admin/views/tp-metabox/fields/spacing/spacing.php +144 -0
  91. admin/views/tp-metabox/fields/spinner/spinner.php +74 -0
  92. admin/views/tp-metabox/fields/subheading/subheading.php +24 -0
  93. admin/views/tp-metabox/fields/submessage/submessage.php +26 -0
  94. admin/views/tp-metabox/fields/switcher/switcher.php +42 -0
  95. admin/views/tp-metabox/fields/text/text.php +30 -0
  96. admin/views/tp-metabox/fields/text_f/text_f.php +28 -0
  97. admin/views/tp-metabox/fields/typography/google-fonts.php +11 -0
  98. admin/views/tp-metabox/fields/typography/typography.php +549 -0
  99. admin/views/tp-metabox/fields/upgrade/upgrade.php +488 -0
  100. admin/views/tp-metabox/fields/wp_editor/wp_editor.php +103 -0
  101. admin/views/tp-metabox/functions/actions.php +112 -0
  102. admin/views/tp-metabox/functions/customize.php +114 -0
  103. admin/views/tp-metabox/functions/deprecated.php +7 -0
  104. admin/views/tp-metabox/functions/helpers.php +106 -0
  105. admin/views/tp-metabox/functions/sanitize.php +28 -0
  106. admin/views/tp-metabox/functions/validate.php +145 -0
  107. admin/views/tp-metabox/index.php +1 -0
  108. admin/views/widget.php +22 -15
  109. class/metabox.php +0 -107
  110. class/metaboxform.php +0 -415
  111. class/router.php +3 -12
  112. class/shortcodes.php +30 -26
  113. class/testimonial.php +75 -72
  114. includes/class-testimonial-activator.php +20 -0
  115. includes/class-testimonial-deactivator.php +20 -0
  116. includes/class-testimonial-updates.php +108 -0
  117. includes/free/loader.php +6 -6
  118. includes/functions.php +115 -71
  119. includes/updates/update-2.1.5.php +173 -0
  120. public/views/deprecated-shortcodes.php +17 -12
  121. public/views/shortcoderender.php +142 -96
  122. public/views/templates/theme-one.php +19 -26
  123. readme.txt +6 -117
  124. testimonial-free.php +77 -46
admin/assets/css/admin-meta.css DELETED
@@ -1,804 +0,0 @@
1
- #sp_tfree_shortcode_options .inside,
2
- #sp_tpro_feature_list .inside {
3
- padding: 0;
4
- margin-top: 0;
5
- }
6
-
7
- .text-center {
8
- text-align: center;
9
- }
10
-
11
- .misc-pub-section:not(.misc-pub-post-status) {
12
- display: none;
13
- }
14
-
15
- .sp-pro-version-text{
16
- display: inline-block;
17
- }
18
- .sp-tfree-image-select label,
19
- .sp-tfree-image-select div.sp-tfree-label{
20
- display: inline-block;
21
- margin: 5px;
22
- vertical-align: middle;
23
- }
24
- .sp-tfree-image-select div.sp-tfree-label{
25
- opacity: .5;
26
- }
27
- .sp-tfree-image-select label input,
28
- .sp-tfree-image-select div.sp-tfree-label input{
29
- display: none;
30
- }
31
- .sp-tfree-image-select label img,
32
- .sp-tfree-image-select div.sp-tfree-label img{
33
- max-width: 100%;
34
- vertical-align: bottom;
35
- background-color: #fff;
36
- border: 2px solid #eee;
37
- opacity: 0.75;
38
- -moz-transition: all 0.15s ease-out;
39
- -o-transition: all 0.15s ease-out;
40
- -webkit-transition: all 0.15s ease-out;
41
- transition: all 0.15s ease-out;
42
- }
43
- .sp-tfree-image-select label input:checked ~ img {
44
- border-color: #52b3d9;
45
- opacity: 1;
46
- }
47
-
48
- .js #sp_tfree_shortcode_options.postbox .handlediv,
49
- .js #sp_tfree_shortcode_options.postbox .hndle {
50
- display: none;
51
- }
52
-
53
- .sp-tfree-metabox-framework .sp-tfree-mbf-banner{
54
- background-color: #2684a6;
55
- padding: 24px 28px;
56
- overflow: hidden;
57
- }
58
- .sp-tfree-metabox-framework .sp-tfree-mbf-banner .sp-tfree-mbf-logo{
59
- float: left;
60
- }
61
- .sp-tfree-metabox-framework .sp-tfree-mbf-banner .sp-tfree-mbf-logo img{
62
- display: block;
63
- width: 220px;
64
- }
65
- .sp-tfree-metabox-framework .sp-tfree-mbf-banner .sp-tfree-mbf-short-links{
66
- float: right;
67
- line-height: 31px;
68
- }
69
- .sp-tfree-metabox-framework .sp-tfree-mbf-banner .sp-tfree-mbf-short-links a{
70
- color: #ffffff;
71
- text-decoration: none;
72
- margin-left: 16px;
73
- font-size: 15px;
74
- }
75
- .sp-tfree-metabox-framework .sp-tfree-mbf-banner .sp-tfree-mbf-short-links a:focus{
76
- outline: none;
77
- box-shadow: none;
78
- }
79
- .sp-tfree-metabox-framework .sp-tfree-mbf {
80
- display: inline-flex;
81
- width: 100%;
82
- background-color: #fffdfd;
83
- }
84
-
85
- .sp-tfree-mbf .sp-tfree-col-lg-3 {
86
- border-right: 1px solid #dddddd;
87
- width: 33.33%;
88
- }
89
-
90
- .sp-tfree-mbf .sp-tfree-col-lg-3:last-of-type {
91
- border-right: 0;
92
- }
93
-
94
- .sp-tfree-mbf .sp-tfree-col-lg-3 .sp-tfree-mbf-shortcode {
95
- padding: 42px 16px;
96
- }
97
-
98
- .sp-tfree-mbf .sp-tfree-col-lg-3:last-child .sp-tfree-mbf-shortcode {
99
- padding: 42px 16px 0 16px;
100
- }
101
-
102
- .sp-tfree-mbf .sp-tfree-mbf-shortcode p {
103
- margin-top: 2px;
104
- color: #4c5158;
105
- }
106
-
107
- .sp-tfree-col-lg-3 .sp-tfree-mbf-shortcode .selectable {
108
- -webkit-touch-callout: all;
109
- -webkit-user-select: all;
110
- -khtml-user-select: all;
111
- -moz-user-select: all;
112
- -ms-user-select: all;
113
- user-select: all;
114
- }
115
-
116
- .sp-tfree-col-lg-3 .sp-tfree-mbf-shortcode .tfree-sc-code {
117
- background-color: rgba(82, 179, 217, 0.11);
118
- padding: 8px 10px;
119
- display: inline-block;
120
- }
121
-
122
- .sp-tfree-mbf .sp-tfree-col-lg-3 img.back-image {
123
- max-width: 100%;
124
- display: block;
125
- margin: 0 auto;
126
- }
127
-
128
- .sp-tfree-mbf .sp-tfree-mbf-shortcode .sp-tfree-mbf-shortcode-title {
129
- font-weight: 500;
130
- font-size: 17px !important;
131
- padding-top: 0 !important;
132
- color: #4c5158;
133
- }
134
-
135
- .sp-tfree-metabox-framework .sp-tfree-shortcode-divider {
136
- height: 20px;
137
- background: #f1f1f1;
138
- border-top: 1px solid #dddddd;
139
- }
140
-
141
- #sp_tfree_shortcode_options.postbox{
142
- border: 1px solid #dddddd;
143
- -webkit-box-shadow: none;
144
- -moz-box-shadow: none;
145
- box-shadow: none;
146
- }
147
-
148
- /* Tab Menu */
149
- .sp-tfree-metabox-framework .sp-tfree-mbf-nav {
150
- background: #f1f1f1;
151
- padding-top: 0;
152
- border-bottom: 0;
153
- }
154
-
155
- .sp-tfree-metabox-framework a.nav-tab {
156
- margin-bottom: -2px;
157
- margin-left: 0;
158
- font-size: 13px;
159
- padding: 16px 15px;
160
- line-height: 1.4;
161
- border-left: 0;
162
- border-bottom: 1px solid #ddd;
163
- color: #ffffff;
164
- background-color: #52b3d9;
165
- border-right-color: #e2e2e2;
166
- text-transform: uppercase;
167
- font-weight: 600;
168
- }
169
-
170
- .sp-tfree-metabox-framework a.nav-tab:hover {
171
- cursor: pointer;
172
- }
173
-
174
- .sp-tfree-metabox-framework a.nav-tab i.sp-tfree-font-icon {
175
- width: 20px;
176
- margin-right: 5px;
177
- font-size: 14px;
178
- text-align: center;
179
- }
180
-
181
- .sp-tfree-metabox-framework a.nav-tab.nav-tab-active {
182
- border-bottom: 1px solid transparent;
183
- border-top: 1px solid #52b3d9;
184
- background-color: #fff;
185
- box-shadow: 0 3px 0 0 #52b3d9 inset;
186
- color: #32373c;
187
- -webkit-transition: ease-out all .3s;
188
- -moz-transition: ease-out all .3s;
189
- -o-transition: ease-out all .3s;
190
- transition: ease-out all .3s;
191
- }
192
-
193
- .sp-tfree-metabox-framework a.nav-tab.nav-tab-active i {
194
- color: #52b3d9;
195
- -webkit-transition: ease-out all .3s;
196
- -moz-transition: ease-out all .3s;
197
- -o-transition: ease-out all .3s;
198
- transition: ease-out all .3s;
199
- }
200
-
201
- .sp-tfree-metabox-framework a.nav-tab.sp-tfree-upgrade-to-pro {
202
- background-color: #35b135;
203
- color: #ffffff;
204
- }
205
-
206
- .sp-tfree-metabox-framework a.nav-tab.sp-tfree-upgrade-to-pro.nav-tab-active {
207
- background-color: #ffffff;
208
- border-top: 1px solid #35b135;
209
- box-shadow: 0 3px 0 0 #35b135 inset;
210
- color: #35b135;
211
- }
212
-
213
- .sp-tfree-metabox-framework a.nav-tab.sp-tfree-upgrade-to-pro.nav-tab-active i {
214
- color: #35b135;
215
- }
216
-
217
- .sp-tfree-metabox-framework .sp-tfree-mbf-tab-content {
218
- display: none;
219
- border-top: 1px solid #dddddd;
220
- border-bottom: 1px solid #dddddd;
221
- }
222
-
223
- .sp-tfree-mbf-tab-content.nav-tab-active {
224
- margin-top: 0;
225
- display: inherit;
226
- background-color: #fff;
227
- }
228
-
229
- /*Typography*/
230
- .sp-tfree-mbf-tab-content .sp-tpro-notice{
231
- font-size: 15px;
232
- margin: 22px 30px;
233
- color: #2f2f2f;
234
- background: #f9f9f9;
235
- -webkit-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.18);
236
- box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.18);
237
- padding: 10px 12px;
238
- border-left: 3px solid #f90000;
239
- }
240
- .sp-tfree-mbf-tab-content .sp-tpro-notice a{
241
- text-decoration: none;
242
- }
243
-
244
- .sp-tfree-mbf-tab-content .sp-tfree-element .sp-element{
245
- display: inline-block;
246
- padding: 0 5px 0 0;
247
- margin: 0;
248
- line-height: 1.5;
249
- color: #999;
250
- }
251
- .sp-tfree-mbf-tab-content.sp-tfree-mbf-tab-typography .sp-tfree-input-field{
252
- margin-left: 30%;
253
- display: block;
254
- }
255
- .sp-tfree-mbf-tab-content.sp-tfree-mbf-tab-typography .sp-tfree-input-label{
256
- float: left;
257
- display: block;
258
- }
259
- .sp-tfree-mbf-tab-content.sp-tfree-mbf-tab-typography .sp-divider{
260
- width: 100%;
261
- display: block;
262
- height: 10px;
263
- }
264
-
265
- .sp-tfree-mbf-tab-content .sp-element .chosen-container-single .chosen-single,
266
- .sp-tfree-mbf-tab-content .sp-element .chosen-container-active.chosen-with-drop .chosen-single,
267
- .sp-tfree-mbf-tab-content .sp-tfree-input-field .chosen-container-single .chosen-single,
268
- .sp-tfree-mbf-tab-content .sp-tfree-input-field .chosen-container-active.chosen-with-drop .chosen-single {
269
- background-image: none;
270
- -webkit-box-shadow: none;
271
- box-shadow: none;
272
- background: #fff;
273
- border-color: #d1d1d1;
274
- border-radius: 1px;
275
- height: 38px;
276
- line-height: 36px;
277
- padding-left: 12px;
278
- }
279
- .sp-tfree-mbf-tab-content .sp-element .chosen-container-single .chosen-single div,
280
- .sp-tfree-mbf-tab-content .sp-tfree-input-field .chosen-container-single .chosen-single div {
281
- top: 7px;
282
- }
283
-
284
- .sp-tfree-mbf-tab-content .sp-tfree-input-field .chosen-container .chosen-results {
285
- padding: 0;
286
- margin: 0;
287
- border-top: 1px solid #d1d1d1;
288
- }
289
-
290
- .sp-tfree-mbf-tab-content .sp-tfree-input-field .chosen-container .chosen-results li {
291
- padding: 10px 14px;
292
- }
293
-
294
- .sp-tfree-mbf-tab-content .sp-tfree-input-field li.highlighted,
295
- .sp-tfree-mbf-tab-content .sp-tfree-input-field .chosen-container .chosen-results li.highlighted{
296
- background-color: #52b3d9;
297
- background-image: none;
298
- }
299
-
300
- .sp-tfree-mbf-tab-content .sp-element.sp-font-alignment .chosen-container{
301
- min-width: 93px !important;
302
- }
303
- .sp-tfree-mbf-tab-content .sp-element.sp-font-transform .chosen-container{
304
- min-width: 120px !important;
305
- }
306
- .sp-tfree-mbf-tab-content .sp-element.sp-font-spacing .chosen-container{
307
- min-width: 96px !important;
308
- }
309
- .sp-tfree-mbf-tab-content .sp-element.sp-typography-variant .chosen-container{
310
- min-width: 106px !important;
311
- }
312
- .sp-tfree-mbf-tab-content .sp-element.sp-typography-family .chosen-container{
313
- min-width: 276px !important;
314
- }
315
-
316
- .sp-tfree-mbf-tab-content .sp-element.sp-font-size,
317
- .sp-tfree-mbf-tab-content .sp-element.sp-font-height{
318
- margin-right: 25px !important;
319
- position: relative;
320
- }
321
- .sp-tfree-mbf-tab-content .sp-element.sp-font-size:before,
322
- .sp-tfree-mbf-tab-content .sp-element.sp-font-height:before{
323
- content: "px";
324
- position: absolute;
325
- top: 20px;
326
- right: -24px;
327
- height: 34px;
328
- width: 29px;
329
- line-height: 34px;
330
- text-align: center;
331
- background-color: #f5f5f5;
332
- display: block;
333
- border: 1px solid #ddd;
334
- border-left: none;
335
- }
336
- .sp-tfree-mbf-tab-content .sp-font-preview{
337
- color: #444444;
338
- font-size: 16px;
339
- line-height: 20px;
340
- text-align: left;
341
- text-transform: none;
342
- letter-spacing: normal;
343
- font-family: "Open Sans";
344
- font-weight: 400;
345
- font-style: normal;
346
- padding: 10px;
347
- border: 1px solid #e6e6e6;
348
- margin-top: 20px;
349
- background-color: #fff;
350
- background: rgba(255,255,255,.5);
351
- border-color: rgba(222,222,222,.75);
352
- -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.04);
353
- box-shadow: inset 0 1px 2px rgba(0,0,0,.04);
354
- color: rgba(51,51,51,.5);
355
- }
356
-
357
- .sp-tfree-mbf-tab-content .sp-tfree-input-field .chosen-container#tfree_testimonials_from_chosen{
358
- min-width: 230px !important;
359
- }
360
-
361
- .sp-tfree-mbf-tab-content .sp-tfree-input-field .chosen-container#tfree_nav_arrow_position_chosen{
362
- min-width: 280px !important;
363
- }
364
-
365
- .sp-tfree-mbf-tab-content .sp-tfree-input-field .chosen-container{
366
- min-width: 170px !important;
367
- }
368
-
369
-
370
- /*Meta fields*/
371
- .sp-tfree-element#field-subheading{
372
- font-size: 14px;
373
- font-weight: bold;
374
- padding-top: 17px;
375
- padding-bottom: 17px;
376
- color: #23282d;
377
- background-color: #f7f7f7;
378
- }
379
- .sp-tfree-element#field-subheading .sp-tfree-input-label{
380
- width: 100%;
381
- }
382
- .sp-tfree-element#field-subheading div.sp-tfree-input-field{
383
- display: none;
384
- }
385
- .sp-tfree-element {
386
- padding: 22px 30px;
387
- clear: both;
388
- border-bottom: 1px solid rgba(238, 238, 238, 0.1);
389
- display: flow-root;
390
- }
391
-
392
- .sp-tfree-element div.sp-tfree-input-label,
393
- .sp-tfree-element div.sp-tfree-input-field {
394
- display: inline-block;
395
- vertical-align: top;
396
- }
397
-
398
- .sp-tfree-element .sp-tfree-input-label {
399
- position: relative;
400
- width: 25%;
401
- }
402
-
403
- .sp-tfree-element .sp-tfree-input-label label h4 {
404
- color: #23282d;
405
- margin: 0;
406
- }
407
-
408
- .sp-tfree-element .sp-tfree-input-label p {
409
- color: #999;
410
- font-style: italic;
411
- margin-top: 10px;
412
- margin-bottom: 0;
413
- }
414
-
415
- .sp-tfree-element .sp-tfree-input-field {
416
- margin-left: 10%;
417
- max-width: 65%;
418
- }
419
-
420
- .sp-tfree-mbf-tab-content .sp-tfree-mbf-after {
421
- padding-left: 5px;
422
- color: #777;
423
- font-weight: 300;
424
- }
425
-
426
- .sp-tfree-element .sp-tfree-input-number {
427
- width: 70px;
428
- background: #fff;
429
- border-color: #d1d1d1;
430
- height: 36px;
431
- line-height: 34px;
432
- padding-left: 12px;
433
- }
434
-
435
- /**
436
- Upgrade to Pro
437
- */
438
- #poststuff .sp-tfree-upgrade-body .sp-tfree-section-title {
439
- padding: 13px 30px;
440
- font-size: 28px;
441
- line-height: 1;
442
- font-weight: 700;
443
- color: #2e9cc7;
444
- text-transform: uppercase;
445
- font-family: 'Raleway', sans-serif;
446
- margin-bottom: 0;
447
- margin-top: 0;
448
- }
449
-
450
- #poststuff .sp-tfree-upgrade-body .sp-tfree-section-feature-icon {
451
- padding: 30px 30px 0 30px;
452
- }
453
-
454
- .sp-tfree-upgrade-body .tfree-option {
455
- padding: 30px 30px;
456
- border-bottom: 1px solid #efefef;
457
- }
458
-
459
- .sp-tfree-upgrade-body .tfree-option:nth-child(2n+0) {
460
- background-color: #fafafa;
461
- }
462
-
463
- .sp-tfree-upgrade-header .tfree-overlay-color {
464
- background: #2684a6;
465
- position: absolute;
466
- width: 100%;
467
- height: 100%;
468
- top: 0;
469
- left: 0;
470
- z-index: 1;
471
- }
472
-
473
- .sp-tfree-upgrade-header {
474
- overflow: hidden;
475
- padding: 43px 40px;
476
- position: relative;
477
- }
478
-
479
- .sp-tfree-upgrade-header .sp-tfree-container {
480
- position: relative;
481
- z-index: 2;
482
- }
483
-
484
- .sp-tfree-upgrade-header .free-upgrade-btn {
485
- font-size: 15px;
486
- color: #ffffff;
487
- border-radius: 0;
488
- border: 0;
489
- height: auto !important;
490
- line-height: 24px !important;
491
- padding: 13px 18px !important;
492
- text-align: center;
493
- font-weight: 500;
494
- }
495
-
496
- .sp-tfree-upgrade-header .sp-tfree-col-lg-7 {
497
- width: 58.33333333%;
498
- float: left;
499
- }
500
-
501
- .sp-tfree-upgrade-header .sp-tfree-col-lg-5 {
502
- width: 41.66666667%;
503
- float: left;
504
- text-align: right;
505
- }
506
-
507
- .sp-tfree-upgrade-header .sp-tfree-upgrade-title {
508
- margin: 0;
509
- padding: 0;
510
- font-size: 24px;
511
- font-weight: 700;
512
- color: #ffffff;
513
- }
514
-
515
- .sp-tfree-upgrade-header .sp-tfree-upgrade-subtitle {
516
- font-size: 15px;
517
- font-weight: 500;
518
- margin-top: 10px;
519
- margin-bottom: 0;
520
- color: #ffffff;
521
- }
522
-
523
- .sp-tfree-upgrade-footer .free-upgrade-btn.upgrade-btn,
524
- .sp-tfree-upgrade-footer .free-upgrade-btn.demo-btn {
525
- font-family: 'Raleway', sans-serif;
526
- box-shadow: none;
527
- border: 0;
528
- color: #fff;
529
- border-radius: 0;
530
- font-size: 16px;
531
- font-weight: 500;
532
- height: auto !important;
533
- line-height: 24px !important;
534
- padding: 13px 20px !important;
535
- text-align: center;
536
- }
537
-
538
- .sp-tfree-upgrade-header .upgrade-btn,
539
- .sp-tfree-upgrade-footer .upgrade-btn {
540
- background-color: #3cb371;
541
- box-shadow: 0px 1px 26px -3px #333333;
542
- margin-right: 14px;
543
- }
544
-
545
- .sp-tfree-upgrade-header .upgrade-btn:hover,
546
- .sp-tfree-upgrade-footer .upgrade-btn:hover,
547
- .sp-tfree-upgrade-footer .free-upgrade-btn.upgrade-btn:focus,
548
- .sp-tfree-upgrade-header .free-upgrade-btn.upgrade-btn:focus {
549
- background: #26a55f;
550
- color: #fff;
551
- }
552
-
553
- .sp-tfree-upgrade-header .demo-btn,
554
- .sp-tfree-upgrade-footer .demo-btn {
555
- background-color: #52b3d9;
556
- box-shadow: 0px 1px 26px -3px #333333;
557
- }
558
-
559
- .sp-tfree-upgrade-header .demo-btn:hover,
560
- .sp-tfree-upgrade-footer .demo-btn:hover,
561
- .sp-tfree-upgrade-footer .free-upgrade-btn.demo-btn:focus,
562
- .sp-tfree-upgrade-header .free-upgrade-btn.demo-btn:focus {
563
- background: #2e9cc7;
564
- color: #fff;
565
- }
566
-
567
- .sp-tfree-upgrade-header h1,
568
- .sp-tfree-upgrade-header h4,
569
- .sp-tfree-upgrade-footer h2,
570
- .sp-tfree-upgrade-header p {
571
- color: #fff;
572
- font-family: 'Raleway', sans-serif;
573
- }
574
-
575
- #poststuff .sp-tfree-mbf-tab-content .sp-tfree-upgrade-body .sp-tfree-col-lg-2 h2 {
576
- font-size: 28px;
577
- padding-top: 40px;
578
- padding-left: 0;
579
- text-transform: uppercase;
580
- font-weight: 700;
581
- padding-bottom: 0;
582
- }
583
-
584
- #poststuff .sp-tfree-mbf-tab-content .sp-tfree-upgrade-body .sp-tfree-col-lg-2 h4{
585
- line-height: 24px;
586
- }
587
-
588
- .sp-tfree-mbf-tab-content .sp-tfree-upgrade-body .sp-tfree-col-lg-2 h4 {
589
- font-size: 20px;
590
- font-weight: 600;
591
- margin-bottom: 20px;
592
- line-height: 1.1;
593
- }
594
-
595
- #poststuff .sp-tfree-mbf-tab-content .sp-tfree-upgrade-body .sp-tfree-col-lg-2 h2,
596
- .sp-tfree-mbf-tab-content .sp-tfree-upgrade-body .sp-tfree-col-lg-2 h4 {
597
- color: #7c848e;
598
- }
599
-
600
- .sp-tfree-mbf-tab-content .sp-tfree-upgrade-body .sp-tfree-col-lg-2 p {
601
- font-size: 15px;
602
- color: #444;
603
- margin-top: 10px;
604
- }
605
-
606
- .sp-tfree-mbf-tab-content .sp-tfree-col-lg-2 {
607
- width: 50%;
608
- float: left;
609
- }
610
-
611
- .sp-tfree-mbf-tab-content .sp-tfree-col-lg-2 .sp-tfree-content {
612
- font-family: 'Raleway', sans-serif;
613
- padding: 25px;
614
- }
615
-
616
- .sp-tfree-mbf-tab-content .sp-tfree-col-lg-2 img {
617
- width: 100%;
618
- }
619
-
620
- .sp-tfree-mbf-tab-content .sp-tfree-col-lg-2 .sp-tfree-content img {
621
- box-shadow: 0px 0px 20px 0px #aaaaaa;
622
- }
623
-
624
- .sp-tfree-mbf-tab-content .sp-tfree-col-lg-2 h4 {
625
- margin-top: 0.33em;
626
- }
627
-
628
- .sp-tfree-mbf-tab-content .tfree-option:after {
629
- content: "";
630
- display: table;
631
- clear: both;
632
- }
633
-
634
- .sp-tfree-mbf-tab-content .sp-tfree-video-tutorial {
635
- padding: 30px 80px 50px;
636
- }
637
-
638
- .sp-tfree-mbf-tab-content .sp-tfree-video-tutorial-video {
639
- position: relative;
640
- padding-bottom: 56.4%;
641
- width: 100%;
642
- max-width: 100%;
643
- height: 0;
644
- text-align: center;
645
- }
646
-
647
- .sp-tfree-mbf-tab-content .sp-tfree-video-tutorial-video iframe {
648
- position: absolute;
649
- top: 0;
650
- left: 0;
651
- width: 100%;
652
- height: 100%;
653
- }
654
-
655
- #poststuff .sp-tfree-mbf-tab-content .sp-tfree-video-tutorial h2 {
656
- font-size: 30px;
657
- font-weight: 600;
658
- color: #444444;
659
- margin-bottom: 20px;
660
- }
661
-
662
- .sp-tfree-mbf-tab-content .tfree-option:after, .sp-tfree-mbf-tab-content .tfree-option:before {
663
- -webkit-box-sizing: border-box;
664
- -moz-box-sizing: border-box;
665
- box-sizing: border-box;
666
- }
667
-
668
- .sp-tfree-upgrade-footer {
669
- padding: 60px 40px 40px 40px;
670
- }
671
-
672
- .sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer {
673
- font-family: 'Raleway', sans-serif;
674
- color: #fff;
675
- position: relative;
676
- z-index: 1;
677
- }
678
-
679
- .sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer .tfree-overlay-color {
680
- position: absolute;
681
- width: 100%;
682
- height: 100%;
683
- top: 0px;
684
- left: 0px;
685
- z-index: -1;
686
- background: #2684a6;
687
- }
688
-
689
- #poststuff .sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer h2 {
690
- font-size: 28px;
691
- margin-top: 12px;
692
- font-weight: 700;
693
- }
694
-
695
- .sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer p {
696
- margin-top: 0;
697
- }
698
-
699
- .sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer p {
700
- margin-top: 0;
701
- margin-bottom: 34px;
702
- }
703
-
704
- .sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer a {
705
- margin-bottom: 20px;
706
- }
707
-
708
- .sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer p {
709
- font-size: 18px;
710
- font-weight: 500;
711
- }
712
-
713
- /* Responsive */
714
- @media (max-width: 1200px) {
715
- .sp-tfree-metabox-framework .sp-tfree-mbf {
716
- display: block;
717
- }
718
-
719
- .sp-tfree-mbf-tab-content .sp-tfree-col-lg-2 {
720
- width: 100%;
721
- float: none;
722
- }
723
-
724
- #poststuff .sp-tfree-mbf-tab-content .sp-tfree-upgrade-body .sp-tfree-col-lg-2 h2 {
725
- padding-top: 0;
726
- }
727
-
728
- .sp-tfree-mbf-tab-content .sp-tfree-col-lg-2:last-of-type .sp-tfree-content {
729
- padding-top: 0;
730
- padding-bottom: 40px;
731
- }
732
-
733
- .sp-tfree-mbf .sp-tfree-col-lg-3,
734
- .sp-tfree-element .sp-tfree-input-label,
735
- .sp-tfree-element .sp-tfree-input-field {
736
- width: 100%;
737
- }
738
-
739
- .sp-tfree-mbf .sp-tfree-col-lg-3 {
740
- display: block;
741
- border-bottom: 1px solid #e5e5e5;
742
- padding-bottom: 15px;
743
- border-right: none;
744
- }
745
-
746
- .sp-tfree-mbf .sp-tfree-col-lg-3:last-of-type {
747
- border-bottom: none;
748
- padding-bottom: 0;
749
- }
750
-
751
- .sp-tfree-metabox-framework .sp-tfree-element .sp-tfree-input-field {
752
- margin-left: 0;
753
- }
754
-
755
- .sp-tfree-upgrade-header .sp-tfree-col-lg-7 {
756
- width: 100%;
757
- float: none;
758
- }
759
-
760
- .sp-tfree-upgrade-header .sp-tfree-col-lg-5 {
761
- width: 100%;
762
- float: none;
763
- text-align: center;
764
- }
765
-
766
- .sp-tfree-upgrade-header .sp-tfree-container {
767
- text-align: center;
768
- }
769
-
770
- .sp-tfree-upgrade-header .sp-tfree-upgrade-subtitle {
771
- margin-bottom: 20px;
772
- }
773
- }
774
-
775
- @media (max-width: 1024px) {
776
- .sp-tfree-upgrade-header .demo-btn,
777
- .sp-tfree-upgrade-footer .demo-btn,
778
- .sp-tfree-upgrade-header .upgrade-btn,
779
- .sp-tfree-upgrade-footer .upgrade-btn {
780
- margin: 0 auto;
781
- display: block;
782
- }
783
-
784
- .sp-tfree-mbf-tab-content .sp-tfree-upgrade-header a.upgrade-btn,
785
- .sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer a.upgrade-btn,
786
- .sp-tfree-upgrade-header .sp-tfree-upgrade-subtitle {
787
- margin-bottom: 20px;
788
- }
789
-
790
- .sp-tfree-upgrade-header .sp-tfree-col-lg-7 {
791
- width: 100%;
792
- float: none;
793
- }
794
-
795
- .sp-tfree-upgrade-header .sp-tfree-col-lg-5 {
796
- width: 100%;
797
- float: none;
798
- text-align: center;
799
- }
800
-
801
- .sp-tfree-upgrade-header .sp-tfree-container {
802
- text-align: center;
803
- }
804
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/assets/css/admin.css CHANGED
@@ -1,16 +1,11 @@
1
- #menu-posts-spt_testimonial .wp-menu-image img {
2
- width: 16px;
3
- height: 16px;
4
- }
5
-
6
  /* Help Page */
7
  .sp-tfree-text-center{
8
  text-align: center;
9
  }
10
  div.sp-tfree-help .wp-badge{
11
  border: none;
12
- background: url(../images/sp-icon.png) right no-repeat;
13
- background-size: 80px 80px;
14
  box-shadow: none;
15
  height: auto;
16
  }
@@ -32,6 +27,9 @@ div.sp-tfree-help .wp-badge{
32
  margin-top: 40px;
33
  }
34
  .sp-tfree-help.about-wrap [class$="-col"] .col+.col {
 
 
 
35
  margin-left: 20px;
36
  }
37
  div.sp-tfree-help .headline-feature.feature-video {
@@ -77,6 +75,7 @@ div.sp-tfree-help .sp-tfree-pro-features .feature-section span.dashicons{
77
  }
78
  div.sp-tfree-help .sp-tfree-pro-features .feature-section{
79
  margin-bottom: 40px;
 
80
  }
81
  div.sp-tfree-help .sp-tfree-pro-features .feature-section .sp-tfree-feature h3{
82
  margin-top:0;
@@ -125,6 +124,156 @@ div.sp-tfree-help .sp-tfree-upgrade-sticky-footer a.button{
125
  margin: 0 8px;
126
  }
127
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  /* Responsive CSS */
129
  @media (max-width: 960px) {
130
  div.sp-tfree-help .sp-tfree-upgrade-sticky-footer {
 
 
 
 
 
1
  /* Help Page */
2
  .sp-tfree-text-center{
3
  text-align: center;
4
  }
5
  div.sp-tfree-help .wp-badge{
6
  border: none;
7
+ background: url(../images/icon-256.png) right no-repeat;
8
+ background-size: 110px 110px;
9
  box-shadow: none;
10
  height: auto;
11
  }
27
  margin-top: 40px;
28
  }
29
  .sp-tfree-help.about-wrap [class$="-col"] .col+.col {
30
+ margin-left: 0;
31
+ }
32
+ .sp-tfree-help.about-wrap .help-section[class$="-col"] .col+.col {
33
  margin-left: 20px;
34
  }
35
  div.sp-tfree-help .headline-feature.feature-video {
75
  }
76
  div.sp-tfree-help .sp-tfree-pro-features .feature-section{
77
  margin-bottom: 40px;
78
+ margin-left: -2%;
79
  }
80
  div.sp-tfree-help .sp-tfree-pro-features .feature-section .sp-tfree-feature h3{
81
  margin-top:0;
124
  margin: 0 8px;
125
  }
126
 
127
+ /* Upgrade Page */
128
+ .sp-tfree-upgrade > h1 {
129
+ font-size: 2.5em;
130
+ color: #444;
131
+ font-weight: 300;
132
+ }
133
+ .sp-tfree-upgrade > h1 span {
134
+ font-weight: 400;
135
+ }
136
+ .sp-tfree-upgrade .about-text {
137
+ margin-bottom: 0;
138
+ }
139
+ .sp-tfree-upgrade ul {
140
+ margin-top: 0;
141
+ }
142
+ .about-wrap.sp-tfree-upgrade .about-text {
143
+ min-height: 60px;
144
+ }
145
+ .about-wrap.sp-tfree-upgrade hr {
146
+ order: 0;
147
+ height: 0;
148
+ margin: 0;
149
+ border-top: 1px solid rgba(0,0,0,.1);
150
+ }
151
+
152
+ .sp-tfree-upgrade .sp-tfree-pro-features .feature-section {
153
+ margin-bottom: 40px;
154
+ display: flex;
155
+ flex-wrap: wrap;
156
+ }
157
+ .sp-tfree-upgrade .sp-tfree-pro-features .feature-section .sp-tfree-feature h3 {
158
+ margin-top: 0;
159
+ }
160
+ .sp-tfree-upgrade .sp-tfree-pro-features .feature-section .sp-tfree-feature p {
161
+ margin-bottom: 0;
162
+ }
163
+ .sp-tfree-upgrade .sp-tfree-pro-features .feature-section .sp-tfree-feature {
164
+ box-shadow: 0 0 10px 0 #ddd;
165
+ margin: 4px;
166
+ border: 0 solid;
167
+ }
168
+ .sp-tfree-upgrade .sp-tfree-pro-features .feature-section.three-col .col {
169
+ min-width: 32%;
170
+ max-width: 32%;
171
+ margin-top: 20px;
172
+ display: flex;
173
+ align-self: auto;
174
+ }
175
+ .sp-tfree-upgrade .sp-tfree-pro-features .sp-tfree-pro-subtitle {
176
+ font-size: 1.2em;
177
+ margin-bottom: 26px;
178
+ }
179
+ .sp-tfree-upgrade .sp-tfree-pro-features h2,
180
+ .sp-tfree-upgrade .sp-tfree-promo-video-title {
181
+ font-size: 2.2em;
182
+ font-weight: 400;
183
+ }
184
+ .sp-tfree-join-community h2 {
185
+ font-size: 2em;
186
+ }
187
+ .sp-tfree-upgrade .sp-tfree-upgrade-sticky-footer h3 {
188
+ margin-top: 17px;
189
+ margin-bottom: 20px;
190
+ }
191
+ .sp-tfree-upgrade .sp-tfree-upgrade-sticky-footer a.button {
192
+ margin: 0 8px;
193
+ }
194
+ .sp-tfree-upgrade .tfree-upgrade-btn {
195
+ display: inline-block;
196
+ padding: 0 20px 0 0;
197
+ }
198
+ .sp-tfree-upgrade .tfree-upgrade-btn a,
199
+ .sp-tfree-upgrade a.tfree-upgrade-btn {
200
+ text-decoration: none;
201
+ text-align: center;
202
+ font-size: 16px;
203
+ }
204
+ .sp-tfree-upgrade .tfree-upgrade-btn a:focus {
205
+ outline: 0;
206
+ }
207
+ .sp-tfree-upgrade a.tfree-upgrade-btn,
208
+ .sp-tfree-upgrade ul li.tfree-upgrade-btn:first-child a {
209
+ background: #52b3d9;
210
+ padding: 0 15px;
211
+ line-height: 46px;
212
+ display: block;
213
+ color: #fff;
214
+ border-radius: 3px;
215
+ font-weight: 500;
216
+ }
217
+ .sp-tfree-upgrade ul li.tfree-upgrade-btn:last-child a {
218
+ text-decoration: underline;
219
+ }
220
+ .sp-tfree-upgrade ul li.tfree-upgrade-btn a i {
221
+ margin-left: 4px;
222
+ }
223
+ .sp-tfree-upgrade ul li.tfree-upgrade-btn:last-child a i {
224
+ font-size: 14px;
225
+ }
226
+ .sp-tfree-upgrade a.tfree-upgrade-btn {
227
+ display: inline-block;
228
+ }
229
+
230
+ /* Review notice */
231
+ #sp-tfree-review-notice {
232
+ padding:15px 15px 15px 0;
233
+ background-color:#fff;
234
+ border-radius:3px;
235
+ margin:20px 20px 0 0;
236
+ }
237
+ #sp-tfree-review-notice .sp-tfree-plugin-icon {
238
+ width:125px;
239
+ float:left;
240
+ line-height:90px;
241
+ text-align:center;
242
+ }
243
+ #sp-tfree-review-notice .sp-tfree-plugin-icon img {
244
+ max-width:83px;
245
+ vertical-align:middle;
246
+ }
247
+ #sp-tfree-review-notice .sp-tfree-notice-text {
248
+ overflow:hidden;
249
+ }
250
+ #sp-tfree-review-notice .sp-tfree-notice-text h3 {
251
+ font-size:24px;
252
+ margin:0 0 5px;
253
+ font-weight:400;
254
+ line-height:1;
255
+ }
256
+ #sp-tfree-review-notice .sp-tfree-notice-text p {
257
+ margin:10px 0 10px 0;
258
+ font-size:13px;
259
+ }
260
+ #sp-tfree-review-notice .sp-tfree-notice-text p.sp-tfree-review-actions {
261
+ margin:10px 0 2px 0;
262
+ }
263
+ #sp-tfree-review-notice .sp-tfree-notice-text .sp-tfree-review-actions a {
264
+ text-decoration:none;
265
+ margin-right:8px;
266
+ color:#63a37b;
267
+ display:inline-block;
268
+ position:relative;
269
+ }
270
+ #sp-tfree-review-notice .sp-tfree-notice-text .sp-tfree-review-actions a span {
271
+ padding-right:2px;
272
+ }
273
+ #sp-tfree-review-notice .sp-tfree-notice-text .sp-tfree-review-actions a.button {
274
+ color:#fff;
275
+ }
276
+
277
  /* Responsive CSS */
278
  @media (max-width: 960px) {
279
  div.sp-tfree-help .sp-tfree-upgrade-sticky-footer {
admin/assets/css/admin.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .sp-tfree-text-center{text-align:center}div.sp-tfree-help .wp-badge{border:none;background:url(../images/icon-256.png) right no-repeat;background-size:110px 110px;box-shadow:none;height:auto}.about-wrap.sp-tfree-help [class$="-col"]{display:flex;justify-content:space-between;flex-wrap:wrap}.about-wrap [class$="-col"]{display:flex;justify-content:space-between;flex-wrap:wrap}.sp-tfree-help [class$="-col"] .col{flex:1;align-self:flex-start}.sp-tfree-help .col{margin-top:40px}.sp-tfree-help.about-wrap [class$="-col"] .col+.col{margin-left:0}.sp-tfree-help.about-wrap .help-section[class$="-col"] .col+.col{margin-left:20px}div.sp-tfree-help .headline-feature.feature-video{position:relative;margin:40px 0;padding-bottom:56.25%;width:100%;max-width:100%;height:0;text-align:center}div.sp-tfree-help .headline-feature.feature-video iframe{position:absolute;top:0;left:0;width:100%;height:100%}div.sp-tfree-help .feature-section .sp-tfree-feature{background-color:#fff;padding:20px 20px;border:1px solid #ddd}div.sp-tfree-help .feature-section .sp-tfree-feature h3{font-size:16px;margin-top:18px}div.sp-tfree-help .feature-section i.sp-tfree-font-icon{font-size:30px;display:block;color:#52b3d9}div.sp-tfree-help .sp-tfree-pro-features .feature-section span.dashicons{font-size:22px;color:#fff;background-color:#52b3d9;width:28px;height:28px;line-height:28px;border-radius:50%;margin-right:10px}div.sp-tfree-help .sp-tfree-pro-features .feature-section{margin-bottom:40px;margin-left:-2%}div.sp-tfree-help .sp-tfree-pro-features .feature-section .sp-tfree-feature h3{margin-top:0}div.sp-tfree-help .sp-tfree-pro-features .feature-section .sp-tfree-feature p{margin-bottom:0}div.sp-tfree-help .sp-tfree-pro-features .feature-section .sp-tfree-feature{box-shadow:0 0 10px 0 #ddd;margin:4px;border:0 solid}div.sp-tfree-help .sp-tfree-pro-features .feature-section.three-col .col{min-width:31.3%;max-width:31.3%;margin-top:20px;padding-left:2%}div.sp-tfree-help .sp-tfree-pro-features .sp-tfree-pro-subtitle{font-size:1.2em;margin-bottom:26px}div.sp-tfree-help .sp-tfree-upgrade-sticky-footer{position:fixed;bottom:0;background:#fff;width:calc(100% - 195px);z-index:9;margin-left:-25px;text-align:center;border:1px solid #dfdfdf;padding:15px 0;border-bottom:none}div.sp-tfree-help .sp-tfree-pro-features h2{font-size:2.5em;font-weight:400}div.sp-tfree-help .sp-tfree-upgrade-sticky-footer h3{margin-top:17px;margin-bottom:20px}div.sp-tfree-help .sp-tfree-upgrade-sticky-footer a.button{margin:0 8px}.sp-tfree-upgrade>h1{font-size:2.5em;color:#444;font-weight:300}.sp-tfree-upgrade>h1 span{font-weight:400}.sp-tfree-upgrade .about-text{margin-bottom:0}.sp-tfree-upgrade ul{margin-top:0}.about-wrap.sp-tfree-upgrade .about-text{min-height:60px}.about-wrap.sp-tfree-upgrade hr{order:0;height:0;margin:0;border-top:1px solid rgba(0,0,0,.1)}.sp-tfree-upgrade .sp-tfree-pro-features .feature-section{margin-bottom:40px;display:flex;flex-wrap:wrap}.sp-tfree-upgrade .sp-tfree-pro-features .feature-section .sp-tfree-feature h3{margin-top:0}.sp-tfree-upgrade .sp-tfree-pro-features .feature-section .sp-tfree-feature p{margin-bottom:0}.sp-tfree-upgrade .sp-tfree-pro-features .feature-section .sp-tfree-feature{box-shadow:0 0 10px 0 #ddd;margin:4px;border:0 solid}.sp-tfree-upgrade .sp-tfree-pro-features .feature-section.three-col .col{min-width:32%;max-width:32%;margin-top:20px;display:flex;align-self:auto}.sp-tfree-upgrade .sp-tfree-pro-features .sp-tfree-pro-subtitle{font-size:1.2em;margin-bottom:26px}.sp-tfree-upgrade .sp-tfree-pro-features h2,.sp-tfree-upgrade .sp-tfree-promo-video-title{font-size:2.2em;font-weight:400}.sp-tfree-join-community h2{font-size:2em}.sp-tfree-upgrade .sp-tfree-upgrade-sticky-footer h3{margin-top:17px;margin-bottom:20px}.sp-tfree-upgrade .sp-tfree-upgrade-sticky-footer a.button{margin:0 8px}.sp-tfree-upgrade .tfree-upgrade-btn{display:inline-block;padding:0 20px 0 0}.sp-tfree-upgrade .tfree-upgrade-btn a,.sp-tfree-upgrade a.tfree-upgrade-btn{text-decoration:none;text-align:center;font-size:16px}.sp-tfree-upgrade .tfree-upgrade-btn a:focus{outline:0}.sp-tfree-upgrade a.tfree-upgrade-btn,.sp-tfree-upgrade ul li.tfree-upgrade-btn:first-child a{background:#52b3d9;padding:0 15px;line-height:46px;display:block;color:#fff;border-radius:3px;font-weight:500}.sp-tfree-upgrade ul li.tfree-upgrade-btn:last-child a{text-decoration:underline}.sp-tfree-upgrade ul li.tfree-upgrade-btn a i{margin-left:4px}.sp-tfree-upgrade ul li.tfree-upgrade-btn:last-child a i{font-size:14px}.sp-tfree-upgrade a.tfree-upgrade-btn{display:inline-block}#sp-tfree-review-notice{padding:15px 15px 15px 0;background-color:#fff;border-radius:3px;margin:20px 20px 0 0}#sp-tfree-review-notice .sp-tfree-plugin-icon{width:125px;float:left;line-height:90px;text-align:center}#sp-tfree-review-notice .sp-tfree-plugin-icon img{max-width:83px;vertical-align:middle}#sp-tfree-review-notice .sp-tfree-notice-text{overflow:hidden}#sp-tfree-review-notice .sp-tfree-notice-text h3{font-size:24px;margin:0 0 5px;font-weight:400;line-height:1}#sp-tfree-review-notice .sp-tfree-notice-text p{margin:10px 0 10px 0;font-size:13px}#sp-tfree-review-notice .sp-tfree-notice-text p.sp-tfree-review-actions{margin:10px 0 2px 0}#sp-tfree-review-notice .sp-tfree-notice-text .sp-tfree-review-actions a{text-decoration:none;margin-right:8px;color:#63a37b;display:inline-block;position:relative}#sp-tfree-review-notice .sp-tfree-notice-text .sp-tfree-review-actions a span{padding-right:2px}#sp-tfree-review-notice .sp-tfree-notice-text .sp-tfree-review-actions a.button{color:#fff}@media (max-width:960px){div.sp-tfree-help .sp-tfree-upgrade-sticky-footer{width:calc(100%)}}@media screen and (max-width:782px){div.sp-tfree-help .three-col .col{min-width:48%!important;max-width:48%!important;margin-left:0!important}}@media (max-width:500px){div.sp-tfree-help .wp-badge{background-position-x:center}div.sp-tfree-help .three-col .col{min-width:100%!important;max-width:100%!important;margin-top:1em}}
admin/assets/css/chosen.css DELETED
@@ -1,448 +0,0 @@
1
- /*!
2
- Chosen, a Select Box Enhancer for jQuery and Prototype
3
- by Patrick Filler for Harvest, http://getharvest.com
4
-
5
- Version 1.6.2
6
- Full source at https://github.com/harvesthq/chosen
7
- Copyright (c) 2011-2016 Harvest http://getharvest.com
8
-
9
- MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
- This file is generated by `grunt build`, do not edit it by hand.
11
- */
12
-
13
- /* @group Base */
14
- .chosen-container {
15
- position: relative;
16
- display: inline-block;
17
- vertical-align: middle;
18
- font-size: 13px;
19
- -webkit-user-select: none;
20
- -moz-user-select: none;
21
- user-select: none;
22
- }
23
- .chosen-container * {
24
- -webkit-box-sizing: border-box;
25
- -moz-box-sizing: border-box;
26
- box-sizing: border-box;
27
- }
28
- .chosen-container .chosen-drop {
29
- position: absolute;
30
- top: 100%;
31
- left: -9999px;
32
- z-index: 1010;
33
- width: 100%;
34
- border: 1px solid #aaa;
35
- border-top: 0;
36
- background: #fff;
37
- box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
38
- }
39
- .chosen-container.chosen-with-drop .chosen-drop {
40
- left: 0;
41
- }
42
- .chosen-container a {
43
- cursor: pointer;
44
- }
45
- .chosen-container .search-choice .group-name, .chosen-container .chosen-single .group-name {
46
- margin-right: 4px;
47
- overflow: hidden;
48
- white-space: nowrap;
49
- text-overflow: ellipsis;
50
- font-weight: normal;
51
- color: #999999;
52
- }
53
- .chosen-container .search-choice .group-name:after, .chosen-container .chosen-single .group-name:after {
54
- content: ":";
55
- padding-left: 2px;
56
- vertical-align: top;
57
- }
58
-
59
- /* @end */
60
- /* @group Single Chosen */
61
- .chosen-container-single .chosen-single {
62
- position: relative;
63
- display: block;
64
- overflow: hidden;
65
- padding: 0 0 0 8px;
66
- height: 25px;
67
- border: 1px solid #aaa;
68
- border-radius: 5px;
69
- background-color: #fff;
70
- background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4));
71
- background: -webkit-linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
72
- background: -moz-linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
73
- background: -o-linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
74
- background: linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
75
- background-clip: padding-box;
76
- box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1);
77
- color: #444;
78
- text-decoration: none;
79
- white-space: nowrap;
80
- line-height: 24px;
81
- }
82
- .chosen-container-single .chosen-default {
83
- color: #999;
84
- }
85
- .chosen-container-single .chosen-single span {
86
- display: block;
87
- overflow: hidden;
88
- margin-right: 26px;
89
- text-overflow: ellipsis;
90
- white-space: nowrap;
91
- }
92
- .chosen-container-single .chosen-single-with-deselect span {
93
- margin-right: 38px;
94
- }
95
- .chosen-container-single .chosen-single abbr {
96
- position: absolute;
97
- top: 6px;
98
- right: 26px;
99
- display: block;
100
- width: 12px;
101
- height: 12px;
102
- background: url('../images/chosen-sprite.png') -42px 1px no-repeat;
103
- font-size: 1px;
104
- }
105
- .chosen-container-single .chosen-single abbr:hover {
106
- background-position: -42px -10px;
107
- }
108
- .chosen-container-single.chosen-disabled .chosen-single abbr:hover {
109
- background-position: -42px -10px;
110
- }
111
- .chosen-container-single .chosen-single div {
112
- position: absolute;
113
- top: 0;
114
- right: 0;
115
- display: block;
116
- width: 18px;
117
- height: 100%;
118
- }
119
- .chosen-container-single .chosen-single div b {
120
- display: block;
121
- width: 100%;
122
- height: 100%;
123
- background: url('../images/chosen-sprite.png') no-repeat 0px 2px;
124
- }
125
- .chosen-container-single .chosen-search {
126
- position: relative;
127
- z-index: 1010;
128
- margin: 0;
129
- padding: 3px 4px;
130
- white-space: nowrap;
131
- }
132
- .chosen-container-single .chosen-search input[type="text"] {
133
- margin: 1px 0;
134
- padding: 4px 20px 4px 5px;
135
- width: 100%;
136
- height: auto;
137
- outline: 0;
138
- border: 1px solid #aaa;
139
- background: white url('../images/chosen-sprite.png') no-repeat 100% -20px;
140
- background: url('../images/chosen-sprite.png') no-repeat 100% -20px;
141
- font-size: 1em;
142
- font-family: sans-serif;
143
- line-height: normal;
144
- border-radius: 0;
145
- }
146
- .chosen-container-single .chosen-drop {
147
- margin-top: -1px;
148
- border-radius: 0 0 4px 4px;
149
- background-clip: padding-box;
150
- }
151
- .chosen-container-single.chosen-container-single-nosearch .chosen-search {
152
- position: absolute;
153
- left: -9999px;
154
- }
155
-
156
- /* @end */
157
- /* @group Results */
158
- .chosen-container .chosen-results {
159
- color: #444;
160
- position: relative;
161
- overflow-x: hidden;
162
- overflow-y: auto;
163
- margin: 0 4px 4px 0;
164
- padding: 0 0 0 4px;
165
- max-height: 240px;
166
- -webkit-overflow-scrolling: touch;
167
- }
168
- .chosen-container .chosen-results li {
169
- display: none;
170
- margin: 0;
171
- padding: 5px 6px;
172
- list-style: none;
173
- line-height: 15px;
174
- word-wrap: break-word;
175
- -webkit-touch-callout: none;
176
- }
177
- .chosen-container .chosen-results li.active-result {
178
- display: list-item;
179
- cursor: pointer;
180
- }
181
- .chosen-container .chosen-results li.disabled-result {
182
- display: list-item;
183
- color: #ccc;
184
- cursor: default;
185
- }
186
- .chosen-container .chosen-results li.highlighted {
187
- background-color: #3875d7;
188
- background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
189
- background-image: -webkit-linear-gradient(#3875d7 20%, #2a62bc 90%);
190
- background-image: -moz-linear-gradient(#3875d7 20%, #2a62bc 90%);
191
- background-image: -o-linear-gradient(#3875d7 20%, #2a62bc 90%);
192
- background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
193
- color: #fff;
194
- }
195
- .chosen-container .chosen-results li.no-results {
196
- color: #777;
197
- display: list-item;
198
- background: #f4f4f4;
199
- }
200
- .chosen-container .chosen-results li.group-result {
201
- display: list-item;
202
- font-weight: bold;
203
- cursor: default;
204
- }
205
- .chosen-container .chosen-results li.group-option {
206
- padding-left: 15px;
207
- }
208
- .chosen-container .chosen-results li em {
209
- font-style: normal;
210
- text-decoration: underline;
211
- }
212
-
213
- /* @end */
214
- /* @group Multi Chosen */
215
- .chosen-container-multi .chosen-choices {
216
- position: relative;
217
- overflow: hidden;
218
- margin: 0;
219
- padding: 0 5px;
220
- width: 100%;
221
- height: auto;
222
- border: 1px solid #aaa;
223
- background-color: #fff;
224
- background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
225
- background-image: -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%);
226
- background-image: -moz-linear-gradient(#eeeeee 1%, #ffffff 15%);
227
- background-image: -o-linear-gradient(#eeeeee 1%, #ffffff 15%);
228
- background-image: linear-gradient(#eeeeee 1%, #ffffff 15%);
229
- cursor: text;
230
- }
231
- .chosen-container-multi .chosen-choices li {
232
- float: left;
233
- list-style: none;
234
- }
235
- .chosen-container-multi .chosen-choices li.search-field {
236
- margin: 0;
237
- padding: 0;
238
- white-space: nowrap;
239
- }
240
- .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
241
- margin: 1px 0;
242
- padding: 0;
243
- height: 25px;
244
- outline: 0;
245
- border: 0 !important;
246
- background: transparent !important;
247
- box-shadow: none;
248
- color: #999;
249
- font-size: 100%;
250
- font-family: sans-serif;
251
- line-height: normal;
252
- border-radius: 0;
253
- }
254
- .chosen-container-multi .chosen-choices li.search-choice {
255
- position: relative;
256
- margin: 3px 5px 3px 0;
257
- padding: 3px 20px 3px 5px;
258
- border: 1px solid #aaa;
259
- max-width: 100%;
260
- border-radius: 3px;
261
- background-color: #eeeeee;
262
- background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
263
- background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
264
- background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
265
- background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
266
- background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
267
- background-size: 100% 19px;
268
- background-repeat: repeat-x;
269
- background-clip: padding-box;
270
- box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05);
271
- color: #333;
272
- line-height: 13px;
273
- cursor: default;
274
- }
275
- .chosen-container-multi .chosen-choices li.search-choice span {
276
- word-wrap: break-word;
277
- }
278
- .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
279
- position: absolute;
280
- top: 4px;
281
- right: 3px;
282
- display: block;
283
- width: 12px;
284
- height: 12px;
285
- background: url('../images/chosen-sprite.png') -42px 1px no-repeat;
286
- font-size: 1px;
287
- }
288
- .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
289
- background-position: -42px -10px;
290
- }
291
- .chosen-container-multi .chosen-choices li.search-choice-disabled {
292
- padding-right: 5px;
293
- border: 1px solid #ccc;
294
- background-color: #e4e4e4;
295
- background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
296
- background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
297
- background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
298
- background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
299
- background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
300
- color: #666;
301
- }
302
- .chosen-container-multi .chosen-choices li.search-choice-focus {
303
- background: #d4d4d4;
304
- }
305
- .chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
306
- background-position: -42px -10px;
307
- }
308
- .chosen-container-multi .chosen-results {
309
- margin: 0;
310
- padding: 0;
311
- }
312
- .chosen-container-multi .chosen-drop .result-selected {
313
- display: list-item;
314
- color: #ccc;
315
- cursor: default;
316
- display: none;
317
- }
318
-
319
- /* @end */
320
- /* @group Active */
321
- .chosen-container-active .chosen-single {
322
- border: 1px solid #5897fb;
323
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
324
- }
325
- .chosen-container-active.chosen-with-drop .chosen-single {
326
- border: 1px solid #aaa;
327
- -moz-border-radius-bottomright: 0;
328
- border-bottom-right-radius: 0;
329
- -moz-border-radius-bottomleft: 0;
330
- border-bottom-left-radius: 0;
331
- background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff));
332
- background-image: -webkit-linear-gradient(#eeeeee 20%, #ffffff 80%);
333
- background-image: -moz-linear-gradient(#eeeeee 20%, #ffffff 80%);
334
- background-image: -o-linear-gradient(#eeeeee 20%, #ffffff 80%);
335
- background-image: linear-gradient(#eeeeee 20%, #ffffff 80%);
336
- box-shadow: 0 1px 0 #fff inset;
337
- }
338
- .chosen-container-active.chosen-with-drop .chosen-single div {
339
- border-left: none;
340
- background: transparent;
341
- }
342
- .chosen-container-active.chosen-with-drop .chosen-single div b {
343
- background-position: -18px 2px;
344
- }
345
- .chosen-container-active .chosen-choices {
346
- border: 1px solid #5897fb;
347
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
348
- }
349
- .chosen-container-active .chosen-choices li.search-field input[type="text"] {
350
- color: #222 !important;
351
- }
352
-
353
- /* @end */
354
- /* @group Disabled Support */
355
- .chosen-disabled {
356
- opacity: 0.5 !important;
357
- cursor: default;
358
- }
359
- .chosen-disabled .chosen-single {
360
- cursor: default;
361
- }
362
- .chosen-disabled .chosen-choices .search-choice .search-choice-close {
363
- cursor: default;
364
- }
365
-
366
- /* @end */
367
- /* @group Right to Left */
368
- .chosen-rtl {
369
- text-align: right;
370
- }
371
- .chosen-rtl .chosen-single {
372
- overflow: visible;
373
- padding: 0 8px 0 0;
374
- }
375
- .chosen-rtl .chosen-single span {
376
- margin-right: 0;
377
- margin-left: 26px;
378
- direction: rtl;
379
- }
380
- .chosen-rtl .chosen-single-with-deselect span {
381
- margin-left: 38px;
382
- }
383
- .chosen-rtl .chosen-single div {
384
- right: auto;
385
- left: 3px;
386
- }
387
- .chosen-rtl .chosen-single abbr {
388
- right: auto;
389
- left: 26px;
390
- }
391
- .chosen-rtl .chosen-choices li {
392
- float: right;
393
- }
394
- .chosen-rtl .chosen-choices li.search-field input[type="text"] {
395
- direction: rtl;
396
- }
397
- .chosen-rtl .chosen-choices li.search-choice {
398
- margin: 3px 5px 3px 0;
399
- padding: 3px 5px 3px 19px;
400
- }
401
- .chosen-rtl .chosen-choices li.search-choice .search-choice-close {
402
- right: auto;
403
- left: 4px;
404
- }
405
- .chosen-rtl.chosen-container-single-nosearch .chosen-search,
406
- .chosen-rtl .chosen-drop {
407
- left: 9999px;
408
- }
409
- .chosen-rtl.chosen-container-single .chosen-results {
410
- margin: 0 0 4px 4px;
411
- padding: 0 4px 0 0;
412
- }
413
- .chosen-rtl .chosen-results li.group-option {
414
- padding-right: 15px;
415
- padding-left: 0;
416
- }
417
- .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
418
- border-right: none;
419
- }
420
- .chosen-rtl .chosen-search input[type="text"] {
421
- padding: 4px 5px 4px 20px;
422
- background: white url('../images/chosen-sprite.png') no-repeat -30px -20px;
423
- background: url('../images/chosen-sprite.png') no-repeat -30px -20px;
424
- direction: rtl;
425
- }
426
- .chosen-rtl.chosen-container-single .chosen-single div b {
427
- background-position: 6px 2px;
428
- }
429
- .chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
430
- background-position: -12px 2px;
431
- }
432
-
433
- /* @end */
434
- /* @group Retina compatibility */
435
- @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx) {
436
- .chosen-rtl .chosen-search input[type="text"],
437
- .chosen-container-single .chosen-single abbr,
438
- .chosen-container-single .chosen-single div b,
439
- .chosen-container-single .chosen-search input[type="text"],
440
- .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
441
- .chosen-container .chosen-results-scroll-down span,
442
- .chosen-container .chosen-results-scroll-up span {
443
- background-image: url('../images/chosen-sprite@2x.png') !important;
444
- background-size: 52px 37px !important;
445
- background-repeat: no-repeat !important;
446
- }
447
- }
448
- /* @end */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/assets/images/chosen-sprite.png DELETED
Binary file
admin/assets/images/chosen-sprite@2x.png CHANGED
File without changes
admin/assets/images/icon-256.png ADDED
Binary file
admin/assets/images/logo.png DELETED
Binary file
admin/assets/images/nav-1.png DELETED
Binary file
admin/assets/images/nav-10.png DELETED
Binary file
admin/assets/images/nav-11.png DELETED
Binary file
admin/assets/images/nav-12.png DELETED
Binary file
admin/assets/images/nav-13.png DELETED
Binary file
admin/assets/images/nav-2.png DELETED
Binary file
admin/assets/images/nav-3.png DELETED
Binary file
admin/assets/images/nav-4.png DELETED
Binary file
admin/assets/images/nav-5.png DELETED
Binary file
admin/assets/images/nav-6.png DELETED
Binary file
admin/assets/images/nav-7.png DELETED
Binary file
admin/assets/images/nav-8.png DELETED
Binary file
admin/assets/images/nav-9.png DELETED
Binary file
admin/assets/images/sp-icon.png DELETED
Binary file
admin/assets/images/testimonial-logo.png ADDED
Binary file
admin/assets/images/tiny-mce.png DELETED
Binary file
admin/assets/js/admin-meta.js DELETED
@@ -1,32 +0,0 @@
1
- /**
2
- * Tab navigation for shortcode generator
3
- */
4
- (function ($) {
5
- 'use strict';
6
-
7
- $(document).ready(function(){
8
-
9
- $('div.sp-tfree-mbf-nav a').click(function(){
10
- var tab_id = $(this).attr('data-tab');
11
-
12
- $('.sp-tfree-mbf-nav a').removeClass('nav-tab-active');
13
- $('.sp-tfree-mbf-tab-content').removeClass('nav-tab-active');
14
-
15
- $(this).addClass('nav-tab-active');
16
- $("#"+tab_id).addClass('nav-tab-active');
17
- })
18
-
19
- });
20
-
21
- // Initializing WP Color Picker
22
- $('.sp-tfree-color-picker').each(function(){
23
- $(this).wpColorPicker();
24
- });
25
-
26
- $('.sp-tfree-select').chosen({
27
- width: '100%',
28
- allow_single_deselect: true,
29
- "disable_search": true
30
- });
31
-
32
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/assets/js/chosen.js DELETED
@@ -1,1269 +0,0 @@
1
- /*!
2
- Chosen, a Select Box Enhancer for jQuery and Prototype
3
- by Patrick Filler for Harvest, http://getharvest.com
4
-
5
- Version 1.6.2
6
- Full source at https://github.com/harvesthq/chosen
7
- Copyright (c) 2011-2016 Harvest http://getharvest.com
8
-
9
- MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
- This file is generated by `grunt build`, do not edit it by hand.
11
- */
12
-
13
- (function() {
14
- var $, AbstractChosen, Chosen, SelectParser, _ref,
15
- __hasProp = {}.hasOwnProperty,
16
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
17
-
18
- SelectParser = (function() {
19
- function SelectParser() {
20
- this.options_index = 0;
21
- this.parsed = [];
22
- }
23
-
24
- SelectParser.prototype.add_node = function(child) {
25
- if (child.nodeName.toUpperCase() === "OPTGROUP") {
26
- return this.add_group(child);
27
- } else {
28
- return this.add_option(child);
29
- }
30
- };
31
-
32
- SelectParser.prototype.add_group = function(group) {
33
- var group_position, option, _i, _len, _ref, _results;
34
- group_position = this.parsed.length;
35
- this.parsed.push({
36
- array_index: group_position,
37
- group: true,
38
- label: this.escapeExpression(group.label),
39
- title: group.title ? group.title : void 0,
40
- children: 0,
41
- disabled: group.disabled,
42
- classes: group.className
43
- });
44
- _ref = group.childNodes;
45
- _results = [];
46
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
47
- option = _ref[_i];
48
- _results.push(this.add_option(option, group_position, group.disabled));
49
- }
50
- return _results;
51
- };
52
-
53
- SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
54
- if (option.nodeName.toUpperCase() === "OPTION") {
55
- if (option.text !== "") {
56
- if (group_position != null) {
57
- this.parsed[group_position].children += 1;
58
- }
59
- this.parsed.push({
60
- array_index: this.parsed.length,
61
- options_index: this.options_index,
62
- value: option.value,
63
- text: option.text,
64
- html: option.innerHTML,
65
- title: option.title ? option.title : void 0,
66
- selected: option.selected,
67
- disabled: group_disabled === true ? group_disabled : option.disabled,
68
- group_array_index: group_position,
69
- group_label: group_position != null ? this.parsed[group_position].label : null,
70
- classes: option.className,
71
- style: option.style.cssText
72
- });
73
- } else {
74
- this.parsed.push({
75
- array_index: this.parsed.length,
76
- options_index: this.options_index,
77
- empty: true
78
- });
79
- }
80
- return this.options_index += 1;
81
- }
82
- };
83
-
84
- SelectParser.prototype.escapeExpression = function(text) {
85
- var map, unsafe_chars;
86
- if ((text == null) || text === false) {
87
- return "";
88
- }
89
- if (!/[\&\<\>\"\'\`]/.test(text)) {
90
- return text;
91
- }
92
- map = {
93
- "<": "&lt;",
94
- ">": "&gt;",
95
- '"': "&quot;",
96
- "'": "&#x27;",
97
- "`": "&#x60;"
98
- };
99
- unsafe_chars = /&(?!\w+;)|[\<\>\"\'\`]/g;
100
- return text.replace(unsafe_chars, function(chr) {
101
- return map[chr] || "&amp;";
102
- });
103
- };
104
-
105
- return SelectParser;
106
-
107
- })();
108
-
109
- SelectParser.select_to_array = function(select) {
110
- var child, parser, _i, _len, _ref;
111
- parser = new SelectParser();
112
- _ref = select.childNodes;
113
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
114
- child = _ref[_i];
115
- parser.add_node(child);
116
- }
117
- return parser.parsed;
118
- };
119
-
120
- AbstractChosen = (function() {
121
- function AbstractChosen(form_field, options) {
122
- this.form_field = form_field;
123
- this.options = options != null ? options : {};
124
- if (!AbstractChosen.browser_is_supported()) {
125
- return;
126
- }
127
- this.is_multiple = this.form_field.multiple;
128
- this.set_default_text();
129
- this.set_default_values();
130
- this.setup();
131
- this.set_up_html();
132
- this.register_observers();
133
- this.on_ready();
134
- }
135
-
136
- AbstractChosen.prototype.set_default_values = function() {
137
- var _this = this;
138
- this.click_test_action = function(evt) {
139
- return _this.test_active_click(evt);
140
- };
141
- this.activate_action = function(evt) {
142
- return _this.activate_field(evt);
143
- };
144
- this.active_field = false;
145
- this.mouse_on_container = false;
146
- this.results_showing = false;
147
- this.result_highlighted = null;
148
- this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
149
- this.disable_search_threshold = this.options.disable_search_threshold || 0;
150
- this.disable_search = this.options.disable_search || false;
151
- this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
152
- this.group_search = this.options.group_search != null ? this.options.group_search : true;
153
- this.search_contains = this.options.search_contains || false;
154
- this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
155
- this.max_selected_options = this.options.max_selected_options || Infinity;
156
- this.inherit_select_classes = this.options.inherit_select_classes || false;
157
- this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
158
- this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
159
- this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;
160
- this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;
161
- return this.case_sensitive_search = this.options.case_sensitive_search || false;
162
- };
163
-
164
- AbstractChosen.prototype.set_default_text = function() {
165
- if (this.form_field.getAttribute("data-placeholder")) {
166
- this.default_text = this.form_field.getAttribute("data-placeholder");
167
- } else if (this.is_multiple) {
168
- this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
169
- } else {
170
- this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
171
- }
172
- return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
173
- };
174
-
175
- AbstractChosen.prototype.choice_label = function(item) {
176
- if (this.include_group_label_in_selected && (item.group_label != null)) {
177
- return "<b class='group-name'>" + item.group_label + "</b>" + item.html;
178
- } else {
179
- return item.html;
180
- }
181
- };
182
-
183
- AbstractChosen.prototype.mouse_enter = function() {
184
- return this.mouse_on_container = true;
185
- };
186
-
187
- AbstractChosen.prototype.mouse_leave = function() {
188
- return this.mouse_on_container = false;
189
- };
190
-
191
- AbstractChosen.prototype.input_focus = function(evt) {
192
- var _this = this;
193
- if (this.is_multiple) {
194
- if (!this.active_field) {
195
- return setTimeout((function() {
196
- return _this.container_mousedown();
197
- }), 50);
198
- }
199
- } else {
200
- if (!this.active_field) {
201
- return this.activate_field();
202
- }
203
- }
204
- };
205
-
206
- AbstractChosen.prototype.input_blur = function(evt) {
207
- var _this = this;
208
- if (!this.mouse_on_container) {
209
- this.active_field = false;
210
- return setTimeout((function() {
211
- return _this.blur_test();
212
- }), 100);
213
- }
214
- };
215
-
216
- AbstractChosen.prototype.results_option_build = function(options) {
217
- var content, data, data_content, shown_results, _i, _len, _ref;
218
- content = '';
219
- shown_results = 0;
220
- _ref = this.results_data;
221
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
222
- data = _ref[_i];
223
- data_content = '';
224
- if (data.group) {
225
- data_content = this.result_add_group(data);
226
- } else {
227
- data_content = this.result_add_option(data);
228
- }
229
- if (data_content !== '') {
230
- shown_results++;
231
- content += data_content;
232
- }
233
- if (options != null ? options.first : void 0) {
234
- if (data.selected && this.is_multiple) {
235
- this.choice_build(data);
236
- } else if (data.selected && !this.is_multiple) {
237
- this.single_set_selected_text(this.choice_label(data));
238
- }
239
- }
240
- if (shown_results >= this.max_shown_results) {
241
- break;
242
- }
243
- }
244
- return content;
245
- };
246
-
247
- AbstractChosen.prototype.result_add_option = function(option) {
248
- var classes, option_el;
249
- if (!option.search_match) {
250
- return '';
251
- }
252
- if (!this.include_option_in_results(option)) {
253
- return '';
254
- }
255
- classes = [];
256
- if (!option.disabled && !(option.selected && this.is_multiple)) {
257
- classes.push("active-result");
258
- }
259
- if (option.disabled && !(option.selected && this.is_multiple)) {
260
- classes.push("disabled-result");
261
- }
262
- if (option.selected) {
263
- classes.push("result-selected");
264
- }
265
- if (option.group_array_index != null) {
266
- classes.push("group-option");
267
- }
268
- if (option.classes !== "") {
269
- classes.push(option.classes);
270
- }
271
- option_el = document.createElement("li");
272
- option_el.className = classes.join(" ");
273
- option_el.style.cssText = option.style;
274
- option_el.setAttribute("data-option-array-index", option.array_index);
275
- option_el.innerHTML = option.search_text;
276
- if (option.title) {
277
- option_el.title = option.title;
278
- }
279
- return this.outerHTML(option_el);
280
- };
281
-
282
- AbstractChosen.prototype.result_add_group = function(group) {
283
- var classes, group_el;
284
- if (!(group.search_match || group.group_match)) {
285
- return '';
286
- }
287
- if (!(group.active_options > 0)) {
288
- return '';
289
- }
290
- classes = [];
291
- classes.push("group-result");
292
- if (group.classes) {
293
- classes.push(group.classes);
294
- }
295
- group_el = document.createElement("li");
296
- group_el.className = classes.join(" ");
297
- group_el.innerHTML = group.search_text;
298
- if (group.title) {
299
- group_el.title = group.title;
300
- }
301
- return this.outerHTML(group_el);
302
- };
303
-
304
- AbstractChosen.prototype.results_update_field = function() {
305
- this.set_default_text();
306
- if (!this.is_multiple) {
307
- this.results_reset_cleanup();
308
- }
309
- this.result_clear_highlight();
310
- this.results_build();
311
- if (this.results_showing) {
312
- return this.winnow_results();
313
- }
314
- };
315
-
316
- AbstractChosen.prototype.reset_single_select_options = function() {
317
- var result, _i, _len, _ref, _results;
318
- _ref = this.results_data;
319
- _results = [];
320
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
321
- result = _ref[_i];
322
- if (result.selected) {
323
- _results.push(result.selected = false);
324
- } else {
325
- _results.push(void 0);
326
- }
327
- }
328
- return _results;
329
- };
330
-
331
- AbstractChosen.prototype.results_toggle = function() {
332
- if (this.results_showing) {
333
- return this.results_hide();
334
- } else {
335
- return this.results_show();
336
- }
337
- };
338
-
339
- AbstractChosen.prototype.results_search = function(evt) {
340
- if (this.results_showing) {
341
- return this.winnow_results();
342
- } else {
343
- return this.results_show();
344
- }
345
- };
346
-
347
- AbstractChosen.prototype.winnow_results = function() {
348
- var escapedSearchText, option, regex, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
349
- this.no_results_clear();
350
- results = 0;
351
- searchText = this.get_search_text();
352
- escapedSearchText = searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
353
- zregex = new RegExp(escapedSearchText, 'i');
354
- regex = this.get_search_regex(escapedSearchText);
355
- _ref = this.results_data;
356
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
357
- option = _ref[_i];
358
- option.search_match = false;
359
- results_group = null;
360
- if (this.include_option_in_results(option)) {
361
- if (option.group) {
362
- option.group_match = false;
363
- option.active_options = 0;
364
- }
365
- if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
366
- results_group = this.results_data[option.group_array_index];
367
- if (results_group.active_options === 0 && results_group.search_match) {
368
- results += 1;
369
- }
370
- results_group.active_options += 1;
371
- }
372
- option.search_text = option.group ? option.label : option.html;
373
- if (!(option.group && !this.group_search)) {
374
- option.search_match = this.search_string_match(option.search_text, regex);
375
- if (option.search_match && !option.group) {
376
- results += 1;
377
- }
378
- if (option.search_match) {
379
- if (searchText.length) {
380
- startpos = option.search_text.search(zregex);
381
- text = option.search_text.substr(0, startpos + searchText.length) + '</em>' + option.search_text.substr(startpos + searchText.length);
382
- option.search_text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
383
- }
384
- if (results_group != null) {
385
- results_group.group_match = true;
386
- }
387
- } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
388
- option.search_match = true;
389
- }
390
- }
391
- }
392
- }
393
- this.result_clear_highlight();
394
- if (results < 1 && searchText.length) {
395
- this.update_results_content("");
396
- return this.no_results(searchText);
397
- } else {
398
- this.update_results_content(this.results_option_build());
399
- return this.winnow_results_set_highlight();
400
- }
401
- };
402
-
403
- AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
404
- var regex_anchor, regex_flag;
405
- regex_anchor = this.search_contains ? "" : "^";
406
- regex_flag = this.case_sensitive_search ? "" : "i";
407
- return new RegExp(regex_anchor + escaped_search_string, regex_flag);
408
- };
409
-
410
- AbstractChosen.prototype.search_string_match = function(search_string, regex) {
411
- var part, parts, _i, _len;
412
- if (regex.test(search_string)) {
413
- return true;
414
- } else if (this.enable_split_word_search && (search_string.indexOf(" ") >= 0 || search_string.indexOf("[") === 0)) {
415
- parts = search_string.replace(/\[|\]/g, "").split(" ");
416
- if (parts.length) {
417
- for (_i = 0, _len = parts.length; _i < _len; _i++) {
418
- part = parts[_i];
419
- if (regex.test(part)) {
420
- return true;
421
- }
422
- }
423
- }
424
- }
425
- };
426
-
427
- AbstractChosen.prototype.choices_count = function() {
428
- var option, _i, _len, _ref;
429
- if (this.selected_option_count != null) {
430
- return this.selected_option_count;
431
- }
432
- this.selected_option_count = 0;
433
- _ref = this.form_field.options;
434
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
435
- option = _ref[_i];
436
- if (option.selected) {
437
- this.selected_option_count += 1;
438
- }
439
- }
440
- return this.selected_option_count;
441
- };
442
-
443
- AbstractChosen.prototype.choices_click = function(evt) {
444
- evt.preventDefault();
445
- if (!(this.results_showing || this.is_disabled)) {
446
- return this.results_show();
447
- }
448
- };
449
-
450
- AbstractChosen.prototype.keyup_checker = function(evt) {
451
- var stroke, _ref;
452
- stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
453
- this.search_field_scale();
454
- switch (stroke) {
455
- case 8:
456
- if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
457
- return this.keydown_backstroke();
458
- } else if (!this.pending_backstroke) {
459
- this.result_clear_highlight();
460
- return this.results_search();
461
- }
462
- break;
463
- case 13:
464
- evt.preventDefault();
465
- if (this.results_showing) {
466
- return this.result_select(evt);
467
- }
468
- break;
469
- case 27:
470
- if (this.results_showing) {
471
- this.results_hide();
472
- }
473
- return true;
474
- case 9:
475
- case 38:
476
- case 40:
477
- case 16:
478
- case 91:
479
- case 17:
480
- case 18:
481
- break;
482
- default:
483
- return this.results_search();
484
- }
485
- };
486
-
487
- AbstractChosen.prototype.clipboard_event_checker = function(evt) {
488
- var _this = this;
489
- return setTimeout((function() {
490
- return _this.results_search();
491
- }), 50);
492
- };
493
-
494
- AbstractChosen.prototype.container_width = function() {
495
- if (this.options.width != null) {
496
- return this.options.width;
497
- } else {
498
- return "" + this.form_field.offsetWidth + "px";
499
- }
500
- };
501
-
502
- AbstractChosen.prototype.include_option_in_results = function(option) {
503
- if (this.is_multiple && (!this.display_selected_options && option.selected)) {
504
- return false;
505
- }
506
- if (!this.display_disabled_options && option.disabled) {
507
- return false;
508
- }
509
- if (option.empty) {
510
- return false;
511
- }
512
- return true;
513
- };
514
-
515
- AbstractChosen.prototype.search_results_touchstart = function(evt) {
516
- this.touch_started = true;
517
- return this.search_results_mouseover(evt);
518
- };
519
-
520
- AbstractChosen.prototype.search_results_touchmove = function(evt) {
521
- this.touch_started = false;
522
- return this.search_results_mouseout(evt);
523
- };
524
-
525
- AbstractChosen.prototype.search_results_touchend = function(evt) {
526
- if (this.touch_started) {
527
- return this.search_results_mouseup(evt);
528
- }
529
- };
530
-
531
- AbstractChosen.prototype.outerHTML = function(element) {
532
- var tmp;
533
- if (element.outerHTML) {
534
- return element.outerHTML;
535
- }
536
- tmp = document.createElement("div");
537
- tmp.appendChild(element);
538
- return tmp.innerHTML;
539
- };
540
-
541
- AbstractChosen.browser_is_supported = function() {
542
- if ("Microsoft Internet Explorer" === window.navigator.appName) {
543
- return document.documentMode >= 8;
544
- }
545
- if (/iP(od|hone)/i.test(window.navigator.userAgent) || /IEMobile/i.test(window.navigator.userAgent) || /Windows Phone/i.test(window.navigator.userAgent) || /BlackBerry/i.test(window.navigator.userAgent) || /BB10/i.test(window.navigator.userAgent) || /Android.*Mobile/i.test(window.navigator.userAgent)) {
546
- return false;
547
- }
548
- return true;
549
- };
550
-
551
- AbstractChosen.default_multiple_text = "Select Some Options";
552
-
553
- AbstractChosen.default_single_text = "Select an Option";
554
-
555
- AbstractChosen.default_no_result_text = "No results match";
556
-
557
- return AbstractChosen;
558
-
559
- })();
560
-
561
- $ = jQuery;
562
-
563
- $.fn.extend({
564
- chosen: function(options) {
565
- if (!AbstractChosen.browser_is_supported()) {
566
- return this;
567
- }
568
- return this.each(function(input_field) {
569
- var $this, chosen;
570
- $this = $(this);
571
- chosen = $this.data('chosen');
572
- if (options === 'destroy') {
573
- if (chosen instanceof Chosen) {
574
- chosen.destroy();
575
- }
576
- return;
577
- }
578
- if (!(chosen instanceof Chosen)) {
579
- $this.data('chosen', new Chosen(this, options));
580
- }
581
- });
582
- }
583
- });
584
-
585
- Chosen = (function(_super) {
586
- __extends(Chosen, _super);
587
-
588
- function Chosen() {
589
- _ref = Chosen.__super__.constructor.apply(this, arguments);
590
- return _ref;
591
- }
592
-
593
- Chosen.prototype.setup = function() {
594
- this.form_field_jq = $(this.form_field);
595
- this.current_selectedIndex = this.form_field.selectedIndex;
596
- return this.is_rtl = this.form_field_jq.hasClass("chosen-rtl");
597
- };
598
-
599
- Chosen.prototype.set_up_html = function() {
600
- var container_classes, container_props;
601
- container_classes = ["chosen-container"];
602
- container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
603
- if (this.inherit_select_classes && this.form_field.className) {
604
- container_classes.push(this.form_field.className);
605
- }
606
- if (this.is_rtl) {
607
- container_classes.push("chosen-rtl");
608
- }
609
- container_props = {
610
- 'class': container_classes.join(' '),
611
- 'style': "width: " + (this.container_width()) + ";",
612
- 'title': this.form_field.title
613
- };
614
- if (this.form_field.id.length) {
615
- container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
616
- }
617
- this.container = $("<div />", container_props);
618
- if (this.is_multiple) {
619
- this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>');
620
- } else {
621
- this.container.html('<a class="chosen-single chosen-default"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>');
622
- }
623
- this.form_field_jq.hide().after(this.container);
624
- this.dropdown = this.container.find('div.chosen-drop').first();
625
- this.search_field = this.container.find('input').first();
626
- this.search_results = this.container.find('ul.chosen-results').first();
627
- this.search_field_scale();
628
- this.search_no_results = this.container.find('li.no-results').first();
629
- if (this.is_multiple) {
630
- this.search_choices = this.container.find('ul.chosen-choices').first();
631
- this.search_container = this.container.find('li.search-field').first();
632
- } else {
633
- this.search_container = this.container.find('div.chosen-search').first();
634
- this.selected_item = this.container.find('.chosen-single').first();
635
- }
636
- this.results_build();
637
- this.set_tab_index();
638
- return this.set_label_behavior();
639
- };
640
-
641
- Chosen.prototype.on_ready = function() {
642
- return this.form_field_jq.trigger("chosen:ready", {
643
- chosen: this
644
- });
645
- };
646
-
647
- Chosen.prototype.register_observers = function() {
648
- var _this = this;
649
- this.container.bind('touchstart.chosen', function(evt) {
650
- _this.container_mousedown(evt);
651
- return evt.preventDefault();
652
- });
653
- this.container.bind('touchend.chosen', function(evt) {
654
- _this.container_mouseup(evt);
655
- return evt.preventDefault();
656
- });
657
- this.container.bind('mousedown.chosen', function(evt) {
658
- _this.container_mousedown(evt);
659
- });
660
- this.container.bind('mouseup.chosen', function(evt) {
661
- _this.container_mouseup(evt);
662
- });
663
- this.container.bind('mouseenter.chosen', function(evt) {
664
- _this.mouse_enter(evt);
665
- });
666
- this.container.bind('mouseleave.chosen', function(evt) {
667
- _this.mouse_leave(evt);
668
- });
669
- this.search_results.bind('mouseup.chosen', function(evt) {
670
- _this.search_results_mouseup(evt);
671
- });
672
- this.search_results.bind('mouseover.chosen', function(evt) {
673
- _this.search_results_mouseover(evt);
674
- });
675
- this.search_results.bind('mouseout.chosen', function(evt) {
676
- _this.search_results_mouseout(evt);
677
- });
678
- this.search_results.bind('mousewheel.chosen DOMMouseScroll.chosen', function(evt) {
679
- _this.search_results_mousewheel(evt);
680
- });
681
- this.search_results.bind('touchstart.chosen', function(evt) {
682
- _this.search_results_touchstart(evt);
683
- });
684
- this.search_results.bind('touchmove.chosen', function(evt) {
685
- _this.search_results_touchmove(evt);
686
- });
687
- this.search_results.bind('touchend.chosen', function(evt) {
688
- _this.search_results_touchend(evt);
689
- });
690
- this.form_field_jq.bind("chosen:updated.chosen", function(evt) {
691
- _this.results_update_field(evt);
692
- });
693
- this.form_field_jq.bind("chosen:activate.chosen", function(evt) {
694
- _this.activate_field(evt);
695
- });
696
- this.form_field_jq.bind("chosen:open.chosen", function(evt) {
697
- _this.container_mousedown(evt);
698
- });
699
- this.form_field_jq.bind("chosen:close.chosen", function(evt) {
700
- _this.input_blur(evt);
701
- });
702
- this.search_field.bind('blur.chosen', function(evt) {
703
- _this.input_blur(evt);
704
- });
705
- this.search_field.bind('keyup.chosen', function(evt) {
706
- _this.keyup_checker(evt);
707
- });
708
- this.search_field.bind('keydown.chosen', function(evt) {
709
- _this.keydown_checker(evt);
710
- });
711
- this.search_field.bind('focus.chosen', function(evt) {
712
- _this.input_focus(evt);
713
- });
714
- this.search_field.bind('cut.chosen', function(evt) {
715
- _this.clipboard_event_checker(evt);
716
- });
717
- this.search_field.bind('paste.chosen', function(evt) {
718
- _this.clipboard_event_checker(evt);
719
- });
720
- if (this.is_multiple) {
721
- return this.search_choices.bind('click.chosen', function(evt) {
722
- _this.choices_click(evt);
723
- });
724
- } else {
725
- return this.container.bind('click.chosen', function(evt) {
726
- evt.preventDefault();
727
- });
728
- }
729
- };
730
-
731
- Chosen.prototype.destroy = function() {
732
- $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
733
- if (this.search_field[0].tabIndex) {
734
- this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
735
- }
736
- this.container.remove();
737
- this.form_field_jq.removeData('chosen');
738
- return this.form_field_jq.show();
739
- };
740
-
741
- Chosen.prototype.search_field_disabled = function() {
742
- this.is_disabled = this.form_field_jq[0].disabled;
743
- if (this.is_disabled) {
744
- this.container.addClass('chosen-disabled');
745
- this.search_field[0].disabled = true;
746
- if (!this.is_multiple) {
747
- this.selected_item.unbind("focus.chosen", this.activate_action);
748
- }
749
- return this.close_field();
750
- } else {
751
- this.container.removeClass('chosen-disabled');
752
- this.search_field[0].disabled = false;
753
- if (!this.is_multiple) {
754
- return this.selected_item.bind("focus.chosen", this.activate_action);
755
- }
756
- }
757
- };
758
-
759
- Chosen.prototype.container_mousedown = function(evt) {
760
- if (!this.is_disabled) {
761
- if (evt && evt.type === "mousedown" && !this.results_showing) {
762
- evt.preventDefault();
763
- }
764
- if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
765
- if (!this.active_field) {
766
- if (this.is_multiple) {
767
- this.search_field.val("");
768
- }
769
- $(this.container[0].ownerDocument).bind('click.chosen', this.click_test_action);
770
- this.results_show();
771
- } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
772
- evt.preventDefault();
773
- this.results_toggle();
774
- }
775
- return this.activate_field();
776
- }
777
- }
778
- };
779
-
780
- Chosen.prototype.container_mouseup = function(evt) {
781
- if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
782
- return this.results_reset(evt);
783
- }
784
- };
785
-
786
- Chosen.prototype.search_results_mousewheel = function(evt) {
787
- var delta;
788
- if (evt.originalEvent) {
789
- delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
790
- }
791
- if (delta != null) {
792
- evt.preventDefault();
793
- if (evt.type === 'DOMMouseScroll') {
794
- delta = delta * 40;
795
- }
796
- return this.search_results.scrollTop(delta + this.search_results.scrollTop());
797
- }
798
- };
799
-
800
- Chosen.prototype.blur_test = function(evt) {
801
- if (!this.active_field && this.container.hasClass("chosen-container-active")) {
802
- return this.close_field();
803
- }
804
- };
805
-
806
- Chosen.prototype.close_field = function() {
807
- $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
808
- this.active_field = false;
809
- this.results_hide();
810
- this.container.removeClass("chosen-container-active");
811
- this.clear_backstroke();
812
- this.show_search_field_default();
813
- return this.search_field_scale();
814
- };
815
-
816
- Chosen.prototype.activate_field = function() {
817
- this.container.addClass("chosen-container-active");
818
- this.active_field = true;
819
- this.search_field.val(this.search_field.val());
820
- return this.search_field.focus();
821
- };
822
-
823
- Chosen.prototype.test_active_click = function(evt) {
824
- var active_container;
825
- active_container = $(evt.target).closest('.chosen-container');
826
- if (active_container.length && this.container[0] === active_container[0]) {
827
- return this.active_field = true;
828
- } else {
829
- return this.close_field();
830
- }
831
- };
832
-
833
- Chosen.prototype.results_build = function() {
834
- this.parsing = true;
835
- this.selected_option_count = null;
836
- this.results_data = SelectParser.select_to_array(this.form_field);
837
- if (this.is_multiple) {
838
- this.search_choices.find("li.search-choice").remove();
839
- } else if (!this.is_multiple) {
840
- this.single_set_selected_text();
841
- if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
842
- this.search_field[0].readOnly = true;
843
- this.container.addClass("chosen-container-single-nosearch");
844
- } else {
845
- this.search_field[0].readOnly = false;
846
- this.container.removeClass("chosen-container-single-nosearch");
847
- }
848
- }
849
- this.update_results_content(this.results_option_build({
850
- first: true
851
- }));
852
- this.search_field_disabled();
853
- this.show_search_field_default();
854
- this.search_field_scale();
855
- return this.parsing = false;
856
- };
857
-
858
- Chosen.prototype.result_do_highlight = function(el) {
859
- var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
860
- if (el.length) {
861
- this.result_clear_highlight();
862
- this.result_highlight = el;
863
- this.result_highlight.addClass("highlighted");
864
- maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
865
- visible_top = this.search_results.scrollTop();
866
- visible_bottom = maxHeight + visible_top;
867
- high_top = this.result_highlight.position().top + this.search_results.scrollTop();
868
- high_bottom = high_top + this.result_highlight.outerHeight();
869
- if (high_bottom >= visible_bottom) {
870
- return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
871
- } else if (high_top < visible_top) {
872
- return this.search_results.scrollTop(high_top);
873
- }
874
- }
875
- };
876
-
877
- Chosen.prototype.result_clear_highlight = function() {
878
- if (this.result_highlight) {
879
- this.result_highlight.removeClass("highlighted");
880
- }
881
- return this.result_highlight = null;
882
- };
883
-
884
- Chosen.prototype.results_show = function() {
885
- if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
886
- this.form_field_jq.trigger("chosen:maxselected", {
887
- chosen: this
888
- });
889
- return false;
890
- }
891
- this.container.addClass("chosen-with-drop");
892
- this.results_showing = true;
893
- this.search_field.focus();
894
- this.search_field.val(this.search_field.val());
895
- this.winnow_results();
896
- return this.form_field_jq.trigger("chosen:showing_dropdown", {
897
- chosen: this
898
- });
899
- };
900
-
901
- Chosen.prototype.update_results_content = function(content) {
902
- return this.search_results.html(content);
903
- };
904
-
905
- Chosen.prototype.results_hide = function() {
906
- if (this.results_showing) {
907
- this.result_clear_highlight();
908
- this.container.removeClass("chosen-with-drop");
909
- this.form_field_jq.trigger("chosen:hiding_dropdown", {
910
- chosen: this
911
- });
912
- }
913
- return this.results_showing = false;
914
- };
915
-
916
- Chosen.prototype.set_tab_index = function(el) {
917
- var ti;
918
- if (this.form_field.tabIndex) {
919
- ti = this.form_field.tabIndex;
920
- this.form_field.tabIndex = -1;
921
- return this.search_field[0].tabIndex = ti;
922
- }
923
- };
924
-
925
- Chosen.prototype.set_label_behavior = function() {
926
- var _this = this;
927
- this.form_field_label = this.form_field_jq.parents("label");
928
- if (!this.form_field_label.length && this.form_field.id.length) {
929
- this.form_field_label = $("label[for='" + this.form_field.id + "']");
930
- }
931
- if (this.form_field_label.length > 0) {
932
- return this.form_field_label.bind('click.chosen', function(evt) {
933
- if (_this.is_multiple) {
934
- return _this.container_mousedown(evt);
935
- } else {
936
- return _this.activate_field();
937
- }
938
- });
939
- }
940
- };
941
-
942
- Chosen.prototype.show_search_field_default = function() {
943
- if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
944
- this.search_field.val(this.default_text);
945
- return this.search_field.addClass("default");
946
- } else {
947
- this.search_field.val("");
948
- return this.search_field.removeClass("default");
949
- }
950
- };
951
-
952
- Chosen.prototype.search_results_mouseup = function(evt) {
953
- var target;
954
- target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
955
- if (target.length) {
956
- this.result_highlight = target;
957
- this.result_select(evt);
958
- return this.search_field.focus();
959
- }
960
- };
961
-
962
- Chosen.prototype.search_results_mouseover = function(evt) {
963
- var target;
964
- target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
965
- if (target) {
966
- return this.result_do_highlight(target);
967
- }
968
- };
969
-
970
- Chosen.prototype.search_results_mouseout = function(evt) {
971
- if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) {
972
- return this.result_clear_highlight();
973
- }
974
- };
975
-
976
- Chosen.prototype.choice_build = function(item) {
977
- var choice, close_link,
978
- _this = this;
979
- choice = $('<li />', {
980
- "class": "search-choice"
981
- }).html("<span>" + (this.choice_label(item)) + "</span>");
982
- if (item.disabled) {
983
- choice.addClass('search-choice-disabled');
984
- } else {
985
- close_link = $('<a />', {
986
- "class": 'search-choice-close',
987
- 'data-option-array-index': item.array_index
988
- });
989
- close_link.bind('click.chosen', function(evt) {
990
- return _this.choice_destroy_link_click(evt);
991
- });
992
- choice.append(close_link);
993
- }
994
- return this.search_container.before(choice);
995
- };
996
-
997
- Chosen.prototype.choice_destroy_link_click = function(evt) {
998
- evt.preventDefault();
999
- evt.stopPropagation();
1000
- if (!this.is_disabled) {
1001
- return this.choice_destroy($(evt.target));
1002
- }
1003
- };
1004
-
1005
- Chosen.prototype.choice_destroy = function(link) {
1006
- if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
1007
- this.show_search_field_default();
1008
- if (this.is_multiple && this.choices_count() > 0 && this.search_field.val().length < 1) {
1009
- this.results_hide();
1010
- }
1011
- link.parents('li').first().remove();
1012
- return this.search_field_scale();
1013
- }
1014
- };
1015
-
1016
- Chosen.prototype.results_reset = function() {
1017
- this.reset_single_select_options();
1018
- this.form_field.options[0].selected = true;
1019
- this.single_set_selected_text();
1020
- this.show_search_field_default();
1021
- this.results_reset_cleanup();
1022
- this.form_field_jq.trigger("change");
1023
- if (this.active_field) {
1024
- return this.results_hide();
1025
- }
1026
- };
1027
-
1028
- Chosen.prototype.results_reset_cleanup = function() {
1029
- this.current_selectedIndex = this.form_field.selectedIndex;
1030
- return this.selected_item.find("abbr").remove();
1031
- };
1032
-
1033
- Chosen.prototype.result_select = function(evt) {
1034
- var high, item;
1035
- if (this.result_highlight) {
1036
- high = this.result_highlight;
1037
- this.result_clear_highlight();
1038
- if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
1039
- this.form_field_jq.trigger("chosen:maxselected", {
1040
- chosen: this
1041
- });
1042
- return false;
1043
- }
1044
- if (this.is_multiple) {
1045
- high.removeClass("active-result");
1046
- } else {
1047
- this.reset_single_select_options();
1048
- }
1049
- high.addClass("result-selected");
1050
- item = this.results_data[high[0].getAttribute("data-option-array-index")];
1051
- item.selected = true;
1052
- this.form_field.options[item.options_index].selected = true;
1053
- this.selected_option_count = null;
1054
- if (this.is_multiple) {
1055
- this.choice_build(item);
1056
- } else {
1057
- this.single_set_selected_text(this.choice_label(item));
1058
- }
1059
- if (!((evt.metaKey || evt.ctrlKey) && this.is_multiple)) {
1060
- this.results_hide();
1061
- }
1062
- this.show_search_field_default();
1063
- if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
1064
- this.form_field_jq.trigger("change", {
1065
- 'selected': this.form_field.options[item.options_index].value
1066
- });
1067
- }
1068
- this.current_selectedIndex = this.form_field.selectedIndex;
1069
- evt.preventDefault();
1070
- return this.search_field_scale();
1071
- }
1072
- };
1073
-
1074
- Chosen.prototype.single_set_selected_text = function(text) {
1075
- if (text == null) {
1076
- text = this.default_text;
1077
- }
1078
- if (text === this.default_text) {
1079
- this.selected_item.addClass("chosen-default");
1080
- } else {
1081
- this.single_deselect_control_build();
1082
- this.selected_item.removeClass("chosen-default");
1083
- }
1084
- return this.selected_item.find("span").html(text);
1085
- };
1086
-
1087
- Chosen.prototype.result_deselect = function(pos) {
1088
- var result_data;
1089
- result_data = this.results_data[pos];
1090
- if (!this.form_field.options[result_data.options_index].disabled) {
1091
- result_data.selected = false;
1092
- this.form_field.options[result_data.options_index].selected = false;
1093
- this.selected_option_count = null;
1094
- this.result_clear_highlight();
1095
- if (this.results_showing) {
1096
- this.winnow_results();
1097
- }
1098
- this.form_field_jq.trigger("change", {
1099
- deselected: this.form_field.options[result_data.options_index].value
1100
- });
1101
- this.search_field_scale();
1102
- return true;
1103
- } else {
1104
- return false;
1105
- }
1106
- };
1107
-
1108
- Chosen.prototype.single_deselect_control_build = function() {
1109
- if (!this.allow_single_deselect) {
1110
- return;
1111
- }
1112
- if (!this.selected_item.find("abbr").length) {
1113
- this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
1114
- }
1115
- return this.selected_item.addClass("chosen-single-with-deselect");
1116
- };
1117
-
1118
- Chosen.prototype.get_search_text = function() {
1119
- return $('<div/>').text($.trim(this.search_field.val())).html();
1120
- };
1121
-
1122
- Chosen.prototype.winnow_results_set_highlight = function() {
1123
- var do_high, selected_results;
1124
- selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
1125
- do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
1126
- if (do_high != null) {
1127
- return this.result_do_highlight(do_high);
1128
- }
1129
- };
1130
-
1131
- Chosen.prototype.no_results = function(terms) {
1132
- var no_results_html;
1133
- no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>');
1134
- no_results_html.find("span").first().html(terms);
1135
- this.search_results.append(no_results_html);
1136
- return this.form_field_jq.trigger("chosen:no_results", {
1137
- chosen: this
1138
- });
1139
- };
1140
-
1141
- Chosen.prototype.no_results_clear = function() {
1142
- return this.search_results.find(".no-results").remove();
1143
- };
1144
-
1145
- Chosen.prototype.keydown_arrow = function() {
1146
- var next_sib;
1147
- if (this.results_showing && this.result_highlight) {
1148
- next_sib = this.result_highlight.nextAll("li.active-result").first();
1149
- if (next_sib) {
1150
- return this.result_do_highlight(next_sib);
1151
- }
1152
- } else {
1153
- return this.results_show();
1154
- }
1155
- };
1156
-
1157
- Chosen.prototype.keyup_arrow = function() {
1158
- var prev_sibs;
1159
- if (!this.results_showing && !this.is_multiple) {
1160
- return this.results_show();
1161
- } else if (this.result_highlight) {
1162
- prev_sibs = this.result_highlight.prevAll("li.active-result");
1163
- if (prev_sibs.length) {
1164
- return this.result_do_highlight(prev_sibs.first());
1165
- } else {
1166
- if (this.choices_count() > 0) {
1167
- this.results_hide();
1168
- }
1169
- return this.result_clear_highlight();
1170
- }
1171
- }
1172
- };
1173
-
1174
- Chosen.prototype.keydown_backstroke = function() {
1175
- var next_available_destroy;
1176
- if (this.pending_backstroke) {
1177
- this.choice_destroy(this.pending_backstroke.find("a").first());
1178
- return this.clear_backstroke();
1179
- } else {
1180
- next_available_destroy = this.search_container.siblings("li.search-choice").last();
1181
- if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
1182
- this.pending_backstroke = next_available_destroy;
1183
- if (this.single_backstroke_delete) {
1184
- return this.keydown_backstroke();
1185
- } else {
1186
- return this.pending_backstroke.addClass("search-choice-focus");
1187
- }
1188
- }
1189
- }
1190
- };
1191
-
1192
- Chosen.prototype.clear_backstroke = function() {
1193
- if (this.pending_backstroke) {
1194
- this.pending_backstroke.removeClass("search-choice-focus");
1195
- }
1196
- return this.pending_backstroke = null;
1197
- };
1198
-
1199
- Chosen.prototype.keydown_checker = function(evt) {
1200
- var stroke, _ref1;
1201
- stroke = (_ref1 = evt.which) != null ? _ref1 : evt.keyCode;
1202
- this.search_field_scale();
1203
- if (stroke !== 8 && this.pending_backstroke) {
1204
- this.clear_backstroke();
1205
- }
1206
- switch (stroke) {
1207
- case 8:
1208
- this.backstroke_length = this.search_field.val().length;
1209
- break;
1210
- case 9:
1211
- if (this.results_showing && !this.is_multiple) {
1212
- this.result_select(evt);
1213
- }
1214
- this.mouse_on_container = false;
1215
- break;
1216
- case 13:
1217
- if (this.results_showing) {
1218
- evt.preventDefault();
1219
- }
1220
- break;
1221
- case 32:
1222
- if (this.disable_search) {
1223
- evt.preventDefault();
1224
- }
1225
- break;
1226
- case 38:
1227
- evt.preventDefault();
1228
- this.keyup_arrow();
1229
- break;
1230
- case 40:
1231
- evt.preventDefault();
1232
- this.keydown_arrow();
1233
- break;
1234
- }
1235
- };
1236
-
1237
- Chosen.prototype.search_field_scale = function() {
1238
- var div, f_width, h, style, style_block, styles, w, _i, _len;
1239
- if (this.is_multiple) {
1240
- h = 0;
1241
- w = 0;
1242
- style_block = "position:absolute; left: -1000px; top: -1000px; display:none;";
1243
- styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'];
1244
- for (_i = 0, _len = styles.length; _i < _len; _i++) {
1245
- style = styles[_i];
1246
- style_block += style + ":" + this.search_field.css(style) + ";";
1247
- }
1248
- div = $('<div />', {
1249
- 'style': style_block
1250
- });
1251
- div.text(this.search_field.val());
1252
- $('body').append(div);
1253
- w = div.width() + 25;
1254
- div.remove();
1255
- f_width = this.container.outerWidth();
1256
- if (w > f_width - 10) {
1257
- w = f_width - 10;
1258
- }
1259
- return this.search_field.css({
1260
- 'width': w + 'px'
1261
- });
1262
- }
1263
- };
1264
-
1265
- return Chosen;
1266
-
1267
- })(AbstractChosen);
1268
-
1269
- }).call(this);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/assets/js/help.js DELETED
@@ -1,12 +0,0 @@
1
- (function ($) {
2
- 'use strict';
3
-
4
- // Masonry
5
- $( document ).ready(function() {
6
- $('.feature-section.masonry-section').masonry({
7
- // options
8
- itemSelector: 'div.col'
9
- });
10
- });
11
-
12
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/metabox/assets/css/sp-custom.css DELETED
@@ -1,183 +0,0 @@
1
- /*--------------------------------------------------------
2
- SP_TP_Framework
3
- --------------------------------------------------------*/
4
- .text-center {
5
- text-align: center;
6
- }
7
- .sp-after-text{
8
- padding-left: 5px;
9
- }
10
-
11
- .js #sp_tpro_meta_options.postbox .handlediv,
12
- .js #sp_tpro_meta_options.postbox .hndle {
13
- display: none;
14
- }
15
- #sp_tpro_meta_options .sp-tpro-notice{
16
- font-size: 15px;
17
- margin: 22px 30px;
18
- color: #2f2f2f;
19
- background: #f9f9f9;
20
- -webkit-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.18);
21
- box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.18);
22
- padding: 10px 12px;
23
- border-left: 3px solid #f90000;
24
- }
25
- #sp_tpro_meta_options .sp-tpro-notice a{
26
- text-decoration: none;
27
- }
28
- .sp-element input[type="text"] {
29
- padding: 8px 12px!important;
30
- min-height: 36px;
31
- }
32
- .tpro_shortcode .tpro-col-lg-3 .selectable {
33
- -webkit-touch-callout: all;
34
- -webkit-user-select: all;
35
- -khtml-user-select: all;
36
- -moz-user-select: all;
37
- -ms-user-select: all;
38
- user-select: all;
39
- }
40
-
41
- .sp-tpro-framework .sp-content {
42
- margin-left: 0;
43
- border-top: 1px solid #efefef;
44
- }
45
- .sp-tpro-framework .sp-nav {
46
- position: inherit;
47
- float: none;
48
- width: 100%;
49
- background: #f1f1f1;
50
- -webkit-box-shadow: inset 3px -1px 1px -1px rgba(0,0,0,.04);
51
- -moz-box-shadow: inset 3px -1px 1px -1px rgba(0,0,0,.04);
52
- box-shadow: inset 3px -1px 1px -1px rgba(0,0,0,.04);
53
- }
54
- .sp-tpro-framework .sp-nav ul {
55
- margin: 0;
56
- }
57
-
58
- .sp-tpro-framework .sp-nav ul li {
59
- margin-bottom: -1px;
60
- display: inline-block;
61
-
62
- }
63
-
64
- .sp-tpro-framework .sp-nav-background {
65
- position: inherit;
66
- width: 100%;
67
- background-color: #e3e3e3;
68
- }
69
-
70
- .sp-tpro-framework .sp-nav ul li a {
71
- background-color: #52b3d9;
72
- border-top: 1px solid #52b3d9;
73
- font-size: 13px;
74
- padding: 16px 15px;
75
- line-height: 1.4;
76
- border-bottom: 1px solid #ddd;
77
- color: #ffffff;
78
- border-right: 1px solid #E2E2E1;
79
- text-transform: uppercase;
80
- font-weight: 600;
81
- margin-bottom: -1px;
82
- }
83
-
84
- .sp-tpro-framework .sp-nav ul li a.sp-section-active {
85
- border-bottom: 1px solid transparent;
86
- border-top: 1px solid #52b3d9;
87
- background-color: #fff;
88
- box-shadow: 0 3px 0 0 #52b3d9 inset;
89
- }
90
-
91
- .sp-tpro-framework .sp-nav ul li .sp-section-active {
92
- color: #000;
93
- }
94
-
95
- .sp-tpro-framework .sp-nav ul li .sp-section-active i {
96
- color: #52b3d9;
97
- }
98
-
99
- .sp-tpro-framework .sp-nav ul li :after {
100
- display: none;
101
- }
102
-
103
- .sp-element {
104
- padding: 22px 30px;
105
- border-bottom: 1px solid rgba(238, 238, 238, 0.1);
106
- }
107
-
108
- .sp-element:hover {
109
- background-color: transparent;
110
- }
111
-
112
- /* Rating */
113
- .sp-tpro-client-rating{
114
- float: left;
115
- }
116
- .sp-tpro-client-rating:not(:checked) > input {
117
- visibility:hidden;
118
- display: none;
119
- width:0;
120
- height:0;
121
- float: right;;
122
- top: 100%;
123
- clip: rect(0,0,0,0);
124
- margin: 0;
125
- padding: 0;
126
- border:10px #fff solid;
127
- }
128
-
129
- .sp-tpro-client-rating:not(:checked) > label {
130
- float: right;
131
- display: block;
132
- padding: 0;
133
- margin: 0;
134
- cursor: pointer;
135
- font-size: 150%;
136
- line-height: 1.2;
137
- color: #d4d4d4;
138
- width: 1em;
139
- }
140
-
141
- .sp-tpro-client-rating > input:checked ~ label {
142
- color: #f3bb00;
143
- }
144
-
145
- .sp-tpro-client-rating:not(:checked) > label:hover,
146
- .sp-tpro-client-rating:not(:checked) > label:hover ~ label {
147
- color: #de7202;
148
- }
149
-
150
- .sp-tpro-client-rating > input:checked + label:hover,
151
- .sp-tpro-client-rating > input:checked + label:hover ~ label,
152
- .sp-tpro-client-rating > input:checked ~ label:hover,
153
- .sp-tpro-client-rating > input:checked ~ label:hover ~ label,
154
- .sp-tpro-client-rating > label:hover ~ input:checked ~ label {
155
- color: #de7202;
156
- }
157
-
158
-
159
- @media (max-width: 1200px) {
160
- .sp-metabox-framework .tpro_shortcode{
161
- display: block;
162
- }
163
- .tpro_shortcode .tpro-col-lg-3 {
164
- width: 100%;
165
- display: block;
166
- border-bottom: 1px solid #e5e5e5;
167
- padding-bottom:15px;
168
- border-right:none;
169
- }
170
-
171
- .tpro_shortcode .tpro-col-lg-3:last-child {
172
- border-bottom: none;
173
- padding-bottom:0;
174
- }
175
- }
176
- @media only screen and (max-width: 782px) {
177
- .sp-tpro-framework.sp-option-framework .sp-content {
178
- margin-left: 0;
179
- }
180
- .sp-tpro-framework.sp-option-framework .sp-header h2{
181
- float: none;
182
- }
183
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/metabox/assets/css/sp-framework-rtl.css DELETED
@@ -1,220 +0,0 @@
1
- .sp-tpro-framework {
2
- margin-left: 20px;
3
- margin-right: 0;
4
- }
5
- .sp-tpro-framework .sp-header h1 {
6
- float: right;
7
- }
8
- .sp-tpro-framework .sp-header fieldset {
9
- float: left;
10
- }
11
- .sp-tpro-framework .sp-nav {
12
- float: right;
13
- }
14
- .sp-tpro-framework .sp-nav ul {
15
- clear: right;
16
- }
17
- .sp-tpro-framework .sp-nav ul li .sp-section-active:after {
18
- right: auto;
19
- left: 0;
20
- border-left-color: #fff;
21
- border-right-color: transparent;
22
- }
23
- .sp-tpro-framework .sp-nav ul li .sp-arrow:after {
24
- content: "\f053";
25
- right: auto;
26
- left: 10px;
27
- }
28
- .sp-tpro-framework .sp-nav ul li.sp-tab-active .sp-arrow:after {
29
- -moz-transform: rotate(-90deg);
30
- -ms-transform: rotate(-90deg);
31
- -webkit-transform: rotate(-90deg);
32
- transform: rotate(-90deg);
33
- }
34
- .sp-tpro-framework .sp-nav ul ul li a {
35
- padding-right: 25px;
36
- padding-left: 15px;
37
- }
38
- .sp-tpro-framework .sp-nav ul ul:before {
39
- left: auto;
40
- right: 15px;
41
- }
42
- .sp-tpro-framework .sp-nav .sp-icon {
43
- margin-left: 5px;
44
- margin-right: 0;
45
- }
46
- .sp-tpro-framework .sp-nav-background {
47
- left: auto;
48
- right: 0;
49
- }
50
- .sp-tpro-framework .sp-content {
51
- margin-left: 0;
52
- margin-right: 225px;
53
- }
54
- .sp-tpro-framework .sp-content .sp-sections {
55
- float: right;
56
- }
57
- .sp-tpro-framework .sp-show-all .sp-content {
58
- margin-right: 0;
59
- overflow: hidden;
60
- }
61
- .sp-tpro-framework .sp-expand-all {
62
- right: auto;
63
- left: 40px;
64
- }
65
- .sp-tpro-framework .sp-footer {
66
- text-align: left;
67
- }
68
-
69
- .sp-metabox-framework {
70
- margin: -6px -12px -12px -12px;
71
- }
72
- .sp-metabox-framework .sp-content .sp-section-title {
73
- padding: 20px;
74
- }
75
-
76
- .sp-element .sp-title {
77
- float: right;
78
- }
79
- .sp-element .sp-fieldset {
80
- margin-left: 0;
81
- margin-right: 30%;
82
- }
83
-
84
- .sp-pseudo-field {
85
- padding: 0 0 0 5px !important;
86
- }
87
-
88
- .sp-field-number em {
89
- margin-left: 0;
90
- margin-right: 5px;
91
- }
92
-
93
- .sp-field-typography select,
94
- .sp-field-typography .chosen-container {
95
- margin-right: 0;
96
- margin-left: 5px;
97
- }
98
-
99
- .sp-field-checkbox .horizontal li,
100
- .sp-field-radio .horizontal li {
101
- margin-right: 0;
102
- margin-left: 15px;
103
- }
104
-
105
- .sp-field-switcher label {
106
- float: right;
107
- }
108
- .sp-field-switcher .sp-text-desc {
109
- float: right;
110
- margin-left: 0;
111
- margin-right: 5px;
112
- }
113
-
114
- .sp-field-color_picker .sp-alpha-slider {
115
- margin-left: 0;
116
- margin-right: 2px;
117
- }
118
- .sp-field-color_picker .sp-alpha-slider .ui-slider-handle {
119
- margin: 0 -11px;
120
- }
121
- .sp-field-color_picker .sp-alpha-slider-offset {
122
- background-position: center right;
123
- }
124
- .sp-field-color_picker .sp-alpha-text {
125
- right: auto;
126
- left: 10px;
127
- }
128
-
129
- .sp-field-group .ui-accordion-icons {
130
- padding-left: 0;
131
- padding-right: 30px;
132
- }
133
- .sp-field-group .ui-accordion-header-icon {
134
- left: auto;
135
- right: .5em;
136
- }
137
- .sp-field-group .dashicons-arrow-right:before {
138
- content: "\f141";
139
- }
140
-
141
- .sp-help {
142
- right: auto;
143
- left: 5px;
144
- }
145
-
146
- .sp-field-icon .button {
147
- margin-right: 0;
148
- margin-left: 5px;
149
- }
150
- .sp-field-icon .sp-icon-preview i {
151
- margin-right: 0;
152
- margin-left: 5px;
153
- }
154
-
155
- .sp-field-gallery ul li {
156
- margin-right: 0;
157
- margin-left: 5px;
158
- }
159
- .sp-field-gallery .button {
160
- margin-right: 0;
161
- margin-left: 5px;
162
- }
163
-
164
- .sp-field-sorter .sp-modules {
165
- float: right;
166
- margin-right: 0;
167
- margin-left: 10px;
168
- }
169
-
170
- .sp-taxonomy-add-fields .sp-fieldset {
171
- margin-right: 0;
172
- }
173
- .sp-taxonomy-add-fields .sp-help {
174
- left: -5px;
175
- right: auto;
176
- }
177
-
178
- .sp-taxonomy-edit-fields .sp-fieldset {
179
- margin-left: 0;
180
- margin-right: 225px;
181
- }
182
- .sp-taxonomy-edit-fields .sp-help {
183
- right: auto;
184
- left: -5px;
185
- }
186
-
187
- #sp-save-ajax {
188
- right: auto;
189
- left: 5px;
190
- }
191
-
192
- .sp-dialog .sp-element {
193
- padding-right: 15px;
194
- padding-left: 30px;
195
- }
196
- .sp-dialog .sp-shortcode-clone .sp-remove-clone {
197
- right: auto;
198
- left: 5px;
199
- }
200
-
201
- #customize-controls .sp-element .sp-fieldset,
202
- .widget-content .sp-element .sp-fieldset,
203
- #side-sortables .sp-element .sp-fieldset {
204
- margin-right: 0;
205
- }
206
-
207
- @media only screen and (max-width: 1200px) {
208
- .sp-metabox-framework .sp-element .sp-fieldset {
209
- margin-left: 0;
210
- }
211
- }
212
- @media only screen and (max-width: 782px) {
213
- .sp-tpro-framework .sp-fieldset,
214
- .sp-tpro-framework .sp-content {
215
- margin-right: 0;
216
- }
217
- }
218
- .ui-dialog {
219
- right: auto;
220
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/metabox/assets/css/sp-framework.css DELETED
@@ -1,1323 +0,0 @@
1
-
2
- .sp-tpro-framework {
3
- position: relative;
4
- margin-top: 20px;
5
- margin-right: 20px;
6
- }
7
- .sp-tpro-framework label {
8
- padding: 0;
9
- margin: 0;
10
- display: inline-block;
11
- }
12
- .sp-tpro-framework .sp-settings-error {
13
- margin: 0 0 15px 0;
14
- }
15
- .sp-tpro-framework .sp-header {
16
- background-color: #2684a6;
17
- padding: 24px 28px;
18
- overflow: hidden;
19
- }
20
- .sp-tpro-framework .sp-header fieldset {
21
- float: right;
22
- }
23
- .sp-tpro-framework .sp-header fieldset input {
24
- margin: 0 2px;
25
- line-height: 26px;
26
- }
27
- .sp-tpro-framework .sp-body {
28
- position: relative;
29
- background-color: #fff;
30
- }
31
- .sp-tpro-framework .sp-nav {
32
- display: block;
33
- position: relative;
34
- z-index: 10;
35
- float: left;
36
- width: 225px;
37
- }
38
- .sp-tpro-framework .sp-nav ul {
39
- clear: left;
40
- margin: 0;
41
- list-style-type: none;
42
- }
43
- .sp-tpro-framework .sp-nav ul li {
44
- margin-bottom: 0;
45
- }
46
- .sp-tpro-framework .sp-nav ul li a {
47
- font-size: 13px;
48
- position: relative;
49
- display: block;
50
- padding: 15px;
51
- text-decoration: none;
52
- color: #999;
53
- background-color: #222;
54
- border-bottom: 1px solid #2f2f2f;
55
- -moz-transition: all 0.2s ease-out;
56
- -o-transition: all 0.2s ease-out;
57
- -webkit-transition: all 0.2s ease-out;
58
- transition: all 0.2s ease-out;
59
- }
60
- .sp-tpro-framework .sp-nav ul li a:focus {
61
- outline: none;
62
- -moz-box-shadow: none;
63
- -webkit-box-shadow: none;
64
- box-shadow: none;
65
- }
66
- .sp-tpro-framework .sp-nav ul li .sp-section-active {
67
- color: #fff;
68
- background-color: #111;
69
- }
70
- .sp-tpro-framework .sp-nav ul li .sp-section-active:after {
71
- content: " ";
72
- position: absolute;
73
- right: 0;
74
- top: 50%;
75
- height: 0;
76
- width: 0;
77
- pointer-events: none;
78
- border: solid transparent;
79
- border-right-color: #fff;
80
- border-width: 4px;
81
- margin-top: -4px;
82
- }
83
- .sp-tpro-framework .sp-nav ul li .sp-arrow:after {
84
- content: "\f054";
85
- display: inline-block;
86
- font-family: "FontAwesome";
87
- font-size: 9px;
88
- line-height: 1;
89
- position: absolute;
90
- right: 10px;
91
- top: 50%;
92
- margin-top: -4px;
93
- -moz-transform: rotate(0);
94
- -ms-transform: rotate(0);
95
- -webkit-transform: rotate(0);
96
- transform: rotate(0);
97
- -moz-transition: -moz-transform 0.2s;
98
- -o-transition: -o-transform 0.2s;
99
- -webkit-transition: -webkit-transform 0.2s;
100
- transition: transform 0.2s;
101
- }
102
- .sp-tpro-framework .sp-nav ul li.sp-tab-active .sp-arrow:after {
103
- -moz-transform: rotate(90deg);
104
- -ms-transform: rotate(90deg);
105
- -webkit-transform: rotate(90deg);
106
- transform: rotate(90deg);
107
- }
108
- .sp-tpro-framework .sp-nav ul ul {
109
- display: none;
110
- position: relative;
111
- border-bottom: 1px solid #2f2f2f;
112
- position: relative;
113
- }
114
- .sp-tpro-framework .sp-nav ul ul li a {
115
- font-size: 12px;
116
- padding: 13px 15px 13px 25px;
117
- background-color: #191919;
118
- border-bottom: 1px solid #222;
119
- }
120
- .sp-tpro-framework .sp-nav ul ul li .sp-section-active {
121
- background-color: #101010;
122
- }
123
- .sp-tpro-framework .sp-nav ul ul li:last-child a {
124
- border-bottom: 0;
125
- }
126
- .sp-tpro-framework .sp-nav ul ul:before {
127
- content: '';
128
- position: absolute;
129
- top: 0;
130
- left: 15px;
131
- z-index: 1;
132
- width: 1px;
133
- height: 100%;
134
- background-color: rgba(34, 34, 34, 0.75);
135
- }
136
- .sp-tpro-framework .sp-nav .sp-icon {
137
- width: 20px;
138
- margin-right: 5px;
139
- font-size: 14px;
140
- text-align: center;
141
- }
142
- .sp-tpro-framework .sp-nav .sp-separator {
143
- color: #fff;
144
- font-weight: 600;
145
- text-transform: uppercase;
146
- padding: 30px 15px 15px 15px;
147
- border-bottom: 1px dashed #2f2f2f;
148
- }
149
- .sp-tpro-framework .sp-nav-background {
150
- position: absolute;
151
- top: 0;
152
- left: 0;
153
- bottom: 0;
154
- z-index: 9;
155
- width: 225px;
156
- background-color: #222;
157
- }
158
- .sp-tpro-framework .sp-content {
159
- position: relative;
160
- margin-left: 225px;
161
- }
162
- .sp-tpro-framework .sp-content .sp-sections {
163
- float: left;
164
- width: 100%;
165
- }
166
- .sp-tpro-framework .sp-content .sp-section-title {
167
- display: none;
168
- padding: 20px 30px;
169
- background-color: #5bc0de;
170
- }
171
- .sp-tpro-framework .sp-content .sp-section-title h3 {
172
- color: #fff;
173
- margin: 0;
174
- padding: 0 !important;
175
- font-weight: bold;
176
- text-transform: uppercase;
177
- text-shadow: 1px 1px 0 rgba(68, 167, 197, 0.5);
178
- }
179
- .sp-tpro-framework .sp-content .sp-section {
180
- display: none;
181
- }
182
- .sp-tpro-framework .sp-footer {
183
- padding: 20px;
184
- color: #555;
185
- text-align: right;
186
- font-size: 11px;
187
- background-color: #050505;
188
- -moz-border-radius: 0 0 2px 2px;
189
- -webkit-border-radius: 0;
190
- border-radius: 0 0 2px 2px;
191
- }
192
- .sp-tpro-framework .sp-show-all .sp-nav-background,
193
- .sp-tpro-framework .sp-show-all .sp-nav {
194
- display: none;
195
- }
196
- .sp-tpro-framework .sp-show-all .sp-content {
197
- margin-left: 0;
198
- }
199
- .sp-tpro-framework .sp-show-all .sp-section-title,
200
- .sp-tpro-framework .sp-show-all .sp-section {
201
- display: block !important;
202
- }
203
- .sp-tpro-framework .sp-expand-all {
204
- position: absolute;
205
- right: 40px;
206
- bottom: 5px;
207
- z-index: 1;
208
- color: #555;
209
- font-size: 11px;
210
- font-weight: 500;
211
- text-decoration: none;
212
- }
213
- .sp-tpro-framework .sp-expand-all:hover {
214
- color: #fff;
215
- }
216
- .sp-tpro-framework .sp-expand-all:focus {
217
- -moz-box-shadow: none;
218
- -webkit-box-shadow: none;
219
- box-shadow: none;
220
- }
221
- .sp-tpro-framework .sp-element:last-child {
222
- border-bottom: 0 !important;
223
- }
224
-
225
- .sp-metabox-framework {
226
- margin: -6px -12px -12px -12px;
227
- }
228
- .sp-metabox-framework .sp-content .sp-section-title {
229
- padding: 20px;
230
- }
231
-
232
- .sp-element {
233
- position: relative;
234
- padding: 30px;
235
- border-bottom: 1px solid #eee;
236
- }
237
- .sp-element:hover {
238
- background-color: #f9f9f9;
239
- }
240
- .sp-element p:last-child {
241
- margin-bottom: 0 !important;
242
- }
243
- .sp-element:after, .sp-element:before {
244
- content: " ";
245
- display: table;
246
- }
247
- .sp-element:after {
248
- clear: both;
249
- }
250
- .sp-element h4 {
251
- margin-top: 0;
252
- }
253
- .sp-element .sp-title {
254
- position: relative;
255
- width: 25%;
256
- float: left;
257
- }
258
- .sp-element .sp-title h4 {
259
- margin: 0;
260
- color: #23282d;
261
- }
262
- .sp-element .sp-fieldset {
263
- margin-left: 30%;
264
- }
265
- .sp-option-framework .sp-element .sp-fieldset {
266
- margin-left: 25%;
267
- }
268
- .sp-element pre {
269
- clear: both;
270
- color: #ccc;
271
- background-color: #222;
272
- padding: 15px;
273
- overflow: auto;
274
- -moz-border-radius: 2px;
275
- -webkit-border-radius: 2px;
276
- border-radius: 2px;
277
- }
278
- .sp-element pre strong {
279
- color: #ffbc00;
280
- }
281
-
282
- .sp-pseudo-field {
283
- padding: 0 5px 0 0 !important;
284
- border: 0;
285
- display: inline-block;
286
- }
287
-
288
- .sp-field-text input,
289
- .sp-field-d_text input {
290
- width: 340px;
291
- max-width: 100%;
292
- }
293
-
294
- .sp-field-textarea textarea {
295
- width: 100%;
296
- max-width: 100%;
297
- min-height: 125px;
298
- }
299
- .sp-field-textarea .sp-shortcode {
300
- margin-bottom: 10px;
301
- }
302
-
303
- .sp-field-wysiwyg textarea {
304
- width: 100%;
305
- max-width: 100%;
306
- min-height: 125px;
307
- }
308
- .sp-field-wysiwyg .wp-editor-container {
309
- clear: none;
310
- }
311
-
312
- .sp-field-number input {
313
- width: 70px;
314
- }
315
- .sp-field-number em {
316
- margin-left: 5px;
317
- color: #bbb;
318
- }
319
-
320
- .sp-field-select select {
321
- max-width: 100%;
322
- }
323
-
324
- .sp-field-typography select,
325
- .sp-field-typography .chosen-container {
326
- margin-right: 5px;
327
- }
328
- .sp-field-typography .sp-typo-variant {
329
- min-width: 90px;
330
- }
331
-
332
- .sp-field-checkbox ul,
333
- .sp-field-radio ul {
334
- margin: 0;
335
- padding: 0;
336
- list-style-type: none;
337
- overflow-y: auto;
338
- max-height: 305px;
339
- }
340
- .sp-field-checkbox .horizontal li,
341
- .sp-field-radio .horizontal li {
342
- display: inline-block;
343
- margin-right: 15px;
344
- margin-bottom: 15px;
345
- }
346
- .sp-field-checkbox input[type="radio"]:checked:before,
347
- .sp-field-radio input[type="radio"]:checked:before {
348
- line-height: 10px;
349
- }
350
-
351
- .sp-field-switcher label {
352
- display: block;
353
- float: left;
354
- cursor: pointer;
355
- position: relative;
356
- width: 62px;
357
- height: 26px;
358
- padding: 0;
359
- margin: 0;
360
- overflow: hidden;
361
- -moz-border-radius: 20px;
362
- -webkit-border-radius: 20px;
363
- border-radius: 20px;
364
- }
365
- .sp-field-switcher label span {
366
- position: absolute;
367
- top: 4px;
368
- left: 4px;
369
- width: 18px;
370
- height: 18px;
371
- background-color: #fff;
372
- -moz-border-radius: 16px;
373
- -webkit-border-radius: 16px;
374
- border-radius: 16px;
375
- -moz-transition: left 0.15s ease-out;
376
- -o-transition: left 0.15s ease-out;
377
- -webkit-transition: left 0.15s ease-out;
378
- transition: left 0.15s ease-out;
379
- }
380
- .sp-field-switcher label input {
381
- position: absolute;
382
- top: 0;
383
- left: 0;
384
- opacity: 0;
385
- }
386
- .sp-field-switcher label input:checked ~ em {
387
- background: #4fb845;
388
- }
389
- .sp-field-switcher label input:checked ~ em:before {
390
- opacity: 0;
391
- }
392
- .sp-field-switcher label input:checked ~ em:after {
393
- opacity: 1;
394
- }
395
- .sp-field-switcher label input:checked ~ span {
396
- left: 40px;
397
- }
398
- .sp-field-switcher label em {
399
- position: relative;
400
- display: block;
401
- height: inherit;
402
- font-size: 11px;
403
- line-height: 26px;
404
- font-weight: 500;
405
- font-style: normal;
406
- text-transform: uppercase;
407
- color: #fff;
408
- background-color: #ed6f6f;
409
- -moz-transition: background 0.15s ease-out;
410
- -o-transition: background 0.15s ease-out;
411
- -webkit-transition: background 0.15s ease-out;
412
- transition: background 0.15s ease-out;
413
- }
414
- .sp-field-switcher label em:before, .sp-field-switcher label em:after {
415
- position: absolute;
416
- -moz-transition: opacity 0.15s ease-out;
417
- -o-transition: opacity 0.15s ease-out;
418
- -webkit-transition: opacity 0.15s ease-out;
419
- transition: opacity 0.15s ease-out;
420
- }
421
- .sp-field-switcher label em:before {
422
- content: attr(data-off);
423
- right: 14px;
424
- }
425
- .sp-field-switcher label em:after {
426
- content: attr(data-on);
427
- left: 14px;
428
- opacity: 0;
429
- }
430
- .sp-field-switcher .sp-text-desc {
431
- float: left;
432
- margin-left: 5px;
433
- margin-top: 0;
434
- padding-top: 4px;
435
- }
436
-
437
- .sp-field-image_select label {
438
- display: inline-block;
439
- margin: 5px;
440
- }
441
- .sp-field-image_select label img {
442
- max-width: 100%;
443
- vertical-align: bottom;
444
- background-color: #fff;
445
- border: 2px solid #eee;
446
- opacity: 0.75;
447
- -moz-transition: all 0.15s ease-out;
448
- -o-transition: all 0.15s ease-out;
449
- -webkit-transition: all 0.15s ease-out;
450
- transition: all 0.15s ease-out;
451
- }
452
- .sp-field-image_select label img[alt=readmore_one_view],
453
- .sp-field-image_select label img[alt=readmore_two_view],
454
- .sp-field-image_select label img[alt=readmore_three_view],
455
- .sp-field-image_select label img[alt=readmore_four_view],
456
- .sp-field-image_select label img[alt=readmore_five_view],
457
- .sp-field-image_select label img[alt=readmore_six_view]{
458
- border: 0px solid;
459
- opacity: 1;
460
- }
461
- .sp-field-image_select input {
462
- display: none;
463
- }
464
- .sp-field-image_select input:checked ~ img {
465
- border-color: #52b3d9;
466
- opacity: 1;
467
- }
468
-
469
- .sp-field-upload input {
470
- width: 420px;
471
- max-width: 100%;
472
- }
473
-
474
- .sp-field-background .sp-field-color_picker {
475
- position: relative;
476
- top: 10px;
477
- }
478
-
479
- .sp-field-color_picker .sp-alpha-wrap {
480
- display: none;
481
- position: relative;
482
- top: -1px;
483
- width: 235px;
484
- padding: 9px 10px;
485
- border: 1px solid #dfdfdf;
486
- border-top: none;
487
- background-color: #fff;
488
- }
489
- .sp-field-color_picker .sp-alpha-slider {
490
- position: absolute;
491
- width: 190px;
492
- margin-left: 2px;
493
- height: 18px;
494
- }
495
- .sp-field-color_picker .sp-alpha-slider .ui-slider-handle {
496
- position: absolute;
497
- top: -3px;
498
- bottom: -3px;
499
- z-index: 5;
500
- border-color: #aaa;
501
- border-style: solid;
502
- border-width: 4px 3px;
503
- width: 10px;
504
- height: 16px;
505
- margin: 0 -5px;
506
- background: none;
507
- cursor: ew-resize;
508
- opacity: 0.9;
509
- -moz-border-radius: 4px;
510
- -webkit-border-radius: 4px;
511
- border-radius: 4px;
512
- -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
513
- -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
514
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
515
- }
516
- .sp-field-color_picker .sp-alpha-slider .ui-slider-handle:before {
517
- content: " ";
518
- position: absolute;
519
- left: -2px;
520
- right: -2px;
521
- top: -3px;
522
- bottom: -3px;
523
- border: 2px solid #fff;
524
- -moz-border-radius: 3px;
525
- -webkit-border-radius: 3px;
526
- border-radius: 3px;
527
- }
528
- .sp-field-color_picker .sp-alpha-slider-offset {
529
- height: 18px;
530
- width: 200px;
531
- background: url(../images/checkerboard.png) repeat-y center left scroll #fff;
532
- -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.4) inset;
533
- -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.4) inset;
534
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.4) inset;
535
- -moz-border-radius: 2px;
536
- -webkit-border-radius: 2px;
537
- border-radius: 2px;
538
- }
539
- .sp-field-color_picker .sp-alpha-text {
540
- position: absolute;
541
- top: 12px;
542
- right: 10px;
543
- width: 30px;
544
- font-size: 12px;
545
- line-height: 12px;
546
- text-align: center;
547
- color: #999;
548
- }
549
-
550
- .sp-field-backup textarea {
551
- width: 100%;
552
- min-height: 200px;
553
- margin-bottom: 5px;
554
- }
555
- .sp-field-backup small {
556
- display: inline-block;
557
- margin: 5px;
558
- }
559
- .sp-field-backup hr {
560
- margin: 30px 0;
561
- }
562
-
563
- .sp-field-fieldset .sp-inner {
564
- border: 1px solid #eee;
565
- background-color: #fff;
566
- }
567
- .sp-field-fieldset .sp-element {
568
- padding: 20px;
569
- }
570
-
571
- .sp-field-group .sp-element {
572
- padding: 20px;
573
- }
574
- .sp-field-group .sp-group {
575
- display: none;
576
- position: relative;
577
- margin-bottom: 5px;
578
- }
579
- .sp-field-group .sp-group h4 {
580
- font-size: 1em;
581
- }
582
- .sp-field-group .sp-group-content {
583
- border: 1px solid #e5e5e5;
584
- background: #fff;
585
- }
586
- .sp-field-group .sp-group-title {
587
- border: 1px solid #e5e5e5;
588
- background: #fafafa;
589
- -moz-transition: border-color 0.15s;
590
- -o-transition: border-color 0.15s;
591
- -webkit-transition: border-color 0.15s;
592
- transition: border-color 0.15s;
593
- }
594
- .sp-field-group .sp-group-title:active, .sp-field-group .sp-group-title:hover, .sp-field-group .sp-group-title:focus {
595
- border: 1px solid #bbb;
596
- background: #fafafa;
597
- outline: none;
598
- }
599
- .sp-field-group .sp-group-title {
600
- display: block;
601
- cursor: pointer;
602
- position: relative;
603
- margin: 0;
604
- padding: 15px;
605
- min-height: 0;
606
- font-size: 100%;
607
- }
608
- .sp-field-group .sp-group-content {
609
- padding: 0;
610
- border-top: 0;
611
- }
612
- .sp-field-group .widget-placeholder {
613
- margin-bottom: 8px;
614
- }
615
- .sp-field-group .ui-accordion .sp-group {
616
- display: block;
617
- }
618
- .sp-field-group .ui-accordion-icons {
619
- padding-left: 30px;
620
- }
621
- .sp-field-group .ui-accordion-header-icon {
622
- position: absolute;
623
- left: .5em;
624
- top: 50%;
625
- margin-top: -10px;
626
- text-indent: 0;
627
- color: #bbb;
628
- }
629
- .sp-field-group .ui-sortable-helper .sp-group-content {
630
- display: none !important;
631
- }
632
-
633
- .sp-help {
634
- position: absolute;
635
- top: 5px;
636
- right: 5px;
637
- padding: 5px;
638
- font-size: 14px;
639
- color: #aaa;
640
- }
641
-
642
- .sp-field-heading {
643
- font-size: 1.5em;
644
- font-weight: bold;
645
- color: #23282d;
646
- background-color: #f5f5f5 !important;
647
- }
648
-
649
- .sp-field-subheading {
650
- font-size: 14px;
651
- font-weight: bold;
652
- padding-top: 17px;
653
- padding-bottom: 17px;
654
- color: #23282d;
655
- background-color: #f7f7f7 !important;
656
- }
657
-
658
- .sp-field-notice {
659
- padding: 0 !important;
660
- border: 0 !important;
661
- margin-top: -1px;
662
- }
663
- .sp-field-notice .sp-notice {
664
- font-size: 12px;
665
- padding: 17px 30px;
666
- border-top: 1px solid transparent;
667
- border-bottom: 1px solid transparent;
668
- }
669
- .sp-field-notice .sp-success {
670
- color: #3c763d;
671
- border-color: #d6e9c6;
672
- background-color: #dff0d8;
673
- }
674
- .sp-field-notice .sp-info {
675
- color: #31708f;
676
- border-color: #bce8f1;
677
- background-color: #d9edf7;
678
- }
679
- .sp-field-notice .sp-warning {
680
- color: #8a6d3b;
681
- border-color: #faebcc;
682
- background-color: #fcf8e3;
683
- }
684
- .sp-field-notice .sp-danger {
685
- color: #a94442;
686
- border-color: #ebccd1;
687
- background-color: #f2dede;
688
- }
689
-
690
- .sp-field-icon input {
691
- display: none;
692
- }
693
- .sp-field-icon .button {
694
- margin-right: 5px;
695
- }
696
- .sp-field-icon .sp-icon-preview i {
697
- display: inline-block;
698
- font-size: 14px;
699
- width: 30px;
700
- height: 26px;
701
- line-height: 26px;
702
- margin-right: 5px;
703
- text-align: center;
704
- vertical-align: top;
705
- color: #555;
706
- border: 1px solid #ccc;
707
- background-color: #f7f7f7;
708
- -moz-border-radius: 3px;
709
- -webkit-border-radius: 3px;
710
- border-radius: 3px;
711
- -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
712
- -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
713
- box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
714
- }
715
-
716
- .sp-field-image input {
717
- display: none;
718
- }
719
- .sp-field-image .sp-preview {
720
- display: inline-block;
721
- position: relative;
722
- padding: 4px;
723
- min-width: 44px;
724
- min-height: 22px;
725
- margin-bottom: 10px;
726
- border: 1px solid #ccc;
727
- background-color: #f9f9f9;
728
- -moz-border-radius: 2px;
729
- -webkit-border-radius: 2px;
730
- border-radius: 2px;
731
- -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
732
- -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
733
- box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
734
- }
735
- .sp-field-image .sp-preview img {
736
- max-height: 90px;
737
- display: inline-block;
738
- vertical-align: middle;
739
- }
740
- .sp-field-image .sp-remove {
741
- position: absolute;
742
- top: 4px;
743
- right: 4px;
744
- width: 22px;
745
- height: 22px;
746
- font-size: 11px;
747
- line-height: 22px;
748
- text-align: center;
749
- cursor: pointer;
750
- color: #fff;
751
- background-color: #e14d43;
752
- opacity: 0.8;
753
- -moz-border-radius: 2px;
754
- -webkit-border-radius: 2px;
755
- border-radius: 2px;
756
- -moz-transition: opacity 0.2s;
757
- -o-transition: opacity 0.2s;
758
- -webkit-transition: opacity 0.2s;
759
- transition: opacity 0.2s;
760
- }
761
- .sp-field-image .sp-remove:hover {
762
- opacity: 1;
763
- }
764
-
765
- .sp-field-gallery input {
766
- display: none;
767
- }
768
- .sp-field-gallery ul {
769
- margin: 0;
770
- padding: 0;
771
- list-style-type: none;
772
- }
773
- .sp-field-gallery ul li {
774
- display: inline-block;
775
- position: relative;
776
- padding: 4px;
777
- margin: 0 5px 10px 0;
778
- border: 1px solid #ccc;
779
- background-color: #f9f9f9;
780
- -moz-border-radius: 2px;
781
- -webkit-border-radius: 2px;
782
- border-radius: 2px;
783
- -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
784
- -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
785
- box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
786
- }
787
- .sp-field-gallery ul li img {
788
- max-height: 60px;
789
- display: inline-block;
790
- vertical-align: middle;
791
- }
792
- .sp-field-gallery .button {
793
- margin-right: 5px;
794
- margin-bottom: 5px;
795
- }
796
-
797
- .sp-field-sorter .ui-sortable-placeholder {
798
- height: 20px;
799
- border: 1px dashed #f1c40f;
800
- background-color: #fffae4;
801
- }
802
- .sp-field-sorter .sp-modules {
803
- float: left;
804
- width: 50%;
805
- }
806
- .sp-field-sorter .sp-enabled {
807
- margin-right: 15px;
808
- }
809
- .sp-field-sorter .sp-disabled,
810
- .sp-field-sorter .sp-enabled {
811
- padding: 5px 15px;
812
- border: 1px dashed #ddd;
813
- background-color: #fff;
814
- }
815
- .sp-field-sorter .sp-disabled li {
816
- -moz-transition: opacity 0.15s;
817
- -o-transition: opacity 0.15s;
818
- -webkit-transition: opacity 0.15s;
819
- transition: opacity 0.15s;
820
- opacity: 0.5;
821
- }
822
- .sp-field-sorter .sp-disabled .ui-sortable-helper {
823
- opacity: 1;
824
- }
825
- .sp-field-sorter h3 {
826
- font-size: 14px;
827
- margin: 0 0 15px 0;
828
- }
829
- .sp-field-sorter ul {
830
- list-style-type: none;
831
- margin: 0;
832
- padding: 0;
833
- min-height: 62px;
834
- }
835
- .sp-field-sorter ul li {
836
- margin: 10px 0;
837
- padding: 10px 15px;
838
- cursor: move;
839
- font-weight: bold;
840
- text-align: center;
841
- border: 1px solid #e5e5e5;
842
- background-color: #fafafa;
843
- -moz-transition: border-color 0.15s;
844
- -o-transition: border-color 0.15s;
845
- -webkit-transition: border-color 0.15s;
846
- transition: border-color 0.15s;
847
- }
848
- .sp-field-sorter ul li:hover {
849
- border-color: #bbb;
850
- }
851
-
852
- .sp-taxonomy {
853
- margin: 0;
854
- }
855
- .sp-taxonomy > .sp-element {
856
- border-bottom: 0;
857
- }
858
- .sp-taxonomy > .sp-element:hover {
859
- background: none;
860
- }
861
- .sp-taxonomy > .sp-field-heading {
862
- font-size: 1.1em;
863
- padding: 20px !important;
864
- border: 1px solid #ddd;
865
- }
866
- .sp-taxonomy > .sp-field-subheading {
867
- font-size: 12px;
868
- padding: 15px !important;
869
- border: 1px solid #ddd;
870
- }
871
- .sp-taxonomy > .sp-field-notice .sp-notice {
872
- padding: 15px;
873
- border-left-width: 1px;
874
- border-left-style: solid;
875
- border-right-width: 1px;
876
- border-right-style: solid;
877
- }
878
-
879
- .sp-taxonomy-add-fields > .sp-element {
880
- padding: 8px 0;
881
- margin: 0 0 10px;
882
- }
883
- .sp-taxonomy-add-fields > .sp-element > .sp-title {
884
- float: none;
885
- width: 100%;
886
- padding: 2px 2px 4px 0;
887
- }
888
- .sp-taxonomy-add-fields > .sp-element > .sp-title h4 {
889
- font-size: 12px;
890
- font-weight: normal;
891
- }
892
- .sp-taxonomy-add-fields > .sp-element > .sp-fieldset {
893
- margin-left: 0;
894
- }
895
- .sp-taxonomy-add-fields > .sp-element > .sp-fieldset > .sp-help {
896
- right: -5px;
897
- }
898
-
899
- .sp-taxonomy-edit-fields > .sp-element {
900
- padding: 20px 0;
901
- border-bottom: 0;
902
- }
903
- .sp-taxonomy-edit-fields > .sp-element > .sp-title {
904
- width: 225px;
905
- }
906
- .sp-taxonomy-edit-fields > .sp-element > .sp-title h4 {
907
- font-size: 14px;
908
- font-weight: 600;
909
- line-height: 1.3;
910
- display: inline-block;
911
- vertical-align: middle;
912
- }
913
- .sp-taxonomy-edit-fields > .sp-element > .sp-fieldset {
914
- margin-left: 225px;
915
- }
916
- .sp-taxonomy-edit-fields > .sp-element > .sp-fieldset > .sp-help {
917
- top: -5px;
918
- right: -5px;
919
- }
920
- .sp-taxonomy-edit-fields > .sp-field-notice {
921
- margin: 20px 0;
922
- }
923
- .sp-taxonomy-edit-fields > .sp-field-subheading,
924
- .sp-taxonomy-edit-fields > .sp-field-heading {
925
- margin: 20px 0;
926
- border: 1px solid #ddd;
927
- }
928
-
929
- .sp-warning-primary {
930
- color: #fff !important;
931
- border-color: #d02c21 #ba281e #ba281e !important;
932
- background: #e14d43 !important;
933
- -moz-box-shadow: 0 1px 0 #ba281e !important;
934
- -webkit-box-shadow: 0 1px 0 #ba281e !important;
935
- box-shadow: 0 1px 0 #ba281e !important;
936
- text-shadow: 0 -1px 1px #ba281e, 1px 0 1px #ba281e, 0 1px 1px #ba281e, -1px 0 1px !important;
937
- text-shadow: 0 -1px 1px #ba281e, 1px 0 1px #ba281e, 0 1px 1px #ba281e, -1px 0 1px #ba281e !important;
938
- }
939
- .sp-warning-primary:hover, .sp-warning-primary:focus {
940
- border-color: #ba281e !important;
941
- background: #e35950 !important;
942
- -moz-box-shadow: 0 1px 0 #ba281e !important;
943
- -webkit-box-shadow: 0 1px 0 #ba281e !important;
944
- box-shadow: 0 1px 0 #ba281e !important;
945
- }
946
- .sp-warning-primary:active {
947
- border-color: #ba281e !important;
948
- background: #d02c21 !important;
949
- -moz-box-shadow: inset 0 2px 0 #ba281e !important;
950
- -webkit-box-shadow: inset 0 2px 0 #ba281e !important;
951
- box-shadow: inset 0 2px 0 #ba281e !important;
952
- }
953
-
954
- .sp-text-desc {
955
- font-style: italic;
956
- font-weight: 400;
957
- margin-top: 10px;
958
- color: #999;
959
- }
960
-
961
- .sp-text-success {
962
- color: #2b542c;
963
- }
964
-
965
- .sp-text-info {
966
- color: #31708f;
967
- }
968
-
969
- .sp-text-warning {
970
- color: #d02c21;
971
- }
972
-
973
- .sp-text-muted {
974
- color: #aaa;
975
- }
976
-
977
- .sp-text-left {
978
- text-align: left;
979
- }
980
-
981
- .sp-text-center {
982
- text-align: center;
983
- }
984
-
985
- .sp-text-right {
986
- text-align: right;
987
- }
988
-
989
- .sp-block-left {
990
- float: left;
991
- }
992
-
993
- .sp-block-right {
994
- float: right;
995
- }
996
-
997
- .sp-text-highlight {
998
- padding: 2px 4px;
999
- font-size: 90%;
1000
- color: #c7254e;
1001
- background-color: #f9f2f4;
1002
- -moz-border-radius: 2px;
1003
- -webkit-border-radius: 2px;
1004
- border-radius: 2px;
1005
- }
1006
-
1007
- .sp-text-highlight-gray {
1008
- padding: 2px 4px;
1009
- font-size: 90%;
1010
- background-color: #f0f0f0;
1011
- -moz-border-radius: 2px;
1012
- -webkit-border-radius: 2px;
1013
- border-radius: 2px;
1014
- }
1015
-
1016
- #sp-save-ajax {
1017
- display: none;
1018
- position: relative;
1019
- top: 4px;
1020
- right: 5px;
1021
- font-size: 12px;
1022
- padding: 3px 8px;
1023
- color: #fff;
1024
- background-color: #27ae60;
1025
- -moz-border-radius: 2px;
1026
- -webkit-border-radius: 2px;
1027
- border-radius: 2px;
1028
- }
1029
-
1030
- .sp-tooltip {
1031
- position: absolute;
1032
- z-index: 100103;
1033
- display: block;
1034
- visibility: visible;
1035
- font-size: 12px;
1036
- line-height: 1.4;
1037
- opacity: 0;
1038
- -moz-transition: opacity 0.15s linear;
1039
- -o-transition: opacity 0.15s linear;
1040
- -webkit-transition: opacity 0.15s linear;
1041
- transition: opacity 0.15s linear;
1042
- }
1043
- .sp-tooltip.in {
1044
- opacity: 1;
1045
- }
1046
-
1047
- .sp-tooltip-inner {
1048
- max-width: 200px;
1049
- padding: 6px 12px;
1050
- color: #fff;
1051
- text-align: center;
1052
- text-decoration: none;
1053
- background-color: #000;
1054
- background-color: rgba(0, 0, 0, 0.85);
1055
- -moz-border-radius: 4px;
1056
- -webkit-border-radius: 4px;
1057
- border-radius: 4px;
1058
- }
1059
-
1060
- .sp-dialog {
1061
- display: none;
1062
- padding: 0;
1063
- }
1064
- .sp-dialog .sp-dialog-header {
1065
- width: 100%;
1066
- padding: 16px 0;
1067
- background-color: #f5f5f5;
1068
- border-bottom: 1px solid #eee;
1069
- }
1070
- .sp-dialog .sp-dialog-header select,
1071
- .sp-dialog .sp-dialog-header .chosen-container {
1072
- display: block;
1073
- margin: 0 auto;
1074
- width: 250px !important;
1075
- }
1076
- .sp-dialog .sp-element {
1077
- padding: 15px 30px 15px 15px;
1078
- }
1079
- .sp-dialog .sp-insert-button {
1080
- text-align: center;
1081
- width: 100%;
1082
- padding: 16px 0;
1083
- background-color: #f5f5f5;
1084
- border-top: 1px solid #eee;
1085
- }
1086
- .sp-dialog .sp-dialog-load {
1087
- min-height: 250px;
1088
- overflow: hidden;
1089
- overflow-y: auto;
1090
- }
1091
- .sp-dialog .sp-clone-button {
1092
- margin: 10px 0;
1093
- text-align: center;
1094
- }
1095
- .sp-dialog .sp-shortcode-clone {
1096
- position: relative;
1097
- border-top: 1px dashed #5cb85c;
1098
- }
1099
- .sp-dialog .sp-shortcode-clone .sp-remove-clone {
1100
- display: none;
1101
- position: absolute;
1102
- right: 5px;
1103
- top: 5px;
1104
- z-index: 1;
1105
- padding: 5px;
1106
- color: #ed6f6f;
1107
- font-size: 14px;
1108
- }
1109
- .sp-dialog .sp-shortcode-clone .sp-remove-clone:hover {
1110
- text-decoration: none;
1111
- color: #e74242;
1112
- }
1113
- .sp-dialog a:active, .sp-dialog a:focus {
1114
- outline: none;
1115
- -moz-box-shadow: none;
1116
- -webkit-box-shadow: none;
1117
- box-shadow: none;
1118
- }
1119
- .sp-dialog h4 {
1120
- font-size: 13px;
1121
- }
1122
- .sp-dialog h4 small {
1123
- font-style: italic;
1124
- font-weight: 400;
1125
- color: #aaa;
1126
- }
1127
-
1128
- #sp-icon-dialog .sp-icon-search {
1129
- width: 250px;
1130
- height: 40px;
1131
- line-height: 40px;
1132
- }
1133
- #sp-icon-dialog a {
1134
- display: inline-block;
1135
- padding: 5px;
1136
- cursor: pointer;
1137
- }
1138
- #sp-icon-dialog a .sp-icon {
1139
- position: relative;
1140
- padding: 5px;
1141
- display: inline-block;
1142
- font-size: 14px;
1143
- width: 30px;
1144
- height: 26px;
1145
- line-height: 26px;
1146
- text-align: center;
1147
- vertical-align: top;
1148
- color: #555;
1149
- border: 1px solid #ccc;
1150
- background-color: #f7f7f7;
1151
- -moz-border-radius: 3px;
1152
- -webkit-border-radius: 3px;
1153
- border-radius: 3px;
1154
- -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1155
- -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1156
- box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1157
- }
1158
- #sp-icon-dialog a:hover .sp-icon {
1159
- color: #fff;
1160
- border-color: #222;
1161
- background-color: #222;
1162
- }
1163
- #sp-icon-dialog .sp-icon-loading {
1164
- color: #999;
1165
- text-align: center;
1166
- margin-top: 10px;
1167
- }
1168
- #sp-icon-dialog .sp-icon-title {
1169
- padding: 15px;
1170
- margin: 10px 0;
1171
- text-align: center;
1172
- text-transform: uppercase;
1173
- border-top: 1px solid #eee;
1174
- border-bottom: 1px solid #eee;
1175
- background-color: #fafafa;
1176
- }
1177
- #sp-icon-dialog .sp-icon-title:first-child {
1178
- margin-top: 0;
1179
- border-top: 0;
1180
- }
1181
-
1182
- .sp-shortcode-scrolling,
1183
- .sp-icon-scrolling {
1184
- overflow: hidden;
1185
- height: 100%;
1186
- }
1187
- .sp-shortcode-scrolling .wp-full-overlay,
1188
- .sp-icon-scrolling .wp-full-overlay {
1189
- z-index: 1;
1190
- }
1191
-
1192
- .widget-content .sp-element {
1193
- position: relative;
1194
- top: -1px;
1195
- margin-right: -15px;
1196
- margin-left: -15px;
1197
- padding: 12px 15px;
1198
- }
1199
- .widget-content .sp-element:last-child {
1200
- margin-bottom: 15px;
1201
- }
1202
- .widget-content .sp-element .sp-title {
1203
- float: none;
1204
- width: 100%;
1205
- margin-bottom: 5px;
1206
- }
1207
- .widget-content .sp-element .sp-fieldset {
1208
- margin-left: 0;
1209
- }
1210
- .widget-content .sp-field-text input {
1211
- width: 100%;
1212
- }
1213
- .widget-content .sp-field-upload input {
1214
- width: 330px;
1215
- }
1216
- .widget-content .sp-field-notice .sp-notice {
1217
- padding: 15px;
1218
- }
1219
-
1220
- #customize-controls .customize-control-sp_field {
1221
- position: relative;
1222
- top: -10px;
1223
- margin-bottom: 0;
1224
- }
1225
- #customize-controls .customize-control-sp_field:last-child {
1226
- margin-bottom: -25px;
1227
- }
1228
- #customize-controls .customize-control-sp_field:last-child .sp-element {
1229
- border-bottom: none;
1230
- }
1231
- #customize-controls .customize-control-sp_field .chosen-container.chosen-with-drop .chosen-drop {
1232
- position: relative;
1233
- }
1234
- #customize-controls .sp-element {
1235
- margin-right: -20px;
1236
- margin-left: -20px;
1237
- padding: 12px 15px;
1238
- }
1239
- #customize-controls .sp-element .sp-title {
1240
- float: none;
1241
- width: 100%;
1242
- margin-bottom: 10px;
1243
- }
1244
- #customize-controls .sp-element .sp-title h4 {
1245
- font-size: 14px;
1246
- font-weight: 600;
1247
- color: inherit;
1248
- }
1249
- #customize-controls .sp-element .sp-fieldset {
1250
- margin-left: 0;
1251
- }
1252
- #customize-controls .widget-content .sp-element {
1253
- margin-right: -10px;
1254
- margin-left: -10px;
1255
- padding: 10px 12px;
1256
- }
1257
- #customize-controls .sp-field-select select {
1258
- width: 100%;
1259
- }
1260
- #customize-controls .sp-field-upload input {
1261
- width: 175px;
1262
- margin-right: 5px;
1263
- }
1264
- #customize-controls .sp-field-heading {
1265
- color: inherit;
1266
- font-size: 14px;
1267
- line-height: 1em;
1268
- }
1269
- #customize-controls .sp-field-subheading {
1270
- color: inherit;
1271
- font-size: 11px;
1272
- }
1273
- #customize-controls .sp-text-desc {
1274
- margin-top: 4px;
1275
- font-size: 12px;
1276
- }
1277
- #customize-controls .sp-field-content,
1278
- #customize-controls .sp-field-notice .sp-notice {
1279
- padding: 15px;
1280
- }
1281
-
1282
- @media only screen and (max-width: 1200px) {
1283
- .sp-metabox-framework .sp-element .sp-title {
1284
- float: none;
1285
- width: 100%;
1286
- margin-bottom: 10px;
1287
- }
1288
- .sp-metabox-framework .sp-element .sp-fieldset {
1289
- margin-left: 0;
1290
- }
1291
- }
1292
- @media only screen and (max-width: 782px) {
1293
- .sp-tpro-framework .sp-header {
1294
- text-align: center;
1295
- }
1296
- .sp-tpro-framework .sp-header h1 {
1297
- width: 100%;
1298
- margin-bottom: 10px;
1299
- }
1300
- .sp-tpro-framework .sp-header fieldset {
1301
- float: none;
1302
- }
1303
- .sp-tpro-framework .sp-expand-all,
1304
- .sp-tpro-framework .sp-nav-background,
1305
- .sp-tpro-framework .sp-nav {
1306
- display: none;
1307
- }
1308
- .sp-tpro-framework .sp-content {
1309
- margin-left: 0;
1310
- }
1311
- .sp-tpro-framework .sp-section-title,
1312
- .sp-tpro-framework .sp-section {
1313
- display: block !important;
1314
- }
1315
- .sp-tpro-framework .sp-element .sp-title {
1316
- float: none;
1317
- width: 100%;
1318
- margin-bottom: 10px;
1319
- }
1320
- .sp-tpro-framework .sp-element .sp-fieldset {
1321
- margin-left: 0;
1322
- }
1323
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/metabox/assets/js/sp-framework.js DELETED
@@ -1,356 +0,0 @@
1
- /**
2
- *
3
- * -----------------------------------------------------------
4
- *
5
- * ShapedPlugin Framework
6
- * A Lightweight and easy-to-use WordPress Options Framework
7
- *
8
- * Copyright 2017 www.shapedplugin.com
9
- *
10
- * -----------------------------------------------------------
11
- *
12
- */
13
- ;(function ( $, window, document, undefined ) {
14
- 'use strict';
15
-
16
- $.SPFRAMEWORK = $.SPFRAMEWORK || {};
17
-
18
- // caching selector
19
- var $sp_body = $('body');
20
-
21
- // caching variables
22
- var sp_is_rtl = $sp_body.hasClass('rtl');
23
-
24
- // ======================================================
25
- // SPFRAMEWORK TAB NAVIGATION
26
- // ------------------------------------------------------
27
- $.fn.SPFRAMEWORK_TAB_NAVIGATION = function() {
28
- return this.each(function() {
29
-
30
- var $this = $(this),
31
- $nav = $this.find('.sp-nav'),
32
- $reset = $this.find('.sp-reset'),
33
- $expand = $this.find('.sp-expand-all');
34
-
35
- $nav.find('ul:first a').on('click', function (e) {
36
-
37
- e.preventDefault();
38
-
39
- var $el = $(this),
40
- $next = $el.next(),
41
- $target = $el.data('section');
42
-
43
- if( $next.is('ul') ) {
44
-
45
- $next.slideToggle( 'fast' );
46
- $el.closest('li').toggleClass('sp-tab-active');
47
-
48
- } else {
49
-
50
- $('#sp-tab-'+$target).fadeIn('fast').siblings().hide();
51
- $nav.find('a').removeClass('sp-section-active');
52
- $el.addClass('sp-section-active');
53
- $reset.val($target);
54
-
55
- }
56
-
57
- });
58
-
59
- $expand.on('click', function (e) {
60
- e.preventDefault();
61
- $this.find('.sp-body').toggleClass('sp-show-all');
62
- $(this).find('.fa').toggleClass('fa-eye-slash' ).toggleClass('fa-eye');
63
- });
64
-
65
- });
66
- };
67
-
68
- // ======================================================
69
-
70
- // ======================================================
71
- // SPFRAMEWORK SAVE OPTIONS
72
- // ------------------------------------------------------
73
- $.fn.SPFRAMEWORK_SAVE = function() {
74
- return this.each( function() {
75
-
76
- var $this = $(this),
77
- $text = $this.data('save'),
78
- $value = $this.val(),
79
- $ajax = $('#sp-save-ajax');
80
-
81
- $(document).on('keydown', function(event) {
82
- if (event.ctrlKey || event.metaKey) {
83
- if( String.fromCharCode(event.which).toLowerCase() === 's' ) {
84
- event.preventDefault();
85
- $this.trigger('click');
86
- }
87
- }
88
- });
89
-
90
- $this.on('click', function ( e ) {
91
-
92
- if( $ajax.length ) {
93
-
94
- if( typeof tinyMCE === 'object' ) {
95
- tinyMCE.triggerSave();
96
- }
97
-
98
- $this.prop('disabled', true).attr('value', $text);
99
-
100
- var serializedOptions = $('#sp_framework_form').serialize();
101
-
102
- $.post( 'options.php', serializedOptions ).error( function() {
103
- alert('Error, Please try again.');
104
- }).success( function() {
105
- $this.prop('disabled', false).attr('value', $value);
106
- $ajax.hide().fadeIn().delay(250).fadeOut();
107
- });
108
-
109
- e.preventDefault();
110
-
111
- } else {
112
-
113
- $this.addClass('disabled').attr('value', $text);
114
-
115
- }
116
-
117
- });
118
-
119
- });
120
- };
121
- // ======================================================
122
-
123
- // ======================================================
124
- // SPFRAMEWORK UI DIALOG OVERLAY HELPER
125
- // ------------------------------------------------------
126
- if( typeof $.widget !== 'undefined' && typeof $.ui !== 'undefined' && typeof $.ui.dialog !== 'undefined' ) {
127
- $.widget( 'ui.dialog', $.ui.dialog, {
128
- _createOverlay: function() {
129
- this._super();
130
- if ( !this.options.modal ) { return; }
131
- this._on(this.overlay, {click: 'close'});
132
- }
133
- }
134
- );
135
- }
136
-
137
- // ======================================================
138
-
139
- // ======================================================
140
- // SPFRAMEWORK COLORPICKER
141
- // ------------------------------------------------------
142
- if( typeof Color === 'function' ) {
143
-
144
- // adding alpha support for Automattic Color.js toString function.
145
- Color.fn.toString = function () {
146
-
147
- // check for alpha
148
- if ( this._alpha < 1 ) {
149
- return this.toCSS('rgba', this._alpha).replace(/\s+/g, '');
150
- }
151
-
152
- var hex = parseInt( this._color, 10 ).toString( 16 );
153
-
154
- if ( this.error ) { return ''; }
155
-
156
- // maybe left pad it
157
- if ( hex.length < 6 ) {
158
- for (var i = 6 - hex.length - 1; i >= 0; i--) {
159
- hex = '0' + hex;
160
- }
161
- }
162
-
163
- return '#' + hex;
164
-
165
- };
166
-
167
- }
168
-
169
- $.SPFRAMEWORK.PARSE_COLOR_VALUE = function( val ) {
170
-
171
- var value = val.replace(/\s+/g, ''),
172
- alpha = ( value.indexOf('rgba') !== -1 ) ? parseFloat( value.replace(/^.*,(.+)\)/, '$1') * 100 ) : 100,
173
- rgba = ( alpha < 100 ) ? true : false;
174
-
175
- return { value: value, alpha: alpha, rgba: rgba };
176
-
177
- };
178
-
179
- $.fn.SPFRAMEWORK_COLORPICKER = function() {
180
-
181
- return this.each(function() {
182
-
183
- var $this = $(this);
184
-
185
- // check for rgba enabled/disable
186
- if( $this.data('rgba') !== false ) {
187
-
188
- // parse value
189
- var picker = $.SPFRAMEWORK.PARSE_COLOR_VALUE( $this.val() );
190
-
191
- // wpColorPicker core
192
- $this.wpColorPicker({
193
-
194
- // wpColorPicker: clear
195
- clear: function() {
196
- $this.trigger('keyup');
197
- },
198
-
199
- // wpColorPicker: change
200
- change: function( event, ui ) {
201
-
202
- var ui_color_value = ui.color.toString();
203
-
204
- // update checkerboard background color
205
- $this.closest('.wp-picker-container').find('.sp-alpha-slider-offset').css('background-color', ui_color_value);
206
- $this.val(ui_color_value).trigger('change');
207
-
208
- },
209
-
210
- // wpColorPicker: create
211
- create: function() {
212
-
213
- // set variables for alpha slider
214
- var a8cIris = $this.data('a8cIris'),
215
- $container = $this.closest('.wp-picker-container'),
216
-
217
- // appending alpha wrapper
218
- $alpha_wrap = $('<div class="sp-alpha-wrap">' +
219
- '<div class="sp-alpha-slider"></div>' +
220
- '<div class="sp-alpha-slider-offset"></div>' +
221
- '<div class="sp-alpha-text"></div>' +
222
- '</div>').appendTo( $container.find('.wp-picker-holder') ),
223
-
224
- $alpha_slider = $alpha_wrap.find('.sp-alpha-slider'),
225
- $alpha_text = $alpha_wrap.find('.sp-alpha-text'),
226
- $alpha_offset = $alpha_wrap.find('.sp-alpha-slider-offset');
227
-
228
- // alpha slider
229
- $alpha_slider.slider({
230
-
231
- // slider: slide
232
- slide: function( event, ui ) {
233
-
234
- var slide_value = parseFloat( ui.value / 100 );
235
-
236
- // update iris data alpha && wpColorPicker color option && alpha text
237
- a8cIris._color._alpha = slide_value;
238
- $this.wpColorPicker( 'color', a8cIris._color.toString() );
239
- $alpha_text.text( ( slide_value < 1 ? slide_value : '' ) );
240
-
241
- },
242
-
243
- // slider: create
244
- create: function() {
245
-
246
- var slide_value = parseFloat( picker.alpha / 100 ),
247
- alpha_text_value = slide_value < 1 ? slide_value : '';
248
-
249
- // update alpha text && checkerboard background color
250
- $alpha_text.text(alpha_text_value);
251
- $alpha_offset.css('background-color', picker.value);
252
-
253
- // wpColorPicker clear for update iris data alpha && alpha text && slider color option
254
- $container.on('click', '.wp-picker-clear', function() {
255
-
256
- a8cIris._color._alpha = 1;
257
- $alpha_text.text('');
258
- $alpha_slider.slider('option', 'value', 100).trigger('slide');
259
-
260
- });
261
-
262
- // wpColorPicker default button for update iris data alpha && alpha text && slider color option
263
- $container.on('click', '.wp-picker-default', function() {
264
-
265
- var default_picker = $.SPFRAMEWORK.PARSE_COLOR_VALUE( $this.data('default-color') ),
266
- default_value = parseFloat( default_picker.alpha / 100 ),
267
- default_text = default_value < 1 ? default_value : '';
268
-
269
- a8cIris._color._alpha = default_value;
270
- $alpha_text.text(default_text);
271
- $alpha_slider.slider('option', 'value', default_picker.alpha).trigger('slide');
272
-
273
- });
274
-
275
- // show alpha wrapper on click color picker button
276
- $container.on('click', '.wp-color-result', function() {
277
- $alpha_wrap.toggle();
278
- });
279
-
280
- // hide alpha wrapper on click body
281
- $sp_body.on( 'click.wpcolorpicker', function() {
282
- $alpha_wrap.hide();
283
- });
284
-
285
- },
286
-
287
- // slider: options
288
- value: picker.alpha,
289
- step: 1,
290
- min: 1,
291
- max: 100
292
-
293
- });
294
- }
295
-
296
- });
297
-
298
- } else {
299
-
300
- // wpColorPicker default picker
301
- $this.wpColorPicker({
302
- clear: function() {
303
- $this.trigger('keyup');
304
- },
305
- change: function( event, ui ) {
306
- $this.val(ui.color.toString()).trigger('change');
307
- }
308
- });
309
-
310
- }
311
-
312
- });
313
-
314
- };
315
- // ======================================================
316
-
317
- // ======================================================
318
- // ON WIDGET-ADDED RELOAD FRAMEWORK PLUGINS
319
- // ------------------------------------------------------
320
- $.SPFRAMEWORK.WIDGET_RELOAD_PLUGINS = function() {
321
- $(document).on('widget-added widget-updated', function( event, $widget ) {
322
- $widget.SPFRAMEWORK_RELOAD_PLUGINS();
323
- });
324
- };
325
-
326
- // ======================================================
327
- // TOOLTIP HELPER
328
- // ------------------------------------------------------
329
- $.fn.SPFRAMEWORK_TOOLTIP = function() {
330
- return this.each(function() {
331
- var placement = ( sp_is_rtl ) ? 'right' : 'left';
332
- $(this).sptooltip({html:true, placement:placement, container:'body'});
333
- });
334
- };
335
-
336
- // ======================================================
337
- // RELOAD FRAMEWORK PLUGINS
338
- // ------------------------------------------------------
339
- $.fn.SPFRAMEWORK_RELOAD_PLUGINS = function() {
340
- return this.each(function() {
341
- $('.sp-field-color-picker', this).SPFRAMEWORK_COLORPICKER();
342
- $('.sp-help', this).SPFRAMEWORK_TOOLTIP();
343
- });
344
- };
345
-
346
- // ======================================================
347
- // JQUERY DOCUMENT READY
348
- // ------------------------------------------------------
349
- $(document).ready( function() {
350
- $('.sp-tpro-framework').SPFRAMEWORK_TAB_NAVIGATION();
351
- $('.sp-save').SPFRAMEWORK_SAVE();
352
- $sp_body.SPFRAMEWORK_RELOAD_PLUGINS();
353
- $.SPFRAMEWORK.WIDGET_RELOAD_PLUGINS();
354
- });
355
-
356
- })( jQuery, window, document );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/metabox/assets/js/sp-framework.min.js DELETED
@@ -1,2 +0,0 @@
1
- /* ShapedPlugin Framework | A Lightweight and easy-to-use WordPress Options Framework - v1.0.0*/
2
- !function(a,b,c,d){"use strict";a.SPFRAMEWORK=a.SPFRAMEWORK||{};var e=a("body"),f=e.hasClass("rtl");a.fn.SPFRAMEWORK_TAB_NAVIGATION=function(){return this.each(function(){var b=a(this),c=b.find(".sp-nav"),d=b.find(".sp-reset"),e=b.find(".sp-expand-all");c.find("ul:first a").on("click",function(b){b.preventDefault();var e=a(this),f=e.next(),g=e.data("section");f.is("ul")?(f.slideToggle("fast"),e.closest("li").toggleClass("sp-tab-active")):(a("#sp-tab-"+g).fadeIn("fast").siblings().hide(),c.find("a").removeClass("sp-section-active"),e.addClass("sp-section-active"),d.val(g))}),e.on("click",function(c){c.preventDefault(),b.find(".sp-body").toggleClass("sp-show-all"),a(this).find(".fa").toggleClass("fa-eye-slash").toggleClass("fa-eye")})})},a.SPFRAMEWORK.DEPENDENCY=function(b,c){var e=this;e.$el=a(b),e.el=b,e.init=function(){e.ruleset=a.deps.createRuleset();var b={show:function(a){a.removeClass("hidden")},hide:function(a){a.addClass("hidden")},log:!1,checkTargets:!1};c!==d?e.depSub():e.depRoot(),a.deps.enable(e.$el,e.ruleset,b)},e.depRoot=function(){e.$el.each(function(){a(this).find("[data-controller]").each(function(){var b=a(this),c=b.data("controller").split("|"),d=b.data("condition").split("|"),f=b.data("value").toString().split("|"),g=e.ruleset;a.each(c,function(a,c){var e=f[a]||"",h=d[a]||d[0];g=g.createRule('[data-depend-id="'+c+'"]',h,e),g.include(b)})})})},e.depSub=function(){e.$el.each(function(){a(this).find("[data-sub-controller]").each(function(){var b=a(this),c=b.data("sub-controller").split("|"),d=b.data("sub-condition").split("|"),f=b.data("sub-value").toString().split("|"),g=e.ruleset;a.each(c,function(a,c){var e=f[a]||"",h=d[a]||d[0];g=g.createRule('[data-sub-depend-id="'+c+'"]',h,e),g.include(b)})})})},e.init()},a.fn.SPFRAMEWORK_DEPENDENCY=function(b){return this.each(function(){new a.SPFRAMEWORK.DEPENDENCY(this,b)})},a.fn.SPFRAMEWORK_CHOSEN=function(){return this.each(function(){a(this).chosen({allow_single_deselect:!0,disable_search_threshold:15,width:parseFloat(a(this).actual("width")+25)+"px"})})},a.fn.SPFRAMEWORK_IMAGE_SELECTOR=function(){return this.each(function(){a(this).find("label").on("click",function(){a(this).siblings().find("input").prop("checked",!1)})})},a.fn.SPFRAMEWORK_SORTER=function(){return this.each(function(){var b=a(this),c=b.find(".sp-enabled"),d=b.find(".sp-disabled");c.sortable({connectWith:d,placeholder:"ui-sortable-placeholder",update:function(a,b){var c=b.item.find("input");b.item.parent().hasClass("sp-enabled")?c.attr("name",c.attr("name").replace("disabled","enabled")):c.attr("name",c.attr("name").replace("enabled","disabled"))}}),d.sortable({connectWith:c,placeholder:"ui-sortable-placeholder"})})},a.fn.SPFRAMEWORK_UPLOADER=function(){return this.each(function(){var b,c=a(this),d=c.find(".sp-add"),e=c.find("input");d.on("click",function(a){if(a.preventDefault(),"undefined"!=typeof wp&&wp.media&&wp.media.gallery){if(b)return void b.open();b=wp.media({title:d.data("frame-title"),library:{type:d.data("upload-type")},button:{text:d.data("insert-title")}}),b.on("select",function(){var a=b.state().get("selection").first();e.val(a.attributes.url).trigger("change")}),b.open()}})})},a.fn.SPFRAMEWORK_IMAGE_UPLOADER=function(){return this.each(function(){var b,c=a(this),d=c.find(".sp-add"),e=c.find(".sp-image-preview"),f=c.find(".sp-remove"),g=c.find("input"),h=c.find("img");d.on("click",function(a){if(a.preventDefault(),"undefined"!=typeof wp&&wp.media&&wp.media.gallery){if(b)return void b.open();b=wp.media({library:{type:"image"}}),b.on("select",function(){var a=b.state().get("selection").first().attributes,c="undefined"!=typeof a.sizes.thumbnail?a.sizes.thumbnail.url:a.url;e.removeClass("hidden"),h.attr("src",c),g.val(a.id).trigger("change")}),b.open()}}),f.on("click",function(a){a.preventDefault(),g.val("").trigger("change"),e.addClass("hidden")})})},a.fn.SPFRAMEWORK_IMAGE_GALLERY=function(){return this.each(function(){{var b,c,d=a(this),e=d.find(".sp-edit"),f=d.find(".sp-remove"),g=d.find("ul"),h=d.find("input");d.find("img")}d.on("click",".sp-add, .sp-edit",function(d){var i=a(this),j=i.hasClass("sp-edit")?"edit":"add",k="edit"===j?"gallery-edit":"gallery-library";if(d.preventDefault(),"undefined"!=typeof wp&&wp.media&&wp.media.gallery){if(b)return b.open(),void b.setState(k);b=wp.media({library:{type:"image"},frame:"post",state:"gallery",multiple:!0}),b.on("open",function(){var a=h.val();if(a){var c=a.split(","),d=b.state("gallery-edit").get("library");b.setState(k),c.forEach(function(a){var b=wp.media.attachment(a);d.add(b?[b]:[])})}}),b.on("update",function(){var a="",c=[],d=b.state().get("library");d.each(function(b){var d=b.attributes,e="undefined"!=typeof d.sizes.thumbnail?d.sizes.thumbnail.url:d.url;a+='<li><img src="'+e+'"></li>',c.push(d.id)}),h.val(c).trigger("change"),g.html("").append(a),f.removeClass("hidden"),e.removeClass("hidden")}),b.open(),c=j}}),f.on("click",function(a){a.preventDefault(),g.html(""),h.val("").trigger("change"),f.addClass("hidden"),e.addClass("hidden")})})},a.fn.SPFRAMEWORK_TYPOGRAPHY=function(){return this.each(function(){var b=a(this),c=b.find(".sp-typo-family"),d=b.find(".sp-typo-variant"),e=b.find(".sp-typo-font");c.on("change",function(){var b=a(this),c=b.find(":selected").data("type")||"custom",f=b.find(":selected").data("variants");d.length&&(d.find("option").remove(),a.each(f.split("|"),function(a,b){d.append('<option value="'+b+'">'+b+"</option>")}),d.find('option[value="regular"]').attr("selected","selected").trigger("chosen:updated")),e.val(c)})})},a.fn.SPFRAMEWORK_GROUP=function(){return this.each(function(){var b=a(this),c=b.find(".sp-groups"),d=b.find(".sp-accordion"),e=b.find(".sp-group:first").clone();d.length&&d.accordion({header:".sp-group-title",collapsible:!0,active:!1,animate:250,heightStyle:"content",icons:{header:"dashicons dashicons-arrow-right",activeHeader:"dashicons dashicons-arrow-down"},beforeActivate:function(b,c){a(c.newPanel).SPFRAMEWORK_DEPENDENCY("sub")}}),c.sortable({axis:"y",handle:".sp-group-title",helper:"original",cursor:"move",placeholder:"widget-placeholder",start:function(a,b){var d=b.item.children(".sp-group-content");"block"===d.css("display")&&(d.hide(),c.sortable("refreshPositions"))},stop:function(a,b){b.item.children(".sp-group-title").triggerHandler("focusout"),d.accordion({active:!1})}});var f=0;a(".sp-add-group",b).on("click",function(a){a.preventDefault(),e.find("input, select, textarea").each(function(){this.name=this.name.replace(/\[(\d+)\]/,function(a,b){return"["+(parseInt(b,10)+1)+"]"})});var b=e.clone().removeClass("hidden");c.append(b),d.length&&(c.accordion("refresh"),c.accordion({active:b.index()})),c.find("input, select, textarea").each(function(){this.name=this.name.replace("[_nonce]","")}),b.SPFRAMEWORK_DEPENDENCY("sub"),b.SPFRAMEWORK_RELOAD_PLUGINS(),f++}),c.on("click",".sp-remove-group",function(b){b.preventDefault(),a(this).closest(".sp-group").remove()})})},a.fn.SPFRAMEWORK_CONFIRM=function(){return this.each(function(){a(this).on("click",function(a){confirm("Are you sure?")||a.preventDefault()})})},a.fn.SPFRAMEWORK_SAVE=function(){return this.each(function(){var b=a(this),d=b.data("save"),e=b.val(),f=a("#sp-save-ajax");a(c).on("keydown",function(a){(a.ctrlKey||a.metaKey)&&"s"===String.fromCharCode(a.which).toLowerCase()&&(a.preventDefault(),b.trigger("click"))}),b.on("click",function(c){if(f.length){"object"==typeof tinyMCE&&tinyMCE.triggerSave(),b.prop("disabled",!0).attr("value",d);var g=a("#sp_framework_form").serialize();a.post("options.php",g).error(function(){alert("Error, Please try again.")}).success(function(){b.prop("disabled",!1).attr("value",e),f.hide().fadeIn().delay(250).fadeOut()}),c.preventDefault()}else b.addClass("disabled").attr("value",d)})})},"undefined"!=typeof a.widget&&"undefined"!=typeof a.ui&&"undefined"!=typeof a.ui.dialog&&a.widget("ui.dialog",a.ui.dialog,{_createOverlay:function(){this._super(),this.options.modal&&this._on(this.overlay,{click:"close"})}}),a.SPFRAMEWORK.ICONS_MANAGER=function(){var c,d=this,f=!0;d.init=function(){e.on("click",".sp-icon-add",function(d){d.preventDefault();var g=a(this),h=a("#sp-icon-dialog"),i=h.find(".sp-dialog-load"),j=(h.find(".sp-dialog-select"),h.find(".sp-dialog-insert"),h.find(".sp-icon-search"));c=g.closest(".sp-icon-select"),h.dialog({width:850,height:700,modal:!0,resizable:!1,closeOnEscape:!0,position:{my:"center",at:"center",of:b},open:function(){e.addClass("sp-icon-scrolling"),a(".ui-dialog-titlebar-close").addClass("ui-button"),a(b).on("resize",function(){var c=a(b).height(),d=Math.floor(c-237),e=Math.floor(c-125);h.dialog("option","height",e).parent().css("max-height",e),h.css("overflow","auto"),i.css("height",d)}).resize()},close:function(){e.removeClass("sp-icon-scrolling")}}),f&&a.ajax({type:"POST",url:ajaxurl,data:{action:"sp-get-icons"},success:function(b){i.html(b),f=!1,i.on("click","a",function(b){b.preventDefault();var d=a(this).data("icon");c.find("i").removeAttr("class").addClass(d),c.find("input").val(d).trigger("change"),c.find(".sp-icon-preview").removeClass("hidden"),c.find(".sp-icon-remove").removeClass("hidden"),h.dialog("close")}),j.keyup(function(){var b=a(this).val(),c=i.find("a");c.each(function(){var c=a(this);c.data("icon").search(new RegExp(b,"i"))<0?c.hide():c.show()})}),i.find(".sp-icon-tooltip").sptooltip({html:!0,placement:"top",container:"body"})}})}),e.on("click",".sp-icon-remove",function(b){b.preventDefault();var c=a(this),d=c.closest(".sp-icon-select");d.find(".sp-icon-preview").addClass("hidden"),d.find("input").val("").trigger("change"),c.addClass("hidden")})},d.init()},a.SPFRAMEWORK.SHORTCODE_MANAGER=function(){var c,f=this;f.init=function(){var d,g,h,i,j,k=a("#sp-shortcode-dialog"),l=k.find(".sp-dialog-insert"),m=k.find(".sp-dialog-load"),n=k.find(".sp-dialog-select"),o=!1;e.on("click",".sp-shortcode",function(c){c.preventDefault(),n.SPFRAMEWORK_CHOSEN(),i=a(this),o=i.hasClass("sp-shortcode-textarea"),j=i.data("editor-id"),k.dialog({width:850,height:700,modal:!0,resizable:!1,closeOnEscape:!0,position:{my:"center",at:"center",of:b},open:function(){e.addClass("sp-shortcode-scrolling"),a(".ui-dialog-titlebar-close").addClass("ui-button"),a(b).on("resize",function(){var c=a(b).height(),d=Math.floor(c-281),e=Math.floor(c-125);k.dialog("option","height",e).parent().css("max-height",e),k.css("overflow","auto"),m.css("height",d)}).resize()},close:function(){o=!1,e.removeClass("sp-shortcode-scrolling")}})}),n.on("change",function(){var b=a(this);d=b.val(),g=b.find(":selected").data("view"),d.length?a.ajax({type:"POST",url:ajaxurl,data:{action:"sp-get-shortcode",shortcode:d},success:function(b){m.html(b),l.parent().removeClass("hidden"),h=a(".sp-shortcode-clone",k).clone(),m.SPFRAMEWORK_DEPENDENCY(),m.SPFRAMEWORK_DEPENDENCY("sub"),m.SPFRAMEWORK_RELOAD_PLUGINS()}}):(l.parent().addClass("hidden"),m.html(""))}),l.on("click",function(b){b.preventDefault();var e="",h="data-atts",l="data-clone-atts",m="data-clone-id";switch(g){case"contents":a("["+h+"]",".sp-dialog-load").each(function(){var b=a(this),c=b.data("atts");e+="["+c+"]",e+=b.val(),e+="[/"+c+"]"});break;case"clone":e+="["+d,a("["+h+"]",".sp-dialog-load .sp-element:not(.hidden)").each(function(){var b=a(this),c=b.data("atts");console.log(c),e+=f.validate_atts(c,b)}),e+="]",a("["+m+"]",".sp-dialog-load").each(function(){var b=a(this),c=b.data("clone-id");e+="["+c,a("["+l+"]",b.find(".sp-element").not(".hidden")).each(function(){var b=a(this),d=b.data("clone-atts");"content"!==d?e+=f.validate_atts(d,b):"content"===d&&(e+="]",e+=b.val(),e+="[/"+c)}),e+="]"}),e+="[/"+d+"]";break;case"clone_duplicate":a("["+m+"]",".sp-dialog-load").each(function(){var b=a(this),c=b.data("clone-id");e+="["+c,a("["+l+"]",b.find(".sp-element").not(".hidden")).each(function(){var b=a(this),d=b.data("clone-atts");"content"!==d?e+=f.validate_atts(d,b):"content"===d&&(e+="]",e+=b.val(),e+="[/"+c)}),e+="]"});break;default:e+="["+d,a("["+h+"]",".sp-dialog-load .sp-element:not(.hidden)").each(function(){var b=a(this),c=b.data("atts");"content"!==c?e+=f.validate_atts(c,b):"content"===c&&(e+="]",e+=b.val(),e+="[/"+d)}),e+="]"}if(o){var n=i.next();n.val(f.insertAtChars(n,e)).trigger("change")}else f.send_to_editor(e,j);c=null,k.dialog("close")});var p=0;k.on("click","#shortcode-clone-button",function(b){b.preventDefault();var c=h.clone().hide();c.find("input:radio").attr("name","_nonce_"+p),a(".sp-shortcode-clone:last").after(c),c.slideDown(100),c.find(".sp-remove-clone").show().on("click",function(a){c.slideUp(100,function(){c.remove()}),a.preventDefault()}),c.SPFRAMEWORK_DEPENDENCY("sub"),c.SPFRAMEWORK_RELOAD_PLUGINS(),p++})},f.validate_atts=function(b,e){var f;return e.data("check")!==d&&c===b?"":(c=b,e.closest(".pseudo-field").hasClass("hidden")===!0?"":e.hasClass("pseudo")===!0?"":(f=e.is(":checkbox")||e.is(":radio")?e.is(":checked")?e.val():"":e.val(),e.data("check")!==d&&(f=e.closest(".sp-element").find("input:checked").map(function(){return a(this).val()}).get()),null!==f&&f!==d&&""!==f&&0!==f.length?" "+b+'="'+f+'"':""))},f.insertAtChars=function(a,b){var c="undefined"!=typeof a[0].name?a[0]:a;return c.value.length&&"undefined"!=typeof c.selectionStart?(c.focus(),c.value.substring(0,c.selectionStart)+b+c.value.substring(c.selectionEnd,c.value.length)):(c.focus(),b)},f.send_to_editor=function(b,c){var d;if("undefined"!=typeof tinymce&&(d=tinymce.get(c)),d&&!d.isHidden())d.execCommand("mceInsertContent",!1,b);else{var e=a("#"+c);e.val(f.insertAtChars(e,b)).trigger("change")}},f.init()},"function"==typeof Color&&(Color.fn.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var a=parseInt(this._color,10).toString(16);if(this.error)return"";if(a.length<6)for(var b=6-a.length-1;b>=0;b--)a="0"+a;return"#"+a}),a.SPFRAMEWORK.PARSE_COLOR_VALUE=function(a){var b=a.replace(/\s+/g,""),c=-1!==b.indexOf("rgba")?parseFloat(100*b.replace(/^.*,(.+)\)/,"$1")):100,d=100>c?!0:!1;return{value:b,alpha:c,rgba:d}},a.fn.SPFRAMEWORK_COLORPICKER=function(){return this.each(function(){var b=a(this);if(b.data("rgba")!==!1){var c=a.SPFRAMEWORK.PARSE_COLOR_VALUE(b.val());b.wpColorPicker({clear:function(){b.trigger("keyup")},change:function(a,c){var d=c.color.toString();b.closest(".wp-picker-container").find(".sp-alpha-slider-offset").css("background-color",d),b.val(d).trigger("change")},create:function(){var d=b.data("a8cIris"),f=b.closest(".wp-picker-container"),g=a('<div class="sp-alpha-wrap"><div class="sp-alpha-slider"></div><div class="sp-alpha-slider-offset"></div><div class="sp-alpha-text"></div></div>').appendTo(f.find(".wp-picker-holder")),h=g.find(".sp-alpha-slider"),i=g.find(".sp-alpha-text"),j=g.find(".sp-alpha-slider-offset");h.slider({slide:function(a,c){var e=parseFloat(c.value/100);d._color._alpha=e,b.wpColorPicker("color",d._color.toString()),i.text(1>e?e:"")},create:function(){var k=parseFloat(c.alpha/100),l=1>k?k:"";i.text(l),j.css("background-color",c.value),f.on("click",".wp-picker-clear",function(){d._color._alpha=1,i.text(""),h.slider("option","value",100).trigger("slide")}),f.on("click",".wp-picker-default",function(){var c=a.SPFRAMEWORK.PARSE_COLOR_VALUE(b.data("default-color")),e=parseFloat(c.alpha/100),f=1>e?e:"";d._color._alpha=e,i.text(f),h.slider("option","value",c.alpha).trigger("slide")}),f.on("click",".wp-color-result",function(){g.toggle()}),e.on("click.wpcolorpicker",function(){g.hide()})},value:c.alpha,step:1,min:1,max:100})}})}else b.wpColorPicker({clear:function(){b.trigger("keyup")},change:function(a,c){b.val(c.color.toString()).trigger("change")}})})},a.SPFRAMEWORK.WIDGET_RELOAD_PLUGINS=function(){a(c).on("widget-added widget-updated",function(a,b){b.SPFRAMEWORK_RELOAD_PLUGINS(),b.SPFRAMEWORK_DEPENDENCY()})},a.fn.SPFRAMEWORK_TOOLTIP=function(){return this.each(function(){var b=f?"right":"left";a(this).sptooltip({html:!0,placement:b,container:"body"})})},a.fn.SPFRAMEWORK_RELOAD_PLUGINS=function(){return this.each(function(){a(".chosen",this).SPFRAMEWORK_CHOSEN(),a(".sp-field-image-select",this).SPFRAMEWORK_IMAGE_SELECTOR(),a(".sp-field-image",this).SPFRAMEWORK_IMAGE_UPLOADER(),a(".sp-field-gallery",this).SPFRAMEWORK_IMAGE_GALLERY(),a(".sp-field-sorter",this).SPFRAMEWORK_SORTER(),a(".sp-field-upload",this).SPFRAMEWORK_UPLOADER(),a(".sp-field-typography",this).SPFRAMEWORK_TYPOGRAPHY(),a(".sp-field-color-picker",this).SPFRAMEWORK_COLORPICKER(),a(".sp-help",this).SPFRAMEWORK_TOOLTIP()})},a(c).ready(function(){a(".sp-tpro-framework").SPFRAMEWORK_TAB_NAVIGATION(),a(".sp-reset-confirm, .sp-import-backup").SPFRAMEWORK_CONFIRM(),a(".sp-content, .wp-customizer, .widget-content, .sp-taxonomy").SPFRAMEWORK_DEPENDENCY(),a(".sp-field-group").SPFRAMEWORK_GROUP(),a(".sp-save").SPFRAMEWORK_SAVE(),e.SPFRAMEWORK_RELOAD_PLUGINS(),a.SPFRAMEWORK.ICONS_MANAGER(),a.SPFRAMEWORK.SHORTCODE_MANAGER(),a.SPFRAMEWORK.WIDGET_RELOAD_PLUGINS()})}(jQuery,window,document);
 
 
admin/views/metabox/assets/js/sp-plugins.js DELETED
@@ -1,1148 +0,0 @@
1
-
2
- /**
3
- * jQuery Interdependencies library
4
- *
5
- * http://miohtama.github.com/jquery-interdependencies/
6
- *
7
- * Copyright 2012-2013 Mikko Ohtamaa, others
8
- */
9
-
10
- /*global console, window*/
11
-
12
- (function($) {
13
-
14
- "use strict";
15
-
16
- /**
17
- * Microsoft safe helper to spit out our little diagnostics information
18
- *
19
- * @ignore
20
- */
21
- function log(msg) {
22
- if(window.console && window.console.log) {
23
- console.log(msg);
24
- }
25
- }
26
-
27
-
28
- /**
29
- * jQuery.find() workaround for IE7
30
- *
31
- * If your selector is an pure tag id (#foo) IE7 finds nothing
32
- * if you do jQuery.find() in a specific jQuery context.
33
- *
34
- * This workaround makes a (false) assumptions
35
- * ids are always unique across the page.
36
- *
37
- * @ignore
38
- *
39
- * @param {jQuery} context jQuery context where we look child elements
40
- * @param {String} selector selector as a string
41
- * @return {jQuery} context.find() result
42
- */
43
- function safeFind(context, selector) {
44
-
45
- if(selector[0] == "#") {
46
-
47
- // Pseudo-check that this is a simple id selector
48
- // and not a complex jQuery selector
49
- if(selector.indexOf(" ") < 0) {
50
- return $(selector);
51
- }
52
- }
53
-
54
- return context.find(selector);
55
- }
56
-
57
- /**
58
- * Sample configuration object which can be passed to {@link jQuery.deps#enable}
59
- *
60
- * @class Configuration
61
- */
62
- var configExample = {
63
-
64
- /**
65
- * @cfg show Callback function show(elem) for showing elements
66
- * @type {Function}
67
- */
68
- show : null,
69
-
70
- /**
71
- * @cfg hide Callback function hide(elem) for hiding elements
72
- * @type {Function}
73
- */
74
- hide : null,
75
-
76
- /**
77
- * @cfg log Write console.log() output of rule applying
78
- * @type {Boolean}
79
- */
80
- log : false,
81
-
82
-
83
- /**
84
- * @cfg checkTargets When ruleset is enabled, check that all controllers and controls referred by ruleset exist on the page.
85
- *
86
- * @default true
87
- *
88
- * @type {Boolean}
89
- */
90
- checkTargets : true
91
-
92
- };
93
-
94
- /**
95
- * Define one field inter-dependency rule.
96
- *
97
- * When condition is true then this input and all
98
- * its children rules' inputs are visible.
99
- *
100
- * Possible condition strings:
101
- *
102
- * * **==** Widget value must be equal to given value
103
- *
104
- * * **any** Widget value must be any of the values in the given value array
105
- *
106
- * * **non-any** Widget value must not be any of the values in the given value array
107
- *
108
- * * **!=** Widget value must not be qual to given value
109
- *
110
- * * **()** Call value as a function(context, controller, ourWidgetValue) and if it's true then the condition is true
111
- *
112
- * * **null** This input does not have any sub-conditions
113
- *
114
- *
115
- *
116
- */
117
- function Rule(controller, condition, value) {
118
- this.init(controller, condition, value);
119
- }
120
-
121
- $.extend(Rule.prototype, {
122
-
123
- /**
124
- * @method constructor
125
- *
126
- * @param {String} controller jQuery expression to match the `<input>` source
127
- *
128
- * @param {String} condition What input value must be that {@link Rule the rule takes effective}.
129
- *
130
- * @param value Matching value of **controller** when widgets become visible
131
- *
132
- */
133
- init : function(controller, condition, value) {
134
- this.controller = controller;
135
-
136
- this.condition = condition;
137
-
138
- this.value = value;
139
-
140
- // Child rules
141
- this.rules = [];
142
-
143
- // Controls shown/hidden by this rule
144
- this.controls = [];
145
- },
146
-
147
- /**
148
- * Evaluation engine
149
- *
150
- * @param {String} condition Any of given conditions in Rule class description
151
- * @param {Object} val1 The base value we compare against
152
- * @param {Object} val2 Something we got out of input
153
- * @return {Boolean} true or false
154
- */
155
- evalCondition : function(context, control, condition, val1, val2) {
156
-
157
- /**
158
- *
159
- * ShapedPlugin Framework
160
- * Added new condition for ShapedPlugin Framework
161
- *
162
- * @since 1.0.0
163
- * @version 1.0.0
164
- *
165
- */
166
- if(condition == "==") {
167
- return this.checkBoolean(val1) == this.checkBoolean(val2);
168
- } else if(condition == "!=") {
169
- return this.checkBoolean(val1) != this.checkBoolean(val2);
170
- } else if(condition == ">=") {
171
- return Number(val2) >= Number(val1);
172
- } else if(condition == "<=") {
173
- return Number(val2) <= Number(val1);
174
- } else if(condition == ">") {
175
- return Number(val2) > Number(val1);
176
- } else if(condition == "<") {
177
- return Number(val2) < Number(val1);
178
- } else if(condition == "()") {
179
- return window[val1](context, control, val2); // FIXED: function method
180
- } else if(condition == "any") {
181
- return $.inArray(val2, val1.split(',')) > -1;
182
- } else if(condition == "not-any") {
183
- return $.inArray(val2, val1.split(',')) == -1;
184
- } else {
185
- throw new Error("Unknown condition:" + condition);
186
- }
187
-
188
- },
189
-
190
- /**
191
- *
192
- * ShapedPlugin Framework
193
- * Added Boolean value type checker
194
- *
195
- * @since 1.0.0
196
- * @version 1.0.0
197
- *
198
- */
199
- checkBoolean: function(value) {
200
-
201
- switch(value) {
202
-
203
- case true:
204
- case 'true':
205
- case 1:
206
- case '1':
207
- //case 'on':
208
- //case 'yes':
209
- value = true;
210
- break;
211
-
212
- case false:
213
- case 'false':
214
- case 0:
215
- case '0':
216
- //case 'off':
217
- //case 'no':
218
- value = false;
219
- break;
220
-
221
- }
222
-
223
- return value;
224
- },
225
-
226
- /**
227
- * Evaluate the condition of this rule in given jQuery context.
228
- *
229
- * The widget value is extracted using getControlValue()
230
- *
231
- * @param {jQuery} context The jQuery selection in which this rule is evaluated.
232
- *
233
- */
234
- checkCondition : function(context, cfg) {
235
-
236
- // We do not have condition set, we are always true
237
- if(!this.condition) {
238
- return true;
239
- }
240
-
241
- var control = context.find(this.controller);
242
- if(control.size() === 0 && cfg.log) {
243
- log("Evaling condition: Could not find controller input " + this.controller);
244
- }
245
-
246
- var val = this.getControlValue(context, control);
247
- if(cfg.log && val === undefined) {
248
- log("Evaling condition: Could not exctract value from input " + this.controller);
249
- }
250
-
251
- if(val === undefined) {
252
- return false;
253
- }
254
-
255
- val = this.normalizeValue(control, this.value, val);
256
-
257
- return this.evalCondition(context, control, this.condition, this.value, val);
258
- },
259
-
260
- /**
261
- * Make sure that what we read from input field is comparable against Javascript primitives
262
- *
263
- */
264
- normalizeValue : function(control, baseValue, val) {
265
-
266
- if(typeof baseValue == "number") {
267
- // Make sure we compare numbers against numbers
268
- return parseFloat(val);
269
- }
270
-
271
- return val;
272
- },
273
-
274
- /**
275
- * Read value from a diffent HTML controls.
276
- *
277
- * Handle, text, checkbox, radio, select.
278
- *
279
- */
280
- getControlValue : function(context, control) {
281
-
282
- /**
283
- *
284
- * ShapedPlugin Framework
285
- * Added multiple checkbox value control
286
- *
287
- * @since 1.0.0
288
- * @version 1.0.0
289
- *
290
- */
291
- if( ( control.attr("type") == "radio" || control.attr("type") == "checkbox" ) && control.size() > 1 ) {
292
- return control.filter(":checked").val();
293
- }
294
-
295
- // Handle individual checkboxes & radio
296
- if ( control.attr("type") == "checkbox" || control.attr("type") == "radio" ) {
297
- return control.is(":checked");
298
- }
299
-
300
- return control.val();
301
-
302
- },
303
-
304
- /**
305
- * Create a sub-rule.
306
- *
307
- * Example:
308
- *
309
- * var masterSwitch = ruleset.createRule("#mechanicalThrombectomyDevice")
310
- * var twoAttempts = masterSwitch.createRule("#numberOfAttempts", "==", 2);
311
- *
312
- * @return Rule instance
313
- */
314
- createRule : function(controller, condition, value) {
315
- var rule = new Rule(controller, condition, value);
316
- this.rules.push(rule);
317
- return rule;
318
- },
319
-
320
- /**
321
- * Include a control in this rule.
322
- *
323
- * @param {String} input jQuery expression to match the input within ruleset context
324
- */
325
- include : function(input) {
326
-
327
- if(!input) {
328
- throw new Error("Must give an input selector");
329
- }
330
-
331
- this.controls.push(input);
332
- },
333
-
334
- /**
335
- * Apply this rule to all controls in the given context
336
- *
337
- * @param {jQuery} context jQuery selection within we operate
338
- * @param {Object} cfg {@link Configuration} object or undefined
339
- * @param {Object} enforced Recursive rule enforcer: undefined to evaluate condition, true show always, false hide always
340
- *
341
- */
342
- applyRule : function(context, cfg, enforced) {
343
-
344
- var result;
345
-
346
- if(enforced === undefined) {
347
- result = this.checkCondition(context, cfg);
348
- } else {
349
- result = enforced;
350
- }
351
-
352
- if(cfg.log) {
353
- log("Applying rule on " + this.controller + "==" + this.value + " enforced:" + enforced + " result:" + result);
354
- }
355
-
356
- if(cfg.log && !this.controls.length) {
357
- log("Zero length controls slipped through");
358
- }
359
-
360
- // Get show/hide callback functions
361
-
362
- var show = cfg.show || function(control) {
363
- control.show();
364
- };
365
-
366
- var hide = cfg.hide || function(control) {
367
- control.hide();
368
- };
369
-
370
-
371
- // Resolve controls from ids to jQuery selections
372
- // we are controlling in this context
373
- var controls = $.map(this.controls, function(elem, idx) {
374
- var control = context.find(elem);
375
- if(cfg.log && control.size() === 0) {
376
- log("Could not find element:" + elem);
377
- }
378
- return control;
379
- });
380
-
381
- if(result) {
382
-
383
- $(controls).each(function() {
384
-
385
-
386
- // Some friendly debug info
387
- if(cfg.log && $(this).size() === 0) {
388
- log("Control selection is empty when showing");
389
- log(this);
390
- }
391
-
392
- show(this);
393
- });
394
-
395
- // Evaluate all child rules
396
- $(this.rules).each(function() {
397
- this.applyRule(context, cfg);
398
- });
399
-
400
- } else {
401
-
402
- $(controls).each(function() {
403
-
404
- // Some friendly debug info
405
- if(cfg.log && $(this).size() === 0) {
406
- log("Control selection is empty when hiding:");
407
- log(this);
408
- }
409
-
410
- hide(this);
411
- });
412
-
413
- // Supress all child rules
414
- $(this.rules).each(function() {
415
- this.applyRule(context, cfg, false);
416
- });
417
- }
418
- }
419
- });
420
-
421
- /**
422
- * A class which manages interdependenice rules.
423
- */
424
- function Ruleset() {
425
-
426
- // Hold a tree of rules
427
- this.rules = [];
428
- }
429
-
430
- $.extend(Ruleset.prototype, {
431
-
432
- /**
433
- * Add a new rule into this ruletset.
434
- *
435
- * See {@link Rule} about the contstruction parameters.
436
- * @return {Rule}
437
- */
438
- createRule : function(controller, condition, value) {
439
- var rule = new Rule(controller, condition, value);
440
- this.rules.push(rule);
441
- return rule;
442
- },
443
-
444
- /**
445
- * Apply these rules on an element.
446
- *
447
- * @param {jQuery} context Selection we are dealing with
448
- *
449
- * @param cfg {@link Configuration} object or undefined.
450
- */
451
- applyRules: function(context, cfg) {
452
- var i;
453
-
454
- cfg = cfg || {};
455
-
456
- if(cfg.log) {
457
- log("Starting evaluation ruleset of " + this.rules.length + " rules");
458
- }
459
-
460
- for(i=0; i<this.rules.length; i++) {
461
- this.rules[i].applyRule(context, cfg);
462
- }
463
- },
464
-
465
- /**
466
- * Walk all rules and sub-rules in this ruleset
467
- * @param {Function} callback(rule)
468
- *
469
- * @return {Array} Rules as depth-first searched
470
- */
471
- walk : function() {
472
-
473
- var rules = [];
474
-
475
- function descent(rule) {
476
-
477
- rules.push(rule);
478
-
479
- $(rule.children).each(function() {
480
- descent(this);
481
- });
482
- }
483
-
484
- $(this.rules).each(function() {
485
- descent(this);
486
- });
487
-
488
- return rules;
489
- },
490
-
491
-
492
- /**
493
- * Check that all controllers and controls referred in ruleset exist.
494
- *
495
- * Throws an Error if any of them are missing.
496
- *
497
- * @param {jQuery} context jQuery selection of items
498
- *
499
- * @param {Configuration} cfg
500
- */
501
- checkTargets : function(context, cfg) {
502
-
503
- var controls = 0;
504
- var rules = this.walk();
505
-
506
- $(rules).each(function() {
507
-
508
- if(context.find(this.controller).size() === 0) {
509
- throw new Error("Rule's controller does not exist:" + this.controller);
510
- }
511
-
512
- if(this.controls.length === 0) {
513
- throw new Error("Rule has no controls:" + this);
514
- }
515
-
516
- $(this.controls).each(function() {
517
-
518
- if(safeFind(context, this) === 0) {
519
- throw new Error("Rule's target control " + this + " does not exist in context " + context.get(0));
520
- }
521
-
522
- controls++;
523
- });
524
-
525
- });
526
-
527
- if(cfg.log) {
528
- log("Controller check ok, rules count " + rules.length + " controls count " + controls);
529
- }
530
-
531
- },
532
-
533
- /**
534
- * Make this ruleset effective on the whole page.
535
- *
536
- * Set event handler on **window.document** to catch all input events
537
- * and apply those events to defined rules.
538
- *
539
- * @param {Configuration} cfg {@link Configuration} object or undefined
540
- *
541
- */
542
- install : function(cfg) {
543
- $.deps.enable($(document.body), this, cfg);
544
- }
545
-
546
- });
547
-
548
- /**
549
- * jQuery interdependencie plug-in
550
- *
551
- * @class jQuery.deps
552
- *
553
- */
554
- var deps = {
555
-
556
- /**
557
- * Create a new Ruleset instance.
558
- *
559
- * Example:
560
- *
561
- * $(document).ready(function() {
562
- * // Start creating a new ruleset
563
- * var ruleset = $.deps.createRuleset();
564
- *
565
- *
566
- * @return {Ruleset}
567
- */
568
- createRuleset : function() {
569
- return new Ruleset();
570
- },
571
-
572
-
573
- /**
574
- * Enable ruleset on a specific jQuery selection.
575
- *
576
- * Checks the existince of all ruleset controllers and controls
577
- * by default (see config).
578
- *
579
- * See possible IE event bubbling problems: http://stackoverflow.com/q/265074/315168
580
- *
581
- * @param {Object} selection jQuery selection in where we monitor all change events. All controls and controllers must exist within this selection.
582
- * @param {Ruleset} ruleset
583
- * @param {Configuration} cfg
584
- */
585
- enable : function(selection, ruleset, cfg) {
586
-
587
- cfg = cfg || {};
588
-
589
- if(cfg.checkTargets || cfg.checkTargets === undefined) {
590
- ruleset.checkTargets(selection, cfg);
591
- }
592
-
593
- var self = this;
594
-
595
- if(cfg.log) {
596
- log("Enabling dependency change monitoring on " + selection.get(0));
597
- }
598
-
599
- // Namespace our handler to avoid conflicts
600
- //
601
- var handler = function() { ruleset.applyRules(selection, cfg); };
602
- var val = selection.on ? selection.on("change.deps", null, null, handler) : selection.live("change.deps", handler);
603
-
604
- ruleset.applyRules(selection, cfg);
605
-
606
- return val;
607
- }
608
- };
609
-
610
- $.deps = deps;
611
-
612
- })(jQuery);
613
- ;/* ========================================================================
614
- * Bootstrap: transition.js v3.3.4
615
- * http://getbootstrap.com/javascript/#transitions
616
- * ========================================================================
617
- * Copyright 2011-2015 Twitter, Inc.
618
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
619
- * ========================================================================
620
- * Changed function name for avoid conflict
621
- * ======================================================================== */
622
- +function ($) {
623
- 'use strict';
624
-
625
- // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
626
- // ============================================================
627
-
628
- function transitionEnd() {
629
- var el = document.createElement('bootstrap')
630
-
631
- var transEndEventNames = {
632
- WebkitTransition : 'webkitTransitionEnd',
633
- MozTransition : 'transitionend',
634
- OTransition : 'oTransitionEnd otransitionend',
635
- transition : 'transitionend'
636
- }
637
-
638
- for (var name in transEndEventNames) {
639
- if (el.style[name] !== undefined) {
640
- return { end: transEndEventNames[name] }
641
- }
642
- }
643
-
644
- return false // explicit for ie8 ( ._.)
645
- }
646
-
647
- // http://blog.alexmaccaw.com/css-transitions
648
- $.fn.CSemulateTransitionEnd = function (duration) {
649
- var called = false
650
- var $el = this
651
- $(this).one('bsTransitionEnd', function () { called = true })
652
- var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
653
- setTimeout(callback, duration)
654
- return this
655
- }
656
-
657
- $(function () {
658
- $.support.transition = transitionEnd()
659
-
660
- if (!$.support.transition) return
661
-
662
- $.event.special.bsTransitionEnd = {
663
- bindType: $.support.transition.end,
664
- delegateType: $.support.transition.end,
665
- handle: function (e) {
666
- if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
667
- }
668
- }
669
- })
670
-
671
- }(jQuery);
672
-
673
- /* ========================================================================
674
- * Bootstrap: tooltip.js v3.3.4
675
- * http://getbootstrap.com/javascript/#tooltip
676
- * Inspired by the original jQuery.tipsy by Jason Frame
677
- * ========================================================================
678
- * Copyright 2011-2015 Twitter, Inc.
679
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
680
- * ========================================================================
681
- * Changed function and class names for avoid conflict
682
- * ======================================================================== */
683
- +function ($) {
684
- 'use strict';
685
-
686
- // TOOLTIP PUBLIC CLASS DEFINITION
687
- // ===============================
688
-
689
- var SPTooltip = function (element, options) {
690
- this.type = null
691
- this.options = null
692
- this.enabled = null
693
- this.timeout = null
694
- this.hoverState = null
695
- this.$element = null
696
-
697
- this.init('sptooltip', element, options)
698
- }
699
-
700
- SPTooltip.VERSION = '3.3.4'
701
-
702
- SPTooltip.TRANSITION_DURATION = 150
703
-
704
- SPTooltip.DEFAULTS = {
705
- animation: true,
706
- placement: 'top',
707
- selector: false,
708
- template: '<div class="sp-tooltip" role="tooltip"><div class="sp-tooltip-arrow"></div><div class="sp-tooltip-inner"></div></div>',
709
- trigger: 'hover focus',
710
- title: '',
711
- delay: 0,
712
- html: false,
713
- container: false,
714
- viewport: {
715
- selector: 'body',
716
- padding: 0
717
- }
718
- }
719
-
720
- SPTooltip.prototype.init = function (type, element, options) {
721
- this.enabled = true
722
- this.type = type
723
- this.$element = $(element)
724
- this.options = this.getOptions(options)
725
- this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
726
-
727
- if (this.$element[0] instanceof document.constructor && !this.options.selector) {
728
- throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
729
- }
730
-
731
- var triggers = this.options.trigger.split(' ')
732
-
733
- for (var i = triggers.length; i--;) {
734
- var trigger = triggers[i]
735
-
736
- if (trigger == 'click') {
737
- this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
738
- } else if (trigger != 'manual') {
739
- var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
740
- var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
741
-
742
- this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
743
- this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
744
- }
745
- }
746
-
747
- this.options.selector ?
748
- (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
749
- this.fixTitle()
750
- }
751
-
752
- SPTooltip.prototype.getDefaults = function () {
753
- return SPTooltip.DEFAULTS
754
- }
755
-
756
- SPTooltip.prototype.getOptions = function (options) {
757
- options = $.extend({}, this.getDefaults(), this.$element.data(), options)
758
-
759
- if (options.delay && typeof options.delay == 'number') {
760
- options.delay = {
761
- show: options.delay,
762
- hide: options.delay
763
- }
764
- }
765
-
766
- return options
767
- }
768
-
769
- SPTooltip.prototype.getDelegateOptions = function () {
770
- var options = {}
771
- var defaults = this.getDefaults()
772
-
773
- this._options && $.each(this._options, function (key, value) {
774
- if (defaults[key] != value) options[key] = value
775
- })
776
-
777
- return options
778
- }
779
-
780
- SPTooltip.prototype.enter = function (obj) {
781
- var self = obj instanceof this.constructor ?
782
- obj : $(obj.currentTarget).data('bs.' + this.type)
783
-
784
- if (self && self.$tip && self.$tip.is(':visible')) {
785
- self.hoverState = 'in'
786
- return
787
- }
788
-
789
- if (!self) {
790
- self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
791
- $(obj.currentTarget).data('bs.' + this.type, self)
792
- }
793
-
794
- clearTimeout(self.timeout)
795
-
796
- self.hoverState = 'in'
797
-
798
- if (!self.options.delay || !self.options.delay.show) return self.show()
799
-
800
- self.timeout = setTimeout(function () {
801
- if (self.hoverState == 'in') self.show()
802
- }, self.options.delay.show)
803
- }
804
-
805
- SPTooltip.prototype.leave = function (obj) {
806
- var self = obj instanceof this.constructor ?
807
- obj : $(obj.currentTarget).data('bs.' + this.type)
808
-
809
- if (!self) {
810
- self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
811
- $(obj.currentTarget).data('bs.' + this.type, self)
812
- }
813
-
814
- clearTimeout(self.timeout)
815
-
816
- self.hoverState = 'out'
817
-
818
- if (!self.options.delay || !self.options.delay.hide) return self.hide()
819
-
820
- self.timeout = setTimeout(function () {
821
- if (self.hoverState == 'out') self.hide()
822
- }, self.options.delay.hide)
823
- }
824
-
825
- SPTooltip.prototype.show = function () {
826
- var e = $.Event('show.bs.' + this.type)
827
-
828
- if (this.hasContent() && this.enabled) {
829
- this.$element.trigger(e)
830
-
831
- var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
832
- if (e.isDefaultPrevented() || !inDom) return
833
- var that = this
834
-
835
- var $tip = this.tip()
836
-
837
- var tipId = this.getUID(this.type)
838
-
839
- this.setContent()
840
- $tip.attr('id', tipId)
841
- this.$element.attr('aria-describedby', tipId)
842
-
843
- if (this.options.animation) $tip.addClass('fade')
844
-
845
- var placement = typeof this.options.placement == 'function' ?
846
- this.options.placement.call(this, $tip[0], this.$element[0]) :
847
- this.options.placement
848
-
849
- var autoToken = /\s?auto?\s?/i
850
- var autoPlace = autoToken.test(placement)
851
- if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
852
-
853
- $tip
854
- .detach()
855
- .css({ top: 0, left: 0, display: 'block' })
856
- .addClass(placement)
857
- .data('bs.' + this.type, this)
858
-
859
- this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
860
-
861
- var pos = this.getPosition()
862
- var actualWidth = $tip[0].offsetWidth
863
- var actualHeight = $tip[0].offsetHeight
864
-
865
- if (autoPlace) {
866
- var orgPlacement = placement
867
- var $container = this.options.container ? $(this.options.container) : this.$element.parent()
868
- var containerDim = this.getPosition($container)
869
-
870
- placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' :
871
- placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' :
872
- placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' :
873
- placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' :
874
- placement
875
-
876
- $tip
877
- .removeClass(orgPlacement)
878
- .addClass(placement)
879
- }
880
-
881
- var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
882
-
883
- this.applyPlacement(calculatedOffset, placement)
884
-
885
- var complete = function () {
886
- var prevHoverState = that.hoverState
887
- that.$element.trigger('shown.bs.' + that.type)
888
- that.hoverState = null
889
-
890
- if (prevHoverState == 'out') that.leave(that)
891
- }
892
-
893
- $.support.transition && this.$tip.hasClass('fade') ?
894
- $tip
895
- .one('bsTransitionEnd', complete)
896
- .CSemulateTransitionEnd(SPTooltip.TRANSITION_DURATION) :
897
- complete()
898
- }
899
- }
900
-
901
- SPTooltip.prototype.applyPlacement = function (offset, placement) {
902
- var $tip = this.tip()
903
- var width = $tip[0].offsetWidth
904
- var height = $tip[0].offsetHeight
905
-
906
- // manually read margins because getBoundingClientRect includes difference
907
- var marginTop = parseInt($tip.css('margin-top'), 10)
908
- var marginLeft = parseInt($tip.css('margin-left'), 10)
909
-
910
- // we must check for NaN for ie 8/9
911
- if (isNaN(marginTop)) marginTop = 0
912
- if (isNaN(marginLeft)) marginLeft = 0
913
-
914
- offset.top = offset.top + marginTop
915
- offset.left = offset.left + marginLeft
916
-
917
- // $.fn.offset doesn't round pixel values
918
- // so we use setOffset directly with our own function B-0
919
- $.offset.setOffset($tip[0], $.extend({
920
- using: function (props) {
921
- $tip.css({
922
- top: Math.round(props.top),
923
- left: Math.round(props.left)
924
- })
925
- }
926
- }, offset), 0)
927
-
928
- $tip.addClass('in')
929
-
930
- // check to see if placing tip in new offset caused the tip to resize itself
931
- var actualWidth = $tip[0].offsetWidth
932
- var actualHeight = $tip[0].offsetHeight
933
-
934
- if (placement == 'top' && actualHeight != height) {
935
- offset.top = offset.top + height - actualHeight
936
- }
937
-
938
- var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
939
-
940
- if (delta.left) offset.left += delta.left
941
- else offset.top += delta.top
942
-
943
- var isVertical = /top|bottom/.test(placement)
944
- var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
945
- var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
946
-
947
- $tip.offset(offset)
948
- this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
949
- }
950
-
951
- SPTooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
952
- this.arrow()
953
- .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
954
- .css(isVertical ? 'top' : 'left', '')
955
- }
956
-
957
- SPTooltip.prototype.setContent = function () {
958
- var $tip = this.tip()
959
- var title = this.getTitle()
960
-
961
- $tip.find('.sp-tooltip-inner')[this.options.html ? 'html' : 'text'](title)
962
- $tip.removeClass('fade in top bottom left right')
963
- }
964
-
965
- SPTooltip.prototype.hide = function (callback) {
966
- var that = this
967
- var $tip = $(this.$tip)
968
- var e = $.Event('hide.bs.' + this.type)
969
-
970
- function complete() {
971
- if (that.hoverState != 'in') $tip.detach()
972
- that.$element
973
- .removeAttr('aria-describedby')
974
- .trigger('hidden.bs.' + that.type)
975
- callback && callback()
976
- }
977
-
978
- this.$element.trigger(e)
979
-
980
- if (e.isDefaultPrevented()) return
981
-
982
- $tip.removeClass('in')
983
-
984
- $.support.transition && $tip.hasClass('fade') ?
985
- $tip
986
- .one('bsTransitionEnd', complete)
987
- .CSemulateTransitionEnd(SPTooltip.TRANSITION_DURATION) :
988
- complete()
989
-
990
- this.hoverState = null
991
-
992
- return this
993
- }
994
-
995
- SPTooltip.prototype.fixTitle = function () {
996
- var $e = this.$element
997
- if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') {
998
- $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
999
- }
1000
- }
1001
-
1002
- SPTooltip.prototype.hasContent = function () {
1003
- return this.getTitle()
1004
- }
1005
-
1006
- SPTooltip.prototype.getPosition = function ($element) {
1007
- $element = $element || this.$element
1008
-
1009
- var el = $element[0]
1010
- var isBody = el.tagName == 'BODY'
1011
-
1012
- var elRect = el.getBoundingClientRect()
1013
- if (elRect.width == null) {
1014
- // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
1015
- elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
1016
- }
1017
- var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
1018
- var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
1019
- var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
1020
-
1021
- return $.extend({}, elRect, scroll, outerDims, elOffset)
1022
- }
1023
-
1024
- SPTooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
1025
- return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
1026
- placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
1027
- placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
1028
- /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
1029
-
1030
- }
1031
-
1032
- SPTooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
1033
- var delta = { top: 0, left: 0 }
1034
- if (!this.$viewport) return delta
1035
-
1036
- var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
1037
- var viewportDimensions = this.getPosition(this.$viewport)
1038
-
1039
- if (/right|left/.test(placement)) {
1040
- var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll
1041
- var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
1042
- if (topEdgeOffset < viewportDimensions.top) { // top overflow
1043
- delta.top = viewportDimensions.top - topEdgeOffset
1044
- } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
1045
- delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
1046
- }
1047
- } else {
1048
- var leftEdgeOffset = pos.left - viewportPadding
1049
- var rightEdgeOffset = pos.left + viewportPadding + actualWidth
1050
- if (leftEdgeOffset < viewportDimensions.left) { // left overflow
1051
- delta.left = viewportDimensions.left - leftEdgeOffset
1052
- } else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
1053
- delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
1054
- }
1055
- }
1056
-
1057
- return delta
1058
- }
1059
-
1060
- SPTooltip.prototype.getTitle = function () {
1061
- var title
1062
- var $e = this.$element
1063
- var o = this.options
1064
-
1065
- title = $e.attr('data-original-title')
1066
- || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
1067
-
1068
- return title
1069
- }
1070
-
1071
- SPTooltip.prototype.getUID = function (prefix) {
1072
- do prefix += ~~(Math.random() * 1000000)
1073
- while (document.getElementById(prefix))
1074
- return prefix
1075
- }
1076
-
1077
- SPTooltip.prototype.tip = function () {
1078
- return (this.$tip = this.$tip || $(this.options.template))
1079
- }
1080
-
1081
- SPTooltip.prototype.arrow = function () {
1082
- return (this.$arrow = this.$arrow || this.tip().find('.sp-tooltip-arrow'))
1083
- }
1084
-
1085
- SPTooltip.prototype.enable = function () {
1086
- this.enabled = true
1087
- }
1088
-
1089
- SPTooltip.prototype.disable = function () {
1090
- this.enabled = false
1091
- }
1092
-
1093
- SPTooltip.prototype.toggleEnabled = function () {
1094
- this.enabled = !this.enabled
1095
- }
1096
-
1097
- SPTooltip.prototype.toggle = function (e) {
1098
- var self = this
1099
- if (e) {
1100
- self = $(e.currentTarget).data('bs.' + this.type)
1101
- if (!self) {
1102
- self = new this.constructor(e.currentTarget, this.getDelegateOptions())
1103
- $(e.currentTarget).data('bs.' + this.type, self)
1104
- }
1105
- }
1106
-
1107
- self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
1108
- }
1109
-
1110
- SPTooltip.prototype.destroy = function () {
1111
- var that = this
1112
- clearTimeout(this.timeout)
1113
- this.hide(function () {
1114
- that.$element.off('.' + that.type).removeData('bs.' + that.type)
1115
- })
1116
- }
1117
-
1118
-
1119
- // TOOLTIP PLUGIN DEFINITION
1120
- // =========================
1121
-
1122
- function Plugin(option) {
1123
- return this.each(function () {
1124
- var $this = $(this)
1125
- var data = $this.data('bs.sptooltip')
1126
- var options = typeof option == 'object' && option
1127
-
1128
- if (!data && /destroy|hide/.test(option)) return
1129
- if (!data) $this.data('bs.sptooltip', (data = new SPTooltip(this, options)))
1130
- if (typeof option == 'string') data[option]()
1131
- })
1132
- }
1133
-
1134
- var old = $.fn.sptooltip
1135
-
1136
- $.fn.sptooltip = Plugin
1137
- $.fn.sptooltip.Constructor = SPTooltip
1138
-
1139
-
1140
- // TOOLTIP NO CONFLICT
1141
- // ===================
1142
-
1143
- $.fn.sptooltip.noConflict = function () {
1144
- $.fn.sptooltip = old
1145
- return this
1146
- }
1147
-
1148
- }(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/metabox/assets/js/sp-plugins.min.js DELETED
@@ -1,3 +0,0 @@
1
- /* ShapedPlugin Framework | A Lightweight and easy-to-use WordPress Options Framework - v1.0.0*/
2
- (function(){var a,b,c,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};d=function(){function a(){this.options_index=0,this.parsed=[]}return a.prototype.add_node=function(a){return"OPTGROUP"===a.nodeName.toUpperCase()?this.add_group(a):this.add_option(a)},a.prototype.add_group=function(a){var b,c,d,e,f,g;for(b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:this.escapeExpression(a.label),title:a.title?a.title:void 0,children:0,disabled:a.disabled,classes:a.className}),f=a.childNodes,g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},a.prototype.add_option=function(a,b,c){return"OPTION"===a.nodeName.toUpperCase()?(""!==a.text?(null!=b&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,title:a.title?a.title:void 0,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,group_label:null!=b?this.parsed[b].label:null,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},a.prototype.escapeExpression=function(a){var b,c;return null==a||a===!1?"":/[\&\<\>\"\'\`]/.test(a)?(b={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},c=/&(?!\w+;)|[\<\>\"\'\`]/g,a.replace(c,function(a){return b[a]||"&amp;"})):a},a}(),d.select_to_array=function(a){var b,c,e,f,g;for(c=new d,g=a.childNodes,e=0,f=g.length;f>e;e++)b=g[e],c.add_node(b);return c.parsed},b=function(){function a(b,c){this.form_field=b,this.options=null!=c?c:{},a.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return a.prototype.set_default_values=function(){var a=this;return this.click_test_action=function(b){return a.test_active_click(b)},this.activate_action=function(b){return a.activate_field(b)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1},a.prototype.set_default_text=function(){return this.default_text=this.form_field.getAttribute("data-placeholder")?this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.options.placeholder_text_multiple||this.options.placeholder_text||a.default_multiple_text:this.options.placeholder_text_single||this.options.placeholder_text||a.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||a.default_no_result_text},a.prototype.choice_label=function(a){return this.include_group_label_in_selected&&null!=a.group_label?"<b class='group-name'>"+a.group_label+"</b>"+a.html:a.html},a.prototype.mouse_enter=function(){return this.mouse_on_container=!0},a.prototype.mouse_leave=function(){return this.mouse_on_container=!1},a.prototype.input_focus=function(){var a=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return a.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},a.prototype.input_blur=function(){var a=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return a.blur_test()},100))},a.prototype.results_option_build=function(a){var b,c,d,e,f;for(b="",f=this.results_data,d=0,e=f.length;e>d;d++)c=f[d],b+=c.group?this.result_add_group(c):this.result_add_option(c),(null!=a?a.first:void 0)&&(c.selected&&this.is_multiple?this.choice_build(c):c.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(c)));return b},a.prototype.result_add_option=function(a){var b,c;return a.search_match&&this.include_option_in_results(a)?(b=[],a.disabled||a.selected&&this.is_multiple||b.push("active-result"),!a.disabled||a.selected&&this.is_multiple||b.push("disabled-result"),a.selected&&b.push("result-selected"),null!=a.group_array_index&&b.push("group-option"),""!==a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.style.cssText=a.style,c.setAttribute("data-option-array-index",a.array_index),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):""},a.prototype.result_add_group=function(a){var b,c;return(a.search_match||a.group_match)&&a.active_options>0?(b=[],b.push("group-result"),a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):""},a.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},a.prototype.reset_single_select_options=function(){var a,b,c,d,e;for(d=this.results_data,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.selected?a.selected=!1:void 0);return e},a.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},a.prototype.results_search=function(){return this.results_showing?this.winnow_results():this.results_show()},a.prototype.winnow_results=function(){var a,b,c,d,e,f,g,h,i,j,k,l;for(this.no_results_clear(),d=0,f=this.get_search_text(),a=f.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),i=new RegExp(a,"i"),c=this.get_search_regex(a),l=this.results_data,j=0,k=l.length;k>j;j++)b=l[j],b.search_match=!1,e=null,this.include_option_in_results(b)&&(b.group&&(b.group_match=!1,b.active_options=0),null!=b.group_array_index&&this.results_data[b.group_array_index]&&(e=this.results_data[b.group_array_index],0===e.active_options&&e.search_match&&(d+=1),e.active_options+=1),b.search_text=b.group?b.label:b.html,(!b.group||this.group_search)&&(b.search_match=this.search_string_match(b.search_text,c),b.search_match&&!b.group&&(d+=1),b.search_match?(f.length&&(g=b.search_text.search(i),h=b.search_text.substr(0,g+f.length)+"</em>"+b.search_text.substr(g+f.length),b.search_text=h.substr(0,g)+"<em>"+h.substr(g)),null!=e&&(e.group_match=!0)):null!=b.group_array_index&&this.results_data[b.group_array_index].search_match&&(b.search_match=!0)));return this.result_clear_highlight(),1>d&&f.length?(this.update_results_content(""),this.no_results(f)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},a.prototype.get_search_regex=function(a){var b;return b=this.search_contains?"":"^",new RegExp(b+a,"i")},a.prototype.search_string_match=function(a,b){var c,d,e,f;if(b.test(a))return!0;if(this.enable_split_word_search&&(a.indexOf(" ")>=0||0===a.indexOf("["))&&(d=a.replace(/\[|\]/g,"").split(" "),d.length))for(e=0,f=d.length;f>e;e++)if(c=d[e],b.test(c))return!0},a.prototype.choices_count=function(){var a,b,c,d;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,d=this.form_field.options,b=0,c=d.length;c>b;b++)a=d[b],a.selected&&(this.selected_option_count+=1);return this.selected_option_count},a.prototype.choices_click=function(a){return a.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},a.prototype.keyup_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(a.preventDefault(),this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},a.prototype.clipboard_event_checker=function(){var a=this;return setTimeout(function(){return a.results_search()},50)},a.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},a.prototype.include_option_in_results=function(a){return this.is_multiple&&!this.display_selected_options&&a.selected?!1:!this.display_disabled_options&&a.disabled?!1:a.empty?!1:!0},a.prototype.search_results_touchstart=function(a){return this.touch_started=!0,this.search_results_mouseover(a)},a.prototype.search_results_touchmove=function(a){return this.touch_started=!1,this.search_results_mouseout(a)},a.prototype.search_results_touchend=function(a){return this.touch_started?this.search_results_mouseup(a):void 0},a.prototype.outerHTML=function(a){var b;return a.outerHTML?a.outerHTML:(b=document.createElement("div"),b.appendChild(a),b.innerHTML)},a.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:!0},a.default_multiple_text="Select Some Options",a.default_single_text="Select an Option",a.default_no_result_text="No results match",a}(),a=jQuery,a.fn.extend({chosen:function(d){return b.browser_is_supported()?this.each(function(){var b,e;b=a(this),e=b.data("chosen"),"destroy"===d&&e instanceof c?e.destroy():e instanceof c||b.data("chosen",new c(this,d))}):this}}),c=function(b){function c(){return e=c.__super__.constructor.apply(this,arguments)}return g(c,b),c.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},c.prototype.set_up_html=function(){var b,c;return b=["chosen-container"],b.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&b.push(this.form_field.className),this.is_rtl&&b.push("chosen-rtl"),c={"class":b.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(c.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("<div />",c),this.container.html(this.is_multiple?'<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>':'<a class="chosen-single chosen-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},c.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},c.prototype.register_observers=function(){var a=this;return this.container.bind("touchstart.chosen",function(b){return a.container_mousedown(b),b.preventDefault()}),this.container.bind("touchend.chosen",function(b){return a.container_mouseup(b),b.preventDefault()}),this.container.bind("mousedown.chosen",function(b){a.container_mousedown(b)}),this.container.bind("mouseup.chosen",function(b){a.container_mouseup(b)}),this.container.bind("mouseenter.chosen",function(b){a.mouse_enter(b)}),this.container.bind("mouseleave.chosen",function(b){a.mouse_leave(b)}),this.search_results.bind("mouseup.chosen",function(b){a.search_results_mouseup(b)}),this.search_results.bind("mouseover.chosen",function(b){a.search_results_mouseover(b)}),this.search_results.bind("mouseout.chosen",function(b){a.search_results_mouseout(b)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(b){a.search_results_mousewheel(b)}),this.search_results.bind("touchstart.chosen",function(b){a.search_results_touchstart(b)}),this.search_results.bind("touchmove.chosen",function(b){a.search_results_touchmove(b)}),this.search_results.bind("touchend.chosen",function(b){a.search_results_touchend(b)}),this.form_field_jq.bind("chosen:updated.chosen",function(b){a.results_update_field(b)}),this.form_field_jq.bind("chosen:activate.chosen",function(b){a.activate_field(b)}),this.form_field_jq.bind("chosen:open.chosen",function(b){a.container_mousedown(b)}),this.form_field_jq.bind("chosen:close.chosen",function(b){a.input_blur(b)}),this.search_field.bind("blur.chosen",function(b){a.input_blur(b)}),this.search_field.bind("keyup.chosen",function(b){a.keyup_checker(b)}),this.search_field.bind("keydown.chosen",function(b){a.keydown_checker(b)}),this.search_field.bind("focus.chosen",function(b){a.input_focus(b)}),this.search_field.bind("cut.chosen",function(b){a.clipboard_event_checker(b)}),this.search_field.bind("paste.chosen",function(b){a.clipboard_event_checker(b)}),this.is_multiple?this.search_choices.bind("click.chosen",function(b){a.choices_click(b)}):this.container.bind("click.chosen",function(a){a.preventDefault()})},c.prototype.destroy=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},c.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},c.prototype.container_mousedown=function(b){return this.is_disabled||(b&&"mousedown"===b.type&&!this.results_showing&&b.preventDefault(),null!=b&&a(b.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!b||a(b.target)[0]!==this.selected_item[0]&&!a(b.target).parents("a.chosen-single").length||(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},c.prototype.container_mouseup=function(a){return"ABBR"!==a.target.nodeName||this.is_disabled?void 0:this.results_reset(a)},c.prototype.search_results_mousewheel=function(a){var b;return a.originalEvent&&(b=a.originalEvent.deltaY||-a.originalEvent.wheelDelta||a.originalEvent.detail),null!=b?(a.preventDefault(),"DOMMouseScroll"===a.type&&(b=40*b),this.search_results.scrollTop(b+this.search_results.scrollTop())):void 0},c.prototype.blur_test=function(){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},c.prototype.close_field=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},c.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},c.prototype.test_active_click=function(b){var c;return c=a(b.target).closest(".chosen-container"),c.length&&this.container[0]===c[0]?this.active_field=!0:this.close_field()},c.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=d.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},c.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){if(this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight(),b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(f>c)return this.search_results.scrollTop(c)}},c.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},c.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},c.prototype.update_results_content=function(a){return this.search_results.html(a)},c.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},c.prototype.set_tab_index=function(){var a;return this.form_field.tabIndex?(a=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=a):void 0},c.prototype.set_label_behavior=function(){var b=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(a){return b.is_multiple?b.container_mousedown(a):b.activate_field()}):void 0},c.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},c.prototype.search_results_mouseup=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c.length?(this.result_highlight=c,this.result_select(b),this.search_field.focus()):void 0},c.prototype.search_results_mouseover=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c?this.result_do_highlight(c):void 0},c.prototype.search_results_mouseout=function(b){return a(b.target).hasClass("active-result")?this.result_clear_highlight():void 0},c.prototype.choice_build=function(b){var c,d,e=this;return c=a("<li />",{"class":"search-choice"}).html("<span>"+this.choice_label(b)+"</span>"),b.disabled?c.addClass("search-choice-disabled"):(d=a("<a />",{"class":"search-choice-close","data-option-array-index":b.array_index}),d.bind("click.chosen",function(a){return e.choice_destroy_link_click(a)}),c.append(d)),this.search_container.before(c)},c.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),b.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(a(b.target))},c.prototype.choice_destroy=function(a){return this.result_deselect(a[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),a.parents("li").first().remove(),this.search_field_scale()):void 0},c.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},c.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},c.prototype.result_select=function(a){var b,c;return this.result_highlight?(b=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?b.removeClass("active-result"):this.reset_single_select_options(),b.addClass("result-selected"),c=this.results_data[b[0].getAttribute("data-option-array-index")],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(c):this.single_set_selected_text(this.choice_label(c)),(a.metaKey||a.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[c.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,a.preventDefault(),this.search_field_scale())):void 0},c.prototype.single_set_selected_text=function(a){return null==a&&(a=this.default_text),a===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(a)},c.prototype.result_deselect=function(a){var b;return b=this.results_data[a],this.form_field.options[b.options_index].disabled?!1:(b.selected=!1,this.form_field.options[b.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[b.options_index].value}),this.search_field_scale(),!0)},c.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")):void 0},c.prototype.get_search_text=function(){return a("<div/>").text(a.trim(this.search_field.val())).html()},c.prototype.winnow_results_set_highlight=function(){var a,b;return b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first(),null!=a?this.result_do_highlight(a):void 0},c.prototype.no_results=function(b){var c;return c=a('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),c.find("span").first().html(b),this.search_results.append(c),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},c.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},c.prototype.keydown_arrow=function(){var a;return this.results_showing&&this.result_highlight?(a=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(a):void 0:this.results_show()},c.prototype.keyup_arrow=function(){var a;return this.results_showing||this.is_multiple?this.result_highlight?(a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},c.prototype.keydown_backstroke=function(){var a;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(a=this.search_container.siblings("li.search-choice").last(),a.length&&!a.hasClass("search-choice-disabled")?(this.pending_backstroke=a,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},c.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},c.prototype.keydown_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),8!==b&&this.pending_backstroke&&this.clear_backstroke(),b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:this.results_showing&&a.preventDefault();break;case 32:this.disable_search&&a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:a.preventDefault(),this.keydown_arrow()}},c.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){for(d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],i=0,j=g.length;j>i;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return b=a("<div />",{style:f}),b.text(this.search_field.val()),a("body").append(b),h=b.width()+25,b.remove(),c=this.container.outerWidth(),h>c-10&&(h=c-10),this.search_field.css({width:h+"px"})}},c}(b)}).call(this),function(a){a.fn.addBack=a.fn.addBack||a.fn.andSelf,a.fn.extend({actual:function(b,c){if(!this[b])throw'$.actual => The jQuery method "'+b+'" you called does not exist';var d,e,f={absolute:!1,clone:!1,includeMargin:!1},g=a.extend(f,c),h=this.eq(0);if(g.clone===!0)d=function(){var a="position: absolute !important; top: -1000 !important; ";h=h.clone().attr("style",a).appendTo("body")},e=function(){h.remove()};else{var i,j=[],k="";d=function(){i=h.parents().addBack().filter(":hidden"),k+="visibility: hidden !important; display: block !important; ",g.absolute===!0&&(k+="position: absolute !important; "),i.each(function(){var b=a(this),c=b.attr("style");j.push(c),b.attr("style",c?c+";"+k:k)})},e=function(){i.each(function(b){var c=a(this),d=j[b];void 0===d?c.removeAttr("style"):c.attr("style",d)})}}d();var l=/(outer)/.test(b)?h[b](g.includeMargin):h[b]();return e(),l}})}(jQuery),function(a){"use strict";function b(a){window.console&&window.console.log&&console.log(a)}function c(b,c){return"#"==c[0]&&c.indexOf(" ")<0?a(c):b.find(c)}function d(a,b,c){this.init(a,b,c)}function e(){this.rules=[]}a.extend(d.prototype,{init:function(a,b,c){this.controller=a,this.condition=b,this.value=c,this.rules=[],this.controls=[]},evalCondition:function(b,c,d,e,f){if("=="==d)return this.checkBoolean(e)==this.checkBoolean(f);if("!="==d)return this.checkBoolean(e)!=this.checkBoolean(f);if(">="==d)return Number(f)>=Number(e);if("<="==d)return Number(f)<=Number(e);if(">"==d)return Number(f)>Number(e);if("<"==d)return Number(f)<Number(e);if("()"==d)return window[e](b,c,f);if("any"==d)return a.inArray(f,e.split(","))>-1;if("not-any"==d)return-1==a.inArray(f,e.split(","));throw new Error("Unknown condition:"+d)},checkBoolean:function(a){switch(a){case!0:case"true":case 1:case"1":a=!0;break;case!1:case"false":case 0:case"0":a=!1}return a},checkCondition:function(a,c){if(!this.condition)return!0;var d=a.find(this.controller);0===d.size()&&c.log&&b("Evaling condition: Could not find controller input "+this.controller);var e=this.getControlValue(a,d);return c.log&&void 0===e&&b("Evaling condition: Could not exctract value from input "+this.controller),void 0===e?!1:(e=this.normalizeValue(d,this.value,e),this.evalCondition(a,d,this.condition,this.value,e))},normalizeValue:function(a,b,c){return"number"==typeof b?parseFloat(c):c},getControlValue:function(a,b){return("radio"==b.attr("type")||"checkbox"==b.attr("type"))&&b.size()>1?b.filter(":checked").val():"checkbox"==b.attr("type")||"radio"==b.attr("type")?b.is(":checked"):b.val()},createRule:function(a,b,c){var e=new d(a,b,c);return this.rules.push(e),e},include:function(a){if(!a)throw new Error("Must give an input selector");this.controls.push(a)},applyRule:function(c,d,e){var f;f=void 0===e?this.checkCondition(c,d):e,d.log&&b("Applying rule on "+this.controller+"=="+this.value+" enforced:"+e+" result:"+f),d.log&&!this.controls.length&&b("Zero length controls slipped through");var g=d.show||function(a){a.show()},h=d.hide||function(a){a.hide()},i=a.map(this.controls,function(a){var e=c.find(a);return d.log&&0===e.size()&&b("Could not find element:"+a),e});f?(a(i).each(function(){d.log&&0===a(this).size()&&(b("Control selection is empty when showing"),b(this)),g(this)}),a(this.rules).each(function(){this.applyRule(c,d)})):(a(i).each(function(){d.log&&0===a(this).size()&&(b("Control selection is empty when hiding:"),b(this)),h(this)}),a(this.rules).each(function(){this.applyRule(c,d,!1)}))}}),a.extend(e.prototype,{createRule:function(a,b,c){var e=new d(a,b,c);return this.rules.push(e),e},applyRules:function(a,c){var d;for(c=c||{},c.log&&b("Starting evaluation ruleset of "+this.rules.length+" rules"),d=0;d<this.rules.length;d++)this.rules[d].applyRule(a,c)},walk:function(){function b(d){c.push(d),a(d.children).each(function(){b(this)})}var c=[];return a(this.rules).each(function(){b(this)}),c},checkTargets:function(d,e){var f=0,g=this.walk();a(g).each(function(){if(0===d.find(this.controller).size())throw new Error("Rule's controller does not exist:"+this.controller);if(0===this.controls.length)throw new Error("Rule has no controls:"+this);a(this.controls).each(function(){if(0===c(d,this))throw new Error("Rule's target control "+this+" does not exist in context "+d.get(0));f++})}),e.log&&b("Controller check ok, rules count "+g.length+" controls count "+f)},install:function(b){a.deps.enable(a(document.body),this,b)}});var f={createRuleset:function(){return new e},enable:function(a,c,d){d=d||{},(d.checkTargets||void 0===d.checkTargets)&&c.checkTargets(a,d);d.log&&b("Enabling dependency change monitoring on "+a.get(0));var e=function(){c.applyRules(a,d)},f=a.on?a.on("change.deps",null,null,e):a.live("change.deps",e);return c.applyRules(a,d),f}};a.deps=f}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.CSemulateTransitionEnd=function(b){var c=!1,d=this;
3
- a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.sptooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.sptooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.init("sptooltip",a,b)};c.VERSION="3.3.4",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="sp-tooltip" role="tooltip"><div class="sp-tooltip-arrow"></div><div class="sp-tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport),this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c&&c.$tip&&c.$tip.is(":visible")?void(c.hoverState="in"):(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.options.container?a(this.options.container):this.$element.parent(),p=this.getPosition(o);h="bottom"==h&&k.bottom+m>p.bottom?"top":"top"==h&&k.top-m<p.top?"bottom":"right"==h&&k.right+l>p.width?"left":"left"==h&&k.left-l<p.left?"right":h,f.removeClass(n).addClass(h)}var q=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(q,h);var r=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",r).CSemulateTransitionEnd(c.TRANSITION_DURATION):r()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top=b.top+g,b.left=b.left+h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".sp-tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).CSemulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".sp-tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type)})};var d=a.fn.sptooltip;a.fn.sptooltip=b,a.fn.sptooltip.Constructor=c,a.fn.sptooltip.noConflict=function(){return a.fn.sptooltip=d,this}}(jQuery);
 
 
 
admin/views/metabox/classes/abstract.class.php DELETED
@@ -1,23 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
2
- /**
3
- *
4
- * Abstract Class
5
- * A helper class for action and filter hooks
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- *
10
- */
11
- abstract class SP_TPRO_Framework_Abstract {
12
-
13
- public function __construct() {}
14
-
15
- public function addAction( $hook, $function_to_add, $priority = 30, $accepted_args = 1 ) {
16
- add_action( $hook, array( &$this, $function_to_add), $priority, $accepted_args );
17
- }
18
-
19
- public function addFilter( $tag, $function_to_add, $priority = 30, $accepted_args = 1 ) {
20
- add_action( $tag, array( &$this, $function_to_add), $priority, $accepted_args );
21
- }
22
-
23
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/metabox/classes/framework.class.php DELETED
@@ -1,442 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
2
- /**
3
- *
4
- * Framework Class
5
- *
6
- * @since 1.0.0
7
- * @version 1.0.0
8
- *
9
- */
10
- class SP_TPRO_Framework extends SP_TPRO_Framework_Abstract {
11
-
12
- /**
13
- *
14
- * option database/data name
15
- * @access public
16
- * @var string
17
- *
18
- */
19
- public $unique = SP_OPTION;
20
-
21
- /**
22
- *
23
- * settings
24
- * @access public
25
- * @var array
26
- *
27
- */
28
- public $settings = array();
29
-
30
- /**
31
- *
32
- * options tab
33
- * @access public
34
- * @var array
35
- *
36
- */
37
- public $options = array();
38
-
39
- /**
40
- *
41
- * options section
42
- * @access public
43
- * @var array
44
- *
45
- */
46
- public $sections = array();
47
-
48
- /**
49
- *
50
- * options store
51
- * @access public
52
- * @var array
53
- *
54
- */
55
- public $get_option = array();
56
-
57
- /**
58
- *
59
- * instance
60
- * @access private
61
- * @var class
62
- *
63
- */
64
- private static $instance = null;
65
-
66
- // run framework construct
67
- public function __construct( $settings, $options ) {
68
-
69
- $this->settings = apply_filters( 'sp_framework_settings', $settings );
70
- $this->options = apply_filters( 'sp_framework_options', $options );
71
-
72
- if( ! empty( $this->options ) ) {
73
-
74
- $this->sections = $this->get_sections();
75
- $this->get_option = get_option( SP_OPTION );
76
- $this->addAction( 'admin_init', 'settings_api' );
77
- $this->addAction( 'admin_menu', 'admin_menu' );
78
-
79
- }
80
-
81
- }
82
-
83
- // instance
84
- public static function instance( $settings = array(), $options = array() ) {
85
- if ( is_null( self::$instance ) && SP_TPRO_F_ACTIVE_FRAMEWORK ) {
86
- self::$instance = new self( $settings, $options );
87
- }
88
- return self::$instance;
89
- }
90
-
91
- // get sections
92
- public function get_sections() {
93
-
94
- $sections = array();
95
-
96
- foreach ( $this->options as $key => $value ) {
97
-
98
- if( isset( $value['sections'] ) ) {
99
-
100
- foreach ( $value['sections'] as $section ) {
101
-
102
- if( isset( $section['fields'] ) ) {
103
- $sections[] = $section;
104
- }
105
-
106
- }
107
-
108
- } else {
109
-
110
- if( isset( $value['fields'] ) ) {
111
- $sections[] = $value;
112
- }
113
-
114
- }
115
-
116
- }
117
-
118
- return $sections;
119
-
120
- }
121
-
122
- // wp settings api
123
- public function settings_api() {
124
-
125
- $defaults = array();
126
-
127
- register_setting( $this->unique, $this->unique, array( &$this,'validate_save' ) );
128
-
129
- foreach( $this->sections as $section ) {
130
-
131
- if( isset( $section['fields'] ) ) {
132
-
133
- foreach( $section['fields'] as $field_key => $field ) {
134
-
135
- // set default option if isset
136
- if( isset( $field['default'] ) ) {
137
- $defaults[$field['id']] = $field['default'];
138
- if( ! empty( $this->get_option ) && ! isset( $this->get_option[$field['id']] ) ) {
139
- $this->get_option[$field['id']] = $field['default'];
140
- }
141
- }
142
-
143
- }
144
- }
145
-
146
- }
147
-
148
- // set default variable if empty options and not empty defaults
149
- if( empty( $this->get_option ) && ! empty( $defaults ) ) {
150
- update_option( $this->unique, $defaults );
151
- $this->get_option = $defaults;
152
- }
153
-
154
- }
155
-
156
- // section fields validate in save
157
- public function validate_save( $request ) {
158
-
159
- $add_errors = array();
160
- $section_id = sp_get_var( 'sp_section_id' );
161
-
162
- // ignore nonce requests
163
- if( isset( $request['_nonce'] ) ) { unset( $request['_nonce'] ); }
164
-
165
- // import
166
- if ( isset( $request['import'] ) && ! empty( $request['import'] ) ) {
167
- $decode_string = sp_decode_string( $request['import'] );
168
- if( is_array( $decode_string ) ) {
169
- return $decode_string;
170
- }
171
- $add_errors[] = $this->add_settings_error( esc_html__( 'Success. Imported backup options.', 'testimonial-free' ), 'updated' );
172
- }
173
-
174
- // reset all options
175
- if ( isset( $request['resetall'] ) ) {
176
- $add_errors[] = $this->add_settings_error( esc_html__( 'Default options restored.', 'testimonial-free' ), 'updated' );
177
- return;
178
- }
179
-
180
- // reset only section
181
- if ( isset( $request['reset'] ) && ! empty( $section_id ) ) {
182
- foreach ( $this->sections as $value ) {
183
- if( $value['name'] == $section_id ) {
184
- foreach ( $value['fields'] as $field ) {
185
- if( isset( $field['id'] ) ) {
186
- if( isset( $field['default'] ) ) {
187
- $request[$field['id']] = $field['default'];
188
- } else {
189
- unset( $request[$field['id']] );
190
- }
191
- }
192
- }
193
- }
194
- }
195
- $add_errors[] = $this->add_settings_error( esc_html__( 'Default options restored for only this section.', 'testimonial-free' ), 'updated' );
196
- }
197
-
198
- // option sanitize and validate
199
- foreach( $this->sections as $section ) {
200
- if( isset( $section['fields'] ) ) {
201
- foreach( $section['fields'] as $field ) {
202
-
203
- // ignore santize and validate if element multilangual
204
- if ( isset( $field['type'] ) && ! isset( $field['multilang'] ) && isset( $field['id'] ) ) {
205
-
206
- // sanitize options
207
- $request_value = isset( $request[$field['id']] ) ? $request[$field['id']] : '';
208
- $sanitize_type = $field['type'];
209
-
210
- if( isset( $field['sanitize'] ) ) {
211
- $sanitize_type = ( $field['sanitize'] !== false ) ? $field['sanitize'] : false;
212
- }
213
-
214
- if( $sanitize_type !== false && has_filter( 'sp_sanitize_'. $sanitize_type ) ) {
215
- $request[$field['id']] = apply_filters( 'sp_sanitize_' . $sanitize_type, $request_value, $field, $section['fields'] );
216
- }
217
-
218
- // validate options
219
- if ( isset( $field['validate'] ) && has_filter( 'sp_validate_'. $field['validate'] ) ) {
220
-
221
- $validate = apply_filters( 'sp_validate_' . $field['validate'], $request_value, $field, $section['fields'] );
222
-
223
- if( ! empty( $validate ) ) {
224
- $add_errors[] = $this->add_settings_error( $validate, 'error', $field['id'] );
225
- $request[$field['id']] = ( isset( $this->get_option[$field['id']] ) ) ? $this->get_option[$field['id']] : '';
226
- }
227
-
228
- }
229
-
230
- }
231
-
232
- if( ! isset( $field['id'] ) || empty( $request[$field['id']] ) ) {
233
- continue;
234
- }
235
-
236
- }
237
- }
238
- }
239
-
240
- $request = apply_filters( 'sp_validate_save', $request );
241
-
242
- do_action( 'sp_validate_save_after', $request );
243
-
244
- // set transient
245
- $transient_time = ( sp_language_defaults() !== false ) ? 30 : 10;
246
- set_transient( 'sp-framework-transient', array( 'errors' => $add_errors, 'section_id' => $section_id ), $transient_time );
247
-
248
- return $request;
249
- }
250
-
251
- // field callback classes
252
- public function field_callback( $field ) {
253
- $value = ( isset( $field['id'] ) && isset( $this->get_option[$field['id']] ) ) ? $this->get_option[$field['id']] : '';
254
- echo sp_tpro_add_element( $field, $value, $this->unique );
255
- }
256
-
257
- public function add_settings_error( $message, $type = 'error', $id = 'global' ) {
258
- return array( 'setting' => 'sp-errors', 'code' => $id, 'message' => $message, 'type' => $type );
259
- }
260
-
261
- // adding option page
262
- public function admin_menu() {
263
-
264
- $defaults = array(
265
- 'menu_type' => '',
266
- 'menu_parent' => '',
267
- 'menu_title' => '',
268
- 'menu_slug' => '',
269
- 'menu_capability' => 'manage_options',
270
- 'menu_icon' => null,
271
- 'menu_position' => null,
272
- );
273
-
274
- $args = wp_parse_args( $this->settings, $defaults );
275
-
276
- extract( $args );
277
-
278
- if( $menu_type === 'submenu' ) {
279
- add_submenu_page( $menu_parent, $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'admin_page' ) );
280
- } else if( $menu_type === 'management' ) {
281
- add_management_page( $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'admin_page' ), $menu_icon, $menu_position );
282
- } else if( $menu_type === 'dashboard' ) {
283
- add_dashboard_page( $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'admin_page' ), $menu_icon, $menu_position );
284
- } else if( $menu_type === 'options' ) {
285
- add_options_page( $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'admin_page' ), $menu_icon, $menu_position );
286
- } else if( $menu_type === 'plugins' ) {
287
- add_plugins_page( $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'admin_page' ), $menu_icon, $menu_position );
288
- } else if( $menu_type === 'theme' ) {
289
- add_theme_page( $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'admin_page' ), $menu_icon, $menu_position );
290
- } else {
291
- add_menu_page( $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'admin_page' ), $menu_icon, $menu_position );
292
- }
293
-
294
- }
295
-
296
- // option page html output
297
- public function admin_page() {
298
-
299
- $transient = get_transient( 'sp-framework-transient' );
300
- $has_nav = ( count( $this->options ) <= 1 ) ? ' sp-show-all' : '';
301
- $section_id = ( ! empty( $transient['section_id'] ) ) ? $transient['section_id'] : $this->sections[0]['name'];
302
- $section_id = sp_get_var( 'sp-section', $section_id );
303
-
304
- echo '<h1 class="sp-option-framework-page-title">'. $this->settings['menu_title'] .'</h1>';
305
-
306
- echo '<div class="sp-tpro-framework sp-option-framework">';
307
-
308
- echo '<form method="post" action="options.php" enctype="multipart/form-data" id="sp_framework_form">';
309
- echo '<input type="hidden" class="sp-reset" name="sp_section_id" value="'. $section_id .'" />';
310
-
311
- if( $this->settings['ajax_save'] !== true && ! empty( $transient['errors'] ) ) {
312
-
313
- global $sp_errors;
314
-
315
- $sp_errors = $transient['errors'];
316
-
317
- if ( ! empty( $sp_errors ) ) {
318
- foreach ( $sp_errors as $error ) {
319
- if( in_array( $error['setting'], array( 'general', 'sp-errors' ) ) ) {
320
- echo '<div class="sp-settings-error '. $error['type'] .'">';
321
- echo '<p><strong>'. $error['message'] .'</strong></p>';
322
- echo '</div>';
323
- }
324
- }
325
- }
326
-
327
- }
328
-
329
- settings_fields( $this->unique );
330
-
331
- echo '<header class="sp-header">';
332
- echo '<h2>'. $this->settings['framework_title'] .'</h2>';
333
- echo '<fieldset>';
334
-
335
- echo ( $this->settings['ajax_save'] ) ? '<span id="sp-save-ajax">'. esc_html__( 'Settings saved.', 'testimonial-free' ) .'</span>' : '';
336
-
337
- submit_button( esc_html__( 'Save Changes', 'testimonial-free' ), 'primary sp-save', 'save', false, array( 'data-save' => esc_html__( 'Saving...', 'testimonial-free' ) ) );
338
- submit_button( esc_html__( 'Restore', 'testimonial-free' ), 'secondary sp-restore sp-reset-confirm', $this->unique .'[reset]', false );
339
-
340
- if( $this->settings['show_reset_all'] ) {
341
- submit_button( esc_html__( 'Reset All Options', 'testimonial-free' ), 'secondary sp-restore sp-warning-primary sp-reset-confirm', $this->unique .'[resetall]', false );
342
- }
343
-
344
- echo '</fieldset>';
345
- //echo ( empty( $has_nav ) ) ? '<a href="#" class="sp-expand-all"><i class="fa fa-eye-slash"></i> '. esc_html__( 'show all options', 'testimonial-free' ) .'</a>' : '';
346
- echo '<div class="clear"></div>';
347
- echo '</header>'; // end .sp-header
348
-
349
- echo '<div class="sp-body'. $has_nav .'">';
350
-
351
- echo '<div class="sp-nav">';
352
-
353
- echo '<ul>';
354
- foreach ( $this->options as $key => $tab ) {
355
-
356
- if( ( isset( $tab['sections'] ) ) ) {
357
-
358
- $tab_active = sp_array_search( $tab['sections'], 'name', $section_id );
359
- $active_style = ( ! empty( $tab_active ) ) ? ' style="display: block;"' : '';
360
- $active_list = ( ! empty( $tab_active ) ) ? ' sp-tab-active' : '';
361
- $tab_icon = ( ! empty( $tab['icon'] ) ) ? '<i class="sp-icon '. $tab['icon'] .'"></i>' : '';
362
-
363
- echo '<li class="sp-sub'. $active_list .'">';
364
-
365
- echo '<a href="#" class="sp-arrow">'. $tab_icon . $tab['title'] .'</a>';
366
-
367
- echo '<ul'. $active_style .'>';
368
- foreach ( $tab['sections'] as $tab_section ) {
369
-
370
- $active_tab = ( $section_id == $tab_section['name'] ) ? ' class="sp-section-active"' : '';
371
- $icon = ( ! empty( $tab_section['icon'] ) ) ? '<i class="sp-icon '. $tab_section['icon'] .'"></i>' : '';
372
-
373
- echo '<li><a href="#"'. $active_tab .' data-section="'. $tab_section['name'] .'">'. $icon . $tab_section['title'] .'</a></li>';
374
-
375
- }
376
- echo '</ul>';
377
-
378
- echo '</li>';
379
-
380
- } else {
381
-
382
- $icon = ( ! empty( $tab['icon'] ) ) ? '<i class="sp-icon '. $tab['icon'] .'"></i>' : '';
383
-
384
- if( isset( $tab['fields'] ) ) {
385
-
386
- $active_list = ( $section_id == $tab['name'] ) ? ' class="sp-section-active"' : '';
387
- echo '<li><a href="#"'. $active_list .' data-section="'. $tab['name'] .'">'. $icon . $tab['title'] .'</a></li>';
388
-
389
- } else {
390
-
391
- echo '<li><div class="sp-separator">'. $icon . $tab['title'] .'</div></li>';
392
-
393
- }
394
-
395
- }
396
-
397
- }
398
- echo '</ul>';
399
-
400
- echo '</div>'; // end .sp-nav
401
-
402
- echo '<div class="sp-content">';
403
-
404
- echo '<div class="sp-sections">';
405
-
406
- foreach( $this->sections as $section ) {
407
-
408
- if( isset( $section['fields'] ) ) {
409
-
410
- $active_content = ( $section_id == $section['name'] ) ? ' style="display: block;"' : '';
411
- echo '<div id="sp-tab-'. $section['name'] .'" class="sp-section"'. $active_content .'>';
412
- echo ( isset( $section['title'] ) && empty( $has_nav ) ) ? '<div class="sp-section-title"><h3>'. $section['title'] .'</h3></div>' : '';
413
-
414
- foreach( $section['fields'] as $field ) {
415
- $this->field_callback( $field );
416
- }
417
-
418
- echo '</div>';
419
-
420
- }
421
-
422
- }
423
-
424
- echo '</div>'; // end .sp-sections
425
-
426
- echo '<div class="clear"></div>';
427
-
428
- echo '</div>'; // end .sp-content
429
-
430
- echo '<div class="sp-nav-background"></div>';
431
-
432
- echo '</div>'; // end .sp-body
433
-
434
- echo '</form>'; // end form
435
-
436
- echo '<div class="clear"></div>';
437
-
438
- echo '</div>'; // end .sp-tpro-framework
439
-
440
- }
441
-
442
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/metabox/classes/metabox.class.php DELETED
@@ -1,252 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die;
3
- } // Cannot access pages directly.
4
- /**
5
- *
6
- * Metabox Class
7
- *
8
- * @since 1.0.0
9
- * @version 1.0.0
10
- *
11
- */
12
- class SP_TPRO_Framework_Metabox extends SP_TPRO_Framework_Abstract {
13
-
14
- /**
15
- *
16
- * metabox options
17
- * @access public
18
- * @var array
19
- *
20
- */
21
- public $options = array();
22
-
23
- /**
24
- *
25
- * instance
26
- * @access private
27
- * @var class
28
- *
29
- */
30
- private static $instance = null;
31
-
32
- // run metabox construct
33
- public function __construct( $options ) {
34
-
35
- $this->options = apply_filters( 'sp_metabox_options', $options );
36
-
37
- if ( ! empty( $this->options ) ) {
38
- $this->addAction( 'add_meta_boxes', 'add_meta_box' );
39
- $this->addAction( 'save_post', 'save_post', 10, 2 );
40
- }
41
-
42
- }
43
-
44
- // instance
45
- public static function instance( $options = array() ) {
46
- if ( is_null( self::$instance ) && SP_TPRO_F_ACTIVE_METABOX ) {
47
- self::$instance = new self( $options );
48
- }
49
-
50
- return self::$instance;
51
- }
52
-
53
- // add metabox
54
- public function add_meta_box( $post_type ) {
55
-
56
- foreach ( $this->options as $value ) {
57
- add_meta_box( $value['id'], $value['title'], array(
58
- &$this,
59
- 'render_meta_box_content'
60
- ), $value['post_type'], $value['context'], $value['priority'], $value );
61
- }
62
-
63
- }
64
-
65
- // metabox render content
66
- public function render_meta_box_content( $post, $callback ) {
67
-
68
- global $post, $sp_errors;
69
-
70
- wp_nonce_field( 'sp-framework-metabox', 'sp-framework-metabox-nonce' );
71
-
72
- $unique = $callback['args']['id'];
73
- $sections = $callback['args']['sections'];
74
- $meta_value = get_post_meta( $post->ID, $unique, true );
75
- $transient = get_transient( 'tpro-metabox-transient' );
76
- $sp_errors = $transient['errors'];
77
- $has_nav = ( count( $sections ) >= 2 && $callback['args']['context'] != 'side' ) ? true : false;
78
- $show_all = ( ! $has_nav ) ? ' sp-show-all' : '';
79
- $section_name = ( ! empty( $sections[0]['fields'] ) ) ? $sections[0]['name'] : $sections[1]['name'];
80
- $section_id = ( ! empty( $transient['ids'][ $unique ] ) ) ? $transient['ids'][ $unique ] : $section_name;
81
- $section_id = sp_get_var( 'sp-section', $section_id );
82
-
83
- echo '<div class="sp-tpro-framework sp-metabox-framework">';
84
-
85
- echo '<input type="hidden" name="sp_section_id[' . $unique . ']" class="sp-reset" value="' . $section_id . '">';
86
-
87
- echo '<div class="sp-body' . $show_all . '">';
88
-
89
- if ( $has_nav ) {
90
-
91
- echo '<div class="sp-nav">';
92
-
93
- echo '<ul>';
94
- foreach ( $sections as $value ) {
95
-
96
- $tab_icon = ( ! empty( $value['icon'] ) ) ? '<i class="sp-icon ' . $value['icon'] . '"></i>' : '';
97
-
98
- if ( isset( $value['fields'] ) ) {
99
- $active_section = ( $section_id == $value['name'] ) ? ' class="sp-section-active"' : '';
100
- echo '<li><a href="#" ' . $active_section . ' data-section="' . $value['name'] . '">' . $tab_icon . $value['title'] . '</a></li>';
101
- } else {
102
- echo '<li><div class="sp-separator">' . $tab_icon . $value['title'] . '</div></li>';
103
- }
104
-
105
- }
106
- echo '</ul>';
107
-
108
- echo '</div>';
109
- }
110
-
111
- echo '<div class="sp-content">';
112
-
113
- echo '<div class="sp-sections">';
114
- foreach ( $sections as $val ) {
115
-
116
- if ( isset( $val['fields'] ) ) {
117
-
118
- $active_content = ( $section_id == $val['name'] ) ? ' style="display: block;"' : '';
119
-
120
- echo '<div id="sp-tab-' . $val['name'] . '" class="sp-section"' . $active_content . '>';
121
- echo ( isset( $val['title'] ) ) ? '<div class="sp-section-title"><h3>' . $val['title'] . '</h3></div>' : '';
122
-
123
- foreach ( $val['fields'] as $field_key => $field ) {
124
-
125
- $default = ( isset( $field['default'] ) ) ? $field['default'] : '';
126
- $elem_id = ( isset( $field['id'] ) ) ? $field['id'] : '';
127
- $elem_value = ( is_array( $meta_value ) && isset( $meta_value[ $elem_id ] ) ) ? $meta_value[ $elem_id ] : $default;
128
- echo sp_tpro_add_element( $field, $elem_value, $unique );
129
-
130
- }
131
- echo '</div>';
132
- }
133
- }
134
- echo '</div>';
135
-
136
- echo '<div class="clear"></div>';
137
-
138
- echo '</div>';
139
-
140
- echo ( $has_nav ) ? '<div class="sp-nav-background"></div>' : '';
141
-
142
- echo '<div class="clear"></div>';
143
-
144
- echo '</div>';
145
-
146
- echo '</div>';
147
- }
148
-
149
- // save metabox options
150
- public function save_post( $post_id, $post ) {
151
-
152
- if ( wp_verify_nonce( sp_get_var( 'sp-framework-metabox-nonce' ), 'sp-framework-metabox' ) ) {
153
-
154
- $errors = array();
155
- $post_type = sp_get_var( 'post_type' );
156
-
157
- foreach ( $this->options as $request_value ) {
158
-
159
- if ( in_array( $post_type, (array) $request_value['post_type'] ) ) {
160
-
161
- $request_key = $request_value['id'];
162
- $request = sp_get_var( $request_key, array() );
163
-
164
- // ignore _nonce
165
- if ( isset( $request['_nonce'] ) ) {
166
- unset( $request['_nonce'] );
167
- }
168
-
169
- foreach ( $request_value['sections'] as $key => $section ) {
170
-
171
- if ( isset( $section['fields'] ) ) {
172
-
173
- foreach ( $section['fields'] as $field ) {
174
-
175
- if ( isset( $field['type'] ) && isset( $field['id'] ) ) {
176
-
177
- $field_value = sp_get_vars( $request_key, $field['id'] );
178
-
179
- // sanitize options
180
- if ( isset( $field['sanitize'] ) && $field['sanitize'] !== false ) {
181
- $sanitize_type = $field['sanitize'];
182
- } else if ( ! isset( $field['sanitize'] ) ) {
183
- $sanitize_type = $field['type'];
184
- }
185
-
186
- if ( has_filter( 'sp_sanitize_' . $sanitize_type ) ) {
187
- $request[ $field['id'] ] = apply_filters( 'sp_sanitize_' . $sanitize_type, $field_value, $field, $section['fields'] );
188
- }
189
-
190
- // validate options
191
- if ( isset( $field['validate'] ) && has_filter( 'sp_validate_' . $field['validate'] ) ) {
192
-
193
- $validate = apply_filters( 'sp_validate_' . $field['validate'], $field_value, $field, $section['fields'] );
194
-
195
- if ( ! empty( $validate ) ) {
196
-
197
- $meta_value = get_post_meta( $post_id, $request_key, true );
198
-
199
- $errors[ $field['id'] ] = array(
200
- 'code' => $field['id'],
201
- 'message' => $validate,
202
- 'type' => 'error'
203
- );
204
- $default_value = isset( $field['default'] ) ? $field['default'] : '';
205
- $request[ $field['id'] ] = ( isset( $meta_value[ $field['id'] ] ) ) ? $meta_value[ $field['id'] ] : $default_value;
206
-
207
- }
208
-
209
- }
210
-
211
- }
212
-
213
- }
214
-
215
- }
216
-
217
- }
218
-
219
- $request = apply_filters( 'sp_save_post', $request, $request_key, $post );
220
-
221
- if ( empty( $request ) ) {
222
-
223
- delete_post_meta( $post_id, $request_key );
224
-
225
- } else {
226
-
227
- if ( get_post_meta( $post_id, $request_key ) ) {
228
-
229
- update_post_meta( $post_id, $request_key, $request );
230
-
231
- } else {
232
-
233
- add_post_meta( $post_id, $request_key, $request );
234
-
235
- }
236
-
237
- }
238
-
239
- $transient['ids'][ $request_key ] = sp_get_vars( 'sp_section_id', $request_key );
240
- $transient['errors'] = $errors;
241
-
242
- }
243
-
244
- }
245
-
246
- set_transient( 'tpro-metabox-transient', $transient, 10 );
247
-
248
- }
249
-
250
- }
251
-
252
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/metabox/classes/options.class.php DELETED
@@ -1,374 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
2
- /**
3
- *
4
- * Options Class
5
- *
6
- * @since 1.0.0
7
- * @version 1.0.0
8
- *
9
- */
10
- abstract class SP_TPRO_Framework_Options extends SP_TPRO_Framework_Abstract {
11
-
12
- public function __construct( $field = array(), $value = '', $unique = '' ) {
13
- $this->field = $field;
14
- $this->value = $value;
15
- $this->org_value = $value;
16
- $this->unique = $unique;
17
- $this->multilang = $this->element_multilang();
18
- }
19
-
20
- public function element_value( $value = '' ) {
21
-
22
- $value = $this->value;
23
-
24
- if ( is_array( $this->multilang ) && is_array( $value ) ) {
25
-
26
- $current = $this->multilang['current'];
27
-
28
- if( isset( $value[$current] ) ) {
29
- $value = $value[$current];
30
- } else if( $this->multilang['current'] == $this->multilang['default'] ) {
31
- $value = $this->value;
32
- } else {
33
- $value = '';
34
- }
35
-
36
- } else if ( ! is_array( $this->multilang ) && isset( $this->value['multilang'] ) && is_array( $this->value ) ) {
37
-
38
- $value = array_values( $this->value );
39
- $value = $value[0];
40
-
41
- } else if ( is_array( $this->multilang ) && ! is_array( $value ) && ( $this->multilang['current'] != $this->multilang['default'] ) ) {
42
-
43
- $value = '';
44
-
45
- }
46
-
47
- return $value;
48
-
49
- }
50
-
51
- public function element_name( $extra_name = '', $multilang = false ) {
52
-
53
- $element_id = ( isset( $this->field['id'] ) ) ? $this->field['id'] : '';
54
- $extra_multilang = ( ! $multilang && is_array( $this->multilang ) ) ? '['. $this->multilang['current'] .']' : '';
55
- return ( isset( $this->field['name'] ) ) ? $this->field['name'] . $extra_name : $this->unique .'['. $element_id .']'. $extra_multilang . $extra_name;
56
-
57
- }
58
-
59
- public function element_type() {
60
- $type = ( isset( $this->field['attributes']['type'] ) ) ? $this->field['attributes']['type'] : $this->field['type'];
61
- return $type;
62
- }
63
-
64
- public function element_class( $el_class = '' ) {
65
-
66
- $field_class = ( isset( $this->field['class'] ) ) ? ' ' . $this->field['class'] : '';
67
- return ( $field_class || $el_class ) ? ' class="'. $el_class . $field_class .'"' : '';
68
-
69
- }
70
-
71
- public function element_attributes( $el_attributes = array() ) {
72
-
73
- $attributes = ( isset( $this->field['attributes'] ) ) ? $this->field['attributes'] : array();
74
- $element_id = ( isset( $this->field['id'] ) ) ? $this->field['id'] : '';
75
-
76
- if( $el_attributes !== false ) {
77
- $sub_elemenet = ( isset( $this->field['sub'] ) ) ? 'sub-': '';
78
- $el_attributes = ( is_string( $el_attributes ) || is_numeric( $el_attributes ) ) ? array('data-'. $sub_elemenet .'depend-id' => $element_id . '_' . $el_attributes ) : $el_attributes;
79
- $el_attributes = ( empty( $el_attributes ) && isset( $element_id ) ) ? array('data-'. $sub_elemenet .'depend-id' => $element_id ) : $el_attributes;
80
- }
81
-
82
- $attributes = wp_parse_args( $attributes, $el_attributes );
83
-
84
- $atts = '';
85
-
86
- if( ! empty( $attributes ) ) {
87
- foreach ( $attributes as $key => $value ) {
88
- if( $value === 'only-key' ) {
89
- $atts .= ' '. $key;
90
- } else {
91
- $atts .= ' '. $key . '="'. $value .'"';
92
- }
93
- }
94
- }
95
-
96
- return $atts;
97
-
98
- }
99
-
100
- public function element_before() {
101
- return ( isset( $this->field['before'] ) ) ? $this->field['before'] : '';
102
- }
103
-
104
- public function element_after() {
105
-
106
- $out = ( isset( $this->field['info'] ) ) ? '<p class="sp-text-desc">'. $this->field['info'] .'</p>' : '';
107
- $out .= ( isset( $this->field['after'] ) ) ? '<span class="sp-after-text">'.$this->field['after'] .'</span>': '';
108
- $out .= $this->element_after_multilang();
109
- $out .= $this->element_get_error();
110
- $out .= $this->element_help();
111
- $out .= $this->element_debug();
112
- return $out;
113
-
114
- }
115
-
116
- public function element_debug() {
117
-
118
- $out = '';
119
-
120
- if( ( isset( $this->field['debug'] ) && $this->field['debug'] === true ) || ( defined( 'SP_OPTIONS_DEBUG' ) && SP_OPTIONS_DEBUG ) ) {
121
-
122
- $value = $this->element_value();
123
-
124
- $out .= "<pre>";
125
- $out .= "<strong>". __( 'CONFIG', 'testimonial-free' ) .":</strong>";
126
- $out .= "\n";
127
- ob_start();
128
- var_export( $this->field );
129
- $out .= htmlspecialchars( ob_get_clean() );
130
- $out .= "\n\n";
131
- $out .= "<strong>". __( 'USAGE', 'testimonial-free' ) .":</strong>";
132
- $out .= "\n";
133
- $out .= ( isset( $this->field['id'] ) ) ? "sp_get_option( '". $this->field['id'] ."' );" : '';
134
-
135
- if( ! empty( $value ) ) {
136
- $out .= "\n\n";
137
- $out .= "<strong>". __( 'VALUE', 'testimonial-free' ) .":</strong>";
138
- $out .= "\n";
139
- ob_start();
140
- var_export( $value );
141
- $out .= htmlspecialchars( ob_get_clean() );
142
- }
143
-
144
- $out .= "</pre>";
145
-
146
- }
147
-
148
- if( ( isset( $this->field['debug_light'] ) && $this->field['debug_light'] === true ) || ( defined( 'SP_OPTIONS_DEBUG_LIGHT' ) && SP_OPTIONS_DEBUG_LIGHT ) ) {
149
-
150
- $out .= "<pre>";
151
- $out .= "<strong>". __( 'USAGE', 'testimonial-free' ) .":</strong>";
152
- $out .= "\n";
153
- $out .= ( isset( $this->field['id'] ) ) ? "sp_get_option( '". $this->field['id'] ."' );" : '';
154
- $out .= "\n";
155
- $out .= "<strong>". __( 'ID', 'testimonial-free' ) .":</strong>";
156
- $out .= "\n";
157
- $out .= ( isset( $this->field['id'] ) ) ? $this->field['id'] : '';
158
- $out .= "</pre>";
159
-
160
- }
161
-
162
- return $out;
163
-
164
- }
165
-
166
- public function element_get_error() {
167
-
168
- global $sp_errors;
169
-
170
- $out = '';
171
-
172
- if( ! empty( $sp_errors ) ) {
173
- foreach ( $sp_errors as $key => $value ) {
174
- if( isset( $this->field['id'] ) && $value['code'] == $this->field['id'] ) {
175
- $out .= '<p class="sp-text-warning">'. $value['message'] .'</p>';
176
- }
177
- }
178
- }
179
-
180
- return $out;
181
-
182
- }
183
-
184
- public function element_help() {
185
- return ( isset( $this->field['help'] ) ) ? '<span class="sp-help" data-title="'. $this->field['help'] .'"><span class="fa fa-question-circle"></span></span>' : '';
186
- }
187
-
188
- public function element_after_multilang() {
189
-
190
- $out = '';
191
-
192
- if ( is_array( $this->multilang ) ) {
193
-
194
- $out .= '<fieldset class="hidden">';
195
-
196
- foreach ( $this->multilang['languages'] as $key => $val ) {
197
-
198
- // ignore current language for hidden element
199
- if( $key != $this->multilang['current'] ) {
200
-
201
- // set default value
202
- if( isset( $this->org_value[$key] ) ) {
203
- $value = $this->org_value[$key];
204
- } else if ( ! isset( $this->org_value[$key] ) && ( $key == $this->multilang['default'] ) ) {
205
- $value = $this->org_value;
206
- } else {
207
- $value = '';
208
- }
209
-
210
- $cache_field = $this->field;
211
-
212
- unset( $cache_field['multilang'] );
213
- $cache_field['name'] = $this->element_name( '['. $key .']', true );
214
-
215
- $class = 'SP_TPRO_Framework_Option_' . $this->field['type'];
216
- $element = new $class( $cache_field, $value, $this->unique );
217
-
218
- ob_start();
219
- $element->output();
220
- $out .= ob_get_clean();
221
-
222
- }
223
- }
224
-
225
- $out .= '<input type="hidden" name="'. $this->element_name( '[multilang]', true ) .'" value="true" />';
226
- $out .= '</fieldset>';
227
- $out .= '<p class="sp-text-desc">'. sprintf( __( 'You are editing language: ( <strong>%s</strong> )', 'testimonial-free' ), $this->multilang['current'] ) .'</p>';
228
-
229
- }
230
-
231
- return $out;
232
- }
233
-
234
- public function element_data( $type = '' ) {
235
-
236
- $options = array();
237
- $query_args = ( isset( $this->field['query_args'] ) ) ? $this->field['query_args'] : array();
238
-
239
- switch( $type ) {
240
-
241
- case 'pages':
242
- case 'page':
243
-
244
- $pages = get_pages( $query_args );
245
-
246
- if ( ! is_wp_error( $pages ) && ! empty( $pages ) ) {
247
- foreach ( $pages as $page ) {
248
- $options[$page->ID] = $page->post_title;
249
- }
250
- }
251
-
252
- break;
253
-
254
- case 'posts':
255
- case 'post':
256
-
257
- $posts = get_posts( $query_args );
258
-
259
- if ( ! is_wp_error( $posts ) && ! empty( $posts ) ) {
260
- foreach ( $posts as $post ) {
261
- $options[$post->ID] = $post->post_title;
262
- }
263
- }
264
-
265
- break;
266
-
267
- case 'post_types':
268
- case 'post_type':
269
-
270
- $post_types = get_post_types( array( 'public' => true) );
271
- if ( ! is_wp_error( $post_types ) && ! empty( $post_types ) ) {
272
- foreach ($post_types as $post_type => $label) {
273
- $options[$post_type] = $label;
274
- }
275
- }
276
-
277
- break;
278
-
279
- case 'testimonial_categorise':
280
- case 'testimonial_category':
281
-
282
- $taxonomies = ( isset( $query_args['taxonomies'] ) ) ? $query_args['taxonomies'] : 'testimonial_cat';
283
- $tags = get_terms( $taxonomies, $query_args );
284
-
285
- if ( ! is_wp_error( $tags ) && ! empty( $tags ) ) {
286
- foreach ( $tags as $tag ) {
287
- $options[$tag->term_id] = $tag->name;
288
- }
289
- }
290
-
291
- break;
292
-
293
- case 'all_testimonials':
294
- case 'all_testimonial':
295
- global $wpdb;
296
-
297
- $all_posts = $wpdb->get_results("
298
- SELECT ID,post_title FROM `" . $wpdb->prefix . "posts` where post_type='spt_testimonial' and post_status = 'publish' ORDER BY post_date DESC");
299
-
300
- if ( ! is_wp_error( $all_posts ) && ! empty( $all_posts ) ) {
301
- foreach ( $all_posts as $post_obj ) {
302
- $options[$post_obj->ID] = $post_obj->post_title;
303
- }
304
- }
305
-
306
- break;
307
-
308
- case 'categories':
309
- case 'category':
310
-
311
- $categories = get_categories( $query_args );
312
-
313
- if ( ! is_wp_error( $categories ) && ! empty( $categories ) && ! isset( $categories['errors'] ) ) {
314
- foreach ( $categories as $category ) {
315
- $options[$category->term_id] = $category->name;
316
- }
317
- }
318
-
319
- break;
320
-
321
- case 'tags':
322
- case 'tag':
323
-
324
- $taxonomies = ( isset( $query_args['taxonomies'] ) ) ? $query_args['taxonomies'] : 'post_tag';
325
- $tags = get_terms( $taxonomies, $query_args );
326
-
327
- if ( ! is_wp_error( $tags ) && ! empty( $tags ) ) {
328
- foreach ( $tags as $tag ) {
329
- $options[$tag->term_id] = $tag->name;
330
- }
331
- }
332
-
333
- break;
334
-
335
- case 'custom':
336
- case 'callback':
337
-
338
- if( is_callable( $query_args['function'] ) ) {
339
- $options = call_user_func( $query_args['function'], $query_args['args'] );
340
- }
341
-
342
- break;
343
-
344
- }
345
-
346
- return $options;
347
- }
348
-
349
- public function checked( $helper = '', $current = '', $type = 'checked', $echo = false ) {
350
-
351
- if ( is_array( $helper ) && in_array( $current, $helper ) ) {
352
- $result = ' '. $type .'="'. $type .'"';
353
- } else if ( $helper == $current ) {
354
- $result = ' '. $type .'="'. $type .'"';
355
- } else {
356
- $result = '';
357
- }
358
-
359
- if ( $echo ) {
360
- echo $result;
361
- }
362
-
363
- return $result;
364
-
365
- }
366
-
367
- public function element_multilang() {
368
- return ( isset( $this->field['multilang'] ) ) ? sp_language_defaults() : false;
369
- }
370
-
371
- }
372
-
373
- // load all of fields
374
- sp_tpro_load_option_fields();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/metabox/config/metabox.config.php DELETED
@@ -1,155 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die;
3
- }
4
- // Cannot access pages directly.
5
- // ===============================================================================================
6
- // -----------------------------------------------------------------------------------------------
7
- // METABOX OPTIONS
8
- // -----------------------------------------------------------------------------------------------
9
- // ===============================================================================================
10
- $options = array();
11
-
12
- // -----------------------------------------
13
- // Testimonial Meta Options
14
- // -----------------------------------------
15
- $options[] = array(
16
- 'id' => 'sp_tpro_meta_options',
17
- 'title' => __( 'Testimonial Options', 'testimonial-free' ),
18
- 'post_type' => 'spt_testimonial',
19
- 'context' => 'normal',
20
- 'priority' => 'default',
21
- 'sections' => array(
22
-
23
- // begin: a section
24
- array(
25
- 'name' => 'sp_tpro_meta_option_1',
26
- 'title' => __( 'Reviewer Information', 'testimonial-free' ),
27
-
28
- // begin: fields
29
- 'fields' => array(
30
-
31
- // begin: a field
32
- array(
33
- 'id' => 'tpro_name',
34
- 'type' => 'text',
35
- 'title' => __( 'Name', 'testimonial-free' ),
36
- 'desc' => __( 'Type reviewer name here.', 'testimonial-free' ),
37
- ),
38
- array(
39
- 'id' => 'tpro_designation',
40
- 'type' => 'text',
41
- 'title' => __( 'Identity or Position', 'testimonial-free' ),
42
- 'desc' => __( 'Type reviewer identity or position here.', 'testimonial-free' ),
43
- ),
44
- array(
45
- 'id' => 'tpro_rating',
46
- 'type' => 'rating',
47
- 'title' => __( 'Rating Star', 'testimonial-free' ),
48
- 'desc' => __( 'Rating star along with testimonial.', 'testimonial-free' ),
49
- 'options' => array(
50
- 'five_star' => __( '5 Stars', 'testimonial-free' ),
51
- 'four_star' => __( '4 Stars', 'testimonial-free' ),
52
- 'three_star' => __( '3 Stars', 'testimonial-free' ),
53
- 'two_star' => __( '2 Stars', 'testimonial-free' ),
54
- 'one_star' => __( '1 Star', 'testimonial-free' ),
55
- ),
56
- 'default' => '',
57
- ),
58
- ), // end: fields
59
- ), // end: a section
60
-
61
- // begin: a section
62
- array(
63
- 'name' => 'sp_tpro_meta_option_2',
64
- 'title' => __( 'Social Profiles', 'testimonial-free' ),
65
-
66
- // begin: fields
67
- 'fields' => array(
68
-
69
- // begin: a field
70
- array(
71
- 'type' => 'notice',
72
- 'class' => 'notice',
73
- 'content' => __( 'These Social Profile options are available in the <b><a href="https://shapedplugin.com/plugin/testimonial-pro" target="_blank">Pro Version</a></b>.', 'testimonial-free' ),
74
- ),
75
- array(
76
- 'id' => 'tpro_social_facebook_url',
77
- 'type' => 'd_text',
78
- 'title' => __( 'Facebook', 'testimonial-free' ),
79
- 'desc' => __( 'Type facebook URL here.', 'testimonial-free' ),
80
- ),
81
- array(
82
- 'id' => 'tpro_social_twitter_url',
83
- 'type' => 'd_text',
84
- 'title' => __( 'Twitter', 'testimonial-free' ),
85
- 'desc' => __( 'Type twitter URL here.', 'testimonial-free' ),
86
- ),
87
- array(
88
- 'id' => 'tpro_social_google_plus_url',
89
- 'type' => 'd_text',
90
- 'title' => __( 'Google Plus', 'testimonial-free' ),
91
- 'desc' => __( 'Type google plus URL here.', 'testimonial-free' ),
92
- ),
93
- array(
94
- 'id' => 'tpro_social_linked_in_url',
95
- 'type' => 'd_text',
96
- 'title' => __( 'LinkedIn', 'testimonial-free' ),
97
- 'desc' => __( 'Type linkedin URL here.', 'testimonial-free' ),
98
- ),
99
- array(
100
- 'id' => 'tpro_social_instagram_url',
101
- 'type' => 'd_text',
102
- 'title' => __( 'Instagram', 'testimonial-free' ),
103
- 'desc' => __( 'Type Instagram URL here.', 'testimonial-free' ),
104
- ),
105
- array(
106
- 'id' => 'tpro_social_youtube_url',
107
- 'type' => 'd_text',
108
- 'title' => __( 'YouTube', 'testimonial-free' ),
109
- 'desc' => __( 'Type youtube URL here.', 'testimonial-free' ),
110
- ),
111
- array(
112
- 'id' => 'tpro_social_pinterest_url',
113
- 'type' => 'd_text',
114
- 'title' => __( 'Pinterest', 'testimonial-free' ),
115
- 'desc' => __( 'Type pinterest URL here.', 'testimonial-free' ),
116
- ),
117
- array(
118
- 'id' => 'tpro_social_skype_url',
119
- 'type' => 'd_text',
120
- 'title' => __( 'Skype', 'testimonial-free' ),
121
- 'desc' => __( 'Type skype URL here.', 'testimonial-free' ),
122
- ),
123
- array(
124
- 'id' => 'tpro_social_stumble_upon_url',
125
- 'type' => 'd_text',
126
- 'title' => __( 'StumbleUpon', 'testimonial-free' ),
127
- 'desc' => __( 'Type stumbleupon URL here.', 'testimonial-free' ),
128
- ),
129
- array(
130
- 'id' => 'tpro_social_reddit_url',
131
- 'type' => 'd_text',
132
- 'title' => __( 'Reddit', 'testimonial-free' ),
133
- 'desc' => __( 'Type reddit URL here.', 'testimonial-free' ),
134
- ),
135
- array(
136
- 'id' => 'tpro_social_dribbble_url',
137
- 'type' => 'd_text',
138
- 'title' => __( 'Dribbble', 'testimonial-free' ),
139
- 'desc' => __( 'Type dribbble URL here.', 'testimonial-free' ),
140
- ),
141
- array(
142
- 'id' => 'tpro_social_snapchat_url',
143
- 'type' => 'd_text',
144
- 'title' => __( 'SnapChat', 'testimonial-free' ),
145
- 'desc' => __( 'Type snapchat URL here.', 'testimonial-free' ),
146
- ),
147
-
148
- ), // end: fields
149
- ), // end: a section
150
-
151
- ),
152
- );
153
-
154
-
155
- SP_TPRO_Framework_Metabox::instance( $options );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/metabox/fields/d_text/d_text.php DELETED
@@ -1,24 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
2
- /**
3
- *
4
- * Field: D-Text
5
- *
6
- * @since 1.0.0
7
- * @version 1.0.0
8
- *
9
- */
10
- class SP_TPRO_Framework_Option_d_text extends SP_TPRO_Framework_Options {
11
-
12
- public function __construct( $field, $value = '', $unique = '' ) {
13
- parent::__construct( $field, $value, $unique );
14
- }
15
-
16
- public function output(){
17
-
18
- echo $this->element_before();
19
- echo '<input disabled type="text" />';
20
- echo $this->element_after();
21
-
22
- }
23
-
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/metabox/fields/notice/notice.php DELETED
@@ -1,24 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
2
- /**
3
- *
4
- * Field: Heading
5
- *
6
- * @since 1.0.0
7
- * @version 1.0.0
8
- *
9
- */
10
- class SP_TPRO_Framework_Option_notice extends SP_TPRO_Framework_Options {
11
-
12
- public function __construct( $field, $value = '', $unique = '' ) {
13
- parent::__construct( $field, $value, $unique );
14
- }
15
-
16
- public function output() {
17
-
18
- echo $this->element_before();
19
- echo '<div class="sp-tpro-notice sp-'. $this->field['class'] .'">'. $this->field['content'] .'</div>';
20
- echo $this->element_after();
21
-
22
- }
23
-
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/metabox/fields/rating/rating.php DELETED
@@ -1,43 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
2
- /**
3
- *
4
- * Field: Rating
5
- *
6
- * @since 1.0.0
7
- * @version 1.0.0
8
- *
9
- */
10
- class SP_TPRO_Framework_Option_rating extends SP_TPRO_Framework_Options {
11
-
12
- public function __construct( $field, $value = '', $unique = '' ) {
13
- parent::__construct( $field, $value, $unique );
14
- }
15
-
16
- public function output(){
17
-
18
- echo $this->element_before();
19
-
20
- if( isset( $this->field['options'] ) ) {
21
-
22
- $options = $this->field['options'];
23
- $options = ( is_array( $options ) ) ? $options : array_filter( $this->element_data( $options ) );
24
-
25
- if( ! empty( $options ) ) {
26
-
27
- echo '<div'. $this->element_class('sp-tpro-client-rating') .'>';
28
- foreach ( $options as $key => $value ) {
29
- echo '<input type="radio" name="'. $this->element_name() .'" id="'. $key .'" value="'. $key .'"'. $this->element_attributes( $key ) . $this->checked( $this->element_value(), $key ) .'/><label for="'. $key .'" title="'. $value .'"><i class="fa fa-star"></i></label>';
30
- }
31
- echo '</div>';
32
- }
33
-
34
- } else {
35
- $label = ( isset( $this->field['label'] ) ) ? $this->field['label'] : '';
36
- echo '<label><input type="radio" name="'. $this->element_name() .'" value="1"'. $this->element_class() . $this->element_attributes() . checked( $this->element_value(), 1, false ) .'/> '. $label .'</label>';
37
- }
38
-
39
- echo $this->element_after();
40
-
41
- }
42
-
43
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/metabox/fields/text/text.php DELETED
@@ -1,24 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
2
- /**
3
- *
4
- * Field: Text
5
- *
6
- * @since 1.0.0
7
- * @version 1.0.0
8
- *
9
- */
10
- class SP_TPRO_Framework_Option_text extends SP_TPRO_Framework_Options {
11
-
12
- public function __construct( $field, $value = '', $unique = '' ) {
13
- parent::__construct( $field, $value, $unique );
14
- }
15
-
16
- public function output(){
17
-
18
- echo $this->element_before();
19
- echo '<input type="'. $this->element_type() .'" name="'. $this->element_name() .'" value="'. $this->element_value() .'"'. $this->element_class() . $this->element_attributes() .'/>';
20
- echo $this->element_after();
21
-
22
- }
23
-
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/metabox/functions/actions.php DELETED
@@ -1,25 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
2
-
3
- /**
4
- *
5
- * Export options
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- *
10
- */
11
- if( ! function_exists( 'sp_export_options' ) ) {
12
- function sp_export_options() {
13
-
14
- header('Content-Type: plain/text');
15
- header('Content-disposition: attachment; filename=backup-options-'. gmdate( 'd-m-Y' ) .'.txt');
16
- header('Content-Transfer-Encoding: binary');
17
- header('Pragma: no-cache');
18
- header('Expires: 0');
19
-
20
- echo sp_encode_string( get_option( SP_OPTION ) );
21
-
22
- die();
23
- }
24
- add_action( 'wp_ajax_sp-export-options', 'sp_export_options' );
25
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/metabox/functions/enqueue.php DELETED
@@ -1,35 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die;
3
- } // Cannot access pages directly.
4
- /**
5
- *
6
- * Framework admin enqueue style and scripts
7
- *
8
- * @since 1.0.0
9
- * @version 1.0.0
10
- *
11
- */
12
- if ( ! function_exists( 'sp_tfree_admin_enqueue_scripts' ) ) {
13
- function sp_tfree_admin_enqueue_scripts() {
14
- $current_screen = get_current_screen();
15
- $the_current_post_type = $current_screen->post_type;
16
- if ( $the_current_post_type == 'spt_testimonial' ) {
17
-
18
- // framework core styles
19
- wp_enqueue_style( 'sp-tfree-framework', SP_TFREE_URL . 'admin/views/metabox/assets/css/sp-framework.css', array(), SP_TFREE_VERSION, 'all' );
20
- wp_enqueue_style( 'sp-tfree-custom', SP_TFREE_URL . 'admin/views/metabox/assets/css/sp-custom.css', array(), SP_TFREE_VERSION, 'all' );
21
- wp_enqueue_style( 'tfree-font-awesome', SP_TFREE_URL . 'public/assets/css/font-awesome.min.css', array(), SP_TFREE_VERSION, 'all' );
22
-
23
- if ( is_rtl() ) {
24
- wp_enqueue_style( 'sp-framework-rtl', SP_TFREE_URL . 'admin/views/metabox/assets/css/sp-framework-rtl.css', array(), SP_TFREE_VERSION, 'all' );
25
- }
26
-
27
- // framework core scripts
28
- wp_enqueue_script( 'sp-tfree-plugins', SP_TFREE_URL . 'admin/views/metabox/assets/js/sp-plugins.js', array(), SP_TFREE_VERSION, true );
29
- wp_enqueue_script( 'sp-tfree-framework', SP_TFREE_URL . 'admin/views/metabox/assets/js/sp-framework.js', array( 'sp-tfree-plugins' ), SP_TFREE_VERSION, true );
30
- }
31
-
32
- }
33
-
34
- add_action( 'admin_enqueue_scripts', 'sp_tfree_admin_enqueue_scripts' );
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/metabox/functions/fallback.php DELETED
@@ -1,86 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
2
- /**
3
- *
4
- * A fallback for get term meta
5
- * get_term_meta added since WP 4.4
6
- *
7
- * @since 1.0.2
8
- * @version 1.0.0
9
- *
10
- */
11
- if( ! function_exists( 'get_term_meta' ) ) {
12
- function get_term_meta( $term_id, $key = '', $single = false ) {
13
-
14
- $terms = get_option( 'sp_term_'. $key );
15
-
16
- return ( ! empty( $terms[$term_id] ) ) ? $terms[$term_id] : false;
17
-
18
- }
19
- }
20
-
21
- /**
22
- *
23
- * A fallback for add term meta
24
- * add_term_meta added since WP 4.4
25
- *
26
- * @since 1.0.2
27
- * @version 1.0.0
28
- *
29
- */
30
- if( ! function_exists( 'add_term_meta' ) ) {
31
- function add_term_meta( $term_id, $meta_key = '', $meta_value, $unique = false ) {
32
-
33
- return update_term_meta( $term_id, $meta_key, $meta_value, $unique );
34
-
35
- }
36
- }
37
-
38
- /**
39
- *
40
- * A fallback for update term meta
41
- * update_term_meta added since WP 4.4
42
- *
43
- * @since 1.0.2
44
- * @version 1.0.0
45
- *
46
- */
47
- if( ! function_exists( 'update_term_meta' ) ) {
48
- function update_term_meta( $term_id, $meta_key, $meta_value, $prev_value = '' ) {
49
-
50
- if ( ! empty( $term_id ) || ! empty( $meta_key ) || ! empty( $meta_value ) ) {
51
-
52
- $terms = get_option( 'sp_term_'. $meta_key );
53
-
54
- $terms[$term_id] = $meta_value;
55
-
56
- update_option( 'sp_term_'. $meta_key, $terms );
57
-
58
- }
59
-
60
- }
61
- }
62
-
63
- /**
64
- *
65
- * A fallback for delete term meta
66
- * delete_term_meta added since WP 4.4
67
- *
68
- * @since 1.0.2
69
- * @version 1.0.0
70
- *
71
- */
72
- if( ! function_exists( 'delete_term_meta' ) ) {
73
- function delete_term_meta( $term_id, $meta_key, $meta_value = '', $delete_all = false ) {
74
-
75
- if ( ! empty( $term_id ) || ! empty( $meta_key ) ) {
76
-
77
- $terms = get_option( 'sp_term_'. $meta_key );
78
-
79
- unset( $terms[$term_id] );
80
-
81
- update_option( 'sp_term_'. $meta_key, $terms );
82
-
83
- }
84
-
85
- }
86
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/metabox/functions/helpers.php DELETED
@@ -1,205 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
2
- /**
3
- *
4
- * Add framework element
5
- *
6
- * @since 1.0.0
7
- * @version 1.0.0
8
- *
9
- */
10
- if ( ! function_exists( 'sp_tpro_add_element' ) ) {
11
- function sp_tpro_add_element( $field = array(), $value = '', $unique = '' ) {
12
-
13
- $output = '';
14
- $depend = '';
15
- $sub = ( isset( $field['sub'] ) ) ? 'sub-': '';
16
- $unique = ( isset( $unique ) ) ? $unique : '';
17
- $languages = sp_language_defaults();
18
- $class = 'SP_TPRO_Framework_Option_' . $field['type'];
19
- $wrap_class = ( isset( $field['wrap_class'] ) ) ? ' ' . $field['wrap_class'] : '';
20
- $hidden = ( isset( $field['show_only_language'] ) && ( $field['show_only_language'] != $languages['current'] ) ) ? ' hidden' : '';
21
- $is_pseudo = ( isset( $field['pseudo'] ) ) ? ' sp-pseudo-field' : '';
22
-
23
- if ( isset( $field['dependency'] ) ) {
24
- $hidden = ' hidden';
25
- $depend .= ' data-'. $sub .'controller="'. $field['dependency'][0] .'"';
26
- $depend .= ' data-'. $sub .'condition="'. $field['dependency'][1] .'"';
27
- $depend .= ' data-'. $sub .'value="'. $field['dependency'][2] .'"';
28
- }
29
-
30
- $output .= '<div class="sp-element sp-field-'. $field['type'] . $is_pseudo . $wrap_class . $hidden .'"'. $depend .'>';
31
-
32
- if( isset( $field['title'] ) ) {
33
- $field_desc = ( isset( $field['desc'] ) ) ? '<p class="sp-text-desc">'. $field['desc'] .'</p>' : '';
34
- $output .= '<div class="sp-title"><h4>' . $field['title'] . '</h4>'. $field_desc .'</div>';
35
- }
36
-
37
- $output .= ( isset( $field['title'] ) ) ? '<div class="sp-fieldset">' : '';
38
-
39
- $value = ( !isset( $value ) && isset( $field['default'] ) ) ? $field['default'] : $value;
40
- $value = ( isset( $field['value'] ) ) ? $field['value'] : $value;
41
-
42
- if( class_exists( $class ) ) {
43
- ob_start();
44
- $element = new $class( $field, $value, $unique );
45
- $element->output();
46
- $output .= ob_get_clean();
47
- } else {
48
- $output .= '<p>'. __( 'This field class is not available!', 'testimonial-free' ) .'</p>';
49
- }
50
-
51
- $output .= ( isset( $field['title'] ) ) ? '</div>' : '';
52
- $output .= '<div class="clear"></div>';
53
- $output .= '</div>';
54
-
55
- return $output;
56
-
57
- }
58
- }
59
-
60
- /**
61
- *
62
- * Encode string for backup options
63
- *
64
- * @since 1.0.0
65
- * @version 1.0.0
66
- *
67
- */
68
- if ( ! function_exists( 'sp_encode_string' ) ) {
69
- function sp_encode_string( $string ) {
70
- return rtrim( strtr( call_user_func( 'base'. '64' .'_encode', addslashes( gzcompress( serialize( $string ), 9 ) ) ), '+/', '-_' ), '=' );
71
- }
72
- }
73
-
74
- /**
75
- *
76
- * Decode string for backup options
77
- *
78
- * @since 1.0.0
79
- * @version 1.0.0
80
- *
81
- */
82
- if ( ! function_exists( 'sp_decode_string' ) ) {
83
- function sp_decode_string( $string ) {
84
- return unserialize( gzuncompress( stripslashes( call_user_func( 'base'. '64' .'_decode', rtrim( strtr( $string, '-_', '+/' ), '=' ) ) ) ) );
85
- }
86
- }
87
-
88
-
89
-
90
- /**
91
- *
92
- * Array search key & value
93
- *
94
- * @since 1.0.0
95
- * @version 1.0.0
96
- *
97
- */
98
- if ( ! function_exists( 'sp_array_search' ) ) {
99
- function sp_array_search( $array, $key, $value ) {
100
-
101
- $results = array();
102
-
103
- if ( is_array( $array ) ) {
104
- if ( isset( $array[$key] ) && $array[$key] == $value ) {
105
- $results[] = $array;
106
- }
107
-
108
- foreach ( $array as $sub_array ) {
109
- $results = array_merge( $results, sp_array_search( $sub_array, $key, $value ) );
110
- }
111
-
112
- }
113
-
114
- return $results;
115
-
116
- }
117
- }
118
-
119
- /**
120
- *
121
- * Getting POST Var
122
- *
123
- * @since 1.0.0
124
- * @version 1.0.0
125
- *
126
- */
127
- if ( ! function_exists( 'sp_get_var' ) ) {
128
- function sp_get_var( $var, $default = '' ) {
129
-
130
- if( isset( $_POST[$var] ) ) {
131
- return $_POST[$var];
132
- }
133
-
134
- if( isset( $_GET[$var] ) ) {
135
- return $_GET[$var];
136
- }
137
-
138
- return $default;
139
-
140
- }
141
- }
142
-
143
- /**
144
- *
145
- * Getting POST Vars
146
- *
147
- * @since 1.0.0
148
- * @version 1.0.0
149
- *
150
- */
151
- if ( ! function_exists( 'sp_get_vars' ) ) {
152
- function sp_get_vars( $var, $depth, $default = '' ) {
153
-
154
- if( isset( $_POST[$var][$depth] ) ) {
155
- return $_POST[$var][$depth];
156
- }
157
-
158
- if( isset( $_GET[$var][$depth] ) ) {
159
- return $_GET[$var][$depth];
160
- }
161
-
162
- return $default;
163
-
164
- }
165
- }
166
-
167
- /**
168
- *
169
- * Load options fields
170
- *
171
- * @since 1.0.0
172
- * @version 1.0.0
173
- *
174
- */
175
- if ( ! function_exists( 'sp_tpro_load_option_fields' ) ) {
176
- function sp_tpro_load_option_fields() {
177
-
178
- $located_fields = array();
179
-
180
- foreach ( glob( SP_TPRO_F_DIR .'/fields/*/*.php' ) as $sp_field ) {
181
- $located_fields[] = basename( $sp_field );
182
- sp_tpro_locate_template( str_replace( SP_TPRO_F_DIR, '', $sp_field ) );
183
- }
184
-
185
- $override_name = apply_filters( 'sp_tpro_framework_override', 'sp-framework-override' );
186
- $override_dir = get_template_directory() .'/'. $override_name .'/fields';
187
-
188
- if( is_dir( $override_dir ) ) {
189
-
190
- foreach ( glob( $override_dir .'/*/*.php' ) as $override_field ) {
191
-
192
- if( ! in_array( basename( $override_field ), $located_fields ) ) {
193
-
194
- sp_tpro_locate_template( str_replace( $override_dir, '/fields', $override_field ) );
195
-
196
- }
197
-
198
- }
199
-
200
- }
201
-
202
- do_action( 'sp_tpro_load_option_fields' );
203
-
204
- }
205
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/metabox/functions/sanitize.php DELETED
@@ -1,135 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
2
- /**
3
- *
4
- * Text sanitize
5
- *
6
- * @since 1.0.0
7
- * @version 1.0.0
8
- *
9
- */
10
- if( ! function_exists( 'sp_sanitize_text' ) ) {
11
- function sp_sanitize_text( $value, $field ) {
12
- return wp_filter_nohtml_kses( $value );
13
- }
14
- add_filter( 'sp_sanitize_text', 'sp_sanitize_text', 10, 2 );
15
- }
16
-
17
- /**
18
- *
19
- * Textarea sanitize
20
- *
21
- * @since 1.0.0
22
- * @version 1.0.0
23
- *
24
- */
25
- if( ! function_exists( 'sp_sanitize_textarea' ) ) {
26
- function sp_sanitize_textarea( $value ) {
27
-
28
- global $allowedposttags;
29
- return wp_kses( $value, $allowedposttags );
30
-
31
- }
32
- add_filter( 'sp_sanitize_textarea', 'sp_sanitize_textarea' );
33
- }
34
-
35
- /**
36
- *
37
- * Checkbox sanitize
38
- * Do not touch, or think twice.
39
- *
40
- * @since 1.0.0
41
- * @version 1.0.0
42
- *
43
- */
44
- if( ! function_exists( 'sp_sanitize_checkbox' ) ) {
45
- function sp_sanitize_checkbox( $value ) {
46
-
47
- if( ! empty( $value ) && $value == 1 ) {
48
- $value = true;
49
- }
50
-
51
- if( empty( $value ) ) {
52
- $value = false;
53
- }
54
-
55
- return $value;
56
-
57
- }
58
- add_filter( 'sp_sanitize_checkbox', 'sp_sanitize_checkbox' );
59
- add_filter( 'sp_sanitize_switcher', 'sp_sanitize_checkbox' );
60
- }
61
-
62
- /**
63
- *
64
- * Image select sanitize
65
- * Do not touch, or think twice.
66
- *
67
- *
68
- * @since 1.0.0
69
- * @version 1.0.0
70
- *
71
- */
72
- if( ! function_exists( 'sp_sanitize_image_select' ) ) {
73
- function sp_sanitize_image_select( $value ) {
74
-
75
- if( isset( $value ) && is_array( $value ) ) {
76
- if( count( $value ) ) {
77
- $value = $value;
78
- } else {
79
- $value = $value[0];
80
- }
81
- } else if ( empty( $value ) ) {
82
- $value = '';
83
- }
84
-
85
- return $value;
86
-
87
- }
88
- add_filter( 'sp_sanitize_image_select', 'sp_sanitize_image_select' );
89
- }
90
-
91
- /**
92
- *
93
- * Group sanitize
94
- * Do not touch, or think twice.
95
- *
96
- * @since 1.0.0
97
- * @version 1.0.0
98
- *
99
- */
100
- if( ! function_exists( 'sp_sanitize_group' ) ) {
101
- function sp_sanitize_group( $value ) {
102
- return ( empty( $value ) ) ? '' : $value;
103
- }
104
- add_filter( 'sp_sanitize_group', 'sp_sanitize_group' );
105
- }
106
-
107
- /**
108
- *
109
- * Title sanitize
110
- *
111
- * @since 1.0.0
112
- * @version 1.0.0
113
- *
114
- */
115
- if( ! function_exists( 'sp_sanitize_title' ) ) {
116
- function sp_sanitize_title( $value ) {
117
- return sanitize_title( $value );
118
- }
119
- add_filter( 'sp_sanitize_title', 'sp_sanitize_title' );
120
- }
121
-
122
- /**
123
- *
124
- * Text clean
125
- *
126
- * @since 1.0.0
127
- * @version 1.0.0
128
- *
129
- */
130
- if( ! function_exists( 'sp_sanitize_clean' ) ) {
131
- function sp_sanitize_clean( $value ) {
132
- return $value;
133
- }
134
- add_filter( 'sp_sanitize_clean', 'sp_sanitize_clean', 10, 2 );
135
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/metabox/functions/validate.php DELETED
@@ -1,55 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
2
- /**
3
- *
4
- * Email validate
5
- *
6
- * @since 1.0.0
7
- * @version 1.0.0
8
- *
9
- */
10
- if( ! function_exists( 'sp_tpro_validate_email' ) ) {
11
- function sp_tpro_validate_email( $value, $field ) {
12
-
13
- if ( ! sanitize_email( $value ) ) {
14
- return __( 'Please write a valid email address!', 'testimonial-free' );
15
- }
16
-
17
- }
18
- add_filter( 'sp_tpro_validate_email', 'sp_tpro_validate_email', 10, 2 );
19
- }
20
-
21
- /**
22
- *
23
- * Numeric validate
24
- *
25
- * @since 1.0.0
26
- * @version 1.0.0
27
- *
28
- */
29
- if( ! function_exists( 'sp_tpro_validate_numeric' ) ) {
30
- function sp_tpro_validate_numeric( $value, $field ) {
31
-
32
- if ( ! is_numeric( $value ) ) {
33
- return __( 'Please write a numeric data!', 'testimonial-free' );
34
- }
35
-
36
- }
37
- add_filter( 'sp_tpro_validate_numeric', 'sp_tpro_validate_numeric', 10, 2 );
38
- }
39
-
40
- /**
41
- *
42
- * Required validate
43
- *
44
- * @since 1.0.0
45
- * @version 1.0.0
46
- *
47
- */
48
- if( ! function_exists( 'sp_tpro_validate_required' ) ) {
49
- function sp_tpro_validate_required( $value ) {
50
- if ( empty( $value ) ) {
51
- return __( 'Fatal Error! This field is required!', 'testimonial-free' );
52
- }
53
- }
54
- add_filter( 'sp_tpro_validate_required', 'sp_tpro_validate_required' );
55
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/metabox/sp-framework-path.php DELETED
@@ -1,398 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
2
- /**
3
- *
4
- * Framework constants
5
- *
6
- * @since 1.0.0
7
- * @version 1.0.0
8
- *
9
- */
10
- defined( 'SP_TPRO_F_VERSION' ) or define( 'SP_TPRO_F_VERSION', '1.1.0' );
11
- defined( 'SP_OPTION' ) or define( 'SP_OPTION', '_sp_options' );
12
-
13
- /**
14
- *
15
- * Framework path finder
16
- *
17
- * @since 1.0.0
18
- * @version 1.0.0
19
- *
20
- */
21
- if( ! function_exists( 'sp_tpro_get_path_locate' ) ) {
22
- function sp_tpro_get_path_locate() {
23
-
24
- $dirname = wp_normalize_path( dirname( __FILE__ ) );
25
- $plugin_dir = wp_normalize_path( WP_PLUGIN_DIR );
26
- $located_plugin = ( preg_match( '#'. $plugin_dir .'#', $dirname ) ) ? true : false;
27
- $directory = ( $located_plugin ) ? $plugin_dir : get_template_directory();
28
- $directory_uri = ( $located_plugin ) ? WP_PLUGIN_URL : get_template_directory_uri();
29
- $basename = str_replace( wp_normalize_path( $directory ), '', $dirname );
30
- $dir = $directory . $basename;
31
- $uri = $directory_uri . $basename;
32
-
33
- return apply_filters( 'sp_tpro_get_path_locate', array(
34
- 'basename' => wp_normalize_path( $basename ),
35
- 'dir' => wp_normalize_path( $dir ),
36
- 'uri' => $uri
37
- ) );
38
-
39
- }
40
- }
41
-
42
- /**
43
- *
44
- * Framework set paths
45
- *
46
- * @since 1.0.0
47
- * @version 1.0.0
48
- *
49
- *
50
- */
51
- $get_path = sp_tpro_get_path_locate();
52
-
53
- defined( 'SP_TPRO_F_BASENAME' ) or define( 'SP_TPRO_F_BASENAME', $get_path['basename'] );
54
- defined( 'SP_TPRO_F_DIR' ) or define( 'SP_TPRO_F_DIR', $get_path['dir'] );
55
- defined( 'SP_TPRO_F_URI' ) or define( 'SP_TPRO_F_URI', $get_path['uri'] );
56
-
57
- /**
58
- *
59
- * Framework locate template and override files
60
- *
61
- * @since 1.0.0
62
- * @version 1.0.0
63
- *
64
- */
65
- if( ! function_exists( 'sp_tpro_locate_template' ) ) {
66
- function sp_tpro_locate_template( $template_name ) {
67
-
68
- $located = '';
69
- $override = apply_filters( 'sp_tpro_framework_override', 'sp-framework-override' );
70
- $dir_plugin = WP_PLUGIN_DIR;
71
- $dir_theme = get_template_directory();
72
- $dir_child = get_stylesheet_directory();
73
- $dir_override = '/'. $override .'/'. $template_name;
74
- $dir_template = SP_TPRO_F_BASENAME .'/'. $template_name;
75
-
76
- // child theme override
77
- $child_force_overide = $dir_child . $dir_override;
78
- $child_normal_override = $dir_child . $dir_template;
79
-
80
- // theme override paths
81
- $theme_force_override = $dir_theme . $dir_override;
82
- $theme_normal_override = $dir_theme . $dir_template;
83
-
84
- // plugin override
85
- $plugin_force_override = $dir_plugin . $dir_override;
86
- $plugin_normal_override = $dir_plugin . $dir_template;
87
-
88
- if ( file_exists( $child_force_overide ) ) {
89
-
90
- $located = $child_force_overide;
91
-
92
- } else if ( file_exists( $child_normal_override ) ) {
93
-
94
- $located = $child_normal_override;
95
-
96
- } else if ( file_exists( $theme_force_override ) ) {
97
-
98
- $located = $theme_force_override;
99
-
100
- } else if ( file_exists( $theme_normal_override ) ) {
101
-
102
- $located = $theme_normal_override;
103
-
104
- } else if ( file_exists( $plugin_force_override ) ) {
105
-
106
- $located = $plugin_force_override;
107
-
108
- } else if ( file_exists( $plugin_normal_override ) ) {
109
-
110
- $located = $plugin_normal_override;
111
- }
112
-
113
- $located = apply_filters( 'sp_tpro_locate_template', $located, $template_name );
114
-
115
- if ( ! empty( $located ) ) {
116
- load_template( $located, true );
117
- }
118
-
119
- return $located;
120
-
121
- }
122
- }
123
-
124
- /**
125
- *
126
- * Get option
127
- *
128
- * @since 1.0.0
129
- * @version 1.0.0
130
- *
131
- */
132
- if ( ! function_exists( 'sp_get_option' ) ) {
133
- function sp_get_option( $option_name = '', $default = '' ) {
134
-
135
- $options = apply_filters( 'sp_get_option', get_option( SP_OPTION ), $option_name, $default );
136
-
137
- if( ! empty( $option_name ) && ! empty( $options[$option_name] ) ) {
138
- return $options[$option_name];
139
- } else {
140
- return ( ! empty( $default ) ) ? $default : null;
141
- }
142
-
143
- }
144
- }
145
-
146
- /**
147
- *
148
- * Set option
149
- *
150
- * @since 1.0.0
151
- * @version 1.0.0
152
- *
153
- */
154
- if ( ! function_exists( 'sp_set_option' ) ) {
155
- function sp_set_option( $option_name = '', $new_value = '' ) {
156
-
157
- $options = apply_filters( 'sp_set_option', get_option( SP_OPTION ), $option_name, $new_value );
158
-
159
- if( ! empty( $option_name ) ) {
160
- $options[$option_name] = $new_value;
161
- update_option( SP_OPTION, $options );
162
- }
163
-
164
- }
165
- }
166
-
167
- /**
168
- *
169
- * Get all option
170
- *
171
- * @since 1.0.0
172
- * @version 1.0.0
173
- *
174
- */
175
- if ( ! function_exists( 'sp_get_all_option' ) ) {
176
- function sp_get_all_option() {
177
- return get_option( SP_OPTION );
178
- }
179
- }
180
-
181
- /**
182
- *
183
- * Multi language option
184
- *
185
- * @since 1.0.0
186
- * @version 1.0.0
187
- *
188
- */
189
- if ( ! function_exists( 'sp_get_multilang_option' ) ) {
190
- function sp_get_multilang_option( $option_name = '', $default = '' ) {
191
-
192
- $value = sp_get_option( $option_name, $default );
193
- $languages = sp_language_defaults();
194
- $default = $languages['default'];
195
- $current = $languages['current'];
196
-
197
- if ( is_array( $value ) && is_array( $languages ) && isset( $value[$current] ) ) {
198
- return $value[$current];
199
- } else if ( $default != $current ) {
200
- return '';
201
- }
202
-
203
- return $value;
204
-
205
- }
206
- }
207
-
208
- /**
209
- *
210
- * Multi language value
211
- *
212
- * @since 1.0.0
213
- * @version 1.0.0
214
- *
215
- */
216
- if ( ! function_exists( 'sp_get_multilang_value' ) ) {
217
- function sp_get_multilang_value( $value = '', $default = '' ) {
218
-
219
- $languages = sp_language_defaults();
220
- $default = $languages['default'];
221
- $current = $languages['current'];
222
-
223
- if ( is_array( $value ) && is_array( $languages ) && isset( $value[$current] ) ) {
224
- return $value[$current];
225
- } else if ( $default != $current ) {
226
- return '';
227
- }
228
-
229
- return $value;
230
-
231
- }
232
- }
233
-
234
-
235
-
236
-
237
- /**
238
- *
239
- * WPML plugin is activated
240
- *
241
- * @since 1.0.0
242
- * @version 1.0.0
243
- *
244
- */
245
- if ( ! function_exists( 'sp_is_wpml_activated' ) ) {
246
- function sp_is_wpml_activated() {
247
- if ( class_exists( 'SitePress' ) ) { return true; } else { return false; }
248
- }
249
- }
250
-
251
- /**
252
- *
253
- * qTranslate plugin is activated
254
- *
255
- * @since 1.0.0
256
- * @version 1.0.0
257
- *
258
- */
259
- if ( ! function_exists( 'sp_is_qtranslate_activated' ) ) {
260
- function sp_is_qtranslate_activated() {
261
- if ( function_exists( 'qtrans_getSortedLanguages' ) ) { return true; } else { return false; }
262
- }
263
- }
264
-
265
- /**
266
- *
267
- * Polylang plugin is activated
268
- *
269
- * @since 1.0.0
270
- * @version 1.0.0
271
- *
272
- */
273
- if ( ! function_exists( 'sp_is_polylang_activated' ) ) {
274
- function sp_is_polylang_activated() {
275
- if ( class_exists( 'Polylang' ) ) { return true; } else { return false; }
276
- }
277
- }
278
-
279
- /**
280
- *
281
- * Get language defaults
282
- *
283
- * @since 1.0.0
284
- * @version 1.0.0
285
- *
286
- */
287
- if ( ! function_exists( 'sp_language_defaults' ) ) {
288
- function sp_language_defaults() {
289
-
290
- $multilang = array();
291
-
292
- if( sp_is_wpml_activated() || sp_is_qtranslate_activated() || sp_is_polylang_activated() ) {
293
-
294
- if( sp_is_wpml_activated() ) {
295
-
296
- global $sitepress;
297
- $multilang['default'] = $sitepress->get_default_language();
298
- $multilang['current'] = $sitepress->get_current_language();
299
- $multilang['languages'] = $sitepress->get_active_languages();
300
-
301
- } else if( sp_is_polylang_activated() ) {
302
-
303
- global $polylang;
304
- $current = pll_current_language();
305
- $default = pll_default_language();
306
- $current = ( empty( $current ) ) ? $default : $current;
307
- $poly_langs = $polylang->model->get_languages_list();
308
- $languages = array();
309
-
310
- foreach ( $poly_langs as $p_lang ) {
311
- $languages[$p_lang->slug] = $p_lang->slug;
312
- }
313
-
314
- $multilang['default'] = $default;
315
- $multilang['current'] = $current;
316
- $multilang['languages'] = $languages;
317
-
318
- } else if( sp_is_qtranslate_activated() ) {
319
-
320
- global $q_config;
321
- $multilang['default'] = $q_config['default_language'];
322
- $multilang['current'] = $q_config['language'];
323
- $multilang['languages'] = array_flip( qtrans_getSortedLanguages() );
324
-
325
- }
326
-
327
- }
328
-
329
- $multilang = apply_filters( 'sp_language_defaults', $multilang );
330
-
331
- return ( ! empty( $multilang ) ) ? $multilang : false;
332
-
333
- }
334
- }
335
-
336
- /**
337
- *
338
- * Get locate for load textdomain
339
- *
340
- * @since 1.0.0
341
- * @version 1.0.0
342
- *
343
- */
344
- if ( ! function_exists( 'sp_get_locale' ) ) {
345
- function sp_get_locale() {
346
-
347
- global $locale, $wp_local_package;
348
-
349
- if ( isset( $locale ) ) {
350
- return apply_filters( 'locale', $locale );
351
- }
352
-
353
- if ( isset( $wp_local_package ) ) {
354
- $locale = $wp_local_package;
355
- }
356
-
357
- if ( defined( 'WPLANG' ) ) {
358
- $locale = WPLANG;
359
- }
360
-
361
- if ( is_multisite() ) {
362
-
363
- if ( defined( 'WP_INSTALLING' ) || ( false === $ms_locale = get_option( 'WPLANG' ) ) ) {
364
- $ms_locale = get_site_option( 'WPLANG' );
365
- }
366
-
367
- if ( $ms_locale !== false ) {
368
- $locale = $ms_locale;
369
- }
370
-
371
- } else {
372
-
373
- $db_locale = get_option( 'WPLANG' );
374
-
375
- if ( $db_locale !== false ) {
376
- $locale = $db_locale;
377
- }
378
-
379
- }
380
-
381
- if ( empty( $locale ) ) {
382
- $locale = 'en_US';
383
- }
384
-
385
- return apply_filters( 'locale', $locale );
386
-
387
- }
388
- }
389
-
390
- /**
391
- *
392
- * Framework load text domain
393
- *
394
- * @since 1.0.0
395
- * @version 1.0.0
396
- *
397
- */
398
- load_textdomain( 'sp-framework', SP_TPRO_F_DIR .'/languages/'. sp_get_locale() .'.mo' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/metabox/sp-framework.php DELETED
@@ -1,39 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
2
- /**
3
- *
4
- * ------------------------------------------------------------------------------------------------
5
- * Text Domains: sp-framework
6
- * ------------------------------------------------------------------------------------------------
7
- *
8
- */
9
-
10
- // ------------------------------------------------------------------------------------------------
11
- require_once plugin_dir_path( __FILE__ ) .'/sp-framework-path.php';
12
- // ------------------------------------------------------------------------------------------------
13
-
14
- if( ! function_exists( 'sp_tpro_framework_init' ) && ! class_exists( 'SP_TPRO_Framework' ) ) {
15
- function sp_tpro_framework_init() {
16
-
17
- // active modules
18
- defined( 'SP_TPRO_F_ACTIVE_METABOX' ) or define( 'SP_TPRO_F_ACTIVE_METABOX', true );
19
-
20
- // helpers
21
- sp_tpro_locate_template( 'functions/fallback.php' );
22
- sp_tpro_locate_template( 'functions/helpers.php' );
23
- sp_tpro_locate_template( 'functions/actions.php' );
24
- sp_tpro_locate_template( 'functions/enqueue.php' );
25
- sp_tpro_locate_template( 'functions/sanitize.php' );
26
- sp_tpro_locate_template( 'functions/validate.php' );
27
-
28
- // classes
29
- sp_tpro_locate_template( 'classes/abstract.class.php' );
30
- sp_tpro_locate_template( 'classes/options.class.php' );
31
- sp_tpro_locate_template( 'classes/metabox.class.php' );
32
-
33
- // configs
34
- sp_tpro_locate_template( 'config/metabox.config.php' );
35
-
36
-
37
- }
38
- add_action( 'init', 'sp_tpro_framework_init', 10 );
39
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/notices/review.php ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The admin review notice.
4
+ *
5
+ * @since 2.1.5
6
+ * @version 2.1.5
7
+ *
8
+ * @package Testimonial
9
+ * @subpackage Testimonial/admin/views/notices
10
+ * @author ShapedPlugin<support@shapedplugin.com>
11
+ */
12
+ class Testimonial_Review {
13
+
14
+ public function __construct() {
15
+ add_action( 'admin_notices', array( $this, 'display_admin_notice' ) );
16
+ add_action( 'wp_ajax_sp-tfree-never-show-review-notice', array( $this, 'dismiss_review_notice' ) );
17
+ }
18
+
19
+ /**
20
+ * Display admin notice.
21
+ *
22
+ * @return void
23
+ */
24
+ public function display_admin_notice() {
25
+
26
+ // Show only to Admins.
27
+ if ( ! current_user_can( 'manage_options' ) ) {
28
+ return;
29
+ }
30
+
31
+ // Variable default value.
32
+ $review = get_option( 'sp_testimonial_review_notice_dismiss' );
33
+ $time = time();
34
+ $load = false;
35
+
36
+ if ( ! $review ) {
37
+ $review = array(
38
+ 'time' => $time,
39
+ 'dismissed' => false,
40
+ );
41
+ add_option( 'sp_testimonial_review_notice_dismiss', $review );
42
+ } else {
43
+ // Check if it has been dismissed or not.
44
+ if ( ( isset( $review['dismissed'] ) && ! $review['dismissed'] ) && ( isset( $review['time'] ) && ( ( $review['time'] + ( DAY_IN_SECONDS * 3 ) ) <= $time ) ) ) {
45
+ $load = true;
46
+ }
47
+ }
48
+
49
+ // If we cannot load, return early.
50
+ if ( ! $load ) {
51
+ return;
52
+ }
53
+ ?>
54
+ <div id="sp-tfree-review-notice" class="sp-tfree-review-notice">
55
+ <div class="sp-tfree-plugin-icon">
56
+ <img src="<?php echo SP_TFREE_URL . 'admin/assets/images/icon-256.png'; ?>" alt="Testimonial">
57
+ </div>
58
+ <div class="sp-tfree-notice-text">
59
+ <h3>Enjoying <strong>Testimonial</strong>?</h3>
60
+ <p>Hope that you had a good experience with the <strong>Testimonial</strong>. Would you please show us a little love by rating us in the <a href="https://wordpress.org/support/plugin/testimonial-free/reviews/?filter=5#new-post" target="_blank"><strong>WordPress.org</strong></a>?
61
+ Just a minute to rate it. Thank you!</p>
62
+
63
+ <p class="sp-tfree-review-actions">
64
+ <a href="https://wordpress.org/support/plugin/testimonial-free/reviews/?filter=5#new-post" target="_blank" class="button button-primary notice-dismissed rate-testimonial">Rate Testimonial</a>
65
+ <a href="#" class="notice-dismissed remind-me-later"><span class="dashicons dashicons-clock"></span>Nope, maybe later
66
+ </a>
67
+ <a href="#" class="notice-dismissed never-show-again"><span class="dashicons dashicons-dismiss"></span>Never show again</a>
68
+ </p>
69
+ </div>
70
+ </div>
71
+
72
+ <script type='text/javascript'>
73
+
74
+ jQuery(document).ready( function($) {
75
+ $(document).on('click', '#sp-tfree-review-notice.sp-tfree-review-notice .notice-dismissed', function( event ) {
76
+ if ( $(this).hasClass('rate-testimonial') ) {
77
+ var notice_dismissed_value = "1";
78
+ }
79
+ if ( $(this).hasClass('remind-me-later') ) {
80
+ var notice_dismissed_value = "2";
81
+ event.preventDefault();
82
+ }
83
+ if ( $(this).hasClass('never-show-again') ) {
84
+ var notice_dismissed_value = "3";
85
+ event.preventDefault();
86
+ }
87
+
88
+ $.post( ajaxurl, {
89
+ action: 'sp-tfree-never-show-review-notice',
90
+ notice_dismissed_data : notice_dismissed_value
91
+ });
92
+
93
+ $('#sp-tfree-review-notice.sp-tfree-review-notice').hide();
94
+ });
95
+ });
96
+
97
+ </script>
98
+ <?php
99
+ }
100
+
101
+ /**
102
+ * Dismiss review notice
103
+ *
104
+ * @since 2.1.5
105
+ *
106
+ * @return void
107
+ **/
108
+ public function dismiss_review_notice() {
109
+ if ( ! $review ) {
110
+ $review = array();
111
+ }
112
+ switch ( $_POST['notice_dismissed_data'] ) {
113
+ case '1':
114
+ $review['time'] = time();
115
+ $review['dismissed'] = false;
116
+ break;
117
+ case '2':
118
+ $review['time'] = time();
119
+ $review['dismissed'] = false;
120
+ break;
121
+ case '3':
122
+ $review['time'] = time();
123
+ $review['dismissed'] = true;
124
+ break;
125
+ }
126
+ update_option( 'sp_testimonial_review_notice_dismiss', $review );
127
+ die;
128
+ }
129
+ }
130
+
131
+ new Testimonial_Review();
admin/views/partials/general-settings.php DELETED
@@ -1,95 +0,0 @@
1
- <?php
2
- /**
3
- * Provides the 'Resources' view for the corresponding tab in the Shortcode Meta Box.
4
- *
5
- * @since 2.0
6
- *
7
- * @package testimonial-free
8
- */
9
- ?>
10
-
11
- <div id="sp-tfree-tab-1" class="sp-tfree-mbf-tab-content nav-tab-active">
12
-
13
- <?php
14
- $this->metaboxform->select_layout( array(
15
- 'id' => 'tfree_slider_layout',
16
- 'name' => __( 'Layout', 'testimonial-free' ),
17
- 'desc' => __( 'Select a layout to display the testimonials.', 'testimonial-free' ),
18
- 'default' => 'slider',
19
- ) );
20
- $this->metaboxform->select( array(
21
- 'id' => 'tfree_themes',
22
- 'name' => __( 'Select Theme', 'testimonial-free' ),
23
- 'desc' => __( 'Select which theme you want to display.', 'testimonial-free' ),
24
- 'options' => array(
25
- 'theme-one' => __( 'Theme One', 'testimonial-free' ),
26
- ),
27
- 'default' => 'theme-one',
28
- ) );
29
- $this->metaboxform->select_testimonials_from( array(
30
- 'id' => 'tfree_testimonials_from',
31
- 'name' => __( 'Display Testimonials from', 'testimonial-free' ),
32
- 'desc' => __( 'Select an option to display the testimonials.', 'testimonial-free' ),
33
- 'default' => 'latest',
34
- ) );
35
- $this->metaboxform->number( array(
36
- 'id' => 'tfree_number_of_total_testimonials',
37
- 'name' => __( 'Total Testimonials', 'testimonial-free' ),
38
- 'desc' => __( 'Number of total testimonials to display.', 'testimonial-free' ),
39
- 'default' => 10,
40
- ) );
41
- $this->metaboxform->number( array(
42
- 'id' => 'tfree_number_of_column',
43
- 'name' => __( 'Testimonial Column(s)', 'testimonial-free' ),
44
- 'desc' => __( 'Set number of column(s) for the screen larger than 1280px.', 'testimonial-free' ),
45
- 'default' => 1,
46
- ) );
47
- $this->metaboxform->number( array(
48
- 'id' => 'tfree_number_of_column_desktop',
49
- 'name' => __( 'Testimonial Column(s) on Desktop', 'testimonial-free' ),
50
- 'desc' => __( 'Set number of column on desktop for the screen smaller than 1280px.', 'testimonial-free' ),
51
- 'default' => 1,
52
- ) );
53
- $this->metaboxform->number( array(
54
- 'id' => 'tfree_number_of_column_small_desktop',
55
- 'name' => __( 'Testimonial Column(s) on Small Desktop', 'testimonial-free' ),
56
- 'desc' => __( 'Set number of column on small desktop for the screen smaller than 980px.', 'testimonial-free' ),
57
- 'default' => 1,
58
- ) );
59
- $this->metaboxform->number( array(
60
- 'id' => 'tfree_number_of_column_tablet',
61
- 'name' => __( 'Testimonial Column(s) on Tablet', 'testimonial-free' ),
62
- 'desc' => __( 'Set number of column on tablet for the screen smaller than 736px.', 'testimonial-free' ),
63
- 'default' => 1,
64
- ) );
65
- $this->metaboxform->number( array(
66
- 'id' => 'tfree_number_of_column_mobile',
67
- 'name' => __( 'Testimonial Column(s) on Mobile', 'testimonial-free' ),
68
- 'desc' => __( 'Set number of column on mobile for the screen smaller than 480px.', 'testimonial-free' ),
69
- 'default' => 1,
70
- ) );
71
- $this->metaboxform->select( array(
72
- 'id' => 'tfree_order_by',
73
- 'name' => __( 'Order By', 'testimonial-free' ),
74
- 'desc' => __( 'Select an order by option.', 'testimonial-free' ),
75
- 'options' => array(
76
- 'ID' => __( 'ID', 'testimonial-free' ),
77
- 'date' => __( 'Date', 'testimonial-free' ),
78
- 'title' => __( 'Title', 'testimonial-free' ),
79
- 'modified' => __( 'Modified', 'testimonial-free' ),
80
- ),
81
- 'default' => 'date',
82
- ) );
83
- $this->metaboxform->select( array(
84
- 'id' => 'tfree_order',
85
- 'name' => __( 'Order', 'testimonial-free' ),
86
- 'desc' => __( 'Select an order option.', 'testimonial-free' ),
87
- 'options' => array(
88
- 'ASC' => __( 'Ascending', 'testimonial-free' ),
89
- 'DESC' => __( 'Descending', 'testimonial-free' ),
90
- ),
91
- 'default' => 'DESC',
92
- ) );
93
-
94
- ?>
95
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/partials/slider-settings.php DELETED
@@ -1,130 +0,0 @@
1
- <?php
2
- /**
3
- * Provides the 'Resources' view for the corresponding tab in the Shortcode Meta Box.
4
- *
5
- * @since 2.0
6
- *
7
- * @package testimonial-free
8
- */
9
- ?>
10
-
11
- <div id="sp-tfree-tab-2" class="sp-tfree-mbf-tab-content">
12
- <?php
13
- $this->metaboxform->checkbox( array(
14
- 'id' => 'tfree_auto_play',
15
- 'name' => __( 'AutoPlay', 'testimonial-free' ),
16
- 'desc' => __( 'Check to on autoplay.', 'testimonial-free' ),
17
- 'default' => 'on',
18
- ) );
19
- $this->metaboxform->number( array(
20
- 'id' => 'tfree_auto_play_speed',
21
- 'name' => __( 'AutoPlay Speed', 'testimonial-free' ),
22
- 'desc' => __( 'Set autoplay speed.', 'testimonial-free' ),
23
- 'after' => __( '(Millisecond)', 'testimonial-free' ),
24
- 'default' => 3000,
25
- ) );
26
- $this->metaboxform->number( array(
27
- 'id' => 'tfree_scroll_speed',
28
- 'name' => __( 'Pagination Speed', 'testimonial-free' ),
29
- 'desc' => __( 'Set pagination/slide scroll speed.', 'testimonial-free' ),
30
- 'after' => __( '(Millisecond).', 'testimonial-free' ),
31
- 'default' => 600,
32
- ) );
33
- $this->metaboxform->checkbox( array(
34
- 'id' => 'tfree_pause_on_hover',
35
- 'name' => __( 'Pause on Hover', 'testimonial-free' ),
36
- 'desc' => __( 'Check to activate slider pause on hover.', 'testimonial-free' ),
37
- 'default' => 'on',
38
- ) );
39
- $this->metaboxform->checkbox( array(
40
- 'id' => 'tfree_infinite_loop',
41
- 'name' => __( 'Infinite Loop', 'testimonial-free' ),
42
- 'desc' => __( 'Check to activate infinite loop mode.', 'testimonial-free' ),
43
- 'default' => 'on',
44
- ) );
45
- $this->metaboxform->subheading( array(
46
- 'id' => 'subheading',
47
- 'name' => __( 'Navigation Settings', 'testimonial-free' ),
48
- ) );
49
- $this->metaboxform->checkbox( array(
50
- 'id' => 'tfree_navigation',
51
- 'name' => __( 'Navigation', 'testimonial-free' ),
52
- 'desc' => __( 'Show/Hide slider navigation.', 'testimonial-free' ),
53
- 'default' => 'on',
54
- ) );
55
-
56
- $this->metaboxform->navigation_style( array(
57
- 'id' => 'tfree_nav_style',
58
- 'name' => __( 'Choose a Style', 'testimonial-free' ),
59
- 'desc' => __( 'Choose a slider navigation style.', 'testimonial-free' ),
60
- ) );
61
- $this->metaboxform->color( array(
62
- 'id' => 'tfree_nav_arrow_color',
63
- 'type' => 'color',
64
- 'name' => __( 'Arrow Color', 'testimonial-free' ),
65
- 'desc' => __( 'Set the navigation arrow color.', 'testimonial-free' ),
66
- 'default' => '#444444',
67
- ) );
68
- $this->metaboxform->color( array(
69
- 'id' => 'tfree_nav_arrow_hover',
70
- 'type' => 'color',
71
- 'name' => __( 'Arrow Hover Color', 'testimonial-free' ),
72
- 'desc' => __( 'Set the navigation arrow hover color.', 'testimonial-free' ),
73
- 'default' => '#52b3d9',
74
- ) );
75
-
76
- $this->metaboxform->subheading( array(
77
- 'id' => 'subheading',
78
- 'name' => __( 'Pagination Settings', 'testimonial-free' ),
79
- ) );
80
- $this->metaboxform->checkbox( array(
81
- 'id' => 'tfree_pagination',
82
- 'name' => __( 'Pagination', 'testimonial-free' ),
83
- 'desc' => __( 'Show/Hide pagination.', 'testimonial-free' ),
84
- 'default' => 'on',
85
- ) );
86
-
87
- $this->metaboxform->color( array(
88
- 'id' => 'tfree_pagination_color',
89
- 'type' => 'color',
90
- 'name' => __( 'Dots Color', 'testimonial-free' ),
91
- 'desc' => __( 'Set the pagination dots color.', 'testimonial-free' ),
92
- 'default' => '#cccccc',
93
- ) );
94
- $this->metaboxform->color( array(
95
- 'id' => 'tfree_pagination_active_color',
96
- 'type' => 'color',
97
- 'name' => __( 'Active Color', 'testimonial-free' ),
98
- 'desc' => __( 'Set the pagination active color.', 'testimonial-free' ),
99
- 'default' => '#52b3d9',
100
- ) );
101
- $this->metaboxform->subheading( array(
102
- 'id' => 'subheading',
103
- 'name' => __( 'Misc. Settings', 'testimonial-free' ),
104
- ) );
105
- $this->metaboxform->checkbox( array(
106
- 'id' => 'tfree_adaptive',
107
- 'name' => __( 'Adaptive Height', 'testimonial-free' ),
108
- 'desc' => __( 'On/Off adaptive height for the slider.', 'testimonial-free' ),
109
- 'default' => 'on',
110
- ) );
111
- $this->metaboxform->checkbox( array(
112
- 'id' => 'tfree_swipe',
113
- 'name' => __( 'Swipe', 'testimonial-free' ),
114
- 'desc' => __( 'On/Off swipe mode.', 'testimonial-free' ),
115
- 'default' => 'on',
116
- ) );
117
- $this->metaboxform->checkbox( array(
118
- 'id' => 'tfree_mouse_draggable',
119
- 'name' => __( 'Mouse Draggable', 'testimonial-free' ),
120
- 'desc' => __( 'On/Off mouse draggable mode.', 'testimonial-free' ),
121
- 'default' => 'on',
122
- ) );
123
- $this->metaboxform->checkbox( array(
124
- 'id' => 'tfree_rtl',
125
- 'name' => __( 'RTL', 'testimonial-free' ),
126
- 'desc' => __( 'On/Off right to left mode.', 'testimonial-free' ),
127
- 'default' => 'off',
128
- ) );
129
- ?>
130
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/partials/stylization.php DELETED
@@ -1,97 +0,0 @@
1
- <?php
2
- /**
3
- * Provides the 'Resources' view for the corresponding tab in the Shortcode Meta Box.
4
- *
5
- * @since 2.0
6
- *
7
- * @package testimonial-free
8
- */
9
- ?>
10
-
11
- <div id="sp-tfree-tab-3" class="sp-tfree-mbf-tab-content">
12
- <?php
13
- $this->metaboxform->checkbox( array(
14
- 'id' => 'tfree_section_title',
15
- 'name' => __( 'Section Title', 'testimonial-free' ),
16
- 'desc' => __( 'Show/Hide the shortcode title as testimonial section title e.g. What Our Customers Saying.', 'testimonial-free' ),
17
- 'default' => 'off',
18
- ) );
19
- $this->metaboxform->color( array(
20
- 'id' => 'tfree_section_title_color',
21
- 'type' => 'color',
22
- 'name' => __( 'Section Title Color', 'testimonial-free' ),
23
- 'desc' => __( 'Set section title color.', 'testimonial-free' ),
24
- 'default' => '#444444'
25
- ) );
26
- $this->metaboxform->checkbox( array(
27
- 'id' => 'tfree_testimonial_title',
28
- 'name' => __( 'Testimonial Title', 'testimonial-free' ),
29
- 'desc' => __( 'Check to show testimonial title or tagline.', 'testimonial-free' ),
30
- 'default' => 'on'
31
- ) );
32
- $this->metaboxform->color( array(
33
- 'id' => 'tfree_testimonial_title_color',
34
- 'type' => 'color',
35
- 'name' => __( 'Testimonial Title Color', 'testimonial-free' ),
36
- 'desc' => __( 'Set testimonial title or tagline color.', 'testimonial-free' ),
37
- 'default' => '#333333'
38
- ) );
39
- $this->metaboxform->checkbox( array(
40
- 'id' => 'tfree_testimonial_content',
41
- 'name' => __( 'Testimonial Content', 'testimonial-free' ),
42
- 'desc' => __( 'Check to show testimonial content.', 'testimonial-free' ),
43
- 'default' => 'on'
44
- ) );
45
- $this->metaboxform->color( array(
46
- 'id' => 'tfree_testimonial_content_color',
47
- 'type' => 'color',
48
- 'name' => __( 'Testimonial Content Color', 'testimonial-free' ),
49
- 'desc' => __( 'Set testimonial content color.', 'testimonial-free' ),
50
- 'default' => '#333333'
51
- ) );
52
- $this->metaboxform->subheading( array(
53
- 'id' => 'subheading',
54
- 'name' => __( 'Reviewer Information Settings', 'testimonial-free' ),
55
- ) );
56
- $this->metaboxform->checkbox( array(
57
- 'id' => 'tfree_reviewer_name',
58
- 'name' => __( 'Name', 'testimonial-free' ),
59
- 'desc' => __( 'Show/Hide reviewer name.', 'testimonial-free' ),
60
- 'default' => 'on'
61
- ) );
62
- $this->metaboxform->color( array(
63
- 'id' => 'tfree_reviewer_name_color',
64
- 'type' => 'color',
65
- 'name' => __( 'Name Color', 'testimonial-free' ),
66
- 'desc' => __( 'Set reviewer name color.', 'testimonial-free' ),
67
- 'default' => '#333333'
68
- ) );
69
- $this->metaboxform->checkbox( array(
70
- 'id' => 'tfree_star_rating',
71
- 'name' => __( 'Star Rating', 'testimonial-free' ),
72
- 'desc' => __( 'Show/Hide star ratings.', 'testimonial-free' ),
73
- 'default' => 'on'
74
- ) );
75
- $this->metaboxform->color( array(
76
- 'id' => 'tfree_star_rating_color',
77
- 'type' => 'color',
78
- 'name' => __( 'Star Rating Color', 'testimonial-free' ),
79
- 'desc' => __( 'Set color for star rating.', 'testimonial-free' ),
80
- 'default' => '#f3bb00'
81
- ) );
82
- $this->metaboxform->checkbox( array(
83
- 'id' => 'tfree_position',
84
- 'name' => __( 'Identity or Position', 'testimonial-free' ),
85
- 'desc' => __( 'Show/Hide identity or position.', 'testimonial-free' ),
86
- 'default' => 'on'
87
- ) );
88
- $this->metaboxform->color( array(
89
- 'id' => 'tfree_position_color',
90
- 'type' => 'color',
91
- 'name' => __( 'Identity or Position Color', 'testimonial-free' ),
92
- 'desc' => __( 'Set color for identity or position.', 'testimonial-free' ),
93
- 'default' => '#444444'
94
- ) );
95
-
96
- ?>
97
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/partials/typography.php DELETED
@@ -1,123 +0,0 @@
1
- <?php
2
- /**
3
- * This file is to display typography.
4
- * @since 2.0
5
- * @package testimonial-free
6
- */
7
- ?>
8
- <div id="sp-tfree-tab-4" class="sp-tfree-mbf-tab-content sp-tfree-mbf-tab-typography">
9
- <div class="sp-tpro-notice">These Typography (840+ Google Fonts) options are available in the <b><a href="https://shapedplugin.com/plugin/testimonial-pro" target="_blank">Pro Version</a></b>.</div>
10
- <?php
11
- $this->metaboxform->checkbox_disabled( array(
12
- 'id' => 'tfree_load_section_title_font',
13
- 'name' => __( 'Load Section Title Font', 'testimonial-free' ),
14
- 'desc' => __( 'On/Off google font for the section title.', 'testimonial-free' ),
15
- 'default' => 'on',
16
- ) );
17
- $this->metaboxform->typography_type( array(
18
- 'id' => 'tfree_section_title_font',
19
- 'name' => __( 'Section Title Font', 'testimonial-free' ),
20
- 'desc' => __( 'Set testimonial section title font properties.', 'testimonial-free' ),
21
- ) );
22
- $this->metaboxform->checkbox_disabled( array(
23
- 'id' => 'tfree_load_testimonial_title_font',
24
- 'name' => __( 'Load Testimonial Title Font', 'testimonial-free' ),
25
- 'desc' => __( 'On/Off google font for the testimonial tagline or title.', 'testimonial-free' ),
26
- 'default' => 'on',
27
- ) );
28
- $this->metaboxform->typography_type( array(
29
- 'id' => 'tfree_testimonial_title_font',
30
- 'name' => __( 'Testimonial Title Font', 'testimonial-free' ),
31
- 'desc' => __( 'Set testimonial tagline or title font properties.', 'testimonial-free' ),
32
- ) );
33
- $this->metaboxform->checkbox_disabled( array(
34
- 'id' => 'tfree_load_testimonial_content_font',
35
- 'name' => __( 'Load Testimonial Content Font', 'testimonial-free' ),
36
- 'desc' => __( 'On/Off google font for the testimonial content.', 'testimonial-free' ),
37
- 'default' => 'on',
38
- ) );
39
- $this->metaboxform->typography_type( array(
40
- 'id' => 'tfree_testimonial_content_font',
41
- 'name' => __( 'Testimonial Content Font', 'testimonial-free' ),
42
- 'desc' => __( 'Set testimonial content font properties.', 'testimonial-free' ),
43
- ) );
44
- $this->metaboxform->checkbox_disabled( array(
45
- 'id' => 'tfree_load_name_font',
46
- 'name' => __( 'Load Name Font', 'testimonial-free' ),
47
- 'desc' => __( 'On/Off google font for the name.', 'testimonial-free' ),
48
- 'default' => 'on',
49
- ) );
50
- $this->metaboxform->typography_type( array(
51
- 'id' => 'tfree_name_font',
52
- 'name' => __( 'Name Font', 'testimonial-free' ),
53
- 'desc' => __( 'Set name font properties.', 'testimonial-free' ),
54
- ) );
55
- $this->metaboxform->checkbox_disabled( array(
56
- 'id' => 'tfree_load_identity_font',
57
- 'name' => __( 'Load Identity or Position & Company Name Font', 'testimonial-free' ),
58
- 'desc' => __( 'On/Off google font for the identity or position & company name.', 'testimonial-free' ),
59
- 'default' => 'on',
60
- ) );
61
- $this->metaboxform->typography_type( array(
62
- 'id' => 'tfree_identity_font',
63
- 'name' => __( 'Identity or Position & Company Name Font', 'testimonial-free' ),
64
- 'desc' => __( 'Set identity or position & company name font properties.', 'testimonial-free' ),
65
- ) );
66
- $this->metaboxform->checkbox_disabled( array(
67
- 'id' => 'tfree_load_location_font',
68
- 'name' => __( 'Load Location Font', 'testimonial-free' ),
69
- 'desc' => __( 'On/Off google font for the location.', 'testimonial-free' ),
70
- 'default' => 'on',
71
- ) );
72
- $this->metaboxform->typography_type( array(
73
- 'id' => 'tfree_location_font',
74
- 'name' => __( 'Location Font', 'testimonial-free' ),
75
- 'desc' => __( 'Set location font properties.', 'testimonial-free' ),
76
- ) );
77
- $this->metaboxform->checkbox_disabled( array(
78
- 'id' => 'tfree_load_mobile_font',
79
- 'name' => __( 'Load Phone or Mobile Font', 'testimonial-free' ),
80
- 'desc' => __( 'On/Off google font for the phone or mobile.', 'testimonial-free' ),
81
- 'default' => 'on',
82
- ) );
83
- $this->metaboxform->typography_type( array(
84
- 'id' => 'tfree_mobile_font',
85
- 'name' => __( 'Phone or Mobile Font', 'testimonial-free' ),
86
- 'desc' => __( 'Set phone or mobile font properties.', 'testimonial-free' ),
87
- ) );
88
- $this->metaboxform->checkbox_disabled( array(
89
- 'id' => 'tfree_load_email_font',
90
- 'name' => __( 'Load Email Address Font', 'testimonial-free' ),
91
- 'desc' => __( 'On/Off google font for the email address.', 'testimonial-free' ),
92
- 'default' => 'on',
93
- ) );
94
- $this->metaboxform->typography_type( array(
95
- 'id' => 'tfree_email_font',
96
- 'name' => __( 'Email Address Font', 'testimonial-free' ),
97
- 'desc' => __( 'Set email address font properties.', 'testimonial-free' ),
98
- ) );
99
- $this->metaboxform->checkbox_disabled( array(
100
- 'id' => 'tfree_load_email_font',
101
- 'name' => __( 'Load Date Font', 'testimonial-free' ),
102
- 'desc' => __( 'On/Off google font for the date.', 'testimonial-free' ),
103
- 'default' => 'on',
104
- ) );
105
- $this->metaboxform->typography_type( array(
106
- 'id' => 'tfree_email_font',
107
- 'name' => __( 'Date Font', 'testimonial-free' ),
108
- 'desc' => __( 'Set date font properties.', 'testimonial-free' ),
109
- ) );
110
- $this->metaboxform->checkbox_disabled( array(
111
- 'id' => 'tfree_load_website_font',
112
- 'name' => __( 'Load Website Font', 'testimonial-free' ),
113
- 'desc' => __( 'On/Off google font for the website.', 'testimonial-free' ),
114
- 'default' => 'on',
115
- ) );
116
- $this->metaboxform->typography_type( array(
117
- 'id' => 'tfree_website_font',
118
- 'name' => __( 'Website Font', 'testimonial-free' ),
119
- 'desc' => __( 'Set website font properties.', 'testimonial-free' ),
120
- ) );
121
-
122
- ?>
123
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/partials/upgrade-to-pro.php DELETED
@@ -1,404 +0,0 @@
1
- <?php
2
- /**
3
- * This file is to display upgrade to pro tab.
4
- * @package testimonial-free
5
- */
6
- ?>
7
-
8
- <div id="sp-tfree-tab-5" class="sp-tfree-mbf-tab-content">
9
- <div class="sp-tfree-upgrade-header">
10
- <div class="tfree-overlay-color"></div>
11
- <div class="sp-tfree-container">
12
- <div class="sp-tfree-col-lg-7">
13
- <h1 class="sp-tfree-upgrade-title">Collect & Showcase Your Testimonials Aesthetically and Increase Conversions!</h1>
14
- <h4 class="sp-tfree-upgrade-subtitle">Upgrade to <b>PRO</b> Version of <b>Testimonial</b> to benefit
15
- from all features!</h4>
16
- </div>
17
- <div class="sp-tfree-col-lg-5">
18
- <a href="https://shapedplugin.com/plugin/testimonial-pro"
19
- class="button button-large free-upgrade-btn upgrade-btn" target="_blank">Upgrade to PRO!</a><a
20
- href="https://shapedplugin.com/demo/testimonial-pro"
21
- class="button button-large free-upgrade-btn demo-btn" target="_blank">All Features & Demo</a>
22
- </div>
23
- </div>
24
- </div>
25
- <div class="sp-tfree-upgrade-body">
26
- <div class="sp-tfree-section-feature-icon text-center"><img
27
- src="<?php echo SP_TFREE_URL . 'admin/assets/images/pro-feature.png' ?>" alt=""></div>
28
- <h2 class="sp-tfree-section-title text-center">PREMIUM FEATURES</h2>
29
- <div class="tfree-option">
30
- <div class="sp-tfree-col-lg-2">
31
- <div class="sp-tfree-content">
32
- <img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss1.png' ?>" alt="">
33
- </div>
34
-
35
- </div>
36
- <div class="sp-tfree-col-lg-2">
37
- <div class="sp-tfree-content">
38
- <h2>5+ Testimonial Layouts</h2>
39
- <h4><i>(Slider, Grid, Masonry, List, & Filter-Grid & Filter-Masonry)</i></h4>
40
- <p>You can select from 6 beautiful testimonial layouts: Slider, Grid, Masonry, List, Filter-Grid & Filter-Masonry. Creating a customized layout is super easy. You can change the number of layout columns, reviewer info to show, font, & color etc.</p>
41
- <p>Showcase your testimonials how you want and use multi-creative ideas as you need.</p>
42
- </div>
43
-
44
- </div>
45
- </div>
46
- <div class="tfree-option">
47
- <div class="sp-tfree-col-lg-2">
48
- <div class="sp-tfree-content">
49
- <h2>10+ Professional Themes</h2>
50
- <p>Get designer quality results without writing a single line of code through 10+ professionally pre-designed themes for front-end display. Each theme has a different structure and huge customization options to cover all the demands.</p>
51
- </div>
52
-
53
- </div>
54
- <div class="sp-tfree-col-lg-2">
55
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss2.png'
56
- ?>" alt=""></div>
57
- </div>
58
- </div>
59
- <div class="tfree-option">
60
-
61
- <div class="sp-tfree-col-lg-2">
62
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss3.png'
63
- ?>" alt=""></div>
64
- </div>
65
- <div class="sp-tfree-col-lg-2">
66
- <div class="sp-tfree-content">
67
- <h2>840+ GOOGLE FONTS</h2>
68
- <h4><i>(Font family, size, transform, letter spacing, line-height, & color)</i></h4>
69
- <p>Testimonial Pro includes over 840+ Google fonts. You can add your desired font from 840+ Google Fonts. Customize the font family, size, transform, letter spacing, color, and line-height for every element.</p>
70
-
71
- <p>Manage any content with Google Fonts with live preview. That’s robust features of Testimonial Pro that can never be missed by creative people to make site beautiful and unique feel.</p>
72
- </div>
73
-
74
- </div>
75
- </div>
76
- <div class="tfree-option">
77
-
78
- <div class="sp-tfree-col-lg-2">
79
- <div class="sp-tfree-content">
80
- <h2>Shortcode Generator With 100+ Visual Customisation Options</h2>
81
- <p>It could be easier to generate the shortcode to display the testimonials. Just go to the Shortcode Generator, choose the settings you want and generated shortcode is ready to use where you want like posts, pages, and widgets. Generated Shortcodes are to be used in posts, pages and widgets, while the php function will be in your theme files.</p>
82
- </div>
83
- </div>
84
- <div class="sp-tfree-col-lg-2">
85
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss4.png'
86
- ?>" alt=""></div>
87
- </div>
88
- </div>
89
-
90
- <div class="tfree-option">
91
- <div class="sp-tfree-col-lg-2">
92
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss5.png' ?>"
93
- alt=""></div>
94
-
95
- </div>
96
- <div class="sp-tfree-col-lg-2">
97
- <div class="sp-tfree-content">
98
- <h2>14 Display Options</h2>
99
- <p>Pick individual fields for each Testimonial's information. You can toggle between Testimonial Image, Video, title, Content, Name, Rating star, identity, Company, Location, Mobile, E-mail, Date, Website, And Social profile links.</p>
100
- </div>
101
- </div>
102
-
103
- </div>
104
- <div class="tfree-option">
105
-
106
- <div class="sp-tfree-col-lg-2">
107
- <div class="sp-tfree-content">
108
- <h2>TAILOR-MADE RESPONSIVITY</h2>
109
- <h4><i>(Control on Standard Desktop, Tablet & Mobile)</i></h4>
110
- <p>All Testimonial layouts are fully responsive & mobile touch-friendly and used intuitive breakpoints settings that you can customize the number of testimonials displayed on a Desktop, Laptop, iPad, iPhone and Android Devices.</p>
111
- <p>Total control on your slider at any resolution! With the premium version of the plugin, you can set the number of testimonial columns to show simultaneously in the slider, grid, masonry and isotope filter according to the specific device resolution.</p>
112
- <p>Three sizes are generally considered: Standard Desktop (desktop for the screen smaller than 1100px.), tablet (tablet for the screen smaller than 990px.) and mobile ( mobile for the screen smaller than 650px.).</p>
113
- </div>
114
- </div>
115
- <div class="sp-tfree-col-lg-2">
116
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss6.png'
117
- ?>"
118
- alt=""></div>
119
- </div>
120
- </div>
121
- <div class="tfree-option">
122
- <div class="sp-tfree-col-lg-2">
123
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss7.png' ?>"
124
- alt=""></div>
125
-
126
- </div>
127
- <div class="sp-tfree-col-lg-2">
128
- <div class="sp-tfree-content">
129
- <h2>Drag & Drop Re-Ordering!</h2>
130
- <p>One of the most amazing features of Testimonial Pro is the ability to drag & drop re-order testimonials. You can re-order your testimonials simply by drag & drop, or choose to display the testimonials randomly. </p>
131
-
132
- </div>
133
-
134
- </div>
135
-
136
- </div>
137
- <div class="tfree-option">
138
-
139
- <div class="sp-tfree-col-lg-2">
140
- <div class="sp-tfree-content">
141
- <h2>Showcase by Specific Category</h2>
142
- <p>Do you want to show a specific testimonial category to your potential customers? You can show testimonials from categories. Save your time by allowing automatical showcasing of available testimonials from the category.</p>
143
- </div>
144
-
145
- </div>
146
- <div class="sp-tfree-col-lg-2">
147
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss8.png'
148
- ?>" alt=""></div>
149
- </div>
150
- </div>
151
- <div class="tfree-option">
152
- <div class="sp-tfree-col-lg-2">
153
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss9.png'
154
- ?>" alt=""></div>
155
- </div>
156
- <div class="sp-tfree-col-lg-2">
157
- <div class="sp-tfree-content">
158
- <h2>Display Specific Testimonials</h2>
159
- <h4><i>(If you can leverage it, you can earn from it.)</i></h4>
160
- <p>You can display the specific testimonials from available testimonials in the list. Highlight your specific testimonials in strategic positions, it will allow you to convert visitors into your valuable customers.</p>
161
- </div>
162
- </div>
163
- </div>
164
- <div class="tfree-option">
165
- <div class="sp-tfree-col-lg-2">
166
- <div class="sp-tfree-content">
167
- <h2>Front-end Submission Form</h2>
168
- <p>You can create Front-end Submission Form for customers to collect new testimonials for your business. When you receive a new testimonial, simply review and approve it to automatically add it to your customer testimonials page!</p>
169
- </div>
170
- </div>
171
- <div class="sp-tfree-col-lg-2">
172
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss10.png'
173
- ?>" alt=""></div>
174
- </div>
175
-
176
- </div>
177
- <div class="tfree-option">
178
- <div class="sp-tfree-col-lg-2">
179
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss11.png'
180
- ?>" alt=""></div>
181
- </div>
182
- <div class="sp-tfree-col-lg-2">
183
- <div class="sp-tfree-content">
184
- <h2>Front-end Form Fields Control</h2>
185
- <p>You can choose which fields and the messages to display! You can sort your own order and control show/hide, required, label and placeholder attribute for all fields in Testimonial Submission Form. It’s that simple.
186
- </p>
187
- </div>
188
- </div>
189
- </div>
190
-
191
- <div class="tfree-option">
192
- <div class="sp-tfree-col-lg-2">
193
- <div class="sp-tfree-content">
194
- <h2>Thumbnail Slider</h2>
195
- <p>One of the most stunning features of Testimonial Pro is the ability to create Thumbnail Slider. If you enable thumbnail slider, you can display testimonials using the Thumbnail Slider. It's modern and looks pretty.</p>
196
- </div>
197
- </div>
198
- <div class="sp-tfree-col-lg-2">
199
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss12.png'
200
- ?>" alt=""></div>
201
- </div>
202
- </div>
203
- <div class="tfree-option">
204
- <div class="sp-tfree-col-lg-2">
205
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss13.png'
206
- ?>" alt=""></div>
207
- </div>
208
- <div class="sp-tfree-col-lg-2">
209
- <div class="sp-tfree-content">
210
- <h2>Video Testimonial & Lightbox</h2>
211
- <p>Video Testimonials are more effective to increase sales of a business. You can create video testimonial with Lightbox instead of simple image testimonial with Testimonial Pro. You can use video from YouTube, Vimeo or any video link. </p>
212
- </div>
213
- </div>
214
- </div>
215
- <div class="tfree-option">
216
- <div class="sp-tfree-col-lg-2">
217
- <div class="sp-tfree-content">
218
- <h2>Read More & Characters Limit Options</h2>
219
- <p>You can choose testimonial content display type, show full testimonial body or content with characters limit. You can set custom ellipsis after content, customize the Read More button text, color, and hover color.</p>
220
- </div>
221
- </div>
222
- <div class="sp-tfree-col-lg-2">
223
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss14.png'
224
- ?>" alt=""></div>
225
- </div>
226
- </div>
227
-
228
- <div class="tfree-option">
229
- <div class="sp-tfree-col-lg-2">
230
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss15.png'
231
- ?>" alt=""></div>
232
- </div>
233
- <div class="sp-tfree-col-lg-2">
234
- <div class="sp-tfree-content">
235
- <h2>Read More Action Type</h2>
236
- <h4><i>(Show Testimonial in a Expand or Popup)</i></h4>
237
- <p>You can choose Read More button action type to show testimonial in a expand or popup page. In Expand, the testimonial content will collapse and expand long blocks of text. In PopUp, All Testimonial content will show like lightbox.</p>
238
-
239
- </div>
240
-
241
- </div>
242
- </div>
243
-
244
- <div class="tfree-option">
245
- <div class="sp-tfree-col-lg-2">
246
- <div class="sp-tfree-content">
247
- <h2>Advanced Link Options</h2>
248
- <p>Testimonial Pro has several options for your links. You can link the identity or position of the testimonial through website URL that will lead to a page or company website URL, perfect for case studies!</p>
249
- </div>
250
- </div>
251
- <div class="sp-tfree-col-lg-2">
252
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss16.png'
253
- ?>"
254
- alt=""></div>
255
- </div>
256
- </div>
257
-
258
- <div class="tfree-option">
259
- <div class="sp-tfree-col-lg-2">
260
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss17.png'
261
- ?>"
262
- alt=""></div>
263
- </div>
264
- <div class="sp-tfree-col-lg-2">
265
- <div class="sp-tfree-content">
266
- <h2>Rich Snippets/Structured Data compatible</h2>
267
- <p>The plugin is Rich Snippets compatible. When used properly this information might display in the search engine result pages! Testimonial Pro uses schema.org compliant JSON-LD markup to appear correctly in search results.</p>
268
- </div>
269
- </div>
270
- </div>
271
-
272
- <div class="tfree-option">
273
- <div class="sp-tfree-col-lg-2">
274
- <div class="sp-tfree-content">
275
- <h2>Slider Control Options</h2>
276
- <p>You can set how many testimonials to scroll at a time in the carousel or show, navigation & pagination show/hide, autoplay, speed, animation, loop, pause on hover, draggable, swipe, ticker mode, and many other settings.</p>
277
- </div>
278
- </div>
279
- <div class="sp-tfree-col-lg-2">
280
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss18.png'
281
- ?>"
282
- alt=""></div>
283
- </div>
284
- </div>
285
-
286
- <div class="tfree-option">
287
- <div class="sp-tfree-col-lg-2">
288
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss19.png'
289
- ?>"
290
- alt=""></div>
291
- </div>
292
- <div class="sp-tfree-col-lg-2">
293
- <div class="sp-tfree-content">
294
- <h2>Navigation Positions & Styles </h2>
295
- <h4><i>(13 Navigation, 16 Pagination, 6 Arrow Styles & 8 Positions)</i></h4>
296
- <p>You can select your desired arrow style to fit your needs from many styles. This plugin has 13 Navigation, 16 Pagination, 6 Arrow Styles and 8+ different navigational arrow positions (Top right, top center, top left, bottom left, bottom center, bottom right, vertically center, vertically inner center, vertically inner center on hover etc.).</p>
297
- <p>You can set your desired style, position and color your own way. Also customize pagination dots color and active color as well as arrow color, border color, background color and much more!</p>
298
- </div>
299
- </div>
300
- </div>
301
- <div class="tfree-option">
302
- <div class="sp-tfree-col-lg-2">
303
- <div class="sp-tfree-content">
304
- <h2>Custom Image Re-sizing</h2>
305
- <p>You can control the image size to your specific size. You can change the default size of your testimonial images on the settings. The newly uploaded image will be resized or cropped to the specified dimensions.</p>
306
- </div>
307
- </div>
308
- <div class="sp-tfree-col-lg-2">
309
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss20.png'
310
- ?>"
311
- alt=""></div>
312
- </div>
313
- </div>
314
-
315
- <div class="tfree-option">
316
- <div class="sp-tfree-col-lg-2">
317
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss21.png'
318
- ?>"
319
- alt=""></div>
320
- </div>
321
- <div class="sp-tfree-col-lg-2">
322
- <div class="sp-tfree-content">
323
- <h2>WPBakery(formerly Visual Composer) & Widget Ready</h2>
324
- <p>The premium plugin includes a Widget to display the layouts. Just create a layout in the Shortcode Generator page, save it to use in the widget! A Testimonials module available to add to your page via the V.C interface.</p>
325
- </div>
326
- </div>
327
- </div>
328
- <div class="tfree-option">
329
- <div class="sp-tfree-col-lg-2">
330
- <div class="sp-tfree-content">
331
- <h2>Translation Ready (WPML)</h2>
332
- <p>Testimonial Pro is fully Translation ready, supporting .po and .mo language files! You can translate into your language with the following popular plugins like WPML, Polylang, qTranslate-x, GTranslate, Google Language Translator, WPGlobus – Multilingual Everything! </p>
333
- <p>If you want the administration of the plugin in another language, you just need to create your own language files.</p>
334
- </div>
335
- </div>
336
- <div class="sp-tfree-col-lg-2">
337
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss22.png'
338
- ?>"
339
- alt=""></div>
340
- </div>
341
- </div>
342
- <div class="tfree-option">
343
- <div class="sp-tfree-col-lg-2">
344
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss23.png'
345
- ?>"
346
- alt=""></div>
347
- </div>
348
- <div class="sp-tfree-col-lg-2">
349
- <div class="sp-tfree-content">
350
- <h2>Duplicate or Clone Options</h2>
351
- <p>A built-in duplicate or clone option for sliders or showcase is included with Testimonial Pro. You can duplicate or clone testimonial slider or showcase and copy them to new drafts for further editing. It's nice!</p>
352
- </div>
353
- </div>
354
- </div>
355
- <div class="tfree-option">
356
- <div class="sp-tfree-col-lg-2">
357
- <div class="sp-tfree-content">
358
- <h2>Built-in Automatic Updates Notifications</h2>
359
- <p>You'll get Automatic Updates when you activate the license key in your site. Once you buy the Testimonial Pro, you will get regular update notification to the dashboard. You can see the change logs before update.</p>
360
- </div>
361
- </div>
362
- <div class="sp-tfree-col-lg-2">
363
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss24.png'
364
- ?>"
365
- alt=""></div>
366
- </div>
367
- </div>
368
- <div class="tfree-option">
369
- <div class="sp-tfree-col-lg-2">
370
- <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss25.png'
371
- ?>"
372
- alt=""></div>
373
- </div>
374
- <div class="sp-tfree-col-lg-2">
375
- <div class="sp-tfree-content">
376
- <h2>Fast & Friendly Support (24x7)</h2>
377
- <p>We love our valued customers! We always strive to provide 5-star, timely, and comprehensive support whenever you need a helping hand. We've a full time dedidcated support team who are always ready to make you happy!</p>
378
- </div>
379
- </div>
380
- </div>
381
-
382
-
383
- <div class="sp-tfree-video-tutorial text-center">
384
- <h2>Watch the Video</h2>
385
- <div class="sp-tfree-video-tutorial-video">
386
- <iframe width="560" height="300" src="https://www.youtube.com/embed/OA7LgaZHwIY?list=PLoUb-7uG-5jM2sjscSqBVj07VXOqt0qHZ" frameborder="0"
387
- allowfullscreen></iframe>
388
- </div>
389
- </div>
390
-
391
- </div>
392
- <div class="sp-tfree-upgrade-footer text-center">
393
- <div class="tfree-overlay-color"></div>
394
- <div class="sp-tfree-client-thumb"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/client-thumb.png'
395
- ?>"
396
- alt=""></div>
397
- <h2>Join Our Happy Customers</h2>
398
- <p>Unlock all <b>Testimonial Pro</b> features and build an eye-caching <b>Testimonials Showcase</b> for your website today.</p>
399
- <a href="https://shapedplugin.com/plugin/testimonial-pro"
400
- class="button button-large free-upgrade-btn upgrade-btn" target="_blank">Upgrade Now for $39 only!</a><a
401
- href="https://shapedplugin.com/demo/testimonial-pro"
402
- class="button button-large free-upgrade-btn demo-btn" target="_blank">All Features & Demo</a>
403
- </div>
404
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/scripts.php CHANGED
@@ -39,25 +39,9 @@ class SP_TFREE_Admin_Scripts {
39
  * Enqueue admin scripts
40
  */
41
  public function admin_scripts() {
42
- if ( 'spt_testimonial_page_tfree_help' === get_current_screen()->id ) {
43
- wp_enqueue_script( 'jquery-masonry');
44
- wp_enqueue_script( 'sp-tfree-help', SP_TFREE_URL . 'admin/assets/js/help.js', array( 'jquery' ), SP_TFREE_VERSION, true );
45
- }
46
- if ( 'sp_tfree_shortcodes' === get_current_screen()->id ) {
47
- //CSS Files
48
- wp_enqueue_style( 'wp-color-picker' );
49
- wp_enqueue_style( 'tfree-font-awesome', SP_TFREE_URL . 'public/assets/css/font-awesome.min.css', array(), SP_TFREE_VERSION );
50
- wp_enqueue_style( 'sp-tfree-chosen', SP_TFREE_URL . 'admin/assets/css/chosen.css', array(), SP_TFREE_VERSION );
51
- wp_enqueue_style( 'sp-tfree-admin-meta', SP_TFREE_URL . 'admin/assets/css/admin-meta.css', array(), SP_TFREE_VERSION );
52
-
53
- //JS Files
54
- wp_enqueue_script( 'sp-tfree-admin-meta', SP_TFREE_URL . 'admin/assets/js/admin-meta.js', array( 'jquery', 'wp-color-picker' ), SP_TFREE_VERSION, true );
55
- wp_enqueue_script( 'sp-tfree-chosen-js', SP_TFREE_URL . 'admin/assets/js/chosen.js', array( 'jquery' ), SP_TFREE_VERSION, false );
56
-
57
- }
58
- wp_enqueue_style( 'testimonial-free-admin', SP_TFREE_URL . 'admin/assets/css/admin.css', array(), SP_TFREE_VERSION );
59
  }
60
 
61
  }
62
 
63
- new SP_TFREE_Admin_Scripts();
39
  * Enqueue admin scripts
40
  */
41
  public function admin_scripts() {
42
+ wp_enqueue_style( 'testimonial-free-admin', SP_TFREE_URL . 'admin/assets/css/admin.min.css', array(), SP_TFREE_VERSION );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  }
44
 
45
  }
46
 
47
+ new SP_TFREE_Admin_Scripts();
admin/views/tab-navigation.php DELETED
@@ -1,74 +0,0 @@
1
- <?php
2
- /**
3
- * This file display meta box tab
4
- * @package testimonial-free
5
- */
6
-
7
- $current_screen = get_current_screen();
8
- $the_current_post_type = $current_screen->post_type;
9
- if ( $the_current_post_type == 'sp_tfree_shortcodes' ) {
10
- ?>
11
- <div class="sp-tfree-metabox-framework">
12
- <div class="sp-tfree-mbf-banner">
13
- <div class="sp-tfree-mbf-logo"><img src="<?php echo SP_TFREE_URL ?>admin/assets/images/logo.png" alt="<?php esc_html_e('Testimonial', 'Testimonial'); ?>"></div>
14
- <div class="sp-tfree-mbf-short-links">
15
- <a href="https://shapedplugin.com/support-forum/" target="_blank"><i class="sp-tfree-font-icon fa fa-life-ring"></i> Support</a>
16
- </div>
17
- </div>
18
- <div class="sp-tfree-mbf text-center">
19
-
20
- <div class="sp-tfree-col-lg-3">
21
- <div class="sp-tfree-mbf-shortcode">
22
- <h2 class="sp-tfree-mbf-shortcode-title"><?php _e( 'Shortcode', 'testimonial-free' ); ?> </h2>
23
- <p><?php _e( 'Copy and paste this shortcode into your posts or pages:', 'testimonial-free' );
24
- global $post;
25
- ?></p>
26
- <div class="tfree-sc-code selectable" >[sp_testimonial <?php echo 'id="' . $post->ID . '"';
27
- ?>]</div>
28
- </div>
29
-
30
-
31
- </div>
32
- <div class="sp-tfree-col-lg-3">
33
- <div class="sp-tfree-mbf-shortcode">
34
- <h2 class="sp-tfree-mbf-shortcode-title"><?php _e( 'Template Include', 'testimonial-free' ); ?> </h2>
35
-
36
- <p><?php _e( 'Paste the PHP code into your template file:', 'testimonial-free' ); ?></p>
37
- <div class="tfree-sc-code selectable">
38
- &lt;?php
39
- echo do_shortcode('[sp_testimonial <?php echo 'id="' . $post->ID . '"'; ?>]');
40
- ?&gt;</div>
41
- </div>
42
- </div>
43
- <div class="sp-tfree-col-lg-3">
44
- <div class="sp-tfree-mbf-shortcode">
45
- <h2 class="sp-tfree-mbf-shortcode-title"><?php _e( 'Post or Page editor', 'testimonial-free' ); ?> </h2>
46
-
47
- <p><?php _e( 'Insert the shortcode with the TinyMCE button:', 'testimonial-free' ); ?></p>
48
- <img class="back-image"
49
- src="<?php echo SP_TFREE_URL . 'admin/assets/images/tiny-mce.png' ?>"
50
- alt="">
51
- </div>
52
- </div>
53
-
54
- </div>
55
- <div class="sp-tfree-shortcode-divider"></div>
56
-
57
- <div class="sp-tfree-mbf-nav nav-tab-wrapper current">
58
- <a class="nav-tab nav-tab-active" data-tab="sp-tfree-tab-1"><i class="sp-tfree-font-icon fa fa-wrench"></i>General Settings</a>
59
- <a class="nav-tab" data-tab="sp-tfree-tab-2"><i class="sp-tfree-font-icon fa fa-sliders"></i>Slider Settings</a>
60
- <a class="nav-tab" data-tab="sp-tfree-tab-3"><i class="sp-tfree-font-icon fa fa-paint-brush"></i>Stylization</a>
61
- <a class="nav-tab" data-tab="sp-tfree-tab-4"><i class="sp-tfree-font-icon fa fa-font"></i>Typography</a>
62
- <a class="nav-tab sp-tfree-upgrade-to-pro" data-tab="sp-tfree-tab-5"><i class="sp-tfree-font-icon fa fa-rocket"></i>Upgrade to Pro</a>
63
- </div>
64
-
65
- <?php
66
- include_once 'partials/general-settings.php';
67
- include_once 'partials/slider-settings.php';
68
- include_once 'partials/stylization.php';
69
- include_once 'partials/typography.php';
70
- include_once 'partials/upgrade-to-pro.php';
71
- ?>
72
- </div>
73
- <?php
74
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/testimonial-metaboxs.php ADDED
@@ -0,0 +1,914 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+
4
+ //
5
+ // Metabox of the testimonial shortcode generator.
6
+ // Set a unique slug-like ID.
7
+ //
8
+ $prefix_shortcode_opts = 'sp_tpro_shortcode_options';
9
+
10
+ //
11
+ // Testimonial metabox.
12
+ //
13
+ SPFTESTIMONIAL::createMetabox(
14
+ $prefix_shortcode_opts, array(
15
+ 'title' => __( 'Shortcode Options', 'testimonial-free' ),
16
+ 'post_type' => 'sp_tfree_shortcodes',
17
+ // 'post_type' => 'sp_tpro_shortcodes',
18
+ 'context' => 'normal',
19
+ )
20
+ );
21
+
22
+ //
23
+ // General Settings section.
24
+ //
25
+ SPFTESTIMONIAL::createSection(
26
+ $prefix_shortcode_opts, array(
27
+ 'title' => __( 'General Settings', 'testimonial-free' ),
28
+ 'icon' => 'fa fa-wrench',
29
+ 'fields' => array(
30
+
31
+ array(
32
+ 'id' => 'layout',
33
+ 'type' => 'select_f',
34
+ 'title' => __( 'Layout', 'testimonial-free' ),
35
+ 'subtitle' => __( 'Select a layout to display the testimonials.', 'testimonial-free' ),
36
+ 'options' => array(
37
+ 'slider' => array(
38
+ 'name' => __( 'Slider', 'testimonial-free' ),
39
+ 'pro_only' => false,
40
+ ),
41
+ 'grid' => array(
42
+ 'name' => __( 'Grid (Pro)', 'testimonial-free' ),
43
+ 'pro_only' => true,
44
+ ),
45
+ 'masonry' => array(
46
+ 'name' => __( 'Masonry (Pro)', 'testimonial-free' ),
47
+ 'pro_only' => true,
48
+ ),
49
+ 'list' => array(
50
+ 'name' => __( 'List (Pro)', 'testimonial-free' ),
51
+ 'pro_only' => true,
52
+ ),
53
+ 'filter_grid' => array(
54
+ 'name' => __( 'Filter-Grid (Pro)', 'testimonial-free' ),
55
+ 'pro_only' => true,
56
+ ),
57
+ 'filter_masonry' => array(
58
+ 'name' => __( 'Filter-Masonry (Pro)', 'testimonial-free' ),
59
+ 'pro_only' => true,
60
+ ),
61
+ ),
62
+ 'default' => 'slider',
63
+ ),
64
+ array(
65
+ 'id' => 'theme_style',
66
+ 'type' => 'select_f',
67
+ 'title' => __( 'Select Theme', 'testimonial-free' ),
68
+ 'subtitle' => __( 'Select which theme you want to display.', 'testimonial-free' ),
69
+ 'options' => array(
70
+ 'theme-one' => array(
71
+ 'name' => __( 'Theme One', 'testimonial-free' ),
72
+ 'pro_only' => false,
73
+ ),
74
+ 'theme-two' => array(
75
+ 'name' => __( '9+ Themes (Pro)', 'testimonial-free' ),
76
+ 'pro_only' => true,
77
+ ),
78
+ ),
79
+ 'default' => 'theme-one',
80
+ ),
81
+ array(
82
+ 'id' => 'display_testimonials_from',
83
+ 'type' => 'select_f',
84
+ 'title' => __( 'Display Testimonials from', 'testimonial-free' ),
85
+ 'subtitle' => __( 'Select an option to display the testimonials.', 'testimonial-free' ),
86
+ 'options' => array(
87
+ 'latest' => array(
88
+ 'name' => __( 'Latest', 'testimonial-free' ),
89
+ 'pro_only' => false,
90
+ ),
91
+ 'category' => array(
92
+ 'name' => __( 'Category (Pro)', 'testimonial-free' ),
93
+ 'pro_only' => true,
94
+ ),
95
+ 'specific_testimonials' => array(
96
+ 'name' => __( 'Specific Testimonials (Pro)', 'testimonial-free' ),
97
+ 'pro_only' => true,
98
+ ),
99
+ ),
100
+ 'default' => 'latest',
101
+ ),
102
+ array(
103
+ 'id' => 'number_of_total_testimonials',
104
+ 'type' => 'spinner',
105
+ 'title' => __( 'Total Testimonials', 'testimonial-free' ),
106
+ 'subtitle' => __( 'Number of total testimonials to display.', 'testimonial-free' ),
107
+ 'default' => '10',
108
+ 'min' => -1,
109
+ ),
110
+ array(
111
+ 'id' => 'testimonial_order_by',
112
+ 'type' => 'select',
113
+ 'title' => __( 'Order by', 'testimonial-free' ),
114
+ 'subtitle' => __( 'Select an order by option.', 'testimonial-free' ),
115
+ 'options' => array(
116
+ 'ID' => __( 'ID', 'testimonial-free' ),
117
+ 'date' => __( 'Date', 'testimonial-free' ),
118
+ 'title' => __( 'Title', 'testimonial-free' ),
119
+ 'modified' => __( 'Modified', 'testimonial-free' ),
120
+ ),
121
+ 'default' => 'date',
122
+ ),
123
+ array(
124
+ 'id' => 'testimonial_order',
125
+ 'type' => 'select',
126
+ 'title' => __( 'Order', 'testimonial-free' ),
127
+ 'subtitle' => __( 'Select an order option.', 'testimonial-free' ),
128
+ 'options' => array(
129
+ 'ASC' => __( 'Ascending', 'testimonial-free' ),
130
+ 'DESC' => __( 'Descending', 'testimonial-free' ),
131
+ ),
132
+ 'default' => 'DESC',
133
+ ),
134
+ array(
135
+ 'type' => 'subheading',
136
+ 'content' => __( 'Responsive Settings', 'testimonial-free' ),
137
+ ),
138
+ array(
139
+ 'id' => 'number_of_testimonials',
140
+ 'type' => 'spinner',
141
+ 'title' => __( 'Testimonial Column(s)', 'testimonial-free' ),
142
+ 'subtitle' => __( 'Set number of column(s) for the screen larger than 1280px.', 'testimonial-free' ),
143
+ 'default' => '1',
144
+ ),
145
+ array(
146
+ 'id' => 'number_of_testimonials_desktop',
147
+ 'type' => 'spinner',
148
+ 'title' => __( 'Testimonial Column(s) on Desktop', 'testimonial-free' ),
149
+ 'subtitle' => __( 'Set number of column on desktop for the screen smaller than 1280px.', 'testimonial-free' ),
150
+ 'default' => '1',
151
+ ),
152
+ array(
153
+ 'id' => 'number_of_testimonials_small_desktop',
154
+ 'type' => 'spinner',
155
+ 'title' => __( 'Testimonial Column(s) on Small Desktop', 'testimonial-free' ),
156
+ 'subtitle' => __( 'Set number of column on small desktop for the screen smaller than 980px.', 'testimonial-free' ),
157
+ 'default' => '1',
158
+ ),
159
+ array(
160
+ 'id' => 'number_of_testimonials_tablet',
161
+ 'type' => 'spinner',
162
+ 'title' => __( 'Testimonial Column(s) on Tablet', 'testimonial-free' ),
163
+ 'subtitle' => __( 'Set number of column on tablet for the screen smaller than 736px.', 'testimonial-free' ),
164
+ 'default' => '1',
165
+ ),
166
+ array(
167
+ 'id' => 'number_of_testimonials_mobile',
168
+ 'type' => 'spinner',
169
+ 'title' => __( 'Testimonial Column(s) on Mobile', 'testimonial-free' ),
170
+ 'subtitle' => __( 'Set number of column on mobile for the screen smaller than 480px.', 'testimonial-free' ),
171
+ 'default' => '1',
172
+ ),
173
+
174
+ ),
175
+ )
176
+ );
177
+
178
+ //
179
+ // Slider Settings section.
180
+ //
181
+ SPFTESTIMONIAL::createSection(
182
+ $prefix_shortcode_opts, array(
183
+ 'title' => __( 'Slider Settings', 'testimonial-free' ),
184
+ 'icon' => 'fa fa-sliders',
185
+ 'fields' => array(
186
+
187
+ array(
188
+ 'id' => 'slider_auto_play',
189
+ 'type' => 'button_set',
190
+ 'title' => __( 'AutoPlay', 'testimonial-free' ),
191
+ 'subtitle' => __( 'On/Off auto play.', 'testimonial-free' ),
192
+ 'options' => array(
193
+ 'true' => __( 'On', 'testimonial-free' ),
194
+ 'false' => __( 'Off', 'testimonial-free' ),
195
+ 'off_on_mobile' => __( 'Off on Mobile', 'testimonial-free' ),
196
+ ),
197
+ 'default' => 'true',
198
+ ),
199
+ array(
200
+ 'id' => 'slider_auto_play_speed',
201
+ 'type' => 'spinner',
202
+ 'title' => __( 'AutoPlay Speed', 'testimonial-free' ),
203
+ 'subtitle' => __( 'Set auto play speed.', 'testimonial-free' ),
204
+ 'after' => __( '(millisecond)', 'testimonial-free' ),
205
+ 'default' => '3000',
206
+ 'min' => 1,
207
+ 'dependency' => array(
208
+ 'slider_auto_play',
209
+ 'any',
210
+ 'true,off_on_mobile',
211
+ ),
212
+ ),
213
+ array(
214
+ 'id' => 'slider_scroll_speed',
215
+ 'type' => 'spinner',
216
+ 'title' => __( 'Pagination Speed', 'testimonial-free' ),
217
+ 'subtitle' => __( 'Set pagination/slide scroll speed.', 'testimonial-free' ),
218
+ 'after' => __( '(millisecond)', 'testimonial-free' ),
219
+ 'default' => '600',
220
+ 'min' => 1,
221
+ ),
222
+ array(
223
+ 'id' => 'slider_pause_on_hover',
224
+ 'type' => 'switcher',
225
+ 'title' => __( 'Pause on Hover', 'testimonial-free' ),
226
+ 'subtitle' => __( 'On/Off slider pause on hover.', 'testimonial-free' ),
227
+ 'default' => true,
228
+ ),
229
+ array(
230
+ 'id' => 'slider_infinite',
231
+ 'type' => 'switcher',
232
+ 'title' => __( 'Infinite Loop', 'testimonial-free' ),
233
+ 'subtitle' => __( 'On/Off infinite loop mode.', 'testimonial-free' ),
234
+ 'default' => true,
235
+ ),
236
+ array(
237
+ 'type' => 'subheading',
238
+ 'content' => __( 'Navigation Settings', 'testimonial-free' ),
239
+ ),
240
+ array(
241
+ 'id' => 'navigation',
242
+ 'type' => 'button_set',
243
+ 'title' => __( 'Navigation', 'testimonial-free' ),
244
+ 'subtitle' => __( 'Show/Hide slider navigation.', 'testimonial-free' ),
245
+ 'options' => array(
246
+ 'true' => __( 'Show', 'testimonial-free' ),
247
+ 'false' => __( 'Hide', 'testimonial-free' ),
248
+ 'hide_on_mobile' => __( 'Hide on Mobile', 'testimonial-free' ),
249
+ ),
250
+ 'default' => 'true',
251
+ ),
252
+ array(
253
+ 'id' => 'navigation_arrow_color',
254
+ 'type' => 'color',
255
+ 'title' => __( 'Arrow Color', 'testimonial-free' ),
256
+ 'subtitle' => __( 'Set the navigation arrow color.', 'testimonial-free' ),
257
+ 'default' => '#444444',
258
+ 'dependency' => array(
259
+ 'navigation',
260
+ 'any',
261
+ 'true,hide_on_mobile',
262
+ ),
263
+ ),
264
+ array(
265
+ 'id' => 'navigation_hover_arrow_color',
266
+ 'type' => 'color',
267
+ 'title' => __( 'Arrow Hover Color', 'testimonial-free' ),
268
+ 'subtitle' => __( 'Set the navigation arrow hover color.', 'testimonial-free' ),
269
+ 'default' => '#52b3d9',
270
+ 'dependency' => array(
271
+ 'navigation',
272
+ 'any',
273
+ 'true,hide_on_mobile',
274
+ ),
275
+ ),
276
+
277
+ array(
278
+ 'type' => 'subheading',
279
+ 'content' => __( 'Pagination Settings', 'testimonial-free' ),
280
+ ),
281
+ array(
282
+ 'id' => 'pagination',
283
+ 'type' => 'button_set',
284
+ 'title' => __( 'Pagination', 'testimonial-free' ),
285
+ 'subtitle' => __( 'Show/Hide pagination.', 'testimonial-free' ),
286
+ 'options' => array(
287
+ 'true' => __( 'Show', 'testimonial-free' ),
288
+ 'false' => __( 'Hide', 'testimonial-free' ),
289
+ 'hide_on_mobile' => __( 'Hide on Mobile', 'testimonial-free' ),
290
+ ),
291
+ 'default' => 'true',
292
+ ),
293
+ array(
294
+ 'id' => 'pagination_color',
295
+ 'type' => 'color',
296
+ 'title' => __( 'Dots Color', 'testimonial-free' ),
297
+ 'subtitle' => __( 'Set the pagination dots color.', 'testimonial-free' ),
298
+ 'default' => '#cccccc',
299
+ 'dependency' => array(
300
+ 'pagination',
301
+ 'any',
302
+ 'true,hide_on_mobile',
303
+ ),
304
+ ),
305
+ array(
306
+ 'id' => 'pagination_active_color',
307
+ 'type' => 'color',
308
+ 'title' => __( 'Active Color', 'testimonial-free' ),
309
+ 'subtitle' => __( 'Set the pagination active color.', 'testimonial-free' ),
310
+ 'default' => '#52b3d9',
311
+ 'dependency' => array(
312
+ 'pagination',
313
+ 'any',
314
+ 'true,hide_on_mobile',
315
+ ),
316
+ ),
317
+ array(
318
+ 'type' => 'subheading',
319
+ 'content' => __( 'Misc. Settings', 'testimonial-free' ),
320
+ ),
321
+ array(
322
+ 'id' => 'adaptive_height',
323
+ 'type' => 'switcher',
324
+ 'title' => __( 'Adaptive Height', 'testimonial-free' ),
325
+ 'subtitle' => __( 'On/Off adaptive height for the slider.', 'testimonial-free' ),
326
+ 'default' => false,
327
+ ),
328
+ array(
329
+ 'id' => 'slider_swipe',
330
+ 'type' => 'switcher',
331
+ 'title' => __( 'Swipe', 'testimonial-free' ),
332
+ 'subtitle' => __( 'On/Off swipe mode.', 'testimonial-free' ),
333
+ 'default' => true,
334
+ ),
335
+ array(
336
+ 'id' => 'slider_draggable',
337
+ 'type' => 'switcher',
338
+ 'title' => __( 'Mouse Draggable', 'testimonial-free' ),
339
+ 'subtitle' => __( 'On/Off mouse draggable mode.', 'testimonial-free' ),
340
+ 'default' => true,
341
+ 'dependency' => array( 'slider_swipe', '==', 'true' ),
342
+ ),
343
+ array(
344
+ 'id' => 'rtl_mode',
345
+ 'type' => 'switcher',
346
+ 'title' => __( 'RTL', 'testimonial-free' ),
347
+ 'subtitle' => __( 'On/Off right to left mode.', 'testimonial-free' ),
348
+ 'default' => false,
349
+ ),
350
+ array(
351
+ 'type' => 'submessage',
352
+ 'style' => 'danger',
353
+ 'content' => __( 'To make the RTL Mode work, please select an rtl language in the dashboard e.g. Arabic, Hebrew.', 'testimonial-free' ),
354
+ 'dependency' => array( 'rtl_mode', '==', 'true' ),
355
+ ),
356
+
357
+ ),
358
+ )
359
+ );
360
+
361
+ //
362
+ // Stylization section.
363
+ //
364
+ SPFTESTIMONIAL::createSection(
365
+ $prefix_shortcode_opts, array(
366
+ 'title' => __( 'Stylization', 'testimonial-free' ),
367
+ 'icon' => 'fa fa-paint-brush',
368
+ 'fields' => array(
369
+
370
+ array(
371
+ 'id' => 'section_title',
372
+ 'type' => 'switcher',
373
+ 'title' => __( 'Section Title', 'testimonial-free' ),
374
+ 'subtitle' => __( 'Show/Hide the shortcode title as testimonial section title e.g. What Our Customers Saying.', 'testimonial-free' ),
375
+ 'default' => false,
376
+ ),
377
+ array(
378
+ 'id' => 'testimonial_title',
379
+ 'type' => 'switcher',
380
+ 'title' => __( 'Testimonial Title', 'testimonial-free' ),
381
+ 'subtitle' => __( 'Show/Hide testimonial tagline or title.', 'testimonial-free' ),
382
+ 'default' => true,
383
+ ),
384
+ array(
385
+ 'type' => 'subheading',
386
+ 'content' => __( 'Testimonial Content Settings', 'testimonial-free' ),
387
+ ),
388
+ array(
389
+ 'id' => 'testimonial_text',
390
+ 'type' => 'switcher',
391
+ 'title' => __( 'Testimonial Content', 'testimonial-free' ),
392
+ 'subtitle' => __( 'Show/Hide testimonial content.', 'testimonial-free' ),
393
+ 'default' => true,
394
+ ),
395
+ array(
396
+ 'type' => 'subheading',
397
+ 'content' => __( 'Reviewer Information Settings', 'testimonial-free' ),
398
+ ),
399
+ array(
400
+ 'id' => 'testimonial_client_name',
401
+ 'type' => 'switcher',
402
+ 'title' => __( 'Name', 'testimonial-free' ),
403
+ 'subtitle' => __( 'Show/Hide reviewer name.', 'testimonial-free' ),
404
+ 'default' => true,
405
+ ),
406
+ array(
407
+ 'id' => 'testimonial_client_rating',
408
+ 'type' => 'switcher',
409
+ 'title' => __( 'Star Rating', 'testimonial-free' ),
410
+ 'subtitle' => __( 'Show/Hide star ratings.', 'testimonial-free' ),
411
+ 'default' => true,
412
+ ),
413
+ array(
414
+ 'id' => 'testimonial_client_rating_color',
415
+ 'type' => 'color',
416
+ 'title' => __( 'Star Rating Color', 'testimonial-free' ),
417
+ 'subtitle' => __( 'Set color for star rating.', 'testimonial-free' ),
418
+ 'default' => '#f3bb00',
419
+ 'dependency' => array( 'testimonial_client_rating', '==', 'true' ),
420
+ ),
421
+ array(
422
+ 'id' => 'client_designation',
423
+ 'type' => 'switcher',
424
+ 'title' => __( 'Identity or Position', 'testimonial-free' ),
425
+ 'subtitle' => __( 'Show/Hide identity or position.', 'testimonial-free' ),
426
+ 'default' => true,
427
+ ),
428
+
429
+ ),
430
+ )
431
+ );
432
+
433
+ //
434
+ // Typography section.
435
+ //
436
+ SPFTESTIMONIAL::createSection(
437
+ $prefix_shortcode_opts, array(
438
+ 'title' => __( 'Typography', 'testimonial-free' ),
439
+ 'icon' => 'fa fa-font',
440
+ 'fields' => array(
441
+ array(
442
+ 'type' => 'notice',
443
+ 'style' => 'normal',
444
+ 'content' => __( 'The Following Typography (900+ Google Fonts) options are available in the <a href="https://shapedplugin.com/plugin/testimonial-pro/" target="_blank">Pro Version</a> only except color fields.', 'testimonial-free' ),
445
+ ),
446
+ array(
447
+ 'id' => 'section_title_font_load',
448
+ 'type' => 'switcher',
449
+ 'title' => __( 'Load Section Title Font', 'testimonial-free' ),
450
+ 'subtitle' => __( 'On/Off google font for the section title.', 'testimonial-free' ),
451
+ 'class' => 'sp-testimonial-font-load',
452
+ 'default' => true,
453
+ ),
454
+ array(
455
+ 'id' => 'section_title_typography',
456
+ 'type' => 'typography',
457
+ 'title' => __( 'Section Title Font', 'testimonial-free' ),
458
+ 'subtitle' => __( 'Set testimonial section title font properties.', 'testimonial-free' ),
459
+ 'default' => array(
460
+ 'font-family' => 'Open Sans',
461
+ 'font-weight' => '600',
462
+ 'type' => 'google',
463
+ 'font-size' => '22',
464
+ 'line-height' => '22',
465
+ 'text-align' => 'center',
466
+ 'text-transform' => 'none',
467
+ 'letter-spacing' => 0,
468
+ 'color' => '#444444',
469
+ ),
470
+ 'preview' => true,
471
+ 'preview_text' => 'What Our Customers Saying', // Replace preview text with any text you like.
472
+ ),
473
+ array(
474
+ 'id' => 'testimonial_title_font_load',
475
+ 'type' => 'switcher',
476
+ 'title' => __( 'Load Testimonial Title Font', 'testimonial-free' ),
477
+ 'subtitle' => __( 'On/Off google font for the testimonial tagline or title.', 'testimonial-free' ),
478
+ 'class' => 'sp-testimonial-font-load',
479
+ 'default' => true,
480
+ ),
481
+ array(
482
+ 'id' => 'testimonial_title_typography',
483
+ 'type' => 'typography',
484
+ 'title' => __( 'Testimonial Title Font', 'testimonial-free' ),
485
+ 'subtitle' => __( 'Set testimonial tagline or title font properties.', 'testimonial-free' ),
486
+ 'default' => array(
487
+ 'font-family' => 'Open Sans',
488
+ 'font-weight' => '600',
489
+ 'type' => 'google',
490
+ 'font-size' => '20',
491
+ 'line-height' => '30',
492
+ 'text-align' => 'center',
493
+ 'text-transform' => 'none',
494
+ 'letter-spacing' => 0,
495
+ 'color' => '#333333',
496
+ ),
497
+ 'preview' => true,
498
+ 'preview_text' => 'The Testimonial Title', // Replace preview text with any text you like.
499
+ ),
500
+ array(
501
+ 'id' => 'testimonial_text_font_load',
502
+ 'type' => 'switcher',
503
+ 'title' => __( 'Load Testimonial Content Font', 'testimonial-free' ),
504
+ 'subtitle' => __( 'On/Off google font for the testimonial content.', 'testimonial-free' ),
505
+ 'class' => 'sp-testimonial-font-load',
506
+ 'default' => true,
507
+ ),
508
+ array(
509
+ 'id' => 'testimonial_text_typography',
510
+ 'type' => 'typography',
511
+ 'title' => __( 'Testimonial Content Font', 'testimonial-free' ),
512
+ 'subtitle' => __( 'Set testimonial content font properties.', 'testimonial-free' ),
513
+ 'default' => array(
514
+ 'font-family' => 'Open Sans',
515
+ 'font-weight' => 'normal',
516
+ 'type' => 'google',
517
+ 'font-size' => '16',
518
+ 'line-height' => '26',
519
+ 'text-align' => 'center',
520
+ 'text-transform' => 'none',
521
+ 'letter-spacing' => 0,
522
+ 'color' => '#333333',
523
+ ),
524
+ 'color' => true,
525
+ 'preview' => true,
526
+ ),
527
+ array(
528
+ 'id' => 'client_name_font_load',
529
+ 'type' => 'switcher',
530
+ 'title' => __( 'Load Name Font', 'testimonial-free' ),
531
+ 'subtitle' => __( 'On/Off google font for the name.', 'testimonial-free' ),
532
+ 'class' => 'sp-testimonial-font-load',
533
+ 'default' => true,
534
+ ),
535
+ array(
536
+ 'id' => 'client_name_typography',
537
+ 'type' => 'typography',
538
+ 'title' => __( 'Name Font', 'testimonial-free' ),
539
+ 'subtitle' => __( 'Set name font properties.', 'testimonial-free' ),
540
+ 'default' => array(
541
+ 'font-family' => 'Open Sans',
542
+ 'font-weight' => '700',
543
+ 'type' => 'google',
544
+ 'font-size' => '16',
545
+ 'line-height' => '24',
546
+ 'text-align' => 'center',
547
+ 'text-transform' => 'none',
548
+ 'letter-spacing' => 0,
549
+ 'color' => '#333333',
550
+ ),
551
+ 'color' => true,
552
+ 'preview' => true,
553
+ 'preview_text' => 'Jacob Firebird', // Replace preview text with any text you like.
554
+ ),
555
+ array(
556
+ 'id' => 'designation_company_font_load',
557
+ 'type' => 'switcher',
558
+ 'title' => __( 'Load Identity or Position & Company Name Font', 'testimonial-free' ),
559
+ 'subtitle' => __( 'On/Off google font for the identity or position & company name.', 'testimonial-free' ),
560
+ 'class' => 'sp-testimonial-font-load',
561
+ 'default' => true,
562
+ ),
563
+ array(
564
+ 'id' => 'client_designation_company_typography',
565
+ 'type' => 'typography',
566
+ 'title' => __( 'Identity or Position & Company Name Font', 'testimonial-free' ),
567
+ 'subtitle' => __( 'Set identity or position & company name font properties.', 'testimonial-free' ),
568
+ 'default' => array(
569
+ 'font-family' => 'Open Sans',
570
+ 'font-weight' => 'normal',
571
+ 'type' => 'google',
572
+ 'font-size' => '16',
573
+ 'line-height' => '24',
574
+ 'text-align' => 'center',
575
+ 'text-transform' => 'none',
576
+ 'letter-spacing' => 0,
577
+ 'color' => '#444444',
578
+ ),
579
+ 'color' => true,
580
+ 'preview' => true,
581
+ 'preview_text' => 'CEO - Firebird Media Inc.', // Replace preview text with any text you like.
582
+ ),
583
+ array(
584
+ 'id' => 'location_font_load',
585
+ 'type' => 'switcher',
586
+ 'title' => __( 'Load Location Font', 'testimonial-free' ),
587
+ 'subtitle' => __( 'On/Off google font for the location.', 'testimonial-free' ),
588
+ 'class' => 'sp-testimonial-font-load',
589
+ 'default' => true,
590
+ ),
591
+ array(
592
+ 'id' => 'client_location_typography',
593
+ 'type' => 'typography',
594
+ 'title' => __( 'Location Font', 'testimonial-free' ),
595
+ 'subtitle' => __( 'Set location font properties.', 'testimonial-free' ),
596
+ 'class' => 'sp-testimonial-font-color',
597
+ 'default' => array(
598
+ 'font-family' => 'Open Sans',
599
+ 'font-weight' => 'normal',
600
+ 'type' => 'google',
601
+ 'font-size' => '15',
602
+ 'line-height' => '20',
603
+ 'text-align' => 'center',
604
+ 'text-transform' => 'none',
605
+ 'letter-spacing' => 0,
606
+ 'color' => '#444444',
607
+ ),
608
+ 'color' => true,
609
+ 'preview' => true,
610
+ 'preview_text' => 'Los Angeles', // Replace preview text with any text you like.
611
+ ),
612
+ array(
613
+ 'id' => 'phone_font_load',
614
+ 'type' => 'switcher',
615
+ 'title' => __( 'Load Phone or Mobile Font', 'testimonial-free' ),
616
+ 'subtitle' => __( 'On/Off google font for the phone or mobile.', 'testimonial-free' ),
617
+ 'class' => 'sp-testimonial-font-load',
618
+ 'default' => true,
619
+ ),
620
+ array(
621
+ 'id' => 'client_phone_typography',
622
+ 'type' => 'typography',
623
+ 'title' => __( 'Phone or Mobile Font', 'testimonial-free' ),
624
+ 'subtitle' => __( 'Set phone or mobile font properties.', 'testimonial-free' ),
625
+ 'class' => 'sp-testimonial-font-color',
626
+ 'default' => array(
627
+ 'font-family' => 'Open Sans',
628
+ 'font-weight' => 'normal',
629
+ 'type' => 'google',
630
+ 'font-size' => '15',
631
+ 'line-height' => '20',
632
+ 'text-align' => 'center',
633
+ 'text-transform' => 'none',
634
+ 'letter-spacing' => 0,
635
+ 'color' => '#444444',
636
+ ),
637
+ 'color' => true,
638
+ 'preview' => true,
639
+ 'preview_text' => '+1 234567890', // Replace preview text with any text you like.
640
+ ),
641
+ array(
642
+ 'id' => 'email_font_load',
643
+ 'type' => 'switcher',
644
+ 'title' => __( 'Load Email Address Font', 'testimonial-free' ),
645
+ 'subtitle' => __( 'On/Off google font for the email address.', 'testimonial-free' ),
646
+ 'class' => 'sp-testimonial-font-load',
647
+ 'default' => true,
648
+ ),
649
+ array(
650
+ 'id' => 'client_email_typography',
651
+ 'type' => 'typography',
652
+ 'title' => __( 'Email Address Font', 'testimonial-free' ),
653
+ 'subtitle' => __( 'Set email address font properties.', 'testimonial-free' ),
654
+ 'class' => 'sp-testimonial-font-color',
655
+ 'default' => array(
656
+ 'font-family' => 'Open Sans',
657
+ 'font-weight' => 'normal',
658
+ 'type' => 'google',
659
+ 'font-size' => '15',
660
+ 'line-height' => '20',
661
+ 'text-align' => 'center',
662
+ 'text-transform' => 'none',
663
+ 'letter-spacing' => 0,
664
+ 'color' => '#444444',
665
+ ),
666
+ 'color' => true,
667
+ 'preview' => true,
668
+ 'preview_text' => 'mail@yourwebsite.com', // Replace preview text with any text you like.
669
+ ),
670
+ array(
671
+ 'id' => 'date_font_load',
672
+ 'type' => 'switcher',
673
+ 'title' => __( 'Load Date Font', 'testimonial-free' ),
674
+ 'subtitle' => __( 'On/Off google font for the date.', 'testimonial-free' ),
675
+ 'class' => 'sp-testimonial-font-load',
676
+ 'default' => true,
677
+ ),
678
+ array(
679
+ 'id' => 'testimonial_date_typography',
680
+ 'type' => 'typography',
681
+ 'title' => __( 'Date Font', 'testimonial-free' ),
682
+ 'subtitle' => __( 'Set date font properties.', 'testimonial-free' ),
683
+ 'class' => 'sp-testimonial-font-color',
684
+ 'default' => array(
685
+ 'font-family' => 'Open Sans',
686
+ 'font-weight' => 'normal',
687
+ 'type' => 'google',
688
+ 'font-size' => '15',
689
+ 'line-height' => '20',
690
+ 'text-align' => 'center',
691
+ 'text-transform' => 'none',
692
+ 'letter-spacing' => 0,
693
+ 'color' => '#444444',
694
+ ),
695
+ 'color' => true,
696
+ 'preview' => true,
697
+ 'preview_text' => 'February 21, 2018', // Replace preview text with any text you like.
698
+ ),
699
+ array(
700
+ 'id' => 'website_font_load',
701
+ 'type' => 'switcher',
702
+ 'title' => __( 'Load Website Font', 'testimonial-free' ),
703
+ 'subtitle' => __( 'On/Off google font for the website.', 'testimonial-free' ),
704
+ 'class' => 'sp-testimonial-font-load',
705
+ 'default' => true,
706
+ ),
707
+ array(
708
+ 'id' => 'client_website_typography',
709
+ 'type' => 'typography',
710
+ 'title' => __( 'Website Font', 'testimonial-free' ),
711
+ 'subtitle' => __( 'Set website font properties.', 'testimonial-free' ),
712
+ 'class' => 'sp-testimonial-font-color',
713
+ 'default' => array(
714
+ 'font-family' => 'Open Sans',
715
+ 'font-weight' => 'normal',
716
+ 'type' => 'google',
717
+ 'font-size' => '15',
718
+ 'line-height' => '20',
719
+ 'text-align' => 'center',
720
+ 'text-transform' => 'none',
721
+ 'letter-spacing' => 0,
722
+ 'color' => '#444444',
723
+ ),
724
+ 'color' => true,
725
+ 'preview' => true,
726
+ 'preview_text' => 'www.yourwebsite.com', // Replace preview text with any text you like.
727
+ ),
728
+ array(
729
+ 'id' => 'filter_font_load',
730
+ 'type' => 'switcher',
731
+ 'title' => __( 'Load Filter Font', 'testimonial-free' ),
732
+ 'subtitle' => __( 'On/Off google font for the filter.', 'testimonial-free' ),
733
+ 'class' => 'sp-testimonial-font-load',
734
+ 'default' => true,
735
+ ),
736
+ array(
737
+ 'id' => 'filter_typography',
738
+ 'type' => 'typography',
739
+ 'title' => __( 'Filter Font', 'testimonial-free' ),
740
+ 'subtitle' => __( 'Set filter font properties.', 'testimonial-free' ),
741
+ 'default' => array(
742
+ 'font-family' => 'Open Sans',
743
+ 'font-weight' => 'normal',
744
+ 'type' => 'google',
745
+ 'font-size' => '15',
746
+ 'line-height' => '20',
747
+ 'text-align' => 'center',
748
+ 'text-transform' => 'none',
749
+ 'letter-spacing' => 0,
750
+ ),
751
+ 'color' => false,
752
+ 'preview' => true,
753
+ 'preview_text' => 'All', // Replace preview text with any text you like.
754
+ ),
755
+
756
+ ),
757
+ )
758
+ );
759
+
760
+ //
761
+ // Upgrade to Pro section.
762
+ //
763
+ SPFTESTIMONIAL::createSection(
764
+ $prefix_shortcode_opts, array(
765
+ 'title' => __( 'Upgrade to Pro', 'testimonial-free' ),
766
+ 'icon' => 'fa fa-rocket',
767
+ 'fields' => array(
768
+ array(
769
+ 'type' => 'upgrade',
770
+ 'content' => 'upgrade',
771
+ ),
772
+
773
+ ),
774
+ )
775
+ );
776
+
777
+ //
778
+ // Metabox of the Testimonial.
779
+ // Set a unique slug-like ID.
780
+ //
781
+ $prefix_testimonial_opts = 'sp_tpro_meta_options';
782
+
783
+ //
784
+ // Testimonial metabox.
785
+ //
786
+ SPFTESTIMONIAL::createMetabox(
787
+ $prefix_testimonial_opts, array(
788
+ 'title' => __( 'Testimonial Options', 'testimonial-free' ),
789
+ 'post_type' => 'spt_testimonial',
790
+ 'context' => 'normal',
791
+ )
792
+ );
793
+
794
+ //
795
+ // Reviewer Information section.
796
+ //
797
+ SPFTESTIMONIAL::createSection(
798
+ $prefix_testimonial_opts, array(
799
+ 'title' => __( 'Reviewer Information', 'testimonial-free' ),
800
+ 'fields' => array(
801
+
802
+ array(
803
+ 'id' => 'tpro_name',
804
+ 'type' => 'text',
805
+ 'title' => __( 'Name', 'testimonial-free' ),
806
+ 'subtitle' => __( 'Type reviewer name here.', 'testimonial-free' ),
807
+ ),
808
+ array(
809
+ 'id' => 'tpro_designation',
810
+ 'type' => 'text',
811
+ 'title' => __( 'Identity or Position', 'testimonial-free' ),
812
+ 'subtitle' => __( 'Type reviewer identity or position here.', 'testimonial-free' ),
813
+ ),
814
+ array(
815
+ 'id' => 'tpro_rating',
816
+ 'type' => 'rating',
817
+ 'title' => __( 'Rating Star', 'testimonial-free' ),
818
+ 'subtitle' => __( 'Rating star along with testimonial.', 'testimonial-free' ),
819
+ 'options' => array(
820
+ 'five_star' => __( '5 Stars', 'testimonial-free' ),
821
+ 'four_star' => __( '4 Stars', 'testimonial-free' ),
822
+ 'three_star' => __( '3 Stars', 'testimonial-free' ),
823
+ 'two_star' => __( '2 Stars', 'testimonial-free' ),
824
+ 'one_star' => __( '1 Star', 'testimonial-free' ),
825
+ ),
826
+ 'default' => '',
827
+ ),
828
+
829
+ ),
830
+ )
831
+ );
832
+
833
+ //
834
+ // Social Profiles section.
835
+ //
836
+ SPFTESTIMONIAL::createSection(
837
+ $prefix_testimonial_opts, array(
838
+ 'title' => __( 'Social Profiles', 'testimonial-free' ),
839
+ 'fields' => array(
840
+ array(
841
+ 'type' => 'notice',
842
+ 'style' => 'normal',
843
+ 'content' => __( 'The Social Profile options are available in the <a href="https://shapedplugin.com/plugin/testimonial-pro" target="_blank">Pro Version</a> only.', 'testimonial-free' ),
844
+ ),
845
+ array(
846
+ 'id' => 'tpro_social_facebook_url',
847
+ 'type' => 'text_f',
848
+ 'title' => __( 'Facebook', 'testimonial-free' ),
849
+ 'subtitle' => __( 'Type facebook URL here.', 'testimonial-free' ),
850
+ ),
851
+ array(
852
+ 'id' => 'tpro_social_twitter_url',
853
+ 'type' => 'text_f',
854
+ 'title' => __( 'Twitter', 'testimonial-free' ),
855
+ 'subtitle' => __( 'Type twitter URL here.', 'testimonial-free' ),
856
+ ),
857
+ array(
858
+ 'id' => 'tpro_social_linked_in_url',
859
+ 'type' => 'text_f',
860
+ 'title' => __( 'LinkedIn', 'testimonial-free' ),
861
+ 'subtitle' => __( 'Type linkedin URL here.', 'testimonial-free' ),
862
+ ),
863
+ array(
864
+ 'id' => 'tpro_social_instagram_url',
865
+ 'type' => 'text_f',
866
+ 'title' => __( 'Instagram', 'testimonial-free' ),
867
+ 'subtitle' => __( 'Type Instagram URL here.', 'testimonial-free' ),
868
+ ),
869
+ array(
870
+ 'id' => 'tpro_social_youtube_url',
871
+ 'type' => 'text_f',
872
+ 'title' => __( 'YouTube', 'testimonial-free' ),
873
+ 'subtitle' => __( 'Type youtube URL here.', 'testimonial-free' ),
874
+ ),
875
+ array(
876
+ 'id' => 'tpro_social_pinterest_url',
877
+ 'type' => 'text_f',
878
+ 'title' => __( 'Pinterest', 'testimonial-free' ),
879
+ 'subtitle' => __( 'Type pinterest URL here.', 'testimonial-free' ),
880
+ ),
881
+ array(
882
+ 'id' => 'tpro_social_skype_url',
883
+ 'type' => 'text_f',
884
+ 'title' => __( 'Skype', 'testimonial-free' ),
885
+ 'subtitle' => __( 'Type skype URL here.', 'testimonial-free' ),
886
+ ),
887
+ array(
888
+ 'id' => 'tpro_social_stumble_upon_url',
889
+ 'type' => 'text_f',
890
+ 'title' => __( 'StumbleUpon', 'testimonial-free' ),
891
+ 'subtitle' => __( 'Type stumbleupon URL here.', 'testimonial-free' ),
892
+ ),
893
+ array(
894
+ 'id' => 'tpro_social_reddit_url',
895
+ 'type' => 'text_f',
896
+ 'title' => __( 'Reddit', 'testimonial-free' ),
897
+ 'subtitle' => __( 'Type reddit URL here.', 'testimonial-free' ),
898
+ ),
899
+ array(
900
+ 'id' => 'tpro_social_dribbble_url',
901
+ 'type' => 'text_f',
902
+ 'title' => __( 'Dribbble', 'testimonial-free' ),
903
+ 'subtitle' => __( 'Type dribbble URL here.', 'testimonial-free' ),
904
+ ),
905
+ array(
906
+ 'id' => 'tpro_social_snapchat_url',
907
+ 'type' => 'text_f',
908
+ 'title' => __( 'SnapChat', 'testimonial-free' ),
909
+ 'subtitle' => __( 'Type snapchat URL here.', 'testimonial-free' ),
910
+ ),
911
+
912
+ ),
913
+ )
914
+ );
admin/views/testimonial-settings.php ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+
4
+ // //
5
+ // // Set a unique slug-like ID.
6
+ // //
7
+ // $prefix = '_sp_options';
8
+
9
+ // //
10
+ // // Create a settings page.
11
+ // //
12
+ // SPFTESTIMONIAL::createOptions(
13
+ // $prefix, array(
14
+ // 'menu_title' => __( 'Settings', 'testimonial-pro' ),
15
+ // 'menu_parent' => 'edit.php?post_type=spt_testimonial',
16
+ // 'menu_type' => 'submenu', // menu, submenu, options, theme, etc.
17
+ // 'menu_slug' => 'tpro_settings',
18
+ // 'theme' => 'light',
19
+ // 'show_all_options' => false,
20
+ // 'show_search' => false,
21
+ // 'show_footer' => false,
22
+ // 'framework_title' => __( 'Testimonial Pro Settings', 'testimonial-pro' ),
23
+ // )
24
+ // );
25
+
26
+ // //
27
+ // // Advanced section.
28
+ // //
29
+ // SPFTESTIMONIAL::createSection(
30
+ // $prefix, array(
31
+ // 'name' => 'advanced_settings',
32
+ // 'title' => __( 'Advanced', 'testimonial-pro' ),
33
+ // 'icon' => 'fa fa-cogs',
34
+
35
+ // 'fields' => array(
36
+ // array(
37
+ // 'id' => 'tpro_dequeue_google_fonts',
38
+ // 'type' => 'switcher',
39
+ // 'title' => __( 'Google Fonts', 'testimonial-pro' ),
40
+ // 'subtitle' => __( 'On/off the switch to enqueue/dequeue google fonts.', 'testimonial-pro' ),
41
+ // 'default' => true,
42
+ // ),
43
+ // array(
44
+ // 'id' => 'testimonial_data_remove',
45
+ // 'type' => 'checkbox',
46
+ // 'title' => __( 'Remove Data on Uninstall?', 'testimonial-pro' ),
47
+ // 'after' => __( 'Check this box if you would like Testimonial Pro to completely remove all of its data when the plugin is deleted.', 'testimonial-pro' ),
48
+ // 'default' => false,
49
+ // ),
50
+
51
+ // array(
52
+ // 'type' => 'subheading',
53
+ // 'content' => __( 'Enqueue or Dequeue CSS', 'testimonial-pro' ),
54
+ // ),
55
+ // array(
56
+ // 'id' => 'tpro_dequeue_slick_css',
57
+ // 'type' => 'switcher',
58
+ // 'title' => __( 'Slick CSS', 'testimonial-pro' ),
59
+ // 'subtitle' => __( 'On/off the switch to enqueue/dequeue slick CSS.', 'testimonial-pro' ),
60
+ // 'default' => true,
61
+ // ),
62
+ // array(
63
+ // 'id' => 'tpro_dequeue_fa_css',
64
+ // 'type' => 'switcher',
65
+ // 'title' => __( 'Font Awesome CSS', 'testimonial-pro' ),
66
+ // 'subtitle' => __( 'On/off the switch to enqueue/dequeue font awesome CSS.', 'testimonial-pro' ),
67
+ // 'default' => true,
68
+ // ),
69
+ // array(
70
+ // 'id' => 'tpro_dequeue_magnific_popup_css',
71
+ // 'type' => 'switcher',
72
+ // 'title' => __( 'Magnific Popup CSS', 'testimonial-pro' ),
73
+ // 'subtitle' => __( 'On/off the switch to enqueue/dequeue magnific popup CSS.', 'testimonial-pro' ),
74
+ // 'default' => true,
75
+ // ),
76
+
77
+ // array(
78
+ // 'type' => 'subheading',
79
+ // 'content' => __( 'Enqueue or Dequeue JS', 'testimonial-pro' ),
80
+ // ),
81
+ // array(
82
+ // 'id' => 'tpro_dequeue_slick_js',
83
+ // 'type' => 'switcher',
84
+ // 'title' => __( 'Slick JS', 'testimonial-pro' ),
85
+ // 'subtitle' => __( 'On/off the switch to enqueue/dequeue slick JS.', 'testimonial-pro' ),
86
+ // 'default' => true,
87
+ // ),
88
+ // array(
89
+ // 'id' => 'tpro_dequeue_isotope_js',
90
+ // 'type' => 'switcher',
91
+ // 'title' => __( 'Isotope JS', 'testimonial-pro' ),
92
+ // 'subtitle' => __( 'On/off the switch to enqueue/dequeue isotope JS.', 'testimonial-pro' ),
93
+ // 'default' => true,
94
+ // ),
95
+ // array(
96
+ // 'id' => 'tpro_dequeue_magnific_popup_js',
97
+ // 'type' => 'switcher',
98
+ // 'title' => __( 'Magnific Popup JS', 'testimonial-pro' ),
99
+ // 'subtitle' => __( 'On/off the switch to enqueue/dequeue magnific popup JS.', 'testimonial-pro' ),
100
+ // 'default' => true,
101
+ // ),
102
+ // ),
103
+ // )
104
+ // );
105
+
106
+ // //
107
+ // // Custom CSS section.
108
+ // //
109
+ // SPFTESTIMONIAL::createSection(
110
+ // $prefix, array(
111
+ // 'name' => 'custom_css_section',
112
+ // 'title' => __( 'Custom CSS', 'testimonial-pro' ),
113
+ // 'icon' => 'fa fa-css3',
114
+
115
+ // 'fields' => array(
116
+ // array(
117
+ // 'id' => 'custom_css',
118
+ // 'type' => 'code_editor',
119
+ // 'settings' => array(
120
+ // 'theme' => 'dracula',
121
+ // 'mode' => 'css',
122
+ // ),
123
+ // 'title' => __( 'Custom CSS', 'testimonial-pro' ),
124
+ // 'subtitle' => __( 'Type your CSS.', 'testimonial-pro' ),
125
+ // ),
126
+ // ),
127
+ // )
128
+ // );
admin/views/tp-metabox/assets/css/spftestimonial-rtl.css ADDED
@@ -0,0 +1,381 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ *
3
+ * ---------------------------------------------------------
4
+ * CODESTAR FRAMEWORK RTL CSS MAP
5
+ * ---------------------------------------------------------
6
+ *
7
+ * 01. Base
8
+ * 01. 01. Header
9
+ * 01. 02. Header Buttons
10
+ * 01. 03. Navigation
11
+ * 01. 04. Content
12
+ * 01. 05. Section
13
+ * 01. 06. Show All Options
14
+ * 01. 07. Search Input
15
+ * 01. 08. Copyright
16
+ * 01. 09. Metabox
17
+ * 02. Fields
18
+ * 02. 01. Field: typography
19
+ * 02. 02. Field: checkbox, radio
20
+ * 02. 03. Field: switcher
21
+ * 02. 07. Field: help
22
+ * 02. 11. Field: tabbed
23
+ * 02. 13. Field: notice
24
+ * 02. 14. Field: spacing
25
+ * 02. 15. Field: background
26
+ * 02. 16. Field: spinner
27
+ * 02. 18. Field: button_set
28
+ * 02. 20. Field: color_group
29
+ * 03. Taxonomy
30
+ * 04. Profile
31
+ * 05. Modal
32
+ * 06. Customizer
33
+ * 07. Responsive
34
+ * 08. Others
35
+ *
36
+ * ---------------------------------------------------------
37
+ *
38
+ */
39
+ /**
40
+ * 01. Base
41
+ */
42
+ .spftestimonial {
43
+ margin-left: 20px;
44
+ margin-right: 0;
45
+ }
46
+
47
+ /**
48
+ * 01. 01. Header
49
+ */
50
+ .spftestimonial-header h1 {
51
+ float: right;
52
+ }
53
+ .spftestimonial-header fieldset {
54
+ float: left;
55
+ }
56
+
57
+ /**
58
+ * 01. 02. Header Buttons
59
+ */
60
+ .spftestimonial-buttons {
61
+ float: left;
62
+ direction: ltr;
63
+ }
64
+
65
+ .spftestimonial-header-left {
66
+ float: right;
67
+ }
68
+
69
+ .spftestimonial-header-right {
70
+ float: left;
71
+ }
72
+
73
+ /**
74
+ * 01. 03. Navigation
75
+ */
76
+ .spftestimonial-nav {
77
+ float: right;
78
+ }
79
+ .spftestimonial-nav ul {
80
+ clear: right;
81
+ }
82
+ .spftestimonial-nav ul li .spftestimonial-section-active:after {
83
+ right: auto;
84
+ left: 0;
85
+ border-left-color: #fff;
86
+ border-right-color: transparent;
87
+ }
88
+ .spftestimonial-nav ul li .spftestimonial-arrow:after {
89
+ content: "\f053";
90
+ right: auto;
91
+ left: 10px;
92
+ }
93
+ .spftestimonial-nav ul li.spftestimonial-tab-active .spftestimonial-arrow:after {
94
+ -moz-transform: rotate(-90deg);
95
+ -ms-transform: rotate(-90deg);
96
+ -webkit-transform: rotate(-90deg);
97
+ transform: rotate(-90deg);
98
+ }
99
+ .spftestimonial-nav ul ul li a {
100
+ padding-right: 25px;
101
+ padding-left: 15px;
102
+ }
103
+ .spftestimonial-nav ul ul:before {
104
+ left: auto;
105
+ right: 15px;
106
+ }
107
+ .spftestimonial-nav .fa {
108
+ margin-left: 5px;
109
+ margin-right: 0;
110
+ }
111
+
112
+ .spftestimonial-nav-background {
113
+ left: auto;
114
+ right: 0;
115
+ }
116
+
117
+ /**
118
+ * 01. 04. Content
119
+ */
120
+ .spftestimonial-content {
121
+ margin-left: 0;
122
+ margin-right: 225px;
123
+ }
124
+
125
+ /**
126
+ * 01. 05. Section
127
+ */
128
+ .spftestimonial-sections {
129
+ float: right;
130
+ }
131
+
132
+ /**
133
+ * 01. 06. Show all options
134
+ */
135
+ .spftestimonial-show-all .spftestimonial-content {
136
+ margin-right: 0;
137
+ overflow: hidden;
138
+ }
139
+
140
+ .spftestimonial-expand-all {
141
+ float: right;
142
+ right: auto;
143
+ left: 40px;
144
+ margin-right: 0;
145
+ margin-left: 4px;
146
+ }
147
+
148
+ /**
149
+ * 01. 07. Search Input
150
+ */
151
+ .spftestimonial-search {
152
+ float: right;
153
+ }
154
+ .spftestimonial-search input {
155
+ margin: 0 0 0 5px;
156
+ }
157
+
158
+ /**
159
+ * 01. 08. Copyright
160
+ */
161
+ .spftestimonial-copyright {
162
+ float: right;
163
+ }
164
+
165
+ /**
166
+ * 01. 09. Metabox
167
+ */
168
+ .spftestimonial-metabox {
169
+ margin: -6px -12px -12px -12px;
170
+ }
171
+ .spftestimonial-metabox .spftestimonial-section-title {
172
+ padding: 20px;
173
+ }
174
+ .spftestimonial-metabox .spftestimonial-section-title .fa {
175
+ margin-left: 5px;
176
+ margin-right: 0;
177
+ }
178
+
179
+ .spftestimonial-section-title .fa {
180
+ margin-left: 5px;
181
+ margin-right: 0;
182
+ }
183
+
184
+ /**
185
+ * 02. Fields
186
+ */
187
+ .spftestimonial-field .spftestimonial-title {
188
+ float: right;
189
+ }
190
+ .spftestimonial-field .spftestimonial-fieldset {
191
+ margin-left: 0;
192
+ margin-right: 30%;
193
+ }
194
+
195
+ .spftestimonial-pseudo-field {
196
+ padding: 0 0 0 5px !important;
197
+ }
198
+
199
+ /**
200
+ * 02. 01. Field: typography
201
+ */
202
+ .spftestimonial-field-typography select {
203
+ margin: 0;
204
+ width: 100%;
205
+ }
206
+ .spftestimonial-field-typography .spftestimonial--blocks-inputs .spftestimonial--blocks {
207
+ flex-direction: row-reverse;
208
+ }
209
+
210
+ /**
211
+ * 02. 02. Field: checkbox, radio
212
+ */
213
+ .spftestimonial-field-checkbox .spftestimonial--inline-list li,
214
+ .spftestimonial-field-radio .spftestimonial--inline-list li {
215
+ margin-right: 0;
216
+ margin-left: 15px;
217
+ }
218
+
219
+ /**
220
+ * 02. 03. Field: switcher
221
+ */
222
+ .spftestimonial-field-switcher .spftestimonial--switcher {
223
+ float: right;
224
+ }
225
+ .spftestimonial-field-switcher .spftestimonial--label {
226
+ float: right;
227
+ margin-left: 0;
228
+ margin-right: 5px;
229
+ }
230
+
231
+ /**
232
+ * 02. 07. Field: help
233
+ */
234
+ .spftestimonial-help {
235
+ right: auto;
236
+ left: 5px;
237
+ }
238
+
239
+ /**
240
+ * 02. 13. Field: notice
241
+ */
242
+ .spftestimonial-notice {
243
+ border-left: none;
244
+ border-right-style: solid;
245
+ border-right-width: 4px;
246
+ }
247
+
248
+ /**
249
+ * 02. 14. Field: spacing
250
+ */
251
+ .spftestimonial-field-spacing .spftestimonial--input {
252
+ float: right;
253
+ margin-right: 0;
254
+ margin-left: 15px;
255
+ }
256
+ .spftestimonial-field-spacing .spftestimonial--left {
257
+ float: right;
258
+ }
259
+
260
+ /**
261
+ * 02. 16. Field: spinner
262
+ */
263
+ .spftestimonial-field-spinner .spftestimonial--spin {
264
+ float: right;
265
+ }
266
+
267
+ /**
268
+ * 02. 18. Field: button_set
269
+ */
270
+ .spftestimonial-field-button_set .spftestimonial--button-group {
271
+ float: right;
272
+ }
273
+
274
+ /**
275
+ * 02. 20. Field: color_group
276
+ */
277
+ .spftestimonial-field-color_group .spftestimonial--left {
278
+ float: right;
279
+ margin-right: 0;
280
+ margin-left: 10px;
281
+ }
282
+
283
+ /**
284
+ * 03. Taxonomy
285
+ */
286
+ .spftestimonial-taxonomy-add-fields .spftestimonial-fieldset {
287
+ margin-right: 0;
288
+ }
289
+ .spftestimonial-taxonomy-add-fields .spftestimonial-field > .spftestimonial-fieldset > .spftestimonial-help {
290
+ left: -5px;
291
+ right: auto;
292
+ }
293
+
294
+ .spftestimonial-taxonomy-edit-fields .spftestimonial-fieldset {
295
+ margin-left: 0;
296
+ margin-right: 225px;
297
+ }
298
+ .spftestimonial-taxonomy-edit-fields .spftestimonial-field > .spftestimonial-fieldset > .spftestimonial-help {
299
+ right: auto;
300
+ left: -5px;
301
+ }
302
+
303
+ /**
304
+ * 04. Profile
305
+ */
306
+ .spftestimonial-profile > h2 > .fa {
307
+ padding-right: 0;
308
+ padding-left: 7px;
309
+ }
310
+ .spftestimonial-profile > .spftestimonial-field > .spftestimonial-fieldset {
311
+ margin-left: 0;
312
+ margin-right: 220px;
313
+ }
314
+ .spftestimonial-profile > .spftestimonial-field > .spftestimonial-help {
315
+ left: 0;
316
+ right: auto;
317
+ }
318
+
319
+ .spftestimonial-taxonomy-edit-fields .spftestimonial-fieldset {
320
+ margin-left: 0;
321
+ margin-right: 225px;
322
+ }
323
+ .spftestimonial-taxonomy-edit-fields .spftestimonial-field > .spftestimonial-fieldset > .spftestimonial-help {
324
+ right: auto;
325
+ left: -5px;
326
+ }
327
+
328
+ /**
329
+ * 05. Modal
330
+ */
331
+ .spftestimonial-modal-content .spftestimonial-field {
332
+ padding: 15px 15px 15px 30px;
333
+ }
334
+
335
+ .spftestimonial-modal-title {
336
+ padding: 0 16px 0 36px;
337
+ }
338
+
339
+ .spftestimonial-modal-close {
340
+ right: auto;
341
+ left: 0;
342
+ }
343
+
344
+ /**
345
+ * 06. Customizer
346
+ */
347
+ .control-section .spftestimonial-field .spftestimonial-fieldset {
348
+ margin-right: 0;
349
+ }
350
+
351
+ /**
352
+ * 07. Responsive
353
+ */
354
+ @media only screen and (max-width: 1200px) {
355
+ .spftestimonial-metabox .spftestimonial-field .spftestimonial-fieldset {
356
+ margin-left: 0;
357
+ }
358
+ }
359
+ @media only screen and (max-width: 782px) {
360
+ .spftestimonial .spftestimonial-fieldset,
361
+ .spftestimonial .spftestimonial-content {
362
+ margin-right: 0;
363
+ }
364
+ }
365
+ /**
366
+ * 08. Others
367
+ */
368
+ .spftestimonial-field .spftestimonial--transparent-slider {
369
+ margin-left: 0;
370
+ margin-right: 2px;
371
+ }
372
+ .spftestimonial-field .spftestimonial--transparent-slider .ui-slider-handle {
373
+ margin: 0 -11px;
374
+ }
375
+ .spftestimonial-field .spftestimonial--transparent-offset {
376
+ background-position: center right;
377
+ }
378
+ .spftestimonial-field .spftestimonial--transparent-text {
379
+ right: auto;
380
+ left: 10px;
381
+ }
admin/views/tp-metabox/assets/css/spftestimonial-rtl.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .spftestimonial{margin-left:20px;margin-right:0}.spftestimonial-header h1{float:right}.spftestimonial-header fieldset{float:left}.spftestimonial-buttons{float:left;direction:ltr}.spftestimonial-header-left{float:right}.spftestimonial-header-right{float:left}.spftestimonial-nav{float:right}.spftestimonial-nav ul{clear:right}.spftestimonial-nav ul li .spftestimonial-section-active:after{right:auto;left:0;border-left-color:#fff;border-right-color:transparent}.spftestimonial-nav ul li .spftestimonial-arrow:after{content:"\f053";right:auto;left:10px}.spftestimonial-nav ul li.spftestimonial-tab-active .spftestimonial-arrow:after{-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.spftestimonial-nav ul ul li a{padding-right:25px;padding-left:15px}.spftestimonial-nav ul ul:before{left:auto;right:15px}.spftestimonial-nav .fa{margin-left:5px;margin-right:0}.spftestimonial-nav-background{left:auto;right:0}.spftestimonial-content{margin-left:0;margin-right:225px}.spftestimonial-sections{float:right}.spftestimonial-show-all .spftestimonial-content{margin-right:0;overflow:hidden}.spftestimonial-expand-all{float:right;right:auto;left:40px;margin-right:0;margin-left:4px}.spftestimonial-search{float:right}.spftestimonial-search input{margin:0 0 0 5px}.spftestimonial-copyright{float:right}.spftestimonial-metabox{margin:-6px -12px -12px -12px}.spftestimonial-metabox .spftestimonial-section-title{padding:20px}.spftestimonial-metabox .spftestimonial-section-title .fa{margin-left:5px;margin-right:0}.spftestimonial-section-title .fa{margin-left:5px;margin-right:0}.spftestimonial-field .spftestimonial-title{float:right}.spftestimonial-field .spftestimonial-fieldset{margin-left:0;margin-right:30%}.spftestimonial-pseudo-field{padding:0 0 0 5px!important}.spftestimonial-field-typography select{margin:0;width:100%}.spftestimonial-field-typography .spftestimonial--blocks-inputs .spftestimonial--blocks{flex-direction:row-reverse}.spftestimonial-field-checkbox .spftestimonial--inline-list li,.spftestimonial-field-radio .spftestimonial--inline-list li{margin-right:0;margin-left:15px}.spftestimonial-field-switcher .spftestimonial--switcher{float:right}.spftestimonial-field-switcher .spftestimonial--label{float:right;margin-left:0;margin-right:5px}.spftestimonial-help{right:auto;left:5px}.spftestimonial-notice{border-left:none;border-right-style:solid;border-right-width:4px}.spftestimonial-field-spacing .spftestimonial--input{float:right;margin-right:0;margin-left:15px}.spftestimonial-field-spacing .spftestimonial--left{float:right}.spftestimonial-field-spinner .spftestimonial--spin{float:right}.spftestimonial-field-button_set .spftestimonial--button-group{float:right}.spftestimonial-field-color_group .spftestimonial--left{float:right;margin-right:0;margin-left:10px}.spftestimonial-taxonomy-add-fields .spftestimonial-fieldset{margin-right:0}.spftestimonial-taxonomy-add-fields .spftestimonial-field>.spftestimonial-fieldset>.spftestimonial-help{left:-5px;right:auto}.spftestimonial-taxonomy-edit-fields .spftestimonial-fieldset{margin-left:0;margin-right:225px}.spftestimonial-taxonomy-edit-fields .spftestimonial-field>.spftestimonial-fieldset>.spftestimonial-help{right:auto;left:-5px}.spftestimonial-profile>h2>.fa{padding-right:0;padding-left:7px}.spftestimonial-profile>.spftestimonial-field>.spftestimonial-fieldset{margin-left:0;margin-right:220px}.spftestimonial-profile>.spftestimonial-field>.spftestimonial-help{left:0;right:auto}.spftestimonial-taxonomy-edit-fields .spftestimonial-fieldset{margin-left:0;margin-right:225px}.spftestimonial-taxonomy-edit-fields .spftestimonial-field>.spftestimonial-fieldset>.spftestimonial-help{right:auto;left:-5px}.spftestimonial-modal-content .spftestimonial-field{padding:15px 15px 15px 30px}.spftestimonial-modal-title{padding:0 16px 0 36px}.spftestimonial-modal-close{right:auto;left:0}.control-section .spftestimonial-field .spftestimonial-fieldset{margin-right:0}@media only screen and (max-width:1200px){.spftestimonial-metabox .spftestimonial-field .spftestimonial-fieldset{margin-left:0}}@media only screen and (max-width:782px){.spftestimonial .spftestimonial-content,.spftestimonial .spftestimonial-fieldset{margin-right:0}}.spftestimonial-field .spftestimonial--transparent-slider{margin-left:0;margin-right:2px}.spftestimonial-field .spftestimonial--transparent-slider .ui-slider-handle{margin:0 -11px}.spftestimonial-field .spftestimonial--transparent-offset{background-position:center right}.spftestimonial-field .spftestimonial--transparent-text{right:auto;left:10px}
admin/views/tp-metabox/assets/css/spftestimonial.css ADDED
@@ -0,0 +1,3044 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ *
3
+ * ---------------------------------------------------------
4
+ * CODESTAR FRAMEWORK CSS MAP
5
+ * ---------------------------------------------------------
6
+ *
7
+ * 01. Base
8
+ * 01. 01. Header
9
+ * 01. 02. Sticky
10
+ * 01. 03. Header Buttons
11
+ * 01. 04. Navigation
12
+ * 01. 05. Wrapper
13
+ * 01. 06. Content
14
+ * 01. 07. Section
15
+ * 01. 08. Footer
16
+ * 01. 09. Copyright
17
+ * 01. 10. Show All Options
18
+ * 01. 11. Search Input
19
+ * 01. 12. Metabox
20
+ * 01. 13. Help Tooltip
21
+ * 02. Themes
22
+ * 02. 01. Theme Dark
23
+ * 02. 02. Theme Light
24
+ * 03. Fields
25
+ * 03. 01. Field
26
+ * 03. 02. Field: accordion
27
+ * 03. 03. Field: background
28
+ * 03. 04. Field: backup
29
+ * 03. 05. Field: border, spacing, dimensions
30
+ * 03. 06. Field: button_set
31
+ * 03. 07. Field: checkbox, radio
32
+ * 03. 08. Field: code_editor
33
+ * 03. 09. Field: color
34
+ * 03. 10. Field: color_group
35
+ * 03. 11. Field: fieldset
36
+ * 03. 12. Field: date
37
+ * 03. 13. Field: gallery
38
+ * 03. 14. Field: group
39
+ * 03. 15. Field: icon
40
+ * 03. 16. Field: image_select
41
+ * 03. 17. Field: link_color
42
+ * 03. 18. Field: media
43
+ * 03. 19. Field: palette
44
+ * 03. 20. Field: repeater
45
+ * 03. 21. Field: select
46
+ * 03. 22. Field: slider
47
+ * 03. 23. Field: sortable
48
+ * 03. 24. Field: sorter
49
+ * 03. 25. Field: spinner
50
+ * 03. 26. Field: switcher
51
+ * 03. 27. Field: tabbed
52
+ * 03. 28. Field: text
53
+ * 03. 29. Field: textarea
54
+ * 03. 30. Field: typography
55
+ * 03. 31. Field: upload
56
+ * 03. 32. Field: wp_editor
57
+ * 03. 33. Field: heading
58
+ * 03. 34. Field: subheading
59
+ * 03. 35. Field: submessage
60
+ * 03. 36. Field: notice
61
+ * 03. 37. Field: others
62
+ * 04. Widget
63
+ * 05. Customizer
64
+ * 06. Taxonomy
65
+ * 07. Profile
66
+ * 08. Modal
67
+ * 09. Helper
68
+ * 11. Responsive
69
+ * 12. Others
70
+ *
71
+ * ---------------------------------------------------------
72
+ *
73
+ */
74
+ /**
75
+ * 01. Base
76
+ */
77
+ .spftestimonial {
78
+ position: relative;
79
+ }
80
+ .spftestimonial label {
81
+ padding: 0;
82
+ margin: 0;
83
+ display: inline-block;
84
+ }
85
+
86
+ .spftestimonial-ab-icon {
87
+ top: 2px;
88
+ }
89
+ .text-center{
90
+ text-align: center;
91
+ }
92
+
93
+ #screen-meta-links + .spftestimonial-options {
94
+ margin-top: 40px;
95
+ }
96
+
97
+ .spftestimonial-options {
98
+ margin-top: 20px;
99
+ margin-right: 20px;
100
+ }
101
+
102
+ /**
103
+ * 01. 01. Header
104
+ */
105
+ .spftestimonial-header {
106
+ position: relative;
107
+ }
108
+
109
+ .spftestimonial-header-inner {
110
+ padding: 25px;
111
+ }
112
+ .spftestimonial-header-inner h1 {
113
+ color: #444444;
114
+ float: left;
115
+ font-size: 22px;
116
+ line-height: 26px;
117
+ font-weight: 600;
118
+ margin: 0;
119
+ }
120
+ .spftestimonial-header-inner h1 small {
121
+ font-size: 11px;
122
+ font-weight: 500;
123
+ }
124
+
125
+ /**
126
+ * 01. 02. Sticky
127
+ */
128
+ .spftestimonial-sticky .spftestimonial-header-inner {
129
+ position: fixed;
130
+ z-index: 20;
131
+ top: 32px;
132
+ -moz-box-shadow: 0 5px 25px rgba(0, 0, 0, 0.125);
133
+ -webkit-box-shadow: 0 5px 25px rgba(0, 0, 0, 0.125);
134
+ box-shadow: 0 5px 25px rgba(0, 0, 0, 0.125);
135
+ }
136
+
137
+ /**
138
+ * 01. 03. Header Buttons
139
+ */
140
+ .spftestimonial-buttons {
141
+ float: right;
142
+ -moz-transition: opacity 0.2s;
143
+ -o-transition: opacity 0.2s;
144
+ -webkit-transition: opacity 0.2s;
145
+ transition: opacity 0.2s;
146
+ }
147
+ .spftestimonial-buttons .button {
148
+ margin: 0 2px;
149
+ line-height: 26px;
150
+ }
151
+
152
+ .spftestimonial-header-left {
153
+ float: left;
154
+ }
155
+
156
+ .spftestimonial-header-right {
157
+ float: right;
158
+ }
159
+
160
+ /**
161
+ * 01. 04. Navigation
162
+ */
163
+ .spftestimonial-nav {
164
+ display: block;
165
+ position: relative;
166
+ z-index: 10;
167
+ float: left;
168
+ width: 225px;
169
+ }
170
+ .spftestimonial-metabox .spftestimonial-nav {
171
+ position: inherit;
172
+ float: none;
173
+ width: 100%;
174
+ background: #f1f1f1;
175
+ }
176
+ .spftestimonial-nav ul {
177
+ clear: left;
178
+ margin: 0;
179
+ list-style-type: none;
180
+ }
181
+ .spftestimonial-nav ul li {
182
+ margin-bottom: 0;
183
+ }
184
+ .spftestimonial-metabox .spftestimonial-nav ul li {
185
+ display: inline-block;
186
+ }
187
+ .spftestimonial-nav ul li a {
188
+ font-size: 13px;
189
+ position: relative;
190
+ display: block;
191
+ padding: 14px 12px;
192
+ text-transform: uppercase;
193
+ font-weight: 600;
194
+ text-decoration: none;
195
+ -moz-transition: all 0.3s ease;
196
+ -o-transition: all 0.3s ease;
197
+ -webkit-transition: all 0.3s ease;
198
+ transition: all 0.3s ease;
199
+ }
200
+ .spftestimonial-nav ul li a:focus {
201
+ outline: none;
202
+ -moz-box-shadow: none;
203
+ -webkit-box-shadow: none;
204
+ box-shadow: none;
205
+ }
206
+ .spftestimonial-nav ul li .spftestimonial-arrow:after {
207
+ content: "\f054";
208
+ display: inline-block;
209
+ font-family: "FontAwesome";
210
+ font-size: 9px;
211
+ line-height: 1;
212
+ position: absolute;
213
+ right: 10px;
214
+ top: 50%;
215
+ margin-top: -4px;
216
+ -moz-transform: rotate(0);
217
+ -ms-transform: rotate(0);
218
+ -webkit-transform: rotate(0);
219
+ transform: rotate(0);
220
+ }
221
+ .spftestimonial-nav ul li.spftestimonial-tab-active .spftestimonial-arrow:after {
222
+ -moz-transform: rotate(90deg);
223
+ -ms-transform: rotate(90deg);
224
+ -webkit-transform: rotate(90deg);
225
+ transform: rotate(90deg);
226
+ }
227
+ .spftestimonial-nav ul li.spftestimonial-tab-active ul {
228
+ display: block;
229
+ }
230
+ .spftestimonial-nav ul ul {
231
+ display: none;
232
+ position: relative;
233
+ }
234
+ .spftestimonial-nav ul ul li a {
235
+ font-size: 12px;
236
+ padding: 12px 14px 12px 24px;
237
+ }
238
+ .spftestimonial-nav .fa {
239
+ width: 20px;
240
+ margin-right: 5px;
241
+ font-size: 14px;
242
+ text-align: center;
243
+ }
244
+ .spftestimonial-nav .spftestimonial-label-error {
245
+ margin-left: 4px;
246
+ vertical-align: top;
247
+ }
248
+
249
+ .spftestimonial-nav-background {
250
+ position: absolute;
251
+ top: 0;
252
+ left: 0;
253
+ bottom: 0;
254
+ z-index: 9;
255
+ width: 225px;
256
+ }
257
+
258
+ /**
259
+ * 01. 05. Wrapper
260
+ */
261
+ .spftestimonial-wrapper {
262
+ position: relative;
263
+ }
264
+
265
+ /**
266
+ * 01. 06. Content
267
+ */
268
+ .spftestimonial-content {
269
+ position: relative;
270
+ margin-left: 225px;
271
+ background-color: #fff;
272
+ -moz-transition: opacity 0.2s;
273
+ -o-transition: opacity 0.2s;
274
+ -webkit-transition: opacity 0.2s;
275
+ transition: opacity 0.2s;
276
+ }
277
+ .spftestimonial-metabox .spftestimonial-content {
278
+ margin-left: 0;
279
+ }
280
+
281
+ /**
282
+ * 01. 07. Section
283
+ */
284
+ .spftestimonial-sections {
285
+ float: left;
286
+ width: 100%;
287
+ }
288
+
289
+ .spftestimonial-section {
290
+ display: none;
291
+ }
292
+
293
+ .spftestimonial-section-title {
294
+ display: none;
295
+ padding: 20px 30px;
296
+ background-color: #f5f5f5;
297
+ border-top: 1px solid #eee;
298
+ border-bottom: 1px solid #eee;
299
+ }
300
+ .spftestimonial-section-title h3 {
301
+ margin: 0;
302
+ padding: 0;
303
+ font-size: 13px;
304
+ font-weight: bold;
305
+ text-transform: uppercase;
306
+ }
307
+ .spftestimonial-section-title .fa {
308
+ margin-right: 5px;
309
+ }
310
+
311
+ /**
312
+ * 01. 08. Footer
313
+ */
314
+ .spftestimonial-footer {
315
+ padding: 20px;
316
+ font-size: 11px;
317
+ }
318
+
319
+ /**
320
+ * 01. 09. Copyright
321
+ */
322
+ .spftestimonial-copyright {
323
+ float: left;
324
+ margin-top: 5px;
325
+ }
326
+
327
+ /**
328
+ * 01. 10. Show All Options
329
+ */
330
+ .spftestimonial-search-all .spftestimonial-nav-background,
331
+ .spftestimonial-search-all .spftestimonial-nav,
332
+ .spftestimonial-show-all .spftestimonial-nav-background,
333
+ .spftestimonial-show-all .spftestimonial-nav {
334
+ display: none;
335
+ }
336
+ .spftestimonial-search-all .spftestimonial-content,
337
+ .spftestimonial-show-all .spftestimonial-content {
338
+ margin-left: 0;
339
+ }
340
+ .spftestimonial-search-all .spftestimonial-section-title,
341
+ .spftestimonial-search-all .spftestimonial-section,
342
+ .spftestimonial-show-all .spftestimonial-section-title,
343
+ .spftestimonial-show-all .spftestimonial-section {
344
+ display: block !important;
345
+ }
346
+
347
+ .spftestimonial-search-all .spftestimonial-section-title {
348
+ display: none !important;
349
+ }
350
+
351
+ .spftestimonial-expand-all {
352
+ float: left;
353
+ padding: 0 8px;
354
+ margin-right: 4px;
355
+ z-index: 1;
356
+ font-size: 14px;
357
+ line-height: 29px;
358
+ cursor: pointer;
359
+ -webkit-user-select: none;
360
+ user-select: none;
361
+ -moz-border-radius: 2px;
362
+ -webkit-border-radius: 2px;
363
+ border-radius: 2px;
364
+ -moz-transition: all 0.2s;
365
+ -o-transition: all 0.2s;
366
+ -webkit-transition: all 0.2s;
367
+ transition: all 0.2s;
368
+ }
369
+ .spftestimonial-expand-all span {
370
+ font-size: 11px;
371
+ vertical-align: middle;
372
+ }
373
+
374
+ /**
375
+ * 01. 11. Search Input
376
+ */
377
+ .spftestimonial-search {
378
+ float: left;
379
+ }
380
+ .spftestimonial-search input {
381
+ margin: 0 2px 0 0;
382
+ border: none;
383
+ font-size: 12px;
384
+ line-height: 29px;
385
+ text-align: inherit;
386
+ padding: 0 10px;
387
+ -moz-border-radius: 2px;
388
+ -webkit-border-radius: 2px;
389
+ border-radius: 2px;
390
+ -moz-box-shadow: none;
391
+ -webkit-box-shadow: none;
392
+ box-shadow: none;
393
+ }
394
+ .spftestimonial-search input:focus {
395
+ -moz-box-shadow: none;
396
+ -webkit-box-shadow: none;
397
+ box-shadow: none;
398
+ }
399
+
400
+ .spftestimonial-saving .spftestimonial-buttons,
401
+ .spftestimonial-saving .spftestimonial-content {
402
+ cursor: default;
403
+ pointer-events: none;
404
+ opacity: 0.75;
405
+ }
406
+
407
+ /**
408
+ * 01. 12. Metabox
409
+ */
410
+ .spftestimonial-metabox {
411
+ margin: -6px -12px -12px -12px;
412
+ }
413
+ .spftestimonial-metabox .spftestimonial-section-title {
414
+ padding: 20px;
415
+ }
416
+
417
+ .block-editor-page .spftestimonial-metabox {
418
+ margin: -6px -14px -12px -14px;
419
+ }
420
+
421
+ .spftestimonial-metabox-restore {
422
+ text-align: right;
423
+ padding: 10px;
424
+ border-top: 1px solid #eee;
425
+ }
426
+ .spftestimonial-metabox-restore .spftestimonial-button-cancel,
427
+ .spftestimonial-metabox-restore input {
428
+ display: none;
429
+ }
430
+ .spftestimonial-metabox-restore span {
431
+ -webkit-user-select: none;
432
+ user-select: none;
433
+ }
434
+ .spftestimonial-metabox-restore input:checked ~ .spftestimonial-button-restore {
435
+ display: none;
436
+ }
437
+ .spftestimonial-metabox-restore input:checked ~ .spftestimonial-button-cancel {
438
+ display: inline-block;
439
+ }
440
+
441
+ #side-sortables .spftestimonial-section-title {
442
+ padding: 12px;
443
+ }
444
+ #side-sortables .spftestimonial-field {
445
+ padding: 12px;
446
+ }
447
+ #side-sortables .spftestimonial-field .spftestimonial-title {
448
+ float: none;
449
+ width: 100%;
450
+ margin-bottom: 10px;
451
+ }
452
+ #side-sortables .spftestimonial-field .spftestimonial-fieldset {
453
+ margin-left: 0;
454
+ }
455
+ #side-sortables .spftestimonial-notice {
456
+ padding: 12px;
457
+ }
458
+
459
+ /**
460
+ * 01. 13. Help Tooltip
461
+ */
462
+ .spftestimonial-tooltip {
463
+ position: absolute;
464
+ z-index: 5000001;
465
+ font-size: 12px;
466
+ line-height: 1.4;
467
+ text-align: center;
468
+ text-decoration: none;
469
+ padding: 6px 12px;
470
+ max-width: 200px;
471
+ color: #fff;
472
+ background-color: #000;
473
+ background-color: rgba(0, 0, 0, 0.85);
474
+ -moz-border-radius: 4px;
475
+ -webkit-border-radius: 4px;
476
+ border-radius: 4px;
477
+ }
478
+
479
+ /**
480
+ * 02. Themes
481
+ */
482
+ /**
483
+ * 02. 01. Theme Dark
484
+ */
485
+ .spftestimonial-theme-dark .spftestimonial-header-inner {
486
+ background-color: #050505;
487
+ }
488
+ .spftestimonial-theme-dark .spftestimonial-header-inner h1 {
489
+ color: #fff;
490
+ }
491
+ .spftestimonial-theme-dark .spftestimonial-header-inner h1 small {
492
+ color: #555;
493
+ }
494
+ .spftestimonial-theme-dark .spftestimonial-expand-all {
495
+ color: #999;
496
+ background-color: #222;
497
+ }
498
+ .spftestimonial-theme-dark .spftestimonial-expand-all:hover {
499
+ color: #fff;
500
+ background-color: #333;
501
+ }
502
+ .spftestimonial-theme-dark .spftestimonial-search input {
503
+ color: #fff;
504
+ background-color: #222;
505
+ }
506
+ .spftestimonial-theme-dark .spftestimonial-search:focus {
507
+ background-color: #444;
508
+ }
509
+ .spftestimonial-theme-dark .spftestimonial-search::-webkit-input-placeholder {
510
+ color: #666;
511
+ }
512
+ .spftestimonial-metabox .spftestimonial-nav ul li a {
513
+ background-color: #52b3d9;
514
+ font-size: 14px;
515
+ padding: 15px 15px;
516
+ line-height: 1.4;
517
+ color: #ffffff;
518
+ border-right: 1px solid #E2E2E1;
519
+ font-weight: 600;
520
+ }
521
+ #sp_tpro_shortcode_options_new .spftestimonial-metabox .spftestimonial-nav ul li a {
522
+ font-size: 13px;
523
+ text-transform: uppercase;
524
+ padding: 16px 15px;
525
+ }
526
+
527
+ .spftestimonial-metabox .spftestimonial-nav ul li .spftestimonial-section-active {
528
+ color: #444;
529
+ background-color: #fff;
530
+ box-shadow: 0 3px 0 0 #52b3d9 inset;
531
+ }
532
+ .spftestimonial-metabox .spftestimonial-nav ul li .spftestimonial-section-active .fa {
533
+ color: #52b3d9;
534
+ }
535
+ .spftestimonial-theme-dark .spftestimonial-nav ul ul li a {
536
+ background-color: #191919;
537
+ border-bottom: 1px solid #2f2f2f;
538
+ }
539
+ .spftestimonial-theme-dark .spftestimonial-nav ul ul li .spftestimonial-section-active {
540
+ background-color: #101010;
541
+ }
542
+ .spftestimonial-theme-dark .spftestimonial-nav ul ul:before {
543
+ background-color: rgba(34, 34, 34, 0.75);
544
+ }
545
+ .spftestimonial-theme-dark .spftestimonial-nav > ul > li:last-child > a {
546
+ border-bottom: none;
547
+ }
548
+ .spftestimonial-theme-dark .spftestimonial-nav-background {
549
+ background-color: #222;
550
+ }
551
+ .spftestimonial-metabox .spftestimonial-nav-background {
552
+ display: none;
553
+ }
554
+ .spftestimonial-theme-dark .spftestimonial-footer {
555
+ color: #555;
556
+ background-color: #050505;
557
+ }
558
+
559
+ /**
560
+ * 02. 02. Theme Light
561
+ */
562
+ .spftestimonial-theme-light .spftestimonial-container {
563
+ border: 1px solid #ccd0d4;
564
+ }
565
+ .spftestimonial-theme-light .spftestimonial-header-inner {
566
+ border-bottom: 1px solid #ccd0d4;
567
+ background-color: #f5f5f5;
568
+ background: linear-gradient(#fefefe, #f5f5f5);
569
+ }
570
+ .spftestimonial-theme-light .spftestimonial-header-inner h1 small {
571
+ color: #999;
572
+ }
573
+ .spftestimonial-theme-light .spftestimonial-expand-all {
574
+ color: #999;
575
+ background-color: #fff;
576
+ -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
577
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
578
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
579
+ }
580
+ .spftestimonial-theme-light .spftestimonial-expand-all:hover {
581
+ color: #555;
582
+ }
583
+ .spftestimonial-theme-light .spftestimonial-search input {
584
+ color: #555;
585
+ background-color: #fff;
586
+ -moz-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05);
587
+ -webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05);
588
+ box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05);
589
+ }
590
+ .spftestimonial-theme-light .spftestimonial-search input::-webkit-input-placeholder {
591
+ color: #bbb;
592
+ }
593
+ .spftestimonial-theme-light .spftestimonial-nav ul li a {
594
+ color: #464646;
595
+ background-color: #f5f5f5;
596
+ border-top: 0;
597
+ border-right: 0;
598
+ border-bottom: 1px solid #ccd0d4;
599
+ margin-bottom: 0;
600
+ padding: 15px 15px;
601
+ }
602
+ .spftestimonial-theme-light .spftestimonial-nav ul li .spftestimonial-section-active {
603
+ box-shadow: 3px 0 0 0 #52b3d9 inset;
604
+ background-color: #ffffff;
605
+ color: #52b3d9;
606
+ }
607
+ .spftestimonial-theme-light .spftestimonial-nav ul li .spftestimonial-section-active:after {
608
+ display: none;
609
+ }
610
+ .spftestimonial-theme-light .spftestimonial-nav ul ul li a {
611
+ border-bottom: 1px solid #e5e5e5;
612
+ background-color: #f8fdff;
613
+ padding: 13px 15px 13px 24px;
614
+ }
615
+ .spftestimonial-theme-light .spftestimonial-nav-background {
616
+ background-color: #f5f5f5;
617
+ border-right: 1px solid #ccd0d4;
618
+ }
619
+ .spftestimonial-theme-light .spftestimonial-footer {
620
+ color: #555;
621
+ border-top: 1px solid #e5e5e5;
622
+ background-color: #f5f5f5;
623
+ background: linear-gradient(#fafafa, #f5f5f5);
624
+ }
625
+
626
+ /**
627
+ * 03. Fields
628
+ */
629
+ .spftestimonial-field {
630
+ position: relative;
631
+ padding: 22px 30px;
632
+ }
633
+ .spftestimonial-field p:first-child {
634
+ margin-top: 0;
635
+ }
636
+ .spftestimonial-field p:last-child {
637
+ margin-bottom: 0;
638
+ }
639
+ .spftestimonial-field:after, .spftestimonial-field:before {
640
+ content: " ";
641
+ display: table;
642
+ }
643
+ .spftestimonial-field:after {
644
+ clear: both;
645
+ }
646
+ .spftestimonial-field h4 {
647
+ margin-top: 0;
648
+ }
649
+ .spftestimonial-field .spftestimonial-title {
650
+ position: relative;
651
+ width: 20%;
652
+ float: left;
653
+ }
654
+ .spftestimonial-field .spftestimonial-title h4 {
655
+ margin: 0;
656
+ color: #23282d;
657
+ }
658
+ .spftestimonial-field .spftestimonial-fieldset {
659
+ margin-left: 25%;
660
+ }
661
+
662
+ .spftestimonial-pseudo-field {
663
+ padding: 0 5px 0 0 !important;
664
+ display: inline-block;
665
+ }
666
+ .spftestimonial-pseudo-field + .spftestimonial-pseudo-field {
667
+ border: 0;
668
+ }
669
+ .spftestimonial-pseudo-field pre {
670
+ display: none;
671
+ }
672
+
673
+ /**
674
+ * 03. 05. Field: border, spacing, dimensions
675
+ */
676
+ .spftestimonial-field-border .spftestimonial--left,
677
+ .spftestimonial-field-spacing .spftestimonial--left,
678
+ .spftestimonial-field-dimensions .spftestimonial--left {
679
+ float: left;
680
+ }
681
+ .spftestimonial-field-border .spftestimonial--input,
682
+ .spftestimonial-field-spacing .spftestimonial--input,
683
+ .spftestimonial-field-dimensions .spftestimonial--input {
684
+ float: left;
685
+ margin-right: 10px;
686
+ margin-bottom: 7px;
687
+ }
688
+ .spftestimonial-field-border .spftestimonial--input select,
689
+ .spftestimonial-field-spacing .spftestimonial--input select,
690
+ .spftestimonial-field-dimensions .spftestimonial--input select {
691
+ margin: 0;
692
+ line-height: 26px;
693
+ }
694
+ .spftestimonial-field-border .spftestimonial--input input,
695
+ .spftestimonial-field-spacing .spftestimonial--input input,
696
+ .spftestimonial-field-dimensions .spftestimonial--input input {
697
+ line-height: 30px;
698
+ float: left;
699
+ margin: 0;
700
+ padding: 0;
701
+ width: 65px;
702
+ max-width: 100%;
703
+ text-align: center;
704
+ border-radius: 0;
705
+ }
706
+ .spftestimonial-field-border .spftestimonial--label,
707
+ .spftestimonial-field-spacing .spftestimonial--label,
708
+ .spftestimonial-field-dimensions .spftestimonial--label {
709
+ float: left;
710
+ max-width: 100%;
711
+ font-size: 12px;
712
+ line-height: 30px;
713
+ vertical-align: top;
714
+ text-align: center;
715
+ color: #555;
716
+ border: 1px solid #ddd;
717
+ background-color: #eee;
718
+ padding: 0 6px;
719
+ min-height: 30px;
720
+ }
721
+ .spftestimonial-field-border .spftestimonial--label-icon,
722
+ .spftestimonial-field-spacing .spftestimonial--label-icon,
723
+ .spftestimonial-field-dimensions .spftestimonial--label-icon {
724
+ min-width: 20px;
725
+ border-right: 0;
726
+ border-radius: 2px 0 0 2px;
727
+ }
728
+ .spftestimonial-field-border .spftestimonial--label-unit,
729
+ .spftestimonial-field-spacing .spftestimonial--label-unit,
730
+ .spftestimonial-field-dimensions .spftestimonial--label-unit {
731
+ color: #999;
732
+ border-left: 0;
733
+ border-radius: 0 2px 2px 0;
734
+ }
735
+
736
+ /**
737
+ * 03. 06. Field: button_set
738
+ */
739
+ .spftestimonial-field-button_set .spftestimonial--buttons {
740
+ display: inline-block;
741
+ }
742
+ .spftestimonial-field-button_set .spftestimonial--button {
743
+ position: relative;
744
+ z-index: 1;
745
+ float: left;
746
+ cursor: pointer;
747
+ padding: 7px 14px;
748
+ min-width: 40px;
749
+ text-align: center;
750
+ color: #555;
751
+ border: 1px solid #cccccc;
752
+ background-color: #f7f7f7;
753
+ user-select: none;
754
+ -webkit-user-select: none;
755
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
756
+ }
757
+ .spftestimonial-field-button_set .spftestimonial--button:first-child {
758
+ border-radius: 4px 0 0 4px;
759
+ }
760
+ .spftestimonial-field-button_set .spftestimonial--button:last-child {
761
+ border-radius: 0 4px 4px 0;
762
+ }
763
+ .spftestimonial-field-button_set .spftestimonial--button:not(:first-child) {
764
+ margin-left: -1px;
765
+ }
766
+ .spftestimonial-field-button_set .spftestimonial--button:hover {
767
+ background-color: #eee;
768
+ }
769
+ .spftestimonial-field-button_set .spftestimonial--active:hover,
770
+ .spftestimonial-field-button_set .spftestimonial--active {
771
+ z-index: 2;
772
+ color: #fff;
773
+ border-color: #006799;
774
+ background-color: #0085ba;
775
+ }
776
+ .spftestimonial-field-button_set input {
777
+ display: none;
778
+ }
779
+
780
+ /**
781
+ * 03. 07. Field: checkbox, radio
782
+ */
783
+ .spftestimonial-field-checkbox ul,
784
+ .spftestimonial-field-radio ul {
785
+ margin: 0;
786
+ padding: 0;
787
+ list-style-type: none;
788
+ overflow-y: auto;
789
+ max-height: 305px;
790
+ }
791
+ .spftestimonial-field-checkbox ul ul,
792
+ .spftestimonial-field-radio ul ul {
793
+ max-height: none;
794
+ }
795
+ .spftestimonial-field-checkbox .spftestimonial--inline-list li,
796
+ .spftestimonial-field-radio .spftestimonial--inline-list li {
797
+ display: inline-block;
798
+ margin-right: 15px;
799
+ }
800
+ .spftestimonial-field-checkbox input[type="radio"]:checked:before,
801
+ .spftestimonial-field-radio input[type="radio"]:checked:before {
802
+ line-height: 10px;
803
+ }
804
+ .spftestimonial-field-checkbox .spftestimonial-checker,
805
+ .spftestimonial-field-radio .spftestimonial-checker {
806
+ cursor: pointer;
807
+ }
808
+
809
+ /**
810
+ * 03. 08. Field: code_editor
811
+ */
812
+ .spftestimonial-field-code_editor .CodeMirror {
813
+ width: 100%;
814
+ height: 400px;
815
+ border: 1px solid #eee;
816
+ }
817
+ .spftestimonial-field-code_editor textarea {
818
+ width: 100%;
819
+ height: 400px;
820
+ }
821
+
822
+ /**
823
+ * 03. 09. Field: color
824
+ */
825
+ .spftestimonial-field-color > input {
826
+ opacity: 0.75;
827
+ width: 115px;
828
+ max-width: 100%;
829
+ }
830
+
831
+ /**
832
+ * 03. 10. Field: color_group
833
+ */
834
+ .spftestimonial-field-color_group .spftestimonial--left {
835
+ float: left;
836
+ margin-right: 10px;
837
+ margin-bottom: 5px;
838
+ }
839
+ .spftestimonial-field-color_group .spftestimonial--title {
840
+ color: #999;
841
+ margin-bottom: 5px;
842
+ }
843
+
844
+ /**
845
+ * 03. 16. Field: image_select, icon_select
846
+ */
847
+ .spftestimonial-field-icon_select .spftestimonial--image {
848
+ width: 35px;
849
+ height: 35px;
850
+ text-align: center;
851
+ line-height: 35px;
852
+ font-size: 20px;
853
+ }
854
+ .spftestimonial-field-image_select .spftestimonial--image,
855
+ .spftestimonial-field-icon_select .spftestimonial--image {
856
+ cursor: pointer;
857
+ position: relative;
858
+ display: inline-block;
859
+ max-width: 100%;
860
+ margin: 0 5px 5px 0;
861
+ vertical-align: bottom;
862
+ border: 2px solid #f4f4f4;
863
+ background-color: #fff;
864
+ user-select: none;
865
+ -webkit-user-select: none;
866
+ -moz-transition: all 0.2s;
867
+ -o-transition: all 0.2s;
868
+ -webkit-transition: all 0.2s;
869
+ transition: all 0.2s;
870
+ }
871
+ .spftestimonial-field-image_select .spftestimonial--image:before,
872
+ .spftestimonial-field-icon_select .spftestimonial--image:before {
873
+ position: absolute;
874
+ top: 0;
875
+ left: 0;
876
+ text-align: center;
877
+ font-size: 11px;
878
+ font-family: FontAwesome;
879
+ content: "\f00c";
880
+ width: 15px;
881
+ height: 15px;
882
+ line-height: 15px;
883
+ opacity: 0;
884
+ color: #fff;
885
+ background-color: #52b3d9;
886
+ transition: opacity .2s;
887
+ }
888
+ .spftestimonial-field-image_select .spftestimonial--active,
889
+ .spftestimonial-field-icon_select .spftestimonial--active {
890
+ border-color: #52b3d9;
891
+ }
892
+ .spftestimonial-field-image_select .spftestimonial--active:before,
893
+ .spftestimonial-field-icon_select .spftestimonial--active:before {
894
+ opacity: 0;
895
+ }
896
+ .spftestimonial-field-image_select img {
897
+ vertical-align: top;
898
+ }
899
+ .spftestimonial-field-image_select input,
900
+ .spftestimonial-field-icon_select input {
901
+ display: none;
902
+ }
903
+
904
+ /**
905
+ * 03. 21. Field: select
906
+ */
907
+ .spftestimonial-field-select .spftestimonial-fieldset {
908
+ min-height: 30px;
909
+ }
910
+ .spftestimonial-field-select .spftestimonial-chosen {
911
+ display: none;
912
+ }
913
+ .spftestimonial-field-select select {
914
+ max-width: 100%;
915
+ }
916
+
917
+ /**
918
+ * 03. 25. Field: spinner
919
+ */
920
+ .spftestimonial-field-spinner .spftestimonial--spin {
921
+ float: left;
922
+ }
923
+ .spftestimonial-field-spinner .spftestimonial--unit {
924
+ float: right;
925
+ height: 30px;
926
+ line-height: 26px;
927
+ text-align: center;
928
+ border-left: none;
929
+ color: #999;
930
+ border: 1px solid #ddd;
931
+ border-left: 0;
932
+ background-color: #eee;
933
+ padding: 0 6px;
934
+ margin: 0;
935
+ box-sizing: border-box;
936
+ }
937
+ .spftestimonial-field-spinner .ui-spinner-button {
938
+ cursor: pointer;
939
+ position: relative;
940
+ overflow: hidden;
941
+ margin: 0;
942
+ padding: 0;
943
+ width: 30px;
944
+ height: 30px;
945
+ line-height: 30px;
946
+ text-align: center;
947
+ border: 1px solid #ddd;
948
+ color: #555;
949
+ background-color: #eee;
950
+ box-sizing: border-box;
951
+ }
952
+ .spftestimonial-field-spinner .ui-spinner-button:hover {
953
+ background-color: #e7e7e7;
954
+ }
955
+ .spftestimonial-field-spinner .ui-spinner-button:active {
956
+ background-color: #ddd;
957
+ }
958
+ .spftestimonial-field-spinner .ui-spinner-button:before {
959
+ font-family: FontAwesome;
960
+ font-size: 16px;
961
+ line-height: 16px;
962
+ }
963
+ .spftestimonial-field-spinner .ui-spinner-down {
964
+ float: left;
965
+ border-right: 0;
966
+ border-radius: 2px 0 0 2px;
967
+ }
968
+ .spftestimonial-field-spinner .ui-spinner-down:before {
969
+ content: "\f0d9";
970
+ }
971
+ .spftestimonial-field-spinner .ui-spinner-up {
972
+ float: right;
973
+ border-left: 0;
974
+ border-radius: 0 2px 2px 0;
975
+ }
976
+ .spftestimonial-field-spinner .ui-spinner-up:before {
977
+ content: "\f0da";
978
+ }
979
+ .spftestimonial-field-spinner input {
980
+ width: 60px;
981
+ text-align: center;
982
+ margin: 0;
983
+ padding: 0 8px;
984
+ height: 31px;
985
+ line-height: 31px;
986
+ border: 1px solid #ddd;
987
+ border-radius: 0;
988
+ }
989
+ .spftestimonial-field-spinner input:focus {
990
+ outline: none;
991
+ }
992
+ .spftestimonial-field-spinner .ui-button-text {
993
+ display: none;
994
+ }
995
+
996
+ /**
997
+ * 03. 26. Field: switcher
998
+ */
999
+ .spftestimonial-field-switcher .spftestimonial--switcher {
1000
+ float: left;
1001
+ cursor: pointer;
1002
+ position: relative;
1003
+ width: 60px;
1004
+ height: 26px;
1005
+ padding: 0;
1006
+ margin: 0;
1007
+ overflow: hidden;
1008
+ border-radius: 4px;
1009
+ background-color: #ed6f6f;
1010
+ user-select: none;
1011
+ -webkit-user-select: none;
1012
+ }
1013
+ .spftestimonial-field-switcher .spftestimonial--ball {
1014
+ position: absolute;
1015
+ top: 4px;
1016
+ left: 4px;
1017
+ width: 24px;
1018
+ height: 18px;
1019
+ background-color: #fff;
1020
+ border-radius: 4px;
1021
+ transition: all .1s;
1022
+ box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.15);
1023
+ }
1024
+ .spftestimonial-field-switcher .spftestimonial--on,
1025
+ .spftestimonial-field-switcher .spftestimonial--off {
1026
+ position: absolute;
1027
+ top: 0;
1028
+ left: 0;
1029
+ right: 0;
1030
+ font-size: 11px;
1031
+ line-height: 26px;
1032
+ font-weight: 500;
1033
+ font-style: normal;
1034
+ text-align: center;
1035
+ text-transform: uppercase;
1036
+ color: #fff;
1037
+ padding-right: 28px;
1038
+ opacity: 0;
1039
+ transition: all .1s;
1040
+ }
1041
+ .spftestimonial-field-switcher .spftestimonial--off {
1042
+ padding-right: 0;
1043
+ padding-left: 28px;
1044
+ opacity: 1;
1045
+ }
1046
+ .spftestimonial-field-switcher .spftestimonial--active {
1047
+ background: #4fb845;
1048
+ }
1049
+ .spftestimonial-field-switcher .spftestimonial--active .spftestimonial--on {
1050
+ opacity: 1;
1051
+ }
1052
+ .spftestimonial-field-switcher .spftestimonial--active .spftestimonial--off {
1053
+ opacity: 0;
1054
+ }
1055
+ .spftestimonial-field-switcher .spftestimonial--active .spftestimonial--ball {
1056
+ left: 100%;
1057
+ margin-left: -28px;
1058
+ }
1059
+ .spftestimonial-field-switcher .spftestimonial--label {
1060
+ float: left;
1061
+ margin-top: 4px;
1062
+ margin-left: 8px;
1063
+ font-weight: 400;
1064
+ color: #999;
1065
+ }
1066
+ .spftestimonial-field-switcher input {
1067
+ display: none;
1068
+ }
1069
+
1070
+ /**
1071
+ * 03. 27. Field: tabbed
1072
+ */
1073
+ .spftestimonial-field-tabbed .spftestimonial-tabbed-section {
1074
+ border: 1px solid #eee;
1075
+ background: #fff;
1076
+ }
1077
+ .spftestimonial-field-tabbed .spftestimonial-tabbed-section > .spftestimonial-field {
1078
+ padding: 15px;
1079
+ }
1080
+ .spftestimonial-field-tabbed .spftestimonial-tabbed-nav .spftestimonial--icon {
1081
+ padding-right: 5px;
1082
+ }
1083
+ .spftestimonial-field-tabbed .spftestimonial-tabbed-nav a {
1084
+ display: inline-block;
1085
+ padding: 12px 15px;
1086
+ margin-top: 1px;
1087
+ margin-right: 5px;
1088
+ margin-bottom: -1px;
1089
+ position: relative;
1090
+ text-decoration: none;
1091
+ color: #444;
1092
+ font-weight: 600;
1093
+ background-color: #f3f3f3;
1094
+ border: 1px solid #eee;
1095
+ -moz-transition: all 0.2s;
1096
+ -o-transition: all 0.2s;
1097
+ -webkit-transition: all 0.2s;
1098
+ transition: all 0.2s;
1099
+ }
1100
+ .spftestimonial-field-tabbed .spftestimonial-tabbed-nav a:hover {
1101
+ background-color: #f9f9f9;
1102
+ }
1103
+ .spftestimonial-field-tabbed .spftestimonial-tabbed-nav a.spftestimonial-tabbed-active {
1104
+ background-color: #fff;
1105
+ border-bottom-color: #fff;
1106
+ }
1107
+ .spftestimonial-field-tabbed .spftestimonial-tabbed-nav a:focus {
1108
+ outline: none;
1109
+ -moz-box-shadow: none;
1110
+ -webkit-box-shadow: none;
1111
+ box-shadow: none;
1112
+ }
1113
+
1114
+ /**
1115
+ * 03. 28. Field: text
1116
+ */
1117
+ .spftestimonial-field-text input,
1118
+ .spftestimonial-field-text_f input {
1119
+ width: 340px;
1120
+ max-width: 100%;
1121
+ }
1122
+
1123
+ /**
1124
+ * 03. 30. Field: typography
1125
+ */
1126
+ .spftestimonial-field-typography textarea,
1127
+ .spftestimonial-field-typography select {
1128
+ margin: 0;
1129
+ width: 100%;
1130
+ }
1131
+ .spftestimonial-field-typography .spftestimonial--title {
1132
+ color: #999;
1133
+ margin: 0 0 2px 0;
1134
+ }
1135
+ .spftestimonial-field-typography .spftestimonial--title small {
1136
+ vertical-align: top;
1137
+ }
1138
+ .spftestimonial-field-typography .spftestimonial--blocks {
1139
+ display: flex;
1140
+ flex-wrap: wrap;
1141
+ }
1142
+ .spftestimonial-field-typography .spftestimonial--block {
1143
+ padding-right: 5px;
1144
+ padding-bottom: 10px;
1145
+ box-sizing: border-box;
1146
+ }
1147
+ .spftestimonial-field-typography .spftestimonial--block .spftestimonial--block {
1148
+ padding-right: 0;
1149
+ padding-bottom: 0;
1150
+ }
1151
+ .spftestimonial-field-typography .spftestimonial--blocks-selects .spftestimonial--block {
1152
+ flex: 1 33.3%;
1153
+ }
1154
+ .spftestimonial-field-typography .spftestimonial--blocks-inputs .spftestimonial--block {
1155
+ flex: 1 25%;
1156
+ }
1157
+ .spftestimonial-field-typography .spftestimonial--blocks-inputs .spftestimonial--block .spftestimonial--block {
1158
+ flex: 1;
1159
+ }
1160
+ .spftestimonial-field-typography .spftestimonial--input {
1161
+ margin: 0;
1162
+ width: 100%;
1163
+ padding: 2px 8px;
1164
+ border-radius: 4px 0 0 4px;
1165
+ }
1166
+ .spftestimonial-field-typography .spftestimonial--unit {
1167
+ min-width: 40px;
1168
+ max-width: 40px;
1169
+ font-size: 12px;
1170
+ font-weight: 400;
1171
+ text-align: center;
1172
+ color: #777;
1173
+ border: 1px solid #ddd;
1174
+ background-color: #eee;
1175
+ border-radius: 0 2px 2px 0;
1176
+ border-left: 0;
1177
+ line-height: 30px;
1178
+ }
1179
+ .spftestimonial-field-typography .spftestimonial--preview {
1180
+ font-size: 16px;
1181
+ line-height: 20px;
1182
+ padding: 20px;
1183
+ color: #222;
1184
+ border: 1px solid #eee;
1185
+ background-color: #fff;
1186
+ border-radius: 2.5px;
1187
+ user-select: none;
1188
+ -webkit-user-select: none;
1189
+ transition: background-color .2s, border-color .2s;
1190
+ }
1191
+ .spftestimonial-field-typography .spftestimonial--block-preview {
1192
+ cursor: pointer;
1193
+ position: relative;
1194
+ overflow: hidden;
1195
+ margin-top: 10px;
1196
+ max-width: 100%;
1197
+ }
1198
+ .spftestimonial-field-typography .spftestimonial--black-background {
1199
+ border-color: #000;
1200
+ background-color: #000;
1201
+ }
1202
+ .spftestimonial-field-typography .spftestimonial--toggle {
1203
+ position: absolute;
1204
+ top: 5px;
1205
+ right: 10px;
1206
+ color: #999;
1207
+ }
1208
+ .spftestimonial-field-typography .spftestimonial--block-extra-styles {
1209
+ margin-top: 5px;
1210
+ }
1211
+
1212
+ /**
1213
+ * 03. 33. Field: heading
1214
+ */
1215
+ .spftestimonial-field-heading {
1216
+ font-size: 1.5em;
1217
+ font-weight: bold;
1218
+ color: #23282d;
1219
+ background-color: #f5f5f5;
1220
+ }
1221
+
1222
+ /**
1223
+ * 03. 34. Field: subheading
1224
+ */
1225
+ .spftestimonial-field-subheading {
1226
+ font-size: 14px;
1227
+ font-weight: bold;
1228
+ padding-top: 17px;
1229
+ padding-bottom: 17px;
1230
+ color: #23282d;
1231
+ background-color: #f7f7f7;
1232
+ }
1233
+
1234
+ /**
1235
+ * 03. 35. Field: submessage
1236
+ */
1237
+ .spftestimonial-field-submessage {
1238
+ padding: 0 !important;
1239
+ border: 0 !important;
1240
+ }
1241
+ .spftestimonial-field-submessage + .spftestimonial-field {
1242
+ border-top: 0 !important;
1243
+ }
1244
+
1245
+ .spftestimonial-submessage {
1246
+ font-size: 12px;
1247
+ padding: 17px 30px;
1248
+ border-top: 1px solid transparent;
1249
+ border-bottom: 1px solid transparent;
1250
+ }
1251
+
1252
+ .spftestimonial-submessage-success {
1253
+ color: #3c763d;
1254
+ border-color: #d6e9c6;
1255
+ background-color: #dff0d8;
1256
+ }
1257
+
1258
+ .spftestimonial-submessage-info {
1259
+ color: #31708f;
1260
+ border-color: #bce8f1;
1261
+ background-color: #d9edf7;
1262
+ }
1263
+
1264
+ .spftestimonial-submessage-warning {
1265
+ color: #8a6d3b;
1266
+ border-color: #faebcc;
1267
+ background-color: #fcf8e3;
1268
+ }
1269
+
1270
+ .spftestimonial-submessage-danger {
1271
+ color: #a94442;
1272
+ border-color: #ebccd1;
1273
+ background-color: #f2dede;
1274
+ }
1275
+
1276
+ .spftestimonial-submessage-normal {
1277
+ color: #23282d;
1278
+ border-color: #eee;
1279
+ background-color: #f7f7f7;
1280
+ }
1281
+
1282
+ /**
1283
+ * 03. 36. Field: notice
1284
+ */
1285
+ .spftestimonial-field-notice {
1286
+ background-color: #f7f7f7;
1287
+ }
1288
+
1289
+ .spftestimonial-notice {
1290
+ padding: 12px;
1291
+ background-color: #fff;
1292
+ border-left-style: solid;
1293
+ border-left-width: 4px;
1294
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
1295
+ }
1296
+
1297
+ .spftestimonial-notice-success {
1298
+ border-color: #46b450;
1299
+ }
1300
+
1301
+ .spftestimonial-notice-info {
1302
+ border-color: #339fd4;
1303
+ }
1304
+
1305
+ .spftestimonial-notice-warning {
1306
+ border-color: #ffbc00;
1307
+ }
1308
+
1309
+ .spftestimonial-notice-danger {
1310
+ border-color: #dc3232;
1311
+ }
1312
+
1313
+ .spftestimonial-notice-normal {
1314
+ border-color: #222;
1315
+ }
1316
+
1317
+ /**
1318
+ * 03. 37. others
1319
+ */
1320
+ .spftestimonial-help {
1321
+ cursor: help;
1322
+ position: absolute;
1323
+ top: 0;
1324
+ right: 0;
1325
+ padding: 5px;
1326
+ font-size: 14px;
1327
+ color: #aaa;
1328
+ }
1329
+ .spftestimonial-help .spftestimonial-help-text {
1330
+ display: none;
1331
+ }
1332
+
1333
+ .spftestimonial-image-preview {
1334
+ display: inline-block;
1335
+ position: relative;
1336
+ padding: 4px;
1337
+ min-width: 44px;
1338
+ min-height: 22px;
1339
+ margin-bottom: 10px;
1340
+ border: 1px solid #ccc;
1341
+ background-color: #f9f9f9;
1342
+ -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1343
+ -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1344
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1345
+ }
1346
+ .spftestimonial-image-preview img {
1347
+ max-height: 90px;
1348
+ display: inline-block;
1349
+ vertical-align: middle;
1350
+ }
1351
+
1352
+ .spftestimonial-field-custom .spftestimonial-field {
1353
+ padding: 0;
1354
+ }
1355
+
1356
+ .spftestimonial-field .chosen-container-single .chosen-single {
1357
+ height: 28px;
1358
+ line-height: 26px;
1359
+ }
1360
+ .spftestimonial-field .chosen-container-single .chosen-single abbr {
1361
+ top: 0;
1362
+ right: 20px;
1363
+ font-family: FontAwesome;
1364
+ font-size: 12px;
1365
+ height: 100%;
1366
+ width: 18px;
1367
+ color: #aaa;
1368
+ text-align: center;
1369
+ background: none;
1370
+ }
1371
+ .spftestimonial-field .chosen-container-single .chosen-single abbr:before {
1372
+ content: "\f00d";
1373
+ }
1374
+ .spftestimonial-field .chosen-container-single .chosen-single abbr:hover {
1375
+ color: #555;
1376
+ }
1377
+ .spftestimonial-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
1378
+ font-family: FontAwesome;
1379
+ font-size: 12px;
1380
+ height: 100%;
1381
+ width: 18px;
1382
+ color: #aaa;
1383
+ text-align: center;
1384
+ background: none;
1385
+ }
1386
+ .spftestimonial-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:before {
1387
+ content: "\f00d";
1388
+ display: inline-block;
1389
+ padding-top: 3px;
1390
+ }
1391
+ .spftestimonial-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
1392
+ color: #555;
1393
+ }
1394
+ .spftestimonial-field .chosen-container-single .chosen-single div b {
1395
+ font-family: FontAwesome;
1396
+ font-size: 14px;
1397
+ color: #aaa;
1398
+ background: none;
1399
+ }
1400
+ .spftestimonial-field .chosen-container-single .chosen-single div b:before {
1401
+ content: "\f107";
1402
+ }
1403
+ .spftestimonial-field .chosen-container-single .chosen-single div b:hover {
1404
+ color: #555;
1405
+ }
1406
+ .spftestimonial-field .chosen-container-multi .chosen-choices li.search-choice-placeholder {
1407
+ border: 1px dashed #aaa;
1408
+ margin: 3px 5px 3px 0;
1409
+ }
1410
+ .spftestimonial-field .chosen-container-multi .ui-sortable li.search-choice span {
1411
+ cursor: move;
1412
+ }
1413
+ .spftestimonial-field .chosen-container-active.chosen-with-drop .chosen-single div b:before {
1414
+ content: "\f106";
1415
+ }
1416
+ .spftestimonial-field .chosen-container-single .chosen-single-with-deselect span {
1417
+ margin-right: 40px;
1418
+ }
1419
+ .spftestimonial-field .chosen-container-single .chosen-search input[type="text"] {
1420
+ background: none;
1421
+ }
1422
+ .spftestimonial-field .chosen-container-single .chosen-search:before {
1423
+ font-family: FontAwesome;
1424
+ position: absolute;
1425
+ content: "\f002";
1426
+ font-size: 11px;
1427
+ right: 10px;
1428
+ top: 7px;
1429
+ color: #aaa;
1430
+ }
1431
+ .spftestimonial-field .wp-picker-container {
1432
+ display: inline-block;
1433
+ }
1434
+ .spftestimonial-field .spftestimonial--transparent-wrap {
1435
+ display: none;
1436
+ position: relative;
1437
+ top: -1px;
1438
+ width: 235px;
1439
+ padding: 9px 10px;
1440
+ border: 1px solid #dfdfdf;
1441
+ border-top: none;
1442
+ background-color: #fff;
1443
+ }
1444
+ .spftestimonial-field .spftestimonial--transparent-slider {
1445
+ position: absolute;
1446
+ width: 190px;
1447
+ margin-left: 2px;
1448
+ height: 18px;
1449
+ }
1450
+ .spftestimonial-field .spftestimonial--transparent-slider .ui-slider-handle {
1451
+ position: absolute;
1452
+ top: -3px;
1453
+ bottom: -3px;
1454
+ z-index: 5;
1455
+ border-color: #aaa;
1456
+ border-style: solid;
1457
+ border-width: 4px 3px;
1458
+ width: 10px;
1459
+ height: 16px;
1460
+ margin: 0 -5px;
1461
+ background: none;
1462
+ cursor: ew-resize;
1463
+ opacity: 0.9;
1464
+ -moz-border-radius: 4px;
1465
+ -webkit-border-radius: 4px;
1466
+ border-radius: 4px;
1467
+ -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
1468
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
1469
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
1470
+ }
1471
+ .spftestimonial-field .spftestimonial--transparent-slider .ui-slider-handle:before {
1472
+ content: " ";
1473
+ position: absolute;
1474
+ left: -2px;
1475
+ right: -2px;
1476
+ top: -3px;
1477
+ bottom: -3px;
1478
+ border: 2px solid #fff;
1479
+ -moz-border-radius: 3px;
1480
+ -webkit-border-radius: 3px;
1481
+ border-radius: 3px;
1482
+ }
1483
+ .spftestimonial-field .spftestimonial--transparent-offset {
1484
+ height: 18px;
1485
+ width: 200px;
1486
+ background: url(../images/checkerboard.png) repeat-y center left scroll #fff;
1487
+ -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.4) inset;
1488
+ -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.4) inset;
1489
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.4) inset;
1490
+ -moz-border-radius: 2px;
1491
+ -webkit-border-radius: 2px;
1492
+ border-radius: 2px;
1493
+ }
1494
+ .spftestimonial-field .spftestimonial--transparent-text {
1495
+ position: absolute;
1496
+ top: 12px;
1497
+ right: 10px;
1498
+ width: 30px;
1499
+ font-size: 12px;
1500
+ line-height: 12px;
1501
+ text-align: center;
1502
+ color: #999;
1503
+ }
1504
+ .spftestimonial-field .spftestimonial--transparent-button {
1505
+ display: inline-block;
1506
+ text-align: center;
1507
+ cursor: pointer;
1508
+ margin-top: 10px;
1509
+ user-select: none;
1510
+ -webkit-user-select: none;
1511
+ color: #999;
1512
+ transition: background-color .2s, border-color .2s, color .2s;
1513
+ }
1514
+ .spftestimonial-field .spftestimonial--transparent-active .wp-color-result {
1515
+ background-image: url(../images/checkerboard.png);
1516
+ background-size: 130%;
1517
+ background-position: center left;
1518
+ background-color: transparent !important;
1519
+ }
1520
+ .spftestimonial-field .spftestimonial--transparent-active .spftestimonial--transparent-button {
1521
+ color: #fff;
1522
+ border-color: #4fb845;
1523
+ background-color: #4fb845;
1524
+ }
1525
+
1526
+ /**
1527
+ * 04. Widget
1528
+ */
1529
+ .spftestimonial-widgets > .spftestimonial-field {
1530
+ position: relative;
1531
+ top: -1px;
1532
+ margin-right: -15px;
1533
+ margin-left: -15px;
1534
+ padding: 12px 15px;
1535
+ }
1536
+ .spftestimonial-widgets > .spftestimonial-field .spftestimonial-field {
1537
+ margin-left: 0;
1538
+ margin-right: 0;
1539
+ }
1540
+ .spftestimonial-widgets > .spftestimonial-field .spftestimonial-title {
1541
+ float: none;
1542
+ width: 100%;
1543
+ margin-bottom: 5px;
1544
+ }
1545
+ .spftestimonial-widgets > .spftestimonial-field .spftestimonial-fieldset {
1546
+ margin-left: 0;
1547
+ }
1548
+ .spftestimonial-widgets .spftestimonial-field-text input {
1549
+ width: 100%;
1550
+ }
1551
+ .spftestimonial-widgets .spftestimonial-field-notice .spftestimonial-notice {
1552
+ padding: 15px;
1553
+ }
1554
+
1555
+ .control-section .spftestimonial-widgets > .spftestimonial-field {
1556
+ margin-right: -10px;
1557
+ margin-left: -10px;
1558
+ padding: 10px 12px;
1559
+ }
1560
+
1561
+ /**
1562
+ * 05. Widget
1563
+ */
1564
+ .control-section .spftestimonial-field {
1565
+ padding: 0;
1566
+ }
1567
+ .control-section .spftestimonial-field .spftestimonial-title {
1568
+ float: none;
1569
+ width: 100%;
1570
+ margin-bottom: 10px;
1571
+ }
1572
+ .control-section .spftestimonial-field .spftestimonial-title h4 {
1573
+ font-size: 14px;
1574
+ font-weight: 600;
1575
+ color: inherit;
1576
+ }
1577
+ .control-section .spftestimonial-field .spftestimonial-fieldset {
1578
+ margin-left: 0;
1579
+ }
1580
+ .control-section .spftestimonial-field-select select {
1581
+ width: 100%;
1582
+ }
1583
+ .control-section .spftestimonial-field-heading {
1584
+ color: inherit;
1585
+ font-size: 14px;
1586
+ line-height: 1em;
1587
+ margin-right: -15px;
1588
+ margin-left: -15px;
1589
+ padding: 15px;
1590
+ }
1591
+ .control-section .spftestimonial-field-subheading {
1592
+ color: inherit;
1593
+ font-size: 11px;
1594
+ margin-right: -15px;
1595
+ margin-left: -15px;
1596
+ padding: 10px 15px;
1597
+ }
1598
+ .control-section .spftestimonial-text-subtitle {
1599
+ margin-top: 4px;
1600
+ font-size: 12px;
1601
+ }
1602
+ .control-section .spftestimonial-field-content,
1603
+ .control-section .spftestimonial-field-submessage .spftestimonial-submessage {
1604
+ margin-right: -15px;
1605
+ margin-left: -15px;
1606
+ padding: 15px;
1607
+ }
1608
+ .control-section .spftestimonial-fieldset .spftestimonial-field-submessage .spftestimonial-submessage,
1609
+ .control-section .spftestimonial-fieldset .spftestimonial-field-heading,
1610
+ .control-section .spftestimonial-fieldset .spftestimonial-field-subheading {
1611
+ margin-left: 0;
1612
+ margin-right: 0;
1613
+ }
1614
+ .control-section .spftestimonial-field-date .spftestimonial--to {
1615
+ margin-left: 0;
1616
+ }
1617
+ .control-section .spftestimonial-field-sorter ul li {
1618
+ padding: 5px;
1619
+ }
1620
+ .control-section .spftestimonial-field-sorter .spftestimonial-modules {
1621
+ float: none;
1622
+ width: 100%;
1623
+ }
1624
+ .control-section .spftestimonial-field-sorter .spftestimonial-modules:first-child {
1625
+ padding-right: 0;
1626
+ padding-bottom: 15px;
1627
+ }
1628
+ .control-section .spftestimonial-field-background .spftestimonial--select {
1629
+ width: 100%;
1630
+ }
1631
+ .control-section .spftestimonial-field-border select,
1632
+ .control-section .spftestimonial-field-spacing select,
1633
+ .control-section .spftestimonial-field-dimensions select {
1634
+ width: auto;
1635
+ }
1636
+ .control-section .spftestimonial-field-spinner input {
1637
+ width: 50px;
1638
+ }
1639
+ .control-section .spftestimonial-field-backup .spftestimonial-export-data {
1640
+ display: none;
1641
+ }
1642
+ .control-section .spftestimonial-field-fieldset .spftestimonial-fieldset-content {
1643
+ border-color: #e5e5e5;
1644
+ }
1645
+ .control-section .spftestimonial-field-fieldset .spftestimonial-field {
1646
+ padding: 10px;
1647
+ }
1648
+ .control-section .spftestimonial-field-fieldset .spftestimonial-field .spftestimonial-title {
1649
+ margin-bottom: 5px;
1650
+ }
1651
+ .control-section .spftestimonial-field-fieldset .spftestimonial-field h4 {
1652
+ font-size: 12px;
1653
+ }
1654
+ .control-section .spftestimonial-field-group .spftestimonial-field,
1655
+ .control-section .spftestimonial-field-tabbed .spftestimonial-field,
1656
+ .control-section .spftestimonial-field-sortable .spftestimonial-field,
1657
+ .control-section .spftestimonial-field-repeater .spftestimonial-field,
1658
+ .control-section .spftestimonial-field-accordion .spftestimonial-field {
1659
+ padding: 10px;
1660
+ }
1661
+ .control-section .spftestimonial-field-group .spftestimonial-field .spftestimonial-title,
1662
+ .control-section .spftestimonial-field-tabbed .spftestimonial-field .spftestimonial-title,
1663
+ .control-section .spftestimonial-field-sortable .spftestimonial-field .spftestimonial-title,
1664
+ .control-section .spftestimonial-field-repeater .spftestimonial-field .spftestimonial-title,
1665
+ .control-section .spftestimonial-field-accordion .spftestimonial-field .spftestimonial-title {
1666
+ margin-bottom: 5px;
1667
+ }
1668
+ .control-section .spftestimonial-field-group .spftestimonial-field h4,
1669
+ .control-section .spftestimonial-field-tabbed .spftestimonial-field h4,
1670
+ .control-section .spftestimonial-field-sortable .spftestimonial-field h4,
1671
+ .control-section .spftestimonial-field-repeater .spftestimonial-field h4,
1672
+ .control-section .spftestimonial-field-accordion .spftestimonial-field h4 {
1673
+ font-size: 12px;
1674
+ }
1675
+ .control-section .spftestimonial-dependency-control.hidden {
1676
+ display: none !important;
1677
+ }
1678
+
1679
+ /**
1680
+ * 08. Modal
1681
+ */
1682
+ .spftestimonial-modal {
1683
+ display: none;
1684
+ position: fixed;
1685
+ z-index: 100101;
1686
+ top: 0;
1687
+ left: 0;
1688
+ width: 100%;
1689
+ height: 100%;
1690
+ }
1691
+
1692
+ .spftestimonial-modal-icon {
1693
+ z-index: 100102;
1694
+ }
1695
+
1696
+ .spftestimonial-modal-table {
1697
+ display: table;
1698
+ width: 100%;
1699
+ height: 100%;
1700
+ }
1701
+
1702
+ .spftestimonial-modal-table-cell {
1703
+ display: table-cell;
1704
+ vertical-align: middle;
1705
+ margin: 100px 0;
1706
+ }
1707
+
1708
+ .spftestimonial-modal-inner {
1709
+ position: relative;
1710
+ z-index: 10;
1711
+ width: 760px;
1712
+ height: 750px;
1713
+ margin: 0 auto;
1714
+ background-color: #fff;
1715
+ }
1716
+
1717
+ .spftestimonial-modal-content {
1718
+ position: relative;
1719
+ overflow: hidden;
1720
+ overflow-y: auto;
1721
+ height: 592px;
1722
+ }
1723
+ .spftestimonial-modal-content .spftestimonial-shortcode-button {
1724
+ display: none;
1725
+ }
1726
+ .spftestimonial-modal-content .spftestimonial-fieldset {
1727
+ margin-left: 25%;
1728
+ }
1729
+ .spftestimonial-modal-content .spftestimonial-title {
1730
+ width: 20%;
1731
+ }
1732
+ .spftestimonial-modal-content .spftestimonial-field {
1733
+ padding: 15px 30px 15px 15px;
1734
+ }
1735
+ .spftestimonial-modal-content a:active, .spftestimonial-modal-content a:focus {
1736
+ outline: none;
1737
+ -moz-box-shadow: none;
1738
+ -webkit-box-shadow: none;
1739
+ box-shadow: none;
1740
+ }
1741
+ .spftestimonial-modal-content h4 {
1742
+ font-size: 13px;
1743
+ }
1744
+ .spftestimonial-modal-content h4 small {
1745
+ font-style: italic;
1746
+ font-weight: 400;
1747
+ color: #aaa;
1748
+ }
1749
+
1750
+ .spftestimonial-modal-title {
1751
+ position: relative;
1752
+ background-color: #fcfcfc;
1753
+ border-bottom: 1px solid #ddd;
1754
+ height: 36px;
1755
+ font-size: 16px;
1756
+ font-weight: 600;
1757
+ line-height: 36px;
1758
+ margin: 0;
1759
+ padding: 0 36px 0 16px;
1760
+ }
1761
+
1762
+ .spftestimonial-modal-header {
1763
+ width: 100%;
1764
+ padding: 16px 0;
1765
+ background-color: #f5f5f5;
1766
+ border-bottom: 1px solid #eee;
1767
+ }
1768
+ .spftestimonial-modal-header select {
1769
+ display: block;
1770
+ width: 250px;
1771
+ margin: 0 auto;
1772
+ background-color: #fff;
1773
+ }
1774
+
1775
+ .spftestimonial-modal-close {
1776
+ color: #666;
1777
+ padding: 0;
1778
+ position: absolute;
1779
+ top: 0;
1780
+ right: 0;
1781
+ width: 36px;
1782
+ height: 36px;
1783
+ text-align: center;
1784
+ background: none;
1785
+ border: none;
1786
+ cursor: pointer;
1787
+ }
1788
+ .spftestimonial-modal-close:before {
1789
+ font: normal 20px/36px dashicons;
1790
+ content: "\f158";
1791
+ vertical-align: top;
1792
+ width: 36px;
1793
+ height: 36px;
1794
+ }
1795
+ .spftestimonial-modal-close:hover {
1796
+ opacity: 0.5;
1797
+ }
1798
+
1799
+ .spftestimonial-modal-insert-wrapper {
1800
+ text-align: center;
1801
+ width: 100%;
1802
+ padding: 16px 0;
1803
+ background-color: #f5f5f5;
1804
+ border-top: 1px solid #eee;
1805
+ }
1806
+
1807
+ .spftestimonial-modal-overlay {
1808
+ position: absolute;
1809
+ top: 0;
1810
+ left: 0;
1811
+ width: 100%;
1812
+ height: 100%;
1813
+ background-color: #000;
1814
+ opacity: 0.5;
1815
+ }
1816
+
1817
+ /**
1818
+ * 08. Helper
1819
+ */
1820
+ .spftestimonial-text-desc,
1821
+ .spftestimonial-text-subtitle {
1822
+ font-weight: 400;
1823
+ margin-top: 10px;
1824
+ color: #999;
1825
+ font-style: italic;
1826
+ }
1827
+
1828
+ .spftestimonial-text-success {
1829
+ color: #2b542c;
1830
+ }
1831
+
1832
+ .spftestimonial-text-error {
1833
+ color: #d02c21;
1834
+ }
1835
+
1836
+ .spftestimonial-text-info {
1837
+ color: #31708f;
1838
+ }
1839
+
1840
+ .spftestimonial-text-warning {
1841
+ color: #ffb900;
1842
+ }
1843
+
1844
+ .spftestimonial-text-muted {
1845
+ color: #aaa;
1846
+ }
1847
+
1848
+ .spftestimonial-text-left {
1849
+ text-align: left;
1850
+ }
1851
+
1852
+ .spftestimonial-text-center {
1853
+ text-align: center;
1854
+ }
1855
+
1856
+ .spftestimonial-text-right {
1857
+ text-align: right;
1858
+ }
1859
+
1860
+ .spftestimonial-block-left {
1861
+ float: left;
1862
+ }
1863
+
1864
+ .spftestimonial-block-right {
1865
+ float: right;
1866
+ }
1867
+
1868
+ .spftestimonial-full-width {
1869
+ width: 100%;
1870
+ }
1871
+
1872
+ .spftestimonial-full-half {
1873
+ width: 50%;
1874
+ }
1875
+
1876
+ .spftestimonial-table {
1877
+ width: 100%;
1878
+ display: table;
1879
+ }
1880
+
1881
+ .spftestimonial-table-cell {
1882
+ display: table-cell;
1883
+ vertical-align: middle;
1884
+ }
1885
+
1886
+ .spftestimonial-table-expanded {
1887
+ width: 100%;
1888
+ }
1889
+
1890
+ .spftestimonial-nowrap {
1891
+ white-space: nowrap;
1892
+ }
1893
+
1894
+ .spftestimonial-text-highlight {
1895
+ padding: 2px 4px;
1896
+ font-size: 90%;
1897
+ color: #c7254e;
1898
+ background-color: #f9f2f4;
1899
+ -moz-border-radius: 2px;
1900
+ -webkit-border-radius: 2px;
1901
+ border-radius: 2px;
1902
+ }
1903
+
1904
+ .spftestimonial-text-highlight-gray {
1905
+ padding: 2px 4px;
1906
+ font-size: 90%;
1907
+ background-color: #f0f0f0;
1908
+ -moz-border-radius: 2px;
1909
+ -webkit-border-radius: 2px;
1910
+ border-radius: 2px;
1911
+ }
1912
+
1913
+ .spftestimonial-hidden {
1914
+ display: none;
1915
+ }
1916
+
1917
+ .spftestimonial-hide {
1918
+ display: none !important;
1919
+ }
1920
+
1921
+ .spftestimonial-show {
1922
+ display: block !important;
1923
+ }
1924
+
1925
+ .spftestimonial-opacity {
1926
+ opacity: 0.5;
1927
+ }
1928
+
1929
+ .spftestimonial-warning-primary {
1930
+ color: #fff !important;
1931
+ border-color: #d02c21 #ba281e #ba281e !important;
1932
+ background: #e14d43 !important;
1933
+ -moz-box-shadow: 0 1px 0 #ba281e !important;
1934
+ -webkit-box-shadow: 0 1px 0 #ba281e !important;
1935
+ box-shadow: 0 1px 0 #ba281e !important;
1936
+ text-shadow: 0 -1px 1px #ba281e, 1px 0 1px #ba281e, 0 1px 1px #ba281e, -1px 0 1px !important;
1937
+ text-shadow: 0 -1px 1px #ba281e, 1px 0 1px #ba281e, 0 1px 1px #ba281e, -1px 0 1px #ba281e !important;
1938
+ }
1939
+ .spftestimonial-warning-primary:hover, .spftestimonial-warning-primary:focus {
1940
+ border-color: #ba281e !important;
1941
+ background: #e35950 !important;
1942
+ -moz-box-shadow: 0 1px 0 #ba281e !important;
1943
+ -webkit-box-shadow: 0 1px 0 #ba281e !important;
1944
+ box-shadow: 0 1px 0 #ba281e !important;
1945
+ }
1946
+ .spftestimonial-warning-primary:active {
1947
+ border-color: #ba281e !important;
1948
+ background: #d02c21 !important;
1949
+ -moz-box-shadow: inset 0 2px 0 #ba281e !important;
1950
+ -webkit-box-shadow: inset 0 2px 0 #ba281e !important;
1951
+ box-shadow: inset 0 2px 0 #ba281e !important;
1952
+ }
1953
+
1954
+ .spftestimonial-form-result {
1955
+ display: none;
1956
+ padding: 12px;
1957
+ margin: 0 0 15px 0;
1958
+ background-color: #fff;
1959
+ border-left: 4px solid #555;
1960
+ -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
1961
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
1962
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
1963
+ }
1964
+
1965
+ .spftestimonial-form-show {
1966
+ display: block;
1967
+ }
1968
+
1969
+ .spftestimonial-form-error {
1970
+ border-left-color: #dc3232;
1971
+ }
1972
+
1973
+ .spftestimonial-form-success {
1974
+ border-left-color: #46b450;
1975
+ }
1976
+
1977
+ .spftestimonial-form-warning {
1978
+ border-left-color: #ffb900;
1979
+ }
1980
+
1981
+ .spftestimonial-form-info {
1982
+ border-left-color: #00a0d2;
1983
+ }
1984
+
1985
+ .spftestimonial-label-error {
1986
+ position: relative;
1987
+ top: -2px;
1988
+ display: inline-block;
1989
+ font-size: 10px;
1990
+ line-height: 10px;
1991
+ height: 10px;
1992
+ width: 10px;
1993
+ padding: 1px;
1994
+ font-style: normal;
1995
+ text-align: center;
1996
+ color: #fff;
1997
+ vertical-align: middle;
1998
+ background-color: #e10000;
1999
+ -moz-border-radius: 2px;
2000
+ -webkit-border-radius: 2px;
2001
+ border-radius: 2px;
2002
+ }
2003
+
2004
+ .spftestimonial-no-option {
2005
+ padding: 30px;
2006
+ }
2007
+
2008
+ /**
2009
+ * 11. Responsive
2010
+ */
2011
+ @media only screen and (max-width: 1200px) {
2012
+ .spftestimonial-metabox .spftestimonial-field .spftestimonial-title {
2013
+ float: none;
2014
+ width: 100%;
2015
+ margin-bottom: 10px;
2016
+ }
2017
+ .spftestimonial-metabox .spftestimonial-field .spftestimonial-fieldset {
2018
+ margin-left: 0;
2019
+ }
2020
+ }
2021
+ @media only screen and (max-width: 782px) {
2022
+ .spftestimonial-header-inner {
2023
+ text-align: center;
2024
+ }
2025
+ .spftestimonial-header-inner h1 {
2026
+ width: 100%;
2027
+ margin-bottom: 10px;
2028
+ }
2029
+
2030
+ .spftestimonial-search,
2031
+ .spftestimonial-header-right,
2032
+ .spftestimonial-header-left {
2033
+ width: 100%;
2034
+ }
2035
+
2036
+ .spftestimonial-search {
2037
+ text-align: center;
2038
+ margin-bottom: 15px;
2039
+ }
2040
+
2041
+ .spftestimonial-footer {
2042
+ text-align: center;
2043
+ }
2044
+
2045
+ .spftestimonial-buttons {
2046
+ float: none;
2047
+ }
2048
+
2049
+ .spftestimonial-copyright {
2050
+ float: none;
2051
+ margin-top: 10px;
2052
+ }
2053
+
2054
+ .spftestimonial-nav,
2055
+ .spftestimonial-expand-all,
2056
+ .spftestimonial-reset-section,
2057
+ .spftestimonial-nav-background {
2058
+ display: none !important;
2059
+ }
2060
+
2061
+ .spftestimonial-content {
2062
+ margin-left: 0;
2063
+ }
2064
+
2065
+ .spftestimonial-section-title,
2066
+ .spftestimonial-section {
2067
+ display: block !important;
2068
+ }
2069
+
2070
+ .spftestimonial-field .spftestimonial-title {
2071
+ float: none;
2072
+ width: 100%;
2073
+ margin-bottom: 10px;
2074
+ }
2075
+ .spftestimonial-field .spftestimonial-fieldset {
2076
+ margin-left: 0;
2077
+ }
2078
+
2079
+ .spftestimonial-modal-inner {
2080
+ width: 350px;
2081
+ height: 380px;
2082
+ }
2083
+
2084
+ .spftestimonial-modal-content {
2085
+ height: 282px;
2086
+ }
2087
+
2088
+ .spftestimonial-icon-dialog .spftestimonial-modal-inner {
2089
+ width: 305px;
2090
+ height: 380px;
2091
+ }
2092
+ .spftestimonial-icon-dialog .spftestimonial-modal-content {
2093
+ height: 267px;
2094
+ }
2095
+
2096
+ .spftestimonial-modal-icon .spftestimonial-modal-inner {
2097
+ width: 330px;
2098
+ height: 385px;
2099
+ }
2100
+ .spftestimonial-modal-icon .spftestimonial-modal-content {
2101
+ height: 252px;
2102
+ }
2103
+
2104
+ .spftestimonial-profile > .spftestimonial-field > .spftestimonial-title {
2105
+ float: none;
2106
+ width: 100%;
2107
+ margin-bottom: 10px;
2108
+ }
2109
+ .spftestimonial-profile > .spftestimonial-field > .spftestimonial-fieldset {
2110
+ margin-left: 0;
2111
+ }
2112
+ }
2113
+ /**
2114
+ * Chosen JS Styles
2115
+ */
2116
+ .chosen-container {
2117
+ position: relative;
2118
+ display: inline-block;
2119
+ vertical-align: middle;
2120
+ font-size: 13px;
2121
+ user-select: none;
2122
+ }
2123
+
2124
+ .chosen-container * {
2125
+ box-sizing: border-box;
2126
+ }
2127
+
2128
+ .chosen-container .chosen-drop {
2129
+ position: absolute;
2130
+ top: 100%;
2131
+ z-index: 1010;
2132
+ width: 100%;
2133
+ border: 1px solid #aaa;
2134
+ border-top: 0;
2135
+ background: #fff;
2136
+ box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
2137
+ clip: rect(0, 0, 0, 0);
2138
+ clip-path: inset(100% 100%);
2139
+ }
2140
+
2141
+ .chosen-container.chosen-with-drop .chosen-drop {
2142
+ clip: auto;
2143
+ clip-path: none;
2144
+ }
2145
+
2146
+ .chosen-container a {
2147
+ cursor: pointer;
2148
+ }
2149
+
2150
+ .chosen-container .search-choice .group-name, .chosen-container .chosen-single .group-name {
2151
+ margin-right: 4px;
2152
+ overflow: hidden;
2153
+ white-space: nowrap;
2154
+ text-overflow: ellipsis;
2155
+ font-weight: normal;
2156
+ color: #999999;
2157
+ }
2158
+
2159
+ .chosen-container .search-choice .group-name:after, .chosen-container .chosen-single .group-name:after {
2160
+ content: ":";
2161
+ padding-left: 2px;
2162
+ vertical-align: top;
2163
+ }
2164
+
2165
+ .chosen-container-single .chosen-single {
2166
+ position: relative;
2167
+ display: block;
2168
+ overflow: hidden;
2169
+ padding: 0 0 0 8px;
2170
+ height: 25px;
2171
+ border: 1px solid #aaa;
2172
+ border-radius: 5px;
2173
+ background-color: #fff;
2174
+ background: linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
2175
+ background-clip: padding-box;
2176
+ box-shadow: 0 0 3px #fff inset, 0 1px 1px rgba(0, 0, 0, 0.1);
2177
+ color: #444;
2178
+ text-decoration: none;
2179
+ white-space: nowrap;
2180
+ line-height: 24px;
2181
+ }
2182
+
2183
+ .chosen-container-single .chosen-default {
2184
+ color: #999;
2185
+ }
2186
+
2187
+ .chosen-container-single .chosen-single span {
2188
+ display: block;
2189
+ overflow: hidden;
2190
+ margin-right: 26px;
2191
+ text-overflow: ellipsis;
2192
+ white-space: nowrap;
2193
+ }
2194
+
2195
+ .chosen-container-single .chosen-single-with-deselect span {
2196
+ margin-right: 38px;
2197
+ }
2198
+
2199
+ .chosen-container-single .chosen-single abbr {
2200
+ position: absolute;
2201
+ top: 6px;
2202
+ right: 26px;
2203
+ display: block;
2204
+ width: 12px;
2205
+ height: 12px;
2206
+ font-size: 1px;
2207
+ }
2208
+
2209
+ .chosen-container-single .chosen-single div {
2210
+ position: absolute;
2211
+ top: 0;
2212
+ right: 0;
2213
+ display: block;
2214
+ width: 18px;
2215
+ height: 100%;
2216
+ }
2217
+
2218
+ .chosen-container-single .chosen-single div b {
2219
+ display: block;
2220
+ width: 100%;
2221
+ height: 100%;
2222
+ }
2223
+
2224
+ .chosen-container-single .chosen-search {
2225
+ position: relative;
2226
+ z-index: 1010;
2227
+ margin: 0;
2228
+ padding: 3px 4px;
2229
+ white-space: nowrap;
2230
+ }
2231
+
2232
+ .chosen-container-single .chosen-search input[type="text"] {
2233
+ margin: 1px 0;
2234
+ padding: 4px 20px 4px 5px;
2235
+ width: 100%;
2236
+ height: auto;
2237
+ outline: 0;
2238
+ border: 1px solid #aaa;
2239
+ font-size: 1em;
2240
+ font-family: sans-serif;
2241
+ line-height: normal;
2242
+ border-radius: 0;
2243
+ }
2244
+
2245
+ .chosen-container-single .chosen-drop {
2246
+ margin-top: -1px;
2247
+ border-radius: 0 0 4px 4px;
2248
+ background-clip: padding-box;
2249
+ }
2250
+
2251
+ .chosen-container-single.chosen-container-single-nosearch .chosen-search {
2252
+ position: absolute;
2253
+ clip: rect(0, 0, 0, 0);
2254
+ clip-path: inset(100% 100%);
2255
+ }
2256
+
2257
+ .chosen-container .chosen-results {
2258
+ color: #444;
2259
+ position: relative;
2260
+ overflow-x: hidden;
2261
+ overflow-y: auto;
2262
+ margin: 0 4px 4px 0;
2263
+ padding: 0 0 0 4px;
2264
+ max-height: 240px;
2265
+ -webkit-overflow-scrolling: touch;
2266
+ }
2267
+
2268
+ .chosen-container .chosen-results li {
2269
+ display: none;
2270
+ margin: 0;
2271
+ padding: 5px 6px;
2272
+ list-style: none;
2273
+ line-height: 15px;
2274
+ word-wrap: break-word;
2275
+ -webkit-touch-callout: none;
2276
+ }
2277
+
2278
+ .chosen-container .chosen-results li.active-result {
2279
+ display: list-item;
2280
+ cursor: pointer;
2281
+ }
2282
+
2283
+ .chosen-container .chosen-results li.disabled-result {
2284
+ display: list-item;
2285
+ color: #ccc;
2286
+ cursor: default;
2287
+ }
2288
+
2289
+ .chosen-container .chosen-results li.highlighted {
2290
+ background-color: #3875d7;
2291
+ background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
2292
+ color: #fff;
2293
+ }
2294
+
2295
+ .chosen-container .chosen-results li.no-results {
2296
+ color: #777;
2297
+ display: list-item;
2298
+ background: #f4f4f4;
2299
+ }
2300
+
2301
+ .chosen-container .chosen-results li.group-result {
2302
+ display: list-item;
2303
+ font-weight: bold;
2304
+ cursor: default;
2305
+ }
2306
+
2307
+ .chosen-container .chosen-results li.group-option {
2308
+ padding-left: 15px;
2309
+ }
2310
+
2311
+ .chosen-container .chosen-results li em {
2312
+ font-style: normal;
2313
+ text-decoration: underline;
2314
+ }
2315
+
2316
+ .chosen-container-multi .chosen-choices {
2317
+ position: relative;
2318
+ overflow: hidden;
2319
+ margin: 0;
2320
+ padding: 0 5px;
2321
+ width: 100%;
2322
+ height: auto;
2323
+ border: 1px solid #aaa;
2324
+ background-color: #fff;
2325
+ background-image: linear-gradient(#eeeeee 1%, #ffffff 15%);
2326
+ cursor: text;
2327
+ }
2328
+
2329
+ .chosen-container-multi .chosen-choices li {
2330
+ float: left;
2331
+ list-style: none;
2332
+ }
2333
+
2334
+ .chosen-container-multi .chosen-choices li.search-field {
2335
+ margin: 0;
2336
+ padding: 0;
2337
+ white-space: nowrap;
2338
+ }
2339
+
2340
+ .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
2341
+ margin: 1px 0;
2342
+ padding: 0;
2343
+ height: 25px;
2344
+ outline: 0;
2345
+ border: 0 !important;
2346
+ background: transparent !important;
2347
+ box-shadow: none;
2348
+ color: #999;
2349
+ font-size: 100%;
2350
+ font-family: sans-serif;
2351
+ line-height: normal;
2352
+ border-radius: 0;
2353
+ width: 25px;
2354
+ }
2355
+
2356
+ .chosen-container-multi .chosen-choices li.search-choice {
2357
+ position: relative;
2358
+ margin: 3px 5px 3px 0;
2359
+ padding: 3px 20px 3px 6px;
2360
+ border: 1px solid #aaa;
2361
+ max-width: 100%;
2362
+ border-radius: 3px;
2363
+ background-color: #eeeeee;
2364
+ background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
2365
+ background-size: 100% 19px;
2366
+ background-repeat: repeat-x;
2367
+ background-clip: padding-box;
2368
+ box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
2369
+ color: #333;
2370
+ line-height: 13px;
2371
+ cursor: default;
2372
+ }
2373
+
2374
+ .chosen-container-multi .chosen-choices li.search-choice span {
2375
+ word-wrap: break-word;
2376
+ white-space: nowrap;
2377
+ }
2378
+
2379
+ .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
2380
+ position: absolute;
2381
+ top: 0;
2382
+ right: 0;
2383
+ display: block;
2384
+ width: 12px;
2385
+ height: 12px;
2386
+ font-size: 1px;
2387
+ }
2388
+
2389
+ .chosen-container-multi .chosen-choices li.search-choice-disabled {
2390
+ padding-right: 5px;
2391
+ border: 1px solid #ccc;
2392
+ background-color: #e4e4e4;
2393
+ background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
2394
+ color: #666;
2395
+ }
2396
+
2397
+ .chosen-container-multi .chosen-choices li.search-choice-focus {
2398
+ background: #d4d4d4;
2399
+ }
2400
+
2401
+ .chosen-container-multi .chosen-results {
2402
+ margin: 0;
2403
+ padding: 0;
2404
+ }
2405
+
2406
+ .chosen-container-multi .chosen-drop .result-selected {
2407
+ /* display: list-item; */
2408
+ color: #ccc;
2409
+ cursor: default;
2410
+ }
2411
+
2412
+ .chosen-container-active .chosen-single {
2413
+ border: 1px solid #5897fb;
2414
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
2415
+ }
2416
+
2417
+ .chosen-container-active.chosen-with-drop .chosen-single {
2418
+ border: 1px solid #aaa;
2419
+ border-bottom-right-radius: 0;
2420
+ border-bottom-left-radius: 0;
2421
+ background-image: linear-gradient(#eeeeee 20%, #ffffff 80%);
2422
+ box-shadow: 0 1px 0 #fff inset;
2423
+ }
2424
+
2425
+ .chosen-container-active.chosen-with-drop .chosen-single div {
2426
+ border-left: none;
2427
+ background: transparent;
2428
+ }
2429
+
2430
+ .chosen-container-active .chosen-choices {
2431
+ border: 1px solid #5897fb;
2432
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
2433
+ }
2434
+
2435
+ .chosen-container-active .chosen-choices li.search-field input[type="text"] {
2436
+ color: #222 !important;
2437
+ }
2438
+
2439
+ .chosen-disabled {
2440
+ opacity: 0.5 !important;
2441
+ cursor: default;
2442
+ }
2443
+
2444
+ .chosen-disabled .chosen-single {
2445
+ cursor: default;
2446
+ }
2447
+
2448
+ .chosen-disabled .chosen-choices .search-choice .search-choice-close {
2449
+ cursor: default;
2450
+ }
2451
+
2452
+ .chosen-rtl {
2453
+ text-align: right;
2454
+ }
2455
+
2456
+ .chosen-rtl .chosen-single {
2457
+ overflow: visible;
2458
+ padding: 0 8px 0 0;
2459
+ }
2460
+
2461
+ .chosen-rtl .chosen-single span {
2462
+ margin-right: 0;
2463
+ margin-left: 26px;
2464
+ direction: rtl;
2465
+ }
2466
+
2467
+ .chosen-rtl .chosen-single-with-deselect span {
2468
+ margin-left: 38px;
2469
+ }
2470
+
2471
+ .chosen-rtl .chosen-single div {
2472
+ right: auto;
2473
+ left: 3px;
2474
+ }
2475
+
2476
+ .chosen-rtl .chosen-single abbr {
2477
+ right: auto;
2478
+ left: 26px;
2479
+ }
2480
+
2481
+ .chosen-rtl .chosen-choices li {
2482
+ float: right;
2483
+ }
2484
+
2485
+ .chosen-rtl .chosen-choices li.search-field input[type="text"] {
2486
+ direction: rtl;
2487
+ }
2488
+
2489
+ .chosen-rtl .chosen-choices li.search-choice {
2490
+ margin: 3px 5px 3px 0;
2491
+ padding: 3px 5px 3px 19px;
2492
+ }
2493
+
2494
+ .chosen-rtl .chosen-choices li.search-choice .search-choice-close {
2495
+ right: auto;
2496
+ left: 4px;
2497
+ }
2498
+
2499
+ .chosen-rtl.chosen-container-single .chosen-results {
2500
+ margin: 0 0 4px 4px;
2501
+ padding: 0 4px 0 0;
2502
+ }
2503
+
2504
+ .chosen-rtl .chosen-results li.group-option {
2505
+ padding-right: 15px;
2506
+ padding-left: 0;
2507
+ }
2508
+
2509
+ .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
2510
+ border-right: none;
2511
+ }
2512
+
2513
+ .chosen-rtl .chosen-search input[type="text"] {
2514
+ padding: 4px 5px 4px 20px;
2515
+ direction: rtl;
2516
+ }
2517
+
2518
+ /* Rating */
2519
+ .sp-tpro-client-rating{
2520
+ float: left;
2521
+ }
2522
+ .sp-tpro-client-rating:not(:checked) > input {
2523
+ visibility:hidden;
2524
+ display: none;
2525
+ width:0;
2526
+ height:0;
2527
+ float: right;;
2528
+ top: 100%;
2529
+ clip: rect(0,0,0,0);
2530
+ margin: 0;
2531
+ padding: 0;
2532
+ border:10px #fff solid;
2533
+ }
2534
+
2535
+ .sp-tpro-client-rating:not(:checked) > label {
2536
+ float: right;
2537
+ display: block;
2538
+ padding: 0;
2539
+ margin: 0;
2540
+ cursor: pointer;
2541
+ font-size: 150%;
2542
+ line-height: 1.2;
2543
+ color: #d4d4d4;
2544
+ width: 1em;
2545
+ }
2546
+
2547
+ .sp-tpro-client-rating > input:checked ~ label {
2548
+ color: #f3bb00;
2549
+ }
2550
+
2551
+ .sp-tpro-client-rating:not(:checked) > label:hover,
2552
+ .sp-tpro-client-rating:not(:checked) > label:hover ~ label {
2553
+ color: #de7202;
2554
+ }
2555
+
2556
+ .sp-tpro-client-rating > input:checked + label:hover,
2557
+ .sp-tpro-client-rating > input:checked + label:hover ~ label,
2558
+ .sp-tpro-client-rating > input:checked ~ label:hover,
2559
+ .sp-tpro-client-rating > input:checked ~ label:hover ~ label,
2560
+ .sp-tpro-client-rating > label:hover ~ input:checked ~ label {
2561
+ color: #de7202;
2562
+ }
2563
+
2564
+ /*ShortCode Area*/
2565
+ .spftestimonial-metabox .sp-tpro-banner {
2566
+ background-color:#2684a6;
2567
+ padding: 22px 28px;
2568
+ overflow: hidden;
2569
+ background-image: -webkit-gradient(linear,left top,right top,from(#2684a6),to(#52b3d9));
2570
+ background-image: linear-gradient(to right, #2684a6,#52b3d9);
2571
+ }
2572
+ .spftestimonial-metabox .sp-tpro-logo{
2573
+ float: left;
2574
+ }
2575
+ .spftestimonial-metabox .sp-tpro-logo img{
2576
+ display: block;
2577
+ width: 182px;
2578
+ }
2579
+ .spftestimonial-metabox .sp-tpro-short-links{
2580
+ float: right;
2581
+ line-height: 30px;
2582
+ }
2583
+ .spftestimonial-metabox .sp-tpro-short-links a{
2584
+ color: #ffffff;
2585
+ text-decoration: none;
2586
+ margin-left: 16px;
2587
+ font-size: 15px;
2588
+ }
2589
+ .spftestimonial-metabox .sp-tpro-short-links a i.fa{
2590
+ margin-right: 7px;
2591
+ }
2592
+ .sp-testimonial-shortcode-divider {
2593
+ height: 20px;
2594
+ background: #f1f1f1;
2595
+ border-top: 1px solid #dddddd;
2596
+ }
2597
+ .spftestimonial-metabox .tpro_shortcode{
2598
+ display: inline-flex;
2599
+ width:100%;
2600
+ background-color: #fffdfd;
2601
+ }
2602
+ .tpro_shortcode .tpro-col-lg-3 {
2603
+ border-right: 1px solid #dddddd;
2604
+ width: 33.33%;
2605
+ }
2606
+ .tpro_shortcode .tpro-col-lg-3 .tpro_shortcode_content{
2607
+ padding: 42px 16px;
2608
+ }
2609
+ .tpro_shortcode .tpro-col-lg-3:last-child .tpro_shortcode_content{
2610
+ padding: 42px 16px 0 16px;
2611
+ }
2612
+ .tpro_shortcode .tpro-col-lg-3 .tpro_shortcode_content .tpro-sc-code{
2613
+ background-color: rgba(82, 179, 217, 0.11);
2614
+ padding: 10px 15px;
2615
+ display: inline-block;
2616
+ }
2617
+ .tpro_shortcode .tpro-col-lg-3:last-child {
2618
+ border-right: none;
2619
+ }
2620
+ .tpro_shortcode .tpro-col-lg-3 .tpro-shortcode-title {
2621
+ font-weight: 500;
2622
+ font-size: 17px !important;
2623
+ padding-top: 0 !important;
2624
+ color: #4c5158;
2625
+ }
2626
+ .tpro_shortcode .tpro-col-lg-3 p {
2627
+ margin-top: 2px;
2628
+ color: #4c5158;
2629
+ }
2630
+ .tpro_shortcode .tpro-col-lg-3 .back-image {
2631
+ max-width: 100%;
2632
+ display: block;
2633
+ margin: 0 auto;
2634
+ }
2635
+ .tpro_shortcode .tpro-col-lg-3 textarea {
2636
+ border-color: transparent;
2637
+ box-shadow: none;
2638
+ background-color: #eee;
2639
+ padding: 4px 6px;
2640
+ resize: none;
2641
+ text-align: center;
2642
+ max-width: 100%;
2643
+ }
2644
+
2645
+ /**
2646
+ Upgrade to Pro
2647
+ */
2648
+ #poststuff .sp-tfree-upgrade-body .sp-tfree-section-title {
2649
+ padding: 13px 30px;
2650
+ font-size: 28px;
2651
+ line-height: 1;
2652
+ font-weight: 700;
2653
+ color: #2e9cc7;
2654
+ text-transform: uppercase;
2655
+ margin-bottom: 0;
2656
+ margin-top: 0;
2657
+ }
2658
+
2659
+ #poststuff .sp-tfree-upgrade-body .sp-tfree-section-feature-icon {
2660
+ padding: 30px 30px 0 30px;
2661
+ }
2662
+
2663
+ .sp-tfree-upgrade-body .tfree-option {
2664
+ padding: 30px 30px;
2665
+ border-bottom: 1px solid #efefef;
2666
+ }
2667
+
2668
+ .sp-tfree-upgrade-body .tfree-option:nth-child(2n+0) {
2669
+ background-color: #fafafa;
2670
+ }
2671
+
2672
+ .sp-tfree-upgrade-header .tfree-overlay-color {
2673
+ background: #2684a6;
2674
+ position: absolute;
2675
+ width: 100%;
2676
+ height: 100%;
2677
+ top: 0;
2678
+ left: 0;
2679
+ z-index: 1;
2680
+ }
2681
+
2682
+ .sp-tfree-upgrade-header {
2683
+ overflow: hidden;
2684
+ padding: 43px 40px;
2685
+ position: relative;
2686
+ }
2687
+
2688
+ .sp-tfree-upgrade-header .sp-tfree-container {
2689
+ position: relative;
2690
+ z-index: 2;
2691
+ }
2692
+
2693
+ .sp-tfree-upgrade-header .free-upgrade-btn {
2694
+ font-size: 15px;
2695
+ color: #ffffff;
2696
+ border-radius: 0;
2697
+ border: 0;
2698
+ height: auto !important;
2699
+ line-height: 24px !important;
2700
+ padding: 13px 18px !important;
2701
+ text-align: center;
2702
+ font-weight: 500;
2703
+ }
2704
+
2705
+ .sp-tfree-upgrade-header .sp-tfree-col-lg-7 {
2706
+ width: 58.33333333%;
2707
+ float: left;
2708
+ }
2709
+
2710
+ .sp-tfree-upgrade-header .sp-tfree-col-lg-5 {
2711
+ width: 41.66666667%;
2712
+ float: left;
2713
+ text-align: right;
2714
+ }
2715
+
2716
+ .sp-tfree-upgrade-header .sp-tfree-upgrade-title {
2717
+ margin: 0;
2718
+ padding: 0;
2719
+ font-size: 24px;
2720
+ font-weight: 700;
2721
+ color: #ffffff;
2722
+ }
2723
+
2724
+ .sp-tfree-upgrade-header .sp-tfree-upgrade-subtitle {
2725
+ font-size: 15px;
2726
+ font-weight: 500;
2727
+ margin-top: 10px;
2728
+ margin-bottom: 0;
2729
+ color: #ffffff;
2730
+ }
2731
+
2732
+ .sp-tfree-upgrade-footer .free-upgrade-btn.upgrade-btn,
2733
+ .sp-tfree-upgrade-footer .free-upgrade-btn.demo-btn {
2734
+ font-family: 'Raleway', sans-serif;
2735
+ box-shadow: none;
2736
+ border: 0;
2737
+ color: #fff;
2738
+ border-radius: 0;
2739
+ font-size: 16px;
2740
+ font-weight: 500;
2741
+ height: auto !important;
2742
+ line-height: 24px !important;
2743
+ padding: 13px 20px !important;
2744
+ text-align: center;
2745
+ }
2746
+
2747
+ .sp-tfree-upgrade-header .upgrade-btn,
2748
+ .sp-tfree-upgrade-footer .upgrade-btn {
2749
+ background-color: #3cb371;
2750
+ box-shadow: 0px 1px 26px -3px #333333;
2751
+ margin-right: 14px;
2752
+ }
2753
+
2754
+ .sp-tfree-upgrade-header .upgrade-btn:hover,
2755
+ .sp-tfree-upgrade-footer .upgrade-btn:hover,
2756
+ .sp-tfree-upgrade-footer .free-upgrade-btn.upgrade-btn:focus,
2757
+ .sp-tfree-upgrade-header .free-upgrade-btn.upgrade-btn:focus {
2758
+ background: #26a55f;
2759
+ color: #fff;
2760
+ }
2761
+
2762
+ .sp-tfree-upgrade-header .demo-btn,
2763
+ .sp-tfree-upgrade-footer .demo-btn {
2764
+ background-color: #52b3d9;
2765
+ box-shadow: 0px 1px 26px -3px #333333;
2766
+ }
2767
+
2768
+ .sp-tfree-upgrade-header .demo-btn:hover,
2769
+ .sp-tfree-upgrade-footer .demo-btn:hover,
2770
+ .sp-tfree-upgrade-footer .free-upgrade-btn.demo-btn:focus,
2771
+ .sp-tfree-upgrade-header .free-upgrade-btn.demo-btn:focus {
2772
+ background: #2e9cc7;
2773
+ color: #fff;
2774
+ }
2775
+
2776
+ .sp-tfree-upgrade-header h1,
2777
+ .sp-tfree-upgrade-header h4,
2778
+ .sp-tfree-upgrade-footer h2,
2779
+ .sp-tfree-upgrade-header p {
2780
+ color: #fff;
2781
+ font-family: 'Raleway', sans-serif;
2782
+ }
2783
+
2784
+ #poststuff .sp-tfree-mbf-tab-content .sp-tfree-upgrade-body .sp-tfree-col-lg-2 h2 {
2785
+ font-size: 28px;
2786
+ padding-top: 40px;
2787
+ padding-left: 0;
2788
+ text-transform: uppercase;
2789
+ font-weight: 700;
2790
+ padding-bottom: 0;
2791
+ }
2792
+
2793
+ #poststuff .sp-tfree-mbf-tab-content .sp-tfree-upgrade-body .sp-tfree-col-lg-2 h4{
2794
+ line-height: 24px;
2795
+ }
2796
+
2797
+ .sp-tfree-mbf-tab-content .sp-tfree-upgrade-body .sp-tfree-col-lg-2 h4 {
2798
+ font-size: 20px;
2799
+ font-weight: 600;
2800
+ margin-bottom: 20px;
2801
+ line-height: 1.1;
2802
+ }
2803
+
2804
+ #poststuff .sp-tfree-mbf-tab-content .sp-tfree-upgrade-body .sp-tfree-col-lg-2 h2,
2805
+ .sp-tfree-mbf-tab-content .sp-tfree-upgrade-body .sp-tfree-col-lg-2 h4 {
2806
+ color: #7c848e;
2807
+ }
2808
+
2809
+ .sp-tfree-mbf-tab-content .sp-tfree-upgrade-body .sp-tfree-col-lg-2 p {
2810
+ font-size: 15px;
2811
+ color: #444;
2812
+ margin-top: 10px;
2813
+ }
2814
+
2815
+ .sp-tfree-mbf-tab-content .sp-tfree-col-lg-2 {
2816
+ width: 50%;
2817
+ float: left;
2818
+ }
2819
+
2820
+ .sp-tfree-mbf-tab-content .sp-tfree-col-lg-2 .sp-tfree-content {
2821
+ font-family: 'Raleway', sans-serif;
2822
+ padding: 25px;
2823
+ }
2824
+
2825
+ .sp-tfree-mbf-tab-content .sp-tfree-col-lg-2 img {
2826
+ width: 100%;
2827
+ }
2828
+
2829
+ .sp-tfree-mbf-tab-content .sp-tfree-col-lg-2 .sp-tfree-content img {
2830
+ box-shadow: 0px 0px 20px 0px #aaaaaa;
2831
+ }
2832
+
2833
+ .sp-tfree-mbf-tab-content .sp-tfree-col-lg-2 h4 {
2834
+ margin-top: 0.33em;
2835
+ }
2836
+
2837
+ .sp-tfree-mbf-tab-content .tfree-option:after {
2838
+ content: "";
2839
+ display: table;
2840
+ clear: both;
2841
+ }
2842
+
2843
+ .sp-tfree-mbf-tab-content .sp-tfree-video-tutorial {
2844
+ padding: 30px 80px 50px;
2845
+ }
2846
+
2847
+ .sp-tfree-mbf-tab-content .sp-tfree-video-tutorial-video {
2848
+ position: relative;
2849
+ padding-bottom: 56.4%;
2850
+ width: 100%;
2851
+ max-width: 100%;
2852
+ height: 0;
2853
+ text-align: center;
2854
+ }
2855
+
2856
+ .sp-tfree-mbf-tab-content .sp-tfree-video-tutorial-video iframe {
2857
+ position: absolute;
2858
+ top: 0;
2859
+ left: 0;
2860
+ width: 100%;
2861
+ height: 100%;
2862
+ }
2863
+
2864
+ #poststuff .sp-tfree-mbf-tab-content .sp-tfree-video-tutorial h2 {
2865
+ font-size: 30px;
2866
+ font-weight: 600;
2867
+ color: #444444;
2868
+ margin-bottom: 20px;
2869
+ }
2870
+
2871
+ .sp-tfree-mbf-tab-content .tfree-option:after, .sp-tfree-mbf-tab-content .tfree-option:before {
2872
+ -webkit-box-sizing: border-box;
2873
+ -moz-box-sizing: border-box;
2874
+ box-sizing: border-box;
2875
+ }
2876
+
2877
+ .sp-tfree-upgrade-footer {
2878
+ padding: 60px 40px 40px 40px;
2879
+ }
2880
+
2881
+ .sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer {
2882
+ font-family: 'Raleway', sans-serif;
2883
+ color: #fff;
2884
+ position: relative;
2885
+ z-index: 1;
2886
+ }
2887
+
2888
+ .sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer .tfree-overlay-color {
2889
+ position: absolute;
2890
+ width: 100%;
2891
+ height: 100%;
2892
+ top: 0px;
2893
+ left: 0px;
2894
+ z-index: -1;
2895
+ background: #2684a6;
2896
+ }
2897
+
2898
+ #poststuff .sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer h2 {
2899
+ font-size: 28px;
2900
+ margin-top: 12px;
2901
+ font-weight: 700;
2902
+ }
2903
+
2904
+ .sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer p {
2905
+ margin-top: 0;
2906
+ }
2907
+
2908
+ .sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer p {
2909
+ margin-top: 0;
2910
+ margin-bottom: 34px;
2911
+ }
2912
+
2913
+ .sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer a {
2914
+ margin-bottom: 20px;
2915
+ }
2916
+
2917
+ .sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer p {
2918
+ font-size: 18px;
2919
+ font-weight: 500;
2920
+ }
2921
+
2922
+ /* Responsive */
2923
+ @media (max-width: 1200px) {
2924
+ .sp-tfree-metabox-framework .sp-tfree-mbf {
2925
+ display: block;
2926
+ }
2927
+
2928
+ .sp-tfree-mbf-tab-content .sp-tfree-col-lg-2 {
2929
+ width: 100%;
2930
+ float: none;
2931
+ }
2932
+
2933
+ #poststuff .sp-tfree-mbf-tab-content .sp-tfree-upgrade-body .sp-tfree-col-lg-2 h2 {
2934
+ padding-top: 0;
2935
+ }
2936
+
2937
+ .sp-tfree-mbf-tab-content .sp-tfree-col-lg-2:last-of-type .sp-tfree-content {
2938
+ padding-top: 0;
2939
+ padding-bottom: 40px;
2940
+ }
2941
+
2942
+ .sp-tfree-mbf .sp-tfree-col-lg-3,
2943
+ .sp-tfree-element .sp-tfree-input-label,
2944
+ .sp-tfree-element .sp-tfree-input-field {
2945
+ width: 100%;
2946
+ }
2947
+
2948
+ .sp-tfree-mbf .sp-tfree-col-lg-3 {
2949
+ display: block;
2950
+ border-bottom: 1px solid #e5e5e5;
2951
+ padding-bottom: 15px;
2952
+ border-right: none;
2953
+ }
2954
+
2955
+ .sp-tfree-mbf .sp-tfree-col-lg-3:last-of-type {
2956
+ border-bottom: none;
2957
+ padding-bottom: 0;
2958
+ }
2959
+ .sp-tfree-upgrade-header .sp-tfree-col-lg-7 {
2960
+ width: 100%;
2961
+ float: none;
2962
+ }
2963
+ .sp-tfree-upgrade-header .sp-tfree-col-lg-5 {
2964
+ width: 100%;
2965
+ float: none;
2966
+ text-align: center;
2967
+ }
2968
+ .sp-tfree-upgrade-header .sp-tfree-container {
2969
+ text-align: center;
2970
+ }
2971
+ .sp-tfree-upgrade-header .sp-tfree-upgrade-subtitle {
2972
+ margin-bottom: 20px;
2973
+ }
2974
+ }
2975
+
2976
+ @media (max-width: 1024px) {
2977
+ .sp-tfree-upgrade-header .demo-btn,
2978
+ .sp-tfree-upgrade-footer .demo-btn,
2979
+ .sp-tfree-upgrade-header .upgrade-btn,
2980
+ .sp-tfree-upgrade-footer .upgrade-btn {
2981
+ margin: 0 auto;
2982
+ display: block;
2983
+ }
2984
+
2985
+ .sp-tfree-mbf-tab-content .sp-tfree-upgrade-header a.upgrade-btn,
2986
+ .sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer a.upgrade-btn,
2987
+ .sp-tfree-upgrade-header .sp-tfree-upgrade-subtitle {
2988
+ margin-bottom: 20px;
2989
+ }
2990
+
2991
+ .sp-tfree-upgrade-header .sp-tfree-col-lg-7 {
2992
+ width: 100%;
2993
+ float: none;
2994
+ }
2995
+
2996
+ .sp-tfree-upgrade-header .sp-tfree-col-lg-5 {
2997
+ width: 100%;
2998
+ float: none;
2999
+ text-align: center;
3000
+ }
3001
+
3002
+ .sp-tfree-upgrade-header .sp-tfree-container {
3003
+ text-align: center;
3004
+ }
3005
+ }
3006
+
3007
+ /* Custom */
3008
+ .sp-testimonial-shortcode {
3009
+ background-color: rgba(82, 179, 217, 0.11);
3010
+ padding: 8px 12px;
3011
+ display: inline-block;
3012
+ margin-left: 8px;
3013
+ }
3014
+ .selectable {
3015
+ -webkit-touch-callout: all;
3016
+ -webkit-user-select: all;
3017
+ -khtml-user-select: all;
3018
+ -moz-user-select: all;
3019
+ -ms-user-select: all;
3020
+ user-select: all;
3021
+ }
3022
+ .js #sp_tpro_shortcode_options.postbox .handlediv, .js #sp_tpro_shortcode_options.postbox .hndle,
3023
+ .js #sp_tpro_meta_options.postbox .handlediv, .js #sp_tpro_meta_options.postbox .hndle {
3024
+ display: none;
3025
+ }
3026
+ .sp-testimonial-font-load .spftestimonial--switcher,
3027
+ .sp-testimonial-font-color .wp-picker-container {
3028
+ pointer-events: none;
3029
+ opacity: .6;
3030
+ }
3031
+ #sp_tpro_shortcode_options .spftestimonial-metabox .spftestimonial-nav ul li:last-of-type a {
3032
+ background-color: #35b135;
3033
+ }
3034
+ #sp_tpro_shortcode_options .spftestimonial-metabox .spftestimonial-nav ul li:last-of-type .spftestimonial-section-active {
3035
+ color: #35b135;
3036
+ background-color: #fff;
3037
+ box-shadow: 0 3px 0 0 #35b135 inset;
3038
+ }
3039
+ #sp_tpro_shortcode_options .spftestimonial-metabox .spftestimonial-nav ul li:last-of-type .spftestimonial-section-active .fa{
3040
+ color: #35b135;
3041
+ }
3042
+ #sp_tpro_shortcode_options .spftestimonial-field.spftestimonial-field-upgrade {
3043
+ padding: 0;
3044
+ }
admin/views/tp-metabox/assets/css/spftestimonial.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .spftestimonial{position:relative}.spftestimonial label{padding:0;margin:0;display:inline-block}.spftestimonial-ab-icon{top:2px}.text-center{text-align:center}#screen-meta-links+.spftestimonial-options{margin-top:40px}.spftestimonial-options{margin-top:20px;margin-right:20px}.spftestimonial-header{position:relative}.spftestimonial-header-inner{padding:25px}.spftestimonial-header-inner h1{color:#444;float:left;font-size:22px;line-height:26px;font-weight:600;margin:0}.spftestimonial-header-inner h1 small{font-size:11px;font-weight:500}.spftestimonial-sticky .spftestimonial-header-inner{position:fixed;z-index:20;top:32px;-moz-box-shadow:0 5px 25px rgba(0,0,0,.125);-webkit-box-shadow:0 5px 25px rgba(0,0,0,.125);box-shadow:0 5px 25px rgba(0,0,0,.125)}.spftestimonial-buttons{float:right;-moz-transition:opacity .2s;-o-transition:opacity .2s;-webkit-transition:opacity .2s;transition:opacity .2s}.spftestimonial-buttons .button{margin:0 2px;line-height:26px}.spftestimonial-header-left{float:left}.spftestimonial-header-right{float:right}.spftestimonial-nav{display:block;position:relative;z-index:10;float:left;width:225px}.spftestimonial-metabox .spftestimonial-nav{position:inherit;float:none;width:100%;background:#f1f1f1}.spftestimonial-nav ul{clear:left;margin:0;list-style-type:none}.spftestimonial-nav ul li{margin-bottom:0}.spftestimonial-metabox .spftestimonial-nav ul li{display:inline-block}.spftestimonial-nav ul li a{font-size:13px;position:relative;display:block;padding:14px 12px;text-transform:uppercase;font-weight:600;text-decoration:none;-moz-transition:all .3s ease;-o-transition:all .3s ease;-webkit-transition:all .3s ease;transition:all .3s ease}.spftestimonial-nav ul li a:focus{outline:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.spftestimonial-nav ul li .spftestimonial-arrow:after{content:"\f054";display:inline-block;font-family:FontAwesome;font-size:9px;line-height:1;position:absolute;right:10px;top:50%;margin-top:-4px;-moz-transform:rotate(0);-ms-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}.spftestimonial-nav ul li.spftestimonial-tab-active .spftestimonial-arrow:after{-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-webkit-transform:rotate(90deg);transform:rotate(90deg)}.spftestimonial-nav ul li.spftestimonial-tab-active ul{display:block}.spftestimonial-nav ul ul{display:none;position:relative}.spftestimonial-nav ul ul li a{font-size:12px;padding:12px 14px 12px 24px}.spftestimonial-nav .fa{width:20px;margin-right:5px;font-size:14px;text-align:center}.spftestimonial-nav .spftestimonial-label-error{margin-left:4px;vertical-align:top}.spftestimonial-nav-background{position:absolute;top:0;left:0;bottom:0;z-index:9;width:225px}.spftestimonial-wrapper{position:relative}.spftestimonial-content{position:relative;margin-left:225px;background-color:#fff;-moz-transition:opacity .2s;-o-transition:opacity .2s;-webkit-transition:opacity .2s;transition:opacity .2s}.spftestimonial-metabox .spftestimonial-content{margin-left:0}.spftestimonial-sections{float:left;width:100%}.spftestimonial-section{display:none}.spftestimonial-section-title{display:none;padding:20px 30px;background-color:#f5f5f5;border-top:1px solid #eee;border-bottom:1px solid #eee}.spftestimonial-section-title h3{margin:0;padding:0;font-size:13px;font-weight:700;text-transform:uppercase}.spftestimonial-section-title .fa{margin-right:5px}.spftestimonial-footer{padding:20px;font-size:11px}.spftestimonial-copyright{float:left;margin-top:5px}.spftestimonial-search-all .spftestimonial-nav,.spftestimonial-search-all .spftestimonial-nav-background,.spftestimonial-show-all .spftestimonial-nav,.spftestimonial-show-all .spftestimonial-nav-background{display:none}.spftestimonial-search-all .spftestimonial-content,.spftestimonial-show-all .spftestimonial-content{margin-left:0}.spftestimonial-search-all .spftestimonial-section,.spftestimonial-search-all .spftestimonial-section-title,.spftestimonial-show-all .spftestimonial-section,.spftestimonial-show-all .spftestimonial-section-title{display:block!important}.spftestimonial-search-all .spftestimonial-section-title{display:none!important}.spftestimonial-expand-all{float:left;padding:0 8px;margin-right:4px;z-index:1;font-size:14px;line-height:29px;cursor:pointer;-webkit-user-select:none;user-select:none;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-transition:all .2s;-o-transition:all .2s;-webkit-transition:all .2s;transition:all .2s}.spftestimonial-expand-all span{font-size:11px;vertical-align:middle}.spftestimonial-search{float:left}.spftestimonial-search input{margin:0 2px 0 0;border:none;font-size:12px;line-height:29px;text-align:inherit;padding:0 10px;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.spftestimonial-search input:focus{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.spftestimonial-saving .spftestimonial-buttons,.spftestimonial-saving .spftestimonial-content{cursor:default;pointer-events:none;opacity:.75}.spftestimonial-metabox{margin:-6px -12px -12px -12px}.spftestimonial-metabox .spftestimonial-section-title{padding:20px}.block-editor-page .spftestimonial-metabox{margin:-6px -14px -12px -14px}.spftestimonial-metabox-restore{text-align:right;padding:10px;border-top:1px solid #eee}.spftestimonial-metabox-restore .spftestimonial-button-cancel,.spftestimonial-metabox-restore input{display:none}.spftestimonial-metabox-restore span{-webkit-user-select:none;user-select:none}.spftestimonial-metabox-restore input:checked~.spftestimonial-button-restore{display:none}.spftestimonial-metabox-restore input:checked~.spftestimonial-button-cancel{display:inline-block}#side-sortables .spftestimonial-section-title{padding:12px}#side-sortables .spftestimonial-field{padding:12px}#side-sortables .spftestimonial-field .spftestimonial-title{float:none;width:100%;margin-bottom:10px}#side-sortables .spftestimonial-field .spftestimonial-fieldset{margin-left:0}#side-sortables .spftestimonial-notice{padding:12px}.spftestimonial-tooltip{position:absolute;z-index:5000001;font-size:12px;line-height:1.4;text-align:center;text-decoration:none;padding:6px 12px;max-width:200px;color:#fff;background-color:#000;background-color:rgba(0,0,0,.85);-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}.spftestimonial-theme-dark .spftestimonial-header-inner{background-color:#050505}.spftestimonial-theme-dark .spftestimonial-header-inner h1{color:#fff}.spftestimonial-theme-dark .spftestimonial-header-inner h1 small{color:#555}.spftestimonial-theme-dark .spftestimonial-expand-all{color:#999;background-color:#222}.spftestimonial-theme-dark .spftestimonial-expand-all:hover{color:#fff;background-color:#333}.spftestimonial-theme-dark .spftestimonial-search input{color:#fff;background-color:#222}.spftestimonial-theme-dark .spftestimonial-search:focus{background-color:#444}.spftestimonial-theme-dark .spftestimonial-search::-webkit-input-placeholder{color:#666}.spftestimonial-metabox .spftestimonial-nav ul li a{background-color:#52b3d9;font-size:14px;padding:15px 15px;line-height:1.4;color:#fff;border-right:1px solid #e2e2e1;font-weight:600}#sp_tpro_shortcode_options_new .spftestimonial-metabox .spftestimonial-nav ul li a{font-size:13px;text-transform:uppercase;padding:16px 15px}.spftestimonial-metabox .spftestimonial-nav ul li .spftestimonial-section-active{color:#444;background-color:#fff;box-shadow:0 3px 0 0 #52b3d9 inset}.spftestimonial-metabox .spftestimonial-nav ul li .spftestimonial-section-active .fa{color:#52b3d9}.spftestimonial-theme-dark .spftestimonial-nav ul ul li a{background-color:#191919;border-bottom:1px solid #2f2f2f}.spftestimonial-theme-dark .spftestimonial-nav ul ul li .spftestimonial-section-active{background-color:#101010}.spftestimonial-theme-dark .spftestimonial-nav ul ul:before{background-color:rgba(34,34,34,.75)}.spftestimonial-theme-dark .spftestimonial-nav>ul>li:last-child>a{border-bottom:none}.spftestimonial-theme-dark .spftestimonial-nav-background{background-color:#222}.spftestimonial-metabox .spftestimonial-nav-background{display:none}.spftestimonial-theme-dark .spftestimonial-footer{color:#555;background-color:#050505}.spftestimonial-theme-light .spftestimonial-container{border:1px solid #ccd0d4}.spftestimonial-theme-light .spftestimonial-header-inner{border-bottom:1px solid #ccd0d4;background-color:#f5f5f5;background:linear-gradient(#fefefe,#f5f5f5)}.spftestimonial-theme-light .spftestimonial-header-inner h1 small{color:#999}.spftestimonial-theme-light .spftestimonial-expand-all{color:#999;background-color:#fff;-moz-box-shadow:0 1px 1px rgba(0,0,0,.05);-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.spftestimonial-theme-light .spftestimonial-expand-all:hover{color:#555}.spftestimonial-theme-light .spftestimonial-search input{color:#555;background-color:#fff;-moz-box-shadow:0 1px 1px rgba(0,0,0,.05);-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.spftestimonial-theme-light .spftestimonial-search input::-webkit-input-placeholder{color:#bbb}.spftestimonial-theme-light .spftestimonial-nav ul li a{color:#464646;background-color:#f5f5f5;border-top:0;border-right:0;border-bottom:1px solid #ccd0d4;margin-bottom:0;padding:15px 15px}.spftestimonial-theme-light .spftestimonial-nav ul li .spftestimonial-section-active{box-shadow:3px 0 0 0 #52b3d9 inset;background-color:#fff;color:#52b3d9}.spftestimonial-theme-light .spftestimonial-nav ul li .spftestimonial-section-active:after{display:none}.spftestimonial-theme-light .spftestimonial-nav ul ul li a{border-bottom:1px solid #e5e5e5;background-color:#f8fdff;padding:13px 15px 13px 24px}.spftestimonial-theme-light .spftestimonial-nav-background{background-color:#f5f5f5;border-right:1px solid #ccd0d4}.spftestimonial-theme-light .spftestimonial-footer{color:#555;border-top:1px solid #e5e5e5;background-color:#f5f5f5;background:linear-gradient(#fafafa,#f5f5f5)}.spftestimonial-field{position:relative;padding:22px 30px}.spftestimonial-field p:first-child{margin-top:0}.spftestimonial-field p:last-child{margin-bottom:0}.spftestimonial-field:after,.spftestimonial-field:before{content:" ";display:table}.spftestimonial-field:after{clear:both}.spftestimonial-field h4{margin-top:0}.spftestimonial-field .spftestimonial-title{position:relative;width:20%;float:left}.spftestimonial-field .spftestimonial-title h4{margin:0;color:#23282d}.spftestimonial-field .spftestimonial-fieldset{margin-left:25%}.spftestimonial-pseudo-field{padding:0 5px 0 0!important;display:inline-block}.spftestimonial-pseudo-field+.spftestimonial-pseudo-field{border:0}.spftestimonial-pseudo-field pre{display:none}.spftestimonial-field-border .spftestimonial--left,.spftestimonial-field-dimensions .spftestimonial--left,.spftestimonial-field-spacing .spftestimonial--left{float:left}.spftestimonial-field-border .spftestimonial--input,.spftestimonial-field-dimensions .spftestimonial--input,.spftestimonial-field-spacing .spftestimonial--input{float:left;margin-right:10px;margin-bottom:7px}.spftestimonial-field-border .spftestimonial--input select,.spftestimonial-field-dimensions .spftestimonial--input select,.spftestimonial-field-spacing .spftestimonial--input select{margin:0;line-height:26px}.spftestimonial-field-border .spftestimonial--input input,.spftestimonial-field-dimensions .spftestimonial--input input,.spftestimonial-field-spacing .spftestimonial--input input{line-height:30px;float:left;margin:0;padding:0;width:65px;max-width:100%;text-align:center;border-radius:0}.spftestimonial-field-border .spftestimonial--label,.spftestimonial-field-dimensions .spftestimonial--label,.spftestimonial-field-spacing .spftestimonial--label{float:left;max-width:100%;font-size:12px;line-height:30px;vertical-align:top;text-align:center;color:#555;border:1px solid #ddd;background-color:#eee;padding:0 6px;min-height:30px}.spftestimonial-field-border .spftestimonial--label-icon,.spftestimonial-field-dimensions .spftestimonial--label-icon,.spftestimonial-field-spacing .spftestimonial--label-icon{min-width:20px;border-right:0;border-radius:2px 0 0 2px}.spftestimonial-field-border .spftestimonial--label-unit,.spftestimonial-field-dimensions .spftestimonial--label-unit,.spftestimonial-field-spacing .spftestimonial--label-unit{color:#999;border-left:0;border-radius:0 2px 2px 0}.spftestimonial-field-button_set .spftestimonial--buttons{display:inline-block}.spftestimonial-field-button_set .spftestimonial--button{position:relative;z-index:1;float:left;cursor:pointer;padding:7px 14px;min-width:40px;text-align:center;color:#555;border:1px solid #ccc;background-color:#f7f7f7;user-select:none;-webkit-user-select:none;box-shadow:0 1px 0 rgba(0,0,0,.1)}.spftestimonial-field-button_set .spftestimonial--button:first-child{border-radius:4px 0 0 4px}.spftestimonial-field-button_set .spftestimonial--button:last-child{border-radius:0 4px 4px 0}.spftestimonial-field-button_set .spftestimonial--button:not(:first-child){margin-left:-1px}.spftestimonial-field-button_set .spftestimonial--button:hover{background-color:#eee}.spftestimonial-field-button_set .spftestimonial--active,.spftestimonial-field-button_set .spftestimonial--active:hover{z-index:2;color:#fff;border-color:#006799;background-color:#0085ba}.spftestimonial-field-button_set input{display:none}.spftestimonial-field-checkbox ul,.spftestimonial-field-radio ul{margin:0;padding:0;list-style-type:none;overflow-y:auto;max-height:305px}.spftestimonial-field-checkbox ul ul,.spftestimonial-field-radio ul ul{max-height:none}.spftestimonial-field-checkbox .spftestimonial--inline-list li,.spftestimonial-field-radio .spftestimonial--inline-list li{display:inline-block;margin-right:15px}.spftestimonial-field-checkbox input[type=radio]:checked:before,.spftestimonial-field-radio input[type=radio]:checked:before{line-height:10px}.spftestimonial-field-checkbox .spftestimonial-checker,.spftestimonial-field-radio .spftestimonial-checker{cursor:pointer}.spftestimonial-field-code_editor .CodeMirror{width:100%;height:400px;border:1px solid #eee}.spftestimonial-field-code_editor textarea{width:100%;height:400px}.spftestimonial-field-color>input{opacity:.75;width:115px;max-width:100%}.spftestimonial-field-color_group .spftestimonial--left{float:left;margin-right:10px;margin-bottom:5px}.spftestimonial-field-color_group .spftestimonial--title{color:#999;margin-bottom:5px}.spftestimonial-field-icon_select .spftestimonial--image{width:35px;height:35px;text-align:center;line-height:35px;font-size:20px}.spftestimonial-field-icon_select .spftestimonial--image,.spftestimonial-field-image_select .spftestimonial--image{cursor:pointer;position:relative;display:inline-block;max-width:100%;margin:0 5px 5px 0;vertical-align:bottom;border:2px solid #f4f4f4;background-color:#fff;user-select:none;-webkit-user-select:none;-moz-transition:all .2s;-o-transition:all .2s;-webkit-transition:all .2s;transition:all .2s}.spftestimonial-field-icon_select .spftestimonial--image:before,.spftestimonial-field-image_select .spftestimonial--image:before{position:absolute;top:0;left:0;text-align:center;font-size:11px;font-family:FontAwesome;content:"\f00c";width:15px;height:15px;line-height:15px;opacity:0;color:#fff;background-color:#52b3d9;transition:opacity .2s}.spftestimonial-field-icon_select .spftestimonial--active,.spftestimonial-field-image_select .spftestimonial--active{border-color:#52b3d9}.spftestimonial-field-icon_select .spftestimonial--active:before,.spftestimonial-field-image_select .spftestimonial--active:before{opacity:0}.spftestimonial-field-image_select img{vertical-align:top}.spftestimonial-field-icon_select input,.spftestimonial-field-image_select input{display:none}.spftestimonial-field-select .spftestimonial-fieldset{min-height:30px}.spftestimonial-field-select .spftestimonial-chosen{display:none}.spftestimonial-field-select select{max-width:100%}.spftestimonial-field-spinner .spftestimonial--spin{float:left}.spftestimonial-field-spinner .spftestimonial--unit{float:right;height:30px;line-height:26px;text-align:center;border-left:none;color:#999;border:1px solid #ddd;border-left:0;background-color:#eee;padding:0 6px;margin:0;box-sizing:border-box}.spftestimonial-field-spinner .ui-spinner-button{cursor:pointer;position:relative;overflow:hidden;margin:0;padding:0;width:30px;height:30px;line-height:30px;text-align:center;border:1px solid #ddd;color:#555;background-color:#eee;box-sizing:border-box}.spftestimonial-field-spinner .ui-spinner-button:hover{background-color:#e7e7e7}.spftestimonial-field-spinner .ui-spinner-button:active{background-color:#ddd}.spftestimonial-field-spinner .ui-spinner-button:before{font-family:FontAwesome;font-size:16px;line-height:16px}.spftestimonial-field-spinner .ui-spinner-down{float:left;border-right:0;border-radius:2px 0 0 2px}.spftestimonial-field-spinner .ui-spinner-down:before{content:"\f0d9"}.spftestimonial-field-spinner .ui-spinner-up{float:right;border-left:0;border-radius:0 2px 2px 0}.spftestimonial-field-spinner .ui-spinner-up:before{content:"\f0da"}.spftestimonial-field-spinner input{width:60px;text-align:center;margin:0;padding:0 8px;height:31px;line-height:31px;border:1px solid #ddd;border-radius:0}.spftestimonial-field-spinner input:focus{outline:0}.spftestimonial-field-spinner .ui-button-text{display:none}.spftestimonial-field-switcher .spftestimonial--switcher{float:left;cursor:pointer;position:relative;width:60px;height:26px;padding:0;margin:0;overflow:hidden;border-radius:4px;background-color:#ed6f6f;user-select:none;-webkit-user-select:none}.spftestimonial-field-switcher .spftestimonial--ball{position:absolute;top:4px;left:4px;width:24px;height:18px;background-color:#fff;border-radius:4px;transition:all .1s;box-shadow:1px 1px 1px rgba(0,0,0,.15)}.spftestimonial-field-switcher .spftestimonial--off,.spftestimonial-field-switcher .spftestimonial--on{position:absolute;top:0;left:0;right:0;font-size:11px;line-height:26px;font-weight:500;font-style:normal;text-align:center;text-transform:uppercase;color:#fff;padding-right:28px;opacity:0;transition:all .1s}.spftestimonial-field-switcher .spftestimonial--off{padding-right:0;padding-left:28px;opacity:1}.spftestimonial-field-switcher .spftestimonial--active{background:#4fb845}.spftestimonial-field-switcher .spftestimonial--active .spftestimonial--on{opacity:1}.spftestimonial-field-switcher .spftestimonial--active .spftestimonial--off{opacity:0}.spftestimonial-field-switcher .spftestimonial--active .spftestimonial--ball{left:100%;margin-left:-28px}.spftestimonial-field-switcher .spftestimonial--label{float:left;margin-top:4px;margin-left:8px;font-weight:400;color:#999}.spftestimonial-field-switcher input{display:none}.spftestimonial-field-tabbed .spftestimonial-tabbed-section{border:1px solid #eee;background:#fff}.spftestimonial-field-tabbed .spftestimonial-tabbed-section>.spftestimonial-field{padding:15px}.spftestimonial-field-tabbed .spftestimonial-tabbed-nav .spftestimonial--icon{padding-right:5px}.spftestimonial-field-tabbed .spftestimonial-tabbed-nav a{display:inline-block;padding:12px 15px;margin-top:1px;margin-right:5px;margin-bottom:-1px;position:relative;text-decoration:none;color:#444;font-weight:600;background-color:#f3f3f3;border:1px solid #eee;-moz-transition:all .2s;-o-transition:all .2s;-webkit-transition:all .2s;transition:all .2s}.spftestimonial-field-tabbed .spftestimonial-tabbed-nav a:hover{background-color:#f9f9f9}.spftestimonial-field-tabbed .spftestimonial-tabbed-nav a.spftestimonial-tabbed-active{background-color:#fff;border-bottom-color:#fff}.spftestimonial-field-tabbed .spftestimonial-tabbed-nav a:focus{outline:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.spftestimonial-field-text input,.spftestimonial-field-text_f input{width:340px;max-width:100%}.spftestimonial-field-typography select,.spftestimonial-field-typography textarea{margin:0;width:100%}.spftestimonial-field-typography .spftestimonial--title{color:#999;margin:0 0 2px 0}.spftestimonial-field-typography .spftestimonial--title small{vertical-align:top}.spftestimonial-field-typography .spftestimonial--blocks{display:flex;flex-wrap:wrap}.spftestimonial-field-typography .spftestimonial--block{padding-right:5px;padding-bottom:10px;box-sizing:border-box}.spftestimonial-field-typography .spftestimonial--block .spftestimonial--block{padding-right:0;padding-bottom:0}.spftestimonial-field-typography .spftestimonial--blocks-selects .spftestimonial--block{flex:1 33.3%}.spftestimonial-field-typography .spftestimonial--blocks-inputs .spftestimonial--block{flex:1 25%}.spftestimonial-field-typography .spftestimonial--blocks-inputs .spftestimonial--block .spftestimonial--block{flex:1}.spftestimonial-field-typography .spftestimonial--input{margin:0;width:100%;padding:2px 8px;border-radius:4px 0 0 4px}.spftestimonial-field-typography .spftestimonial--unit{min-width:40px;max-width:40px;font-size:12px;font-weight:400;text-align:center;color:#777;border:1px solid #ddd;background-color:#eee;border-radius:0 2px 2px 0;border-left:0;line-height:30px}.spftestimonial-field-typography .spftestimonial--preview{font-size:16px;line-height:20px;padding:20px;color:#222;border:1px solid #eee;background-color:#fff;border-radius:2.5px;user-select:none;-webkit-user-select:none;transition:background-color .2s,border-color .2s}.spftestimonial-field-typography .spftestimonial--block-preview{cursor:pointer;position:relative;overflow:hidden;margin-top:10px;max-width:100%}.spftestimonial-field-typography .spftestimonial--black-background{border-color:#000;background-color:#000}.spftestimonial-field-typography .spftestimonial--toggle{position:absolute;top:5px;right:10px;color:#999}.spftestimonial-field-typography .spftestimonial--block-extra-styles{margin-top:5px}.spftestimonial-field-heading{font-size:1.5em;font-weight:700;color:#23282d;background-color:#f5f5f5}.spftestimonial-field-subheading{font-size:14px;font-weight:700;padding-top:17px;padding-bottom:17px;color:#23282d;background-color:#f7f7f7}.spftestimonial-field-submessage{padding:0!important;border:0!important}.spftestimonial-field-submessage+.spftestimonial-field{border-top:0!important}.spftestimonial-submessage{font-size:12px;padding:17px 30px;border-top:1px solid transparent;border-bottom:1px solid transparent}.spftestimonial-submessage-success{color:#3c763d;border-color:#d6e9c6;background-color:#dff0d8}.spftestimonial-submessage-info{color:#31708f;border-color:#bce8f1;background-color:#d9edf7}.spftestimonial-submessage-warning{color:#8a6d3b;border-color:#faebcc;background-color:#fcf8e3}.spftestimonial-submessage-danger{color:#a94442;border-color:#ebccd1;background-color:#f2dede}.spftestimonial-submessage-normal{color:#23282d;border-color:#eee;background-color:#f7f7f7}.spftestimonial-field-notice{background-color:#f7f7f7}.spftestimonial-notice{padding:12px;background-color:#fff;border-left-style:solid;border-left-width:4px;box-shadow:0 1px 1px rgba(0,0,0,.1)}.spftestimonial-notice-success{border-color:#46b450}.spftestimonial-notice-info{border-color:#339fd4}.spftestimonial-notice-warning{border-color:#ffbc00}.spftestimonial-notice-danger{border-color:#dc3232}.spftestimonial-notice-normal{border-color:#222}.spftestimonial-help{cursor:help;position:absolute;top:0;right:0;padding:5px;font-size:14px;color:#aaa}.spftestimonial-help .spftestimonial-help-text{display:none}.spftestimonial-image-preview{display:inline-block;position:relative;padding:4px;min-width:44px;min-height:22px;margin-bottom:10px;border:1px solid #ccc;background-color:#f9f9f9;-moz-box-shadow:0 1px 0 rgba(0,0,0,.08);-webkit-box-shadow:0 1px 0 rgba(0,0,0,.08);box-shadow:0 1px 0 rgba(0,0,0,.08)}.spftestimonial-image-preview img{max-height:90px;display:inline-block;vertical-align:middle}.spftestimonial-field-custom .spftestimonial-field{padding:0}.spftestimonial-field .chosen-container-single .chosen-single{height:28px;line-height:26px}.spftestimonial-field .chosen-container-single .chosen-single abbr{top:0;right:20px;font-family:FontAwesome;font-size:12px;height:100%;width:18px;color:#aaa;text-align:center;background:0 0}.spftestimonial-field .chosen-container-single .chosen-single abbr:before{content:"\f00d"}.spftestimonial-field .chosen-container-single .chosen-single abbr:hover{color:#555}.spftestimonial-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close{font-family:FontAwesome;font-size:12px;height:100%;width:18px;color:#aaa;text-align:center;background:0 0}.spftestimonial-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:before{content:"\f00d";display:inline-block;padding-top:3px}.spftestimonial-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{color:#555}.spftestimonial-field .chosen-container-single .chosen-single div b{font-family:FontAwesome;font-size:14px;color:#aaa;background:0 0}.spftestimonial-field .chosen-container-single .chosen-single div b:before{content:"\f107"}.spftestimonial-field .chosen-container-single .chosen-single div b:hover{color:#555}.spftestimonial-field .chosen-container-multi .chosen-choices li.search-choice-placeholder{border:1px dashed #aaa;margin:3px 5px 3px 0}.spftestimonial-field .chosen-container-multi .ui-sortable li.search-choice span{cursor:move}.spftestimonial-field .chosen-container-active.chosen-with-drop .chosen-single div b:before{content:"\f106"}.spftestimonial-field .chosen-container-single .chosen-single-with-deselect span{margin-right:40px}.spftestimonial-field .chosen-container-single .chosen-search input[type=text]{background:0 0}.spftestimonial-field .chosen-container-single .chosen-search:before{font-family:FontAwesome;position:absolute;content:"\f002";font-size:11px;right:10px;top:7px;color:#aaa}.spftestimonial-field .wp-picker-container{display:inline-block}.spftestimonial-field .spftestimonial--transparent-wrap{display:none;position:relative;top:-1px;width:235px;padding:9px 10px;border:1px solid #dfdfdf;border-top:none;background-color:#fff}.spftestimonial-field .spftestimonial--transparent-slider{position:absolute;width:190px;margin-left:2px;height:18px}.spftestimonial-field .spftestimonial--transparent-slider .ui-slider-handle{position:absolute;top:-3px;bottom:-3px;z-index:5;border-color:#aaa;border-style:solid;border-width:4px 3px;width:10px;height:16px;margin:0 -5px;background:0 0;cursor:ew-resize;opacity:.9;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.2);-webkit-box-shadow:0 1px 2px rgba(0,0,0,.2);box-shadow:0 1px 2px rgba(0,0,0,.2)}.spftestimonial-field .spftestimonial--transparent-slider .ui-slider-handle:before{content:" ";position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px solid #fff;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.spftestimonial-field .spftestimonial--transparent-offset{height:18px;width:200px;background:url(../images/checkerboard.png) repeat-y center left scroll #fff;-moz-box-shadow:0 0 5px rgba(0,0,0,.4) inset;-webkit-box-shadow:0 0 5px rgba(0,0,0,.4) inset;box-shadow:0 0 5px rgba(0,0,0,.4) inset;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}.spftestimonial-field .spftestimonial--transparent-text{position:absolute;top:12px;right:10px;width:30px;font-size:12px;line-height:12px;text-align:center;color:#999}.spftestimonial-field .spftestimonial--transparent-button{display:inline-block;text-align:center;cursor:pointer;margin-top:10px;user-select:none;-webkit-user-select:none;color:#999;transition:background-color .2s,border-color .2s,color .2s}.spftestimonial-field .spftestimonial--transparent-active .wp-color-result{background-image:url(../images/checkerboard.png);background-size:130%;background-position:center left;background-color:transparent!important}.spftestimonial-field .spftestimonial--transparent-active .spftestimonial--transparent-button{color:#fff;border-color:#4fb845;background-color:#4fb845}.spftestimonial-widgets>.spftestimonial-field{position:relative;top:-1px;margin-right:-15px;margin-left:-15px;padding:12px 15px}.spftestimonial-widgets>.spftestimonial-field .spftestimonial-field{margin-left:0;margin-right:0}.spftestimonial-widgets>.spftestimonial-field .spftestimonial-title{float:none;width:100%;margin-bottom:5px}.spftestimonial-widgets>.spftestimonial-field .spftestimonial-fieldset{margin-left:0}.spftestimonial-widgets .spftestimonial-field-text input{width:100%}.spftestimonial-widgets .spftestimonial-field-notice .spftestimonial-notice{padding:15px}.control-section .spftestimonial-widgets>.spftestimonial-field{margin-right:-10px;margin-left:-10px;padding:10px 12px}.control-section .spftestimonial-field{padding:0}.control-section .spftestimonial-field .spftestimonial-title{float:none;width:100%;margin-bottom:10px}.control-section .spftestimonial-field .spftestimonial-title h4{font-size:14px;font-weight:600;color:inherit}.control-section .spftestimonial-field .spftestimonial-fieldset{margin-left:0}.control-section .spftestimonial-field-select select{width:100%}.control-section .spftestimonial-field-heading{color:inherit;font-size:14px;line-height:1em;margin-right:-15px;margin-left:-15px;padding:15px}.control-section .spftestimonial-field-subheading{color:inherit;font-size:11px;margin-right:-15px;margin-left:-15px;padding:10px 15px}.control-section .spftestimonial-text-subtitle{margin-top:4px;font-size:12px}.control-section .spftestimonial-field-content,.control-section .spftestimonial-field-submessage .spftestimonial-submessage{margin-right:-15px;margin-left:-15px;padding:15px}.control-section .spftestimonial-fieldset .spftestimonial-field-heading,.control-section .spftestimonial-fieldset .spftestimonial-field-subheading,.control-section .spftestimonial-fieldset .spftestimonial-field-submessage .spftestimonial-submessage{margin-left:0;margin-right:0}.control-section .spftestimonial-field-date .spftestimonial--to{margin-left:0}.control-section .spftestimonial-field-sorter ul li{padding:5px}.control-section .spftestimonial-field-sorter .spftestimonial-modules{float:none;width:100%}.control-section .spftestimonial-field-sorter .spftestimonial-modules:first-child{padding-right:0;padding-bottom:15px}.control-section .spftestimonial-field-background .spftestimonial--select{width:100%}.control-section .spftestimonial-field-border select,.control-section .spftestimonial-field-dimensions select,.control-section .spftestimonial-field-spacing select{width:auto}.control-section .spftestimonial-field-spinner input{width:50px}.control-section .spftestimonial-field-backup .spftestimonial-export-data{display:none}.control-section .spftestimonial-field-fieldset .spftestimonial-fieldset-content{border-color:#e5e5e5}.control-section .spftestimonial-field-fieldset .spftestimonial-field{padding:10px}.control-section .spftestimonial-field-fieldset .spftestimonial-field .spftestimonial-title{margin-bottom:5px}.control-section .spftestimonial-field-fieldset .spftestimonial-field h4{font-size:12px}.control-section .spftestimonial-field-accordion .spftestimonial-field,.control-section .spftestimonial-field-group .spftestimonial-field,.control-section .spftestimonial-field-repeater .spftestimonial-field,.control-section .spftestimonial-field-sortable .spftestimonial-field,.control-section .spftestimonial-field-tabbed .spftestimonial-field{padding:10px}.control-section .spftestimonial-field-accordion .spftestimonial-field .spftestimonial-title,.control-section .spftestimonial-field-group .spftestimonial-field .spftestimonial-title,.control-section .spftestimonial-field-repeater .spftestimonial-field .spftestimonial-title,.control-section .spftestimonial-field-sortable .spftestimonial-field .spftestimonial-title,.control-section .spftestimonial-field-tabbed .spftestimonial-field .spftestimonial-title{margin-bottom:5px}.control-section .spftestimonial-field-accordion .spftestimonial-field h4,.control-section .spftestimonial-field-group .spftestimonial-field h4,.control-section .spftestimonial-field-repeater .spftestimonial-field h4,.control-section .spftestimonial-field-sortable .spftestimonial-field h4,.control-section .spftestimonial-field-tabbed .spftestimonial-field h4{font-size:12px}.control-section .spftestimonial-dependency-control.hidden{display:none!important}.spftestimonial-modal{display:none;position:fixed;z-index:100101;top:0;left:0;width:100%;height:100%}.spftestimonial-modal-icon{z-index:100102}.spftestimonial-modal-table{display:table;width:100%;height:100%}.spftestimonial-modal-table-cell{display:table-cell;vertical-align:middle;margin:100px 0}.spftestimonial-modal-inner{position:relative;z-index:10;width:760px;height:750px;margin:0 auto;background-color:#fff}.spftestimonial-modal-content{position:relative;overflow:hidden;overflow-y:auto;height:592px}.spftestimonial-modal-content .spftestimonial-shortcode-button{display:none}.spftestimonial-modal-content .spftestimonial-fieldset{margin-left:25%}.spftestimonial-modal-content .spftestimonial-title{width:20%}.spftestimonial-modal-content .spftestimonial-field{padding:15px 30px 15px 15px}.spftestimonial-modal-content a:active,.spftestimonial-modal-content a:focus{outline:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.spftestimonial-modal-content h4{font-size:13px}.spftestimonial-modal-content h4 small{font-style:italic;font-weight:400;color:#aaa}.spftestimonial-modal-title{position:relative;background-color:#fcfcfc;border-bottom:1px solid #ddd;height:36px;font-size:16px;font-weight:600;line-height:36px;margin:0;padding:0 36px 0 16px}.spftestimonial-modal-header{width:100%;padding:16px 0;background-color:#f5f5f5;border-bottom:1px solid #eee}.spftestimonial-modal-header select{display:block;width:250px;margin:0 auto;background-color:#fff}.spftestimonial-modal-close{color:#666;padding:0;position:absolute;top:0;right:0;width:36px;height:36px;text-align:center;background:0 0;border:none;cursor:pointer}.spftestimonial-modal-close:before{font:normal 20px/36px dashicons;content:"\f158";vertical-align:top;width:36px;height:36px}.spftestimonial-modal-close:hover{opacity:.5}.spftestimonial-modal-insert-wrapper{text-align:center;width:100%;padding:16px 0;background-color:#f5f5f5;border-top:1px solid #eee}.spftestimonial-modal-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#000;opacity:.5}.spftestimonial-text-desc,.spftestimonial-text-subtitle{font-weight:400;margin-top:10px;color:#999;font-style:italic}.spftestimonial-text-success{color:#2b542c}.spftestimonial-text-error{color:#d02c21}.spftestimonial-text-info{color:#31708f}.spftestimonial-text-warning{color:#ffb900}.spftestimonial-text-muted{color:#aaa}.spftestimonial-text-left{text-align:left}.spftestimonial-text-center{text-align:center}.spftestimonial-text-right{text-align:right}.spftestimonial-block-left{float:left}.spftestimonial-block-right{float:right}.spftestimonial-full-width{width:100%}.spftestimonial-full-half{width:50%}.spftestimonial-table{width:100%;display:table}.spftestimonial-table-cell{display:table-cell;vertical-align:middle}.spftestimonial-table-expanded{width:100%}.spftestimonial-nowrap{white-space:nowrap}.spftestimonial-text-highlight{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}.spftestimonial-text-highlight-gray{padding:2px 4px;font-size:90%;background-color:#f0f0f0;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}.spftestimonial-hidden{display:none}.spftestimonial-hide{display:none!important}.spftestimonial-show{display:block!important}.spftestimonial-opacity{opacity:.5}.spftestimonial-warning-primary{color:#fff!important;border-color:#d02c21 #ba281e #ba281e!important;background:#e14d43!important;-moz-box-shadow:0 1px 0 #ba281e!important;-webkit-box-shadow:0 1px 0 #ba281e!important;box-shadow:0 1px 0 #ba281e!important;text-shadow:0 -1px 1px #ba281e,1px 0 1px #ba281e,0 1px 1px #ba281e,-1px 0 1px!important;text-shadow:0 -1px 1px #ba281e,1px 0 1px #ba281e,0 1px 1px #ba281e,-1px 0 1px #ba281e!important}.spftestimonial-warning-primary:focus,.spftestimonial-warning-primary:hover{border-color:#ba281e!important;background:#e35950!important;-moz-box-shadow:0 1px 0 #ba281e!important;-webkit-box-shadow:0 1px 0 #ba281e!important;box-shadow:0 1px 0 #ba281e!important}.spftestimonial-warning-primary:active{border-color:#ba281e!important;background:#d02c21!important;-moz-box-shadow:inset 0 2px 0 #ba281e!important;-webkit-box-shadow:inset 0 2px 0 #ba281e!important;box-shadow:inset 0 2px 0 #ba281e!important}.spftestimonial-form-result{display:none;padding:12px;margin:0 0 15px 0;background-color:#fff;border-left:4px solid #555;-moz-box-shadow:0 1px 1px rgba(0,0,0,.1);-webkit-box-shadow:0 1px 1px rgba(0,0,0,.1);box-shadow:0 1px 1px rgba(0,0,0,.1)}.spftestimonial-form-show{display:block}.spftestimonial-form-error{border-left-color:#dc3232}.spftestimonial-form-success{border-left-color:#46b450}.spftestimonial-form-warning{border-left-color:#ffb900}.spftestimonial-form-info{border-left-color:#00a0d2}.spftestimonial-label-error{position:relative;top:-2px;display:inline-block;font-size:10px;line-height:10px;height:10px;width:10px;padding:1px;font-style:normal;text-align:center;color:#fff;vertical-align:middle;background-color:#e10000;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}.spftestimonial-no-option{padding:30px}@media only screen and (max-width:1200px){.spftestimonial-metabox .spftestimonial-field .spftestimonial-title{float:none;width:100%;margin-bottom:10px}.spftestimonial-metabox .spftestimonial-field .spftestimonial-fieldset{margin-left:0}}@media only screen and (max-width:782px){.spftestimonial-header-inner{text-align:center}.spftestimonial-header-inner h1{width:100%;margin-bottom:10px}.spftestimonial-header-left,.spftestimonial-header-right,.spftestimonial-search{width:100%}.spftestimonial-search{text-align:center;margin-bottom:15px}.spftestimonial-footer{text-align:center}.spftestimonial-buttons{float:none}.spftestimonial-copyright{float:none;margin-top:10px}.spftestimonial-expand-all,.spftestimonial-nav,.spftestimonial-nav-background,.spftestimonial-reset-section{display:none!important}.spftestimonial-content{margin-left:0}.spftestimonial-section,.spftestimonial-section-title{display:block!important}.spftestimonial-field .spftestimonial-title{float:none;width:100%;margin-bottom:10px}.spftestimonial-field .spftestimonial-fieldset{margin-left:0}.spftestimonial-modal-inner{width:350px;height:380px}.spftestimonial-modal-content{height:282px}.spftestimonial-icon-dialog .spftestimonial-modal-inner{width:305px;height:380px}.spftestimonial-icon-dialog .spftestimonial-modal-content{height:267px}.spftestimonial-modal-icon .spftestimonial-modal-inner{width:330px;height:385px}.spftestimonial-modal-icon .spftestimonial-modal-content{height:252px}.spftestimonial-profile>.spftestimonial-field>.spftestimonial-title{float:none;width:100%;margin-bottom:10px}.spftestimonial-profile>.spftestimonial-field>.spftestimonial-fieldset{margin-left:0}}.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;user-select:none}.chosen-container *{box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;z-index:1010;width:100%;border:1px solid #aaa;border-top:0;background:#fff;box-shadow:0 4px 5px rgba(0,0,0,.15);clip:rect(0,0,0,0);clip-path:inset(100% 100%)}.chosen-container.chosen-with-drop .chosen-drop{clip:auto;clip-path:none}.chosen-container a{cursor:pointer}.chosen-container .chosen-single .group-name,.chosen-container .search-choice .group-name{margin-right:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:400;color:#999}.chosen-container .chosen-single .group-name:after,.chosen-container .search-choice .group-name:after{content:":";padding-left:2px;vertical-align:top}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:25px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:linear-gradient(#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;font-size:1px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;clip:rect(0,0,0,0);clip-path:inset(100% 100%)}.chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;width:100%;height:auto;border:1px solid #aaa;background-color:#fff;background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:0;height:25px;outline:0;border:0!important;background:0 0!important;box-shadow:none;color:#999;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0;width:25px}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 5px 3px 0;padding:3px 20px 3px 6px;border:1px solid #aaa;max-width:100%;border-radius:3px;background-color:#eee;background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-size:100% 19px;background-repeat:repeat-x;background-clip:padding-box;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice span{word-wrap:break-word;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:0;right:0;display:block;width:12px;height:12px;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;border-bottom-right-radius:0;border-bottom-left-radius:0;background-image:linear-gradient(#eee 20%,#fff 80%);box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:none;background:0 0}.chosen-container-active .chosen-choices{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#222!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-single{cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;direction:rtl}.sp-tpro-client-rating{float:left}.sp-tpro-client-rating:not(:checked)>input{visibility:hidden;display:none;width:0;height:0;float:right;top:100%;clip:rect(0,0,0,0);margin:0;padding:0;border:10px #fff solid}.sp-tpro-client-rating:not(:checked)>label{float:right;display:block;padding:0;margin:0;cursor:pointer;font-size:150%;line-height:1.2;color:#d4d4d4;width:1em}.sp-tpro-client-rating>input:checked~label{color:#f3bb00}.sp-tpro-client-rating:not(:checked)>label:hover,.sp-tpro-client-rating:not(:checked)>label:hover~label{color:#de7202}.sp-tpro-client-rating>input:checked+label:hover,.sp-tpro-client-rating>input:checked+label:hover~label,.sp-tpro-client-rating>input:checked~label:hover,.sp-tpro-client-rating>input:checked~label:hover~label,.sp-tpro-client-rating>label:hover~input:checked~label{color:#de7202}.spftestimonial-metabox .sp-tpro-banner{background-color:#2684a6;padding:22px 28px;overflow:hidden;background-image:-webkit-gradient(linear,left top,right top,from(#2684a6),to(#52b3d9));background-image:linear-gradient(to right,#2684a6,#52b3d9)}.spftestimonial-metabox .sp-tpro-logo{float:left}.spftestimonial-metabox .sp-tpro-logo img{display:block;width:182px}.spftestimonial-metabox .sp-tpro-short-links{float:right;line-height:30px}.spftestimonial-metabox .sp-tpro-short-links a{color:#fff;text-decoration:none;margin-left:16px;font-size:15px}.spftestimonial-metabox .sp-tpro-short-links a i.fa{margin-right:7px}.sp-testimonial-shortcode-divider{height:20px;background:#f1f1f1;border-top:1px solid #ddd}.spftestimonial-metabox .tpro_shortcode{display:inline-flex;width:100%;background-color:#fffdfd}.tpro_shortcode .tpro-col-lg-3{border-right:1px solid #ddd;width:33.33%}.tpro_shortcode .tpro-col-lg-3 .tpro_shortcode_content{padding:42px 16px}.tpro_shortcode .tpro-col-lg-3:last-child .tpro_shortcode_content{padding:42px 16px 0 16px}.tpro_shortcode .tpro-col-lg-3 .tpro_shortcode_content .tpro-sc-code{background-color:rgba(82,179,217,.11);padding:10px 15px;display:inline-block}.tpro_shortcode .tpro-col-lg-3:last-child{border-right:none}.tpro_shortcode .tpro-col-lg-3 .tpro-shortcode-title{font-weight:500;font-size:17px!important;padding-top:0!important;color:#4c5158}.tpro_shortcode .tpro-col-lg-3 p{margin-top:2px;color:#4c5158}.tpro_shortcode .tpro-col-lg-3 .back-image{max-width:100%;display:block;margin:0 auto}.tpro_shortcode .tpro-col-lg-3 textarea{border-color:transparent;box-shadow:none;background-color:#eee;padding:4px 6px;resize:none;text-align:center;max-width:100%}#poststuff .sp-tfree-upgrade-body .sp-tfree-section-title{padding:13px 30px;font-size:28px;line-height:1;font-weight:700;color:#2e9cc7;text-transform:uppercase;margin-bottom:0;margin-top:0}#poststuff .sp-tfree-upgrade-body .sp-tfree-section-feature-icon{padding:30px 30px 0 30px}.sp-tfree-upgrade-body .tfree-option{padding:30px 30px;border-bottom:1px solid #efefef}.sp-tfree-upgrade-body .tfree-option:nth-child(2n+0){background-color:#fafafa}.sp-tfree-upgrade-header .tfree-overlay-color{background:#2684a6;position:absolute;width:100%;height:100%;top:0;left:0;z-index:1}.sp-tfree-upgrade-header{overflow:hidden;padding:43px 40px;position:relative}.sp-tfree-upgrade-header .sp-tfree-container{position:relative;z-index:2}.sp-tfree-upgrade-header .free-upgrade-btn{font-size:15px;color:#fff;border-radius:0;border:0;height:auto!important;line-height:24px!important;padding:13px 18px!important;text-align:center;font-weight:500}.sp-tfree-upgrade-header .sp-tfree-col-lg-7{width:58.33333333%;float:left}.sp-tfree-upgrade-header .sp-tfree-col-lg-5{width:41.66666667%;float:left;text-align:right}.sp-tfree-upgrade-header .sp-tfree-upgrade-title{margin:0;padding:0;font-size:24px;font-weight:700;color:#fff}.sp-tfree-upgrade-header .sp-tfree-upgrade-subtitle{font-size:15px;font-weight:500;margin-top:10px;margin-bottom:0;color:#fff}.sp-tfree-upgrade-footer .free-upgrade-btn.demo-btn,.sp-tfree-upgrade-footer .free-upgrade-btn.upgrade-btn{font-family:Raleway,sans-serif;box-shadow:none;border:0;color:#fff;border-radius:0;font-size:16px;font-weight:500;height:auto!important;line-height:24px!important;padding:13px 20px!important;text-align:center}.sp-tfree-upgrade-footer .upgrade-btn,.sp-tfree-upgrade-header .upgrade-btn{background-color:#3cb371;box-shadow:0 1px 26px -3px #333;margin-right:14px}.sp-tfree-upgrade-footer .free-upgrade-btn.upgrade-btn:focus,.sp-tfree-upgrade-footer .upgrade-btn:hover,.sp-tfree-upgrade-header .free-upgrade-btn.upgrade-btn:focus,.sp-tfree-upgrade-header .upgrade-btn:hover{background:#26a55f;color:#fff}.sp-tfree-upgrade-footer .demo-btn,.sp-tfree-upgrade-header .demo-btn{background-color:#52b3d9;box-shadow:0 1px 26px -3px #333}.sp-tfree-upgrade-footer .demo-btn:hover,.sp-tfree-upgrade-footer .free-upgrade-btn.demo-btn:focus,.sp-tfree-upgrade-header .demo-btn:hover,.sp-tfree-upgrade-header .free-upgrade-btn.demo-btn:focus{background:#2e9cc7;color:#fff}.sp-tfree-upgrade-footer h2,.sp-tfree-upgrade-header h1,.sp-tfree-upgrade-header h4,.sp-tfree-upgrade-header p{color:#fff;font-family:Raleway,sans-serif}#poststuff .sp-tfree-mbf-tab-content .sp-tfree-upgrade-body .sp-tfree-col-lg-2 h2{font-size:28px;padding-top:40px;padding-left:0;text-transform:uppercase;font-weight:700;padding-bottom:0}#poststuff .sp-tfree-mbf-tab-content .sp-tfree-upgrade-body .sp-tfree-col-lg-2 h4{line-height:24px}.sp-tfree-mbf-tab-content .sp-tfree-upgrade-body .sp-tfree-col-lg-2 h4{font-size:20px;font-weight:600;margin-bottom:20px;line-height:1.1}#poststuff .sp-tfree-mbf-tab-content .sp-tfree-upgrade-body .sp-tfree-col-lg-2 h2,.sp-tfree-mbf-tab-content .sp-tfree-upgrade-body .sp-tfree-col-lg-2 h4{color:#7c848e}.sp-tfree-mbf-tab-content .sp-tfree-upgrade-body .sp-tfree-col-lg-2 p{font-size:15px;color:#444;margin-top:10px}.sp-tfree-mbf-tab-content .sp-tfree-col-lg-2{width:50%;float:left}.sp-tfree-mbf-tab-content .sp-tfree-col-lg-2 .sp-tfree-content{font-family:Raleway,sans-serif;padding:25px}.sp-tfree-mbf-tab-content .sp-tfree-col-lg-2 img{width:100%}.sp-tfree-mbf-tab-content .sp-tfree-col-lg-2 .sp-tfree-content img{box-shadow:0 0 20px 0 #aaa}.sp-tfree-mbf-tab-content .sp-tfree-col-lg-2 h4{margin-top:.33em}.sp-tfree-mbf-tab-content .tfree-option:after{content:"";display:table;clear:both}.sp-tfree-mbf-tab-content .sp-tfree-video-tutorial{padding:30px 80px 50px}.sp-tfree-mbf-tab-content .sp-tfree-video-tutorial-video{position:relative;padding-bottom:56.4%;width:100%;max-width:100%;height:0;text-align:center}.sp-tfree-mbf-tab-content .sp-tfree-video-tutorial-video iframe{position:absolute;top:0;left:0;width:100%;height:100%}#poststuff .sp-tfree-mbf-tab-content .sp-tfree-video-tutorial h2{font-size:30px;font-weight:600;color:#444;margin-bottom:20px}.sp-tfree-mbf-tab-content .tfree-option:after,.sp-tfree-mbf-tab-content .tfree-option:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.sp-tfree-upgrade-footer{padding:60px 40px 40px 40px}.sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer{font-family:Raleway,sans-serif;color:#fff;position:relative;z-index:1}.sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer .tfree-overlay-color{position:absolute;width:100%;height:100%;top:0;left:0;z-index:-1;background:#2684a6}#poststuff .sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer h2{font-size:28px;margin-top:12px;font-weight:700}.sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer p{margin-top:0}.sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer p{margin-top:0;margin-bottom:34px}.sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer a{margin-bottom:20px}.sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer p{font-size:18px;font-weight:500}@media (max-width:1200px){.sp-tfree-metabox-framework .sp-tfree-mbf{display:block}.sp-tfree-mbf-tab-content .sp-tfree-col-lg-2{width:100%;float:none}#poststuff .sp-tfree-mbf-tab-content .sp-tfree-upgrade-body .sp-tfree-col-lg-2 h2{padding-top:0}.sp-tfree-mbf-tab-content .sp-tfree-col-lg-2:last-of-type .sp-tfree-content{padding-top:0;padding-bottom:40px}.sp-tfree-element .sp-tfree-input-field,.sp-tfree-element .sp-tfree-input-label,.sp-tfree-mbf .sp-tfree-col-lg-3{width:100%}.sp-tfree-mbf .sp-tfree-col-lg-3{display:block;border-bottom:1px solid #e5e5e5;padding-bottom:15px;border-right:none}.sp-tfree-mbf .sp-tfree-col-lg-3:last-of-type{border-bottom:none;padding-bottom:0}.sp-tfree-upgrade-header .sp-tfree-col-lg-7{width:100%;float:none}.sp-tfree-upgrade-header .sp-tfree-col-lg-5{width:100%;float:none;text-align:center}.sp-tfree-upgrade-header .sp-tfree-container{text-align:center}.sp-tfree-upgrade-header .sp-tfree-upgrade-subtitle{margin-bottom:20px}}@media (max-width:1024px){.sp-tfree-upgrade-footer .demo-btn,.sp-tfree-upgrade-footer .upgrade-btn,.sp-tfree-upgrade-header .demo-btn,.sp-tfree-upgrade-header .upgrade-btn{margin:0 auto;display:block}.sp-tfree-mbf-tab-content .sp-tfree-upgrade-footer a.upgrade-btn,.sp-tfree-mbf-tab-content .sp-tfree-upgrade-header a.upgrade-btn,.sp-tfree-upgrade-header .sp-tfree-upgrade-subtitle{margin-bottom:20px}.sp-tfree-upgrade-header .sp-tfree-col-lg-7{width:100%;float:none}.sp-tfree-upgrade-header .sp-tfree-col-lg-5{width:100%;float:none;text-align:center}.sp-tfree-upgrade-header .sp-tfree-container{text-align:center}}.sp-testimonial-shortcode{background-color:rgba(82,179,217,.11);padding:8px 12px;display:inline-block;margin-left:8px}.selectable{-webkit-touch-callout:all;-webkit-user-select:all;-khtml-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all}.js #sp_tpro_meta_options.postbox .handlediv,.js #sp_tpro_meta_options.postbox .hndle,.js #sp_tpro_shortcode_options.postbox .handlediv,.js #sp_tpro_shortcode_options.postbox .hndle{display:none}.sp-testimonial-font-color .wp-picker-container,.sp-testimonial-font-load .spftestimonial--switcher{pointer-events:none;opacity:.6}#sp_tpro_shortcode_options .spftestimonial-metabox .spftestimonial-nav ul li:last-of-type a{background-color:#35b135}#sp_tpro_shortcode_options .spftestimonial-metabox .spftestimonial-nav ul li:last-of-type .spftestimonial-section-active{color:#35b135;background-color:#fff;box-shadow:0 3px 0 0 #35b135 inset}#sp_tpro_shortcode_options .spftestimonial-metabox .spftestimonial-nav ul li:last-of-type .spftestimonial-section-active .fa{color:#35b135}#sp_tpro_shortcode_options .spftestimonial-field.spftestimonial-field-upgrade{padding:0}
admin/views/tp-metabox/assets/images/checkerboard.png ADDED
Binary file
admin/views/tp-metabox/assets/images/tpro-tiny-mce.png ADDED
Binary file
admin/views/tp-metabox/assets/js/spftestimonial-plugins.js ADDED
@@ -0,0 +1,2092 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ *
3
+ * jQuery Chosen AJAX Autocomplete Library
4
+ *
5
+ * https://github.com/meltingice/ajax-chosen
6
+ * https://github.com/michaelperrin/ajax-chosen
7
+ *
8
+ * MIT License
9
+ *
10
+ * Customized by Codestar
11
+ *
12
+ */
13
+ (function($) {
14
+
15
+ function SPFTESTIMONIALAjaxChosen(element, options) {
16
+ this.element = $(element);
17
+ this.options = options;
18
+ this.init();
19
+ };
20
+
21
+ SPFTESTIMONIALAjaxChosen.prototype.init = function() {
22
+ this.element.chosen(this.options);
23
+ this.container = this.element.next('.chosen-container');
24
+ this.search_field = this.container.find('.chosen-search-input');
25
+ this.is_multiple = this.container.hasClass('chosen-container-multi');
26
+ this.is_typing = false;
27
+ this.chosenXhr = null;
28
+ this.events();
29
+ };
30
+
31
+ SPFTESTIMONIALAjaxChosen.prototype.events = function() {
32
+
33
+ var _this = this;
34
+
35
+ this.search_field.on('compositionstart', function() {
36
+ _this.is_typing = true;
37
+ });
38
+
39
+ this.search_field.on('compositionend', function() {
40
+ _this.is_typing = false;
41
+ _this.update_list();
42
+ });
43
+
44
+ this.search_field.on('keyup', function() {
45
+ _this.update_list();
46
+ });
47
+
48
+ this.search_field.on('focus', function() {
49
+ _this.search_field_focused();
50
+ });
51
+
52
+ };
53
+
54
+ SPFTESTIMONIALAjaxChosen.prototype.search_field_focused = function() {
55
+ this.search_welcome_message();
56
+ if ( this.options.min_length === 0 && this.search_field.val().length === 0 ) {
57
+ this.update_list();
58
+ }
59
+ };
60
+
61
+ SPFTESTIMONIALAjaxChosen.prototype.search_welcome_message = function() {
62
+
63
+ var value = $.trim(this.search_field.val());
64
+ var results = this.container.find('.chosen-results');
65
+
66
+ if ( results.children().length === 0 && value.length === 0 ) {
67
+ results.html('<li class="no-results">' + this.options.typing_text.replace('%s', this.options.min_length - value.length) + '</li>');
68
+ }
69
+
70
+ };
71
+
72
+ SPFTESTIMONIALAjaxChosen.prototype.update_list = function() {
73
+
74
+ var _this = this;
75
+
76
+ this.search_welcome_message();
77
+
78
+ if ( this.is_typing ) { return; }
79
+
80
+ var value = $.trim(this.search_field.val());
81
+ var message = ( value.length < this.options.min_length ) ? this.options.typing_text.replace('%s', this.options.min_length - value.length) : this.options.searching_text;
82
+
83
+ this.container.find('.no-results').text(message);
84
+
85
+ if ( value === this.search_field.data('prevVal') ) { return; }
86
+
87
+ this.search_field.data('prevVal', value);
88
+
89
+ if (this.timer) {
90
+ clearTimeout(this.timer);
91
+ }
92
+
93
+ if ( value.length < this.options.min_length ) { return; }
94
+
95
+ this.timer = setTimeout( function() {
96
+
97
+ if ( _this.chosenXhr ) {
98
+ _this.chosenXhr.abort();
99
+ }
100
+
101
+ _this.options.data['term'] = value;
102
+
103
+ _this.chosenXhr = window.wp.ajax.post('spftestimonial-chosen', _this.options.data).done( function( response ) {
104
+ _this.show_results( response );
105
+ }).fail( function( response ) {
106
+ _this.container.find('.no-results').text(response.error);
107
+ });
108
+
109
+ }, this.options.type_delay );
110
+
111
+ };
112
+
113
+ SPFTESTIMONIALAjaxChosen.prototype.show_results = function( items ) {
114
+
115
+ var _this = this;
116
+
117
+ if ( this.is_typing || items === null ) { return; }
118
+
119
+ if ( items.length === 0 ) {
120
+ this.element.data().chosen.no_results_clear();
121
+ this.element.data().chosen.no_results(this.search_field.val());
122
+ return;
123
+ }
124
+
125
+ var selected_values = [];
126
+
127
+ this.element.find('option').each(function() {
128
+ if ( $(this).is(':selected') ) {
129
+ selected_values.push( $(this).val() + "-" + $(this).text() );
130
+ } else {
131
+ if( $(this).attr('value').length ) {
132
+ $(this).remove();
133
+ }
134
+ }
135
+ });
136
+
137
+ $.each(items, function(i, item) {
138
+ if ( $.inArray( item.value + "-" + item.text, selected_values ) === -1 ) {
139
+ $('<option />').attr('value', item.value).html(item.text).appendTo(_this.element);
140
+ }
141
+ });
142
+
143
+ var value_before_trigger = this.search_field.val();
144
+ var width_before_trigger = this.search_field.innerWidth();
145
+
146
+ this.element.trigger('chosen:updated');
147
+
148
+ if( this.is_multiple ) {
149
+
150
+ var $hidden_select = this.element.parent().find('.spftestimonial-hidden-select');
151
+ var $hidden_value = $hidden_select.val() || [];
152
+
153
+ this.element.SPFTESTIMONIALChosenOrder($hidden_value, true);
154
+ this.search_field.css('width', width_before_trigger);
155
+
156
+ }
157
+
158
+ this.search_field.val(value_before_trigger);
159
+
160
+ if ( this.chosenXhr.done !== null ) {
161
+ this.chosenXhr.done(items);
162
+ }
163
+
164
+ };
165
+
166
+ $.fn.SPFTESTIMONIALAjaxChosen = function(chosenOptions) {
167
+ return this.each(function() {
168
+ new SPFTESTIMONIALAjaxChosen(this, chosenOptions);
169
+ });
170
+ };
171
+
172
+ })(jQuery);
173
+ ;// Chosen Order v1.2.1
174
+ // This plugin allows you to handle the order of the selection for Chosen multiple <select> dropdowns
175
+ // Full source at https://github.com/tristanjahier/chosen-order
176
+ // Copyright (c) 2013 - Tristan Jahier, http://tristan-jahier.fr
177
+ (function() {
178
+ var $, SPFTESTIMONIALAbstractChosenOrder, _ref,
179
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
180
+ __hasProp = {}.hasOwnProperty,
181
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
182
+
183
+ SPFTESTIMONIALAbstractChosenOrder = (function() {
184
+
185
+ function SPFTESTIMONIALAbstractChosenOrder() {}
186
+
187
+ SPFTESTIMONIALAbstractChosenOrder.insertAt = function(node, index, parentNode) {
188
+ return parentNode.insertBefore(node, parentNode.children[index].nextSibling);
189
+ };
190
+
191
+ SPFTESTIMONIALAbstractChosenOrder.getFlattenedOptionsAndGroups = function(select) {
192
+ var flattened_options, opt, options, sub_opt, sub_options, _i, _j, _len, _len1;
193
+ options = Array.prototype.filter.call(select.childNodes, function(o) {
194
+ var _ref;
195
+ return (_ref = o.nodeName.toUpperCase()) === 'OPTION' || _ref === 'OPTGROUP';
196
+ });
197
+ flattened_options = [];
198
+ for (_i = 0, _len = options.length; _i < _len; _i++) {
199
+ opt = options[_i];
200
+ flattened_options.push(opt);
201
+ if (opt.nodeName.toUpperCase() === 'OPTGROUP') {
202
+ sub_options = Array.prototype.filter.call(opt.childNodes, function(o) {
203
+ return o.nodeName.toUpperCase() === 'OPTION';
204
+ });
205
+ for (_j = 0, _len1 = sub_options.length; _j < _len1; _j++) {
206
+ sub_opt = sub_options[_j];
207
+ flattened_options.push(sub_opt);
208
+ }
209
+ }
210
+ }
211
+ return flattened_options;
212
+ };
213
+
214
+ SPFTESTIMONIALAbstractChosenOrder.isValidMultipleSelectElement = function(element) {
215
+ return element !== null && typeof element !== "undefined" && element.nodeName === "SELECT" && element.multiple;
216
+ };
217
+
218
+ SPFTESTIMONIALAbstractChosenOrder.getChosenUIContainer = function(select) {
219
+ if (select.id !== "") {
220
+ return document.getElementById(select.id.replace(/-/g, "_") + "_chosen");
221
+ } else {
222
+ return this.searchChosenUIContainer(select);
223
+ }
224
+ };
225
+
226
+ SPFTESTIMONIALAbstractChosenOrder.isChosenified = function(select) {
227
+ return this.getChosenUIContainer(select) != null;
228
+ };
229
+
230
+ SPFTESTIMONIALAbstractChosenOrder.forceSelection = function(select, selection) {
231
+ var i, opt, options, _ref;
232
+ options = this.getFlattenedOptionsAndGroups(select);
233
+ i = 0;
234
+ while (i < options.length) {
235
+ opt = options[i];
236
+ if (_ref = opt.getAttribute("value"), __indexOf.call(selection, _ref) >= 0) {
237
+ opt.selected = true;
238
+ opt.setAttribute("selected", "");
239
+ } else {
240
+ opt.selected = false;
241
+ opt.removeAttribute("selected");
242
+ }
243
+ i++;
244
+ }
245
+ return this.triggerEvent(select, "chosen:updated");
246
+ };
247
+
248
+ SPFTESTIMONIALAbstractChosenOrder.SPFTESTIMONIALChosenOrder = function(select, order, force) {
249
+ var chosen_choices, chosen_options, chosen_ui, i, j, opt, opt_val, option, options, rel, relAttributeName, _i, _j, _len, _len1, _results;
250
+ if (this.getDOMElement != null) {
251
+ select = this.getDOMElement(select);
252
+ }
253
+ if (!this.isValidMultipleSelectElement(select)) {
254
+ return;
255
+ }
256
+ chosen_ui = this.getChosenUIContainer(select);
257
+ if (chosen_ui == null) {
258
+ return;
259
+ }
260
+ if (order instanceof Array) {
261
+ order = order.map(Function.prototype.call, String.prototype.trim);
262
+ options = this.getFlattenedOptionsAndGroups(select);
263
+ if ((force != null) && force === true) {
264
+ this.forceSelection(select, order);
265
+ }
266
+ _results = [];
267
+ for (i = _i = 0, _len = order.length; _i < _len; i = ++_i) {
268
+ opt_val = order[i];
269
+ rel = null;
270
+ for (j = _j = 0, _len1 = options.length; _j < _len1; j = ++_j) {
271
+ opt = options[j];
272
+ if (opt.value === opt_val) {
273
+ rel = j;
274
+ }
275
+ }
276
+ chosen_options = chosen_ui.querySelectorAll('.search-choice');
277
+ relAttributeName = this.relAttributeName;
278
+ option = Array.prototype.filter.call(chosen_options, function(o) {
279
+ return o.querySelector("a.search-choice-close[" + relAttributeName + "=\"" + rel + "\"]") != null;
280
+ })[0];
281
+ if (option == null) {
282
+ continue;
283
+ }
284
+ chosen_choices = chosen_ui.querySelector("ul.chosen-choices");
285
+ _results.push(this.insertAt(option, i, chosen_ui.querySelector('ul.chosen-choices')));
286
+ }
287
+ return _results;
288
+ } else {
289
+ return;
290
+ }
291
+ };
292
+
293
+ return SPFTESTIMONIALAbstractChosenOrder;
294
+
295
+ })();
296
+
297
+ $ = jQuery;
298
+
299
+ $.fn.extend({
300
+ SPFTESTIMONIALChosenOrder: function(order, force) {
301
+ return _SPFTESTIMONIALChosenOrder.SPFTESTIMONIALChosenOrder(this, order, force);
302
+ }
303
+ });
304
+
305
+ this._SPFTESTIMONIALChosenOrder = (function(_super) {
306
+ __extends(_SPFTESTIMONIALChosenOrder, _super);
307
+
308
+ function _SPFTESTIMONIALChosenOrder() {
309
+ _ref = _SPFTESTIMONIALChosenOrder.__super__.constructor.apply(this, arguments);
310
+ return _ref;
311
+ }
312
+
313
+ _SPFTESTIMONIALChosenOrder.relAttributeName = 'data-option-array-index';
314
+
315
+ _SPFTESTIMONIALChosenOrder.isjQueryObject = function(obj) {
316
+ return (typeof jQuery !== "undefined" && jQuery !== null) && obj instanceof jQuery;
317
+ };
318
+
319
+ _SPFTESTIMONIALChosenOrder.getDOMElement = function(element) {
320
+ if (this.isjQueryObject(element)) {
321
+ return element.get(0);
322
+ } else {
323
+ return element;
324
+ }
325
+ };
326
+
327
+ _SPFTESTIMONIALChosenOrder.searchChosenUIContainer = function(element) {
328
+ if ($(element).data("chosen") != null) {
329
+ return $(element).data("chosen").container[0];
330
+ } else {
331
+ return $(element).next(".chosen-container.chosen-container-multi").get(0);
332
+ }
333
+ };
334
+
335
+ _SPFTESTIMONIALChosenOrder.triggerEvent = function(target, event_name) {
336
+ return $(target).trigger(event_name);
337
+ };
338
+
339
+ return _SPFTESTIMONIALChosenOrder;
340
+
341
+ })(SPFTESTIMONIALAbstractChosenOrder);
342
+
343
+ }).call(this);
344
+ ;(function() {
345
+ var $, AbstractChosen, Chosen, SelectParser,
346
+ bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
347
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
348
+ hasProp = {}.hasOwnProperty;
349
+
350
+ SelectParser = (function() {
351
+ function SelectParser() {
352
+ this.options_index = 0;
353
+ this.parsed = [];
354
+ }
355
+
356
+ SelectParser.prototype.add_node = function(child) {
357
+ if (child.nodeName.toUpperCase() === "OPTGROUP") {
358
+ return this.add_group(child);
359
+ } else {
360
+ return this.add_option(child);
361
+ }
362
+ };
363
+
364
+ SelectParser.prototype.add_group = function(group) {
365
+ var group_position, i, len, option, ref, results1;
366
+ group_position = this.parsed.length;
367
+ this.parsed.push({
368
+ array_index: group_position,
369
+ group: true,
370
+ label: group.label,
371
+ title: group.title ? group.title : void 0,
372
+ children: 0,
373
+ disabled: group.disabled,
374
+ classes: group.className
375
+ });
376
+ ref = group.childNodes;
377
+ results1 = [];
378
+ for (i = 0, len = ref.length; i < len; i++) {
379
+ option = ref[i];
380
+ results1.push(this.add_option(option, group_position, group.disabled));
381
+ }
382
+ return results1;
383
+ };
384
+
385
+ SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
386
+ if (option.nodeName.toUpperCase() === "OPTION") {
387
+ if (option.text !== "") {
388
+ if (group_position != null) {
389
+ this.parsed[group_position].children += 1;
390
+ }
391
+ this.parsed.push({
392
+ array_index: this.parsed.length,
393
+ options_index: this.options_index,
394
+ value: option.value,
395
+ text: option.text,
396
+ html: option.innerHTML,
397
+ title: option.title ? option.title : void 0,
398
+ selected: option.selected,
399
+ disabled: group_disabled === true ? group_disabled : option.disabled,
400
+ group_array_index: group_position,
401
+ group_label: group_position != null ? this.parsed[group_position].label : null,
402
+ classes: option.className,
403
+ style: option.style.cssText
404
+ });
405
+ } else {
406
+ this.parsed.push({
407
+ array_index: this.parsed.length,
408
+ options_index: this.options_index,
409
+ empty: true
410
+ });
411
+ }
412
+ return this.options_index += 1;
413
+ }
414
+ };
415
+
416
+ return SelectParser;
417
+
418
+ })();
419
+
420
+ SelectParser.select_to_array = function(select) {
421
+ var child, i, len, parser, ref;
422
+ parser = new SelectParser();
423
+ ref = select.childNodes;
424
+ for (i = 0, len = ref.length; i < len; i++) {
425
+ child = ref[i];
426
+ parser.add_node(child);
427
+ }
428
+ return parser.parsed;
429
+ };
430
+
431
+ AbstractChosen = (function() {
432
+ function AbstractChosen(form_field, options1) {
433
+ this.form_field = form_field;
434
+ this.options = options1 != null ? options1 : {};
435
+ this.label_click_handler = bind(this.label_click_handler, this);
436
+ if (!AbstractChosen.browser_is_supported()) {
437
+ return;
438
+ }
439
+ this.is_multiple = this.form_field.multiple;
440
+ this.set_default_text();
441
+ this.set_default_values();
442
+ this.setup();
443
+ this.set_up_html();
444
+ this.register_observers();
445
+ this.on_ready();
446
+ }
447
+
448
+ AbstractChosen.prototype.set_default_values = function() {
449
+ this.click_test_action = (function(_this) {
450
+ return function(evt) {
451
+ return _this.test_active_click(evt);
452
+ };
453
+ })(this);
454
+ this.activate_action = (function(_this) {
455
+ return function(evt) {
456
+ return _this.activate_field(evt);
457
+ };
458
+ })(this);
459
+ this.active_field = false;
460
+ this.mouse_on_container = false;
461
+ this.results_showing = false;
462
+ this.result_highlighted = null;
463
+ this.is_rtl = this.options.rtl || /\bchosen-rtl\b/.test(this.form_field.className);
464
+ this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
465
+ this.disable_search_threshold = this.options.disable_search_threshold || 0;
466
+ this.disable_search = this.options.disable_search || false;
467
+ this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
468
+ this.group_search = this.options.group_search != null ? this.options.group_search : true;
469
+ this.search_contains = this.options.search_contains || false;
470
+ this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
471
+ this.max_selected_options = this.options.max_selected_options || Infinity;
472
+ this.inherit_select_classes = this.options.inherit_select_classes || false;
473
+ this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
474
+ this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
475
+ this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;
476
+ this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;
477
+ this.case_sensitive_search = this.options.case_sensitive_search || false;
478
+ return this.hide_results_on_select = this.options.hide_results_on_select != null ? this.options.hide_results_on_select : true;
479
+ };
480
+
481
+ AbstractChosen.prototype.set_default_text = function() {
482
+ if (this.form_field.getAttribute("data-placeholder")) {
483
+ this.default_text = this.form_field.getAttribute("data-placeholder");
484
+ } else if (this.is_multiple) {
485
+ this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
486
+ } else {
487
+ this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
488
+ }
489
+ this.default_text = this.escape_html(this.default_text);
490
+ return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
491
+ };
492
+
493
+ AbstractChosen.prototype.choice_label = function(item) {
494
+ if (this.include_group_label_in_selected && (item.group_label != null)) {
495
+ return "<b class='group-name'>" + (this.escape_html(item.group_label)) + "</b>" + item.html;
496
+ } else {
497
+ return item.html;
498
+ }
499
+ };
500
+
501
+ AbstractChosen.prototype.mouse_enter = function() {
502
+ return this.mouse_on_container = true;
503
+ };
504
+
505
+ AbstractChosen.prototype.mouse_leave = function() {
506
+ return this.mouse_on_container = false;
507
+ };
508
+
509
+ AbstractChosen.prototype.input_focus = function(evt) {
510
+ if (this.is_multiple) {
511
+ if (!this.active_field) {
512
+ return setTimeout(((function(_this) {
513
+ return function() {
514
+ return _this.container_mousedown();
515
+ };
516
+ })(this)), 50);
517
+ }
518
+ } else {
519
+ if (!this.active_field) {
520
+ return this.activate_field();
521
+ }
522
+ }
523
+ };
524
+
525
+ AbstractChosen.prototype.input_blur = function(evt) {
526
+ if (!this.mouse_on_container) {
527
+ this.active_field = false;
528
+ return setTimeout(((function(_this) {
529
+ return function() {
530
+ return _this.blur_test();
531
+ };
532
+ })(this)), 100);
533
+ }
534
+ };
535
+
536
+ AbstractChosen.prototype.label_click_handler = function(evt) {
537
+ if (this.is_multiple) {
538
+ return this.container_mousedown(evt);
539
+ } else {
540
+ return this.activate_field();
541
+ }
542
+ };
543
+
544
+ AbstractChosen.prototype.results_option_build = function(options) {
545
+ var content, data, data_content, i, len, ref, shown_results;
546
+ content = '';
547
+ shown_results = 0;
548
+ ref = this.results_data;
549
+ for (i = 0, len = ref.length; i < len; i++) {
550
+ data = ref[i];
551
+ data_content = '';
552
+ if (data.group) {
553
+ data_content = this.result_add_group(data);
554
+ } else {
555
+ data_content = this.result_add_option(data);
556
+ }
557
+ if (data_content !== '') {
558
+ shown_results++;
559
+ content += data_content;
560
+ }
561
+ if (options != null ? options.first : void 0) {
562
+ if (data.selected && this.is_multiple) {
563
+ this.choice_build(data);
564
+ } else if (data.selected && !this.is_multiple) {
565
+ this.single_set_selected_text(this.choice_label(data));
566
+ }
567
+ }
568
+ if (shown_results >= this.max_shown_results) {
569
+ break;
570
+ }
571
+ }
572
+ return content;
573
+ };
574
+
575
+ AbstractChosen.prototype.result_add_option = function(option) {
576
+ var classes, option_el;
577
+ if (!option.search_match) {
578
+ return '';
579
+ }
580
+ if (!this.include_option_in_results(option)) {
581
+ return '';
582
+ }
583
+ classes = [];
584
+ if (!option.disabled && !(option.selected && this.is_multiple)) {
585
+ classes.push("active-result");
586
+ }
587
+ if (option.disabled && !(option.selected && this.is_multiple)) {
588
+ classes.push("disabled-result");
589
+ }
590
+ if (option.selected) {
591
+ classes.push("result-selected");
592
+ }
593
+ if (option.group_array_index != null) {
594
+ classes.push("group-option");
595
+ }
596
+ if (option.classes !== "") {
597
+ classes.push(option.classes);
598
+ }
599
+ option_el = document.createElement("li");
600
+ option_el.className = classes.join(" ");
601
+ if (option.style) {
602
+ option_el.style.cssText = option.style;
603
+ }
604
+ option_el.setAttribute("data-option-array-index", option.array_index);
605
+ option_el.innerHTML = option.highlighted_html || option.html;
606
+ if (option.title) {
607
+ option_el.title = option.title;
608
+ }
609
+ return this.outerHTML(option_el);
610
+ };
611
+
612
+ AbstractChosen.prototype.result_add_group = function(group) {
613
+ var classes, group_el;
614
+ if (!(group.search_match || group.group_match)) {
615
+ return '';
616
+ }
617
+ if (!(group.active_options > 0)) {
618
+ return '';
619
+ }
620
+ classes = [];
621
+ classes.push("group-result");
622
+ if (group.classes) {
623
+ classes.push(group.classes);
624
+ }
625
+ group_el = document.createElement("li");
626
+ group_el.className = classes.join(" ");
627
+ group_el.innerHTML = group.highlighted_html || this.escape_html(group.label);
628
+ if (group.title) {
629
+ group_el.title = group.title;
630
+ }
631
+ return this.outerHTML(group_el);
632
+ };
633
+
634
+ AbstractChosen.prototype.results_update_field = function() {
635
+ this.set_default_text();
636
+ if (!this.is_multiple) {
637
+ this.results_reset_cleanup();
638
+ }
639
+ this.result_clear_highlight();
640
+ this.results_build();
641
+ if (this.results_showing) {
642
+ return this.winnow_results();
643
+ }
644
+ };
645
+
646
+ AbstractChosen.prototype.reset_single_select_options = function() {
647
+ var i, len, ref, result, results1;
648
+ ref = this.results_data;
649
+ results1 = [];
650
+ for (i = 0, len = ref.length; i < len; i++) {
651
+ result = ref[i];
652
+ if (result.selected) {
653
+ results1.push(result.selected = false);
654
+ } else {
655
+ results1.push(void 0);
656
+ }
657
+ }
658
+ return results1;
659
+ };
660
+
661
+ AbstractChosen.prototype.results_toggle = function() {
662
+ if (this.results_showing) {
663
+ return this.results_hide();
664
+ } else {
665
+ return this.results_show();
666
+ }
667
+ };
668
+
669
+ AbstractChosen.prototype.results_search = function(evt) {
670
+ if (this.results_showing) {
671
+ return this.winnow_results();
672
+ } else {
673
+ return this.results_show();
674
+ }
675
+ };
676
+
677
+ AbstractChosen.prototype.winnow_results = function(options) {
678
+ var escapedQuery, fix, i, len, option, prefix, query, ref, regex, results, results_group, search_match, startpos, suffix, text;
679
+ this.no_results_clear();
680
+ results = 0;
681
+ query = this.get_search_text();
682
+ escapedQuery = query.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
683
+ regex = this.get_search_regex(escapedQuery);
684
+ ref = this.results_data;
685
+ for (i = 0, len = ref.length; i < len; i++) {
686
+ option = ref[i];
687
+ option.search_match = false;
688
+ results_group = null;
689
+ search_match = null;
690
+ option.highlighted_html = '';
691
+ if (this.include_option_in_results(option)) {
692
+ if (option.group) {
693
+ option.group_match = false;
694
+ option.active_options = 0;
695
+ }
696
+ if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
697
+ results_group = this.results_data[option.group_array_index];
698
+ if (results_group.active_options === 0 && results_group.search_match) {
699
+ results += 1;
700
+ }
701
+ results_group.active_options += 1;
702
+ }
703
+ text = option.group ? option.label : option.text;
704
+ if (!(option.group && !this.group_search)) {
705
+ search_match = this.search_string_match(text, regex);
706
+ option.search_match = search_match != null;
707
+ if (option.search_match && !option.group) {
708
+ results += 1;
709
+ }
710
+ if (option.search_match) {
711
+ if (query.length) {
712
+ startpos = search_match.index;
713
+ prefix = text.slice(0, startpos);
714
+ fix = text.slice(startpos, startpos + query.length);
715
+ suffix = text.slice(startpos + query.length);
716
+ option.highlighted_html = (this.escape_html(prefix)) + "<em>" + (this.escape_html(fix)) + "</em>" + (this.escape_html(suffix));
717
+ }
718
+ if (results_group != null) {
719
+ results_group.group_match = true;
720
+ }
721
+ } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
722
+ option.search_match = true;
723
+ }
724
+ }
725
+ }
726
+ }
727
+ this.result_clear_highlight();
728
+ if (results < 1 && query.length) {
729
+ this.update_results_content("");
730
+ return this.no_results(query);
731
+ } else {
732
+ this.update_results_content(this.results_option_build());
733
+ if (!(options != null ? options.skip_highlight : void 0)) {
734
+ return this.winnow_results_set_highlight();
735
+ }
736
+ }
737
+ };
738
+
739
+ AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
740
+ var regex_flag, regex_string;
741
+ regex_string = this.search_contains ? escaped_search_string : "(^|\\s|\\b)" + escaped_search_string + "[^\\s]*";
742
+ if (!(this.enable_split_word_search || this.search_contains)) {
743
+ regex_string = "^" + regex_string;
744
+ }
745
+ regex_flag = this.case_sensitive_search ? "" : "i";
746
+ return new RegExp(regex_string, regex_flag);
747
+ };
748
+
749
+ AbstractChosen.prototype.search_string_match = function(search_string, regex) {
750
+ var match;
751
+ match = regex.exec(search_string);
752
+ if (!this.search_contains && (match != null ? match[1] : void 0)) {
753
+ match.index += 1;
754
+ }
755
+ return match;
756
+ };
757
+
758
+ AbstractChosen.prototype.choices_count = function() {
759
+ var i, len, option, ref;
760
+ if (this.selected_option_count != null) {
761
+ return this.selected_option_count;
762
+ }
763
+ this.selected_option_count = 0;
764
+ ref = this.form_field.options;
765
+ for (i = 0, len = ref.length; i < len; i++) {
766
+ option = ref[i];
767
+ if (option.selected) {
768
+ this.selected_option_count += 1;
769
+ }
770
+ }
771
+ return this.selected_option_count;
772
+ };
773
+
774
+ AbstractChosen.prototype.choices_click = function(evt) {
775
+ evt.preventDefault();
776
+ this.activate_field();
777
+ if (!(this.results_showing || this.is_disabled)) {
778
+ return this.results_show();
779
+ }
780
+ };
781
+
782
+ AbstractChosen.prototype.keydown_checker = function(evt) {
783
+ var ref, stroke;
784
+ stroke = (ref = evt.which) != null ? ref : evt.keyCode;
785
+ this.search_field_scale();
786
+ if (stroke !== 8 && this.pending_backstroke) {
787
+ this.clear_backstroke();
788
+ }
789
+ switch (stroke) {
790
+ case 8:
791
+ this.backstroke_length = this.get_search_field_value().length;
792
+ break;
793
+ case 9:
794
+ if (this.results_showing && !this.is_multiple) {
795
+ this.result_select(evt);
796
+ }
797
+ this.mouse_on_container = false;
798
+ break;
799
+ case 13:
800
+ if (this.results_showing) {
801
+ evt.preventDefault();
802
+ }
803
+ break;
804
+ case 27:
805
+ if (this.results_showing) {
806
+ evt.preventDefault();
807
+ }
808
+ break;
809
+ case 32:
810
+ if (this.disable_search) {
811
+ evt.preventDefault();
812
+ }
813
+ break;
814
+ case 38:
815
+ evt.preventDefault();
816
+ this.keyup_arrow();
817
+ break;
818
+ case 40:
819
+ evt.preventDefault();
820
+ this.keydown_arrow();
821
+ break;
822
+ }
823
+ };
824
+
825
+ AbstractChosen.prototype.keyup_checker = function(evt) {
826
+ var ref, stroke;
827
+ stroke = (ref = evt.which) != null ? ref : evt.keyCode;
828
+ this.search_field_scale();
829
+ switch (stroke) {
830
+ case 8:
831
+ if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
832
+ this.keydown_backstroke();
833
+ } else if (!this.pending_backstroke) {
834
+ this.result_clear_highlight();
835
+ this.results_search();
836
+ }
837
+ break;
838
+ case 13:
839
+ evt.preventDefault();
840
+ if (this.results_showing) {
841
+ this.result_select(evt);
842
+ }
843
+ break;
844
+ case 27:
845
+ if (this.results_showing) {
846
+ this.results_hide();
847
+ }
848
+ break;
849
+ case 9:
850
+ case 16:
851
+ case 17:
852
+ case 18:
853
+ case 38:
854
+ case 40:
855
+ case 91:
856
+ break;
857
+ default:
858
+ this.results_search();
859
+ break;
860
+ }
861
+ };
862
+
863
+ AbstractChosen.prototype.clipboard_event_checker = function(evt) {
864
+ if (this.is_disabled) {
865
+ return;
866
+ }
867
+ return setTimeout(((function(_this) {
868
+ return function() {
869
+ return _this.results_search();
870
+ };
871
+ })(this)), 50);
872
+ };
873
+
874
+ AbstractChosen.prototype.container_width = function() {
875
+ if (this.options.width != null) {
876
+ return this.options.width;
877
+ } else {
878
+ return this.form_field.offsetWidth + "px";
879
+ }
880
+ };
881
+
882
+ AbstractChosen.prototype.include_option_in_results = function(option) {
883
+ if (this.is_multiple && (!this.display_selected_options && option.selected)) {
884
+ return false;
885
+ }
886
+ if (!this.display_disabled_options && option.disabled) {
887
+ return false;
888
+ }
889
+ if (option.empty) {
890
+ return false;
891
+ }
892
+ return true;
893
+ };
894
+
895
+ AbstractChosen.prototype.search_results_touchstart = function(evt) {
896
+ this.touch_started = true;
897
+ return this.search_results_mouseover(evt);
898
+ };
899
+
900
+ AbstractChosen.prototype.search_results_touchmove = function(evt) {
901
+ this.touch_started = false;
902
+ return this.search_results_mouseout(evt);
903
+ };
904
+
905
+ AbstractChosen.prototype.search_results_touchend = function(evt) {
906
+ if (this.touch_started) {
907
+ return this.search_results_mouseup(evt);
908
+ }
909
+ };
910
+
911
+ AbstractChosen.prototype.outerHTML = function(element) {
912
+ var tmp;
913
+ if (element.outerHTML) {
914
+ return element.outerHTML;
915
+ }
916
+ tmp = document.createElement("div");
917
+ tmp.appendChild(element);
918
+ return tmp.innerHTML;
919
+ };
920
+
921
+ AbstractChosen.prototype.get_single_html = function() {
922
+ return "<a class=\"chosen-single chosen-default\">\n <span>" + this.default_text + "</span>\n <div><b></b></div>\n</a>\n<div class=\"chosen-drop\">\n <div class=\"chosen-search\">\n <input class=\"chosen-search-input\" type=\"text\" autocomplete=\"off\" />\n </div>\n <ul class=\"chosen-results\"></ul>\n</div>";
923
+ };
924
+
925
+ AbstractChosen.prototype.get_multi_html = function() {
926
+ return "<ul class=\"chosen-choices\">\n <li class=\"search-field\">\n <input class=\"chosen-search-input\" type=\"text\" autocomplete=\"off\" value=\"" + this.default_text + "\" />\n </li>\n</ul>\n<div class=\"chosen-drop\">\n <ul class=\"chosen-results\"></ul>\n</div>";
927
+ };
928
+
929
+ AbstractChosen.prototype.get_no_results_html = function(terms) {
930
+ return "<li class=\"no-results\">\n " + this.results_none_found + " <span>" + (this.escape_html(terms)) + "</span>\n</li>";
931
+ };
932
+
933
+ AbstractChosen.browser_is_supported = function() {
934
+ if ("Microsoft Internet Explorer" === window.navigator.appName) {
935
+ return document.documentMode >= 8;
936
+ }
937
+ if (/iP(od|hone)/i.test(window.navigator.userAgent) || /IEMobile/i.test(window.navigator.userAgent) || /Windows Phone/i.test(window.navigator.userAgent) || /BlackBerry/i.test(window.navigator.userAgent) || /BB10/i.test(window.navigator.userAgent) || /Android.*Mobile/i.test(window.navigator.userAgent)) {
938
+ return false;
939
+ }
940
+ return true;
941
+ };
942
+
943
+ AbstractChosen.default_multiple_text = "Select Some Options";
944
+
945
+ AbstractChosen.default_single_text = "Select an Option";
946
+
947
+ AbstractChosen.default_no_result_text = "No results match";
948
+
949
+ return AbstractChosen;
950
+
951
+ })();
952
+
953
+ $ = jQuery;
954
+
955
+ $.fn.extend({
956
+ chosen: function(options) {
957
+ if (!AbstractChosen.browser_is_supported()) {
958
+ return this;
959
+ }
960
+ return this.each(function(input_field) {
961
+ var $this, chosen;
962
+ $this = $(this);
963
+ chosen = $this.data('chosen');
964
+ if (options === 'destroy') {
965
+ if (chosen instanceof Chosen) {
966
+ chosen.destroy();
967
+ }
968
+ return;
969
+ }
970
+ if (!(chosen instanceof Chosen)) {
971
+ $this.data('chosen', new Chosen(this, options));
972
+ }
973
+ });
974
+ }
975
+ });
976
+
977
+ Chosen = (function(superClass) {
978
+ extend(Chosen, superClass);
979
+
980
+ function Chosen() {
981
+ return Chosen.__super__.constructor.apply(this, arguments);
982
+ }
983
+
984
+ Chosen.prototype.setup = function() {
985
+ this.form_field_jq = $(this.form_field);
986
+ return this.current_selectedIndex = this.form_field.selectedIndex;
987
+ };
988
+
989
+ Chosen.prototype.set_up_html = function() {
990
+ var container_classes, container_props;
991
+ container_classes = ["chosen-container"];
992
+ container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
993
+ if (this.inherit_select_classes && this.form_field.className) {
994
+ container_classes.push(this.form_field.className);
995
+ }
996
+ if (this.is_rtl) {
997
+ container_classes.push("chosen-rtl");
998
+ }
999
+ container_props = {
1000
+ 'class': container_classes.join(' '),
1001
+ 'title': this.form_field.title
1002
+ };
1003
+ if (this.form_field.id.length) {
1004
+ container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
1005
+ }
1006
+ this.container = $("<div />", container_props);
1007
+ this.container.width(this.container_width());
1008
+ if (this.is_multiple) {
1009
+ this.container.html(this.get_multi_html());
1010
+ } else {
1011
+ this.container.html(this.get_single_html());
1012
+ }
1013
+ this.form_field_jq.hide().after(this.container);
1014
+ this.dropdown = this.container.find('div.chosen-drop').first();
1015
+ this.search_field = this.container.find('input').first();
1016
+ this.search_results = this.container.find('ul.chosen-results').first();
1017
+ this.search_field_scale();
1018
+ this.search_no_results = this.container.find('li.no-results').first();
1019
+ if (this.is_multiple) {
1020
+ this.search_choices = this.container.find('ul.chosen-choices').first();
1021
+ this.search_container = this.container.find('li.search-field').first();
1022
+ } else {
1023
+ this.search_container = this.container.find('div.chosen-search').first();
1024
+ this.selected_item = this.container.find('.chosen-single').first();
1025
+ }
1026
+ this.results_build();
1027
+ this.set_tab_index();
1028
+ return this.set_label_behavior();
1029
+ };
1030
+
1031
+ Chosen.prototype.on_ready = function() {
1032
+ return this.form_field_jq.trigger("chosen:ready", {
1033
+ chosen: this
1034
+ });
1035
+ };
1036
+
1037
+ Chosen.prototype.register_observers = function() {
1038
+ this.container.on('touchstart.chosen', (function(_this) {
1039
+ return function(evt) {
1040
+ _this.container_mousedown(evt);
1041
+ };
1042
+ })(this));
1043
+ this.container.on('touchend.chosen', (function(_this) {
1044
+ return function(evt) {
1045
+ _this.container_mouseup(evt);
1046
+ };
1047
+ })(this));
1048
+ this.container.on('mousedown.chosen', (function(_this) {
1049
+ return function(evt) {
1050
+ _this.container_mousedown(evt);
1051
+ };
1052
+ })(this));
1053
+ this.container.on('mouseup.chosen', (function(_this) {
1054
+ return function(evt) {
1055
+ _this.container_mouseup(evt);
1056
+ };
1057
+ })(this));
1058
+ this.container.on('mouseenter.chosen', (function(_this) {
1059
+ return function(evt) {
1060
+ _this.mouse_enter(evt);
1061
+ };
1062
+ })(this));
1063
+ this.container.on('mouseleave.chosen', (function(_this) {
1064
+ return function(evt) {
1065
+ _this.mouse_leave(evt);
1066
+ };
1067
+ })(this));
1068
+ this.search_results.on('mouseup.chosen', (function(_this) {
1069
+ return function(evt) {
1070
+ _this.search_results_mouseup(evt);
1071
+ };
1072
+ })(this));
1073
+ this.search_results.on('mouseover.chosen', (function(_this) {
1074
+ return function(evt) {
1075
+ _this.search_results_mouseover(evt);
1076
+ };
1077
+ })(this));
1078
+ this.search_results.on('mouseout.chosen', (function(_this) {
1079
+ return function(evt) {
1080
+ _this.search_results_mouseout(evt);
1081
+ };
1082
+ })(this));
1083
+ this.search_results.on('mousewheel.chosen DOMMouseScroll.chosen', (function(_this) {
1084
+ return function(evt) {
1085
+ _this.search_results_mousewheel(evt);
1086
+ };
1087
+ })(this));
1088
+ this.search_results.on('touchstart.chosen', (function(_this) {
1089
+ return function(evt) {
1090
+ _this.search_results_touchstart(evt);
1091
+ };
1092
+ })(this));
1093
+ this.search_results.on('touchmove.chosen', (function(_this) {
1094
+ return function(evt) {
1095
+ _this.search_results_touchmove(evt);
1096
+ };
1097
+ })(this));
1098
+ this.search_results.on('touchend.chosen', (function(_this) {
1099
+ return function(evt) {
1100
+ _this.search_results_touchend(evt);
1101
+ };
1102
+ })(this));
1103
+ this.form_field_jq.on("chosen:updated.chosen", (function(_this) {
1104
+ return function(evt) {
1105
+ _this.results_update_field(evt);
1106
+ };
1107
+ })(this));
1108
+ this.form_field_jq.on("chosen:activate.chosen", (function(_this) {
1109
+ return function(evt) {
1110
+ _this.activate_field(evt);
1111
+ };
1112
+ })(this));
1113
+ this.form_field_jq.on("chosen:open.chosen", (function(_this) {
1114
+ return function(evt) {
1115
+ _this.container_mousedown(evt);
1116
+ };
1117
+ })(this));
1118
+ this.form_field_jq.on("chosen:close.chosen", (function(_this) {
1119
+ return function(evt) {
1120
+ _this.close_field(evt);
1121
+ };
1122
+ })(this));
1123
+ this.search_field.on('blur.chosen', (function(_this) {
1124
+ return function(evt) {
1125
+ _this.input_blur(evt);
1126
+ };
1127
+ })(this));
1128
+ this.search_field.on('keyup.chosen', (function(_this) {
1129
+ return function(evt) {
1130
+ _this.keyup_checker(evt);
1131
+ };
1132
+ })(this));
1133
+ this.search_field.on('keydown.chosen', (function(_this) {
1134
+ return function(evt) {
1135
+ _this.keydown_checker(evt);
1136
+ };
1137
+ })(this));
1138
+ this.search_field.on('focus.chosen', (function(_this) {
1139
+ return function(evt) {
1140
+ _this.input_focus(evt);
1141
+ };
1142
+ })(this));
1143
+ this.search_field.on('cut.chosen', (function(_this) {
1144
+ return function(evt) {
1145
+ _this.clipboard_event_checker(evt);
1146
+ };
1147
+ })(this));
1148
+ this.search_field.on('paste.chosen', (function(_this) {
1149
+ return function(evt) {
1150
+ _this.clipboard_event_checker(evt);
1151
+ };
1152
+ })(this));
1153
+ if (this.is_multiple) {
1154
+ return this.search_choices.on('click.chosen', (function(_this) {
1155
+ return function(evt) {
1156
+ _this.choices_click(evt);
1157
+ };
1158
+ })(this));
1159
+ } else {
1160
+ return this.container.on('click.chosen', function(evt) {
1161
+ evt.preventDefault();
1162
+ });
1163
+ }
1164
+ };
1165
+
1166
+ Chosen.prototype.destroy = function() {
1167
+ $(this.container[0].ownerDocument).off('click.chosen', this.click_test_action);
1168
+ if (this.form_field_label.length > 0) {
1169
+ this.form_field_label.off('click.chosen');
1170
+ }
1171
+ if (this.search_field[0].tabIndex) {
1172
+ this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
1173
+ }
1174
+ this.container.remove();
1175
+ this.form_field_jq.removeData('chosen');
1176
+ return this.form_field_jq.show();
1177
+ };
1178
+
1179
+ Chosen.prototype.search_field_disabled = function() {
1180
+ this.is_disabled = this.form_field.disabled || this.form_field_jq.parents('fieldset').is(':disabled');
1181
+ this.container.toggleClass('chosen-disabled', this.is_disabled);
1182
+ this.search_field[0].disabled = this.is_disabled;
1183
+ if (!this.is_multiple) {
1184
+ this.selected_item.off('focus.chosen', this.activate_field);
1185
+ }
1186
+ if (this.is_disabled) {
1187
+ return this.close_field();
1188
+ } else if (!this.is_multiple) {
1189
+ return this.selected_item.on('focus.chosen', this.activate_field);
1190
+ }
1191
+ };
1192
+
1193
+ Chosen.prototype.container_mousedown = function(evt) {
1194
+ var ref;
1195
+ if (this.is_disabled) {
1196
+ return;
1197
+ }
1198
+ if (evt && ((ref = evt.type) === 'mousedown' || ref === 'touchstart') && !this.results_showing) {
1199
+ evt.preventDefault();
1200
+ }
1201
+ if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
1202
+ if (!this.active_field) {
1203
+ if (this.is_multiple) {
1204
+ this.search_field.val("");
1205
+ }
1206
+ $(this.container[0].ownerDocument).on('click.chosen', this.click_test_action);
1207
+ this.results_show();
1208
+ } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
1209
+ evt.preventDefault();
1210
+ this.results_toggle();
1211
+ }
1212
+ return this.activate_field();
1213
+ }
1214
+ };
1215
+
1216
+ Chosen.prototype.container_mouseup = function(evt) {
1217
+ if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
1218
+ return this.results_reset(evt);
1219
+ }
1220
+ };
1221
+
1222
+ Chosen.prototype.search_results_mousewheel = function(evt) {
1223
+ var delta;
1224
+ if (evt.originalEvent) {
1225
+ delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
1226
+ }
1227
+ if (delta != null) {
1228
+ evt.preventDefault();
1229
+ if (evt.type === 'DOMMouseScroll') {
1230
+ delta = delta * 40;
1231
+ }
1232
+ return this.search_results.scrollTop(delta + this.search_results.scrollTop());
1233
+ }
1234
+ };
1235
+
1236
+ Chosen.prototype.blur_test = function(evt) {
1237
+ if (!this.active_field && this.container.hasClass("chosen-container-active")) {
1238
+ return this.close_field();
1239
+ }
1240
+ };
1241
+
1242
+ Chosen.prototype.close_field = function() {
1243
+ $(this.container[0].ownerDocument).off("click.chosen", this.click_test_action);
1244
+ this.active_field = false;
1245
+ this.results_hide();
1246
+ this.container.removeClass("chosen-container-active");
1247
+ this.clear_backstroke();
1248
+ this.show_search_field_default();
1249
+ this.search_field_scale();
1250
+ return this.search_field.blur();
1251
+ };
1252
+
1253
+ Chosen.prototype.activate_field = function() {
1254
+ if (this.is_disabled) {
1255
+ return;
1256
+ }
1257
+ this.container.addClass("chosen-container-active");
1258
+ this.active_field = true;
1259
+ this.search_field.val(this.search_field.val());
1260
+ return this.search_field.focus();
1261
+ };
1262
+
1263
+ Chosen.prototype.test_active_click = function(evt) {
1264
+ var active_container;
1265
+ active_container = $(evt.target).closest('.chosen-container');
1266
+ if (active_container.length && this.container[0] === active_container[0]) {
1267
+ return this.active_field = true;
1268
+ } else {
1269
+ return this.close_field();
1270
+ }
1271
+ };
1272
+
1273
+ Chosen.prototype.results_build = function() {
1274
+ this.parsing = true;
1275
+ this.selected_option_count = null;
1276
+ this.results_data = SelectParser.select_to_array(this.form_field);
1277
+ if (this.is_multiple) {
1278
+ this.search_choices.find("li.search-choice").remove();
1279
+ } else {
1280
+ this.single_set_selected_text();
1281
+ if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
1282
+ this.search_field[0].readOnly = true;
1283
+ this.container.addClass("chosen-container-single-nosearch");
1284
+ } else {
1285
+ this.search_field[0].readOnly = false;
1286
+ this.container.removeClass("chosen-container-single-nosearch");
1287
+ }
1288
+ }
1289
+ this.update_results_content(this.results_option_build({
1290
+ first: true
1291
+ }));
1292
+ this.search_field_disabled();
1293
+ this.show_search_field_default();
1294
+ this.search_field_scale();
1295
+ return this.parsing = false;
1296
+ };
1297
+
1298
+ Chosen.prototype.result_do_highlight = function(el) {
1299
+ var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
1300
+ if (el.length) {
1301
+ this.result_clear_highlight();
1302
+ this.result_highlight = el;
1303
+ this.result_highlight.addClass("highlighted");
1304
+ maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
1305
+ visible_top = this.search_results.scrollTop();
1306
+ visible_bottom = maxHeight + visible_top;
1307
+ high_top = this.result_highlight.position().top + this.search_results.scrollTop();
1308
+ high_bottom = high_top + this.result_highlight.outerHeight();
1309
+ if (high_bottom >= visible_bottom) {
1310
+ return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
1311
+ } else if (high_top < visible_top) {
1312
+ return this.search_results.scrollTop(high_top);
1313
+ }
1314
+ }
1315
+ };
1316
+
1317
+ Chosen.prototype.result_clear_highlight = function() {
1318
+ if (this.result_highlight) {
1319
+ this.result_highlight.removeClass("highlighted");
1320
+ }
1321
+ return this.result_highlight = null;
1322
+ };
1323
+
1324
+ Chosen.prototype.results_show = function() {
1325
+ if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
1326
+ this.form_field_jq.trigger("chosen:maxselected", {
1327
+ chosen: this
1328
+ });
1329
+ return false;
1330
+ }
1331
+ this.container.addClass("chosen-with-drop");
1332
+ this.results_showing = true;
1333
+ this.search_field.focus();
1334
+ this.search_field.val(this.get_search_field_value());
1335
+ this.winnow_results();
1336
+ return this.form_field_jq.trigger("chosen:showing_dropdown", {
1337
+ chosen: this
1338
+ });
1339
+ };
1340
+
1341
+ Chosen.prototype.update_results_content = function(content) {
1342
+ return this.search_results.html(content);
1343
+ };
1344
+
1345
+ Chosen.prototype.results_hide = function() {
1346
+ if (this.results_showing) {
1347
+ this.result_clear_highlight();
1348
+ this.container.removeClass("chosen-with-drop");
1349
+ this.form_field_jq.trigger("chosen:hiding_dropdown", {
1350
+ chosen: this
1351
+ });
1352
+ }
1353
+ return this.results_showing = false;
1354
+ };
1355
+
1356
+ Chosen.prototype.set_tab_index = function(el) {
1357
+ var ti;
1358
+ if (this.form_field.tabIndex) {
1359
+ ti = this.form_field.tabIndex;
1360
+ this.form_field.tabIndex = -1;
1361
+ return this.search_field[0].tabIndex = ti;
1362
+ }
1363
+ };
1364
+
1365
+ Chosen.prototype.set_label_behavior = function() {
1366
+ this.form_field_label = this.form_field_jq.parents("label");
1367
+ if (!this.form_field_label.length && this.form_field.id.length) {
1368
+ this.form_field_label = $("label[for='" + this.form_field.id + "']");
1369
+ }
1370
+ if (this.form_field_label.length > 0) {
1371
+ return this.form_field_label.on('click.chosen', this.label_click_handler);
1372
+ }
1373
+ };
1374
+
1375
+ Chosen.prototype.show_search_field_default = function() {
1376
+ if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
1377
+ this.search_field.val(this.default_text);
1378
+ return this.search_field.addClass("default");
1379
+ } else {
1380
+ this.search_field.val("");
1381
+ return this.search_field.removeClass("default");
1382
+ }
1383
+ };
1384
+
1385
+ Chosen.prototype.search_results_mouseup = function(evt) {
1386
+ var target;
1387
+ target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
1388
+ if (target.length) {
1389
+ this.result_highlight = target;
1390
+ this.result_select(evt);
1391
+ return this.search_field.focus();
1392
+ }
1393
+ };
1394
+
1395
+ Chosen.prototype.search_results_mouseover = function(evt) {
1396
+ var target;
1397
+ target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
1398
+ if (target) {
1399
+ return this.result_do_highlight(target);
1400
+ }
1401
+ };
1402
+
1403
+ Chosen.prototype.search_results_mouseout = function(evt) {
1404
+ if ($(evt.target).hasClass("active-result") || $(evt.target).parents('.active-result').first()) {
1405
+ return this.result_clear_highlight();
1406
+ }
1407
+ };
1408
+
1409
+ Chosen.prototype.choice_build = function(item) {
1410
+ var choice, close_link;
1411
+ choice = $('<li />', {
1412
+ "class": "search-choice"
1413
+ }).html("<span>" + (this.choice_label(item)) + "</span>");
1414
+ if (item.disabled) {
1415
+ choice.addClass('search-choice-disabled');
1416
+ } else {
1417
+ close_link = $('<a />', {
1418
+ "class": 'search-choice-close',
1419
+ 'data-option-array-index': item.array_index
1420
+ });
1421
+ close_link.on('click.chosen', (function(_this) {
1422
+ return function(evt) {
1423
+ return _this.choice_destroy_link_click(evt);
1424
+ };
1425
+ })(this));
1426
+ choice.append(close_link);
1427
+ }
1428
+ return this.search_container.before(choice);
1429
+ };
1430
+
1431
+ Chosen.prototype.choice_destroy_link_click = function(evt) {
1432
+ evt.preventDefault();
1433
+ evt.stopPropagation();
1434
+ if (!this.is_disabled) {
1435
+ return this.choice_destroy($(evt.target));
1436
+ }
1437
+ };
1438
+
1439
+ Chosen.prototype.choice_destroy = function(link) {
1440
+ if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
1441
+ if (this.active_field) {
1442
+ this.search_field.focus();
1443
+ } else {
1444
+ this.show_search_field_default();
1445
+ }
1446
+ if (this.is_multiple && this.choices_count() > 0 && this.get_search_field_value().length < 1) {
1447
+ this.results_hide();
1448
+ }
1449
+ link.parents('li').first().remove();
1450
+ return this.search_field_scale();
1451
+ }
1452
+ };
1453
+
1454
+ Chosen.prototype.results_reset = function() {
1455
+ this.reset_single_select_options();
1456
+ this.form_field.options[0].selected = true;
1457
+ this.single_set_selected_text();
1458
+ this.show_search_field_default();
1459
+ this.results_reset_cleanup();
1460
+ this.trigger_form_field_change();
1461
+ if (this.active_field) {
1462
+ return this.results_hide();
1463
+ }
1464
+ };
1465
+
1466
+ Chosen.prototype.results_reset_cleanup = function() {
1467
+ this.current_selectedIndex = this.form_field.selectedIndex;
1468
+ return this.selected_item.find("abbr").remove();
1469
+ };
1470
+
1471
+ Chosen.prototype.result_select = function(evt) {
1472
+ var high, item;
1473
+ if (this.result_highlight) {
1474
+ high = this.result_highlight;
1475
+ this.result_clear_highlight();
1476
+ if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
1477
+ this.form_field_jq.trigger("chosen:maxselected", {
1478
+ chosen: this
1479
+ });
1480
+ return false;
1481
+ }
1482
+ if (this.is_multiple) {
1483
+ high.removeClass("active-result");
1484
+ } else {
1485
+ this.reset_single_select_options();
1486
+ }
1487
+ high.addClass("result-selected");
1488
+ item = this.results_data[high[0].getAttribute("data-option-array-index")];
1489
+ item.selected = true;
1490
+ this.form_field.options[item.options_index].selected = true;
1491
+ this.selected_option_count = null;
1492
+ if (this.is_multiple) {
1493
+ this.choice_build(item);
1494
+ } else {
1495
+ this.single_set_selected_text(this.choice_label(item));
1496
+ }
1497
+ if (this.is_multiple && (!this.hide_results_on_select || (evt.metaKey || evt.ctrlKey))) {
1498
+ if (evt.metaKey || evt.ctrlKey) {
1499
+ this.winnow_results({
1500
+ skip_highlight: true
1501
+ });
1502
+ } else {
1503
+ this.search_field.val("");
1504
+ this.winnow_results();
1505
+ }
1506
+ } else {
1507
+ this.results_hide();
1508
+ this.show_search_field_default();
1509
+ }
1510
+ if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
1511
+ this.trigger_form_field_change({
1512
+ selected: this.form_field.options[item.options_index].value
1513
+ });
1514
+ }
1515
+ this.current_selectedIndex = this.form_field.selectedIndex;
1516
+ evt.preventDefault();
1517
+ return this.search_field_scale();
1518
+ }
1519
+ };
1520
+
1521
+ Chosen.prototype.single_set_selected_text = function(text) {
1522
+ if (text == null) {
1523
+ text = this.default_text;
1524
+ }
1525
+ if (text === this.default_text) {
1526
+ this.selected_item.addClass("chosen-default");
1527
+ } else {
1528
+ this.single_deselect_control_build();
1529
+ this.selected_item.removeClass("chosen-default");
1530
+ }
1531
+ return this.selected_item.find("span").html(text);
1532
+ };
1533
+
1534
+ Chosen.prototype.result_deselect = function(pos) {
1535
+ var result_data;
1536
+ result_data = this.results_data[pos];
1537
+ if (!this.form_field.options[result_data.options_index].disabled) {
1538
+ result_data.selected = false;
1539
+ this.form_field.options[result_data.options_index].selected = false;
1540
+ this.selected_option_count = null;
1541
+ this.result_clear_highlight();
1542
+ if (this.results_showing) {
1543
+ this.winnow_results();
1544
+ }
1545
+ this.trigger_form_field_change({
1546
+ deselected: this.form_field.options[result_data.options_index].value
1547
+ });
1548
+ this.search_field_scale();
1549
+ return true;
1550
+ } else {
1551
+ return false;
1552
+ }
1553
+ };
1554
+
1555
+ Chosen.prototype.single_deselect_control_build = function() {
1556
+ if (!this.allow_single_deselect) {
1557
+ return;
1558
+ }
1559
+ if (!this.selected_item.find("abbr").length) {
1560
+ this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
1561
+ }
1562
+ return this.selected_item.addClass("chosen-single-with-deselect");
1563
+ };
1564
+
1565
+ Chosen.prototype.get_search_field_value = function() {
1566
+ return this.search_field.val();
1567
+ };
1568
+
1569
+ Chosen.prototype.get_search_text = function() {
1570
+ return $.trim(this.get_search_field_value());
1571
+ };
1572
+
1573
+ Chosen.prototype.escape_html = function(text) {
1574
+ return $('<div/>').text(text).html();
1575
+ };
1576
+
1577
+ Chosen.prototype.winnow_results_set_highlight = function() {
1578
+ var do_high, selected_results;
1579
+ selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
1580
+ do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
1581
+ if (do_high != null) {
1582
+ return this.result_do_highlight(do_high);
1583
+ }
1584
+ };
1585
+
1586
+ Chosen.prototype.no_results = function(terms) {
1587
+ var no_results_html;
1588
+ no_results_html = this.get_no_results_html(terms);
1589
+ this.search_results.append(no_results_html);
1590
+ return this.form_field_jq.trigger("chosen:no_results", {
1591
+ chosen: this
1592
+ });
1593
+ };
1594
+
1595
+ Chosen.prototype.no_results_clear = function() {
1596
+ return this.search_results.find(".no-results").remove();
1597
+ };
1598
+
1599
+ Chosen.prototype.keydown_arrow = function() {
1600
+ var next_sib;
1601
+ if (this.results_showing && this.result_highlight) {
1602
+ next_sib = this.result_highlight.nextAll("li.active-result").first();
1603
+ if (next_sib) {
1604
+ return this.result_do_highlight(next_sib);
1605
+ }
1606
+ } else {
1607
+ return this.results_show();
1608
+ }
1609
+ };
1610
+
1611
+ Chosen.prototype.keyup_arrow = function() {
1612
+ var prev_sibs;
1613
+ if (!this.results_showing && !this.is_multiple) {
1614
+ return this.results_show();
1615
+ } else if (this.result_highlight) {
1616
+ prev_sibs = this.result_highlight.prevAll("li.active-result");
1617
+ if (prev_sibs.length) {
1618
+ return this.result_do_highlight(prev_sibs.first());
1619
+ } else {
1620
+ if (this.choices_count() > 0) {
1621
+ this.results_hide();
1622
+ }
1623
+ return this.result_clear_highlight();
1624
+ }
1625
+ }
1626
+ };
1627
+
1628
+ Chosen.prototype.keydown_backstroke = function() {
1629
+ var next_available_destroy;
1630
+ if (this.pending_backstroke) {
1631
+ this.choice_destroy(this.pending_backstroke.find("a").first());
1632
+ return this.clear_backstroke();
1633
+ } else {
1634
+ next_available_destroy = this.search_container.siblings("li.search-choice").last();
1635
+ if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
1636
+ this.pending_backstroke = next_available_destroy;
1637
+ if (this.single_backstroke_delete) {
1638
+ return this.keydown_backstroke();
1639
+ } else {
1640
+ return this.pending_backstroke.addClass("search-choice-focus");
1641
+ }
1642
+ }
1643
+ }
1644
+ };
1645
+
1646
+ Chosen.prototype.clear_backstroke = function() {
1647
+ if (this.pending_backstroke) {
1648
+ this.pending_backstroke.removeClass("search-choice-focus");
1649
+ }
1650
+ return this.pending_backstroke = null;
1651
+ };
1652
+
1653
+ Chosen.prototype.search_field_scale = function() {
1654
+ var div, i, len, style, style_block, styles, width;
1655
+ if (!this.is_multiple) {
1656
+ return;
1657
+ }
1658
+ style_block = {
1659
+ position: 'absolute',
1660
+ left: '-1000px',
1661
+ top: '-1000px',
1662
+ display: 'none',
1663
+ whiteSpace: 'pre'
1664
+ };
1665
+ styles = ['fontSize', 'fontStyle', 'fontWeight', 'fontFamily', 'lineHeight', 'textTransform', 'letterSpacing'];
1666
+ for (i = 0, len = styles.length; i < len; i++) {
1667
+ style = styles[i];
1668
+ style_block[style] = this.search_field.css(style);
1669
+ }
1670
+ div = $('<div />').css(style_block);
1671
+ div.text(this.get_search_field_value());
1672
+ $('body').append(div);
1673
+ width = div.width() + 25;
1674
+ div.remove();
1675
+ if (this.container.is(':visible')) {
1676
+ width = Math.min(this.container.outerWidth() - 10, width);
1677
+ }
1678
+ return this.search_field.width(width);
1679
+ };
1680
+
1681
+ Chosen.prototype.trigger_form_field_change = function(extra) {
1682
+ this.form_field_jq.trigger("input", extra);
1683
+ return this.form_field_jq.trigger("change", extra);
1684
+ };
1685
+
1686
+ return Chosen;
1687
+
1688
+ })(AbstractChosen);
1689
+
1690
+ }).call(this);
1691
+ ;/**
1692
+ *
1693
+ * jQuery Interdependencies library
1694
+ * http://miohtama.github.com/jquery-interdependencies/
1695
+ * Copyright 2012-2013 Mikko Ohtamaa, others
1696
+ *
1697
+ * Customized by Codestar
1698
+ *
1699
+ */
1700
+ (function($) {
1701
+
1702
+ 'use strict';
1703
+
1704
+ function Rule(controller, condition, value) {
1705
+ this.init(controller, condition, value);
1706
+ }
1707
+
1708
+ $.extend(Rule.prototype, {
1709
+
1710
+ init: function(controller, condition, value) {
1711
+
1712
+ this.controller = controller;
1713
+ this.condition = condition;
1714
+ this.value = value;
1715
+ this.rules = [];
1716
+ this.controls = [];
1717
+
1718
+ },
1719
+
1720
+ evalCondition: function(context, control, condition, val1, val2) {
1721
+
1722
+ if( condition == '==' ) {
1723
+
1724
+ return this.checkBoolean(val1) == this.checkBoolean(val2);
1725
+
1726
+ } else if( condition == '!=' ) {
1727
+
1728
+ return this.checkBoolean(val1) != this.checkBoolean(val2);
1729
+
1730
+ } else if( condition == '>=' ) {
1731
+
1732
+ return Number(val2) >= Number(val1);
1733
+
1734
+ } else if( condition == '<=' ) {
1735
+
1736
+ return Number(val2) <= Number(val1);
1737
+
1738
+ } else if( condition == '>' ) {
1739
+
1740
+ return Number(val2) > Number(val1);
1741
+
1742
+ } else if( condition == '<' ) {
1743
+
1744
+ return Number(val2) < Number(val1);
1745
+
1746
+ } else if( condition == '()' ) {
1747
+
1748
+ return window[val1](context, control, val2);
1749
+
1750
+ } else if( condition == 'any' ) {
1751
+
1752
+ if( $.isArray( val2 ) ) {
1753
+ for (var i = val2.length - 1; i >= 0; i--) {
1754
+ if( $.inArray( val2[i], val1.split(',') ) !== -1 ) {
1755
+ return true;
1756
+ }
1757
+ }
1758
+ } else {
1759
+ if( $.inArray( val2, val1.split(',') ) !== -1 ) {
1760
+ return true;
1761
+ }
1762
+ }
1763
+
1764
+ } else if( condition == 'not-any' ) {
1765
+
1766
+ if( $.isArray( val2 ) ) {
1767
+ for (var i = val2.length - 1; i >= 0; i--) {
1768
+ if( $.inArray( val2[i], val1.split(',') ) == -1 ) {
1769
+ return true;
1770
+ }
1771
+ }
1772
+ } else {
1773
+ if( $.inArray( val2, val1.split(',') ) == -1 ) {
1774
+ return true;
1775
+ }
1776
+ }
1777
+
1778
+ }
1779
+
1780
+ return false;
1781
+
1782
+ },
1783
+
1784
+ checkBoolean: function(value) {
1785
+
1786
+ switch( value ) {
1787
+
1788
+ case true:
1789
+ case 'true':
1790
+ case 1:
1791
+ case '1':
1792
+ value = true;
1793
+ break;
1794
+
1795
+ case null:
1796
+ case false:
1797
+ case 'false':
1798
+ case 0:
1799
+ case '0':
1800
+ value = false;
1801
+ break;
1802
+
1803
+ }
1804
+
1805
+ return value;
1806
+ },
1807
+
1808
+ checkCondition: function( context ) {
1809
+
1810
+ if( !this.condition ) {
1811
+ return true;
1812
+ }
1813
+
1814
+ var control = context.find(this.controller);
1815
+
1816
+ var control_value = this.getControlValue(context, control);
1817
+
1818
+ if( control_value === undefined ) {
1819
+ return false;
1820
+ }
1821
+
1822
+ control_value = this.normalizeValue(control, this.value, control_value);
1823
+
1824
+ return this.evalCondition(context, control, this.condition, this.value, control_value);
1825
+ },
1826
+
1827
+ normalizeValue: function( control, baseValue, control_value ) {
1828
+
1829
+ if( typeof baseValue == 'number' ) {
1830
+ return parseFloat( control_value );
1831
+ }
1832
+
1833
+ return control_value;
1834
+ },
1835
+
1836
+ getControlValue: function(context, control) {
1837
+
1838
+ if( control.length > 1 && ( control.attr('type') == 'radio' || control.attr('type') == 'checkbox' ) ) {
1839
+
1840
+ return control.filter(':checked').map(function() { return this.value; }).get();
1841
+
1842
+ } else if ( control.attr('type') == 'checkbox' || control.attr('type') == 'radio' ) {
1843
+
1844
+ return control.is(':checked');
1845
+
1846
+ }
1847
+
1848
+ return control.val();
1849
+
1850
+ },
1851
+
1852
+ createRule: function(controller, condition, value) {
1853
+ var rule = new Rule(controller, condition, value);
1854
+ this.rules.push(rule);
1855
+ return rule;
1856
+ },
1857
+
1858
+ include: function(input) {
1859
+ this.controls.push(input);
1860
+ },
1861
+
1862
+ applyRule: function(context, enforced) {
1863
+
1864
+ var result;
1865
+
1866
+ if( typeof( enforced ) == 'undefined' ) {
1867
+ result = this.checkCondition(context);
1868
+ } else {
1869
+ result = enforced;
1870
+ }
1871
+
1872
+ var controls = $.map(this.controls, function(elem, idx) {
1873
+ return context.find(elem);
1874
+ });
1875
+
1876
+ if( result ) {
1877
+
1878
+ $(controls).each(function() {
1879
+ $(this).removeClass('hidden');
1880
+ });
1881
+
1882
+ $(this.rules).each(function() {
1883
+ this.applyRule(context);
1884
+ });
1885
+
1886
+ } else {
1887
+
1888
+ $(controls).each(function() {
1889
+ $(this).addClass('hidden');
1890
+ });
1891
+
1892
+ $(this.rules).each(function() {
1893
+ this.applyRule(context, false);
1894
+ });
1895
+
1896
+ }
1897
+ }
1898
+ });
1899
+
1900
+ function Ruleset() {
1901
+ this.rules = [];
1902
+ };
1903
+
1904
+ $.extend(Ruleset.prototype, {
1905
+
1906
+ createRule: function(controller, condition, value) {
1907
+ var rule = new Rule(controller, condition, value);
1908
+ this.rules.push(rule);
1909
+ return rule;
1910
+ },
1911
+
1912
+ applyRules: function(context) {
1913
+ $(this.rules).each(function() {
1914
+ this.applyRule(context);
1915
+ });
1916
+ }
1917
+ });
1918
+
1919
+ $.spftestimonial_deps = {
1920
+
1921
+ createRuleset: function() {
1922
+ return new Ruleset();
1923
+ },
1924
+
1925
+ enable: function(selection, ruleset, depends) {
1926
+
1927
+ selection.on('change keyup', function(elem) {
1928
+
1929
+ var depend_id = elem.target.getAttribute('data-depend-id') || elem.target.getAttribute('data-sub-depend-id');
1930
+
1931
+ if( depends.indexOf( depend_id ) !== -1 ) {
1932
+ ruleset.applyRules(selection);
1933
+ }
1934
+
1935
+ });
1936
+
1937
+ ruleset.applyRules(selection);
1938
+
1939
+ return true;
1940
+ }
1941
+ };
1942
+
1943
+ })(jQuery);
1944
+ ;/**
1945
+ *
1946
+ * jQuery serializeObject
1947
+ *
1948
+ * @copyright 2014, macek <paulmacek@gmail.com>
1949
+ * @link https://github.com/macek/jquery-serialize-object
1950
+ * @license BSD
1951
+ * @version 2.5.0
1952
+ *
1953
+ * Customized by Codestar
1954
+ *
1955
+ */
1956
+ (function(root, factory) {
1957
+
1958
+ // AMD
1959
+ if (typeof define === "function" && define.amd) {
1960
+ define(["exports", "jquery"], function(exports, $) {
1961
+ return factory(exports, $);
1962
+ });
1963
+ }
1964
+
1965
+ // CommonJS
1966
+ else if (typeof exports !== "undefined") {
1967
+ var $ = require("jquery");
1968
+ factory(exports, $);
1969
+ }
1970
+
1971
+ // Browser
1972
+ else {
1973
+ factory(root, (root.jQuery || root.Zepto || root.ender || root.$));
1974
+ }
1975
+
1976
+ }(this, function(exports, $) {
1977
+
1978
+ //
1979
+ // Codestar: Added custom patterns for spesific validate
1980
+ //
1981
+ var patterns = {
1982
+ validate: /^(?!_nonce)[a-zA-Z0-9_-]*(?:\[(?:\d*|(?!_nonce)[a-zA-Z0-9_-]+)\])*$/i,
1983
+ key: /[a-zA-Z0-9_-]+|(?=\[\])/g,
1984
+ named: /^[a-zA-Z0-9_-]+$/,
1985
+ push: /^$/,
1986
+ fixed: /^\d+$/
1987
+ };
1988
+
1989
+ function FormSerializer(helper, $form) {
1990
+
1991
+ // private variables
1992
+ var data = {},
1993
+ pushes = {};
1994
+
1995
+ // private API
1996
+ function build(base, key, value) {
1997
+ base[key] = value;
1998
+ return base;
1999
+ }
2000
+
2001
+ function makeObject(root, value) {
2002
+
2003
+ var keys = root.match(patterns.key), k;
2004
+
2005
+ // nest, nest, ..., nest
2006
+ while ((k = keys.pop()) !== undefined) {
2007
+ // foo[]
2008
+ if (patterns.push.test(k)) {
2009
+ var idx = incrementPush(root.replace(/\[\]$/, ''));
2010
+ value = build([], idx, value);
2011
+ }
2012
+
2013
+ // foo[n]
2014
+ else if (patterns.fixed.test(k)) {
2015
+ value = build([], k, value);
2016
+ }
2017
+
2018
+ // foo; foo[bar]
2019
+ else if (patterns.named.test(k)) {
2020
+ value = build({}, k, value);
2021
+ }
2022
+ }
2023
+
2024
+ return value;
2025
+ }
2026
+
2027
+ function incrementPush(key) {
2028
+ if (pushes[key] === undefined) {
2029
+ pushes[key] = 0;
2030
+ }
2031
+ return pushes[key]++;
2032
+ }
2033
+
2034
+ function addPair(pair) {
2035
+ if (!patterns.validate.test(pair.name)) return this;
2036
+ var obj = makeObject(pair.name, pair.value);
2037
+ data = helper.extend(true, data, obj);
2038
+ return this;
2039
+ }
2040
+
2041
+ function addPairs(pairs) {
2042
+ if (!helper.isArray(pairs)) {
2043
+ throw new Error("formSerializer.addPairs expects an Array");
2044
+ }
2045
+ for (var i=0, len=pairs.length; i<len; i++) {
2046
+ this.addPair(pairs[i]);
2047
+ }
2048
+ return this;
2049
+ }
2050
+
2051
+ function serialize() {
2052
+ return data;
2053
+ }
2054
+
2055
+ function serializeJSON() {
2056
+ return JSON.stringify(serialize());
2057
+ }
2058
+
2059
+ // public API
2060
+ this.addPair = addPair;
2061
+ this.addPairs = addPairs;
2062
+ this.serialize = serialize;
2063
+ this.serializeJSON = serializeJSON;
2064
+ }
2065
+
2066
+ FormSerializer.patterns = patterns;
2067
+
2068
+ FormSerializer.serializeObject = function serializeObject() {
2069
+ return new FormSerializer($, this).
2070
+ addPairs(this.serializeArray()).
2071
+ serialize();
2072
+ };
2073
+
2074
+ FormSerializer.serializeJSON = function serializeJSON() {
2075
+ return new FormSerializer($, this).
2076
+ addPairs(this.serializeArray()).
2077
+ serializeJSON();
2078
+ };
2079
+
2080
+ //
2081
+ // Codestar: Renamed function names for avoid conflicts
2082
+ //
2083
+
2084
+ if (typeof $.fn !== "undefined") {
2085
+ $.fn.serializeObjectSPFTESTIMONIAL = FormSerializer.serializeObject;
2086
+ $.fn.serializeJSONSPFTESTIMONIAL = FormSerializer.serializeJSON;
2087
+ }
2088
+
2089
+ exports.FormSerializer = FormSerializer;
2090
+
2091
+ return FormSerializer;
2092
+ }));
admin/views/tp-metabox/assets/js/spftestimonial-plugins.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function($){function SPFTESTIMONIALAjaxChosen(element,options){this.element=$(element),this.options=options,this.init()}SPFTESTIMONIALAjaxChosen.prototype.init=function(){this.element.chosen(this.options),this.container=this.element.next(".chosen-container"),this.search_field=this.container.find(".chosen-search-input"),this.is_multiple=this.container.hasClass("chosen-container-multi"),this.is_typing=!1,this.chosenXhr=null,this.events()},SPFTESTIMONIALAjaxChosen.prototype.events=function(){var _this=this;this.search_field.on("compositionstart",(function(){_this.is_typing=!0})),this.search_field.on("compositionend",(function(){_this.is_typing=!1,_this.update_list()})),this.search_field.on("keyup",(function(){_this.update_list()})),this.search_field.on("focus",(function(){_this.search_field_focused()}))},SPFTESTIMONIALAjaxChosen.prototype.search_field_focused=function(){this.search_welcome_message(),0===this.options.min_length&&0===this.search_field.val().length&&this.update_list()},SPFTESTIMONIALAjaxChosen.prototype.search_welcome_message=function(){var value=$.trim(this.search_field.val()),results=this.container.find(".chosen-results");0===results.children().length&&0===value.length&&results.html('<li class="no-results">'+this.options.typing_text.replace("%s",this.options.min_length-value.length)+"</li>")},SPFTESTIMONIALAjaxChosen.prototype.update_list=function(){var _this=this;if(this.search_welcome_message(),!this.is_typing){var value=$.trim(this.search_field.val()),message=value.length<this.options.min_length?this.options.typing_text.replace("%s",this.options.min_length-value.length):this.options.searching_text;this.container.find(".no-results").text(message),value!==this.search_field.data("prevVal")&&(this.search_field.data("prevVal",value),this.timer&&clearTimeout(this.timer),value.length<this.options.min_length||(this.timer=setTimeout((function(){_this.chosenXhr&&_this.chosenXhr.abort(),_this.options.data.term=value,_this.chosenXhr=window.wp.ajax.post("spftestimonial-chosen",_this.options.data).done((function(response){_this.show_results(response)})).fail((function(response){_this.container.find(".no-results").text(response.error)}))}),this.options.type_delay)))}},SPFTESTIMONIALAjaxChosen.prototype.show_results=function(items){var _this=this;if(!this.is_typing&&null!==items){if(0===items.length)return this.element.data().chosen.no_results_clear(),void this.element.data().chosen.no_results(this.search_field.val());var selected_values=[];this.element.find("option").each((function(){$(this).is(":selected")?selected_values.push($(this).val()+"-"+$(this).text()):$(this).attr("value").length&&$(this).remove()})),$.each(items,(function(i,item){-1===$.inArray(item.value+"-"+item.text,selected_values)&&$("<option />").attr("value",item.value).html(item.text).appendTo(_this.element)}));var value_before_trigger=this.search_field.val(),width_before_trigger=this.search_field.innerWidth();if(this.element.trigger("chosen:updated"),this.is_multiple){var $hidden_select,$hidden_value=this.element.parent().find(".spftestimonial-hidden-select").val()||[];this.element.SPFTESTIMONIALChosenOrder($hidden_value,!0),this.search_field.css("width",width_before_trigger)}this.search_field.val(value_before_trigger),null!==this.chosenXhr.done&&this.chosenXhr.done(items)}},$.fn.SPFTESTIMONIALAjaxChosen=function(chosenOptions){return this.each((function(){new SPFTESTIMONIALAjaxChosen(this,chosenOptions)}))}}(jQuery),function(){var $,SPFTESTIMONIALAbstractChosenOrder,_ref,__indexOf=[].indexOf||function(item){for(var i=0,l=this.length;i<l;i++)if(i in this&&this[i]===item)return i;return-1},__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent)__hasProp.call(parent,key)&&(child[key]=parent[key]);function ctor(){this.constructor=child}return ctor.prototype=parent.prototype,child.prototype=new ctor,child.__super__=parent.prototype,child};SPFTESTIMONIALAbstractChosenOrder=function(){function SPFTESTIMONIALAbstractChosenOrder(){}return SPFTESTIMONIALAbstractChosenOrder.insertAt=function(node,index,parentNode){return parentNode.insertBefore(node,parentNode.children[index].nextSibling)},SPFTESTIMONIALAbstractChosenOrder.getFlattenedOptionsAndGroups=function(select){var flattened_options,opt,options,sub_opt,sub_options,_i,_j,_len,_len1;for(flattened_options=[],_i=0,_len=(options=Array.prototype.filter.call(select.childNodes,(function(o){var _ref;return"OPTION"===(_ref=o.nodeName.toUpperCase())||"OPTGROUP"===_ref}))).length;_i<_len;_i++)if(opt=options[_i],flattened_options.push(opt),"OPTGROUP"===opt.nodeName.toUpperCase())for(_j=0,_len1=(sub_options=Array.prototype.filter.call(opt.childNodes,(function(o){return"OPTION"===o.nodeName.toUpperCase()}))).length;_j<_len1;_j++)sub_opt=sub_options[_j],flattened_options.push(sub_opt);return flattened_options},SPFTESTIMONIALAbstractChosenOrder.isValidMultipleSelectElement=function(element){return null!=element&&"SELECT"===element.nodeName&&element.multiple},SPFTESTIMONIALAbstractChosenOrder.getChosenUIContainer=function(select){return""!==select.id?document.getElementById(select.id.replace(/-/g,"_")+"_chosen"):this.searchChosenUIContainer(select)},SPFTESTIMONIALAbstractChosenOrder.isChosenified=function(select){return null!=this.getChosenUIContainer(select)},SPFTESTIMONIALAbstractChosenOrder.forceSelection=function(select,selection){var i,opt,options,_ref;for(options=this.getFlattenedOptionsAndGroups(select),i=0;i<options.length;)_ref=(opt=options[i]).getAttribute("value"),__indexOf.call(selection,_ref)>=0?(opt.selected=!0,opt.setAttribute("selected","")):(opt.selected=!1,opt.removeAttribute("selected")),i++;return this.triggerEvent(select,"chosen:updated")},SPFTESTIMONIALAbstractChosenOrder.SPFTESTIMONIALChosenOrder=function(select,order,force){var chosen_choices,chosen_options,chosen_ui,i,j,opt,opt_val,option,options,rel,relAttributeName,_i,_j,_len,_len1,_results;if(null!=this.getDOMElement&&(select=this.getDOMElement(select)),this.isValidMultipleSelectElement(select)&&null!=(chosen_ui=this.getChosenUIContainer(select))&&order instanceof Array){for(order=order.map(Function.prototype.call,String.prototype.trim),options=this.getFlattenedOptionsAndGroups(select),null!=force&&!0===force&&this.forceSelection(select,order),_results=[],i=_i=0,_len=order.length;_i<_len;i=++_i){for(opt_val=order[i],rel=null,j=_j=0,_len1=options.length;_j<_len1;j=++_j)(opt=options[j]).value===opt_val&&(rel=j);chosen_options=chosen_ui.querySelectorAll(".search-choice"),relAttributeName=this.relAttributeName,null!=(option=Array.prototype.filter.call(chosen_options,(function(o){return null!=o.querySelector("a.search-choice-close["+relAttributeName+'="'+rel+'"]')}))[0])&&(chosen_choices=chosen_ui.querySelector("ul.chosen-choices"),_results.push(this.insertAt(option,i,chosen_ui.querySelector("ul.chosen-choices"))))}return _results}},SPFTESTIMONIALAbstractChosenOrder}(),($=jQuery).fn.extend({SPFTESTIMONIALChosenOrder:function(order,force){return _SPFTESTIMONIALChosenOrder.SPFTESTIMONIALChosenOrder(this,order,force)}}),this._SPFTESTIMONIALChosenOrder=function(_super){function _SPFTESTIMONIALChosenOrder(){return _ref=_SPFTESTIMONIALChosenOrder.__super__.constructor.apply(this,arguments)}return __extends(_SPFTESTIMONIALChosenOrder,_super),_SPFTESTIMONIALChosenOrder.relAttributeName="data-option-array-index",_SPFTESTIMONIALChosenOrder.isjQueryObject=function(obj){return"undefined"!=typeof jQuery&&null!==jQuery&&obj instanceof jQuery},_SPFTESTIMONIALChosenOrder.getDOMElement=function(element){return this.isjQueryObject(element)?element.get(0):element},_SPFTESTIMONIALChosenOrder.searchChosenUIContainer=function(element){return null!=$(element).data("chosen")?$(element).data("chosen").container[0]:$(element).next(".chosen-container.chosen-container-multi").get(0)},_SPFTESTIMONIALChosenOrder.triggerEvent=function(target,event_name){return $(target).trigger(event_name)},_SPFTESTIMONIALChosenOrder}(SPFTESTIMONIALAbstractChosenOrder)}.call(this),function(){var $,AbstractChosen,Chosen,SelectParser,bind=function(fn,me){return function(){return fn.apply(me,arguments)}},extend=function(child,parent){for(var key in parent)hasProp.call(parent,key)&&(child[key]=parent[key]);function ctor(){this.constructor=child}return ctor.prototype=parent.prototype,child.prototype=new ctor,child.__super__=parent.prototype,child},hasProp={}.hasOwnProperty;(SelectParser=function(){function SelectParser(){this.options_index=0,this.parsed=[]}return SelectParser.prototype.add_node=function(child){return"OPTGROUP"===child.nodeName.toUpperCase()?this.add_group(child):this.add_option(child)},SelectParser.prototype.add_group=function(group){var group_position,i,len,option,ref,results1;for(group_position=this.parsed.length,this.parsed.push({array_index:group_position,group:!0,label:group.label,title:group.title?group.title:void 0,children:0,disabled:group.disabled,classes:group.className}),results1=[],i=0,len=(ref=group.childNodes).length;i<len;i++)option=ref[i],results1.push(this.add_option(option,group_position,group.disabled));return results1},SelectParser.prototype.add_option=function(option,group_position,group_disabled){if("OPTION"===option.nodeName.toUpperCase())return""!==option.text?(null!=group_position&&(this.parsed[group_position].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:option.value,text:option.text,html:option.innerHTML,title:option.title?option.title:void 0,selected:option.selected,disabled:!0===group_disabled?group_disabled:option.disabled,group_array_index:group_position,group_label:null!=group_position?this.parsed[group_position].label:null,classes:option.className,style:option.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},SelectParser}()).select_to_array=function(select){var child,i,len,parser,ref;for(parser=new SelectParser,i=0,len=(ref=select.childNodes).length;i<len;i++)child=ref[i],parser.add_node(child);return parser.parsed},AbstractChosen=function(){function AbstractChosen(form_field,options1){this.form_field=form_field,this.options=null!=options1?options1:{},this.label_click_handler=bind(this.label_click_handler,this),AbstractChosen.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return AbstractChosen.prototype.set_default_values=function(){var _this;return this.click_test_action=(_this=this,function(evt){return _this.test_active_click(evt)}),this.activate_action=function(_this){return function(evt){return _this.activate_field(evt)}}(this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},AbstractChosen.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||AbstractChosen.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||AbstractChosen.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||AbstractChosen.default_no_result_text},AbstractChosen.prototype.choice_label=function(item){return this.include_group_label_in_selected&&null!=item.group_label?"<b class='group-name'>"+this.escape_html(item.group_label)+"</b>"+item.html:item.html},AbstractChosen.prototype.mouse_enter=function(){return this.mouse_on_container=!0},AbstractChosen.prototype.mouse_leave=function(){return this.mouse_on_container=!1},AbstractChosen.prototype.input_focus=function(evt){if(this.is_multiple){if(!this.active_field)return setTimeout((_this=this,function(){return _this.container_mousedown()}),50)}else if(!this.active_field)return this.activate_field();var _this},AbstractChosen.prototype.input_blur=function(evt){if(!this.mouse_on_container)return this.active_field=!1,setTimeout((_this=this,function(){return _this.blur_test()}),100);var _this},AbstractChosen.prototype.label_click_handler=function(evt){return this.is_multiple?this.container_mousedown(evt):this.activate_field()},AbstractChosen.prototype.results_option_build=function(options){var content,data,data_content,i,len,ref,shown_results;for(content="",shown_results=0,i=0,len=(ref=this.results_data).length;i<len&&(data_content="",""!==(data_content=(data=ref[i]).group?this.result_add_group(data):this.result_add_option(data))&&(shown_results++,content+=data_content),(null!=options?options.first:void 0)&&(data.selected&&this.is_multiple?this.choice_build(data):data.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(data))),!(shown_results>=this.max_shown_results));i++);return content},AbstractChosen.prototype.result_add_option=function(option){var classes,option_el;return option.search_match&&this.include_option_in_results(option)?(classes=[],option.disabled||option.selected&&this.is_multiple||classes.push("active-result"),!option.disabled||option.selected&&this.is_multiple||classes.push("disabled-result"),option.selected&&classes.push("result-selected"),null!=option.group_array_index&&classes.push("group-option"),""!==option.classes&&classes.push(option.classes),(option_el=document.createElement("li")).className=classes.join(" "),option.style&&(option_el.style.cssText=option.style),option_el.setAttribute("data-option-array-index",option.array_index),option_el.innerHTML=option.highlighted_html||option.html,option.title&&(option_el.title=option.title),this.outerHTML(option_el)):""},AbstractChosen.prototype.result_add_group=function(group){var classes,group_el;return(group.search_match||group.group_match)&&group.active_options>0?((classes=[]).push("group-result"),group.classes&&classes.push(group.classes),(group_el=document.createElement("li")).className=classes.join(" "),group_el.innerHTML=group.highlighted_html||this.escape_html(group.label),group.title&&(group_el.title=group.title),this.outerHTML(group_el)):""},AbstractChosen.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},AbstractChosen.prototype.reset_single_select_options=function(){var i,len,ref,result,results1;for(results1=[],i=0,len=(ref=this.results_data).length;i<len;i++)(result=ref[i]).selected?results1.push(result.selected=!1):results1.push(void 0);return results1},AbstractChosen.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},AbstractChosen.prototype.results_search=function(evt){return this.results_showing?this.winnow_results():this.results_show()},AbstractChosen.prototype.winnow_results=function(options){var escapedQuery,fix,i,len,option,prefix,query,ref,regex,results,results_group,search_match,startpos,suffix,text;for(this.no_results_clear(),results=0,escapedQuery=(query=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),regex=this.get_search_regex(escapedQuery),i=0,len=(ref=this.results_data).length;i<len;i++)(option=ref[i]).search_match=!1,results_group=null,search_match=null,option.highlighted_html="",this.include_option_in_results(option)&&(option.group&&(option.group_match=!1,option.active_options=0),null!=option.group_array_index&&this.results_data[option.group_array_index]&&(0===(results_group=this.results_data[option.group_array_index]).active_options&&results_group.search_match&&(results+=1),results_group.active_options+=1),text=option.group?option.label:option.text,option.group&&!this.group_search||(search_match=this.search_string_match(text,regex),option.search_match=null!=search_match,option.search_match&&!option.group&&(results+=1),option.search_match?(query.length&&(startpos=search_match.index,prefix=text.slice(0,startpos),fix=text.slice(startpos,startpos+query.length),suffix=text.slice(startpos+query.length),option.highlighted_html=this.escape_html(prefix)+"<em>"+this.escape_html(fix)+"</em>"+this.escape_html(suffix)),null!=results_group&&(results_group.group_match=!0)):null!=option.group_array_index&&this.results_data[option.group_array_index].search_match&&(option.search_match=!0)));return this.result_clear_highlight(),results<1&&query.length?(this.update_results_content(""),this.no_results(query)):(this.update_results_content(this.results_option_build()),(null!=options?options.skip_highlight:void 0)?void 0:this.winnow_results_set_highlight())},AbstractChosen.prototype.get_search_regex=function(escaped_search_string){var regex_flag,regex_string;return regex_string=this.search_contains?escaped_search_string:"(^|\\s|\\b)"+escaped_search_string+"[^\\s]*",this.enable_split_word_search||this.search_contains||(regex_string="^"+regex_string),regex_flag=this.case_sensitive_search?"":"i",new RegExp(regex_string,regex_flag)},AbstractChosen.prototype.search_string_match=function(search_string,regex){var match;return match=regex.exec(search_string),!this.search_contains&&(null!=match?match[1]:void 0)&&(match.index+=1),match},AbstractChosen.prototype.choices_count=function(){var i,len,option,ref;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,i=0,len=(ref=this.form_field.options).length;i<len;i++)(option=ref[i]).selected&&(this.selected_option_count+=1);return this.selected_option_count},AbstractChosen.prototype.choices_click=function(evt){if(evt.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return this.results_show()},AbstractChosen.prototype.keydown_checker=function(evt){var ref,stroke;switch(stroke=null!=(ref=evt.which)?ref:evt.keyCode,this.search_field_scale(),8!==stroke&&this.pending_backstroke&&this.clear_backstroke(),stroke){case 8:this.backstroke_length=this.get_search_field_value().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(evt),this.mouse_on_container=!1;break;case 13:case 27:this.results_showing&&evt.preventDefault();break;case 32:this.disable_search&&evt.preventDefault();break;case 38:evt.preventDefault(),this.keyup_arrow();break;case 40:evt.preventDefault(),this.keydown_arrow()}},AbstractChosen.prototype.keyup_checker=function(evt){var ref,stroke;switch(stroke=null!=(ref=evt.which)?ref:evt.keyCode,this.search_field_scale(),stroke){case 8:this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:evt.preventDefault(),this.results_showing&&this.result_select(evt);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},AbstractChosen.prototype.clipboard_event_checker=function(evt){var _this;if(!this.is_disabled)return setTimeout((_this=this,function(){return _this.results_search()}),50)},AbstractChosen.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},AbstractChosen.prototype.include_option_in_results=function(option){return!(this.is_multiple&&!this.display_selected_options&&option.selected)&&(!(!this.display_disabled_options&&option.disabled)&&!option.empty)},AbstractChosen.prototype.search_results_touchstart=function(evt){return this.touch_started=!0,this.search_results_mouseover(evt)},AbstractChosen.prototype.search_results_touchmove=function(evt){return this.touch_started=!1,this.search_results_mouseout(evt)},AbstractChosen.prototype.search_results_touchend=function(evt){if(this.touch_started)return this.search_results_mouseup(evt)},AbstractChosen.prototype.outerHTML=function(element){var tmp;return element.outerHTML?element.outerHTML:((tmp=document.createElement("div")).appendChild(element),tmp.innerHTML)},AbstractChosen.prototype.get_single_html=function(){return'<a class="chosen-single chosen-default">\n <span>'+this.default_text+'</span>\n <div><b></b></div>\n</a>\n<div class="chosen-drop">\n <div class="chosen-search">\n <input class="chosen-search-input" type="text" autocomplete="off" />\n </div>\n <ul class="chosen-results"></ul>\n</div>'},AbstractChosen.prototype.get_multi_html=function(){return'<ul class="chosen-choices">\n <li class="search-field">\n <input class="chosen-search-input" type="text" autocomplete="off" value="'+this.default_text+'" />\n </li>\n</ul>\n<div class="chosen-drop">\n <ul class="chosen-results"></ul>\n</div>'},AbstractChosen.prototype.get_no_results_html=function(terms){return'<li class="no-results">\n '+this.results_none_found+" <span>"+this.escape_html(terms)+"</span>\n</li>"},AbstractChosen.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},AbstractChosen.default_multiple_text="Select Some Options",AbstractChosen.default_single_text="Select an Option",AbstractChosen.default_no_result_text="No results match",AbstractChosen}(),($=jQuery).fn.extend({chosen:function(options){return AbstractChosen.browser_is_supported()?this.each((function(input_field){var $this,chosen;chosen=($this=$(this)).data("chosen"),"destroy"!==options?chosen instanceof Chosen||$this.data("chosen",new Chosen(this,options)):chosen instanceof Chosen&&chosen.destroy()})):this}}),Chosen=function(superClass){function Chosen(){return Chosen.__super__.constructor.apply(this,arguments)}return extend(Chosen,superClass),Chosen.prototype.setup=function(){return this.form_field_jq=$(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex},Chosen.prototype.set_up_html=function(){var container_classes,container_props;return(container_classes=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&container_classes.push(this.form_field.className),this.is_rtl&&container_classes.push("chosen-rtl"),container_props={class:container_classes.join(" "),title:this.form_field.title},this.form_field.id.length&&(container_props.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=$("<div />",container_props),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},Chosen.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},Chosen.prototype.register_observers=function(){var _this;return this.container.on("touchstart.chosen",(_this=this,function(evt){_this.container_mousedown(evt)})),this.container.on("touchend.chosen",function(_this){return function(evt){_this.container_mouseup(evt)}}(this)),this.container.on("mousedown.chosen",function(_this){return function(evt){_this.container_mousedown(evt)}}(this)),this.container.on("mouseup.chosen",function(_this){return function(evt){_this.container_mouseup(evt)}}(this)),this.container.on("mouseenter.chosen",function(_this){return function(evt){_this.mouse_enter(evt)}}(this)),this.container.on("mouseleave.chosen",function(_this){return function(evt){_this.mouse_leave(evt)}}(this)),this.search_results.on("mouseup.chosen",function(_this){return function(evt){_this.search_results_mouseup(evt)}}(this)),this.search_results.on("mouseover.chosen",function(_this){return function(evt){_this.search_results_mouseover(evt)}}(this)),this.search_results.on("mouseout.chosen",function(_this){return function(evt){_this.search_results_mouseout(evt)}}(this)),this.search_results.on("mousewheel.chosen DOMMouseScroll.chosen",function(_this){return function(evt){_this.search_results_mousewheel(evt)}}(this)),this.search_results.on("touchstart.chosen",function(_this){return function(evt){_this.search_results_touchstart(evt)}}(this)),this.search_results.on("touchmove.chosen",function(_this){return function(evt){_this.search_results_touchmove(evt)}}(this)),this.search_results.on("touchend.chosen",function(_this){return function(evt){_this.search_results_touchend(evt)}}(this)),this.form_field_jq.on("chosen:updated.chosen",function(_this){return function(evt){_this.results_update_field(evt)}}(this)),this.form_field_jq.on("chosen:activate.chosen",function(_this){return function(evt){_this.activate_field(evt)}}(this)),this.form_field_jq.on("chosen:open.chosen",function(_this){return function(evt){_this.container_mousedown(evt)}}(this)),this.form_field_jq.on("chosen:close.chosen",function(_this){return function(evt){_this.close_field(evt)}}(this)),this.search_field.on("blur.chosen",function(_this){return function(evt){_this.input_blur(evt)}}(this)),this.search_field.on("keyup.chosen",function(_this){return function(evt){_this.keyup_checker(evt)}}(this)),this.search_field.on("keydown.chosen",function(_this){return function(evt){_this.keydown_checker(evt)}}(this)),this.search_field.on("focus.chosen",function(_this){return function(evt){_this.input_focus(evt)}}(this)),this.search_field.on("cut.chosen",function(_this){return function(evt){_this.clipboard_event_checker(evt)}}(this)),this.search_field.on("paste.chosen",function(_this){return function(evt){_this.clipboard_event_checker(evt)}}(this)),this.is_multiple?this.search_choices.on("click.chosen",function(_this){return function(evt){_this.choices_click(evt)}}(this)):this.container.on("click.chosen",(function(evt){evt.preventDefault()}))},Chosen.prototype.destroy=function(){return $(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.form_field_label.length>0&&this.form_field_label.off("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},Chosen.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.off("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.on("focus.chosen",this.activate_field)},Chosen.prototype.container_mousedown=function(evt){var ref;if(!this.is_disabled)return!evt||"mousedown"!==(ref=evt.type)&&"touchstart"!==ref||this.results_showing||evt.preventDefault(),null!=evt&&$(evt.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!evt||$(evt.target)[0]!==this.selected_item[0]&&!$(evt.target).parents("a.chosen-single").length||(evt.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),$(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},Chosen.prototype.container_mouseup=function(evt){if("ABBR"===evt.target.nodeName&&!this.is_disabled)return this.results_reset(evt)},Chosen.prototype.search_results_mousewheel=function(evt){var delta;if(evt.originalEvent&&(delta=evt.originalEvent.deltaY||-evt.originalEvent.wheelDelta||evt.originalEvent.detail),null!=delta)return evt.preventDefault(),"DOMMouseScroll"===evt.type&&(delta*=40),this.search_results.scrollTop(delta+this.search_results.scrollTop())},Chosen.prototype.blur_test=function(evt){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},Chosen.prototype.close_field=function(){return $(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},Chosen.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},Chosen.prototype.test_active_click=function(evt){var active_container;return(active_container=$(evt.target).closest(".chosen-container")).length&&this.container[0]===active_container[0]?this.active_field=!0:this.close_field()},Chosen.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},Chosen.prototype.result_do_highlight=function(el){var high_bottom,high_top,maxHeight,visible_bottom,visible_top;if(el.length){if(this.result_clear_highlight(),this.result_highlight=el,this.result_highlight.addClass("highlighted"),visible_bottom=(maxHeight=parseInt(this.search_results.css("maxHeight"),10))+(visible_top=this.search_results.scrollTop()),(high_bottom=(high_top=this.result_highlight.position().top+this.search_results.scrollTop())+this.result_highlight.outerHeight())>=visible_bottom)return this.search_results.scrollTop(high_bottom-maxHeight>0?high_bottom-maxHeight:0);if(high_top<visible_top)return this.search_results.scrollTop(high_top)}},Chosen.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},Chosen.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.get_search_field_value()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},Chosen.prototype.update_results_content=function(content){return this.search_results.html(content)},Chosen.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},Chosen.prototype.set_tab_index=function(el){var ti;if(this.form_field.tabIndex)return ti=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=ti},Chosen.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=$("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0)return this.form_field_label.on("click.chosen",this.label_click_handler)},Chosen.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},Chosen.prototype.search_results_mouseup=function(evt){var target;if((target=$(evt.target).hasClass("active-result")?$(evt.target):$(evt.target).parents(".active-result").first()).length)return this.result_highlight=target,this.result_select(evt),this.search_field.focus()},Chosen.prototype.search_results_mouseover=function(evt){var target;if(target=$(evt.target).hasClass("active-result")?$(evt.target):$(evt.target).parents(".active-result").first())return this.result_do_highlight(target)},Chosen.prototype.search_results_mouseout=function(evt){if($(evt.target).hasClass("active-result")||$(evt.target).parents(".active-result").first())return this.result_clear_highlight()},Chosen.prototype.choice_build=function(item){var choice,close_link,_this;return choice=$("<li />",{class:"search-choice"}).html("<span>"+this.choice_label(item)+"</span>"),item.disabled?choice.addClass("search-choice-disabled"):((close_link=$("<a />",{class:"search-choice-close","data-option-array-index":item.array_index})).on("click.chosen",(_this=this,function(evt){return _this.choice_destroy_link_click(evt)})),choice.append(close_link)),this.search_container.before(choice)},Chosen.prototype.choice_destroy_link_click=function(evt){if(evt.preventDefault(),evt.stopPropagation(),!this.is_disabled)return this.choice_destroy($(evt.target))},Chosen.prototype.choice_destroy=function(link){if(this.result_deselect(link[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),link.parents("li").first().remove(),this.search_field_scale()},Chosen.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},Chosen.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},Chosen.prototype.result_select=function(evt){var high,item;if(this.result_highlight)return high=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?high.removeClass("active-result"):this.reset_single_select_options(),high.addClass("result-selected"),(item=this.results_data[high[0].getAttribute("data-option-array-index")]).selected=!0,this.form_field.options[item.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(item):this.single_set_selected_text(this.choice_label(item)),this.is_multiple&&(!this.hide_results_on_select||evt.metaKey||evt.ctrlKey)?evt.metaKey||evt.ctrlKey?this.winnow_results({skip_highlight:!0}):(this.search_field.val(""),this.winnow_results()):(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[item.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,evt.preventDefault(),this.search_field_scale())},Chosen.prototype.single_set_selected_text=function(text){return null==text&&(text=this.default_text),text===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(text)},Chosen.prototype.result_deselect=function(pos){var result_data;return result_data=this.results_data[pos],!this.form_field.options[result_data.options_index].disabled&&(result_data.selected=!1,this.form_field.options[result_data.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[result_data.options_index].value}),this.search_field_scale(),!0)},Chosen.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},Chosen.prototype.get_search_field_value=function(){return this.search_field.val()},Chosen.prototype.get_search_text=function(){return $.trim(this.get_search_field_value())},Chosen.prototype.escape_html=function(text){return $("<div/>").text(text).html()},Chosen.prototype.winnow_results_set_highlight=function(){var do_high,selected_results;if(null!=(do_high=(selected_results=this.is_multiple?[]:this.search_results.find(".result-selected.active-result")).length?selected_results.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(do_high)},Chosen.prototype.no_results=function(terms){var no_results_html;return no_results_html=this.get_no_results_html(terms),this.search_results.append(no_results_html),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},Chosen.prototype.keydown_arrow=function(){var next_sib;return this.results_showing&&this.result_highlight?(next_sib=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(next_sib):void 0:this.results_show()},Chosen.prototype.keyup_arrow=function(){var prev_sibs;return this.results_showing||this.is_multiple?this.result_highlight?(prev_sibs=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(prev_sibs.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},Chosen.prototype.keydown_backstroke=function(){var next_available_destroy;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(next_available_destroy=this.search_container.siblings("li.search-choice").last()).length&&!next_available_destroy.hasClass("search-choice-disabled")?(this.pending_backstroke=next_available_destroy,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},Chosen.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},Chosen.prototype.search_field_scale=function(){var div,i,len,style,style_block,styles,width;if(this.is_multiple){for(style_block={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},i=0,len=(styles=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;i<len;i++)style_block[style=styles[i]]=this.search_field.css(style);return(div=$("<div />").css(style_block)).text(this.get_search_field_value()),$("body").append(div),width=div.width()+25,div.remove(),this.container.is(":visible")&&(width=Math.min(this.container.outerWidth()-10,width)),this.search_field.width(width)}},Chosen.prototype.trigger_form_field_change=function(extra){return this.form_field_jq.trigger("input",extra),this.form_field_jq.trigger("change",extra)},Chosen}(AbstractChosen)}.call(this),function($){"use strict";function Rule(controller,condition,value){this.init(controller,condition,value)}function Ruleset(){this.rules=[]}$.extend(Rule.prototype,{init:function(controller,condition,value){this.controller=controller,this.condition=condition,this.value=value,this.rules=[],this.controls=[]},evalCondition:function(context,control,condition,val1,val2){if("=="==condition)return this.checkBoolean(val1)==this.checkBoolean(val2);if("!="==condition)return this.checkBoolean(val1)!=this.checkBoolean(val2);if(">="==condition)return Number(val2)>=Number(val1);if("<="==condition)return Number(val2)<=Number(val1);if(">"==condition)return Number(val2)>Number(val1);if("<"==condition)return Number(val2)<Number(val1);if("()"==condition)return window[val1](context,control,val2);if("any"==condition){if($.isArray(val2)){for(var i=val2.length-1;i>=0;i--)if(-1!==$.inArray(val2[i],val1.split(",")))return!0}else if(-1!==$.inArray(val2,val1.split(",")))return!0}else if("not-any"==condition)if($.isArray(val2)){for(var i=val2.length-1;i>=0;i--)if(-1==$.inArray(val2[i],val1.split(",")))return!0}else if(-1==$.inArray(val2,val1.split(",")))return!0;return!1},checkBoolean:function(value){switch(value){case!0:case"true":case 1:case"1":value=!0;break;case null:case!1:case"false":case 0:case"0":value=!1}return value},checkCondition:function(context){if(!this.condition)return!0;var control=context.find(this.controller),control_value=this.getControlValue(context,control);return void 0!==control_value&&(control_value=this.normalizeValue(control,this.value,control_value),this.evalCondition(context,control,this.condition,this.value,control_value))},normalizeValue:function(control,baseValue,control_value){return"number"==typeof baseValue?parseFloat(control_value):control_value},getControlValue:function(context,control){return control.length>1&&("radio"==control.attr("type")||"checkbox"==control.attr("type"))?control.filter(":checked").map((function(){return this.value})).get():"checkbox"==control.attr("type")||"radio"==control.attr("type")?control.is(":checked"):control.val()},createRule:function(controller,condition,value){var rule=new Rule(controller,condition,value);return this.rules.push(rule),rule},include:function(input){this.controls.push(input)},applyRule:function(context,enforced){var result;result=void 0===enforced?this.checkCondition(context):enforced;var controls=$.map(this.controls,(function(elem,idx){return context.find(elem)}));result?($(controls).each((function(){$(this).removeClass("hidden")})),$(this.rules).each((function(){this.applyRule(context)}))):($(controls).each((function(){$(this).addClass("hidden")})),$(this.rules).each((function(){this.applyRule(context,!1)})))}}),$.extend(Ruleset.prototype,{createRule:function(controller,condition,value){var rule=new Rule(controller,condition,value);return this.rules.push(rule),rule},applyRules:function(context){$(this.rules).each((function(){this.applyRule(context)}))}}),$.spftestimonial_deps={createRuleset:function(){return new Ruleset},enable:function(selection,ruleset,depends){return selection.on("change keyup",(function(elem){var depend_id=elem.target.getAttribute("data-depend-id")||elem.target.getAttribute("data-sub-depend-id");-1!==depends.indexOf(depend_id)&&ruleset.applyRules(selection)})),ruleset.applyRules(selection),!0}}}(jQuery),function(root,factory){if("function"==typeof define&&define.amd)define(["exports","jquery"],(function(exports,$){return factory(exports,$)}));else if("undefined"!=typeof exports){var $=require("jquery");factory(exports,$)}else factory(root,root.jQuery||root.Zepto||root.ender||root.$)}(this,(function(exports,$){var patterns={validate:/^(?!_nonce)[a-zA-Z0-9_-]*(?:\[(?:\d*|(?!_nonce)[a-zA-Z0-9_-]+)\])*$/i,key:/[a-zA-Z0-9_-]+|(?=\[\])/g,named:/^[a-zA-Z0-9_-]+$/,push:/^$/,fixed:/^\d+$/};function FormSerializer(helper,$form){var data={},pushes={};function build(base,key,value){return base[key]=value,base}function makeObject(root,value){for(var keys=root.match(patterns.key),k;void 0!==(k=keys.pop());){var idx;if(patterns.push.test(k))value=build([],incrementPush(root.replace(/\[\]$/,"")),value);else patterns.fixed.test(k)?value=build([],k,value):patterns.named.test(k)&&(value=build({},k,value))}return value}function incrementPush(key){return void 0===pushes[key]&&(pushes[key]=0),pushes[key]++}function addPair(pair){if(!patterns.validate.test(pair.name))return this;var obj=makeObject(pair.name,pair.value);return data=helper.extend(!0,data,obj),this}function addPairs(pairs){if(!helper.isArray(pairs))throw new Error("formSerializer.addPairs expects an Array");for(var i=0,len=pairs.length;i<len;i++)this.addPair(pairs[i]);return this}function serialize(){return data}function serializeJSON(){return JSON.stringify(serialize())}this.addPair=addPair,this.addPairs=addPairs,this.serialize=serialize,this.serializeJSON=serializeJSON}return FormSerializer.patterns=patterns,FormSerializer.serializeObject=function serializeObject(){return new FormSerializer($,this).addPairs(this.serializeArray()).serialize()},FormSerializer.serializeJSON=function serializeJSON(){return new FormSerializer($,this).addPairs(this.serializeArray()).serializeJSON()},void 0!==$.fn&&($.fn.serializeObjectSPFTESTIMONIAL=FormSerializer.serializeObject,$.fn.serializeJSONSPFTESTIMONIAL=FormSerializer.serializeJSON),exports.FormSerializer=FormSerializer,FormSerializer}));
admin/views/tp-metabox/assets/js/spftestimonial.js ADDED
@@ -0,0 +1,2078 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ *
3
+ * -----------------------------------------------------------
4
+ *
5
+ * Codestar Framework
6
+ * A Simple and Lightweight WordPress Option Framework
7
+ *
8
+ * -----------------------------------------------------------
9
+ *
10
+ */
11
+ ;(function( $, window, document, undefined ) {
12
+ 'use strict';
13
+
14
+ //
15
+ // Constants
16
+ //
17
+ var SPFTESTIMONIAL = SPFTESTIMONIAL || {};
18
+
19
+ SPFTESTIMONIAL.funcs = {};
20
+
21
+ SPFTESTIMONIAL.vars = {
22
+ onloaded: false,
23
+ $body: $('body'),
24
+ $window: $(window),
25
+ $document: $(document),
26
+ is_rtl: $('body').hasClass('rtl'),
27
+ code_themes: [],
28
+ };
29
+
30
+ //
31
+ // Helper Functions
32
+ //
33
+ SPFTESTIMONIAL.helper = {
34
+
35
+ //
36
+ // Generate UID
37
+ //
38
+ uid: function( prefix ) {
39
+ return ( prefix || '' ) + Math.random().toString(36).substr(2, 9);
40
+ },
41
+
42
+ // Quote regular expression characters
43
+ //
44
+ preg_quote: function( str ) {
45
+ return (str+'').replace(/(\[|\-|\])/g, "\\$1");
46
+ },
47
+
48
+ //
49
+ // Reneme input names
50
+ //
51
+ name_nested_replace: function( $selector, field_id ) {
52
+
53
+ var checks = [];
54
+ var regex = new RegExp('('+ SPFTESTIMONIAL.helper.preg_quote(field_id) +')\\[(\\d+)\\]', 'g');
55
+
56
+ $selector.find(':radio').each(function() {
57
+ if( this.checked || this.orginal_checked ) {
58
+ this.orginal_checked = true;
59
+ }
60
+ });
61
+
62
+ $selector.each( function( index ) {
63
+ $(this).find(':input').each(function() {
64
+ this.name = this.name.replace(regex, field_id +'['+ index +']');
65
+ if( this.orginal_checked ) {
66
+ this.checked = true;
67
+ }
68
+ });
69
+ });
70
+
71
+ },
72
+
73
+ //
74
+ // Debounce
75
+ //
76
+ debounce: function( callback, threshold, immediate ) {
77
+ var timeout;
78
+ return function() {
79
+ var context = this, args = arguments;
80
+ var later = function() {
81
+ timeout = null;
82
+ if( !immediate ) {
83
+ callback.apply(context, args);
84
+ }
85
+ };
86
+ var callNow = ( immediate && !timeout );
87
+ clearTimeout( timeout );
88
+ timeout = setTimeout( later, threshold );
89
+ if( callNow ) {
90
+ callback.apply(context, args);
91
+ }
92
+ };
93
+ },
94
+
95
+ //
96
+ // Get a cookie
97
+ //
98
+ get_cookie: function( name ) {
99
+
100
+ var e, b, cookie = document.cookie, p = name + '=';
101
+
102
+ if( ! cookie ) {
103
+ return;
104
+ }
105
+
106
+ b = cookie.indexOf( '; ' + p );
107
+
108
+ if( b === -1 ) {
109
+ b = cookie.indexOf(p);
110
+
111
+ if( b !== 0 ) {
112
+ return null;
113
+ }
114
+ } else {
115
+ b += 2;
116
+ }
117
+
118
+ e = cookie.indexOf( ';', b );
119
+
120
+ if( e === -1 ) {
121
+ e = cookie.length;
122
+ }
123
+
124
+ return decodeURIComponent( cookie.substring( b + p.length, e ) );
125
+
126
+ },
127
+
128
+ //
129
+ // Set a cookie
130
+ //
131
+ set_cookie: function( name, value, expires, path, domain, secure ) {
132
+
133
+ var d = new Date();
134
+
135
+ if( typeof( expires ) === 'object' && expires.toGMTString ) {
136
+ expires = expires.toGMTString();
137
+ } else if( parseInt( expires, 10 ) ) {
138
+ d.setTime( d.getTime() + ( parseInt( expires, 10 ) * 1000 ) );
139
+ expires = d.toGMTString();
140
+ } else {
141
+ expires = '';
142
+ }
143
+
144
+ document.cookie = name + '=' + encodeURIComponent( value ) +
145
+ ( expires ? '; expires=' + expires : '' ) +
146
+ ( path ? '; path=' + path : '' ) +
147
+ ( domain ? '; domain=' + domain : '' ) +
148
+ ( secure ? '; secure' : '' );
149
+
150
+ },
151
+
152
+ //
153
+ // Remove a cookie
154
+ //
155
+ remove_cookie: function( name, path, domain, secure ) {
156
+ SPFTESTIMONIAL.helper.set_cookie( name, '', -1000, path, domain, secure );
157
+ },
158
+
159
+ };
160
+
161
+ //
162
+ // Custom clone for textarea and select clone() bug
163
+ //
164
+ $.fn.spftestimonial_clone = function() {
165
+
166
+ var base = $.fn.clone.apply(this, arguments),
167
+ clone = this.find('select').add(this.filter('select')),
168
+ cloned = base.find('select').add(base.filter('select'));
169
+
170
+ for( var i = 0; i < clone.length; ++i ) {
171
+ for( var j = 0; j < clone[i].options.length; ++j ) {
172
+
173
+ if( clone[i].options[j].selected === true ) {
174
+ cloned[i].options[j].selected = true;
175
+ }
176
+
177
+ }
178
+ }
179
+
180
+ this.find(':radio').each( function() {
181
+ this.orginal_checked = this.checked;
182
+ });
183
+
184
+ return base;
185
+
186
+ };
187
+
188
+ //
189
+ // Expand All Options
190
+ //
191
+ $.fn.spftestimonial_expand_all = function() {
192
+ return this.each( function() {
193
+ $(this).on('click', function( e ) {
194
+
195
+ e.preventDefault();
196
+ $('.spftestimonial-wrapper').toggleClass('spftestimonial-show-all');
197
+ $('.spftestimonial-section').spftestimonial_reload_script();
198
+ $(this).find('.fa').toggleClass('fa-indent').toggleClass('fa-outdent');
199
+
200
+ });
201
+ });
202
+ };
203
+
204
+ //
205
+ // Options Navigation
206
+ //
207
+ $.fn.spftestimonial_nav_options = function() {
208
+ return this.each( function() {
209
+
210
+ var $nav = $(this),
211
+ $links = $nav.find('a'),
212
+ $hidden = $nav.closest('.spftestimonial').find('.spftestimonial-section-id'),
213
+ $last_section;
214
+
215
+ $(window).on('hashchange', function() {
216
+
217
+ var hash = window.location.hash.match(new RegExp('tab=([^&]*)'));
218
+ var slug = hash ? hash[1] : $links.first().attr('href').replace('#tab=', '');
219
+ var $link = $('#spftestimonial-tab-link-'+ slug);
220
+
221
+ if( $link.length > 0 ) {
222
+
223
+ $link.closest('.spftestimonial-tab-depth-0').addClass('spftestimonial-tab-active').siblings().removeClass('spftestimonial-tab-active');
224
+ $links.removeClass('spftestimonial-section-active');
225
+ $link.addClass('spftestimonial-section-active');
226
+
227
+ if( $last_section !== undefined ) {
228
+ $last_section.hide();
229
+ }
230
+
231
+ var $section = $('#spftestimonial-section-'+slug);
232
+ $section.css({display: 'block'});
233
+ $section.spftestimonial_reload_script();
234
+
235
+ $hidden.val(slug);
236
+
237
+ $last_section = $section;
238
+
239
+ }
240
+
241
+ }).trigger('hashchange');
242
+
243
+ });
244
+ };
245
+
246
+ //
247
+ // Metabox Tabs
248
+ //
249
+ $.fn.spftestimonial_nav_metabox = function() {
250
+ return this.each( function() {
251
+
252
+ var $nav = $(this),
253
+ $links = $nav.find('a'),
254
+ unique_id = $nav.data('unique'),
255
+ post_id = $('#post_ID').val() || 'global',
256
+ $last_section,
257
+ $last_link;
258
+
259
+ $links.on('click', function( e ) {
260
+
261
+ e.preventDefault();
262
+
263
+ var $link = $(this),
264
+ section_id = $link.data('section');
265
+
266
+ if( $last_link !== undefined ) {
267
+ $last_link.removeClass('spftestimonial-section-active');
268
+ }
269
+
270
+ if( $last_section !== undefined ) {
271
+ $last_section.hide();
272
+ }
273
+
274
+ $link.addClass('spftestimonial-section-active');
275
+
276
+ var $section = $('#spftestimonial-section-'+section_id);
277
+ $section.css({display: 'block'});
278
+ $section.spftestimonial_reload_script();
279
+
280
+ SPFTESTIMONIAL.helper.set_cookie('spftestimonial-last-metabox-tab-'+ post_id +'-'+ unique_id, section_id);
281
+
282
+ $last_section = $section;
283
+ $last_link = $link;
284
+
285
+ });
286
+
287
+ var get_cookie = SPFTESTIMONIAL.helper.get_cookie('spftestimonial-last-metabox-tab-'+ post_id +'-'+ unique_id);
288
+
289
+ if( get_cookie ) {
290
+ $nav.find('a[data-section="'+ get_cookie +'"]').trigger('click');
291
+ } else {
292
+ $links.first('a').trigger('click');
293
+ }
294
+
295
+ });
296
+ };
297
+
298
+ //
299
+ // Metabox Page Templates Listener
300
+ //
301
+ $.fn.spftestimonial_page_templates = function() {
302
+ if( this.length ) {
303
+
304
+ $(document).on('change', '.editor-page-attributes__template select, #page_template', function() {
305
+
306
+ var maybe_value = $(this).val() || 'default';
307
+
308
+ $('.spftestimonial-page-templates').removeClass('spftestimonial-show').addClass('spftestimonial-hide');
309
+ $('.spftestimonial-page-'+maybe_value.toLowerCase().replace(/[^a-zA-Z0-9]+/g,'-')).removeClass('spftestimonial-hide').addClass('spftestimonial-show');
310
+
311
+ });
312
+
313
+ }
314
+ };
315
+
316
+ //
317
+ // Metabox Post Formats Listener
318
+ //
319
+ $.fn.spftestimonial_post_formats = function() {
320
+ if( this.length ) {
321
+
322
+ $(document).on('change', '.editor-post-format select, #formatdiv input[name="post_format"]', function() {
323
+
324
+ var maybe_value = $(this).val() || 'default';
325
+
326
+ // Fallback for classic editor version
327
+ maybe_value = ( maybe_value === '0' ) ? 'default' : maybe_value;
328
+
329
+ $('.spftestimonial-post-formats').removeClass('spftestimonial-show').addClass('spftestimonial-hide');
330
+ $('.spftestimonial-post-format-'+maybe_value).removeClass('spftestimonial-hide').addClass('spftestimonial-show');
331
+
332
+ });
333
+
334
+ }
335
+ };
336
+
337
+ //
338
+ // Search
339
+ //
340
+ $.fn.spftestimonial_search = function() {
341
+ return this.each( function() {
342
+
343
+ var $this = $(this),
344
+ $input = $this.find('input');
345
+
346
+ $input.on('change keyup', function() {
347
+
348
+ var value = $(this).val(),
349
+ $wrapper = $('.spftestimonial-wrapper'),
350
+ $section = $wrapper.find('.spftestimonial-section'),
351
+ $fields = $section.find('> .spftestimonial-field:not(.hidden)'),
352
+ $titles = $fields.find('> .spftestimonial-title, .spftestimonial-search-tags');
353
+
354
+ if( value.length > 3 ) {
355
+
356
+ $fields.addClass('spftestimonial-hidden');
357
+ $wrapper.addClass('spftestimonial-search-all');
358
+
359
+ $titles.each( function() {
360
+
361
+ var $title = $(this);
362
+
363
+ if( $title.text().match( new RegExp('.*?' + value + '.*?', 'i') ) ) {
364
+
365
+ var $field = $title.closest('.spftestimonial-field');
366
+
367
+ $field.removeClass('spftestimonial-hidden');
368
+ $field.parent().spftestimonial_reload_script();
369
+
370
+ }
371
+
372
+ });
373
+
374
+ } else {
375
+
376
+ $fields.removeClass('spftestimonial-hidden');
377
+ $wrapper.removeClass('spftestimonial-search-all');
378
+
379
+ }
380
+
381
+ });
382
+
383
+ });
384
+ };
385
+
386
+ //
387
+ // Sticky Header
388
+ //
389
+ $.fn.spftestimonial_sticky = function() {
390
+ return this.each( function() {
391
+
392
+ var $this = $(this),
393
+ $window = $(window),
394
+ $inner = $this.find('.spftestimonial-header-inner'),
395
+ padding = parseInt( $inner.css('padding-left') ) + parseInt( $inner.css('padding-right') ),
396
+ offset = 32,
397
+ scrollTop = 0,
398
+ lastTop = 0,
399
+ ticking = false,
400
+ stickyUpdate = function() {
401
+
402
+ var offsetTop = $this.offset().top,
403
+ stickyTop = Math.max(offset, offsetTop - scrollTop ),
404
+ winWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
405
+
406
+ if( stickyTop <= offset && winWidth > 782 ) {
407
+ $inner.css({width: $this.outerWidth()-padding});
408
+ $this.css({height: $this.outerHeight()}).addClass( 'spftestimonial-sticky' );
409
+ } else {
410
+ $inner.removeAttr('style');
411
+ $this.removeAttr('style').removeClass( 'spftestimonial-sticky' );
412
+ }
413
+
414
+ },
415
+ requestTick = function() {
416
+
417
+ if( !ticking ) {
418
+ requestAnimationFrame( function() {
419
+ stickyUpdate();
420
+ ticking = false;
421
+ });
422
+ }
423
+
424
+ ticking = true;
425
+
426
+ },
427
+ onSticky = function() {
428
+
429
+ scrollTop = $window.scrollTop();
430
+ requestTick();
431
+
432
+ };
433
+
434
+ $window.on( 'scroll resize', onSticky);
435
+
436
+ onSticky();
437
+
438
+ });
439
+ };
440
+
441
+ //
442
+ // Dependency System
443
+ //
444
+ $.fn.spftestimonial_dependency = function() {
445
+ return this.each( function() {
446
+
447
+ var $this = $(this),
448
+ ruleset = $.spftestimonial_deps.createRuleset(),
449
+ depends = [],
450
+ is_global = false;
451
+
452
+ $this.children('[data-controller]').each( function() {
453
+
454
+ var $field = $(this),
455
+ controllers = $field.data('controller').split('|'),
456
+ conditions = $field.data('condition').split('|'),
457
+ values = $field.data('value').toString().split('|'),
458
+ rules = ruleset;
459
+
460
+ if( $field.data('depend-global') ) {
461
+ is_global = true;
462
+ }
463
+
464
+ $.each(controllers, function( index, depend_id ) {
465
+
466
+ var value = values[index] || '',
467
+ condition = conditions[index] || conditions[0];
468
+
469
+ rules = rules.createRule('[data-depend-id="'+ depend_id +'"]', condition, value);
470
+
471
+ rules.include($field);
472
+
473
+ depends.push(depend_id);
474
+
475
+ });
476
+
477
+ });
478
+
479
+ if( depends.length ) {
480
+
481
+ if( is_global ) {
482
+ $.spftestimonial_deps.enable(SPFTESTIMONIAL.vars.$body, ruleset, depends);
483
+ } else {
484
+ $.spftestimonial_deps.enable($this, ruleset, depends);
485
+ }
486
+
487
+ }
488
+
489
+ });
490
+ };
491
+
492
+ //
493
+ // Field: code_editor
494
+ //
495
+ $.fn.spftestimonial_field_code_editor = function() {
496
+ return this.each( function() {
497
+
498
+ if( typeof CodeMirror !== 'function' ) { return; }
499
+
500
+ var $this = $(this),
501
+ $textarea = $this.find('textarea'),
502
+ $inited = $this.find('.CodeMirror'),
503
+ data_editor = $textarea.data('editor');
504
+
505
+ if( $inited.length ) {
506
+ $inited.remove();
507
+ }
508
+
509
+ var interval = setInterval(function () {
510
+ if( $this.is(':visible') ) {
511
+
512
+ var code_editor = CodeMirror.fromTextArea( $textarea[0], data_editor );
513
+
514
+ // load code-mirror theme css.
515
+ if( data_editor.theme !== 'default' && SPFTESTIMONIAL.vars.code_themes.indexOf(data_editor.theme) === -1 ) {
516
+
517
+ var $cssLink = $('<link>');
518
+
519
+ $('#spftestimonial-codemirror-css').after( $cssLink );
520
+
521
+ $cssLink.attr({
522
+ rel: 'stylesheet',
523
+ id: 'spftestimonial-codemirror-'+ data_editor.theme +'-css',
524
+ href: data_editor.cdnURL +'/theme/'+ data_editor.theme +'.min.css',
525
+ type: 'text/css',
526
+ media: 'all'
527
+ });
528
+
529
+ SPFTESTIMONIAL.vars.code_themes.push(data_editor.theme);
530
+
531
+ }
532
+
533
+ CodeMirror.modeURL = data_editor.cdnURL +'/mode/%N/%N.min.js';
534
+ CodeMirror.autoLoadMode(code_editor, data_editor.mode);
535
+
536
+ code_editor.on( 'change', function( editor, event ) {
537
+ $textarea.val( code_editor.getValue() ).trigger('change');
538
+ });
539
+
540
+ clearInterval(interval);
541
+
542
+ }
543
+ });
544
+
545
+ });
546
+ };
547
+
548
+ //
549
+ // Field: spinner
550
+ //
551
+ $.fn.spftestimonial_field_spinner = function() {
552
+ return this.each( function() {
553
+
554
+ var $this = $(this),
555
+ $input = $this.find('input'),
556
+ $inited = $this.find('.ui-spinner-button');
557
+
558
+ if( $inited.length ) {
559
+ $inited.remove();
560
+ }
561
+
562
+ $input.spinner({
563
+ max: $input.data('max') || 100,
564
+ min: $input.data('min') || 0,
565
+ step: $input.data('step') || 1,
566
+ spin: function (event, ui ) {
567
+ $input.val(ui.value).trigger('change');
568
+ }
569
+ });
570
+
571
+
572
+ });
573
+ };
574
+
575
+ //
576
+ // Field: switcher
577
+ //
578
+ $.fn.spftestimonial_field_switcher = function() {
579
+ return this.each( function() {
580
+
581
+ var $switcher = $(this).find('.spftestimonial--switcher');
582
+
583
+ $switcher.on('click', function() {
584
+
585
+ var value = 0;
586
+ var $input = $switcher.find('input');
587
+
588
+ if( $switcher.hasClass('spftestimonial--active') ) {
589
+ $switcher.removeClass('spftestimonial--active');
590
+ } else {
591
+ value = 1;
592
+ $switcher.addClass('spftestimonial--active');
593
+ }
594
+
595
+ $input.val(value).trigger('change');
596
+
597
+ });
598
+
599
+ });
600
+ };
601
+
602
+ //
603
+ // Field: typography
604
+ //
605
+ $.fn.spftestimonial_field_typography = function() {
606
+ return this.each(function () {
607
+
608
+ var base = this;
609
+ var $this = $(this);
610
+ var loaded_fonts = [];
611
+ var webfonts = spftestimonial_typography_json.webfonts;
612
+ var googlestyles = spftestimonial_typography_json.googlestyles;
613
+ var defaultstyles = spftestimonial_typography_json.defaultstyles;
614
+
615
+ //
616
+ //
617
+ // Sanitize google font subset
618
+ base.sanitize_subset = function( subset ) {
619
+ subset = subset.replace('-ext', ' Extended');
620
+ subset = subset.charAt(0).toUpperCase() + subset.slice(1);
621
+ return subset;
622
+ };
623
+
624
+ //
625
+ //
626
+ // Sanitize google font styles (weight and style)
627
+ base.sanitize_style = function( style ) {
628
+ return googlestyles[style] ? googlestyles[style] : style;
629
+ };
630
+
631
+ //
632
+ //
633
+ // Load google font
634
+ base.load_google_font = function( font_family, weight, style ) {
635
+
636
+ if( font_family && typeof WebFont === 'object' ) {
637
+
638
+ weight = weight ? weight.replace('normal', '') : '';
639
+ style = style ? style.replace('normal', '') : '';
640
+
641
+ if( weight || style ) {
642
+ font_family = font_family +':'+ weight + style;
643
+ }
644
+
645
+ if( loaded_fonts.indexOf( font_family ) === -1 ) {
646
+ WebFont.load({ google: { families: [font_family] } });
647
+ }
648
+
649
+ loaded_fonts.push( font_family );
650
+
651
+ }
652
+
653
+ };
654
+
655
+ //
656
+ //
657
+ // Append select options
658
+ base.append_select_options = function( $select, options, condition, type, is_multi ) {
659
+
660
+ $select.find('option').not(':first').remove();
661
+
662
+ var opts = '';
663
+
664
+ $.each( options, function( key, value ) {
665
+
666
+ var selected;
667
+ var name = value;
668
+
669
+ // is_multi
670
+ if( is_multi ) {
671
+ selected = ( condition && condition.indexOf(value) !== -1 ) ? ' selected' : '';
672
+ } else {
673
+ selected = ( condition && condition === value ) ? ' selected' : '';
674
+ }
675
+
676
+ if( type === 'subset' ) {
677
+ name = base.sanitize_subset( value );
678
+ } else if( type === 'style' ){
679
+ name = base.sanitize_style( value );
680
+ }
681
+
682
+ opts += '<option value="'+ value +'"'+ selected +'>'+ name +'</option>';
683
+
684
+ });
685
+
686
+ $select.append(opts).trigger('spftestimonial.change').trigger('chosen:updated');
687
+
688
+ };
689
+
690
+ base.init = function () {
691
+
692
+ //
693
+ //
694
+ // Constants
695
+ var selected_styles = [];
696
+ var $typography = $this.find('.spftestimonial--typography');
697
+ var $type = $this.find('.spftestimonial--type');
698
+ var unit = $typography.data('unit');
699
+ var exclude_fonts = $typography.data('exclude') ? $typography.data('exclude').split(',') : [];
700
+
701
+ //
702
+ //
703
+ // Chosen init
704
+ if( $this.find('.spftestimonial--chosen').length ) {
705
+
706
+ var $chosen_selects = $this.find('select');
707
+
708
+ $chosen_selects.each( function(){
709
+
710
+ var $chosen_select = $(this),
711
+ $chosen_inited = $chosen_select.parent().find('.chosen-container');
712
+
713
+ if( $chosen_inited.length ) {
714
+ $chosen_inited.remove();
715
+ }
716
+
717
+ $chosen_select.chosen({
718
+ allow_single_deselect: true,
719
+ disable_search_threshold: 15,
720
+ width: '100%'
721
+ });
722
+
723
+ });
724
+
725
+ }
726
+
727
+ //
728
+ //
729
+ // Font family select
730
+ var $font_family_select = $this.find('.spftestimonial--font-family');
731
+ var first_font_family = $font_family_select.val();
732
+
733
+ // Clear default font family select options
734
+ $font_family_select.find('option').not(':first-child').remove();
735
+
736
+ var opts = '';
737
+
738
+ $.each(webfonts, function( type, group ) {
739
+
740
+ // Check for exclude fonts
741
+ if( exclude_fonts && exclude_fonts.indexOf(type) !== -1 ) { return; }
742
+
743
+ opts += '<optgroup label="' + group.label + '">';
744
+
745
+ $.each(group.fonts, function( key, value ) {
746
+
747
+ // use key if value is object
748
+ value = ( typeof value === 'object' ) ? key : value;
749
+ var selected = ( value === first_font_family ) ? ' selected' : '';
750
+ opts += '<option value="'+ value +'" data-type="'+ type +'"'+ selected +'>'+ value +'</option>';
751
+
752
+ });
753
+
754
+ opts += '</optgroup>';
755
+
756
+ });
757
+
758
+ // Append google font select options
759
+ $font_family_select.append(opts).trigger('chosen:updated');
760
+
761
+ //
762
+ //
763
+ // Font style select
764
+ var $font_style_block = $this.find('.spftestimonial--block-font-style');
765
+
766
+ if( $font_style_block.length ) {
767
+
768
+ var $font_style_select = $this.find('.spftestimonial--font-style-select');
769
+ var first_style_value = $font_style_select.val() ? $font_style_select.val().replace(/normal/g, '' ) : '';
770
+
771
+ //
772
+ // Font Style on on change listener
773
+ $font_style_select.on('change spftestimonial.change', function( event ) {
774
+
775
+ var style_value = $font_style_select.val();
776
+
777
+ // set a default value
778
+ if( !style_value && selected_styles && selected_styles.indexOf('normal') === -1 ) {
779
+ style_value = selected_styles[0];
780
+ }
781
+
782
+ // set font weight, for eg. replacing 800italic to 800
783
+ var font_normal = ( style_value && style_value !== 'italic' && style_value === 'normal' ) ? 'normal' : '';
784
+ var font_weight = ( style_value && style_value !== 'italic' && style_value !== 'normal' ) ? style_value.replace('italic', '') : font_normal;
785
+ var font_style = ( style_value && style_value.substr(-6) === 'italic' ) ? 'italic' : '';
786
+
787
+ $this.find('.spftestimonial--font-weight').val( font_weight );
788
+ $this.find('.spftestimonial--font-style').val( font_style );
789
+
790
+ });
791
+
792
+ //
793
+ //
794
+ // Extra font style select
795
+ var $extra_font_style_block = $this.find('.spftestimonial--block-extra-styles');
796
+
797
+ if( $extra_font_style_block.length ) {
798
+ var $extra_font_style_select = $this.find('.spftestimonial--extra-styles');
799
+ var first_extra_style_value = $extra_font_style_select.val();
800
+ }
801
+
802
+ }
803
+
804
+ //
805
+ //
806
+ // Subsets select
807
+ var $subset_block = $this.find('.spftestimonial--block-subset');
808
+ if( $subset_block.length ) {
809
+ var $subset_select = $this.find('.spftestimonial--subset');
810
+ var first_subset_select_value = $subset_select.val();
811
+ var subset_multi_select = $subset_select.data('multiple') || false;
812
+ }
813
+
814
+ //
815
+ //
816
+ // Backup font family
817
+ var $backup_font_family_block = $this.find('.spftestimonial--block-backup-font-family');
818
+
819
+ //
820
+ //
821
+ // Font Family on Change Listener
822
+ $font_family_select.on('change spftestimonial.change', function( event ) {
823
+
824
+ // Hide subsets on change
825
+ if( $subset_block.length ) {
826
+ $subset_block.addClass('hidden');
827
+ }
828
+
829
+ // Hide extra font style on change
830
+ if( $extra_font_style_block.length ) {
831
+ $extra_font_style_block.addClass('hidden');
832
+ }
833
+
834
+ // Hide backup font family on change
835
+ if( $backup_font_family_block.length ) {
836
+ $backup_font_family_block.addClass('hidden');
837
+ }
838
+
839
+ var $selected = $font_family_select.find(':selected');
840
+ var value = $selected.val();
841
+ var type = $selected.data('type');
842
+
843
+ if( type && value ) {
844
+
845
+ // Show backup fonts if font type google or custom
846
+ if( ( type === 'google' || type === 'custom' ) && $backup_font_family_block.length ) {
847
+ $backup_font_family_block.removeClass('hidden');
848
+ }
849
+
850
+ // Appending font style select options
851
+ if( $font_style_block.length ) {
852
+
853
+ // set styles for multi and normal style selectors
854
+ var styles = defaultstyles;
855
+
856
+ // Custom or gogle font styles
857
+ if( type === 'google' && webfonts[type].fonts[value][0] ) {
858
+ styles = webfonts[type].fonts[value][0];
859
+ } else if( type === 'custom' && webfonts[type].fonts[value] ) {
860
+ styles = webfonts[type].fonts[value];
861
+ }
862
+
863
+ selected_styles = styles;
864
+
865
+ // Set selected style value for avoid load errors
866
+ var set_auto_style = ( styles.indexOf('normal') !== -1 ) ? 'normal' : styles[0];
867
+ var set_style_value = ( first_style_value && styles.indexOf(first_style_value) !== -1 ) ? first_style_value : set_auto_style;
868
+
869
+ // Append style select options
870
+ base.append_select_options( $font_style_select, styles, set_style_value, 'style' );
871
+
872
+ // Clear first value
873
+ first_style_value = false;
874
+
875
+ // Show style select after appended
876
+ $font_style_block.removeClass('hidden');
877
+
878
+ // Appending extra font style select options
879
+ if( type === 'google' && $extra_font_style_block.length && styles.length > 1 ) {
880
+
881
+ // Append extra-style select options
882
+ base.append_select_options( $extra_font_style_select, styles, first_extra_style_value, 'style', true );
883
+
884
+ // Clear first value
885
+ first_extra_style_value = false;
886
+
887
+ // Show style select after appended
888
+ $extra_font_style_block.removeClass('hidden');
889
+
890
+ }
891
+
892
+ }
893
+
894
+ // Appending google fonts subsets select options
895
+ if( type === 'google' && $subset_block.length && webfonts[type].fonts[value][1] ) {
896
+
897
+ var subsets = webfonts[type].fonts[value][1];
898
+ var set_auto_subset = ( subsets.length < 2 && subsets[0] !== 'latin' ) ? subsets[0] : '';
899
+ var set_subset_value = ( first_subset_select_value && subsets.indexOf(first_subset_select_value) !== -1 ) ? first_subset_select_value : set_auto_subset;
900
+
901
+ // check for multiple subset select
902
+ set_subset_value = ( subset_multi_select && first_subset_select_value ) ? first_subset_select_value : set_subset_value;
903
+
904
+ base.append_select_options( $subset_select, subsets, set_subset_value, 'subset', subset_multi_select );
905
+
906
+ first_subset_select_value = false;
907
+
908
+ $subset_block.removeClass('hidden');
909
+
910
+ }
911
+
912
+ } else {
913
+
914
+ // Clear subsets options if type and value empty
915
+ if( $subset_block.length ) {
916
+ $subset_select.find('option').not(':first-child').remove();
917
+ $subset_select.trigger('chosen:updated');
918
+ }
919
+
920
+ // Clear font styles options if type and value empty
921
+ if( $font_style_block.length ) {
922
+ $font_style_select.find('option').not(':first-child').remove();
923
+ $font_style_select.trigger('chosen:updated');
924
+ }
925
+
926
+ }
927
+
928
+ // Update font type input value
929
+ $type.val(type);
930
+
931
+ }).trigger('spftestimonial.change');
932
+
933
+ //
934
+ //
935
+ // Preview
936
+ var $preview_block = $this.find('.spftestimonial--block-preview');
937
+
938
+ if( $preview_block.length ) {
939
+
940
+ var $preview = $this.find('.spftestimonial--preview');
941
+
942
+ // Set preview styles on change
943
+ $this.on('change', SPFTESTIMONIAL.helper.debounce( function( event ) {
944
+
945
+ $preview_block.removeClass('hidden');
946
+
947
+ var font_family = $font_family_select.val(),
948
+ font_weight = $this.find('.spftestimonial--font-weight').val(),
949
+ font_style = $this.find('.spftestimonial--font-style').val(),
950
+ font_size = $this.find('.spftestimonial--font-size').val(),
951
+ font_variant = $this.find('.spftestimonial--font-variant').val(),
952
+ line_height = $this.find('.spftestimonial--line-height').val(),
953
+ text_align = $this.find('.spftestimonial--text-align').val(),
954
+ text_transform = $this.find('.spftestimonial--text-transform').val(),
955
+ text_decoration = $this.find('.spftestimonial--text-decoration').val(),
956
+ text_color = $this.find('.spftestimonial--color').val(),
957
+ word_spacing = $this.find('.spftestimonial--word-spacing').val(),
958
+ letter_spacing = $this.find('.spftestimonial--letter-spacing').val(),
959
+ custom_style = $this.find('.spftestimonial--custom-style').val(),
960
+ type = $this.find('.spftestimonial--type').val();
961
+
962
+ if( type === 'google' ) {
963
+ base.load_google_font(font_family, font_weight, font_style);
964
+ }
965
+
966
+ var properties = {};
967
+
968
+ if( font_family ) { properties.fontFamily = font_family; }
969
+ if( font_weight ) { properties.fontWeight = font_weight; }
970
+ if( font_style ) { properties.fontStyle = font_style; }
971
+ if( font_variant ) { properties.fontVariant = font_variant; }
972
+ if( font_size ) { properties.fontSize = font_size + unit; }
973
+ if( line_height ) { properties.lineHeight = line_height + unit; }
974
+ if( letter_spacing ) { properties.letterSpacing = letter_spacing + unit; }
975
+ if( word_spacing ) { properties.wordSpacing = word_spacing + unit; }
976
+ if( text_align ) { properties.textAlign = text_align; }
977
+ if( text_transform ) { properties.textTransform = text_transform; }
978
+ if( text_decoration ) { properties.textDecoration = text_decoration; }
979
+ if( text_color ) { properties.color = text_color; }
980
+
981
+ $preview.removeAttr('style');
982
+
983
+ // Customs style attribute
984
+ if( custom_style ) { $preview.attr('style', custom_style); }
985
+
986
+ $preview.css(properties);
987
+
988
+ }, 100 ) );
989
+
990
+ // Preview black and white backgrounds trigger
991
+ $preview_block.on('click', function() {
992
+
993
+ $preview.toggleClass('spftestimonial--black-background');
994
+
995
+ var $toggle = $preview_block.find('.spftestimonial--toggle');
996
+
997
+ if( $toggle.hasClass('fa-toggle-off') ) {
998
+ $toggle.removeClass('fa-toggle-off').addClass('fa-toggle-on');
999
+ } else {
1000
+ $toggle.removeClass('fa-toggle-on').addClass('fa-toggle-off');
1001
+ }
1002
+
1003
+ });
1004
+
1005
+ if( !$preview_block.hasClass('hidden') ) {
1006
+ $this.trigger('change');
1007
+ }
1008
+
1009
+ }
1010
+
1011
+ };
1012
+
1013
+ base.init();
1014
+
1015
+ });
1016
+ };
1017
+
1018
+ //
1019
+ // Confirm
1020
+ //
1021
+ $.fn.spftestimonial_confirm = function() {
1022
+ return this.each( function() {
1023
+ $(this).on('click', function( e ) {
1024
+
1025
+ var confirm_text = $(this).data('confirm') || window.spftestimonial_vars.i18n.confirm;
1026
+ var confirm_answer = confirm( confirm_text );
1027
+ SPFTESTIMONIAL.vars.is_confirm = true;
1028
+
1029
+ if( !confirm_answer ) {
1030
+ e.preventDefault();
1031
+ SPFTESTIMONIAL.vars.is_confirm = false;
1032
+ return false;
1033
+ }
1034
+
1035
+ });
1036
+ });
1037
+ };
1038
+
1039
+ $.fn.serializeObject = function(){
1040
+
1041
+ var obj = {};
1042
+
1043
+ $.each( this.serializeArray(), function(i,o){
1044
+ var n = o.name,
1045
+ v = o.value;
1046
+
1047
+ obj[n] = obj[n] === undefined ? v
1048
+ : $.isArray( obj[n] ) ? obj[n].concat( v )
1049
+ : [ obj[n], v ];
1050
+ });
1051
+
1052
+ return obj;
1053
+
1054
+ };
1055
+
1056
+ //
1057
+ // Options Save
1058
+ //
1059
+ $.fn.spftestimonial_save = function() {
1060
+ return this.each( function() {
1061
+
1062
+ var $this = $(this),
1063
+ $buttons = $('.spftestimonial-save'),
1064
+ $panel = $('.spftestimonial-options'),
1065
+ flooding = false,
1066
+ timeout;
1067
+
1068
+ $this.on('click', function( e ) {
1069
+
1070
+ if( !flooding ) {
1071
+
1072
+ var $text = $this.data('save'),
1073
+ $value = $this.val();
1074
+
1075
+ $buttons.attr('value', $text);
1076
+
1077
+ if( $this.hasClass('spftestimonial-save-ajax') ) {
1078
+
1079
+ e.preventDefault();
1080
+
1081
+ $panel.addClass('spftestimonial-saving');
1082
+ $buttons.prop('disabled', true);
1083
+
1084
+ window.wp.ajax.post( 'spftestimonial_'+ $panel.data('unique') +'_ajax_save', {
1085
+ data: $('#spftestimonial-form').serializeJSONSPFTESTIMONIAL()
1086
+ })
1087
+ .done( function( response ) {
1088
+
1089
+ clearTimeout(timeout);
1090
+
1091
+ var $result_success = $('.spftestimonial-form-success');
1092
+
1093
+ $result_success.empty().append(response.notice).slideDown('fast', function() {
1094
+ timeout = setTimeout( function() {
1095
+ $result_success.slideUp('fast');
1096
+ }, 2000);
1097
+ });
1098
+
1099
+ // clear errors
1100
+ $('.spftestimonial-error').remove();
1101
+
1102
+ var $append_errors = $('.spftestimonial-form-error');
1103
+
1104
+ $append_errors.empty().hide();
1105
+
1106
+ if( Object.keys( response.errors ).length ) {
1107
+
1108
+ var error_icon = '<i class="spftestimonial-label-error spftestimonial-error">!</i>';
1109
+
1110
+ $.each(response.errors, function( key, error_message ) {
1111
+
1112
+ var $field = $('[data-depend-id="'+ key +'"]'),
1113
+ $link = $('#spftestimonial-tab-link-'+ ($field.closest('.spftestimonial-section').index()+1)),
1114
+ $tab = $link.closest('.spftestimonial-tab-depth-0');
1115
+
1116
+ $field.closest('.spftestimonial-fieldset').append( '<p class="spftestimonial-text-error spftestimonial-error">'+ error_message +'</p>' );
1117
+
1118
+ if( !$link.find('.spftestimonial-error').length ) {
1119
+ $link.append( error_icon );
1120
+ }
1121
+
1122
+ if( !$tab.find('.spftestimonial-arrow .spftestimonial-error').length ) {
1123
+ $tab.find('.spftestimonial-arrow').append( error_icon );
1124
+ }
1125
+
1126
+ console.log(error_message);
1127
+
1128
+ $append_errors.append( '<div>'+ error_icon +' '+ error_message + '</div>' );
1129
+
1130
+ });
1131
+
1132
+ $append_errors.show();
1133
+
1134
+ }
1135
+
1136
+ $panel.removeClass('spftestimonial-saving');
1137
+ $buttons.prop('disabled', false).attr('value', $value);
1138
+ flooding = false;
1139
+
1140
+ })
1141
+ .fail( function( response ) {
1142
+ alert( response.error );
1143
+ });
1144
+
1145
+ }
1146
+
1147
+ }
1148
+
1149
+ flooding = true;
1150
+
1151
+ });
1152
+
1153
+ });
1154
+ };
1155
+
1156
+ //
1157
+ // Taxonomy Framework
1158
+ //
1159
+ $.fn.spftestimonial_taxonomy = function() {
1160
+ return this.each( function() {
1161
+
1162
+ var $this = $(this),
1163
+ $form = $this.parents('form');
1164
+
1165
+ if( $form.attr('id') === 'addtag' ) {
1166
+
1167
+ var $submit = $form.find('#submit'),
1168
+ $cloned = $this.find('.spftestimonial-field').spftestimonial_clone();
1169
+
1170
+ $submit.on( 'click', function() {
1171
+
1172
+ if( !$form.find('.form-required').hasClass('form-invalid') ) {
1173
+
1174
+ $this.data('inited', false);
1175
+
1176
+ $this.empty();
1177
+
1178
+ $this.html( $cloned );
1179
+
1180
+ $cloned = $cloned.spftestimonial_clone();
1181
+
1182
+ $this.spftestimonial_reload_script();
1183
+
1184
+ }
1185
+
1186
+ });
1187
+
1188
+ }
1189
+
1190
+ });
1191
+ };
1192
+
1193
+ //
1194
+ // Shortcode Framework
1195
+ //
1196
+ $.fn.spftestimonial_shortcode = function() {
1197
+
1198
+ var base = this;
1199
+
1200
+ base.shortcode_parse = function( serialize, key ) {
1201
+
1202
+ var shortcode = '';
1203
+
1204
+ $.each(serialize, function( shortcode_key, shortcode_values ) {
1205
+
1206
+ key = ( key ) ? key : shortcode_key;
1207
+
1208
+ shortcode += '[' + key;
1209
+
1210
+ $.each(shortcode_values, function( shortcode_tag, shortcode_value ) {
1211
+
1212
+ if( shortcode_tag === 'content' ) {
1213
+
1214
+ shortcode += ']';
1215
+ shortcode += shortcode_value;
1216
+ shortcode += '[/'+ key +'';
1217
+
1218
+ } else {
1219
+
1220
+ shortcode += base.shortcode_tags( shortcode_tag, shortcode_value );
1221
+
1222
+ }
1223
+
1224
+ });
1225
+
1226
+ shortcode += ']';
1227
+
1228
+ });
1229
+
1230
+ return shortcode;
1231
+
1232
+ };
1233
+
1234
+ base.shortcode_tags = function( shortcode_tag, shortcode_value ) {
1235
+
1236
+ var shortcode = '';
1237
+
1238
+ if( shortcode_value !== '' ) {
1239
+
1240
+ if( typeof shortcode_value === 'object' && !$.isArray( shortcode_value ) ) {
1241
+
1242
+ $.each(shortcode_value, function( sub_shortcode_tag, sub_shortcode_value ) {
1243
+
1244
+ // sanitize spesific key/value
1245
+ switch( sub_shortcode_tag ) {
1246
+
1247
+ case 'background-image':
1248
+ sub_shortcode_value = ( sub_shortcode_value.url ) ? sub_shortcode_value.url : '';
1249
+ break;
1250
+
1251
+ }
1252
+
1253
+ if( sub_shortcode_value !== '' ) {
1254
+ shortcode += ' ' + sub_shortcode_tag.replace('-', '_') + '="' + sub_shortcode_value.toString() + '"';
1255
+ }
1256
+
1257
+ });
1258
+
1259
+ } else {
1260
+
1261
+ shortcode += ' ' + shortcode_tag.replace('-', '_') + '="' + shortcode_value.toString() + '"';
1262
+
1263
+ }
1264
+
1265
+ }
1266
+
1267
+ return shortcode;
1268
+
1269
+ };
1270
+
1271
+ base.insertAtChars = function( _this, currentValue ) {
1272
+
1273
+ var obj = ( typeof _this[0].name !== 'undefined' ) ? _this[0] : _this;
1274
+
1275
+ if( obj.value.length && typeof obj.selectionStart !== 'undefined' ) {
1276
+ obj.focus();
1277
+ return obj.value.substring( 0, obj.selectionStart ) + currentValue + obj.value.substring( obj.selectionEnd, obj.value.length );
1278
+ } else {
1279
+ obj.focus();
1280
+ return currentValue;
1281
+ }
1282
+
1283
+ };
1284
+
1285
+ base.send_to_editor = function( html, editor_id ) {
1286
+
1287
+ var tinymce_editor;
1288
+
1289
+ if( typeof tinymce !== 'undefined' ) {
1290
+ tinymce_editor = tinymce.get( editor_id );
1291
+ }
1292
+
1293
+ if( tinymce_editor && !tinymce_editor.isHidden() ) {
1294
+ tinymce_editor.execCommand( 'mceInsertContent', false, html );
1295
+ } else {
1296
+ var $editor = $('#'+editor_id);
1297
+ $editor.val( base.insertAtChars( $editor, html ) ).trigger('change');
1298
+ }
1299
+
1300
+ };
1301
+
1302
+ return this.each( function() {
1303
+
1304
+ var $modal = $(this),
1305
+ $load = $modal.find('.spftestimonial-modal-load'),
1306
+ $content = $modal.find('.spftestimonial-modal-content'),
1307
+ $insert = $modal.find('.spftestimonial-modal-insert'),
1308
+ $loading = $modal.find('.spftestimonial-modal-loading'),
1309
+ $select = $modal.find('select'),
1310
+ modal_id = $modal.data('modal-id'),
1311
+ nonce = $modal.data('nonce'),
1312
+ editor_id,
1313
+ target_id,
1314
+ gutenberg_id,
1315
+ sc_key,
1316
+ sc_name,
1317
+ sc_view,
1318
+ sc_group,
1319
+ $cloned,
1320
+ $button;
1321
+
1322
+ $(document).on('click', '.spftestimonial-shortcode-button[data-modal-id="'+ modal_id +'"]', function( e ) {
1323
+
1324
+ e.preventDefault();
1325
+
1326
+ $button = $(this);
1327
+ editor_id = $button.data('editor-id') || false;
1328
+ target_id = $button.data('target-id') || false;
1329
+ gutenberg_id = $button.data('gutenberg-id') || false;
1330
+
1331
+ $modal.show();
1332
+
1333
+ // single usage trigger first shortcode
1334
+ if( $modal.hasClass('spftestimonial-shortcode-single') && sc_name === undefined ) {
1335
+ $select.trigger('change');
1336
+ }
1337
+
1338
+ });
1339
+
1340
+ $select.on( 'change', function() {
1341
+
1342
+ var $option = $(this);
1343
+ var $selected = $option.find(':selected');
1344
+
1345
+ sc_key = $option.val();
1346
+ sc_name = $selected.data('shortcode');
1347
+ sc_view = $selected.data('view') || 'normal';
1348
+ sc_group = $selected.data('group') || sc_name;
1349
+
1350
+ $load.empty();
1351
+
1352
+ if( sc_key ) {
1353
+
1354
+ $loading.show();
1355
+
1356
+ window.wp.ajax.post( 'spftestimonial-get-shortcode-'+ modal_id, {
1357
+ shortcode_key: sc_key,
1358
+ nonce: nonce
1359
+ })
1360
+ .done( function( response ) {
1361
+
1362
+ $loading.hide();
1363
+
1364
+ var $appended = $(response.content).appendTo($load);
1365
+
1366
+ $insert.parent().removeClass('hidden');
1367
+
1368
+ $cloned = $appended.find('.spftestimonial--repeat-shortcode').spftestimonial_clone();
1369
+
1370
+ $appended.spftestimonial_reload_script();
1371
+ $appended.find('.spftestimonial-fields').spftestimonial_reload_script();
1372
+
1373
+ });
1374
+
1375
+ } else {
1376
+
1377
+ $insert.parent().addClass('hidden');
1378
+
1379
+ }
1380
+
1381
+ });
1382
+
1383
+ $insert.on('click', function( e ) {
1384
+
1385
+ e.preventDefault();
1386
+
1387
+ var shortcode = '';
1388
+ var serialize = $modal.find('.spftestimonial-field:not(.hidden)').find(':input:not(.ignore)').serializeObjectSPFTESTIMONIAL();
1389
+
1390
+ switch ( sc_view ) {
1391
+
1392
+ case 'contents':
1393
+ var contentsObj = ( sc_name ) ? serialize[sc_name] : serialize;
1394
+ $.each(contentsObj, function( sc_key, sc_value ) {
1395
+ var sc_tag = ( sc_name ) ? sc_name : sc_key;
1396
+ shortcode += '['+ sc_tag +']'+ sc_value +'[/'+ sc_tag +']';
1397
+ });
1398
+ break;
1399
+
1400
+ case 'group':
1401
+
1402
+ shortcode += '[' + sc_name;
1403
+ $.each(serialize[sc_name], function( sc_key, sc_value ) {
1404
+ shortcode += base.shortcode_tags( sc_key, sc_value );
1405
+ });
1406
+ shortcode += ']';
1407
+ shortcode += base.shortcode_parse( serialize[sc_group], sc_group );
1408
+ shortcode += '[/' + sc_name + ']';
1409
+
1410
+ break;
1411
+
1412
+ case 'repeater':
1413
+ shortcode += base.shortcode_parse( serialize[sc_group], sc_group );
1414
+ break;
1415
+
1416
+ default:
1417
+ shortcode += base.shortcode_parse( serialize );
1418
+ break;
1419
+
1420
+ }
1421
+
1422
+ shortcode = ( shortcode === '' ) ? '['+ sc_name +']' : shortcode;
1423
+
1424
+ if( gutenberg_id ) {
1425
+
1426
+ var content = window.spftestimonial_gutenberg_props.attributes.hasOwnProperty('shortcode') ? window.spftestimonial_gutenberg_props.attributes.shortcode : '';
1427
+ window.spftestimonial_gutenberg_props.setAttributes({shortcode: content + shortcode});
1428
+
1429
+ } else if( editor_id ) {
1430
+
1431
+ base.send_to_editor( shortcode, editor_id );
1432
+
1433
+ } else {
1434
+
1435
+ var $textarea = (target_id) ? $(target_id) : $button.parent().find('textarea');
1436
+ $textarea.val( base.insertAtChars( $textarea, shortcode ) ).trigger('change');
1437
+
1438
+ }
1439
+
1440
+ $modal.hide();
1441
+
1442
+ });
1443
+
1444
+ $modal.on('click', '.spftestimonial--repeat-button', function( e ) {
1445
+
1446
+ e.preventDefault();
1447
+
1448
+ var $repeatable = $modal.find('.spftestimonial--repeatable');
1449
+ var $new_clone = $cloned.spftestimonial_clone();
1450
+ var $remove_btn = $new_clone.find('.spftestimonial-repeat-remove');
1451
+
1452
+ var $appended = $new_clone.appendTo( $repeatable );
1453
+
1454
+ $new_clone.find('.spftestimonial-fields').spftestimonial_reload_script();
1455
+
1456
+ SPFTESTIMONIAL.helper.name_nested_replace( $modal.find('.spftestimonial--repeat-shortcode'), sc_group );
1457
+
1458
+ $remove_btn.on('click', function() {
1459
+
1460
+ $new_clone.remove();
1461
+
1462
+ SPFTESTIMONIAL.helper.name_nested_replace( $modal.find('.spftestimonial--repeat-shortcode'), sc_group );
1463
+
1464
+ });
1465
+
1466
+ });
1467
+
1468
+ $modal.on('click', '.spftestimonial-modal-close, .spftestimonial-modal-overlay', function() {
1469
+ $modal.hide();
1470
+ });
1471
+
1472
+ });
1473
+ };
1474
+
1475
+ //
1476
+ // WP Color Picker
1477
+ //
1478
+ if( typeof Color === 'function' ) {
1479
+
1480
+ Color.fn.toString = function() {
1481
+
1482
+ if( this._alpha < 1 ) {
1483
+ return this.toCSS('rgba', this._alpha).replace(/\s+/g, '');
1484
+ }
1485
+
1486
+ var hex = parseInt( this._color, 10 ).toString( 16 );
1487
+
1488
+ if( this.error ) { return ''; }
1489
+
1490
+ if( hex.length < 6 ) {
1491
+ for (var i = 6 - hex.length - 1; i >= 0; i--) {
1492
+ hex = '0' + hex;
1493
+ }
1494
+ }
1495
+
1496
+ return '#' + hex;
1497
+
1498
+ };
1499
+
1500
+ }
1501
+
1502
+ SPFTESTIMONIAL.funcs.parse_color = function( color ) {
1503
+
1504
+ var value = color.replace(/\s+/g, ''),
1505
+ trans = ( value.indexOf('rgba') !== -1 ) ? parseFloat( value.replace(/^.*,(.+)\)/, '$1') * 100 ) : 100,
1506
+ rgba = ( trans < 100 ) ? true : false;
1507
+
1508
+ return { value: value, transparent: trans, rgba: rgba };
1509
+
1510
+ };
1511
+
1512
+ $.fn.spftestimonial_color = function() {
1513
+ return this.each( function() {
1514
+
1515
+ var $input = $(this),
1516
+ picker_color = SPFTESTIMONIAL.funcs.parse_color( $input.val() ),
1517
+ palette_color = window.spftestimonial_vars.color_palette.length ? window.spftestimonial_vars.color_palette : true,
1518
+ $container;
1519
+
1520
+ // Destroy and Reinit
1521
+ if( $input.hasClass('wp-color-picker') ) {
1522
+ $input.closest('.wp-picker-container').after($input).remove();
1523
+ }
1524
+
1525
+ $input.wpColorPicker({
1526
+ palettes: palette_color,
1527
+ change: function( event, ui ) {
1528
+
1529
+ var ui_color_value = ui.color.toString();
1530
+
1531
+ $container.removeClass('spftestimonial--transparent-active');
1532
+ $container.find('.spftestimonial--transparent-offset').css('background-color', ui_color_value);
1533
+ $input.val(ui_color_value).trigger('change');
1534
+
1535
+ },
1536
+ create: function() {
1537
+
1538
+ $container = $input.closest('.wp-picker-container');
1539
+
1540
+ var a8cIris = $input.data('a8cIris'),
1541
+ $transparent_wrap = $('<div class="spftestimonial--transparent-wrap">' +
1542
+ '<div class="spftestimonial--transparent-slider"></div>' +
1543
+ '<div class="spftestimonial--transparent-offset"></div>' +
1544
+ '<div class="spftestimonial--transparent-text"></div>' +
1545
+ '<div class="spftestimonial--transparent-button button button-small">transparent</div>' +
1546
+ '</div>').appendTo( $container.find('.wp-picker-holder') ),
1547
+ $transparent_slider = $transparent_wrap.find('.spftestimonial--transparent-slider'),
1548
+ $transparent_text = $transparent_wrap.find('.spftestimonial--transparent-text'),
1549
+ $transparent_offset = $transparent_wrap.find('.spftestimonial--transparent-offset'),
1550
+ $transparent_button = $transparent_wrap.find('.spftestimonial--transparent-button');
1551
+
1552
+ if( $input.val() === 'transparent' ) {
1553
+ $container.addClass('spftestimonial--transparent-active');
1554
+ }
1555
+
1556
+ $transparent_button.on('click', function() {
1557
+ if( $input.val() !== 'transparent' ) {
1558
+ $input.val('transparent').trigger('change').removeClass('iris-error');
1559
+ $container.addClass('spftestimonial--transparent-active');
1560
+ } else {
1561
+ $input.val( a8cIris._color.toString() ).trigger('change');
1562
+ $container.removeClass('spftestimonial--transparent-active');
1563
+ }
1564
+ });
1565
+
1566
+ $transparent_slider.slider({
1567
+ value: picker_color.transparent,
1568
+ step: 1,
1569
+ min: 0,
1570
+ max: 100,
1571
+ slide: function( event, ui ) {
1572
+
1573
+ var slide_value = parseFloat( ui.value / 100 );
1574
+ a8cIris._color._alpha = slide_value;
1575
+ $input.wpColorPicker( 'color', a8cIris._color.toString() );
1576
+ $transparent_text.text( ( slide_value === 1 || slide_value === 0 ? '' : slide_value ) );
1577
+
1578
+ },
1579
+ create: function() {
1580
+
1581
+ var slide_value = parseFloat( picker_color.transparent / 100 ),
1582
+ text_value = slide_value < 1 ? slide_value : '';
1583
+
1584
+ $transparent_text.text(text_value);
1585
+ $transparent_offset.css('background-color', picker_color.value);
1586
+
1587
+ $container.on('click', '.wp-picker-clear', function() {
1588
+
1589
+ a8cIris._color._alpha = 1;
1590
+ $transparent_text.text('');
1591
+ $transparent_slider.slider('option', 'value', 100);
1592
+ $container.removeClass('spftestimonial--transparent-active');
1593
+ $input.trigger('change');
1594
+
1595
+ });
1596
+
1597
+ $container.on('click', '.wp-picker-default', function() {
1598
+
1599
+ var default_color = SPFTESTIMONIAL.funcs.parse_color( $input.data('default-color') ),
1600
+ default_value = parseFloat( default_color.transparent / 100 ),
1601
+ default_text = default_value < 1 ? default_value : '';
1602
+
1603
+ a8cIris._color._alpha = default_value;
1604
+ $transparent_text.text(default_text);
1605
+ $transparent_slider.slider('option', 'value', default_color.transparent);
1606
+
1607
+ });
1608
+
1609
+ $container.on('click', '.wp-color-result', function() {
1610
+ $transparent_wrap.toggle();
1611
+ });
1612
+
1613
+ $('body').on( 'click.wpcolorpicker', function() {
1614
+ $transparent_wrap.hide();
1615
+ });
1616
+
1617
+ }
1618
+ });
1619
+ }
1620
+ });
1621
+
1622
+ });
1623
+ };
1624
+
1625
+ //
1626
+ // Number (only allow numeric inputs)
1627
+ //
1628
+ $.fn.spftestimonial_number = function() {
1629
+ return this.each( function() {
1630
+
1631
+ $(this).on('keypress', function( e ) {
1632
+
1633
+ if( e.keyCode !== 0 && e.keyCode !== 8 && e.keyCode !== 45 && e.keyCode !== 46 && ( e.keyCode < 48 || e.keyCode > 57 ) ) {
1634
+ return false;
1635
+ }
1636
+
1637
+ });
1638
+
1639
+ });
1640
+ };
1641
+
1642
+ //
1643
+ // ChosenJS
1644
+ //
1645
+ $.fn.spftestimonial_chosen = function() {
1646
+ return this.each( function() {
1647
+
1648
+ var $this = $(this),
1649
+ $inited = $this.parent().find('.chosen-container'),
1650
+ is_sortable = $this.hasClass('spftestimonial-chosen-sortable') || false,
1651
+ is_ajax = $this.hasClass('spftestimonial-chosen-ajax') || false,
1652
+ is_multiple = $this.attr('multiple') || false,
1653
+ set_width = is_multiple ? '100%' : 'auto',
1654
+ set_options = $.extend({
1655
+ allow_single_deselect: true,
1656
+ disable_search_threshold: 10,
1657
+ width: set_width,
1658
+ no_results_text: window.spftestimonial_vars.i18n.no_results_text,
1659
+ }, $this.data('chosen-settings'));
1660
+
1661
+ if( $inited.length ) {
1662
+ $inited.remove();
1663
+ }
1664
+
1665
+ // Chosen ajax
1666
+ if( is_ajax ) {
1667
+
1668
+ var set_ajax_options = $.extend({
1669
+ data: {
1670
+ type: 'post',
1671
+ nonce: '',
1672
+ },
1673
+ allow_single_deselect: true,
1674
+ disable_search_threshold: -1,
1675
+ width: '100%',
1676
+ min_length: 3,
1677
+ type_delay: 500,
1678
+ typing_text: window.spftestimonial_vars.i18n.typing_text,
1679
+ searching_text: window.spftestimonial_vars.i18n.searching_text,
1680
+ no_results_text: window.spftestimonial_vars.i18n.no_results_text,
1681
+ }, $this.data('chosen-settings'));
1682
+
1683
+ $this.SPFTESTIMONIALAjaxChosen(set_ajax_options);
1684
+
1685
+ } else {
1686
+
1687
+ $this.chosen(set_options);
1688
+
1689
+ }
1690
+
1691
+ // Chosen keep options order
1692
+ if( is_multiple ) {
1693
+
1694
+ var $hidden_select = $this.parent().find('.spftestimonial-hidden-select');
1695
+ var $hidden_value = $hidden_select.val() || [];
1696
+
1697
+ $this.on('change', function(obj, result) {
1698
+
1699
+ if( result && result.selected ) {
1700
+ $hidden_select.append( '<option value="'+ result.selected +'" selected="selected">'+ result.selected +'</option>' );
1701
+ } else if( result && result.deselected ) {
1702
+ $hidden_select.find('option[value="'+ result.deselected +'"]').remove();
1703
+ }
1704
+
1705
+ // Force customize refresh
1706
+ if( $hidden_select.children().length === 0 && window.wp.customize !== undefined ) {
1707
+ window.wp.customize.control( $hidden_select.data('customize-setting-link') ).setting.set('');
1708
+ }
1709
+
1710
+ $hidden_select.trigger('change');
1711
+
1712
+ });
1713
+
1714
+ // Chosen order abstract
1715
+ $this.SPFTESTIMONIALChosenOrder($hidden_value, true);
1716
+
1717
+ }
1718
+
1719
+ // Chosen sortable
1720
+ if( is_sortable ) {
1721
+
1722
+ var $chosen_container = $this.parent().find('.chosen-container');
1723
+ var $chosen_choices = $chosen_container.find('.chosen-choices');
1724
+
1725
+ $chosen_choices.bind('mousedown', function( event ) {
1726
+ if( $(event.target).is('span') ) {
1727
+ event.stopPropagation();
1728
+ }
1729
+ });
1730
+
1731
+ $chosen_choices.sortable({
1732
+ items: 'li:not(.search-field)',
1733
+ helper: 'orginal',
1734
+ cursor: 'move',
1735
+ placeholder: 'search-choice-placeholder',
1736
+ start: function(e,ui) {
1737
+ ui.placeholder.width( ui.item.innerWidth() );
1738
+ ui.placeholder.height( ui.item.innerHeight() );
1739
+ },
1740
+ update: function( e, ui ) {
1741
+
1742
+ var select_options = '';
1743
+ var chosen_object = $this.data('chosen');
1744
+ var $prev_select = $this.parent().find('.spftestimonial-hidden-select');
1745
+
1746
+ $chosen_choices.find('.search-choice-close').each( function() {
1747
+ var option_array_index = $(this).data('option-array-index');
1748
+ $.each(chosen_object.results_data, function(index, data) {
1749
+ if( data.array_index === option_array_index ){
1750
+ select_options += '<option value="'+ data.value +'" selected>'+ data.value +'</option>';
1751
+ }
1752
+ });
1753
+ });
1754
+
1755
+ $prev_select.children().remove();
1756
+ $prev_select.append(select_options);
1757
+ $prev_select.trigger('change');
1758
+
1759
+ }
1760
+ });
1761
+
1762
+ }
1763
+
1764
+ });
1765
+ };
1766
+
1767
+ //
1768
+ // Helper Checkbox Checker
1769
+ //
1770
+ $.fn.spftestimonial_checkbox = function() {
1771
+ return this.each( function() {
1772
+
1773
+ var $this = $(this),
1774
+ $input = $this.find('.spftestimonial--input'),
1775
+ $checkbox = $this.find('.spftestimonial--checkbox');
1776
+
1777
+ $checkbox.on('click', function() {
1778
+ $input.val( Number( $checkbox.prop('checked') ) ).trigger('change');
1779
+ });
1780
+
1781
+ });
1782
+ };
1783
+
1784
+ //
1785
+ // Siblings
1786
+ //
1787
+ $.fn.spftestimonial_siblings = function() {
1788
+ return this.each( function() {
1789
+
1790
+ var $this = $(this),
1791
+ $siblings = $this.find('.spftestimonial--sibling'),
1792
+ multiple = $this.data('multiple') || false;
1793
+
1794
+ $siblings.on('click', function() {
1795
+
1796
+ var $sibling = $(this);
1797
+
1798
+ if( multiple ) {
1799
+
1800
+ if( $sibling.hasClass('spftestimonial--active') ) {
1801
+ $sibling.removeClass('spftestimonial--active');
1802
+ $sibling.find('input').prop('checked', false).trigger('change');
1803
+ } else {
1804
+ $sibling.addClass('spftestimonial--active');
1805
+ $sibling.find('input').prop('checked', true).trigger('change');
1806
+ }
1807
+
1808
+ } else {
1809
+
1810
+ $this.find('input').prop('checked', false);
1811
+ $sibling.find('input').prop('checked', true).trigger('change');
1812
+ $sibling.addClass('spftestimonial--active').siblings().removeClass('spftestimonial--active');
1813
+
1814
+ }
1815
+
1816
+ });
1817
+
1818
+ });
1819
+ };
1820
+
1821
+ //
1822
+ // Help Tooltip
1823
+ //
1824
+ $.fn.spftestimonial_help = function() {
1825
+ return this.each( function() {
1826
+
1827
+ var $this = $(this),
1828
+ $tooltip,
1829
+ offset_left;
1830
+
1831
+ $this.on({
1832
+ mouseenter: function() {
1833
+
1834
+ $tooltip = $( '<div class="spftestimonial-tooltip"></div>' ).html( $this.find('.spftestimonial-help-text').html() ).appendTo('body');
1835
+ offset_left = ( SPFTESTIMONIAL.vars.is_rtl ) ? ( $this.offset().left + 24 ) : ( $this.offset().left - $tooltip.outerWidth() );
1836
+
1837
+ $tooltip.css({
1838
+ top: $this.offset().top - ( ( $tooltip.outerHeight() / 2 ) - 14 ),
1839
+ left: offset_left,
1840
+ });
1841
+
1842
+ },
1843
+ mouseleave: function() {
1844
+
1845
+ if( $tooltip !== undefined ) {
1846
+ $tooltip.remove();
1847
+ }
1848
+
1849
+ }
1850
+
1851
+ });
1852
+
1853
+ });
1854
+ };
1855
+
1856
+ //
1857
+ // Customize Refresh
1858
+ //
1859
+ $.fn.spftestimonial_customizer_refresh = function() {
1860
+ return this.each( function() {
1861
+
1862
+ var $this = $(this),
1863
+ $complex = $this.closest('.spftestimonial-customize-complex');
1864
+
1865
+ if( $complex.length ) {
1866
+
1867
+ var $input = $complex.find(':input'),
1868
+ $unique = $complex.data('unique-id'),
1869
+ $option = $complex.data('option-id'),
1870
+ obj = $input.serializeObjectSPFTESTIMONIAL(),
1871
+ data = ( !$.isEmptyObject(obj) ) ? obj[$unique][$option] : '',
1872
+ control = window.wp.customize.control($unique +'['+ $option +']');
1873
+
1874
+ // clear the value to force refresh.
1875
+ control.setting._value = null;
1876
+
1877
+ control.setting.set( data );
1878
+
1879
+ } else {
1880
+
1881
+ $this.find(':input').first().trigger('change');
1882
+
1883
+ }
1884
+
1885
+ $(document).trigger('spftestimonial-customizer-refresh', $this);
1886
+
1887
+ });
1888
+ };
1889
+
1890
+ //
1891
+ // Customize Listen Form Elements
1892
+ //
1893
+ $.fn.spftestimonial_customizer_listen = function( options ) {
1894
+
1895
+ var settings = $.extend({
1896
+ closest: false,
1897
+ }, options );
1898
+
1899
+ return this.each( function() {
1900
+
1901
+ if( window.wp.customize === undefined ) { return; }
1902
+
1903
+ var $this = ( settings.closest ) ? $(this).closest('.spftestimonial-customize-complex') : $(this),
1904
+ $input = $this.find(':input'),
1905
+ unique_id = $this.data('unique-id'),
1906
+ option_id = $this.data('option-id');
1907
+
1908
+ if( unique_id === undefined ) { return; }
1909
+
1910
+ $input.on('change keyup', SPFTESTIMONIAL.helper.debounce( function() {
1911
+
1912
+ var obj = $this.find(':input').serializeObjectSPFTESTIMONIAL();
1913
+
1914
+ if( !$.isEmptyObject(obj) && obj[unique_id] ) {
1915
+
1916
+ window.wp.customize.control( unique_id +'['+ option_id +']' ).setting.set( obj[unique_id][option_id] );
1917
+
1918
+ }
1919
+
1920
+ }, 250 ) );
1921
+
1922
+ });
1923
+ };
1924
+
1925
+ //
1926
+ // Customizer Listener for Reload JS
1927
+ //
1928
+ $(document).on('expanded', '.control-section', function() {
1929
+
1930
+ var $this = $(this);
1931
+
1932
+ if( $this.hasClass('open') && !$this.data('inited') ) {
1933
+
1934
+ var $fields = $this.find('.spftestimonial-customize-field');
1935
+ var $complex = $this.find('.spftestimonial-customize-complex');
1936
+
1937
+ if( $fields.length ) {
1938
+ $this.spftestimonial_dependency();
1939
+ $fields.spftestimonial_reload_script({dependency: false});
1940
+ $complex.spftestimonial_customizer_listen();
1941
+ }
1942
+
1943
+ $this.data('inited', true);
1944
+
1945
+ }
1946
+
1947
+ });
1948
+
1949
+ //
1950
+ // Window on resize
1951
+ //
1952
+ SPFTESTIMONIAL.vars.$window.on('resize spftestimonial.resize', SPFTESTIMONIAL.helper.debounce( function( event ) {
1953
+
1954
+ var window_width = navigator.userAgent.indexOf('AppleWebKit/') > -1 ? SPFTESTIMONIAL.vars.$window.width() : window.innerWidth;
1955
+
1956
+ if( window_width <= 782 && !SPFTESTIMONIAL.vars.onloaded ) {
1957
+ $('.spftestimonial-section').spftestimonial_reload_script();
1958
+ SPFTESTIMONIAL.vars.onloaded = true;
1959
+ }
1960
+
1961
+ }, 200)).trigger('spftestimonial.resize');
1962
+
1963
+ //
1964
+ // Widgets Framework
1965
+ //
1966
+ $.fn.spftestimonial_widgets = function() {
1967
+ if( this.length ) {
1968
+
1969
+ $(document).on('widget-added widget-updated', function( event, $widget ) {
1970
+ $widget.find('.spftestimonial-fields').spftestimonial_reload_script();
1971
+ });
1972
+
1973
+ $('.widgets-sortables, .control-section-sidebar').on('sortstop', function( event, ui ) {
1974
+ ui.item.find('.spftestimonial-fields').spftestimonial_reload_script_retry();
1975
+ });
1976
+
1977
+ $(document).on('click', '.widget-top', function( event ) {
1978
+ $(this).parent().find('.spftestimonial-fields').spftestimonial_reload_script();
1979
+ });
1980
+
1981
+ }
1982
+ };
1983
+
1984
+ //
1985
+ // Retry Plugins
1986
+ //
1987
+ $.fn.spftestimonial_reload_script_retry = function() {
1988
+ return this.each( function() {
1989
+
1990
+ var $this = $(this);
1991
+
1992
+ if( $this.data('inited') ) {
1993
+ $this.children('.spftestimonial-field-wp_editor').spftestimonial_field_wp_editor();
1994
+ }
1995
+
1996
+ });
1997
+ };
1998
+
1999
+ //
2000
+ // Reload Plugins
2001
+ //
2002
+ $.fn.spftestimonial_reload_script = function( options ) {
2003
+
2004
+ var settings = $.extend({
2005
+ dependency: true,
2006
+ }, options );
2007
+
2008
+ return this.each( function() {
2009
+
2010
+ var $this = $(this);
2011
+
2012
+ // Avoid for conflicts
2013
+ if( !$this.data('inited') ) {
2014
+
2015
+ // Field plugins
2016
+ $this.children('.spftestimonial-field-code_editor').spftestimonial_field_code_editor();
2017
+ $this.children('.spftestimonial-field-spinner').spftestimonial_field_spinner();
2018
+ $this.children('.spftestimonial-field-switcher').spftestimonial_field_switcher();
2019
+ $this.children('.spftestimonial-field-typography').spftestimonial_field_typography();
2020
+
2021
+ // Field colors
2022
+ $this.children('.spftestimonial-field-color').find('.spftestimonial-color').spftestimonial_color();
2023
+ $this.children('.spftestimonial-field-color_group').find('.spftestimonial-color').spftestimonial_color();
2024
+ $this.children('.spftestimonial-field-typography').find('.spftestimonial-color').spftestimonial_color();
2025
+
2026
+ // Field allows only number
2027
+ $this.children('.spftestimonial-field-spacing').find('.spftestimonial-number').spftestimonial_number();
2028
+ $this.children('.spftestimonial-field-spinner').find('.spftestimonial-number').spftestimonial_number();
2029
+ $this.children('.spftestimonial-field-typography').find('.spftestimonial-number').spftestimonial_number();
2030
+
2031
+ // Field chosenjs
2032
+ $this.children('.spftestimonial-field-select').find('.spftestimonial-chosen').spftestimonial_chosen();
2033
+
2034
+ // Field Checkbox
2035
+ $this.children('.spftestimonial-field-checkbox').find('.spftestimonial-checkbox').spftestimonial_checkbox();
2036
+
2037
+ // Field Siblings
2038
+ $this.children('.spftestimonial-field-button_set').find('.spftestimonial-siblings').spftestimonial_siblings();
2039
+ $this.children('.spftestimonial-field-image_select').find('.spftestimonial-siblings').spftestimonial_siblings();
2040
+
2041
+ // Help Tooptip
2042
+ $this.children('.spftestimonial-field').find('.spftestimonial-help').spftestimonial_help();
2043
+
2044
+ if( settings.dependency ) {
2045
+ $this.spftestimonial_dependency();
2046
+ }
2047
+
2048
+ $this.data('inited', true);
2049
+
2050
+ $(document).trigger('spftestimonial-reload-script', $this);
2051
+
2052
+ }
2053
+
2054
+ });
2055
+ };
2056
+
2057
+ //
2058
+ // Document ready and run scripts
2059
+ //
2060
+ $(document).ready( function() {
2061
+
2062
+ $('.spftestimonial-save').spftestimonial_save();
2063
+ $('.spftestimonial-confirm').spftestimonial_confirm();
2064
+ $('.spftestimonial-nav-options').spftestimonial_nav_options();
2065
+ $('.spftestimonial-nav-metabox').spftestimonial_nav_metabox();
2066
+ $('.spftestimonial-expand-all').spftestimonial_expand_all();
2067
+ $('.spftestimonial-search').spftestimonial_search();
2068
+ $('.spftestimonial-sticky-header').spftestimonial_sticky();
2069
+ $('.spftestimonial-taxonomy').spftestimonial_taxonomy();
2070
+ $('.spftestimonial-shortcode').spftestimonial_shortcode();
2071
+ $('.spftestimonial-page-templates').spftestimonial_page_templates();
2072
+ $('.spftestimonial-post-formats').spftestimonial_post_formats();
2073
+ $('.spftestimonial-onload').spftestimonial_reload_script();
2074
+ $('.widget').spftestimonial_widgets();
2075
+
2076
+ });
2077
+
2078
+ })( jQuery, window, document );
admin/views/tp-metabox/assets/js/spftestimonial.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function($,window,document,undefined){"use strict";var SPFTESTIMONIAL=SPFTESTIMONIAL||{};SPFTESTIMONIAL.funcs={},SPFTESTIMONIAL.vars={onloaded:!1,$body:$("body"),$window:$(window),$document:$(document),is_rtl:$("body").hasClass("rtl"),code_themes:[]},SPFTESTIMONIAL.helper={uid:function(prefix){return(prefix||"")+Math.random().toString(36).substr(2,9)},preg_quote:function(str){return(str+"").replace(/(\[|\-|\])/g,"\\$1")},name_nested_replace:function($selector,field_id){var checks=[],regex=new RegExp("("+SPFTESTIMONIAL.helper.preg_quote(field_id)+")\\[(\\d+)\\]","g");$selector.find(":radio").each((function(){(this.checked||this.orginal_checked)&&(this.orginal_checked=!0)})),$selector.each((function(index){$(this).find(":input").each((function(){this.name=this.name.replace(regex,field_id+"["+index+"]"),this.orginal_checked&&(this.checked=!0)}))}))},debounce:function(callback,threshold,immediate){var timeout;return function(){var context=this,args=arguments,later=function(){timeout=null,immediate||callback.apply(context,args)},callNow=immediate&&!timeout;clearTimeout(timeout),timeout=setTimeout(later,threshold),callNow&&callback.apply(context,args)}},get_cookie:function(name){var e,b,cookie=document.cookie,p=name+"=";if(cookie){if(-1===(b=cookie.indexOf("; "+p))){if(0!==(b=cookie.indexOf(p)))return null}else b+=2;return-1===(e=cookie.indexOf(";",b))&&(e=cookie.length),decodeURIComponent(cookie.substring(b+p.length,e))}},set_cookie:function(name,value,expires,path,domain,secure){var d=new Date;"object"==typeof expires&&expires.toGMTString?expires=expires.toGMTString():parseInt(expires,10)?(d.setTime(d.getTime()+1e3*parseInt(expires,10)),expires=d.toGMTString()):expires="",document.cookie=name+"="+encodeURIComponent(value)+(expires?"; expires="+expires:"")+(path?"; path="+path:"")+(domain?"; domain="+domain:"")+(secure?"; secure":"")},remove_cookie:function(name,path,domain,secure){SPFTESTIMONIAL.helper.set_cookie(name,"",-1e3,path,domain,secure)}},$.fn.spftestimonial_clone=function(){for(var base=$.fn.clone.apply(this,arguments),clone=this.find("select").add(this.filter("select")),cloned=base.find("select").add(base.filter("select")),i=0;i<clone.length;++i)for(var j=0;j<clone[i].options.length;++j)!0===clone[i].options[j].selected&&(cloned[i].options[j].selected=!0);return this.find(":radio").each((function(){this.orginal_checked=this.checked})),base},$.fn.spftestimonial_expand_all=function(){return this.each((function(){$(this).on("click",(function(e){e.preventDefault(),$(".spftestimonial-wrapper").toggleClass("spftestimonial-show-all"),$(".spftestimonial-section").spftestimonial_reload_script(),$(this).find(".fa").toggleClass("fa-indent").toggleClass("fa-outdent")}))}))},$.fn.spftestimonial_nav_options=function(){return this.each((function(){var $nav=$(this),$links=$nav.find("a"),$hidden=$nav.closest(".spftestimonial").find(".spftestimonial-section-id"),$last_section;$(window).on("hashchange",(function(){var hash=window.location.hash.match(new RegExp("tab=([^&]*)")),slug=hash?hash[1]:$links.first().attr("href").replace("#tab=",""),$link=$("#spftestimonial-tab-link-"+slug);if($link.length>0){$link.closest(".spftestimonial-tab-depth-0").addClass("spftestimonial-tab-active").siblings().removeClass("spftestimonial-tab-active"),$links.removeClass("spftestimonial-section-active"),$link.addClass("spftestimonial-section-active"),void 0!==$last_section&&$last_section.hide();var $section=$("#spftestimonial-section-"+slug);$section.css({display:"block"}),$section.spftestimonial_reload_script(),$hidden.val(slug),$last_section=$section}})).trigger("hashchange")}))},$.fn.spftestimonial_nav_metabox=function(){return this.each((function(){var $nav=$(this),$links=$nav.find("a"),unique_id=$nav.data("unique"),post_id=$("#post_ID").val()||"global",$last_section,$last_link;$links.on("click",(function(e){e.preventDefault();var $link=$(this),section_id=$link.data("section");void 0!==$last_link&&$last_link.removeClass("spftestimonial-section-active"),void 0!==$last_section&&$last_section.hide(),$link.addClass("spftestimonial-section-active");var $section=$("#spftestimonial-section-"+section_id);$section.css({display:"block"}),$section.spftestimonial_reload_script(),SPFTESTIMONIAL.helper.set_cookie("spftestimonial-last-metabox-tab-"+post_id+"-"+unique_id,section_id),$last_section=$section,$last_link=$link}));var get_cookie=SPFTESTIMONIAL.helper.get_cookie("spftestimonial-last-metabox-tab-"+post_id+"-"+unique_id);get_cookie?$nav.find('a[data-section="'+get_cookie+'"]').trigger("click"):$links.first("a").trigger("click")}))},$.fn.spftestimonial_page_templates=function(){this.length&&$(document).on("change",".editor-page-attributes__template select, #page_template",(function(){var maybe_value=$(this).val()||"default";$(".spftestimonial-page-templates").removeClass("spftestimonial-show").addClass("spftestimonial-hide"),$(".spftestimonial-page-"+maybe_value.toLowerCase().replace(/[^a-zA-Z0-9]+/g,"-")).removeClass("spftestimonial-hide").addClass("spftestimonial-show")}))},$.fn.spftestimonial_post_formats=function(){this.length&&$(document).on("change",'.editor-post-format select, #formatdiv input[name="post_format"]',(function(){var maybe_value=$(this).val()||"default";maybe_value="0"===maybe_value?"default":maybe_value,$(".spftestimonial-post-formats").removeClass("spftestimonial-show").addClass("spftestimonial-hide"),$(".spftestimonial-post-format-"+maybe_value).removeClass("spftestimonial-hide").addClass("spftestimonial-show")}))},$.fn.spftestimonial_search=function(){return this.each((function(){var $this,$input;$(this).find("input").on("change keyup",(function(){var value=$(this).val(),$wrapper=$(".spftestimonial-wrapper"),$section,$fields=$wrapper.find(".spftestimonial-section").find("> .spftestimonial-field:not(.hidden)"),$titles=$fields.find("> .spftestimonial-title, .spftestimonial-search-tags");value.length>3?($fields.addClass("spftestimonial-hidden"),$wrapper.addClass("spftestimonial-search-all"),$titles.each((function(){var $title=$(this);if($title.text().match(new RegExp(".*?"+value+".*?","i"))){var $field=$title.closest(".spftestimonial-field");$field.removeClass("spftestimonial-hidden"),$field.parent().spftestimonial_reload_script()}}))):($fields.removeClass("spftestimonial-hidden"),$wrapper.removeClass("spftestimonial-search-all"))}))}))},$.fn.spftestimonial_sticky=function(){return this.each((function(){var $this=$(this),$window=$(window),$inner=$this.find(".spftestimonial-header-inner"),padding=parseInt($inner.css("padding-left"))+parseInt($inner.css("padding-right")),offset=32,scrollTop=0,lastTop=0,ticking=!1,stickyUpdate=function(){var offsetTop=$this.offset().top,stickyTop=Math.max(32,offsetTop-scrollTop),winWidth=Math.max(document.documentElement.clientWidth,window.innerWidth||0);stickyTop<=32&&winWidth>782?($inner.css({width:$this.outerWidth()-padding}),$this.css({height:$this.outerHeight()}).addClass("spftestimonial-sticky")):($inner.removeAttr("style"),$this.removeAttr("style").removeClass("spftestimonial-sticky"))},requestTick=function(){ticking||requestAnimationFrame((function(){stickyUpdate(),ticking=!1})),ticking=!0},onSticky=function(){scrollTop=$window.scrollTop(),requestTick()};$window.on("scroll resize",onSticky),onSticky()}))},$.fn.spftestimonial_dependency=function(){return this.each((function(){var $this=$(this),ruleset=$.spftestimonial_deps.createRuleset(),depends=[],is_global=!1;$this.children("[data-controller]").each((function(){var $field=$(this),controllers=$field.data("controller").split("|"),conditions=$field.data("condition").split("|"),values=$field.data("value").toString().split("|"),rules=ruleset;$field.data("depend-global")&&(is_global=!0),$.each(controllers,(function(index,depend_id){var value=values[index]||"",condition=conditions[index]||conditions[0];(rules=rules.createRule('[data-depend-id="'+depend_id+'"]',condition,value)).include($field),depends.push(depend_id)}))})),depends.length&&(is_global?$.spftestimonial_deps.enable(SPFTESTIMONIAL.vars.$body,ruleset,depends):$.spftestimonial_deps.enable($this,ruleset,depends))}))},$.fn.spftestimonial_field_code_editor=function(){return this.each((function(){if("function"==typeof CodeMirror){var $this=$(this),$textarea=$this.find("textarea"),$inited=$this.find(".CodeMirror"),data_editor=$textarea.data("editor");$inited.length&&$inited.remove();var interval=setInterval((function(){if($this.is(":visible")){var code_editor=CodeMirror.fromTextArea($textarea[0],data_editor);if("default"!==data_editor.theme&&-1===SPFTESTIMONIAL.vars.code_themes.indexOf(data_editor.theme)){var $cssLink=$("<link>");$("#spftestimonial-codemirror-css").after($cssLink),$cssLink.attr({rel:"stylesheet",id:"spftestimonial-codemirror-"+data_editor.theme+"-css",href:data_editor.cdnURL+"/theme/"+data_editor.theme+".min.css",type:"text/css",media:"all"}),SPFTESTIMONIAL.vars.code_themes.push(data_editor.theme)}CodeMirror.modeURL=data_editor.cdnURL+"/mode/%N/%N.min.js",CodeMirror.autoLoadMode(code_editor,data_editor.mode),code_editor.on("change",(function(editor,event){$textarea.val(code_editor.getValue()).trigger("change")})),clearInterval(interval)}}))}}))},$.fn.spftestimonial_field_spinner=function(){return this.each((function(){var $this=$(this),$input=$this.find("input"),$inited=$this.find(".ui-spinner-button");$inited.length&&$inited.remove(),$input.spinner({max:$input.data("max")||100,min:$input.data("min")||0,step:$input.data("step")||1,spin:function(event,ui){$input.val(ui.value).trigger("change")}})}))},$.fn.spftestimonial_field_switcher=function(){return this.each((function(){var $switcher=$(this).find(".spftestimonial--switcher");$switcher.on("click",(function(){var value=0,$input=$switcher.find("input");$switcher.hasClass("spftestimonial--active")?$switcher.removeClass("spftestimonial--active"):(value=1,$switcher.addClass("spftestimonial--active")),$input.val(value).trigger("change")}))}))},$.fn.spftestimonial_field_typography=function(){return this.each((function(){var base=this,$this=$(this),loaded_fonts=[],webfonts=spftestimonial_typography_json.webfonts,googlestyles=spftestimonial_typography_json.googlestyles,defaultstyles=spftestimonial_typography_json.defaultstyles;base.sanitize_subset=function(subset){return subset=(subset=subset.replace("-ext"," Extended")).charAt(0).toUpperCase()+subset.slice(1)},base.sanitize_style=function(style){return googlestyles[style]?googlestyles[style]:style},base.load_google_font=function(font_family,weight,style){font_family&&"object"==typeof WebFont&&(weight=weight?weight.replace("normal",""):"",style=style?style.replace("normal",""):"",(weight||style)&&(font_family=font_family+":"+weight+style),-1===loaded_fonts.indexOf(font_family)&&WebFont.load({google:{families:[font_family]}}),loaded_fonts.push(font_family))},base.append_select_options=function($select,options,condition,type,is_multi){$select.find("option").not(":first").remove();var opts="";$.each(options,(function(key,value){var selected,name=value;selected=is_multi?condition&&-1!==condition.indexOf(value)?" selected":"":condition&&condition===value?" selected":"","subset"===type?name=base.sanitize_subset(value):"style"===type&&(name=base.sanitize_style(value)),opts+='<option value="'+value+'"'+selected+">"+name+"</option>"})),$select.append(opts).trigger("spftestimonial.change").trigger("chosen:updated")},base.init=function(){var selected_styles=[],$typography=$this.find(".spftestimonial--typography"),$type=$this.find(".spftestimonial--type"),unit=$typography.data("unit"),exclude_fonts=$typography.data("exclude")?$typography.data("exclude").split(","):[],$chosen_selects;$this.find(".spftestimonial--chosen").length&&$this.find("select").each((function(){var $chosen_select=$(this),$chosen_inited=$chosen_select.parent().find(".chosen-container");$chosen_inited.length&&$chosen_inited.remove(),$chosen_select.chosen({allow_single_deselect:!0,disable_search_threshold:15,width:"100%"})}));var $font_family_select=$this.find(".spftestimonial--font-family"),first_font_family=$font_family_select.val();$font_family_select.find("option").not(":first-child").remove();var opts="";$.each(webfonts,(function(type,group){exclude_fonts&&-1!==exclude_fonts.indexOf(type)||(opts+='<optgroup label="'+group.label+'">',$.each(group.fonts,(function(key,value){var selected;opts+='<option value="'+(value="object"==typeof value?key:value)+'" data-type="'+type+'"'+(value===first_font_family?" selected":"")+">"+value+"</option>"})),opts+="</optgroup>")})),$font_family_select.append(opts).trigger("chosen:updated");var $font_style_block=$this.find(".spftestimonial--block-font-style");if($font_style_block.length){var $font_style_select=$this.find(".spftestimonial--font-style-select"),first_style_value=$font_style_select.val()?$font_style_select.val().replace(/normal/g,""):"";$font_style_select.on("change spftestimonial.change",(function(event){var style_value=$font_style_select.val();!style_value&&selected_styles&&-1===selected_styles.indexOf("normal")&&(style_value=selected_styles[0]);var font_normal=style_value&&"italic"!==style_value&&"normal"===style_value?"normal":"",font_weight=style_value&&"italic"!==style_value&&"normal"!==style_value?style_value.replace("italic",""):font_normal,font_style=style_value&&"italic"===style_value.substr(-6)?"italic":"";$this.find(".spftestimonial--font-weight").val(font_weight),$this.find(".spftestimonial--font-style").val(font_style)}));var $extra_font_style_block=$this.find(".spftestimonial--block-extra-styles");if($extra_font_style_block.length)var $extra_font_style_select=$this.find(".spftestimonial--extra-styles"),first_extra_style_value=$extra_font_style_select.val()}var $subset_block=$this.find(".spftestimonial--block-subset");if($subset_block.length)var $subset_select=$this.find(".spftestimonial--subset"),first_subset_select_value=$subset_select.val(),subset_multi_select=$subset_select.data("multiple")||!1;var $backup_font_family_block=$this.find(".spftestimonial--block-backup-font-family");$font_family_select.on("change spftestimonial.change",(function(event){$subset_block.length&&$subset_block.addClass("hidden"),$extra_font_style_block.length&&$extra_font_style_block.addClass("hidden"),$backup_font_family_block.length&&$backup_font_family_block.addClass("hidden");var $selected=$font_family_select.find(":selected"),value=$selected.val(),type=$selected.data("type");if(type&&value){if("google"!==type&&"custom"!==type||!$backup_font_family_block.length||$backup_font_family_block.removeClass("hidden"),$font_style_block.length){var styles=defaultstyles;"google"===type&&webfonts[type].fonts[value][0]?styles=webfonts[type].fonts[value][0]:"custom"===type&&webfonts[type].fonts[value]&&(styles=webfonts[type].fonts[value]),selected_styles=styles;var set_auto_style=-1!==styles.indexOf("normal")?"normal":styles[0],set_style_value=first_style_value&&-1!==styles.indexOf(first_style_value)?first_style_value:set_auto_style;base.append_select_options($font_style_select,styles,set_style_value,"style"),first_style_value=!1,$font_style_block.removeClass("hidden"),"google"===type&&$extra_font_style_block.length&&styles.length>1&&(base.append_select_options($extra_font_style_select,styles,first_extra_style_value,"style",!0),first_extra_style_value=!1,$extra_font_style_block.removeClass("hidden"))}if("google"===type&&$subset_block.length&&webfonts[type].fonts[value][1]){var subsets=webfonts[type].fonts[value][1],set_auto_subset=subsets.length<2&&"latin"!==subsets[0]?subsets[0]:"",set_subset_value=first_subset_select_value&&-1!==subsets.indexOf(first_subset_select_value)?first_subset_select_value:set_auto_subset;set_subset_value=subset_multi_select&&first_subset_select_value?first_subset_select_value:set_subset_value,base.append_select_options($subset_select,subsets,set_subset_value,"subset",subset_multi_select),first_subset_select_value=!1,$subset_block.removeClass("hidden")}}else $subset_block.length&&($subset_select.find("option").not(":first-child").remove(),$subset_select.trigger("chosen:updated")),$font_style_block.length&&($font_style_select.find("option").not(":first-child").remove(),$font_style_select.trigger("chosen:updated"));$type.val(type)})).trigger("spftestimonial.change");var $preview_block=$this.find(".spftestimonial--block-preview");if($preview_block.length){var $preview=$this.find(".spftestimonial--preview");$this.on("change",SPFTESTIMONIAL.helper.debounce((function(event){$preview_block.removeClass("hidden");var font_family=$font_family_select.val(),font_weight=$this.find(".spftestimonial--font-weight").val(),font_style=$this.find(".spftestimonial--font-style").val(),font_size=$this.find(".spftestimonial--font-size").val(),font_variant=$this.find(".spftestimonial--font-variant").val(),line_height=$this.find(".spftestimonial--line-height").val(),text_align=$this.find(".spftestimonial--text-align").val(),text_transform=$this.find(".spftestimonial--text-transform").val(),text_decoration=$this.find(".spftestimonial--text-decoration").val(),text_color=$this.find(".spftestimonial--color").val(),word_spacing=$this.find(".spftestimonial--word-spacing").val(),letter_spacing=$this.find(".spftestimonial--letter-spacing").val(),custom_style=$this.find(".spftestimonial--custom-style").val(),type;"google"===$this.find(".spftestimonial--type").val()&&base.load_google_font(font_family,font_weight,font_style);var properties={};font_family&&(properties.fontFamily=font_family),font_weight&&(properties.fontWeight=font_weight),font_style&&(properties.fontStyle=font_style),font_variant&&(properties.fontVariant=font_variant),font_size&&(properties.fontSize=font_size+unit),line_height&&(properties.lineHeight=line_height+unit),letter_spacing&&(properties.letterSpacing=letter_spacing+unit),word_spacing&&(properties.wordSpacing=word_spacing+unit),text_align&&(properties.textAlign=text_align),text_transform&&(properties.textTransform=text_transform),text_decoration&&(properties.textDecoration=text_decoration),text_color&&(properties.color=text_color),$preview.removeAttr("style"),custom_style&&$preview.attr("style",custom_style),$preview.css(properties)}),100)),$preview_block.on("click",(function(){$preview.toggleClass("spftestimonial--black-background");var $toggle=$preview_block.find(".spftestimonial--toggle");$toggle.hasClass("fa-toggle-off")?$toggle.removeClass("fa-toggle-off").addClass("fa-toggle-on"):$toggle.removeClass("fa-toggle-on").addClass("fa-toggle-off")})),$preview_block.hasClass("hidden")||$this.trigger("change")}},base.init()}))},$.fn.spftestimonial_confirm=function(){return this.each((function(){$(this).on("click",(function(e){var confirm_text=$(this).data("confirm")||window.spftestimonial_vars.i18n.confirm,confirm_answer=confirm(confirm_text);if(SPFTESTIMONIAL.vars.is_confirm=!0,!confirm_answer)return e.preventDefault(),SPFTESTIMONIAL.vars.is_confirm=!1,!1}))}))},$.fn.serializeObject=function(){var obj={};return $.each(this.serializeArray(),(function(i,o){var n=o.name,v=o.value;obj[n]=void 0===obj[n]?v:$.isArray(obj[n])?obj[n].concat(v):[obj[n],v]})),obj},$.fn.spftestimonial_save=function(){return this.each((function(){var $this=$(this),$buttons=$(".spftestimonial-save"),$panel=$(".spftestimonial-options"),flooding=!1,timeout;$this.on("click",(function(e){if(!flooding){var $text=$this.data("save"),$value=$this.val();$buttons.attr("value",$text),$this.hasClass("spftestimonial-save-ajax")&&(e.preventDefault(),$panel.addClass("spftestimonial-saving"),$buttons.prop("disabled",!0),window.wp.ajax.post("spftestimonial_"+$panel.data("unique")+"_ajax_save",{data:$("#spftestimonial-form").serializeJSONSPFTESTIMONIAL()}).done((function(response){clearTimeout(timeout);var $result_success=$(".spftestimonial-form-success");$result_success.empty().append(response.notice).slideDown("fast",(function(){timeout=setTimeout((function(){$result_success.slideUp("fast")}),2e3)})),$(".spftestimonial-error").remove();var $append_errors=$(".spftestimonial-form-error");if($append_errors.empty().hide(),Object.keys(response.errors).length){var error_icon='<i class="spftestimonial-label-error spftestimonial-error">!</i>';$.each(response.errors,(function(key,error_message){var $field=$('[data-depend-id="'+key+'"]'),$link=$("#spftestimonial-tab-link-"+($field.closest(".spftestimonial-section").index()+1)),$tab=$link.closest(".spftestimonial-tab-depth-0");$field.closest(".spftestimonial-fieldset").append('<p class="spftestimonial-text-error spftestimonial-error">'+error_message+"</p>"),$link.find(".spftestimonial-error").length||$link.append(error_icon),$tab.find(".spftestimonial-arrow .spftestimonial-error").length||$tab.find(".spftestimonial-arrow").append(error_icon),console.log(error_message),$append_errors.append("<div>"+error_icon+" "+error_message+"</div>")})),$append_errors.show()}$panel.removeClass("spftestimonial-saving"),$buttons.prop("disabled",!1).attr("value",$value),flooding=!1})).fail((function(response){alert(response.error)})))}flooding=!0}))}))},$.fn.spftestimonial_taxonomy=function(){return this.each((function(){var $this=$(this),$form=$this.parents("form");if("addtag"===$form.attr("id")){var $submit=$form.find("#submit"),$cloned=$this.find(".spftestimonial-field").spftestimonial_clone();$submit.on("click",(function(){$form.find(".form-required").hasClass("form-invalid")||($this.data("inited",!1),$this.empty(),$this.html($cloned),$cloned=$cloned.spftestimonial_clone(),$this.spftestimonial_reload_script())}))}}))},$.fn.spftestimonial_shortcode=function(){var base=this;return base.shortcode_parse=function(serialize,key){var shortcode="";return $.each(serialize,(function(shortcode_key,shortcode_values){shortcode+="["+(key=key||shortcode_key),$.each(shortcode_values,(function(shortcode_tag,shortcode_value){"content"===shortcode_tag?(shortcode+="]",shortcode+=shortcode_value,shortcode+="[/"+key):shortcode+=base.shortcode_tags(shortcode_tag,shortcode_value)})),shortcode+="]"})),shortcode},base.shortcode_tags=function(shortcode_tag,shortcode_value){var shortcode="";return""!==shortcode_value&&("object"!=typeof shortcode_value||$.isArray(shortcode_value)?shortcode+=" "+shortcode_tag.replace("-","_")+'="'+shortcode_value.toString()+'"':$.each(shortcode_value,(function(sub_shortcode_tag,sub_shortcode_value){switch(sub_shortcode_tag){case"background-image":sub_shortcode_value=sub_shortcode_value.url?sub_shortcode_value.url:""}""!==sub_shortcode_value&&(shortcode+=" "+sub_shortcode_tag.replace("-","_")+'="'+sub_shortcode_value.toString()+'"')}))),shortcode},base.insertAtChars=function(_this,currentValue){var obj=void 0!==_this[0].name?_this[0]:_this;return obj.value.length&&void 0!==obj.selectionStart?(obj.focus(),obj.value.substring(0,obj.selectionStart)+currentValue+obj.value.substring(obj.selectionEnd,obj.value.length)):(obj.focus(),currentValue)},base.send_to_editor=function(html,editor_id){var tinymce_editor;if("undefined"!=typeof tinymce&&(tinymce_editor=tinymce.get(editor_id)),tinymce_editor&&!tinymce_editor.isHidden())tinymce_editor.execCommand("mceInsertContent",!1,html);else{var $editor=$("#"+editor_id);$editor.val(base.insertAtChars($editor,html)).trigger("change")}},this.each((function(){var $modal=$(this),$load=$modal.find(".spftestimonial-modal-load"),$content=$modal.find(".spftestimonial-modal-content"),$insert=$modal.find(".spftestimonial-modal-insert"),$loading=$modal.find(".spftestimonial-modal-loading"),$select=$modal.find("select"),modal_id=$modal.data("modal-id"),nonce=$modal.data("nonce"),editor_id,target_id,gutenberg_id,sc_key,sc_name,sc_view,sc_group,$cloned,$button;$(document).on("click",'.spftestimonial-shortcode-button[data-modal-id="'+modal_id+'"]',(function(e){e.preventDefault(),$button=$(this),editor_id=$button.data("editor-id")||!1,target_id=$button.data("target-id")||!1,gutenberg_id=$button.data("gutenberg-id")||!1,$modal.show(),$modal.hasClass("spftestimonial-shortcode-single")&&void 0===sc_name&&$select.trigger("change")})),$select.on("change",(function(){var $option=$(this),$selected=$option.find(":selected");sc_key=$option.val(),sc_name=$selected.data("shortcode"),sc_view=$selected.data("view")||"normal",sc_group=$selected.data("group")||sc_name,$load.empty(),sc_key?($loading.show(),window.wp.ajax.post("spftestimonial-get-shortcode-"+modal_id,{shortcode_key:sc_key,nonce:nonce}).done((function(response){$loading.hide();var $appended=$(response.content).appendTo($load);$insert.parent().removeClass("hidden"),$cloned=$appended.find(".spftestimonial--repeat-shortcode").spftestimonial_clone(),$appended.spftestimonial_reload_script(),$appended.find(".spftestimonial-fields").spftestimonial_reload_script()}))):$insert.parent().addClass("hidden")})),$insert.on("click",(function(e){e.preventDefault();var shortcode="",serialize=$modal.find(".spftestimonial-field:not(.hidden)").find(":input:not(.ignore)").serializeObjectSPFTESTIMONIAL();switch(sc_view){case"contents":var contentsObj=sc_name?serialize[sc_name]:serialize;$.each(contentsObj,(function(sc_key,sc_value){var sc_tag=sc_name||sc_key;shortcode+="["+sc_tag+"]"+sc_value+"[/"+sc_tag+"]"}));break;case"group":shortcode+="["+sc_name,$.each(serialize[sc_name],(function(sc_key,sc_value){shortcode+=base.shortcode_tags(sc_key,sc_value)})),shortcode+="]",shortcode+=base.shortcode_parse(serialize[sc_group],sc_group),shortcode+="[/"+sc_name+"]";break;case"repeater":shortcode+=base.shortcode_parse(serialize[sc_group],sc_group);break;default:shortcode+=base.shortcode_parse(serialize)}if(shortcode=""===shortcode?"["+sc_name+"]":shortcode,gutenberg_id){var content=window.spftestimonial_gutenberg_props.attributes.hasOwnProperty("shortcode")?window.spftestimonial_gutenberg_props.attributes.shortcode:"";window.spftestimonial_gutenberg_props.setAttributes({shortcode:content+shortcode})}else if(editor_id)base.send_to_editor(shortcode,editor_id);else{var $textarea=target_id?$(target_id):$button.parent().find("textarea");$textarea.val(base.insertAtChars($textarea,shortcode)).trigger("change")}$modal.hide()})),$modal.on("click",".spftestimonial--repeat-button",(function(e){e.preventDefault();var $repeatable=$modal.find(".spftestimonial--repeatable"),$new_clone=$cloned.spftestimonial_clone(),$remove_btn=$new_clone.find(".spftestimonial-repeat-remove"),$appended=$new_clone.appendTo($repeatable);$new_clone.find(".spftestimonial-fields").spftestimonial_reload_script(),SPFTESTIMONIAL.helper.name_nested_replace($modal.find(".spftestimonial--repeat-shortcode"),sc_group),$remove_btn.on("click",(function(){$new_clone.remove(),SPFTESTIMONIAL.helper.name_nested_replace($modal.find(".spftestimonial--repeat-shortcode"),sc_group)}))})),$modal.on("click",".spftestimonial-modal-close, .spftestimonial-modal-overlay",(function(){$modal.hide()}))}))},"function"==typeof Color&&(Color.fn.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var hex=parseInt(this._color,10).toString(16);if(this.error)return"";if(hex.length<6)for(var i=6-hex.length-1;i>=0;i--)hex="0"+hex;return"#"+hex}),SPFTESTIMONIAL.funcs.parse_color=function(color){var value=color.replace(/\s+/g,""),trans=-1!==value.indexOf("rgba")?parseFloat(100*value.replace(/^.*,(.+)\)/,"$1")):100,rgba;return{value:value,transparent:trans,rgba:trans<100}},$.fn.spftestimonial_color=function(){return this.each((function(){var $input=$(this),picker_color=SPFTESTIMONIAL.funcs.parse_color($input.val()),palette_color=!window.spftestimonial_vars.color_palette.length||window.spftestimonial_vars.color_palette,$container;$input.hasClass("wp-color-picker")&&$input.closest(".wp-picker-container").after($input).remove(),$input.wpColorPicker({palettes:palette_color,change:function(event,ui){var ui_color_value=ui.color.toString();$container.removeClass("spftestimonial--transparent-active"),$container.find(".spftestimonial--transparent-offset").css("background-color",ui_color_value),$input.val(ui_color_value).trigger("change")},create:function(){$container=$input.closest(".wp-picker-container");var a8cIris=$input.data("a8cIris"),$transparent_wrap=$('<div class="spftestimonial--transparent-wrap"><div class="spftestimonial--transparent-slider"></div><div class="spftestimonial--transparent-offset"></div><div class="spftestimonial--transparent-text"></div><div class="spftestimonial--transparent-button button button-small">transparent</div></div>').appendTo($container.find(".wp-picker-holder")),$transparent_slider=$transparent_wrap.find(".spftestimonial--transparent-slider"),$transparent_text=$transparent_wrap.find(".spftestimonial--transparent-text"),$transparent_offset=$transparent_wrap.find(".spftestimonial--transparent-offset"),$transparent_button=$transparent_wrap.find(".spftestimonial--transparent-button");"transparent"===$input.val()&&$container.addClass("spftestimonial--transparent-active"),$transparent_button.on("click",(function(){"transparent"!==$input.val()?($input.val("transparent").trigger("change").removeClass("iris-error"),$container.addClass("spftestimonial--transparent-active")):($input.val(a8cIris._color.toString()).trigger("change"),$container.removeClass("spftestimonial--transparent-active"))})),$transparent_slider.slider({value:picker_color.transparent,step:1,min:0,max:100,slide:function(event,ui){var slide_value=parseFloat(ui.value/100);a8cIris._color._alpha=slide_value,$input.wpColorPicker("color",a8cIris._color.toString()),$transparent_text.text(1===slide_value||0===slide_value?"":slide_value)},create:function(){var slide_value=parseFloat(picker_color.transparent/100),text_value=slide_value<1?slide_value:"";$transparent_text.text(text_value),$transparent_offset.css("background-color",picker_color.value),$container.on("click",".wp-picker-clear",(function(){a8cIris._color._alpha=1,$transparent_text.text(""),$transparent_slider.slider("option","value",100),$container.removeClass("spftestimonial--transparent-active"),$input.trigger("change")})),$container.on("click",".wp-picker-default",(function(){var default_color=SPFTESTIMONIAL.funcs.parse_color($input.data("default-color")),default_value=parseFloat(default_color.transparent/100),default_text=default_value<1?default_value:"";a8cIris._color._alpha=default_value,$transparent_text.text(default_text),$transparent_slider.slider("option","value",default_color.transparent)})),$container.on("click",".wp-color-result",(function(){$transparent_wrap.toggle()})),$("body").on("click.wpcolorpicker",(function(){$transparent_wrap.hide()}))}})}})}))},$.fn.spftestimonial_number=function(){return this.each((function(){$(this).on("keypress",(function(e){if(0!==e.keyCode&&8!==e.keyCode&&45!==e.keyCode&&46!==e.keyCode&&(e.keyCode<48||e.keyCode>57))return!1}))}))},$.fn.spftestimonial_chosen=function(){return this.each((function(){var $this=$(this),$inited=$this.parent().find(".chosen-container"),is_sortable=$this.hasClass("spftestimonial-chosen-sortable")||!1,is_ajax=$this.hasClass("spftestimonial-chosen-ajax")||!1,is_multiple=$this.attr("multiple")||!1,set_width=is_multiple?"100%":"auto",set_options=$.extend({allow_single_deselect:!0,disable_search_threshold:10,width:set_width,no_results_text:window.spftestimonial_vars.i18n.no_results_text},$this.data("chosen-settings"));if($inited.length&&$inited.remove(),is_ajax){var set_ajax_options=$.extend({data:{type:"post",nonce:""},allow_single_deselect:!0,disable_search_threshold:-1,width:"100%",min_length:3,type_delay:500,typing_text:window.spftestimonial_vars.i18n.typing_text,searching_text:window.spftestimonial_vars.i18n.searching_text,no_results_text:window.spftestimonial_vars.i18n.no_results_text},$this.data("chosen-settings"));$this.SPFTESTIMONIALAjaxChosen(set_ajax_options)}else $this.chosen(set_options);if(is_multiple){var $hidden_select=$this.parent().find(".spftestimonial-hidden-select"),$hidden_value=$hidden_select.val()||[];$this.on("change",(function(obj,result){result&&result.selected?$hidden_select.append('<option value="'+result.selected+'" selected="selected">'+result.selected+"</option>"):result&&result.deselected&&$hidden_select.find('option[value="'+result.deselected+'"]').remove(),0===$hidden_select.children().length&&void 0!==window.wp.customize&&window.wp.customize.control($hidden_select.data("customize-setting-link")).setting.set(""),$hidden_select.trigger("change")})),$this.SPFTESTIMONIALChosenOrder($hidden_value,!0)}if(is_sortable){var $chosen_container,$chosen_choices=$this.parent().find(".chosen-container").find(".chosen-choices");$chosen_choices.bind("mousedown",(function(event){$(event.target).is("span")&&event.stopPropagation()})),$chosen_choices.sortable({items:"li:not(.search-field)",helper:"orginal",cursor:"move",placeholder:"search-choice-placeholder",start:function(e,ui){ui.placeholder.width(ui.item.innerWidth()),ui.placeholder.height(ui.item.innerHeight())},update:function(e,ui){var select_options="",chosen_object=$this.data("chosen"),$prev_select=$this.parent().find(".spftestimonial-hidden-select");$chosen_choices.find(".search-choice-close").each((function(){var option_array_index=$(this).data("option-array-index");$.each(chosen_object.results_data,(function(index,data){data.array_index===option_array_index&&(select_options+='<option value="'+data.value+'" selected>'+data.value+"</option>")}))})),$prev_select.children().remove(),$prev_select.append(select_options),$prev_select.trigger("change")}})}}))},$.fn.spftestimonial_checkbox=function(){return this.each((function(){var $this=$(this),$input=$this.find(".spftestimonial--input"),$checkbox=$this.find(".spftestimonial--checkbox");$checkbox.on("click",(function(){$input.val(Number($checkbox.prop("checked"))).trigger("change")}))}))},$.fn.spftestimonial_siblings=function(){return this.each((function(){var $this=$(this),$siblings=$this.find(".spftestimonial--sibling"),multiple=$this.data("multiple")||!1;$siblings.on("click",(function(){var $sibling=$(this);multiple?$sibling.hasClass("spftestimonial--active")?($sibling.removeClass("spftestimonial--active"),$sibling.find("input").prop("checked",!1).trigger("change")):($sibling.addClass("spftestimonial--active"),$sibling.find("input").prop("checked",!0).trigger("change")):($this.find("input").prop("checked",!1),$sibling.find("input").prop("checked",!0).trigger("change"),$sibling.addClass("spftestimonial--active").siblings().removeClass("spftestimonial--active"))}))}))},$.fn.spftestimonial_help=function(){return this.each((function(){var $this=$(this),$tooltip,offset_left;$this.on({mouseenter:function(){$tooltip=$('<div class="spftestimonial-tooltip"></div>').html($this.find(".spftestimonial-help-text").html()).appendTo("body"),offset_left=SPFTESTIMONIAL.vars.is_rtl?$this.offset().left+24:$this.offset().left-$tooltip.outerWidth(),$tooltip.css({top:$this.offset().top-($tooltip.outerHeight()/2-14),left:offset_left})},mouseleave:function(){void 0!==$tooltip&&$tooltip.remove()}})}))},$.fn.spftestimonial_customizer_refresh=function(){return this.each((function(){var $this=$(this),$complex=$this.closest(".spftestimonial-customize-complex");if($complex.length){var $input=$complex.find(":input"),$unique=$complex.data("unique-id"),$option=$complex.data("option-id"),obj=$input.serializeObjectSPFTESTIMONIAL(),data=$.isEmptyObject(obj)?"":obj[$unique][$option],control=window.wp.customize.control($unique+"["+$option+"]");control.setting._value=null,control.setting.set(data)}else $this.find(":input").first().trigger("change");$(document).trigger("spftestimonial-customizer-refresh",$this)}))},$.fn.spftestimonial_customizer_listen=function(options){var settings=$.extend({closest:!1},options);return this.each((function(){if(void 0!==window.wp.customize){var $this=settings.closest?$(this).closest(".spftestimonial-customize-complex"):$(this),$input=$this.find(":input"),unique_id=$this.data("unique-id"),option_id=$this.data("option-id");void 0!==unique_id&&$input.on("change keyup",SPFTESTIMONIAL.helper.debounce((function(){var obj=$this.find(":input").serializeObjectSPFTESTIMONIAL();!$.isEmptyObject(obj)&&obj[unique_id]&&window.wp.customize.control(unique_id+"["+option_id+"]").setting.set(obj[unique_id][option_id])}),250))}}))},$(document).on("expanded",".control-section",(function(){var $this=$(this);if($this.hasClass("open")&&!$this.data("inited")){var $fields=$this.find(".spftestimonial-customize-field"),$complex=$this.find(".spftestimonial-customize-complex");$fields.length&&($this.spftestimonial_dependency(),$fields.spftestimonial_reload_script({dependency:!1}),$complex.spftestimonial_customizer_listen()),$this.data("inited",!0)}})),SPFTESTIMONIAL.vars.$window.on("resize spftestimonial.resize",SPFTESTIMONIAL.helper.debounce((function(event){var window_width;(navigator.userAgent.indexOf("AppleWebKit/")>-1?SPFTESTIMONIAL.vars.$window.width():window.innerWidth)<=782&&!SPFTESTIMONIAL.vars.onloaded&&($(".spftestimonial-section").spftestimonial_reload_script(),SPFTESTIMONIAL.vars.onloaded=!0)}),200)).trigger("spftestimonial.resize"),$.fn.spftestimonial_widgets=function(){this.length&&($(document).on("widget-added widget-updated",(function(event,$widget){$widget.find(".spftestimonial-fields").spftestimonial_reload_script()})),$(".widgets-sortables, .control-section-sidebar").on("sortstop",(function(event,ui){ui.item.find(".spftestimonial-fields").spftestimonial_reload_script_retry()})),$(document).on("click",".widget-top",(function(event){$(this).parent().find(".spftestimonial-fields").spftestimonial_reload_script()})))},$.fn.spftestimonial_reload_script_retry=function(){return this.each((function(){var $this=$(this);$this.data("inited")&&$this.children(".spftestimonial-field-wp_editor").spftestimonial_field_wp_editor()}))},$.fn.spftestimonial_reload_script=function(options){var settings=$.extend({dependency:!0},options);return this.each((function(){var $this=$(this);$this.data("inited")||($this.children(".spftestimonial-field-code_editor").spftestimonial_field_code_editor(),$this.children(".spftestimonial-field-spinner").spftestimonial_field_spinner(),$this.children(".spftestimonial-field-switcher").spftestimonial_field_switcher(),$this.children(".spftestimonial-field-typography").spftestimonial_field_typography(),$this.children(".spftestimonial-field-color").find(".spftestimonial-color").spftestimonial_color(),$this.children(".spftestimonial-field-color_group").find(".spftestimonial-color").spftestimonial_color(),$this.children(".spftestimonial-field-typography").find(".spftestimonial-color").spftestimonial_color(),$this.children(".spftestimonial-field-spacing").find(".spftestimonial-number").spftestimonial_number(),$this.children(".spftestimonial-field-spinner").find(".spftestimonial-number").spftestimonial_number(),$this.children(".spftestimonial-field-typography").find(".spftestimonial-number").spftestimonial_number(),$this.children(".spftestimonial-field-select").find(".spftestimonial-chosen").spftestimonial_chosen(),$this.children(".spftestimonial-field-checkbox").find(".spftestimonial-checkbox").spftestimonial_checkbox(),$this.children(".spftestimonial-field-button_set").find(".spftestimonial-siblings").spftestimonial_siblings(),$this.children(".spftestimonial-field-image_select").find(".spftestimonial-siblings").spftestimonial_siblings(),$this.children(".spftestimonial-field").find(".spftestimonial-help").spftestimonial_help(),settings.dependency&&$this.spftestimonial_dependency(),$this.data("inited",!0),$(document).trigger("spftestimonial-reload-script",$this))}))},$(document).ready((function(){$(".spftestimonial-save").spftestimonial_save(),$(".spftestimonial-confirm").spftestimonial_confirm(),$(".spftestimonial-nav-options").spftestimonial_nav_options(),$(".spftestimonial-nav-metabox").spftestimonial_nav_metabox(),$(".spftestimonial-expand-all").spftestimonial_expand_all(),$(".spftestimonial-search").spftestimonial_search(),$(".spftestimonial-sticky-header").spftestimonial_sticky(),$(".spftestimonial-taxonomy").spftestimonial_taxonomy(),$(".spftestimonial-shortcode").spftestimonial_shortcode(),$(".spftestimonial-page-templates").spftestimonial_page_templates(),$(".spftestimonial-post-formats").spftestimonial_post_formats(),$(".spftestimonial-onload").spftestimonial_reload_script(),$(".widget").spftestimonial_widgets()}))}(jQuery,window,document);
admin/views/tp-metabox/classes/abstract.class.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Abstract Class
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Abstract' ) ) {
11
+ abstract class SPFTESTIMONIAL_Abstract {
12
+
13
+ public $abstract = '';
14
+ public $output_css = '';
15
+ public $typographies = array();
16
+
17
+ public function __construct() {
18
+
19
+ // Check for embed custom css styles
20
+ if ( ! empty( $this->args['output_css'] ) ) {
21
+ add_action( 'wp_head', array( &$this, 'add_output_css' ), 100 );
22
+ }
23
+
24
+ }
25
+
26
+ public function add_output_css() {
27
+
28
+ $this->output_css = apply_filters( "spftestimonial_{$this->unique}_output_css", $this->output_css, $this );
29
+
30
+ if ( ! empty( $this->output_css ) ) {
31
+ echo '<style type="text/css">' . $this->output_css . '</style>';
32
+ }
33
+
34
+ }
35
+
36
+ }
37
+ }
admin/views/tp-metabox/classes/fields.class.php ADDED
@@ -0,0 +1,384 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Fields Class
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Fields' ) ) {
11
+ abstract class SPFTESTIMONIAL_Fields extends SPFTESTIMONIAL_Abstract {
12
+
13
+ public function __construct( $field = array(), $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ $this->field = $field;
15
+ $this->value = $value;
16
+ $this->unique = $unique;
17
+ $this->where = $where;
18
+ $this->parent = $parent;
19
+ }
20
+
21
+ public function field_name( $nested_name = '' ) {
22
+
23
+ $field_id = ( ! empty( $this->field['id'] ) ) ? $this->field['id'] : '';
24
+ $unique_id = ( ! empty( $this->unique ) ) ? $this->unique . '[' . $field_id . ']' : $field_id;
25
+ $field_name = ( ! empty( $this->field['name'] ) ) ? $this->field['name'] : $unique_id;
26
+ $tag_prefix = ( ! empty( $this->field['tag_prefix'] ) ) ? $this->field['tag_prefix'] : '';
27
+
28
+ if ( ! empty( $tag_prefix ) ) {
29
+ $nested_name = str_replace( '[', '[' . $tag_prefix, $nested_name );
30
+ }
31
+
32
+ return $field_name . $nested_name;
33
+
34
+ }
35
+
36
+ public function field_attributes( $custom_atts = array() ) {
37
+
38
+ $field_id = ( ! empty( $this->field['id'] ) ) ? $this->field['id'] : '';
39
+ $attributes = ( ! empty( $this->field['attributes'] ) ) ? $this->field['attributes'] : array();
40
+
41
+ if ( ! empty( $field_id ) ) {
42
+ $attributes['data-depend-id'] = $field_id;
43
+ }
44
+
45
+ if ( ! empty( $this->field['placeholder'] ) ) {
46
+ $attributes['placeholder'] = $this->field['placeholder'];
47
+ }
48
+
49
+ $attributes = wp_parse_args( $attributes, $custom_atts );
50
+
51
+ $atts = '';
52
+
53
+ if ( ! empty( $attributes ) ) {
54
+ foreach ( $attributes as $key => $value ) {
55
+ if ( $value === 'only-key' ) {
56
+ $atts .= ' ' . $key;
57
+ } else {
58
+ $atts .= ' ' . $key . '="' . $value . '"';
59
+ }
60
+ }
61
+ }
62
+
63
+ return $atts;
64
+
65
+ }
66
+
67
+ public function field_before() {
68
+ return ( ! empty( $this->field['before'] ) ) ? $this->field['before'] : '';
69
+ }
70
+
71
+ public function field_after() {
72
+
73
+ $output = ( ! empty( $this->field['after'] ) ) ? $this->field['after'] : '';
74
+ $output .= ( ! empty( $this->field['desc'] ) ) ? '<p class="spftestimonial-text-desc">' . $this->field['desc'] . '</p>' : '';
75
+ $output .= ( ! empty( $this->field['help'] ) ) ? '<span class="spftestimonial-help"><span class="spftestimonial-help-text">' . $this->field['help'] . '</span><span class="fa fa-question-circle"></span></span>' : '';
76
+ $output .= ( ! empty( $this->field['_error'] ) ) ? '<p class="spftestimonial-text-error">' . $this->field['_error'] . '</p>' : '';
77
+
78
+ return $output;
79
+
80
+ }
81
+
82
+ public static function field_data( $type = '', $term = false, $query_args = array() ) {
83
+
84
+ $options = array();
85
+ $array_search = false;
86
+
87
+ // sanitize type name.
88
+ if ( in_array( $type, array( 'page', 'pages' ) ) ) {
89
+ $option = 'page';
90
+ } elseif ( in_array( $type, array( 'post', 'posts' ) ) ) {
91
+ $option = 'post';
92
+ } elseif ( in_array( $type, array( 'category', 'categories' ) ) ) {
93
+ $option = 'category';
94
+ } elseif ( in_array( $type, array( 'tag', 'tags' ) ) ) {
95
+ $option = 'post_tag';
96
+ } elseif ( in_array( $type, array( 'menu', 'menus' ) ) ) {
97
+ $option = 'nav_menu';
98
+ } else {
99
+ $option = '';
100
+ }
101
+
102
+ // switch type.
103
+ switch ( $type ) {
104
+
105
+ case 'page':
106
+ case 'pages':
107
+ case 'post':
108
+ case 'posts':
109
+ // term query required for ajax select.
110
+ if ( ! empty( $term ) ) {
111
+
112
+ $query = new WP_Query(
113
+ wp_parse_args(
114
+ $query_args, array(
115
+ 's' => $term,
116
+ 'post_type' => $option,
117
+ 'post_status' => 'publish',
118
+ 'posts_per_page' => 25,
119
+ )
120
+ )
121
+ );
122
+
123
+ } else {
124
+
125
+ $query = new WP_Query(
126
+ wp_parse_args(
127
+ $query_args, array(
128
+ 'post_type' => $option,
129
+ 'post_status' => 'publish',
130
+ )
131
+ )
132
+ );
133
+
134
+ }
135
+
136
+ if ( ! is_wp_error( $query ) && ! empty( $query->posts ) ) {
137
+ foreach ( $query->posts as $item ) {
138
+ $options[ $item->ID ] = $item->post_title;
139
+ }
140
+ }
141
+
142
+ break;
143
+
144
+ case 'category':
145
+ case 'categories':
146
+ case 'tag':
147
+ case 'tags':
148
+ case 'menu':
149
+ case 'menus':
150
+ if ( ! empty( $term ) ) {
151
+
152
+ $query = new WP_Term_Query(
153
+ wp_parse_args(
154
+ $query_args, array(
155
+ 'search' => $term,
156
+ 'taxonomy' => $option,
157
+ 'hide_empty' => false,
158
+ 'number' => 25,
159
+ )
160
+ )
161
+ );
162
+
163
+ } else {
164
+
165
+ $query = new WP_Term_Query(
166
+ wp_parse_args(
167
+ $query_args, array(
168
+ 'taxonomy' => $option,
169
+ 'hide_empty' => false,
170
+ )
171
+ )
172
+ );
173
+
174
+ }
175
+
176
+ if ( ! is_wp_error( $query ) && ! empty( $query->terms ) ) {
177
+ foreach ( $query->terms as $item ) {
178
+ $options[ $item->term_id ] = $item->name;
179
+ }
180
+ }
181
+
182
+ break;
183
+
184
+ case 'user':
185
+ case 'users':
186
+ if ( ! empty( $term ) ) {
187
+
188
+ $query = new WP_User_Query(
189
+ array(
190
+ 'search' => '*' . $term . '*',
191
+ 'number' => 25,
192
+ 'orderby' => 'title',
193
+ 'order' => 'ASC',
194
+ 'fields' => array( 'display_name', 'ID' ),
195
+ )
196
+ );
197
+
198
+ } else {
199
+
200
+ $query = new WP_User_Query( array( 'fields' => array( 'display_name', 'ID' ) ) );
201
+
202
+ }
203
+
204
+ if ( ! is_wp_error( $query ) && ! empty( $query->get_results() ) ) {
205
+ foreach ( $query->get_results() as $item ) {
206
+ $options[ $item->ID ] = $item->display_name;
207
+ }
208
+ }
209
+
210
+ break;
211
+
212
+ case 'sidebar':
213
+ case 'sidebars':
214
+ global $wp_registered_sidebars;
215
+
216
+ if ( ! empty( $wp_registered_sidebars ) ) {
217
+ foreach ( $wp_registered_sidebars as $sidebar ) {
218
+ $options[ $sidebar['id'] ] = $sidebar['name'];
219
+ }
220
+ }
221
+
222
+ $array_search = true;
223
+
224
+ break;
225
+
226
+ case 'role':
227
+ case 'roles':
228
+ global $wp_roles;
229
+
230
+ if ( ! empty( $wp_roles ) ) {
231
+ if ( ! empty( $wp_roles->roles ) ) {
232
+ foreach ( $wp_roles->roles as $role_key => $role_value ) {
233
+ $options[ $role_key ] = $role_value['name'];
234
+ }
235
+ }
236
+ }
237
+
238
+ $array_search = true;
239
+
240
+ break;
241
+
242
+ case 'post_type':
243
+ case 'post_types':
244
+ $post_types = get_post_types( array( 'show_in_nav_menus' => true ) );
245
+
246
+ if ( ! is_wp_error( $post_types ) && ! empty( $post_types ) ) {
247
+ foreach ( $post_types as $post_type ) {
248
+ $options[ $post_type ] = ucfirst( $post_type );
249
+ }
250
+ }
251
+
252
+ $array_search = true;
253
+
254
+ break;
255
+
256
+ default:
257
+ if ( function_exists( $type ) ) {
258
+ if ( ! empty( $term ) ) {
259
+ $options = call_user_func( $type, $query_args );
260
+ } else {
261
+ $options = call_user_func( $type, $term, $query_args );
262
+ }
263
+ }
264
+
265
+ break;
266
+
267
+ }
268
+
269
+ // Array search by "term"
270
+ if ( ! empty( $term ) && ! empty( $options ) && ! empty( $array_search ) ) {
271
+ $options = preg_grep( '/' . $term . '/i', $options );
272
+ }
273
+
274
+ // Make multidimensional array for ajax search
275
+ if ( ! empty( $term ) && ! empty( $options ) ) {
276
+ $arr = array();
277
+ foreach ( $options as $option_key => $option_value ) {
278
+ $arr[] = array(
279
+ 'value' => $option_key,
280
+ 'text' => $option_value,
281
+ );
282
+ }
283
+ $options = $arr;
284
+ }
285
+
286
+ return $options;
287
+
288
+ }
289
+
290
+ public function field_wp_query_data_title( $type, $values ) {
291
+
292
+ $options = array();
293
+
294
+ if ( ! empty( $values ) && is_array( $values ) ) {
295
+
296
+ foreach ( $values as $value ) {
297
+
298
+ switch ( $type ) {
299
+
300
+ case 'post':
301
+ case 'posts':
302
+ case 'page':
303
+ case 'pages':
304
+ $title = get_the_title( $value );
305
+
306
+ if ( ! is_wp_error( $title ) && ! empty( $title ) ) {
307
+ $options[ $value ] = $title;
308
+ }
309
+
310
+ break;
311
+
312
+ case 'category':
313
+ case 'categories':
314
+ case 'tag':
315
+ case 'tags':
316
+ case 'menu':
317
+ case 'menus':
318
+ $term = get_term( $value );
319
+
320
+ if ( ! is_wp_error( $term ) && ! empty( $term ) ) {
321
+ $options[ $value ] = $term->name;
322
+ }
323
+
324
+ break;
325
+
326
+ case 'user':
327
+ case 'users':
328
+ $user = get_user_by( 'id', $value );
329
+
330
+ if ( ! is_wp_error( $user ) && ! empty( $user ) ) {
331
+ $options[ $value ] = $user->display_name;
332
+ }
333
+
334
+ break;
335
+
336
+ case 'sidebar':
337
+ case 'sidebars':
338
+ global $wp_registered_sidebars;
339
+
340
+ if ( ! empty( $wp_registered_sidebars[ $value ] ) ) {
341
+ $options[ $value ] = $wp_registered_sidebars[ $value ]['name'];
342
+ }
343
+
344
+ break;
345
+
346
+ case 'role':
347
+ case 'roles':
348
+ global $wp_roles;
349
+
350
+ if ( ! empty( $wp_roles ) && ! empty( $wp_roles->roles ) && ! empty( $wp_roles->roles[ $value ] ) ) {
351
+ $options[ $value ] = $wp_roles->roles[ $value ]['name'];
352
+ }
353
+
354
+ break;
355
+
356
+ case 'post_type':
357
+ case 'post_types':
358
+ $post_types = get_post_types( array( 'show_in_nav_menus' => true ) );
359
+
360
+ if ( ! is_wp_error( $post_types ) && ! empty( $post_types ) && ! empty( $post_types[ $value ] ) ) {
361
+ $options[ $value ] = ucfirst( $value );
362
+ }
363
+
364
+ break;
365
+
366
+ default:
367
+ if ( function_exists( $type . '_title' ) ) {
368
+ $options[ $value ] = call_user_func( $type . '_title', $value );
369
+ } else {
370
+ $options[ $value ] = ucfist( $value );
371
+ }
372
+
373
+ break;
374
+
375
+ }
376
+ }
377
+ }
378
+
379
+ return $options;
380
+
381
+ }
382
+
383
+ }
384
+ }
admin/views/tp-metabox/classes/metabox.class.php ADDED
@@ -0,0 +1,444 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Metabox Class
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Metabox' ) ) {
11
+ class SPFTESTIMONIAL_Metabox extends SPFTESTIMONIAL_Abstract {
12
+
13
+ // constans
14
+ public $unique = '';
15
+ public $abstract = 'metabox';
16
+ public $pre_fields = array();
17
+ public $sections = array();
18
+ public $post_type = array();
19
+ public $args = array(
20
+ 'title' => '',
21
+ 'post_type' => 'post',
22
+ 'data_type' => 'serialize',
23
+ 'context' => 'advanced',
24
+ 'priority' => 'default',
25
+ 'exclude_post_types' => array(),
26
+ 'page_templates' => '',
27
+ 'post_formats' => '',
28
+ 'show_restore' => false,
29
+ 'enqueue_webfont' => true,
30
+ 'async_webfont' => false,
31
+ 'output_css' => true,
32
+ 'theme' => 'dark',
33
+ 'class' => '',
34
+ 'defaults' => array(),
35
+ );
36
+
37
+ // run metabox construct
38
+ public function __construct( $key, $params = array() ) {
39
+
40
+ $this->unique = $key;
41
+ $this->args = apply_filters( "spftestimonial_{$this->unique}_args", wp_parse_args( $params['args'], $this->args ), $this );
42
+ $this->sections = apply_filters( "spftestimonial_{$this->unique}_sections", $params['sections'], $this );
43
+ $this->post_type = ( is_array( $this->args['post_type'] ) ) ? $this->args['post_type'] : array_filter( (array) $this->args['post_type'] );
44
+ $this->post_formats = ( is_array( $this->args['post_formats'] ) ) ? $this->args['post_formats'] : array_filter( (array) $this->args['post_formats'] );
45
+ $this->page_templates = ( is_array( $this->args['page_templates'] ) ) ? $this->args['page_templates'] : array_filter( (array) $this->args['page_templates'] );
46
+ $this->pre_fields = $this->pre_fields( $this->sections );
47
+
48
+ add_action( 'add_meta_boxes', array( &$this, 'add_meta_box' ) );
49
+ add_action( 'save_post', array( &$this, 'save_meta_box' ) );
50
+ add_action( 'edit_attachment', array( &$this, 'save_meta_box' ) );
51
+
52
+ if ( ! empty( $this->page_templates ) || ! empty( $this->post_formats ) || ! empty( $this->args['class'] ) ) {
53
+ foreach ( $this->post_type as $post_type ) {
54
+ add_filter( 'postbox_classes_' . $post_type . '_' . $this->unique, array( &$this, 'add_metabox_classes' ) );
55
+ }
56
+ }
57
+
58
+ // wp enqeueu for typography and output css
59
+ parent::__construct();
60
+
61
+ }
62
+
63
+ // instance
64
+ public static function instance( $key, $params = array() ) {
65
+ return new self( $key, $params );
66
+ }
67
+
68
+ public function pre_fields( $sections ) {
69
+
70
+ $result = array();
71
+
72
+ foreach ( $sections as $key => $section ) {
73
+ if ( ! empty( $section['fields'] ) ) {
74
+ foreach ( $section['fields'] as $field ) {
75
+ $result[] = $field;
76
+ }
77
+ }
78
+ }
79
+
80
+ return $result;
81
+ }
82
+
83
+ public function add_metabox_classes( $classes ) {
84
+
85
+ global $post;
86
+
87
+ if ( ! empty( $this->post_formats ) ) {
88
+
89
+ $saved_post_format = ( is_object( $post ) ) ? get_post_format( $post ) : false;
90
+ $saved_post_format = ( ! empty( $saved_post_format ) ) ? $saved_post_format : 'default';
91
+
92
+ $classes[] = 'spftestimonial-post-formats';
93
+
94
+ // Sanitize post format for standard to default
95
+ if ( ( $key = array_search( 'standard', $this->post_formats ) ) !== false ) {
96
+ $this->post_formats[ $key ] = 'default';
97
+ }
98
+
99
+ foreach ( $this->post_formats as $format ) {
100
+ $classes[] = 'spftestimonial-post-format-' . $format;
101
+ }
102
+
103
+ if ( ! in_array( $saved_post_format, $this->post_formats ) ) {
104
+ $classes[] = 'spftestimonial-hide';
105
+ } else {
106
+ $classes[] = 'spftestimonial-show';
107
+ }
108
+ }
109
+
110
+ if ( ! empty( $this->page_templates ) ) {
111
+
112
+ $saved_template = ( is_object( $post ) && ! empty( $post->page_template ) ) ? $post->page_template : 'default';
113
+
114
+ $classes[] = 'spftestimonial-page-templates';
115
+
116
+ foreach ( $this->page_templates as $template ) {
117
+ $classes[] = 'spftestimonial-page-' . preg_replace( '/[^a-zA-Z0-9]+/', '-', strtolower( $template ) );
118
+ }
119
+
120
+ if ( ! in_array( $saved_template, $this->page_templates ) ) {
121
+ $classes[] = 'spftestimonial-hide';
122
+ } else {
123
+ $classes[] = 'spftestimonial-show';
124
+ }
125
+ }
126
+
127
+ if ( ! empty( $this->args['class'] ) ) {
128
+ $classes[] = $this->args['class'];
129
+ }
130
+
131
+ return $classes;
132
+
133
+ }
134
+
135
+ // add metabox
136
+ public function add_meta_box( $post_type ) {
137
+
138
+ if ( ! in_array( $post_type, $this->args['exclude_post_types'] ) ) {
139
+ add_meta_box( $this->unique, $this->args['title'], array( &$this, 'add_meta_box_content' ), $this->post_type, $this->args['context'], $this->args['priority'], $this->args );
140
+ }
141
+
142
+ }
143
+
144
+ // get default value
145
+ public function get_default( $field ) {
146
+
147
+ $default = ( isset( $field['id'] ) && isset( $this->args['defaults'][ $field['id'] ] ) ) ? $this->args['defaults'][ $field['id'] ] : null;
148
+ $default = ( isset( $field['default'] ) ) ? $field['default'] : $default;
149
+
150
+ return $default;
151
+
152
+ }
153
+
154
+ // get meta value
155
+ public function get_meta_value( $field ) {
156
+
157
+ global $post;
158
+
159
+ $value = null;
160
+
161
+ if ( is_object( $post ) && ! empty( $field['id'] ) ) {
162
+
163
+ if ( $this->args['data_type'] !== 'serialize' ) {
164
+ $meta = get_post_meta( $post->ID, $field['id'] );
165
+ $value = ( isset( $meta[0] ) ) ? $meta[0] : null;
166
+ } else {
167
+ $meta = get_post_meta( $post->ID, $this->unique, true );
168
+ $value = ( isset( $meta[ $field['id'] ] ) ) ? $meta[ $field['id'] ] : null;
169
+ }
170
+ }
171
+
172
+ $default = $this->get_default( $field );
173
+ $value = ( isset( $value ) ) ? $value : $default;
174
+
175
+ return $value;
176
+
177
+ }
178
+
179
+ // add metabox content
180
+ public function add_meta_box_content( $post, $callback ) {
181
+
182
+ global $post;
183
+
184
+ $has_nav = ( count( $this->sections ) > 1 && $this->args['context'] !== 'side' ) ? true : false;
185
+ $show_all = ( ! $has_nav ) ? ' spftestimonial-show-all' : '';
186
+ $errors = ( is_object( $post ) ) ? get_post_meta( $post->ID, '_spftestimonial_errors', true ) : array();
187
+ $errors = ( ! empty( $errors ) ) ? $errors : array();
188
+ $theme = ( $this->args['theme'] ) ? ' spftestimonial-theme-' . $this->args['theme'] : '';
189
+
190
+ if ( is_object( $post ) && ! empty( $errors ) ) {
191
+ delete_post_meta( $post->ID, '_spftestimonial_errors' );
192
+ }
193
+
194
+ wp_nonce_field( 'spftestimonial_metabox_nonce', 'spftestimonial_metabox_nonce' . $this->unique );
195
+
196
+ echo '<div class="spftestimonial spftestimonial-metabox' . $theme . '">';
197
+
198
+ $current_screen = get_current_screen();
199
+ $the_current_post_type = $current_screen->post_type;
200
+ if ( $the_current_post_type == 'sp_tfree_shortcodes' ) {
201
+ ?>
202
+ <div class="sp-tpro-banner">
203
+ <div class="sp-tpro-logo"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/testimonial-logo.png'; ?>" alt="Testimonial Pro"></div>
204
+ <div class="sp-tpro-short-links">
205
+ <a href="https://shapedplugin.com/support-forum/" target="_blank"><i class="fa fa-life-ring"></i>Support</a>
206
+ </div>
207
+ </div>
208
+ <div class="tpro_shortcode text-center">
209
+ <div class="tpro-col-lg-3">
210
+ <div class="tpro_shortcode_content">
211
+ <h2 class="tpro-shortcode-title">
212
+ <?php
213
+ _e( 'Shortcode', 'testimonial-free' );
214
+ ?>
215
+ </h2>
216
+ <p><?php _e( 'Copy and paste this shortcode into your posts or pages:', 'testimonial-free' ); ?></p>
217
+ <div class="tpro-sc-code selectable" >[sp_testimonial
218
+ <?php
219
+ echo 'id="' . $post->ID . '"';
220
+ ?>
221
+ ]</div>
222
+ </div>
223
+ </div>
224
+ <div class="tpro-col-lg-3">
225
+ <div class="tpro_shortcode_content">
226
+ <h2 class="tpro-shortcode-title">
227
+ <?php
228
+ _e( 'Template Include', 'testimonial-free' );
229
+ ?>
230
+ </h2>
231
+ <p><?php _e( 'Paste the PHP code into your template file:', 'testimonial-free' ); ?></p>
232
+ <div class="tpro-sc-code selectable">
233
+ &lt;?php echo do_shortcode('[sp_testimonial id="<?php echo $post->ID; ?>"]');
234
+ ?&gt;</div>
235
+ </div>
236
+ </div>
237
+ <div class="tpro-col-lg-3">
238
+ <div class="tpro_shortcode_content">
239
+ <h2 class="tpro-shortcode-title">
240
+ <?php
241
+ _e( 'Post or Page editor', 'testimonial-free' );
242
+ ?>
243
+ </h2>
244
+ <p><?php _e( 'Insert the shortcode with the TinyMCE button:', 'testimonial-free' ); ?></p>
245
+ <img class="back-image" src="<?php echo SP_TFREE_URL . 'admin/views/tp-metabox/assets/images/tpro-tiny-mce.png'; ?>" alt="">
246
+ </div>
247
+ </div>
248
+ </div>
249
+ <div class="sp-testimonial-shortcode-divider"></div>
250
+ <?php
251
+ }
252
+ echo '<div class="spftestimonial-wrapper' . $show_all . '">';
253
+
254
+ if ( $has_nav ) {
255
+
256
+ echo '<div class="spftestimonial-nav spftestimonial-nav-metabox" data-unique="' . $this->unique . '">';
257
+
258
+ echo '<ul>';
259
+ $tab_key = 1;
260
+ foreach ( $this->sections as $section ) {
261
+
262
+ $tab_error = ( ! empty( $errors['sections'][ $tab_key ] ) ) ? '<i class="spftestimonial-label-error spftestimonial-error">!</i>' : '';
263
+ $tab_icon = ( ! empty( $section['icon'] ) ) ? '<i class="spftestimonial-icon ' . $section['icon'] . '"></i>' : '';
264
+
265
+ echo '<li><a href="#" data-section="' . $this->unique . '_' . $tab_key . '">' . $tab_icon . $section['title'] . $tab_error . '</a></li>';
266
+
267
+ $tab_key++;
268
+ }
269
+ echo '</ul>';
270
+
271
+ echo '</div>';
272
+
273
+ }
274
+
275
+ echo '<div class="spftestimonial-content">';
276
+
277
+ echo '<div class="spftestimonial-sections">';
278
+
279
+ $section_key = 1;
280
+
281
+ foreach ( $this->sections as $section ) {
282
+
283
+ $onload = ( ! $has_nav ) ? ' spftestimonial-onload' : '';
284
+
285
+ echo '<div id="spftestimonial-section-' . $this->unique . '_' . $section_key . '" class="spftestimonial-section' . $onload . '">';
286
+
287
+ $section_icon = ( ! empty( $section['icon'] ) ) ? '<i class="spftestimonial-icon ' . $section['icon'] . '"></i>' : '';
288
+ $section_title = ( ! empty( $section['title'] ) ) ? $section['title'] : '';
289
+
290
+ echo ( $section_title || $section_icon ) ? '<div class="spftestimonial-section-title"><h3>' . $section_icon . $section_title . '</h3></div>' : '';
291
+
292
+ if ( ! empty( $section['fields'] ) ) {
293
+
294
+ foreach ( $section['fields'] as $field ) {
295
+
296
+ if ( ! empty( $field['id'] ) && ! empty( $errors['fields'][ $field['id'] ] ) ) {
297
+ $field['_error'] = $errors['fields'][ $field['id'] ];
298
+ }
299
+
300
+ SPFTESTIMONIAL::field( $field, $this->get_meta_value( $field ), $this->unique, 'metabox' );
301
+
302
+ }
303
+ } else {
304
+
305
+ echo '<div class="spftestimonial-no-option spftestimonial-text-muted">' . esc_html__( 'No option provided by developer.', 'testimonial-free' ) . '</div>';
306
+
307
+ }
308
+
309
+ echo '</div>';
310
+
311
+ $section_key++;
312
+ }
313
+
314
+ echo '</div>';
315
+
316
+ echo '<div class="clear"></div>';
317
+
318
+ if ( ! empty( $this->args['show_restore'] ) ) {
319
+
320
+ echo '<div class=" spftestimonial-metabox-restore">';
321
+ echo '<label>';
322
+ echo '<input type="checkbox" name="' . $this->unique . '[_restore]" />';
323
+ echo '<span class="button spftestimonial-button-restore">' . esc_html__( 'Restore', 'testimonial-free' ) . '</span>';
324
+ echo '<span class="button spftestimonial-button-cancel">' . sprintf( '<small>( %s )</small> %s', esc_html__( 'update post for restore ', 'testimonial-free' ), esc_html__( 'Cancel', 'testimonial-free' ) ) . '</span>';
325
+ echo '</label>';
326
+ echo '</div>';
327
+
328
+ }
329
+
330
+ echo '</div>';
331
+
332
+ echo ( $has_nav ) ? '<div class="spftestimonial-nav-background"></div>' : '';
333
+
334
+ echo '<div class="clear"></div>';
335
+
336
+ echo '</div>';
337
+
338
+ echo '</div>';
339
+
340
+ }
341
+
342
+ // save metabox
343
+ public function save_meta_box( $post_id ) {
344
+
345
+ if ( ! wp_verify_nonce( spftestimonial_get_var( 'spftestimonial_metabox_nonce' . $this->unique ), 'spftestimonial_metabox_nonce' ) ) {
346
+ return $post_id;
347
+ }
348
+
349
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
350
+ return $post_id;
351
+ }
352
+
353
+ $errors = array();
354
+ $request = spftestimonial_get_var( $this->unique );
355
+
356
+ if ( ! empty( $request ) ) {
357
+
358
+ // ignore _nonce
359
+ if ( isset( $request['_nonce'] ) ) {
360
+ unset( $request['_nonce'] );
361
+ }
362
+
363
+ // sanitize and validate
364
+ $section_key = 1;
365
+ foreach ( $this->sections as $section ) {
366
+
367
+ if ( ! empty( $section['fields'] ) ) {
368
+
369
+ foreach ( $section['fields'] as $field ) {
370
+
371
+ if ( ! empty( $field['id'] ) ) {
372
+
373
+ // sanitize
374
+ if ( ! empty( $field['sanitize'] ) ) {
375
+
376
+ $sanitize = $field['sanitize'];
377
+ $value_sanitize = isset( $request[ $field['id'] ] ) ? $request[ $field['id'] ] : '';
378
+ $request[ $field['id'] ] = call_user_func( $sanitize, $value_sanitize );
379
+
380
+ }
381
+
382
+ // validate
383
+ if ( ! empty( $field['validate'] ) ) {
384
+
385
+ $validate = $field['validate'];
386
+ $value_validate = isset( $request[ $field['id'] ] ) ? $request[ $field['id'] ] : '';
387
+ $has_validated = call_user_func( $validate, $value_validate );
388
+
389
+ if ( ! empty( $has_validated ) ) {
390
+
391
+ $errors['sections'][ $section_key ] = true;
392
+ $errors['fields'][ $field['id'] ] = $has_validated;
393
+ $request[ $field['id'] ] = $this->get_meta_value( $field );
394
+
395
+ }
396
+ }
397
+
398
+ // auto sanitize
399
+ if ( ! isset( $request[ $field['id'] ] ) || is_null( $request[ $field['id'] ] ) ) {
400
+ $request[ $field['id'] ] = '';
401
+ }
402
+ }
403
+ }
404
+ }
405
+
406
+ $section_key++;
407
+ }
408
+ }
409
+
410
+ $request = apply_filters( "spftestimonial_{$this->unique}_save", $request, $post_id, $this );
411
+
412
+ do_action( "spftestimonial_{$this->unique}_save_before", $request, $post_id, $this );
413
+
414
+ if ( empty( $request ) || ! empty( $request['_restore'] ) ) {
415
+
416
+ if ( $this->args['data_type'] !== 'serialize' ) {
417
+ foreach ( $request as $key => $value ) {
418
+ delete_post_meta( $post_id, $key );
419
+ }
420
+ } else {
421
+ delete_post_meta( $post_id, $this->unique );
422
+ }
423
+ } else {
424
+
425
+ if ( $this->args['data_type'] !== 'serialize' ) {
426
+ foreach ( $request as $key => $value ) {
427
+ update_post_meta( $post_id, $key, $value );
428
+ }
429
+ } else {
430
+ update_post_meta( $post_id, $this->unique, $request );
431
+ }
432
+
433
+ if ( ! empty( $errors ) ) {
434
+ update_post_meta( $post_id, '_spftestimonial_errors', $errors );
435
+ }
436
+ }
437
+
438
+ do_action( "spftestimonial_{$this->unique}_saved", $request, $post_id, $this );
439
+
440
+ do_action( "spftestimonial_{$this->unique}_save_after", $request, $post_id, $this );
441
+
442
+ }
443
+ }
444
+ }
admin/views/tp-metabox/classes/options.class.php ADDED
@@ -0,0 +1,700 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Options Class
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Options' ) ) {
11
+ class SPFTESTIMONIAL_Options extends SPFTESTIMONIAL_Abstract {
12
+
13
+ // constans
14
+ public $unique = '';
15
+ public $notice = '';
16
+ public $abstract = 'options';
17
+ public $sections = array();
18
+ public $options = array();
19
+ public $errors = array();
20
+ public $pre_tabs = array();
21
+ public $pre_fields = array();
22
+ public $pre_sections = array();
23
+ public $args = array(
24
+
25
+ // framework title
26
+ 'framework_title' => 'Codestar Framework <small>by Codestar</small>',
27
+ 'framework_class' => '',
28
+
29
+ // menu settings
30
+ 'menu_title' => '',
31
+ 'menu_slug' => '',
32
+ 'menu_type' => 'menu',
33
+ 'menu_capability' => 'manage_options',
34
+ 'menu_icon' => null,
35
+ 'menu_position' => null,
36
+ 'menu_hidden' => false,
37
+ 'menu_parent' => '',
38
+
39
+ // menu extras
40
+ 'show_bar_menu' => true,
41
+ 'show_sub_menu' => true,
42
+ 'show_network_menu' => true,
43
+ 'show_in_customizer' => false,
44
+
45
+ 'show_search' => true,
46
+ 'show_reset_all' => true,
47
+ 'show_reset_section' => true,
48
+ 'show_footer' => true,
49
+ 'show_all_options' => true,
50
+ 'sticky_header' => true,
51
+ 'save_defaults' => true,
52
+ 'ajax_save' => true,
53
+
54
+ // admin bar menu settings
55
+ 'admin_bar_menu_icon' => '',
56
+ 'admin_bar_menu_priority' => 80,
57
+
58
+ // footer
59
+ 'footer_text' => '',
60
+ 'footer_after' => '',
61
+ 'footer_credit' => '',
62
+
63
+ // database model
64
+ 'database' => '', // options, transient, theme_mod, network
65
+ 'transient_time' => 0,
66
+
67
+ // contextual help
68
+ 'contextual_help' => array(),
69
+ 'contextual_help_sidebar' => '',
70
+
71
+ // typography options
72
+ 'enqueue_webfont' => true,
73
+ 'async_webfont' => false,
74
+
75
+ // others
76
+ 'output_css' => true,
77
+
78
+ // theme
79
+ 'theme' => 'dark',
80
+ 'class' => '',
81
+
82
+ // external default values
83
+ 'defaults' => array(),
84
+
85
+ );
86
+
87
+ // run framework construct
88
+ public function __construct( $key, $params = array() ) {
89
+
90
+ $this->unique = $key;
91
+ $this->args = apply_filters( "spftestimonial_{$this->unique}_args", wp_parse_args( $params['args'], $this->args ), $this );
92
+ $this->sections = apply_filters( "spftestimonial_{$this->unique}_sections", $params['sections'], $this );
93
+
94
+ // run only is admin panel options, avoid performance loss
95
+ $this->pre_tabs = $this->pre_tabs( $this->sections );
96
+ $this->pre_fields = $this->pre_fields( $this->sections );
97
+ $this->pre_sections = $this->pre_sections( $this->sections );
98
+
99
+ $this->get_options();
100
+ $this->set_options();
101
+ $this->save_defaults();
102
+
103
+ add_action( 'admin_menu', array( &$this, 'add_admin_menu' ) );
104
+ add_action( 'admin_bar_menu', array( &$this, 'add_admin_bar_menu' ), $this->args['admin_bar_menu_priority'] );
105
+ add_action( 'wp_ajax_spftestimonial_' . $this->unique . '_ajax_save', array( &$this, 'ajax_save' ) );
106
+
107
+ if ( ! empty( $this->args['show_network_menu'] ) ) {
108
+ add_action( 'network_admin_menu', array( &$this, 'add_admin_menu' ) );
109
+ }
110
+
111
+ // wp enqeueu for typography and output css
112
+ parent::__construct();
113
+
114
+ }
115
+
116
+ // instance
117
+ public static function instance( $key, $params = array() ) {
118
+ return new self( $key, $params );
119
+ }
120
+
121
+ public function pre_tabs( $sections ) {
122
+
123
+ $result = array();
124
+ $parents = array();
125
+ $count = 100;
126
+
127
+ foreach ( $sections as $key => $section ) {
128
+ if ( ! empty( $section['parent'] ) ) {
129
+ $section['priority'] = ( isset( $section['priority'] ) ) ? $section['priority'] : $count;
130
+ $parents[ $section['parent'] ][] = $section;
131
+ unset( $sections[ $key ] );
132
+ }
133
+ $count++;
134
+ }
135
+
136
+ foreach ( $sections as $key => $section ) {
137
+ $section['priority'] = ( isset( $section['priority'] ) ) ? $section['priority'] : $count;
138
+ if ( ! empty( $section['id'] ) && ! empty( $parents[ $section['id'] ] ) ) {
139
+ $section['subs'] = wp_list_sort( $parents[ $section['id'] ], array( 'priority' => 'ASC' ), 'ASC', true );
140
+ }
141
+ $result[] = $section;
142
+ $count++;
143
+ }
144
+
145
+ return wp_list_sort( $result, array( 'priority' => 'ASC' ), 'ASC', true );
146
+ }
147
+
148
+ public function pre_fields( $sections ) {
149
+
150
+ $result = array();
151
+
152
+ foreach ( $sections as $key => $section ) {
153
+ if ( ! empty( $section['fields'] ) ) {
154
+ foreach ( $section['fields'] as $field ) {
155
+ $result[] = $field;
156
+ }
157
+ }
158
+ }
159
+
160
+ return $result;
161
+ }
162
+
163
+ public function pre_sections( $sections ) {
164
+
165
+ $result = array();
166
+
167
+ foreach ( $this->pre_tabs as $tab ) {
168
+ if ( ! empty( $tab['subs'] ) ) {
169
+ foreach ( $tab['subs'] as $sub ) {
170
+ $result[] = $sub;
171
+ }
172
+ }
173
+ if ( empty( $tab['subs'] ) ) {
174
+ $result[] = $tab;
175
+ }
176
+ }
177
+
178
+ return $result;
179
+ }
180
+
181
+ // add admin bar menu
182
+ public function add_admin_bar_menu( $wp_admin_bar ) {
183
+
184
+ if ( ! empty( $this->args['show_bar_menu'] ) && empty( $this->args['menu_hidden'] ) ) {
185
+
186
+ global $submenu;
187
+
188
+ $menu_slug = $this->args['menu_slug'];
189
+ $menu_icon = ( ! empty( $this->args['admin_bar_menu_icon'] ) ) ? '<span class="spftestimonial-ab-icon ab-icon ' . $this->args['admin_bar_menu_icon'] . '"></span>' : '';
190
+
191
+ $wp_admin_bar->add_node(
192
+ array(
193
+ 'id' => $menu_slug,
194
+ 'title' => $menu_icon . $this->args['menu_title'],
195
+ 'href' => ( is_network_admin() ) ? network_admin_url( 'admin.php?page=' . $menu_slug ) : admin_url( 'admin.php?page=' . $menu_slug ),
196
+ )
197
+ );
198
+
199
+ if ( ! empty( $submenu[ $menu_slug ] ) ) {
200
+ foreach ( $submenu[ $menu_slug ] as $key => $menu ) {
201
+ $wp_admin_bar->add_node(
202
+ array(
203
+ 'parent' => $menu_slug,
204
+ 'id' => $menu_slug . '-' . $key,
205
+ 'title' => $menu[0],
206
+ 'href' => ( is_network_admin() ) ? network_admin_url( 'admin.php?page=' . $menu[2] ) : admin_url( 'admin.php?page=' . $menu[2] ),
207
+ )
208
+ );
209
+ }
210
+ }
211
+
212
+ if ( ! empty( $this->args['show_network_menu'] ) ) {
213
+ $wp_admin_bar->add_node(
214
+ array(
215
+ 'parent' => 'network-admin',
216
+ 'id' => $menu_slug . '-network-admin',
217
+ 'title' => $menu_icon . $this->args['menu_title'],
218
+ 'href' => network_admin_url( 'admin.php?page=' . $menu_slug ),
219
+ )
220
+ );
221
+ }
222
+ }
223
+
224
+ }
225
+
226
+ public function ajax_save() {
227
+
228
+ if ( ! empty( $_POST['data'] ) ) {
229
+
230
+ $_POST = json_decode( stripslashes( $_POST['data'] ), true );
231
+
232
+ if ( wp_verify_nonce( spftestimonial_get_var( 'spftestimonial_options_nonce' . $this->unique ), 'spftestimonial_options_nonce' ) ) {
233
+
234
+ $this->set_options();
235
+
236
+ wp_send_json_success(
237
+ array(
238
+ 'success' => true,
239
+ 'notice' => $this->notice,
240
+ 'errors' => $this->errors,
241
+ )
242
+ );
243
+
244
+ }
245
+ }
246
+
247
+ wp_send_json_error(
248
+ array(
249
+ 'success' => false,
250
+ 'error' => esc_html__( 'Error while saving.', 'testimonial-free' ),
251
+ )
252
+ );
253
+
254
+ }
255
+
256
+ // get default value
257
+ public function get_default( $field, $options = array() ) {
258
+
259
+ $default = ( isset( $this->args['defaults'][ $field['id'] ] ) ) ? $this->args['defaults'][ $field['id'] ] : '';
260
+ $default = ( isset( $field['default'] ) ) ? $field['default'] : $default;
261
+ $default = ( isset( $options[ $field['id'] ] ) ) ? $options[ $field['id'] ] : $default;
262
+
263
+ return $default;
264
+
265
+ }
266
+
267
+ // save defaults and set new fields value to main options
268
+ public function save_defaults() {
269
+
270
+ $tmp_options = $this->options;
271
+
272
+ foreach ( $this->pre_fields as $field ) {
273
+ if ( ! empty( $field['id'] ) ) {
274
+ $this->options[ $field['id'] ] = $this->get_default( $field, $this->options );
275
+ }
276
+ }
277
+
278
+ if ( $this->args['save_defaults'] && empty( $tmp_options ) ) {
279
+ $this->save_options( $this->options );
280
+ }
281
+
282
+ }
283
+
284
+ // set options
285
+ public function set_options() {
286
+
287
+ if ( wp_verify_nonce( spftestimonial_get_var( 'spftestimonial_options_nonce' . $this->unique ), 'spftestimonial_options_nonce' ) ) {
288
+
289
+ $request = spftestimonial_get_var( $this->unique, array() );
290
+ $transient = spftestimonial_get_var( 'spftestimonial_transient' );
291
+ $section_id = ( ! empty( $transient['section'] ) ) ? $transient['section'] : '';
292
+
293
+ // import data
294
+ if ( ! empty( $transient['spftestimonial_import_data'] ) ) {
295
+
296
+ $import_data = json_decode( stripslashes( trim( $transient['spftestimonial_import_data'] ) ), true );
297
+ $request = ( is_array( $import_data ) ) ? $import_data : array();
298
+
299
+ $this->notice = esc_html__( 'Success. Imported backup options.', 'testimonial-free' );
300
+
301
+ } elseif ( ! empty( $transient['reset'] ) ) {
302
+
303
+ foreach ( $this->pre_fields as $field ) {
304
+ if ( ! empty( $field['id'] ) ) {
305
+ $request[ $field['id'] ] = $this->get_default( $field );
306
+ }
307
+ }
308
+
309
+ $this->notice = esc_html__( 'Default options restored.', 'testimonial-free' );
310
+
311
+ } elseif ( ! empty( $transient['reset_section'] ) && ! empty( $section_id ) ) {
312
+
313
+ if ( ! empty( $this->pre_sections[ $section_id - 1 ]['fields'] ) ) {
314
+
315
+ foreach ( $this->pre_sections[ $section_id - 1 ]['fields'] as $field ) {
316
+ if ( ! empty( $field['id'] ) ) {
317
+ $request[ $field['id'] ] = $this->get_default( $field );
318
+ }
319
+ }
320
+ }
321
+
322
+ $this->notice = esc_html__( 'Default options restored for only this section.', 'testimonial-free' );
323
+
324
+ } else {
325
+
326
+ // sanitize and validate
327
+ foreach ( $this->pre_fields as $field ) {
328
+
329
+ if ( ! empty( $field['id'] ) ) {
330
+
331
+ // sanitize
332
+ if ( ! empty( $field['sanitize'] ) ) {
333
+
334
+ $sanitize = $field['sanitize'];
335
+ $value_sanitize = isset( $request[ $field['id'] ] ) ? $request[ $field['id'] ] : '';
336
+ $request[ $field['id'] ] = call_user_func( $sanitize, $value_sanitize );
337
+
338
+ }
339
+
340
+ // validate
341
+ if ( ! empty( $field['validate'] ) ) {
342
+
343
+ $value_validate = isset( $request[ $field['id'] ] ) ? $request[ $field['id'] ] : '';
344
+ $has_validated = call_user_func( $field['validate'], $value_validate );
345
+
346
+ if ( ! empty( $has_validated ) ) {
347
+ $request[ $field['id'] ] = ( isset( $this->options[ $field['id'] ] ) ) ? $this->options[ $field['id'] ] : '';
348
+ $this->errors[ $field['id'] ] = $has_validated;
349
+ }
350
+ }
351
+
352
+ // auto sanitize
353
+ if ( ! isset( $request[ $field['id'] ] ) || is_null( $request[ $field['id'] ] ) ) {
354
+ $request[ $field['id'] ] = '';
355
+ }
356
+ }
357
+ }
358
+ }
359
+
360
+ // ignore nonce requests
361
+ if ( isset( $request['_nonce'] ) ) {
362
+ unset( $request['_nonce'] ); }
363
+
364
+ $request = wp_unslash( $request );
365
+
366
+ $request = apply_filters( "spftestimonial_{$this->unique}_save", $request, $this );
367
+
368
+ do_action( "spftestimonial_{$this->unique}_save_before", $request, $this );
369
+
370
+ $this->options = $request;
371
+
372
+ $this->save_options( $request );
373
+
374
+ do_action( "spftestimonial_{$this->unique}_save_after", $request, $this );
375
+
376
+ if ( empty( $this->notice ) ) {
377
+ $this->notice = esc_html__( 'Settings saved.', 'testimonial-free' );
378
+ }
379
+ }
380
+
381
+ return true;
382
+
383
+ }
384
+
385
+ // save options database
386
+ public function save_options( $request ) {
387
+
388
+ if ( $this->args['database'] === 'transient' ) {
389
+ set_transient( $this->unique, $request, $this->args['transient_time'] );
390
+ } elseif ( $this->args['database'] === 'theme_mod' ) {
391
+ set_theme_mod( $this->unique, $request );
392
+ } elseif ( $this->args['database'] === 'network' ) {
393
+ update_site_option( $this->unique, $request );
394
+ } else {
395
+ update_option( $this->unique, $request );
396
+ }
397
+
398
+ do_action( "spftestimonial_{$this->unique}_saved", $request, $this );
399
+
400
+ }
401
+
402
+ // get options from database
403
+ public function get_options() {
404
+
405
+ if ( $this->args['database'] === 'transient' ) {
406
+ $this->options = get_transient( $this->unique );
407
+ } elseif ( $this->args['database'] === 'theme_mod' ) {
408
+ $this->options = get_theme_mod( $this->unique );
409
+ } elseif ( $this->args['database'] === 'network' ) {
410
+ $this->options = get_site_option( $this->unique );
411
+ } else {
412
+ $this->options = get_option( $this->unique );
413
+ }
414
+
415
+ if ( empty( $this->options ) ) {
416
+ $this->options = array();
417
+ }
418
+
419
+ return $this->options;
420
+
421
+ }
422
+
423
+ // wp api: admin menu
424
+ public function add_admin_menu() {
425
+
426
+ extract( $this->args );
427
+
428
+ if ( $menu_type === 'submenu' ) {
429
+
430
+ $menu_page = call_user_func( 'add_submenu_page', $menu_parent, $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'add_options_html' ) );
431
+
432
+ } else {
433
+
434
+ $menu_page = call_user_func( 'add_menu_page', $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'add_options_html' ), $menu_icon, $menu_position );
435
+
436
+ if ( ! empty( $this->args['show_sub_menu'] ) && count( $this->pre_tabs ) > 1 ) {
437
+
438
+ // create submenus
439
+ $tab_key = 1;
440
+ foreach ( $this->pre_tabs as $section ) {
441
+
442
+ call_user_func( 'add_submenu_page', $menu_slug, $section['title'], $section['title'], $menu_capability, $menu_slug . '#tab=' . $tab_key, '__return_null' );
443
+
444
+ if ( ! empty( $section['subs'] ) ) {
445
+ $tab_key += ( count( $section['subs'] ) - 1 );
446
+ }
447
+
448
+ $tab_key++;
449
+
450
+ }
451
+
452
+ remove_submenu_page( $menu_slug, $menu_slug );
453
+
454
+ }
455
+
456
+ if ( ! empty( $menu_hidden ) ) {
457
+ remove_menu_page( $menu_slug );
458
+ }
459
+ }
460
+
461
+ add_action( 'load-' . $menu_page, array( &$this, 'add_page_on_load' ) );
462
+
463
+ }
464
+
465
+ public function add_page_on_load() {
466
+
467
+ if ( ! empty( $this->args['contextual_help'] ) ) {
468
+
469
+ $screen = get_current_screen();
470
+
471
+ foreach ( $this->args['contextual_help'] as $tab ) {
472
+ $screen->add_help_tab( $tab );
473
+ }
474
+
475
+ if ( ! empty( $this->args['contextual_help_sidebar'] ) ) {
476
+ $screen->set_help_sidebar( $this->args['contextual_help_sidebar'] );
477
+ }
478
+ }
479
+
480
+ }
481
+
482
+ public function error_check( $sections, $err = '' ) {
483
+
484
+ if ( ! $this->args['ajax_save'] ) {
485
+
486
+ if ( ! empty( $sections['fields'] ) ) {
487
+ foreach ( $sections['fields'] as $field ) {
488
+ if ( ! empty( $field['id'] ) ) {
489
+ if ( array_key_exists( $field['id'], $this->errors ) ) {
490
+ $err = '<span class="spftestimonial-label-error">!</span>';
491
+ }
492
+ }
493
+ }
494
+ }
495
+
496
+ if ( ! empty( $sections['subs'] ) ) {
497
+ foreach ( $sections['subs'] as $sub ) {
498
+ $err = $this->error_check( $sub, $err );
499
+ }
500
+ }
501
+
502
+ if ( ! empty( $sections['id'] ) && array_key_exists( $sections['id'], $this->errors ) ) {
503
+ $err = $this->errors[ $sections['id'] ];
504
+ }
505
+ }
506
+
507
+ return $err;
508
+ }
509
+
510
+ // option page html output
511
+ public function add_options_html() {
512
+
513
+ $has_nav = ( count( $this->pre_tabs ) > 1 ) ? true : false;
514
+ $show_all = ( ! $has_nav ) ? ' spftestimonial-show-all' : '';
515
+ $ajax_class = ( $this->args['ajax_save'] ) ? ' spftestimonial-save-ajax' : '';
516
+ $sticky_class = ( $this->args['sticky_header'] ) ? ' spftestimonial-sticky-header' : '';
517
+ $wrapper_class = ( $this->args['framework_class'] ) ? ' ' . $this->args['framework_class'] : '';
518
+ $theme = ( $this->args['theme'] ) ? ' spftestimonial-theme-' . $this->args['theme'] : '';
519
+ $class = ( $this->args['class'] ) ? ' ' . $this->args['class'] : '';
520
+
521
+ echo '<div class="spftestimonial spftestimonial-options' . $theme . $class . $wrapper_class . '" data-slug="' . $this->args['menu_slug'] . '" data-unique="' . $this->unique . '">';
522
+
523
+ $notice_class = ( ! empty( $this->notice ) ) ? ' spftestimonial-form-show' : '';
524
+ $notice_text = ( ! empty( $this->notice ) ) ? $this->notice : '';
525
+
526
+ echo '<div class="spftestimonial-form-result spftestimonial-form-success' . $notice_class . '">' . $notice_text . '</div>';
527
+
528
+ $error_class = ( ! empty( $this->errors ) ) ? ' spftestimonial-form-show' : '';
529
+
530
+ echo '<div class="spftestimonial-form-result spftestimonial-form-error' . $error_class . '">';
531
+ if ( ! empty( $this->errors ) ) {
532
+ foreach ( $this->errors as $error ) {
533
+ echo '<i class="spftestimonial-label-error">!</i> ' . $error . '<br />';
534
+ }
535
+ }
536
+ echo '</div>';
537
+
538
+ echo '<div class="spftestimonial-container">';
539
+
540
+ echo '<form method="post" action="" enctype="multipart/form-data" id="spftestimonial-form" autocomplete="off">';
541
+
542
+ echo '<input type="hidden" class="spftestimonial-section-id" name="spftestimonial_transient[section]" value="1">';
543
+ wp_nonce_field( 'spftestimonial_options_nonce', 'spftestimonial_options_nonce' . $this->unique );
544
+
545
+ echo '<div class="spftestimonial-header' . esc_attr( $sticky_class ) . '">';
546
+ echo '<div class="spftestimonial-header-inner">';
547
+
548
+ echo '<div class="spftestimonial-header-left">';
549
+ echo '<h1>' . $this->args['framework_title'] . '</h1>';
550
+ echo '</div>';
551
+
552
+ echo '<div class="spftestimonial-header-right">';
553
+
554
+ echo ( $has_nav && $this->args['show_all_options'] ) ? '<div class="spftestimonial-expand-all" title="' . esc_html__( 'show all options', 'testimonial-free' ) . '"><i class="fa fa-outdent"></i></div>' : '';
555
+
556
+ echo ( $this->args['show_search'] ) ? '<div class="spftestimonial-search"><input type="text" name="spftestimonial-search" placeholder="' . esc_html__( 'Search option(s)', 'testimonial-free' ) . '" autocomplete="off" /></div>' : '';
557
+
558
+ echo '<div class="spftestimonial-buttons">';
559
+ echo '<input type="submit" name="' . $this->unique . '[_nonce][save]" class="button button-primary spftestimonial-save' . $ajax_class . '" value="' . esc_html__( 'Save', 'testimonial-free' ) . '" data-save="' . esc_html__( 'Saving...', 'testimonial-free' ) . '">';
560
+ echo ( $this->args['show_reset_section'] ) ? '<input type="submit" name="spftestimonial_transient[reset_section]" class="button button-secondary spftestimonial-reset-section spftestimonial-confirm" value="' . esc_html__( 'Reset Section', 'testimonial-free' ) . '" data-confirm="' . esc_html__( 'Are you sure to reset this section options?', 'testimonial-free' ) . '">' : '';
561
+ echo ( $this->args['show_reset_all'] ) ? '<input type="submit" name="spftestimonial_transient[reset]" class="button button-secondary spftestimonial-warning-primary spftestimonial-reset-all spftestimonial-confirm" value="' . esc_html__( 'Reset All', 'testimonial-free' ) . '" data-confirm="' . esc_html__( 'Are you sure to reset all options?', 'testimonial-free' ) . '">' : '';
562
+ echo '</div>';
563
+
564
+ echo '</div>';
565
+
566
+ echo '<div class="clear"></div>';
567
+ echo '</div>';
568
+ echo '</div>';
569
+
570
+ echo '<div class="spftestimonial-wrapper' . $show_all . '">';
571
+
572
+ if ( $has_nav ) {
573
+ echo '<div class="spftestimonial-nav spftestimonial-nav-options">';
574
+
575
+ echo '<ul>';
576
+
577
+ $tab_key = 1;
578
+
579
+ foreach ( $this->pre_tabs as $tab ) {
580
+
581
+ $tab_error = $this->error_check( $tab );
582
+ $tab_icon = ( ! empty( $tab['icon'] ) ) ? '<i class="' . $tab['icon'] . '"></i>' : '';
583
+
584
+ if ( ! empty( $tab['subs'] ) ) {
585
+
586
+ echo '<li class="spftestimonial-tab-depth-0">';
587
+
588
+ echo '<a href="#tab=' . $tab_key . '" class="spftestimonial-arrow">' . $tab_icon . $tab['title'] . $tab_error . '</a>';
589
+
590
+ echo '<ul>';
591
+
592
+ foreach ( $tab['subs'] as $sub ) {
593
+
594
+ $sub_error = $this->error_check( $sub );
595
+ $sub_icon = ( ! empty( $sub['icon'] ) ) ? '<i class="' . $sub['icon'] . '"></i>' : '';
596
+
597
+ echo '<li class="spftestimonial-tab-depth-1"><a id="spftestimonial-tab-link-' . $tab_key . '" href="#tab=' . $tab_key . '">' . $sub_icon . $sub['title'] . $sub_error . '</a></li>';
598
+
599
+ $tab_key++;
600
+ }
601
+
602
+ echo '</ul>';
603
+
604
+ echo '</li>';
605
+
606
+ } else {
607
+
608
+ echo '<li class="spftestimonial-tab-depth-0"><a id="spftestimonial-tab-link-' . $tab_key . '" href="#tab=' . $tab_key . '">' . $tab_icon . $tab['title'] . $tab_error . '</a></li>';
609
+
610
+ $tab_key++;
611
+ }
612
+ }
613
+
614
+ echo '</ul>';
615
+
616
+ echo '</div>';
617
+
618
+ }
619
+
620
+ echo '<div class="spftestimonial-content">';
621
+
622
+ echo '<div class="spftestimonial-sections">';
623
+
624
+ $section_key = 1;
625
+
626
+ foreach ( $this->pre_sections as $section ) {
627
+
628
+ $onload = ( ! $has_nav ) ? ' spftestimonial-onload' : '';
629
+ $section_icon = ( ! empty( $section['icon'] ) ) ? '<i class="spftestimonial-icon ' . $section['icon'] . '"></i>' : '';
630
+
631
+ echo '<div id="spftestimonial-section-' . $section_key . '" class="spftestimonial-section' . $onload . '">';
632
+ echo ( $has_nav ) ? '<div class="spftestimonial-section-title"><h3>' . $section_icon . $section['title'] . '</h3></div>' : '';
633
+ echo ( ! empty( $section['description'] ) ) ? '<div class="spftestimonial-field spftestimonial-section-description">' . $section['description'] . '</div>' : '';
634
+
635
+ if ( ! empty( $section['fields'] ) ) {
636
+
637
+ foreach ( $section['fields'] as $field ) {
638
+
639
+ $is_field_error = $this->error_check( $field );
640
+
641
+ if ( ! empty( $is_field_error ) ) {
642
+ $field['_error'] = $is_field_error;
643
+ }
644
+
645
+ $value = ( ! empty( $field['id'] ) && isset( $this->options[ $field['id'] ] ) ) ? $this->options[ $field['id'] ] : '';
646
+
647
+ SPFTESTIMONIAL::field( $field, $value, $this->unique, 'options' );
648
+
649
+ }
650
+ } else {
651
+
652
+ echo '<div class="spftestimonial-no-option spftestimonial-text-muted">' . esc_html__( 'No option provided by developer.', 'testimonial-free' ) . '</div>';
653
+
654
+ }
655
+
656
+ echo '</div>';
657
+
658
+ $section_key++;
659
+ }
660
+
661
+ echo '</div>';
662
+
663
+ echo '<div class="clear"></div>';
664
+
665
+ echo '</div>';
666
+
667
+ echo '<div class="spftestimonial-nav-background"></div>';
668
+
669
+ echo '</div>';
670
+
671
+ if ( ! empty( $this->args['show_footer'] ) ) {
672
+
673
+ echo '<div class="spftestimonial-footer">';
674
+
675
+ echo '<div class="spftestimonial-buttons">';
676
+ echo '<input type="submit" name="spftestimonial_transient[save]" class="button button-primary spftestimonial-save' . $ajax_class . '" value="' . esc_html__( 'Save', 'testimonial-free' ) . '" data-save="' . esc_html__( 'Saving...', 'testimonial-free' ) . '">';
677
+ echo ( $this->args['show_reset_section'] ) ? '<input type="submit" name="spftestimonial_transient[reset_section]" class="button button-secondary spftestimonial-reset-section spftestimonial-confirm" value="' . esc_html__( 'Reset Section', 'testimonial-free' ) . '" data-confirm="' . esc_html__( 'Are you sure to reset this section options?', 'testimonial-free' ) . '">' : '';
678
+ echo ( $this->args['show_reset_all'] ) ? '<input type="submit" name="spftestimonial_transient[reset]" class="button button-secondary spftestimonial-warning-primary spftestimonial-reset-all spftestimonial-confirm" value="' . esc_html__( 'Reset All', 'testimonial-free' ) . '" data-confirm="' . esc_html__( 'Are you sure to reset all options?', 'testimonial-free' ) . '">' : '';
679
+ echo '</div>';
680
+
681
+ echo ( ! empty( $this->args['footer_text'] ) ) ? '<div class="spftestimonial-copyright">' . $this->args['footer_text'] . '</div>' : '';
682
+
683
+ echo '<div class="clear"></div>';
684
+ echo '</div>';
685
+
686
+ }
687
+
688
+ echo '</form>';
689
+
690
+ echo '</div>';
691
+
692
+ echo '<div class="clear"></div>';
693
+
694
+ echo ( ! empty( $this->args['footer_after'] ) ) ? $this->args['footer_after'] : '';
695
+
696
+ echo '</div>';
697
+
698
+ }
699
+ }
700
+ }
admin/views/tp-metabox/classes/setup.class.php ADDED
@@ -0,0 +1,411 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Setup Class
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL' ) ) {
11
+ class SPFTESTIMONIAL {
12
+
13
+ // constants.
14
+ public static $version = '2.1.1';
15
+ public static $premium = true;
16
+ public static $dir = null;
17
+ public static $url = null;
18
+ public static $inited = array();
19
+ public static $fields = array();
20
+ public static $args = array(
21
+ 'options' => array(),
22
+ 'metaboxes' => array(),
23
+ 'widgets' => array(),
24
+ );
25
+
26
+ // shortcode instances.
27
+ public static $shortcode_instances = array();
28
+
29
+ // init.
30
+ public static function init() {
31
+
32
+ // init action.
33
+ do_action( 'spftestimonial_init' );
34
+
35
+ // set constants.
36
+ self::constants();
37
+
38
+ // include files.
39
+ self::includes();
40
+
41
+ add_action( 'after_setup_theme', array( 'SPFTESTIMONIAL', 'setup' ) );
42
+ add_action( 'init', array( 'SPFTESTIMONIAL', 'setup' ) );
43
+ add_action( 'switch_theme', array( 'SPFTESTIMONIAL', 'setup' ) );
44
+ add_action( 'admin_enqueue_scripts', array( 'SPFTESTIMONIAL', 'add_admin_enqueue_scripts' ), 20 );
45
+
46
+ }
47
+
48
+ /** Setup */
49
+ public static function setup() {
50
+
51
+ // setup options.
52
+ $params = array();
53
+ if ( ! empty( self::$args['options'] ) ) {
54
+ foreach ( self::$args['options'] as $key => $value ) {
55
+ if ( ! empty( self::$args['sections'][ $key ] ) && ! isset( self::$inited[ $key ] ) ) {
56
+
57
+ $params['args'] = $value;
58
+ $params['sections'] = self::$args['sections'][ $key ];
59
+ self::$inited[ $key ] = true;
60
+
61
+ SPFTESTIMONIAL_Options::instance( $key, $params );
62
+
63
+ if ( ! empty( $value['show_in_customizer'] ) ) {
64
+ self::$args['customize_options'][ $key ] = $value;
65
+ self::$inited[ $key ] = null;
66
+ }
67
+ }
68
+ }
69
+ }
70
+
71
+ // setup metaboxes.
72
+ $params = array();
73
+ if ( ! empty( self::$args['metaboxes'] ) ) {
74
+ foreach ( self::$args['metaboxes'] as $key => $value ) {
75
+ if ( ! empty( self::$args['sections'][ $key ] ) && ! isset( self::$inited[ $key ] ) ) {
76
+
77
+ $params['args'] = $value;
78
+ $params['sections'] = self::$args['sections'][ $key ];
79
+ self::$inited[ $key ] = true;
80
+
81
+ SPFTESTIMONIAL_Metabox::instance( $key, $params );
82
+
83
+ }
84
+ }
85
+ }
86
+
87
+ // create widgets.
88
+ if ( ! empty( self::$args['widgets'] ) && class_exists( 'WP_Widget_Factory' ) ) {
89
+
90
+ $wp_widget_factory = new WP_Widget_Factory();
91
+
92
+ foreach ( self::$args['widgets'] as $key => $value ) {
93
+ if ( ! isset( self::$inited[ $key ] ) ) {
94
+ self::$inited[ $key ] = true;
95
+ $wp_widget_factory->register( SPFTESTIMONIAL_Widget::instance( $key, $value ) );
96
+ }
97
+ }
98
+ }
99
+
100
+ do_action( 'spftestimonial_loaded' );
101
+
102
+ }
103
+
104
+ // Create options.
105
+ public static function createOptions( $id, $args = array() ) {
106
+ self::$args['options'][ $id ] = $args;
107
+ }
108
+
109
+ // create metabox options.
110
+ public static function createMetabox( $id, $args = array() ) {
111
+ self::$args['metaboxes'][ $id ] = $args;
112
+ }
113
+
114
+ // create widget.
115
+ public static function createWidget( $id, $args = array() ) {
116
+ self::$args['widgets'][ $id ] = $args;
117
+ self::set_used_fields( $args );
118
+ }
119
+
120
+ // create section.
121
+ public static function createSection( $id, $sections ) {
122
+ self::$args['sections'][ $id ][] = $sections;
123
+ self::set_used_fields( $sections );
124
+ }
125
+
126
+ // constants.
127
+ public static function constants() {
128
+
129
+ // we need this path-finder code for set URL of framework.
130
+ $dirname = wp_normalize_path( dirname( dirname( __FILE__ ) ) );
131
+ $theme_dir = wp_normalize_path( get_parent_theme_file_path() );
132
+ $plugin_dir = wp_normalize_path( WP_PLUGIN_DIR );
133
+ $located_plugin = ( preg_match( '#' . self::sanitize_dirname( $plugin_dir ) . '#', self::sanitize_dirname( $dirname ) ) ) ? true : false;
134
+ $directory = ( $located_plugin ) ? $plugin_dir : $theme_dir;
135
+ $directory_uri = ( $located_plugin ) ? WP_PLUGIN_URL : get_parent_theme_file_uri();
136
+ $foldername = str_replace( $directory, '', $dirname );
137
+ $protocol_uri = ( is_ssl() ) ? 'https' : 'http';
138
+ $directory_uri = set_url_scheme( $directory_uri, $protocol_uri );
139
+
140
+ self::$dir = $dirname;
141
+ self::$url = $directory_uri . $foldername;
142
+
143
+ }
144
+
145
+ public static function include_plugin_file( $file, $load = true ) {
146
+
147
+ $path = '';
148
+ $file = ltrim( $file, '/' );
149
+ $override = apply_filters( 'spftestimonial_override', 'spftestimonial-override' );
150
+
151
+ if ( file_exists( get_parent_theme_file_path( $override . '/' . $file ) ) ) {
152
+ $path = get_parent_theme_file_path( $override . '/' . $file );
153
+ } elseif ( file_exists( get_theme_file_path( $override . '/' . $file ) ) ) {
154
+ $path = get_theme_file_path( $override . '/' . $file );
155
+ } elseif ( file_exists( self::$dir . '/' . $override . '/' . $file ) ) {
156
+ $path = self::$dir . '/' . $override . '/' . $file;
157
+ } elseif ( file_exists( self::$dir . '/' . $file ) ) {
158
+ $path = self::$dir . '/' . $file;
159
+ }
160
+
161
+ if ( ! empty( $path ) && ! empty( $file ) && $load ) {
162
+
163
+ global $wp_query;
164
+
165
+ if ( is_object( $wp_query ) && function_exists( 'load_template' ) ) {
166
+
167
+ load_template( $path, true );
168
+
169
+ } else {
170
+
171
+ require_once $path;
172
+
173
+ }
174
+ } else {
175
+
176
+ return self::$dir . '/' . $file;
177
+
178
+ }
179
+
180
+ }
181
+
182
+ public static function is_active_plugin( $file = '' ) {
183
+ return in_array( $file, (array) get_option( 'active_plugins', array() ) );
184
+ }
185
+
186
+ // Sanitize dirname.
187
+ public static function sanitize_dirname( $dirname ) {
188
+ return preg_replace( '/[^A-Za-z]/', '', $dirname );
189
+ }
190
+
191
+ // Set plugin url.
192
+ public static function include_plugin_url( $file ) {
193
+ return self::$url . '/' . ltrim( $file, '/' );
194
+ }
195
+
196
+ // General includes.
197
+ public static function includes() {
198
+
199
+ // includes helpers.
200
+ self::include_plugin_file( 'functions/actions.php' );
201
+ self::include_plugin_file( 'functions/deprecated.php' );
202
+ self::include_plugin_file( 'functions/helpers.php' );
203
+ self::include_plugin_file( 'functions/sanitize.php' );
204
+ self::include_plugin_file( 'functions/validate.php' );
205
+
206
+ // includes free version classes.
207
+ self::include_plugin_file( 'classes/abstract.class.php' );
208
+ self::include_plugin_file( 'classes/fields.class.php' );
209
+ self::include_plugin_file( 'classes/options.class.php' );
210
+
211
+ // includes premium version classes.
212
+ if ( self::$premium ) {
213
+ self::include_plugin_file( 'classes/metabox.class.php' );
214
+ self::include_plugin_file( 'classes/widgets.class.php' );
215
+ }
216
+
217
+ }
218
+
219
+ // Include field.
220
+ public static function maybe_include_field( $type = '' ) {
221
+ if ( ! class_exists( 'SPFTESTIMONIAL_Field_' . $type ) && class_exists( 'SPFTESTIMONIAL_Fields' ) ) {
222
+ self::include_plugin_file( 'fields/' . $type . '/' . $type . '.php' );
223
+ }
224
+ }
225
+
226
+ // Get all of fields.
227
+ public static function set_used_fields( $sections ) {
228
+
229
+ if ( ! empty( $sections['fields'] ) ) {
230
+
231
+ foreach ( $sections['fields'] as $field ) {
232
+
233
+ if ( ! empty( $field['fields'] ) ) {
234
+ self::set_used_fields( $field );
235
+ }
236
+
237
+ if ( ! empty( $field['tabs'] ) ) {
238
+ self::set_used_fields( array( 'fields' => $field['tabs'] ) );
239
+ }
240
+
241
+ if ( ! empty( $field['accordions'] ) ) {
242
+ self::set_used_fields( array( 'fields' => $field['accordions'] ) );
243
+ }
244
+
245
+ if ( ! empty( $field['type'] ) ) {
246
+ self::$fields[ $field['type'] ] = $field;
247
+ }
248
+ }
249
+ }
250
+
251
+ }
252
+
253
+ //
254
+ // Enqueue admin and fields styles and scripts.
255
+ public static function add_admin_enqueue_scripts() {
256
+
257
+ // check for developer mode.
258
+ $min = ( apply_filters( 'spftestimonial_dev_mode', false ) || WP_DEBUG ) ? '' : '.min';
259
+
260
+ // admin utilities.
261
+ wp_enqueue_media();
262
+
263
+ // wp color picker.
264
+ wp_enqueue_style( 'wp-color-picker' );
265
+ wp_enqueue_script( 'wp-color-picker' );
266
+
267
+ // cdn styles.
268
+ //wp_enqueue_style( 'spftestimonial-fa', 'https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css', array(), '4.7.0', 'all' );
269
+ wp_enqueue_style( 'spftestimonial-font-awesome', SP_TFREE_URL . 'public/assets/css/font-awesome.min.css', array(), SP_TFREE_VERSION );
270
+
271
+ // framework core styles.
272
+ wp_enqueue_style( 'spftestimonial', SPFTESTIMONIAL::include_plugin_url( 'assets/css/spftestimonial' . $min . '.css' ), array(), '1.0.0', 'all' );
273
+
274
+ // rtl styles.
275
+ if ( is_rtl() ) {
276
+ wp_enqueue_style( 'spftestimonial-rtl', SPFTESTIMONIAL::include_plugin_url( 'assets/css/spftestimonial-rtl' . $min . '.css' ), array(), '1.0.0', 'all' );
277
+ }
278
+
279
+ // framework core scripts.
280
+ wp_enqueue_script( 'spftestimonial-plugins', SPFTESTIMONIAL::include_plugin_url( 'assets/js/spftestimonial-plugins' . $min . '.js' ), array(), '1.0.0', true );
281
+ wp_enqueue_script( 'spftestimonial', SPFTESTIMONIAL::include_plugin_url( 'assets/js/spftestimonial' . $min . '.js' ), array( 'spftestimonial-plugins' ), '1.0.0', true );
282
+
283
+ wp_localize_script(
284
+ 'spftestimonial', 'spftestimonial_vars', array(
285
+ 'color_palette' => apply_filters( 'spftestimonial_color_palette', array() ),
286
+ 'i18n' => array(
287
+ // global localize.
288
+ 'confirm' => esc_html__( 'Are you sure?', 'testimonial-free' ),
289
+ 'reset_notification' => esc_html__( 'Restoring options.', 'testimonial-free' ),
290
+ 'import_notification' => esc_html__( 'Importing options.', 'testimonial-free' ),
291
+
292
+ // chosen localize.
293
+ 'typing_text' => esc_html__( 'Please enter %s or more characters', 'testimonial-free' ),
294
+ 'searching_text' => esc_html__( 'Searching...', 'testimonial-free' ),
295
+ 'no_results_text' => esc_html__( 'No results match', 'testimonial-free' ),
296
+ ),
297
+ )
298
+ );
299
+
300
+ // load admin enqueue scripts and styles.
301
+ $enqueued = array();
302
+
303
+ if ( ! empty( self::$fields ) ) {
304
+ foreach ( self::$fields as $field ) {
305
+ if ( ! empty( $field['type'] ) ) {
306
+ $classname = 'SPFTESTIMONIAL_Field_' . $field['type'];
307
+ self::maybe_include_field( $field['type'] );
308
+ if ( class_exists( $classname ) && method_exists( $classname, 'enqueue' ) ) {
309
+ $instance = new $classname( $field );
310
+ if ( method_exists( $classname, 'enqueue' ) ) {
311
+ $instance->enqueue();
312
+ }
313
+ unset( $instance );
314
+ }
315
+ }
316
+ }
317
+ }
318
+
319
+ do_action( 'spftestimonial_enqueue' );
320
+
321
+ }
322
+
323
+ //
324
+ // Add a new framework field.
325
+ public static function field( $field = array(), $value = '', $unique = '', $where = '', $parent = '' ) {
326
+
327
+ // Check for unallow fields.
328
+ if ( ! empty( $field['_notice'] ) ) {
329
+
330
+ $field_type = $field['type'];
331
+
332
+ $field = array();
333
+ $field['content'] = sprintf( esc_html__( 'Ooops! This field type (%s) can not be used here, yet.', 'testimonial-free' ), '<strong>' . $field_type . '</strong>' );
334
+ $field['type'] = 'notice';
335
+ $field['style'] = 'danger';
336
+
337
+ }
338
+
339
+ $depend = '';
340
+ $hidden = '';
341
+ $unique = ( ! empty( $unique ) ) ? $unique : '';
342
+ $class = ( ! empty( $field['class'] ) ) ? ' ' . $field['class'] : '';
343
+ $is_pseudo = ( ! empty( $field['pseudo'] ) ) ? ' spftestimonial-pseudo-field' : '';
344
+ $field_type = ( ! empty( $field['type'] ) ) ? $field['type'] : '';
345
+
346
+ if ( ! empty( $field['dependency'] ) ) {
347
+
348
+ $dependency = $field['dependency'];
349
+ $hidden = ' hidden';
350
+ $data_controller = '';
351
+ $data_condition = '';
352
+ $data_value = '';
353
+ $data_global = '';
354
+
355
+ if ( is_array( $dependency[0] ) ) {
356
+ $data_controller = implode( '|', array_column( $dependency, 0 ) );
357
+ $data_condition = implode( '|', array_column( $dependency, 1 ) );
358
+ $data_value = implode( '|', array_column( $dependency, 2 ) );
359
+ $data_global = implode( '|', array_column( $dependency, 3 ) );
360
+ } else {
361
+ $data_controller = ( ! empty( $dependency[0] ) ) ? $dependency[0] : '';
362
+ $data_condition = ( ! empty( $dependency[1] ) ) ? $dependency[1] : '';
363
+ $data_value = ( ! empty( $dependency[2] ) ) ? $dependency[2] : '';
364
+ $data_global = ( ! empty( $dependency[3] ) ) ? $dependency[3] : '';
365
+ }
366
+
367
+ $depend .= ' data-controller="' . $data_controller . '"';
368
+ $depend .= ' data-condition="' . $data_condition . '"';
369
+ $depend .= ' data-value="' . $data_value . '"';
370
+ $depend .= ( ! empty( $data_global ) ) ? ' data-depend-global="true"' : '';
371
+
372
+ }
373
+
374
+ if ( ! empty( $field_type ) ) {
375
+
376
+ echo '<div class="spftestimonial-field spftestimonial-field-' . $field_type . $is_pseudo . $class . $hidden . '"' . $depend . '>';
377
+
378
+ if ( ! empty( $field['title'] ) ) {
379
+ $subtitle = ( ! empty( $field['subtitle'] ) ) ? '<p class="spftestimonial-text-subtitle">' . $field['subtitle'] . '</p>' : '';
380
+ echo '<div class="spftestimonial-title"><h4>' . $field['title'] . '</h4>' . $subtitle . '</div>';
381
+ }
382
+
383
+ echo ( ! empty( $field['title'] ) ) ? '<div class="spftestimonial-fieldset">' : '';
384
+
385
+ $value = ( ! isset( $value ) && isset( $field['default'] ) ) ? $field['default'] : $value;
386
+ $value = ( isset( $field['value'] ) ) ? $field['value'] : $value;
387
+
388
+ self::maybe_include_field( $field_type );
389
+
390
+ $classname = 'SPFTESTIMONIAL_Field_' . $field_type;
391
+
392
+ if ( class_exists( $classname ) ) {
393
+ $instance = new $classname( $field, $value, $unique, $where, $parent );
394
+ $instance->render();
395
+ } else {
396
+ echo '<p>' . esc_html__( 'This field class is not available!', 'testimonial-free' ) . '</p>';
397
+ }
398
+ } else {
399
+ echo '<p>' . esc_html__( 'This type is not found!', 'testimonial-free' ) . '</p>';
400
+ }
401
+
402
+ echo ( ! empty( $field['title'] ) ) ? '</div>' : '';
403
+ echo '<div class="clear"></div>';
404
+ echo '</div>';
405
+
406
+ }
407
+
408
+ }
409
+
410
+ SPFTESTIMONIAL::init();
411
+ }
admin/views/tp-metabox/classes/widgets.class.php ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Widgets Class
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Widget' ) ) {
11
+ class SPFTESTIMONIAL_Widget extends WP_Widget {
12
+
13
+ // constans
14
+ public $unique = '';
15
+ public $args = array(
16
+ 'title' => '',
17
+ 'classname' => '',
18
+ 'description' => '',
19
+ 'width' => '',
20
+ 'defaults' => array(),
21
+ 'fields' => array(),
22
+ 'class' => '',
23
+ );
24
+
25
+ public function __construct( $key, $params ) {
26
+
27
+ $widget_ops = array();
28
+ $control_ops = array();
29
+
30
+ $this->unique = $key;
31
+ $this->args = apply_filters( "spftestimonial_{$this->unique}_args", wp_parse_args( $params, $this->args ), $this );
32
+
33
+ // Set control options
34
+ if ( ! empty( $this->args['width'] ) ) {
35
+ $control_ops['width'] = $this->args['width'];
36
+ }
37
+
38
+ // Set widget options
39
+ if ( ! empty( $this->args['description'] ) ) {
40
+ $widget_ops['description'] = $this->args['description'];
41
+ }
42
+
43
+ if ( ! empty( $this->args['classname'] ) ) {
44
+ $widget_ops['classname'] = $this->args['classname'];
45
+ }
46
+
47
+ // Set filters
48
+ $widget_ops = apply_filters( "spftestimonial_{$this->unique}_widget_ops", $widget_ops, $this );
49
+ $control_ops = apply_filters( "spftestimonial_{$this->unique}_control_ops", $control_ops, $this );
50
+
51
+ parent::__construct( $this->unique, $this->args['title'], $widget_ops, $control_ops );
52
+
53
+ }
54
+
55
+ // Register widget with WordPress
56
+ public static function instance( $key, $params = array() ) {
57
+ return new self( $key, $params );
58
+ }
59
+
60
+ // Front-end display of widget.
61
+ public function widget( $args, $instance ) {
62
+ call_user_func( $this->unique, $args, $instance );
63
+ }
64
+
65
+ // get default value
66
+ public function get_default( $field, $options = array() ) {
67
+
68
+ $default = ( isset( $this->args['defaults'][ $field['id'] ] ) ) ? $this->args['defaults'][ $field['id'] ] : null;
69
+ $default = ( isset( $field['default'] ) ) ? $field['default'] : $default;
70
+ $default = ( isset( $options[ $field['id'] ] ) ) ? $options[ $field['id'] ] : $default;
71
+
72
+ return $default;
73
+
74
+ }
75
+
76
+ // Back-end widget form.
77
+ public function form( $instance ) {
78
+
79
+ if ( ! empty( $this->args['fields'] ) ) {
80
+
81
+ $class = ( $this->args['class'] ) ? ' ' . $this->args['class'] : '';
82
+
83
+ echo '<div class="spftestimonial spftestimonial-widgets spftestimonial-fields' . $class . '">';
84
+
85
+ foreach ( $this->args['fields'] as $field ) {
86
+
87
+ $field_value = '';
88
+ $field_unique = '';
89
+
90
+ if ( ! empty( $field['id'] ) ) {
91
+
92
+ $field_value = $this->get_default( $field, $instance );
93
+ $field_unique = 'widget-' . $this->unique . '[' . $this->number . ']';
94
+
95
+ if ( $field['id'] === 'title' ) {
96
+ $field['attributes']['id'] = 'widget-' . $this->unique . '-' . $this->number . '-title';
97
+ }
98
+ }
99
+
100
+ SPFTESTIMONIAL::field( $field, $field_value, $field_unique );
101
+
102
+ }
103
+
104
+ echo '</div>';
105
+
106
+ }
107
+
108
+ }
109
+
110
+ // Sanitize widget form values as they are saved.
111
+ public function update( $new_instance, $old_instance ) {
112
+
113
+ // auto sanitize
114
+ foreach ( $this->args['fields'] as $field ) {
115
+ if ( ! empty( $field['id'] ) && ( ! isset( $new_instance[ $field['id'] ] ) || is_null( $new_instance[ $field['id'] ] ) ) ) {
116
+ $new_instance[ $field['id'] ] = '';
117
+ }
118
+ }
119
+
120
+ $new_instance = apply_filters( "spftestimonial_{$this->unique}_save", $new_instance, $this->args, $this );
121
+
122
+ do_action( "spftestimonial_{$this->unique}_save_before", $new_instance, $this->args, $this );
123
+
124
+ return $new_instance;
125
+
126
+ }
127
+ }
128
+ }
admin/views/tp-metabox/fields/button_set/button_set.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: button_set
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Field_button_set' ) ) {
11
+ class SPFTESTIMONIAL_Field_button_set extends SPFTESTIMONIAL_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $args = wp_parse_args(
20
+ $this->field, array(
21
+ 'multiple' => false,
22
+ 'options' => array(),
23
+ )
24
+ );
25
+
26
+ $value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
27
+
28
+ echo $this->field_before();
29
+
30
+ if ( ! empty( $args['options'] ) ) {
31
+
32
+ echo '<div class="spftestimonial-siblings spftestimonial--button-group" data-multiple="' . $args['multiple'] . '">';
33
+
34
+ foreach ( $args['options'] as $key => $option ) {
35
+
36
+ $type = ( $args['multiple'] ) ? 'checkbox' : 'radio';
37
+ $extra = ( $args['multiple'] ) ? '[]' : '';
38
+ $active = ( in_array( $key, $value ) ) ? ' spftestimonial--active' : '';
39
+ $checked = ( in_array( $key, $value ) ) ? ' checked' : '';
40
+
41
+ echo '<div class="spftestimonial--sibling spftestimonial--button' . $active . '">';
42
+ echo '<input type="' . $type . '" name="' . $this->field_name( $extra ) . '" value="' . $key . '"' . $this->field_attributes() . $checked . '/>';
43
+ echo $option;
44
+ echo '</div>';
45
+
46
+ }
47
+
48
+ echo '</div>';
49
+
50
+ }
51
+
52
+ echo '<div class="clear"></div>';
53
+
54
+ echo $this->field_after();
55
+
56
+ }
57
+
58
+ }
59
+ }
admin/views/tp-metabox/fields/checkbox/checkbox.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: checkbox
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Field_checkbox' ) ) {
11
+ class SPFTESTIMONIAL_Field_checkbox extends SPFTESTIMONIAL_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $args = wp_parse_args(
20
+ $this->field, array(
21
+ 'inline' => false,
22
+ 'query_args' => array(),
23
+ )
24
+ );
25
+
26
+ $inline_class = ( $args['inline'] ) ? ' class="spftestimonial--inline-list"' : '';
27
+
28
+ echo $this->field_before();
29
+
30
+ if ( isset( $this->field['options'] ) ) {
31
+
32
+ $value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
33
+ $options = $this->field['options'];
34
+ $options = ( is_array( $options ) ) ? $options : array_filter( $this->field_data( $options, false, $args['query_args'] ) );
35
+
36
+ if ( is_array( $options ) && ! empty( $options ) ) {
37
+
38
+ echo '<ul' . $inline_class . '>';
39
+ foreach ( $options as $option_key => $option_value ) {
40
+
41
+ if ( is_array( $option_value ) && ! empty( $option_value ) ) {
42
+
43
+ echo '<li>';
44
+ echo '<ul>';
45
+ echo '<li><strong>' . $option_key . '</strong></li>';
46
+ foreach ( $option_value as $sub_key => $sub_value ) {
47
+ $checked = ( in_array( $sub_key, $value ) ) ? ' checked' : '';
48
+ echo '<li><label><input type="checkbox" name="' . $this->field_name( '[]' ) . '" value="' . $sub_key . '"' . $this->field_attributes() . $checked . '/> ' . $sub_value . '</label></li>';
49
+ }
50
+ echo '</ul>';
51
+ echo '</li>';
52
+
53
+ } else {
54
+
55
+ $checked = ( in_array( $option_key, $value ) ) ? ' checked' : '';
56
+ echo '<li><label><input type="checkbox" name="' . $this->field_name( '[]' ) . '" value="' . $option_key . '"' . $this->field_attributes() . $checked . '/> ' . $option_value . '</label></li>';
57
+
58
+ }
59
+ }
60
+ echo '</ul>';
61
+
62
+ } else {
63
+
64
+ echo ( ! empty( $this->field['empty_message'] ) ) ? $this->field['empty_message'] : esc_html__( 'No data provided for this option type.', 'testimonial-free' );
65
+
66
+ }
67
+ } else {
68
+
69
+ echo '<label class="spftestimonial-checkbox">';
70
+ echo '<input type="hidden" name="' . $this->field_name() . '" value="' . $this->value . '" class="spftestimonial--input"' . $this->field_attributes() . '/>';
71
+ echo '<input type="checkbox" class="spftestimonial--checkbox"' . checked( $this->value, 1, false ) . '/>';
72
+ echo ( ! empty( $this->field['label'] ) ) ? ' ' . $this->field['label'] : '';
73
+ echo '</label>';
74
+
75
+ }
76
+
77
+ echo $this->field_after();
78
+
79
+ }
80
+
81
+ }
82
+ }
admin/views/tp-metabox/fields/code_editor/code_editor.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: code_editor
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Field_code_editor' ) ) {
11
+ class SPFTESTIMONIAL_Field_code_editor extends SPFTESTIMONIAL_Fields {
12
+
13
+ public $version = '5.41.0';
14
+ public $cdn_url = 'https://cdn.jsdelivr.net/npm/codemirror@';
15
+
16
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
17
+ parent::__construct( $field, $value, $unique, $where, $parent );
18
+ }
19
+
20
+ public function render() {
21
+
22
+ $default_settings = array(
23
+ 'tabSize' => 2,
24
+ 'lineNumbers' => true,
25
+ 'theme' => 'default',
26
+ 'mode' => 'htmlmixed',
27
+ 'cdnURL' => $this->cdn_url . $this->version,
28
+ );
29
+
30
+ $settings = ( ! empty( $this->field['settings'] ) ) ? $this->field['settings'] : array();
31
+ $settings = wp_parse_args( $settings, $default_settings );
32
+ $encoded = htmlspecialchars( json_encode( $settings ) );
33
+
34
+ echo $this->field_before();
35
+ echo '<textarea name="' . $this->field_name() . '"' . $this->field_attributes() . ' data-editor="' . $encoded . '">' . $this->value . '</textarea>';
36
+ echo $this->field_after();
37
+
38
+ }
39
+
40
+ public function enqueue() {
41
+
42
+ // Do not loads CodeMirror in revslider page.
43
+ if ( in_array( spftestimonial_get_var( 'page' ), array( 'revslider' ) ) ) {
44
+ return; }
45
+
46
+ if ( ! wp_script_is( 'spftestimonial-codemirror' ) ) {
47
+ wp_enqueue_script( 'spftestimonial-codemirror', $this->cdn_url . $this->version . '/lib/codemirror.min.js', array( 'spftestimonial' ), $this->version, true );
48
+ wp_enqueue_script( 'spftestimonial-codemirror-loadmode', $this->cdn_url . $this->version . '/addon/mode/loadmode.min.js', array( 'spftestimonial-codemirror' ), $this->version, true );
49
+ }
50
+
51
+ if ( ! wp_style_is( 'spftestimonial-codemirror' ) ) {
52
+ wp_enqueue_style( 'spftestimonial-codemirror', $this->cdn_url . $this->version . '/lib/codemirror.min.css', array(), $this->version );
53
+ }
54
+
55
+ }
56
+
57
+ }
58
+ }
admin/views/tp-metabox/fields/color/color.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: color
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Field_color' ) ) {
11
+ class SPFTESTIMONIAL_Field_color extends SPFTESTIMONIAL_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $default_attr = ( ! empty( $this->field['default'] ) ) ? ' data-default-color="' . $this->field['default'] . '"' : '';
20
+
21
+ echo $this->field_before();
22
+ echo '<input type="text" name="' . $this->field_name() . '" value="' . $this->value . '" class="spftestimonial-color"' . $default_attr . $this->field_attributes() . '/>';
23
+ echo $this->field_after();
24
+
25
+ }
26
+
27
+ public function output() {
28
+
29
+ $output = '';
30
+ $elements = ( is_array( $this->field['output'] ) ) ? $this->field['output'] : array_filter( (array) $this->field['output'] );
31
+ $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
32
+ $mode = ( ! empty( $this->field['output_mode'] ) ) ? $this->field['output_mode'] : 'color';
33
+
34
+ if ( ! empty( $elements ) && isset( $this->value ) && $this->value !== '' ) {
35
+ foreach ( $elements as $key_property => $element ) {
36
+ if ( is_numeric( $key_property ) ) {
37
+ $output = implode( ',', $elements ) . '{' . $mode . ':' . $this->value . $important . ';}';
38
+ break;
39
+ } else {
40
+ $output .= $element . '{' . $key_property . ':' . $this->value . $important . '}';
41
+ }
42
+ }
43
+ }
44
+
45
+ $this->parent->output_css .= $output;
46
+
47
+ return $output;
48
+
49
+ }
50
+
51
+ }
52
+ }
admin/views/tp-metabox/fields/color_group/color_group.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: color_group
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Field_color_group' ) ) {
11
+ class SPFTESTIMONIAL_Field_color_group extends SPFTESTIMONIAL_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $options = ( ! empty( $this->field['options'] ) ) ? $this->field['options'] : array();
20
+
21
+ echo $this->field_before();
22
+
23
+ if ( ! empty( $options ) ) {
24
+ foreach ( $options as $key => $option ) {
25
+
26
+ $color_value = ( ! empty( $this->value[ $key ] ) ) ? $this->value[ $key ] : '';
27
+ $default_attr = ( ! empty( $this->field['default'][ $key ] ) ) ? ' data-default-color="' . $this->field['default'][ $key ] . '"' : '';
28
+
29
+ echo '<div class="spftestimonial--left spftestimonial-field-color">';
30
+ echo '<div class="spftestimonial--title">' . $option . '</div>';
31
+ echo '<input type="text" name="' . $this->field_name( '[' . $key . ']' ) . '" value="' . $color_value . '" class="spftestimonial-color"' . $default_attr . $this->field_attributes() . '/>';
32
+ echo '</div>';
33
+
34
+ }
35
+ }
36
+
37
+ echo '<div class="clear"></div>';
38
+
39
+ echo $this->field_after();
40
+
41
+ }
42
+
43
+ }
44
+ }
admin/views/tp-metabox/fields/image_select/image_select.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: image_select
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Field_image_select' ) ) {
11
+ class SPFTESTIMONIAL_Field_image_select extends SPFTESTIMONIAL_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $args = wp_parse_args(
20
+ $this->field, array(
21
+ 'multiple' => false,
22
+ 'options' => array(),
23
+ )
24
+ );
25
+
26
+ $value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
27
+
28
+ echo $this->field_before();
29
+
30
+ if ( ! empty( $args['options'] ) ) {
31
+
32
+ echo '<div class="spftestimonial-siblings spftestimonial--image-group" data-multiple="' . $args['multiple'] . '">';
33
+
34
+ $num = 1;
35
+
36
+ foreach ( $args['options'] as $key => $option ) {
37
+
38
+ $type = ( $args['multiple'] ) ? 'checkbox' : 'radio';
39
+ $extra = ( $args['multiple'] ) ? '[]' : '';
40
+ $active = ( in_array( $key, $value ) ) ? ' spftestimonial--active' : '';
41
+ $checked = ( in_array( $key, $value ) ) ? ' checked' : '';
42
+
43
+ echo '<div class="spftestimonial--sibling spftestimonial--image' . $active . '">';
44
+ echo '<img src="' . $option . '" alt="img-' . $num++ . '" />';
45
+ echo '<input type="' . $type . '" name="' . $this->field_name( $extra ) . '" value="' . $key . '"' . $this->field_attributes() . $checked . '/>';
46
+ echo '</div>';
47
+
48
+ }
49
+
50
+ echo '</div>';
51
+
52
+ }
53
+
54
+ echo '<div class="clear"></div>';
55
+
56
+ echo $this->field_after();
57
+
58
+ }
59
+
60
+ public function output() {
61
+
62
+ $output = '';
63
+ $bg_image = array();
64
+ $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
65
+ $elements = ( is_array( $this->field['output'] ) ) ? join( ',', $this->field['output'] ) : $this->field['output'];
66
+
67
+ if ( ! empty( $elements ) && isset( $this->value ) && $this->value !== '' ) {
68
+ $output = $elements . '{background-image:url(' . $this->value . ')' . $important . ';}';
69
+ }
70
+
71
+ $this->parent->output_css .= $output;
72
+
73
+ return $output;
74
+
75
+ }
76
+
77
+ }
78
+ }
admin/views/{metabox → tp-metabox/fields}/index.php RENAMED
File without changes
admin/views/tp-metabox/fields/notice/notice.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: notice
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Field_notice' ) ) {
11
+ class SPFTESTIMONIAL_Field_notice extends SPFTESTIMONIAL_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $style = ( ! empty( $this->field['style'] ) ) ? $this->field['style'] : 'normal';
20
+
21
+ echo ( ! empty( $this->field['content'] ) ) ? '<div class="spftestimonial-notice spftestimonial-notice-' . $style . '">' . $this->field['content'] . '</div>' : '';
22
+
23
+ }
24
+
25
+ }
26
+ }
admin/views/tp-metabox/fields/radio/radio.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: radio
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Field_radio' ) ) {
11
+ class SPFTESTIMONIAL_Field_radio extends SPFTESTIMONIAL_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $args = wp_parse_args(
20
+ $this->field, array(
21
+ 'inline' => false,
22
+ 'query_args' => array(),
23
+ )
24
+ );
25
+
26
+ $inline_class = ( $args['inline'] ) ? ' class="spftestimonial--inline-list"' : '';
27
+
28
+ echo $this->field_before();
29
+
30
+ if ( isset( $this->field['options'] ) ) {
31
+
32
+ $options = $this->field['options'];
33
+ $options = ( is_array( $options ) ) ? $options : array_filter( $this->field_data( $options, false, $args['query_args'] ) );
34
+
35
+ if ( is_array( $options ) && ! empty( $options ) ) {
36
+
37
+ echo '<ul' . $inline_class . '>';
38
+ foreach ( $options as $option_key => $option_value ) {
39
+
40
+ if ( is_array( $option_value ) && ! empty( $option_value ) ) {
41
+
42
+ echo '<li>';
43
+ echo '<ul>';
44
+ echo '<li><strong>' . $option_key . '</strong></li>';
45
+ foreach ( $option_value as $sub_key => $sub_value ) {
46
+ $checked = ( $sub_key == $this->value ) ? ' checked' : '';
47
+ echo '<li><label><input type="radio" name="' . $this->field_name() . '" value="' . $sub_key . '"' . $this->field_attributes() . $checked . '/> ' . $sub_value . '</label></li>';
48
+ }
49
+ echo '</ul>';
50
+ echo '</li>';
51
+
52
+ } else {
53
+
54
+ $checked = ( $option_key == $this->value ) ? ' checked' : '';
55
+ echo '<li><label><input type="radio" name="' . $this->field_name() . '" value="' . $option_key . '"' . $this->field_attributes() . $checked . '/> ' . $option_value . '</label></li>';
56
+
57
+ }
58
+ }
59
+ echo '</ul>';
60
+
61
+ } else {
62
+
63
+ echo ( ! empty( $this->field['empty_message'] ) ) ? $this->field['empty_message'] : esc_html__( 'No data provided for this option type.', 'testimonial-free' );
64
+
65
+ }
66
+ } else {
67
+ $label = ( isset( $this->field['label'] ) ) ? $this->field['label'] : '';
68
+ echo '<label><input type="radio" name="' . $this->field_name() . '" value="1"' . $this->field_attributes() . checked( $this->value, 1, false ) . '/> ' . $label . '</label>';
69
+ }
70
+
71
+ echo $this->field_after();
72
+
73
+ }
74
+
75
+ }
76
+ }
admin/views/tp-metabox/fields/rating/rating.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: Rating
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Field_rating' ) ) {
11
+ class SPFTESTIMONIAL_Field_rating extends SPFTESTIMONIAL_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $args = wp_parse_args(
20
+ $this->field, array(
21
+ 'query_args' => array(),
22
+ )
23
+ );
24
+
25
+ echo $this->field_before();
26
+
27
+ if ( isset( $this->field['options'] ) ) {
28
+
29
+ $options = $this->field['options'];
30
+ $options = ( is_array( $options ) ) ? $options : array_filter( $this->field_data( $options, false, $args['query_args'] ) );
31
+
32
+ if ( is_array( $options ) && ! empty( $options ) ) {
33
+
34
+ echo '<div class="sp-tpro-client-rating">';
35
+ foreach ( $options as $sub_key => $sub_value ) {
36
+ $checked = ( $sub_key == $this->value ) ? ' checked' : '';
37
+ echo '<input type="radio" name="' . $this->field_name() . '" id="' . $sub_key . '" value="' . $sub_key . '"' . $this->field_attributes() . $checked . '/><label for="' . $sub_key . '" title="' . $sub_value . '"><i class="fa fa-star"></i></label>';
38
+ }
39
+ echo '</div>';
40
+
41
+ } else {
42
+
43
+ echo ( ! empty( $this->field['empty_message'] ) ) ? $this->field['empty_message'] : esc_html__( 'No data provided for this option type.', 'testimonial-free' );
44
+
45
+ }
46
+ } else {
47
+ $label = ( isset( $this->field['label'] ) ) ? $this->field['label'] : '';
48
+ echo '<label><input type="radio" name="' . $this->field_name() . '" value="1"' . $this->field_attributes() . checked( $this->value, 1, false ) . '/> ' . $label . '</label>';
49
+ }
50
+
51
+ echo $this->field_after();
52
+
53
+ }
54
+
55
+ }
56
+ }
admin/views/tp-metabox/fields/select/select.php ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: select
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Field_select' ) ) {
11
+ class SPFTESTIMONIAL_Field_select extends SPFTESTIMONIAL_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $args = wp_parse_args(
20
+ $this->field, array(
21
+ 'placeholder' => '',
22
+ 'chosen' => false,
23
+ 'multiple' => false,
24
+ 'sortable' => false,
25
+ 'ajax' => false,
26
+ 'settings' => array(),
27
+ 'query_args' => array(),
28
+ )
29
+ );
30
+
31
+ $this->value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
32
+
33
+ echo $this->field_before();
34
+
35
+ if ( isset( $this->field['options'] ) ) {
36
+
37
+ if ( ! empty( $args['ajax'] ) ) {
38
+ $args['settings']['data']['type'] = $args['options'];
39
+ $args['settings']['data']['nonce'] = wp_create_nonce( 'spftestimonial_chosen_ajax_nonce' );
40
+ if ( ! empty( $args['query_args'] ) ) {
41
+ $args['settings']['data']['query_args'] = $args['query_args'];
42
+ }
43
+ }
44
+
45
+ $chosen_rtl = ( is_rtl() ) ? ' chosen-rtl' : '';
46
+ $multiple_name = ( $args['multiple'] ) ? '[]' : '';
47
+ $multiple_attr = ( $args['multiple'] ) ? ' multiple="multiple"' : '';
48
+ $chosen_sortable = ( $args['chosen'] && $args['sortable'] ) ? ' spftestimonial-chosen-sortable' : '';
49
+ $chosen_ajax = ( $args['chosen'] && $args['ajax'] ) ? ' spftestimonial-chosen-ajax' : '';
50
+ $placeholder_attr = ( $args['chosen'] && $args['placeholder'] ) ? ' data-placeholder="' . $args['placeholder'] . '"' : '';
51
+ $field_class = ( $args['chosen'] ) ? ' class="spftestimonial-chosen' . $chosen_rtl . $chosen_sortable . $chosen_ajax . '"' : '';
52
+ $field_name = $this->field_name( $multiple_name );
53
+ $field_attr = $this->field_attributes();
54
+ $maybe_options = $this->field['options'];
55
+ $chosen_data_attr = ( $args['chosen'] && ! empty( $args['settings'] ) ) ? ' data-chosen-settings="' . esc_attr( json_encode( $args['settings'] ) ) . '"' : '';
56
+
57
+ if ( is_string( $maybe_options ) && ! empty( $args['chosen'] ) && ! empty( $args['ajax'] ) ) {
58
+ $options = $this->field_wp_query_data_title( $maybe_options, $this->value );
59
+ } elseif ( is_string( $maybe_options ) ) {
60
+ $options = $this->field_data( $maybe_options, false, $args['query_args'] );
61
+ } else {
62
+ $options = $maybe_options;
63
+ }
64
+
65
+ if ( ( is_array( $options ) && ! empty( $options ) ) || ! empty( $args['chosen'] ) ) {
66
+
67
+ if ( ! empty( $args['chosen'] ) && ! empty( $args['multiple'] ) ) {
68
+
69
+ echo '<select name="' . $field_name . '" class="spftestimonial-hidden-select spftestimonial-hidden"' . $multiple_attr . $field_attr . '>';
70
+ foreach ( $this->value as $option_key ) {
71
+ echo '<option value="' . $option_key . '" selected>' . $option_key . '</option>';
72
+ }
73
+ echo '</select>';
74
+
75
+ $field_name = '_pseudo';
76
+ $field_attr = '';
77
+
78
+ }
79
+
80
+ echo '<select name="' . $field_name . '"' . $field_class . $multiple_attr . $placeholder_attr . $field_attr . $chosen_data_attr . '>';
81
+
82
+ if ( $args['placeholder'] && empty( $args['multiple'] ) ) {
83
+ if ( ! empty( $args['chosen'] ) ) {
84
+ echo '<option value=""></option>';
85
+ } else {
86
+ echo '<option value="">' . $args['placeholder'] . '</option>';
87
+ }
88
+ }
89
+
90
+ foreach ( $options as $option_key => $option ) {
91
+
92
+ if ( is_array( $option ) && ! empty( $option ) ) {
93
+
94
+ echo '<optgroup label="' . $option_key . '">';
95
+
96
+ foreach ( $option as $sub_key => $sub_value ) {
97
+ $selected = ( in_array( $sub_key, $this->value ) ) ? ' selected' : '';
98
+ echo '<option value="' . $sub_key . '" ' . $selected . '>' . $sub_value . '</option>';
99
+ }
100
+
101
+ echo '</optgroup>';
102
+
103
+ } else {
104
+ $selected = ( in_array( $option_key, $this->value ) ) ? ' selected' : '';
105
+ echo '<option value="' . $option_key . '" ' . $selected . '>' . $option . '</option>';
106
+ }
107
+ }
108
+
109
+ echo '</select>';
110
+
111
+ } else {
112
+
113
+ echo ( ! empty( $this->field['empty_message'] ) ) ? $this->field['empty_message'] : esc_html__( 'No data provided for this option type.', 'testimonial-free' );
114
+
115
+ }
116
+ }
117
+
118
+ echo $this->field_after();
119
+
120
+ }
121
+
122
+ public function enqueue() {
123
+
124
+ if ( ! wp_script_is( 'jquery-ui-sortable' ) ) {
125
+ wp_enqueue_script( 'jquery-ui-sortable' );
126
+ }
127
+
128
+ }
129
+
130
+ }
131
+ }
admin/views/tp-metabox/fields/select_f/select_f.php ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: select
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Field_select_f' ) ) {
11
+ class SPFTESTIMONIAL_Field_select_f extends SPFTESTIMONIAL_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $args = wp_parse_args(
20
+ $this->field, array(
21
+ 'placeholder' => '',
22
+ 'chosen' => false,
23
+ 'multiple' => false,
24
+ 'sortable' => false,
25
+ 'ajax' => false,
26
+ 'settings' => array(),
27
+ 'query_args' => array(),
28
+ )
29
+ );
30
+
31
+ $this->value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
32
+
33
+ echo $this->field_before();
34
+
35
+ if ( isset( $this->field['options'] ) ) {
36
+
37
+ if ( ! empty( $args['ajax'] ) ) {
38
+ $args['settings']['data']['type'] = $args['options'];
39
+ $args['settings']['data']['nonce'] = wp_create_nonce( 'spftestimonial_chosen_ajax_nonce' );
40
+ if ( ! empty( $args['query_args'] ) ) {
41
+ $args['settings']['data']['query_args'] = $args['query_args'];
42
+ }
43
+ }
44
+
45
+ $chosen_rtl = ( is_rtl() ) ? ' chosen-rtl' : '';
46
+ $multiple_name = ( $args['multiple'] ) ? '[]' : '';
47
+ $multiple_attr = ( $args['multiple'] ) ? ' multiple="multiple"' : '';
48
+ $chosen_sortable = ( $args['chosen'] && $args['sortable'] ) ? ' spftestimonial-chosen-sortable' : '';
49
+ $chosen_ajax = ( $args['chosen'] && $args['ajax'] ) ? ' spftestimonial-chosen-ajax' : '';
50
+ $placeholder_attr = ( $args['chosen'] && $args['placeholder'] ) ? ' data-placeholder="' . $args['placeholder'] . '"' : '';
51
+ $field_class = ( $args['chosen'] ) ? ' class="spftestimonial-chosen' . $chosen_rtl . $chosen_sortable . $chosen_ajax . '"' : '';
52
+ $field_name = $this->field_name( $multiple_name );
53
+ $field_attr = $this->field_attributes();
54
+ $maybe_options = $this->field['options'];
55
+ $chosen_data_attr = ( $args['chosen'] && ! empty( $args['settings'] ) ) ? ' data-chosen-settings="' . esc_attr( json_encode( $args['settings'] ) ) . '"' : '';
56
+
57
+ if ( is_string( $maybe_options ) && ! empty( $args['chosen'] ) && ! empty( $args['ajax'] ) ) {
58
+ $options = $this->field_wp_query_data_title( $maybe_options, $this->value );
59
+ } elseif ( is_string( $maybe_options ) ) {
60
+ $options = $this->field_data( $maybe_options, false, $args['query_args'] );
61
+ } else {
62
+ $options = $maybe_options;
63
+ }
64
+
65
+ if ( ( is_array( $options ) && ! empty( $options ) ) || ! empty( $args['chosen'] ) ) {
66
+
67
+ if ( ! empty( $args['chosen'] ) && ! empty( $args['multiple'] ) ) {
68
+
69
+ echo '<select name="' . $field_name . '" class="spftestimonial-hidden-select spftestimonial-hidden"' . $multiple_attr . $field_attr . '>';
70
+ foreach ( $this->value as $option_key ) {
71
+ echo '<option value="' . $option_key . '" selected>' . $option_key . '</option>';
72
+ }
73
+ echo '</select>';
74
+
75
+ $field_name = '_pseudo';
76
+ $field_attr = '';
77
+
78
+ }
79
+
80
+ echo '<select name="' . $field_name . '"' . $field_class . $multiple_attr . $placeholder_attr . $field_attr . $chosen_data_attr . '>';
81
+
82
+ if ( $args['placeholder'] && empty( $args['multiple'] ) ) {
83
+ if ( ! empty( $args['chosen'] ) ) {
84
+ echo '<option value=""></option>';
85
+ } else {
86
+ echo '<option value="">' . $args['placeholder'] . '</option>';
87
+ }
88
+ }
89
+
90
+ foreach ( $options as $option_key => $option ) {
91
+ $pro_only_value = isset( $option['pro_only'] ) ? $option['pro_only'] : '';
92
+ $pro_only = true == $pro_only_value ? ' disabled' : '';
93
+ $selected = ( in_array( $option_key, $this->value ) ) ? ' selected' : '';
94
+ echo '<option' . $pro_only . ' value="' . $option_key . '" ' . $selected . '>' . $option['name'] . '</option>';
95
+ }
96
+
97
+ echo '</select>';
98
+
99
+ } else {
100
+
101
+ echo ( ! empty( $this->field['empty_message'] ) ) ? $this->field['empty_message'] : esc_html__( 'No data provided for this option type.', 'testimonial-free' );
102
+
103
+ }
104
+ }
105
+
106
+ echo $this->field_after();
107
+
108
+ }
109
+
110
+ }
111
+ }
admin/views/tp-metabox/fields/spacing/spacing.php ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: spacing
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Field_spacing' ) ) {
11
+ class SPFTESTIMONIAL_Field_spacing extends SPFTESTIMONIAL_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $args = wp_parse_args(
20
+ $this->field, array(
21
+ 'top_icon' => '<i class="fa fa-long-arrow-up"></i>',
22
+ 'right_icon' => '<i class="fa fa-long-arrow-right"></i>',
23
+ 'bottom_icon' => '<i class="fa fa-long-arrow-down"></i>',
24
+ 'left_icon' => '<i class="fa fa-long-arrow-left"></i>',
25
+ 'all_icon' => '<i class="fa fa-arrows"></i>',
26
+ 'top_placeholder' => esc_html__( 'top', 'testimonial-free' ),
27
+ 'right_placeholder' => esc_html__( 'right', 'testimonial-free' ),
28
+ 'bottom_placeholder' => esc_html__( 'bottom', 'testimonial-free' ),
29
+ 'left_placeholder' => esc_html__( 'left', 'testimonial-free' ),
30
+ 'all_placeholder' => esc_html__( 'all', 'testimonial-free' ),
31
+ 'top' => true,
32
+ 'left' => true,
33
+ 'bottom' => true,
34
+ 'right' => true,
35
+ 'unit' => true,
36
+ 'show_units' => true,
37
+ 'all' => false,
38
+ 'units' => array( 'px', '%', 'em' ),
39
+ )
40
+ );
41
+
42
+ $default_values = array(
43
+ 'top' => '',
44
+ 'right' => '',
45
+ 'bottom' => '',
46
+ 'left' => '',
47
+ 'all' => '',
48
+ 'unit' => 'px',
49
+ );
50
+
51
+ $value = wp_parse_args( $this->value, $default_values );
52
+
53
+ echo $this->field_before();
54
+
55
+ if ( ! empty( $args['all'] ) ) {
56
+
57
+ $placeholder = ( ! empty( $args['all_placeholder'] ) ) ? ' placeholder="' . $args['all_placeholder'] . '"' : '';
58
+
59
+ echo '<div class="spftestimonial--input">';
60
+ echo ( ! empty( $args['all_icon'] ) ) ? '<span class="spftestimonial--label spftestimonial--label-icon">' . $args['all_icon'] . '</span>' : '';
61
+ echo '<input type="text" name="' . $this->field_name( '[all]' ) . '" value="' . $value['all'] . '"' . $placeholder . ' class="spftestimonial-number" />';
62
+ echo ( count( $args['units'] ) === 1 && ! empty( $args['unit'] ) ) ? '<span class="spftestimonial--label spftestimonial--label-unit">' . $args['units'][0] . '</span>' : '';
63
+ echo '</div>';
64
+
65
+ } else {
66
+
67
+ $properties = array();
68
+
69
+ foreach ( array( 'top', 'right', 'bottom', 'left' ) as $prop ) {
70
+ if ( ! empty( $args[ $prop ] ) ) {
71
+ $properties[] = $prop;
72
+ }
73
+ }
74
+
75
+ $properties = ( $properties === array( 'right', 'left' ) ) ? array_reverse( $properties ) : $properties;
76
+
77
+ foreach ( $properties as $property ) {
78
+
79
+ $placeholder = ( ! empty( $args[ $property . '_placeholder' ] ) ) ? ' placeholder="' . $args[ $property . '_placeholder' ] . '"' : '';
80
+
81
+ echo '<div class="spftestimonial--input">';
82
+ echo ( ! empty( $args[ $property . '_icon' ] ) ) ? '<span class="spftestimonial--label spftestimonial--label-icon">' . $args[ $property . '_icon' ] . '</span>' : '';
83
+ echo '<input type="text" name="' . $this->field_name( '[' . $property . ']' ) . '" value="' . $value[ $property ] . '"' . $placeholder . ' class="spftestimonial-number" />';
84
+ echo ( count( $args['units'] ) === 1 && ! empty( $args['unit'] ) ) ? '<span class="spftestimonial--label spftestimonial--label-unit">' . $args['units'][0] . '</span>' : '';
85
+ echo '</div>';
86
+
87
+ }
88
+ }
89
+
90
+ if ( ! empty( $args['unit'] ) && ! empty( $args['show_units'] ) && count( $args['units'] ) > 1 ) {
91
+ echo '<select name="' . $this->field_name( '[unit]' ) . '">';
92
+ foreach ( $args['units'] as $unit ) {
93
+ $selected = ( $value['unit'] === $unit ) ? ' selected' : '';
94
+ echo '<option value="' . $unit . '"' . $selected . '>' . $unit . '</option>';
95
+ }
96
+ echo '</select>';
97
+ }
98
+
99
+ echo '<div class="clear"></div>';
100
+
101
+ echo $this->field_after();
102
+
103
+ }
104
+
105
+ public function output() {
106
+
107
+ $output = '';
108
+ $element = ( is_array( $this->field['output'] ) ) ? join( ',', $this->field['output'] ) : $this->field['output'];
109
+ $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
110
+ $unit = ( ! empty( $this->value['unit'] ) ) ? $this->value['unit'] : 'px';
111
+
112
+ $mode = ( ! empty( $this->field['output_mode'] ) ) ? $this->field['output_mode'] : 'padding';
113
+ $mode = ( $mode === 'relative' || $mode === 'absolute' || $mode === 'none' ) ? '' : $mode;
114
+ $mode = ( ! empty( $mode ) ) ? $mode . '-' : '';
115
+
116
+ if ( ! empty( $this->field['all'] ) && isset( $this->value['all'] ) && $this->value['all'] !== '' ) {
117
+
118
+ $output = $element . '{';
119
+ $output .= $mode . 'top:' . $this->value['all'] . $unit . $important . ';';
120
+ $output .= $mode . 'right:' . $this->value['all'] . $unit . $important . ';';
121
+ $output .= $mode . 'bottom:' . $this->value['all'] . $unit . $important . ';';
122
+ $output .= $mode . 'left:' . $this->value['all'] . $unit . $important . ';';
123
+ $output .= '}';
124
+
125
+ } else {
126
+
127
+ $top = ( isset( $this->value['top'] ) && $this->value['top'] !== '' ) ? $mode . 'top:' . $this->value['top'] . $unit . $important . ';' : '';
128
+ $right = ( isset( $this->value['right'] ) && $this->value['right'] !== '' ) ? $mode . 'right:' . $this->value['right'] . $unit . $important . ';' : '';
129
+ $bottom = ( isset( $this->value['bottom'] ) && $this->value['bottom'] !== '' ) ? $mode . 'bottom:' . $this->value['bottom'] . $unit . $important . ';' : '';
130
+ $left = ( isset( $this->value['left'] ) && $this->value['left'] !== '' ) ? $mode . 'left:' . $this->value['left'] . $unit . $important . ';' : '';
131
+
132
+ if ( $top !== '' || $right !== '' || $bottom !== '' || $left !== '' ) {
133
+ $output = $element . '{' . $top . $right . $bottom . $left . '}';
134
+ }
135
+ }
136
+
137
+ $this->parent->output_css .= $output;
138
+
139
+ return $output;
140
+
141
+ }
142
+
143
+ }
144
+ }
admin/views/tp-metabox/fields/spinner/spinner.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: spinner
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Field_spinner' ) ) {
11
+ class SPFTESTIMONIAL_Field_spinner extends SPFTESTIMONIAL_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $args = wp_parse_args(
20
+ $this->field, array(
21
+ 'max' => 100,
22
+ 'min' => 0,
23
+ 'step' => 1,
24
+ 'unit' => '',
25
+ )
26
+ );
27
+
28
+ echo $this->field_before();
29
+ echo '<div class="spftestimonial--spin">';
30
+ echo '<input type="text" name="' . $this->field_name() . '" value="' . $this->value . '"' . $this->field_attributes( array( 'class' => 'spftestimonial-number' ) ) . ' data-max="' . $args['max'] . '" data-min="' . $args['min'] . '" data-step="' . $args['step'] . '"/>';
31
+ echo ( ! empty( $args['unit'] ) ) ? '<div class="spftestimonial--unit">' . $args['unit'] . '</div>' : '';
32
+ echo '</div>';
33
+ echo '<div class="clear"></div>';
34
+ echo $this->field_after();
35
+
36
+ }
37
+
38
+ public function enqueue() {
39
+
40
+ if ( ! wp_script_is( 'jquery-ui-spinner' ) ) {
41
+ wp_enqueue_script( 'jquery-ui-spinner' );
42
+ }
43
+
44
+ }
45
+
46
+ public function output() {
47
+
48
+ $output = '';
49
+ $elements = ( is_array( $this->field['output'] ) ) ? $this->field['output'] : array_filter( (array) $this->field['output'] );
50
+ $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
51
+ $mode = ( ! empty( $this->field['output_mode'] ) ) ? $this->field['output_mode'] : 'width';
52
+ $unit = ( ! empty( $this->field['unit'] ) ) ? $this->field['unit'] : 'px';
53
+
54
+ if ( ! empty( $elements ) && isset( $this->value ) && $this->value !== '' ) {
55
+ foreach ( $elements as $key_property => $element ) {
56
+ if ( is_numeric( $key_property ) ) {
57
+ if ( $mode ) {
58
+ $output = implode( ',', $elements ) . '{' . $mode . ':' . $this->value . $unit . $important . ';}';
59
+ }
60
+ break;
61
+ } else {
62
+ $output .= $element . '{' . $key_property . ':' . $this->value . $unit . $important . '}';
63
+ }
64
+ }
65
+ }
66
+
67
+ $this->parent->output_css .= $output;
68
+
69
+ return $output;
70
+
71
+ }
72
+
73
+ }
74
+ }
admin/views/tp-metabox/fields/subheading/subheading.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2
+ /**
3
+ *
4
+ * Field: subheading
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ *
9
+ */
10
+ if( ! class_exists( 'SPFTESTIMONIAL_Field_subheading' ) ) {
11
+ class SPFTESTIMONIAL_Field_subheading extends SPFTESTIMONIAL_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ echo ( ! empty( $this->field['content'] ) ) ? $this->field['content'] : '';
20
+
21
+ }
22
+
23
+ }
24
+ }
admin/views/tp-metabox/fields/submessage/submessage.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: submessage
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Field_submessage' ) ) {
11
+ class SPFTESTIMONIAL_Field_submessage extends SPFTESTIMONIAL_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $style = ( ! empty( $this->field['style'] ) ) ? $this->field['style'] : 'normal';
20
+
21
+ echo '<div class="spftestimonial-submessage spftestimonial-submessage-' . $style . '">' . $this->field['content'] . '</div>';
22
+
23
+ }
24
+
25
+ }
26
+ }
admin/views/tp-metabox/fields/switcher/switcher.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: switcher
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Field_switcher' ) ) {
11
+ class SPFTESTIMONIAL_Field_switcher extends SPFTESTIMONIAL_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $active = ( ! empty( $this->value ) ) ? ' spftestimonial--active' : '';
20
+ $text_on = ( ! empty( $this->field['text_on'] ) ) ? $this->field['text_on'] : esc_html__( 'On', 'testimonial-free' );
21
+ $text_off = ( ! empty( $this->field['text_off'] ) ) ? $this->field['text_off'] : esc_html__( 'Off', 'testimonial-free' );
22
+ $text_width = ( ! empty( $this->field['text_width'] ) ) ? ' style="width: ' . $this->field['text_width'] . 'px;"' : '';
23
+
24
+ echo $this->field_before();
25
+
26
+ echo '<div class="spftestimonial--switcher' . $active . '"' . $text_width . '>';
27
+ echo '<span class="spftestimonial--on">' . $text_on . '</span>';
28
+ echo '<span class="spftestimonial--off">' . $text_off . '</span>';
29
+ echo '<span class="spftestimonial--ball"></span>';
30
+ echo '<input type="text" name="' . $this->field_name() . '" value="' . $this->value . '"' . $this->field_attributes() . ' />';
31
+ echo '</div>';
32
+
33
+ echo ( ! empty( $this->field['label'] ) ) ? '<span class="spftestimonial--label">' . $this->field['label'] . '</span>' : '';
34
+
35
+ echo '<div class="clear"></div>';
36
+
37
+ echo $this->field_after();
38
+
39
+ }
40
+
41
+ }
42
+ }
admin/views/tp-metabox/fields/text/text.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: text
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Field_text' ) ) {
11
+ class SPFTESTIMONIAL_Field_text extends SPFTESTIMONIAL_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $type = ( ! empty( $this->field['attributes']['type'] ) ) ? $this->field['attributes']['type'] : 'text';
20
+
21
+ echo $this->field_before();
22
+
23
+ echo '<input type="' . $type . '" name="' . $this->field_name() . '" value="' . $this->value . '"' . $this->field_attributes() . ' />';
24
+
25
+ echo $this->field_after();
26
+
27
+ }
28
+
29
+ }
30
+ }
admin/views/tp-metabox/fields/text_f/text_f.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: text
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Field_text_f' ) ) {
11
+ class SPFTESTIMONIAL_Field_text_f extends SPFTESTIMONIAL_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ echo $this->field_before();
20
+
21
+ echo '<input type="text" disabled="" />';
22
+
23
+ echo $this->field_after();
24
+
25
+ }
26
+
27
+ }
28
+ }
admin/views/tp-metabox/fields/typography/google-fonts.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+
4
+ if ( ! function_exists( 'spftestimonial_get_google_fonts' ) ) {
5
+ function spftestimonial_get_google_fonts() {
6
+ return array(
7
+ 'Open Sans' => array( array( '300', '300italic', 'normal', 'italic', '600', '600italic', '700', '700italic', '800', '800italic' ), array( 'latin-ext', 'greek-ext', 'greek', 'latin', 'cyrillic', 'vietnamese', 'cyrillic-ext' ) ),
8
+ 'Open Sans Condensed' => array( array( '300', '300italic', '700' ), array( 'latin-ext', 'greek-ext', 'greek', 'latin', 'cyrillic', 'vietnamese', 'cyrillic-ext' ) ),
9
+ );
10
+ }
11
+ }
admin/views/tp-metabox/fields/typography/typography.php ADDED
@@ -0,0 +1,549 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: typography
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Field_typography' ) ) {
11
+ class SPFTESTIMONIAL_Field_typography extends SPFTESTIMONIAL_Fields {
12
+
13
+ public $chosen = false;
14
+
15
+ public $value = array();
16
+
17
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
18
+ parent::__construct( $field, $value, $unique, $where, $parent );
19
+ }
20
+
21
+ public function render() {
22
+
23
+ echo $this->field_before();
24
+
25
+ $args = wp_parse_args(
26
+ $this->field, array(
27
+ 'font_family' => true,
28
+ 'font_weight' => true,
29
+ 'font_style' => true,
30
+ 'font_size' => true,
31
+ 'line_height' => true,
32
+ 'letter_spacing' => true,
33
+ 'text_align' => true,
34
+ 'text_transform' => true,
35
+ 'color' => true,
36
+ 'chosen' => true,
37
+ 'preview' => true,
38
+ 'subset' => true,
39
+ 'multi_subset' => false,
40
+ 'extra_styles' => false,
41
+ 'backup_font_family' => false,
42
+ 'font_variant' => false,
43
+ 'word_spacing' => false,
44
+ 'text_decoration' => false,
45
+ 'custom_style' => false,
46
+ 'exclude' => '',
47
+ 'unit' => 'px',
48
+ 'preview_text' => 'The quick brown fox jumps over the lazy dog',
49
+ )
50
+ );
51
+
52
+ $default_value = array(
53
+ 'font-family' => '',
54
+ 'font-weight' => '',
55
+ 'font-style' => '',
56
+ 'font-variant' => '',
57
+ 'font-size' => '',
58
+ 'line-height' => '',
59
+ 'letter-spacing' => '',
60
+ 'word-spacing' => '',
61
+ 'text-align' => '',
62
+ 'text-transform' => '',
63
+ 'text-decoration' => '',
64
+ 'backup-font-family' => '',
65
+ 'color' => '',
66
+ 'custom-style' => '',
67
+ 'type' => '',
68
+ 'subset' => '',
69
+ 'extra-styles' => array(),
70
+ );
71
+
72
+ $default_value = ( ! empty( $this->field['default'] ) ) ? wp_parse_args( $this->field['default'], $default_value ) : $default_value;
73
+ $this->value = wp_parse_args( $this->value, $default_value );
74
+ $this->chosen = $args['chosen'];
75
+ $chosen_class = ( $this->chosen ) ? ' spftestimonial--chosen' : '';
76
+
77
+ echo '<div class="spftestimonial--typography' . $chosen_class . '" data-unit="' . $args['unit'] . '" data-exclude="' . $args['exclude'] . '">';
78
+
79
+ echo '<div class="spftestimonial--blocks spftestimonial--blocks-selects">';
80
+
81
+ //
82
+ // Font Family
83
+ if ( ! empty( $args['font_family'] ) ) {
84
+ echo '<div class="spftestimonial--block">';
85
+ echo '<div class="spftestimonial--title">' . esc_html__( 'Font Family', 'testimonial-free' ) . '</div>';
86
+ echo $this->create_select( array( $this->value['font-family'] => $this->value['font-family'] ), 'font-family', esc_html__( 'Select a font', 'testimonial-free' ) );
87
+ echo '</div>';
88
+ }
89
+
90
+ //
91
+ // Backup Font Family
92
+ if ( ! empty( $args['backup_font_family'] ) ) {
93
+ echo '<div class="spftestimonial--block spftestimonial--block-backup-font-family hidden">';
94
+ echo '<div class="spftestimonial--title">' . esc_html__( 'Backup Font Family', 'testimonial-free' ) . '</div>';
95
+ echo $this->create_select(
96
+ apply_filters(
97
+ 'spftestimonial_field_typography_backup_font_family', array(
98
+ 'Arial, Helvetica, sans-serif',
99
+ "'Arial Black', Gadget, sans-serif",
100
+ "'Comic Sans MS', cursive, sans-serif",
101
+ 'Impact, Charcoal, sans-serif',
102
+ "'Lucida Sans Unicode', 'Lucida Grande', sans-serif",
103
+ 'Tahoma, Geneva, sans-serif',
104
+ "'Trebuchet MS', Helvetica, sans-serif'",
105
+ 'Verdana, Geneva, sans-serif',
106
+ "'Courier New', Courier, monospace",
107
+ "'Lucida Console', Monaco, monospace",
108
+ 'Georgia, serif',
109
+ 'Palatino Linotype',
110
+ )
111
+ ), 'backup-font-family', esc_html__( 'Default', 'testimonial-free' )
112
+ );
113
+ echo '</div>';
114
+ }
115
+
116
+ //
117
+ // Font Style and Extra Style Select
118
+ if ( ! empty( $args['font_weight'] ) || ! empty( $args['font_style'] ) ) {
119
+
120
+ //
121
+ // Font Style Select
122
+ echo '<div class="spftestimonial--block spftestimonial--block-font-style hidden">';
123
+ echo '<div class="spftestimonial--title">' . esc_html__( 'Font Style', 'testimonial-free' ) . '</div>';
124
+ echo '<select disabled class="spftestimonial--font-style-select" data-placeholder="Default">';
125
+ echo '<option value="">' . ( ! $this->chosen ? esc_html__( 'Default', 'testimonial-free' ) : '' ) . '</option>';
126
+ if ( ! empty( $this->value['font-weight'] ) || ! empty( $this->value['font-style'] ) ) {
127
+ echo '<option value="' . strtolower( $this->value['font-weight'] . $this->value['font-style'] ) . '" selected></option>';
128
+ }
129
+ echo '</select>';
130
+ echo '<input type="hidden" name="' . $this->field_name( '[font-weight]' ) . '" class="spftestimonial--font-weight" value="' . $this->value['font-weight'] . '" />';
131
+ echo '<input type="hidden" name="' . $this->field_name( '[font-style]' ) . '" class="spftestimonial--font-style" value="' . $this->value['font-style'] . '" />';
132
+
133
+ //
134
+ // Extra Font Style Select
135
+ if ( ! empty( $args['extra_styles'] ) ) {
136
+ echo '<div class="spftestimonial--block-extra-styles hidden">';
137
+ echo ( ! $this->chosen ) ? '<div class="spftestimonial--title">' . esc_html__( 'Load Extra Styles', 'testimonial-free' ) . '</div>' : '';
138
+ $placeholder = ( $this->chosen ) ? esc_html__( 'Load Extra Styles', 'testimonial-free' ) : esc_html__( 'Default', 'testimonial-free' );
139
+ echo $this->create_select( $this->value['extra-styles'], 'extra-styles', $placeholder, true );
140
+ echo '</div>';
141
+ }
142
+
143
+ echo '</div>';
144
+
145
+ }
146
+
147
+ //
148
+ // Subset
149
+ if ( ! empty( $args['subset'] ) ) {
150
+ echo '<div class="spftestimonial--block spftestimonial--block-subset hidden">';
151
+ echo '<div class="spftestimonial--title">' . esc_html__( 'Subset', 'testimonial-free' ) . '</div>';
152
+ $subset = ( is_array( $this->value['subset'] ) ) ? $this->value['subset'] : array_filter( (array) $this->value['subset'] );
153
+ echo $this->create_select( $subset, 'subset', esc_html__( 'Default', 'testimonial-free' ), $args['multi_subset'] );
154
+ echo '</div>';
155
+ }
156
+
157
+ //
158
+ // Text Align
159
+ if ( ! empty( $args['text_align'] ) ) {
160
+ echo '<div class="spftestimonial--block">';
161
+ echo '<div class="spftestimonial--title">' . esc_html__( 'Text Align', 'testimonial-free' ) . '</div>';
162
+ echo $this->create_select(
163
+ array(
164
+ 'inherit' => esc_html__( 'Inherit', 'testimonial-free' ),
165
+ 'left' => esc_html__( 'Left', 'testimonial-free' ),
166
+ 'center' => esc_html__( 'Center', 'testimonial-free' ),
167
+ 'right' => esc_html__( 'Right', 'testimonial-free' ),
168
+ 'justify' => esc_html__( 'Justify', 'testimonial-free' ),
169
+ 'initial' => esc_html__( 'Initial', 'testimonial-free' ),
170
+ ), 'text-align', esc_html__( 'Default', 'testimonial-free' )
171
+ );
172
+ echo '</div>';
173
+ }
174
+
175
+ //
176
+ // Font Variant
177
+ if ( ! empty( $args['font_variant'] ) ) {
178
+ echo '<div class="spftestimonial--block">';
179
+ echo '<div class="spftestimonial--title">' . esc_html__( 'Font Variant', 'testimonial-free' ) . '</div>';
180
+ echo $this->create_select(
181
+ array(
182
+ 'normal' => esc_html__( 'Normal', 'testimonial-free' ),
183
+ 'small-caps' => esc_html__( 'Small Caps', 'testimonial-free' ),
184
+ 'all-small-caps' => esc_html__( 'All Small Caps', 'testimonial-free' ),
185
+ ), 'font-variant', esc_html__( 'Default', 'testimonial-free' )
186
+ );
187
+ echo '</div>';
188
+ }
189
+
190
+ //
191
+ // Text Transform
192
+ if ( ! empty( $args['text_transform'] ) ) {
193
+ echo '<div class="spftestimonial--block">';
194
+ echo '<div class="spftestimonial--title">' . esc_html__( 'Text Transform', 'testimonial-free' ) . '</div>';
195
+ echo $this->create_select(
196
+ array(
197
+ 'none' => esc_html__( 'None', 'testimonial-free' ),
198
+ 'capitalize' => esc_html__( 'Capitalize', 'testimonial-free' ),
199
+ 'uppercase' => esc_html__( 'Uppercase', 'testimonial-free' ),
200
+ 'lowercase' => esc_html__( 'Lowercase', 'testimonial-free' ),
201
+ ), 'text-transform', esc_html__( 'Default', 'testimonial-free' )
202
+ );
203
+ echo '</div>';
204
+ }
205
+
206
+ //
207
+ // Text Decoration
208
+ if ( ! empty( $args['text_decoration'] ) ) {
209
+ echo '<div class="spftestimonial--block">';
210
+ echo '<div class="spftestimonial--title">' . esc_html__( 'Text Decoration', 'testimonial-free' ) . '</div>';
211
+ echo $this->create_select(
212
+ array(
213
+ 'none' => esc_html__( 'None', 'testimonial-free' ),
214
+ 'underline' => esc_html__( 'Solid', 'testimonial-free' ),
215
+ 'underline double' => esc_html__( 'Double', 'testimonial-free' ),
216
+ 'underline dotted' => esc_html__( 'Dotted', 'testimonial-free' ),
217
+ 'underline dashed' => esc_html__( 'Dashed', 'testimonial-free' ),
218
+ 'underline wavy' => esc_html__( 'Wavy', 'testimonial-free' ),
219
+ 'underline overline' => esc_html__( 'Overline', 'testimonial-free' ),
220
+ 'line-through' => esc_html__( 'Line-through', 'testimonial-free' ),
221
+ ), 'text-decoration', esc_html__( 'Default', 'testimonial-free' )
222
+ );
223
+ echo '</div>';
224
+ }
225
+
226
+ echo '</div>';
227
+
228
+ echo '<div class="spftestimonial--blocks spftestimonial--blocks-inputs">';
229
+
230
+ //
231
+ // Font Size
232
+ if ( ! empty( $args['font_size'] ) ) {
233
+ echo '<div class="spftestimonial--block">';
234
+ echo '<div class="spftestimonial--title">' . esc_html__( 'Font Size', 'testimonial-free' ) . '</div>';
235
+ echo '<div class="spftestimonial--blocks">';
236
+ echo '<div class="spftestimonial--block"><input disabled type="text" name="' . $this->field_name( '[font-size]' ) . '" class="spftestimonial--font-size spftestimonial--input spftestimonial-number" value="' . $this->value['font-size'] . '" /></div>';
237
+ echo '<div class="spftestimonial--block spftestimonial--unit">' . $args['unit'] . '</div>';
238
+ echo '</div>';
239
+ echo '</div>';
240
+ }
241
+
242
+ //
243
+ // Line Height
244
+ if ( ! empty( $args['line_height'] ) ) {
245
+ echo '<div class="spftestimonial--block">';
246
+ echo '<div class="spftestimonial--title">' . esc_html__( 'Line Height', 'testimonial-free' ) . '</div>';
247
+ echo '<div class="spftestimonial--blocks">';
248
+ echo '<div class="spftestimonial--block"><input disabled type="text" name="' . $this->field_name( '[line-height]' ) . '" class="spftestimonial--line-height spftestimonial--input spftestimonial-number" value="' . $this->value['line-height'] . '" /></div>';
249
+ echo '<div class="spftestimonial--block spftestimonial--unit">' . $args['unit'] . '</div>';
250
+ echo '</div>';
251
+ echo '</div>';
252
+ }
253
+
254
+ //
255
+ // Letter Spacing
256
+ if ( ! empty( $args['letter_spacing'] ) ) {
257
+ echo '<div class="spftestimonial--block">';
258
+ echo '<div class="spftestimonial--title">' . esc_html__( 'Letter Spacing', 'testimonial-free' ) . '</div>';
259
+ echo '<div class="spftestimonial--blocks">';
260
+ echo '<div class="spftestimonial--block"><input disabled type="text" name="' . $this->field_name( '[letter-spacing]' ) . '" class="spftestimonial--letter-spacing spftestimonial--input spftestimonial-number" value="' . $this->value['letter-spacing'] . '" /></div>';
261
+ echo '<div class="spftestimonial--block spftestimonial--unit">' . $args['unit'] . '</div>';
262
+ echo '</div>';
263
+ echo '</div>';
264
+ }
265
+
266
+ //
267
+ // Word Spacing
268
+ if ( ! empty( $args['word_spacing'] ) ) {
269
+ echo '<div class="spftestimonial--block">';
270
+ echo '<div class="spftestimonial--title">' . esc_html__( 'Word Spacing', 'testimonial-free' ) . '</div>';
271
+ echo '<div class="spftestimonial--blocks">';
272
+ echo '<div class="spftestimonial--block"><input type="text" name="' . $this->field_name( '[word-spacing]' ) . '" class="spftestimonial--word-spacing spftestimonial--input spftestimonial-number" value="' . $this->value['word-spacing'] . '" /></div>';
273
+ echo '<div class="spftestimonial--block spftestimonial--unit">' . $args['unit'] . '</div>';
274
+ echo '</div>';
275
+ echo '</div>';
276
+ }
277
+
278
+ echo '</div>';
279
+
280
+ //
281
+ // Font Color
282
+ if ( ! empty( $args['color'] ) ) {
283
+ $default_color_attr = ( ! empty( $default_value['color'] ) ) ? ' data-default-color="' . $default_value['color'] . '"' : '';
284
+ echo '<div class="spftestimonial--block spftestimonial--block-font-color">';
285
+ echo '<div class="spftestimonial--title">' . esc_html__( 'Font Color', 'testimonial-free' ) . '</div>';
286
+ echo '<div class="spftestimonial-field-color">';
287
+ echo '<input type="text" name="' . $this->field_name( '[color]' ) . '" class="spftestimonial-color spftestimonial--color" value="' . $this->value['color'] . '"' . $default_color_attr . ' />';
288
+ echo '</div>';
289
+ echo '</div>';
290
+ }
291
+
292
+ //
293
+ // Custom style
294
+ if ( ! empty( $args['custom_style'] ) ) {
295
+ echo '<div class="spftestimonial--block spftestimonial--block-custom-style">';
296
+ echo '<div class="spftestimonial--title">' . esc_html__( 'Custom Style', 'testimonial-free' ) . '</div>';
297
+ echo '<textarea name="' . $this->field_name( '[custom-style]' ) . '" class="spftestimonial--custom-style">' . $this->value['custom-style'] . '</textarea>';
298
+ echo '</div>';
299
+ }
300
+
301
+ //
302
+ // Preview
303
+ $always_preview = ( $args['preview'] !== 'always' ) ? ' hidden' : '';
304
+
305
+ if ( ! empty( $args['preview'] ) ) {
306
+ echo '<div class="spftestimonial--block spftestimonial--block-preview' . $always_preview . '">';
307
+ echo '<div class="spftestimonial--toggle fa fa-toggle-off"></div>';
308
+ echo '<div class="spftestimonial--preview">' . $args['preview_text'] . '</div>';
309
+ echo '</div>';
310
+ }
311
+
312
+ echo '<input type="hidden" name="' . $this->field_name( '[type]' ) . '" class="spftestimonial--type" value="' . $this->value['type'] . '" />';
313
+ echo '<input type="hidden" name="' . $this->field_name( '[unit]' ) . '" class="spftestimonial--unit-save" value="' . $args['unit'] . '" />';
314
+
315
+ echo '</div>';
316
+
317
+ echo $this->field_after();
318
+
319
+ }
320
+
321
+ public function create_select( $options, $name, $placeholder = '', $is_multiple = false ) {
322
+
323
+ $multiple_name = ( $is_multiple ) ? '[]' : '';
324
+ $multiple_attr = ( $is_multiple ) ? ' multiple data-multiple="true"' : '';
325
+ $chosen_rtl = ( $this->chosen && is_rtl() ) ? ' chosen-rtl' : '';
326
+
327
+ $output = '<select disabled name="' . $this->field_name( '[' . $name . ']' . $multiple_name ) . '" class="spftestimonial--' . $name . $chosen_rtl . '" data-placeholder="' . $placeholder . '"' . $multiple_attr . '>';
328
+ $output .= ( ! empty( $placeholder ) ) ? '<option value="">' . ( ( ! $this->chosen ) ? $placeholder : '' ) . '</option>' : '';
329
+
330
+ if ( ! empty( $options ) ) {
331
+ foreach ( $options as $option_key => $option_value ) {
332
+ if ( $is_multiple ) {
333
+ $selected = ( in_array( $option_value, $this->value[ $name ] ) ) ? ' selected' : '';
334
+ $output .= '<option value="' . $option_value . '"' . $selected . '>' . $option_value . '</option>';
335
+ } else {
336
+ $option_key = ( is_numeric( $option_key ) ) ? $option_value : $option_key;
337
+ $selected = ( $option_key === $this->value[ $name ] ) ? ' selected' : '';
338
+ $output .= '<option value="' . $option_key . '"' . $selected . '>' . $option_value . '</option>';
339
+ }
340
+ }
341
+ }
342
+
343
+ $output .= '</select>';
344
+
345
+ return $output;
346
+
347
+ }
348
+
349
+ public function enqueue() {
350
+
351
+ if ( ! wp_style_is( 'spftestimonial-webfont-loader' ) ) {
352
+
353
+ SPFTESTIMONIAL::include_plugin_file( 'fields/typography/google-fonts.php' );
354
+
355
+ wp_enqueue_script( 'spftestimonial-webfont-loader', 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js', array( 'spftestimonial' ), '1.6.28', true );
356
+
357
+ $webfonts = array();
358
+
359
+ $customwebfonts = apply_filters( 'spftestimonial_field_typography_customwebfonts', array() );
360
+
361
+ if ( ! empty( $customwebfonts ) ) {
362
+ $webfonts['custom'] = array(
363
+ 'label' => esc_html__( 'Custom Web Fonts', 'testimonial-free' ),
364
+ 'fonts' => $customwebfonts,
365
+ );
366
+ }
367
+
368
+ $webfonts['safe'] = array(
369
+ 'label' => esc_html__( 'Safe Web Fonts', 'testimonial-free' ),
370
+ 'fonts' => apply_filters(
371
+ 'spftestimonial_field_typography_safewebfonts', array(
372
+ 'Arial',
373
+ 'Arial Black',
374
+ 'Helvetica',
375
+ 'Times New Roman',
376
+ 'Courier New',
377
+ 'Tahoma',
378
+ 'Verdana',
379
+ 'Impact',
380
+ 'Trebuchet MS',
381
+ 'Comic Sans MS',
382
+ 'Lucida Console',
383
+ 'Lucida Sans Unicode',
384
+ 'Georgia, serif',
385
+ 'Palatino Linotype',
386
+ )
387
+ ),
388
+ );
389
+
390
+ $webfonts['google'] = array(
391
+ 'label' => esc_html__( 'Google Web Fonts', 'testimonial-free' ),
392
+ 'fonts' => apply_filters(
393
+ 'spftestimonial_field_typography_googlewebfonts', spftestimonial_get_google_fonts()
394
+ ),
395
+ );
396
+
397
+ $defaultstyles = apply_filters( 'spftestimonial_field_typography_defaultstyles', array( 'normal', 'italic', '700', '700italic' ) );
398
+
399
+ $googlestyles = apply_filters(
400
+ 'spftestimonial_field_typography_googlestyles', array(
401
+ '100' => 'Thin 100',
402
+ '100italic' => 'Thin 100 Italic',
403
+ '200' => 'Extra-Light 200',
404
+ '200italic' => 'Extra-Light 200 Italic',
405
+ '300' => 'Light 300',
406
+ '300italic' => 'Light 300 Italic',
407
+ 'normal' => 'Normal 400',
408
+ 'italic' => 'Normal 400 Italic',
409
+ '500' => 'Medium 500',
410
+ '500italic' => 'Medium 500 Italic',
411
+ '600' => 'Semi-Bold 600',
412
+ '600italic' => 'Semi-Bold 600 Italic',
413
+ '700' => 'Bold 700',
414
+ '700italic' => 'Bold 700 Italic',
415
+ '800' => 'Extra-Bold 800',
416
+ '800italic' => 'Extra-Bold 800 Italic',
417
+ '900' => 'Black 900',
418
+ '900italic' => 'Black 900 Italic',
419
+ )
420
+ );
421
+
422
+ $webfonts = apply_filters( 'spftestimonial_field_typography_webfonts', $webfonts );
423
+
424
+ wp_localize_script(
425
+ 'spftestimonial', 'spftestimonial_typography_json', array(
426
+ 'webfonts' => $webfonts,
427
+ 'defaultstyles' => $defaultstyles,
428
+ 'googlestyles' => $googlestyles,
429
+ )
430
+ );
431
+
432
+ }
433
+
434
+ }
435
+
436
+ public function enqueue_google_fonts() {
437
+
438
+ $value = $this->value;
439
+ $families = array();
440
+ $is_google = false;
441
+
442
+ if ( ! empty( $this->value['type'] ) ) {
443
+ $is_google = ( $this->value['type'] === 'google' ) ? true : false;
444
+ } else {
445
+ SPFTESTIMONIAL::include_plugin_file( 'fields/typography/google-fonts.php' );
446
+ $is_google = ( array_key_exists( $this->value['font-family'], spftestimonial_get_google_fonts() ) ) ? true : false;
447
+ }
448
+
449
+ if ( $is_google ) {
450
+
451
+ // set style
452
+ $font_weight = ( ! empty( $value['font-weight'] ) ) ? $value['font-weight'] : '';
453
+ $font_style = ( ! empty( $value['font-style'] ) ) ? $value['font-style'] : '';
454
+
455
+ if ( $font_weight || $font_style ) {
456
+ $style = $font_weight . $font_style;
457
+ $families['style'][ $style ] = $style;
458
+ }
459
+
460
+ // set extra styles
461
+ if ( ! empty( $value['extra-styles'] ) ) {
462
+ foreach ( $value['extra-styles'] as $extra_style ) {
463
+ $families['style'][ $extra_style ] = $extra_style;
464
+ }
465
+ }
466
+
467
+ // set subsets
468
+ if ( ! empty( $value['subset'] ) ) {
469
+ $value['subset'] = ( is_array( $value['subset'] ) ) ? $value['subset'] : array_filter( (array) $value['subset'] );
470
+ foreach ( $value['subset'] as $subset ) {
471
+ $families['subset'][ $subset ] = $subset;
472
+ }
473
+ }
474
+
475
+ $all_styles = ( ! empty( $families['style'] ) ) ? ':' . implode( ',', $families['style'] ) : '';
476
+ $all_subsets = ( ! empty( $families['subset'] ) ) ? ':' . implode( ',', $families['subset'] ) : '';
477
+
478
+ $families = $this->value['font-family'] . str_replace( array( 'normal', 'italic' ), array( 'n', 'i' ), $all_styles ) . $all_subsets;
479
+
480
+ $this->parent->typographies[] = $families;
481
+
482
+ return $families;
483
+
484
+ }
485
+
486
+ return false;
487
+
488
+ }
489
+
490
+ public function output() {
491
+
492
+ $output = '';
493
+ $bg_image = array();
494
+ $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
495
+ $element = ( is_array( $this->field['output'] ) ) ? join( ',', $this->field['output'] ) : $this->field['output'];
496
+
497
+ $font_family = ( ! empty( $this->value['font-family'] ) ) ? $this->value['font-family'] : '';
498
+ $backup_family = ( ! empty( $this->value['backup-font-family'] ) ) ? ', ' . $this->value['backup-font-family'] : '';
499
+
500
+ if ( $font_family ) {
501
+ $output .= 'font-family:"' . $font_family . '"' . $backup_family . $important . ';';
502
+ }
503
+
504
+ // Common font properties
505
+ $properties = array(
506
+ 'color',
507
+ 'font-weight',
508
+ 'font-style',
509
+ 'font-variant',
510
+ 'text-align',
511
+ 'text-transform',
512
+ 'text-decoration',
513
+ );
514
+
515
+ foreach ( $properties as $property ) {
516
+ if ( isset( $this->value[ $property ] ) && $this->value[ $property ] !== '' ) {
517
+ $output .= $property . ':' . $this->value[ $property ] . $important . ';';
518
+ }
519
+ }
520
+
521
+ $properties = array(
522
+ 'font-size',
523
+ 'line-height',
524
+ 'letter-spacing',
525
+ 'word-spacing',
526
+ );
527
+
528
+ $unit = ( ! empty( $this->value['unit'] ) ) ? $this->value['unit'] : '';
529
+
530
+ foreach ( $properties as $property ) {
531
+ if ( isset( $this->value[ $property ] ) && $this->value[ $property ] !== '' ) {
532
+ $output .= $property . ':' . $this->value[ $property ] . $unit . $important . ';';
533
+ }
534
+ }
535
+
536
+ $custom_style = ( ! empty( $this->value['custom-style'] ) ) ? $this->value['custom-style'] : '';
537
+
538
+ if ( $output ) {
539
+ $output = $element . '{' . $output . $custom_style . '}';
540
+ }
541
+
542
+ $this->parent->output_css .= $output;
543
+
544
+ return $output;
545
+
546
+ }
547
+
548
+ }
549
+ }
admin/views/tp-metabox/fields/upgrade/upgrade.php ADDED
@@ -0,0 +1,488 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: Upgrade
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SPFTESTIMONIAL_Field_upgrade' ) ) {
11
+ class SPFTESTIMONIAL_Field_upgrade extends SPFTESTIMONIAL_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+ ?>
19
+ <div class="sp-tfree-mbf-tab-content">
20
+ <div class="sp-tfree-upgrade-header">
21
+ <div class="tfree-overlay-color"></div>
22
+ <div class="sp-tfree-container">
23
+ <div class="sp-tfree-col-lg-7">
24
+ <h1 class="sp-tfree-upgrade-title">Collect & Showcase Your Testimonials Aesthetically and Increase Conversions!</h1>
25
+ <h4 class="sp-tfree-upgrade-subtitle">Upgrade to <b>PRO</b> Version of <b>Testimonial</b> to benefit
26
+ from all features!</h4>
27
+ </div>
28
+ <div class="sp-tfree-col-lg-5">
29
+ <a href="https://shapedplugin.com/plugin/testimonial-pro"
30
+ class="button button-large free-upgrade-btn upgrade-btn" target="_blank">Upgrade to PRO!</a><a
31
+ href="https://shapedplugin.com/demo/testimonial-pro"
32
+ class="button button-large free-upgrade-btn demo-btn" target="_blank">All Features & Demo</a>
33
+ </div>
34
+ </div>
35
+ </div>
36
+ <div class="sp-tfree-upgrade-body">
37
+ <div class="sp-tfree-section-feature-icon text-center"><img
38
+ src="<?php echo SP_TFREE_URL . 'admin/assets/images/pro-feature.png'; ?>" alt=""></div>
39
+ <h2 class="sp-tfree-section-title text-center">PREMIUM FEATURES</h2>
40
+ <div class="tfree-option">
41
+ <div class="sp-tfree-col-lg-2">
42
+ <div class="sp-tfree-content">
43
+ <img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss1.png'; ?>" alt="">
44
+ </div>
45
+
46
+ </div>
47
+ <div class="sp-tfree-col-lg-2">
48
+ <div class="sp-tfree-content">
49
+ <h2>5+ Testimonial Layouts</h2>
50
+ <h4><i>(Slider, Grid, Masonry, List, & Filter-Grid & Filter-Masonry)</i></h4>
51
+ <p>You can select from 6 beautiful testimonial layouts: Slider, Grid, Masonry, List, Filter-Grid & Filter-Masonry. Creating a customized layout is super easy. You can change the number of layout columns, reviewer info to show, font, & color etc.</p>
52
+ <p>Showcase your testimonials how you want and use multi-creative ideas as you need.</p>
53
+ </div>
54
+
55
+ </div>
56
+ </div>
57
+ <div class="tfree-option">
58
+ <div class="sp-tfree-col-lg-2">
59
+ <div class="sp-tfree-content">
60
+ <h2>10+ Professional Themes</h2>
61
+ <p>Get designer quality results without writing a single line of code through 10+ professionally pre-designed themes for front-end display. Each theme has a different structure and huge customization options to cover all the demands.</p>
62
+ </div>
63
+
64
+ </div>
65
+ <div class="sp-tfree-col-lg-2">
66
+ <div class="sp-tfree-content"><img src="
67
+ <?php
68
+ echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss2.png'
69
+ ?>
70
+ " alt=""></div>
71
+ </div>
72
+ </div>
73
+ <div class="tfree-option">
74
+
75
+ <div class="sp-tfree-col-lg-2">
76
+ <div class="sp-tfree-content"><img src="
77
+ <?php
78
+ echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss3.png'
79
+ ?>
80
+ " alt=""></div>
81
+ </div>
82
+ <div class="sp-tfree-col-lg-2">
83
+ <div class="sp-tfree-content">
84
+ <h2>840+ GOOGLE FONTS</h2>
85
+ <h4><i>(Font family, size, transform, letter spacing, line-height, & color)</i></h4>
86
+ <p>Testimonial Pro includes over 840+ Google fonts. You can add your desired font from 840+ Google Fonts. Customize the font family, size, transform, letter spacing, color, and line-height for every element.</p>
87
+
88
+ <p>Manage any content with Google Fonts with live preview. That’s robust features of Testimonial Pro that can never be missed by creative people to make site beautiful and unique feel.</p>
89
+ </div>
90
+
91
+ </div>
92
+ </div>
93
+ <div class="tfree-option">
94
+
95
+ <div class="sp-tfree-col-lg-2">
96
+ <div class="sp-tfree-content">
97
+ <h2>Shortcode Generator With 100+ Visual Customisation Options</h2>
98
+ <p>It could be easier to generate the shortcode to display the testimonials. Just go to the Shortcode Generator, choose the settings you want and generated shortcode is ready to use where you want like posts, pages, and widgets. Generated Shortcodes are to be used in posts, pages and widgets, while the php function will be in your theme files.</p>
99
+ </div>
100
+ </div>
101
+ <div class="sp-tfree-col-lg-2">
102
+ <div class="sp-tfree-content"><img src="
103
+ <?php
104
+ echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss4.png'
105
+ ?>" alt=""></div>
106
+ </div>
107
+ </div>
108
+
109
+ <div class="tfree-option">
110
+ <div class="sp-tfree-col-lg-2">
111
+ <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss5.png'; ?>" alt=""></div>
112
+
113
+ </div>
114
+ <div class="sp-tfree-col-lg-2">
115
+ <div class="sp-tfree-content">
116
+ <h2>14 Display Options</h2>
117
+ <p>Pick individual fields for each Testimonial's information. You can toggle between Testimonial Image, Video, title, Content, Name, Rating star, identity, Company, Location, Mobile, E-mail, Date, Website, And Social profile links.</p>
118
+ </div>
119
+ </div>
120
+
121
+ </div>
122
+ <div class="tfree-option">
123
+
124
+ <div class="sp-tfree-col-lg-2">
125
+ <div class="sp-tfree-content">
126
+ <h2>TAILOR-MADE RESPONSIVITY</h2>
127
+ <h4><i>(Control on Standard Desktop, Tablet & Mobile)</i></h4>
128
+ <p>All Testimonial layouts are fully responsive & mobile touch-friendly and used intuitive breakpoints settings that you can customize the number of testimonials displayed on a Desktop, Laptop, iPad, iPhone and Android Devices.</p>
129
+ <p>Total control on your slider at any resolution! With the premium version of the plugin, you can set the number of testimonial columns to show simultaneously in the slider, grid, masonry and isotope filter according to the specific device resolution.</p>
130
+ <p>Three sizes are generally considered: Standard Desktop (desktop for the screen smaller than 1100px.), tablet (tablet for the screen smaller than 990px.) and mobile ( mobile for the screen smaller than 650px.).</p>
131
+ </div>
132
+ </div>
133
+ <div class="sp-tfree-col-lg-2">
134
+ <div class="sp-tfree-content"><img src="
135
+ <?php
136
+ echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss6.png'
137
+ ?>
138
+ "
139
+ alt=""></div>
140
+ </div>
141
+ </div>
142
+ <div class="tfree-option">
143
+ <div class="sp-tfree-col-lg-2">
144
+ <div class="sp-tfree-content"><img src="<?php echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss7.png'; ?>"
145
+ alt=""></div>
146
+
147
+ </div>
148
+ <div class="sp-tfree-col-lg-2">
149
+ <div class="sp-tfree-content">
150
+ <h2>Drag & Drop Re-Ordering!</h2>
151
+ <p>One of the most amazing features of Testimonial Pro is the ability to drag & drop re-order testimonials. You can re-order your testimonials simply by drag & drop, or choose to display the testimonials randomly. </p>
152
+
153
+ </div>
154
+
155
+ </div>
156
+
157
+ </div>
158
+ <div class="tfree-option">
159
+
160
+ <div class="sp-tfree-col-lg-2">
161
+ <div class="sp-tfree-content">
162
+ <h2>Showcase by Specific Category</h2>
163
+ <p>Do you want to show a specific testimonial category to your potential customers? You can show testimonials from categories. Save your time by allowing automatical showcasing of available testimonials from the category.</p>
164
+ </div>
165
+
166
+ </div>
167
+ <div class="sp-tfree-col-lg-2">
168
+ <div class="sp-tfree-content"><img src="
169
+ <?php
170
+ echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss8.png'
171
+ ?>
172
+ " alt=""></div>
173
+ </div>
174
+ </div>
175
+ <div class="tfree-option">
176
+ <div class="sp-tfree-col-lg-2">
177
+ <div class="sp-tfree-content"><img src="
178
+ <?php
179
+ echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss9.png'
180
+ ?>
181
+ " alt=""></div>
182
+ </div>
183
+ <div class="sp-tfree-col-lg-2">
184
+ <div class="sp-tfree-content">
185
+ <h2>Display Specific Testimonials</h2>
186
+ <h4><i>(If you can leverage it, you can earn from it.)</i></h4>
187
+ <p>You can display the specific testimonials from available testimonials in the list. Highlight your specific testimonials in strategic positions, it will allow you to convert visitors into your valuable customers.</p>
188
+ </div>
189
+ </div>
190
+ </div>
191
+ <div class="tfree-option">
192
+ <div class="sp-tfree-col-lg-2">
193
+ <div class="sp-tfree-content">
194
+ <h2>Front-end Submission Form</h2>
195
+ <p>You can create Front-end Submission Form for customers to collect new testimonials for your business. When you receive a new testimonial, simply review and approve it to automatically add it to your customer testimonials page!</p>
196
+ </div>
197
+ </div>
198
+ <div class="sp-tfree-col-lg-2">
199
+ <div class="sp-tfree-content"><img src="
200
+ <?php
201
+ echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss10.png'
202
+ ?>
203
+ " alt=""></div>
204
+ </div>
205
+
206
+ </div>
207
+ <div class="tfree-option">
208
+ <div class="sp-tfree-col-lg-2">
209
+ <div class="sp-tfree-content"><img src="
210
+ <?php
211
+ echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss11.png'
212
+ ?>
213
+ " alt=""></div>
214
+ </div>
215
+ <div class="sp-tfree-col-lg-2">
216
+ <div class="sp-tfree-content">
217
+ <h2>Front-end Form Fields Control</h2>
218
+ <p>You can choose which fields and the messages to display! You can sort your own order and control show/hide, required, label and placeholder attribute for all fields in Testimonial Submission Form. It’s that simple.
219
+ </p>
220
+ </div>
221
+ </div>
222
+ </div>
223
+
224
+ <div class="tfree-option">
225
+ <div class="sp-tfree-col-lg-2">
226
+ <div class="sp-tfree-content">
227
+ <h2>Thumbnail Slider</h2>
228
+ <p>One of the most stunning features of Testimonial Pro is the ability to create Thumbnail Slider. If you enable thumbnail slider, you can display testimonials using the Thumbnail Slider. It's modern and looks pretty.</p>
229
+ </div>
230
+ </div>
231
+ <div class="sp-tfree-col-lg-2">
232
+ <div class="sp-tfree-content"><img src="
233
+ <?php
234
+ echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss12.png'
235
+ ?>
236
+ " alt=""></div>
237
+ </div>
238
+ </div>
239
+ <div class="tfree-option">
240
+ <div class="sp-tfree-col-lg-2">
241
+ <div class="sp-tfree-content"><img src="
242
+ <?php
243
+ echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss13.png'
244
+ ?>
245
+ " alt=""></div>
246
+ </div>
247
+ <div class="sp-tfree-col-lg-2">
248
+ <div class="sp-tfree-content">
249
+ <h2>Video Testimonial & Lightbox</h2>
250
+ <p>Video Testimonials are more effective to increase sales of a business. You can create video testimonial with Lightbox instead of simple image testimonial with Testimonial Pro. You can use video from YouTube, Vimeo or any video link. </p>
251
+ </div>
252
+ </div>
253
+ </div>
254
+ <div class="tfree-option">
255
+ <div class="sp-tfree-col-lg-2">
256
+ <div class="sp-tfree-content">
257
+ <h2>Read More & Characters Limit Options</h2>
258
+ <p>You can choose testimonial content display type, show full testimonial body or content with characters limit. You can set custom ellipsis after content, customize the Read More button text, color, and hover color.</p>
259
+ </div>
260
+ </div>
261
+ <div class="sp-tfree-col-lg-2">
262
+ <div class="sp-tfree-content"><img src="
263
+ <?php
264
+ echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss14.png'
265
+ ?>
266
+ " alt=""></div>
267
+ </div>
268
+ </div>
269
+
270
+ <div class="tfree-option">
271
+ <div class="sp-tfree-col-lg-2">
272
+ <div class="sp-tfree-content"><img src="
273
+ <?php
274
+ echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss15.png'
275
+ ?>
276
+ " alt=""></div>
277
+ </div>
278
+ <div class="sp-tfree-col-lg-2">
279
+ <div class="sp-tfree-content">
280
+ <h2>Read More Action Type</h2>
281
+ <h4><i>(Show Testimonial in a Expand or Popup)</i></h4>
282
+ <p>You can choose Read More button action type to show testimonial in a expand or popup page. In Expand, the testimonial content will collapse and expand long blocks of text. In PopUp, All Testimonial content will show like lightbox.</p>
283
+
284
+ </div>
285
+
286
+ </div>
287
+ </div>
288
+
289
+ <div class="tfree-option">
290
+ <div class="sp-tfree-col-lg-2">
291
+ <div class="sp-tfree-content">
292
+ <h2>Advanced Link Options</h2>
293
+ <p>Testimonial Pro has several options for your links. You can link the identity or position of the testimonial through website URL that will lead to a page or company website URL, perfect for case studies!</p>
294
+ </div>
295
+ </div>
296
+ <div class="sp-tfree-col-lg-2">
297
+ <div class="sp-tfree-content"><img src="
298
+ <?php
299
+ echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss16.png'
300
+ ?>
301
+ "
302
+ alt=""></div>
303
+ </div>
304
+ </div>
305
+
306
+ <div class="tfree-option">
307
+ <div class="sp-tfree-col-lg-2">
308
+ <div class="sp-tfree-content"><img src="
309
+ <?php
310
+ echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss17.png'
311
+ ?>
312
+ "
313
+ alt=""></div>
314
+ </div>
315
+ <div class="sp-tfree-col-lg-2">
316
+ <div class="sp-tfree-content">
317
+ <h2>Rich Snippets/Structured Data compatible</h2>
318
+ <p>The plugin is Rich Snippets compatible. When used properly this information might display in the search engine result pages! Testimonial Pro uses schema.org compliant JSON-LD markup to appear correctly in search results.</p>
319
+ </div>
320
+ </div>
321
+ </div>
322
+
323
+ <div class="tfree-option">
324
+ <div class="sp-tfree-col-lg-2">
325
+ <div class="sp-tfree-content">
326
+ <h2>Slider Control Options</h2>
327
+ <p>You can set how many testimonials to scroll at a time in the carousel or show, navigation & pagination show/hide, autoplay, speed, animation, loop, pause on hover, draggable, swipe, ticker mode, and many other settings.</p>
328
+ </div>
329
+ </div>
330
+ <div class="sp-tfree-col-lg-2">
331
+ <div class="sp-tfree-content"><img src="
332
+ <?php
333
+ echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss18.png'
334
+ ?>
335
+ "
336
+ alt=""></div>
337
+ </div>
338
+ </div>
339
+
340
+ <div class="tfree-option">
341
+ <div class="sp-tfree-col-lg-2">
342
+ <div class="sp-tfree-content"><img src="
343
+ <?php
344
+ echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss19.png'
345
+ ?>
346
+ "
347
+ alt=""></div>
348
+ </div>
349
+ <div class="sp-tfree-col-lg-2">
350
+ <div class="sp-tfree-content">
351
+ <h2>Navigation Positions & Styles </h2>
352
+ <h4><i>(13 Navigation, 16 Pagination, 6 Arrow Styles & 8 Positions)</i></h4>
353
+ <p>You can select your desired arrow style to fit your needs from many styles. This plugin has 13 Navigation, 16 Pagination, 6 Arrow Styles and 8+ different navigational arrow positions (Top right, top center, top left, bottom left, bottom center, bottom right, vertically center, vertically inner center, vertically inner center on hover etc.).</p>
354
+ <p>You can set your desired style, position and color your own way. Also customize pagination dots color and active color as well as arrow color, border color, background color and much more!</p>
355
+ </div>
356
+ </div>
357
+ </div>
358
+ <div class="tfree-option">
359
+ <div class="sp-tfree-col-lg-2">
360
+ <div class="sp-tfree-content">
361
+ <h2>Custom Image Re-sizing</h2>
362
+ <p>You can control the image size to your specific size. You can change the default size of your testimonial images on the settings. The newly uploaded image will be resized or cropped to the specified dimensions.</p>
363
+ </div>
364
+ </div>
365
+ <div class="sp-tfree-col-lg-2">
366
+ <div class="sp-tfree-content"><img src="
367
+ <?php
368
+ echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss20.png'
369
+ ?>
370
+ "
371
+ alt=""></div>
372
+ </div>
373
+ </div>
374
+
375
+ <div class="tfree-option">
376
+ <div class="sp-tfree-col-lg-2">
377
+ <div class="sp-tfree-content"><img src="
378
+ <?php
379
+ echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss21.png'
380
+ ?>
381
+ "
382
+ alt=""></div>
383
+ </div>
384
+ <div class="sp-tfree-col-lg-2">
385
+ <div class="sp-tfree-content">
386
+ <h2>WPBakery(formerly Visual Composer) & Widget Ready</h2>
387
+ <p>The premium plugin includes a Widget to display the layouts. Just create a layout in the Shortcode Generator page, save it to use in the widget! A Testimonials module available to add to your page via the V.C interface.</p>
388
+ </div>
389
+ </div>
390
+ </div>
391
+ <div class="tfree-option">
392
+ <div class="sp-tfree-col-lg-2">
393
+ <div class="sp-tfree-content">
394
+ <h2>Translation Ready (WPML)</h2>
395
+ <p>Testimonial Pro is fully Translation ready, supporting .po and .mo language files! You can translate into your language with the following popular plugins like WPML, Polylang, qTranslate-x, GTranslate, Google Language Translator, WPGlobus – Multilingual Everything! </p>
396
+ <p>If you want the administration of the plugin in another language, you just need to create your own language files.</p>
397
+ </div>
398
+ </div>
399
+ <div class="sp-tfree-col-lg-2">
400
+ <div class="sp-tfree-content"><img src="
401
+ <?php
402
+ echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss22.png'
403
+ ?>
404
+ "
405
+ alt=""></div>
406
+ </div>
407
+ </div>
408
+ <div class="tfree-option">
409
+ <div class="sp-tfree-col-lg-2">
410
+ <div class="sp-tfree-content"><img src="
411
+ <?php
412
+ echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss23.png'
413
+ ?>
414
+ "
415
+ alt=""></div>
416
+ </div>
417
+ <div class="sp-tfree-col-lg-2">
418
+ <div class="sp-tfree-content">
419
+ <h2>Duplicate or Clone Options</h2>
420
+ <p>A built-in duplicate or clone option for sliders or showcase is included with Testimonial Pro. You can duplicate or clone testimonial slider or showcase and copy them to new drafts for further editing. It's nice!</p>
421
+ </div>
422
+ </div>
423
+ </div>
424
+ <div class="tfree-option">
425
+ <div class="sp-tfree-col-lg-2">
426
+ <div class="sp-tfree-content">
427
+ <h2>Built-in Automatic Updates Notifications</h2>
428
+ <p>You'll get Automatic Updates when you activate the license key in your site. Once you buy the Testimonial Pro, you will get regular update notification to the dashboard. You can see the change logs before update.</p>
429
+ </div>
430
+ </div>
431
+ <div class="sp-tfree-col-lg-2">
432
+ <div class="sp-tfree-content"><img src="
433
+ <?php
434
+ echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss24.png'
435
+ ?>
436
+ "
437
+ alt=""></div>
438
+ </div>
439
+ </div>
440
+ <div class="tfree-option">
441
+ <div class="sp-tfree-col-lg-2">
442
+ <div class="sp-tfree-content"><img src="
443
+ <?php
444
+ echo SP_TFREE_URL . 'admin/assets/images/upgrade-ss25.png'
445
+ ?>
446
+ "
447
+ alt=""></div>
448
+ </div>
449
+ <div class="sp-tfree-col-lg-2">
450
+ <div class="sp-tfree-content">
451
+ <h2>Fast & Friendly Support (24x7)</h2>
452
+ <p>We love our valued customers! We always strive to provide 5-star, timely, and comprehensive support whenever you need a helping hand. We've a full time dedidcated support team who are always ready to make you happy!</p>
453
+ </div>
454
+ </div>
455
+ </div>
456
+
457
+
458
+ <div class="sp-tfree-video-tutorial text-center">
459
+ <h2>Watch the Video</h2>
460
+ <div class="sp-tfree-video-tutorial-video">
461
+ <iframe width="560" height="300" src="https://www.youtube.com/embed/OA7LgaZHwIY?list=PLoUb-7uG-5jM2sjscSqBVj07VXOqt0qHZ" frameborder="0"
462
+ allowfullscreen></iframe>
463
+ </div>
464
+ </div>
465
+
466
+ </div>
467
+ <div class="sp-tfree-upgrade-footer text-center">
468
+ <div class="tfree-overlay-color"></div>
469
+ <div class="sp-tfree-client-thumb"><img src="
470
+ <?php
471
+ echo SP_TFREE_URL . 'admin/assets/images/client-thumb.png'
472
+ ?>
473
+ "
474
+ alt=""></div>
475
+ <h2>Join Our Happy Customers</h2>
476
+ <p>Unlock all <b>Testimonial Pro</b> features and build an eye-caching <b>Testimonials Showcase</b> for your website today.</p>
477
+ <a href="https://shapedplugin.com/plugin/testimonial-pro"
478
+ class="button button-large free-upgrade-btn upgrade-btn" target="_blank">Upgrade Now for $39 only!</a><a
479
+ href="https://shapedplugin.com/demo/testimonial-pro"
480
+ class="button button-large free-upgrade-btn demo-btn" target="_blank">All Features & Demo</a>
481
+ </div>
482
+ </div>
483
+ <?php
484
+
485
+ }
486
+
487
+ }
488
+ }
admin/views/tp-metabox/fields/wp_editor/wp_editor.php ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2
+ /**
3
+ *
4
+ * Field: wp_editor
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ *
9
+ */
10
+ if( ! class_exists( 'SPFTESTIMONIAL_Field_wp_editor' ) ) {
11
+ class SPFTESTIMONIAL_Field_wp_editor extends SPFTESTIMONIAL_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $args = wp_parse_args( $this->field, array(
20
+ 'tinymce' => true,
21
+ 'quicktags' => true,
22
+ 'media_buttons' => true,
23
+ 'height' => '',
24
+ ) );
25
+
26
+ $attributes = array(
27
+ 'rows' => 10,
28
+ 'class' => 'wp-editor-area',
29
+ 'autocomplete' => 'off',
30
+ );
31
+
32
+ $editor_height = ( ! empty( $args['height'] ) ) ? ' style="height:'. $args['height']. ';"' : '';
33
+
34
+ $editor_settings = array(
35
+ 'tinymce' => $args['tinymce'],
36
+ 'quicktags' => $args['quicktags'],
37
+ 'media_buttons' => $args['media_buttons'],
38
+ );
39
+
40
+ echo $this->field_before();
41
+
42
+ echo ( spftestimonial_wp_editor_api() ) ? '<div class="spftestimonial-wp-editor" data-editor-settings="'. esc_attr( wp_json_encode( $editor_settings ) ) .'">' : '';
43
+
44
+ echo '<textarea name="'. $this->field_name() .'"'. $this->field_attributes( $attributes ) . $editor_height .'>'. $this->value .'</textarea>';
45
+
46
+ echo '<div class="clear"></div>';
47
+
48
+ echo ( spftestimonial_wp_editor_api() ) ? '</div>' : '';
49
+
50
+ echo $this->field_after();
51
+
52
+ }
53
+
54
+ public function enqueue() {
55
+
56
+ if( spftestimonial_wp_editor_api() && function_exists( 'wp_enqueue_editor' ) ) {
57
+
58
+ wp_enqueue_editor();
59
+
60
+ $this->setup_wp_editor_settings();
61
+
62
+ add_action( 'print_default_editor_scripts', array( &$this, 'setup_wp_editor_media_buttons' ) );
63
+
64
+ }
65
+
66
+ }
67
+
68
+ // Setup wp editor media buttons
69
+ public function setup_wp_editor_media_buttons() {
70
+
71
+ ob_start();
72
+ echo '<div class="wp-media-buttons">';
73
+ do_action( 'media_buttons' );
74
+ echo '</div>';
75
+ $media_buttons = ob_get_clean();
76
+
77
+ echo '<script type="text/javascript">';
78
+ echo 'var spftestimonial_media_buttons = '. wp_json_encode( $media_buttons ) .';';
79
+ echo '</script>';
80
+
81
+ }
82
+
83
+ // Setup wp editor settings
84
+ public function setup_wp_editor_settings() {
85
+
86
+ if( spftestimonial_wp_editor_api() && class_exists( '_WP_Editors') ) {
87
+
88
+ $defaults = apply_filters( 'spftestimonial_wp_editor', array(
89
+ 'tinymce' => array(
90
+ 'wp_skip_init' => true
91
+ ),
92
+ ) );
93
+
94
+ $setup = _WP_Editors::parse_settings( 'spftestimonial_wp_editor', $defaults );
95
+
96
+ _WP_Editors::editor_settings( 'spftestimonial_wp_editor', $setup );
97
+
98
+ }
99
+
100
+ }
101
+
102
+ }
103
+ }
admin/views/tp-metabox/functions/actions.php ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+
4
+ /**
5
+ *
6
+ * Export
7
+ *
8
+ * @since 1.0.0
9
+ * @version 1.0.0
10
+ */
11
+ if ( ! function_exists( 'spftestimonial_export' ) ) {
12
+ function spftestimonial_export() {
13
+
14
+ if ( ! empty( $_GET['export'] ) && ! empty( $_GET['nonce'] ) && wp_verify_nonce( $_GET['nonce'], 'spftestimonial_backup_nonce' ) ) {
15
+
16
+ header( 'Content-Type: application/json' );
17
+ header( 'Content-disposition: attachment; filename=backup-' . gmdate( 'd-m-Y' ) . '.json' );
18
+ header( 'Content-Transfer-Encoding: binary' );
19
+ header( 'Pragma: no-cache' );
20
+ header( 'Expires: 0' );
21
+
22
+ echo json_encode( get_option( wp_unslash( $_GET['export'] ) ) );
23
+
24
+ }
25
+
26
+ die();
27
+ }
28
+ add_action( 'wp_ajax_spftestimonial-export', 'spftestimonial_export' );
29
+ }
30
+
31
+ /**
32
+ *
33
+ * Import Ajax
34
+ *
35
+ * @since 1.0.0
36
+ * @version 1.0.0
37
+ */
38
+ if ( ! function_exists( 'spftestimonial_import_ajax' ) ) {
39
+ function spftestimonial_import_ajax() {
40
+
41
+ if ( ! empty( $_POST['import_data'] ) && ! empty( $_POST['unique'] ) && ! empty( $_POST['nonce'] ) && wp_verify_nonce( $_POST['nonce'], 'spftestimonial_backup_nonce' ) ) {
42
+
43
+ $import_data = json_decode( wp_unslash( trim( $_POST['import_data'] ) ), true );
44
+
45
+ if ( is_array( $import_data ) ) {
46
+
47
+ update_option( wp_unslash( $_POST['unique'] ), wp_unslash( $import_data ) );
48
+ wp_send_json_success();
49
+
50
+ }
51
+ }
52
+
53
+ wp_send_json_error( array( 'error' => esc_html__( 'Error: Nonce verification has failed. Please try again.', 'testimonial-free' ) ) );
54
+
55
+ }
56
+ add_action( 'wp_ajax_spftestimonial-import', 'spftestimonial_import_ajax' );
57
+ }
58
+
59
+ /**
60
+ *
61
+ * Reset Ajax
62
+ *
63
+ * @since 1.0.0
64
+ * @version 1.0.0
65
+ */
66
+ if ( ! function_exists( 'spftestimonial_reset_ajax' ) ) {
67
+ function spftestimonial_reset_ajax() {
68
+
69
+ if ( ! empty( $_POST['unique'] ) && ! empty( $_POST['nonce'] ) && wp_verify_nonce( $_POST['nonce'], 'spftestimonial_backup_nonce' ) ) {
70
+ delete_option( wp_unslash( $_POST['unique'] ) );
71
+ wp_send_json_success();
72
+ }
73
+
74
+ wp_send_json_error( array( 'error' => esc_html__( 'Error: Nonce verification has failed. Please try again.', 'testimonial-free' ) ) );
75
+
76
+ }
77
+ add_action( 'wp_ajax_spftestimonial-reset', 'spftestimonial_reset_ajax' );
78
+ }
79
+
80
+ /**
81
+ *
82
+ * Chosen Ajax
83
+ *
84
+ * @since 1.0.0
85
+ * @version 1.0.0
86
+ */
87
+ if ( ! function_exists( 'spftestimonial_chosen_ajax' ) ) {
88
+ function spftestimonial_chosen_ajax() {
89
+
90
+ if ( ! empty( $_POST['term'] ) && ! empty( $_POST['type'] ) && ! empty( $_POST['nonce'] ) && wp_verify_nonce( $_POST['nonce'], 'spftestimonial_chosen_ajax_nonce' ) ) {
91
+
92
+ $capability = apply_filters( 'spftestimonial_chosen_ajax_capability', 'manage_options' );
93
+
94
+ if ( current_user_can( $capability ) ) {
95
+
96
+ $type = $_POST['type'];
97
+ $term = $_POST['term'];
98
+ $query_args = ( ! empty( $_POST['query_args'] ) ) ? $_POST['query_args'] : array();
99
+ $options = SPFTESTIMONIAL_Fields::field_data( $type, $term, $query_args );
100
+
101
+ wp_send_json_success( $options );
102
+
103
+ } else {
104
+ wp_send_json_error( array( 'error' => esc_html__( 'You do not have required permissions to access.', 'testimonial-free' ) ) );
105
+ }
106
+ } else {
107
+ wp_send_json_error( array( 'error' => esc_html__( 'Error: Nonce verification has failed. Please try again.', 'testimonial-free' ) ) );
108
+ }
109
+
110
+ }
111
+ add_action( 'wp_ajax_spftestimonial-chosen', 'spftestimonial_chosen_ajax' );
112
+ }
admin/views/tp-metabox/functions/customize.php ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * WP Customize custom panel
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'WP_Customize_Panel_SPFTESTIMONIAL' ) && class_exists( 'WP_Customize_Panel' ) ) {
11
+ class WP_Customize_Panel_SPFTESTIMONIAL extends WP_Customize_Panel {
12
+ public $type = 'spftestimonial';
13
+ }
14
+ }
15
+
16
+ /**
17
+ *
18
+ * WP Customize custom section
19
+ *
20
+ * @since 1.0.0
21
+ * @version 1.0.0
22
+ */
23
+ if ( ! class_exists( 'WP_Customize_Section_SPFTESTIMONIAL' ) && class_exists( 'WP_Customize_Section' ) ) {
24
+ class WP_Customize_Section_SPFTESTIMONIAL extends WP_Customize_Section {
25
+ public $type = 'spftestimonial';
26
+ }
27
+ }
28
+
29
+ /**
30
+ *
31
+ * WP Customize custom control
32
+ *
33
+ * @since 1.0.0
34
+ * @version 1.0.0
35
+ */
36
+ if ( ! class_exists( 'WP_Customize_Control_SPFTESTIMONIAL' ) && class_exists( 'WP_Customize_Control' ) ) {
37
+ class WP_Customize_Control_SPFTESTIMONIAL extends WP_Customize_Control {
38
+
39
+ public $type = 'spftestimonial';
40
+ public $field = '';
41
+ public $unique = '';
42
+
43
+ protected function render() {
44
+
45
+ $depend = '';
46
+ $hidden = '';
47
+
48
+ if ( ! empty( $this->field['dependency'] ) ) {
49
+ $hidden = ' spftestimonial-dependency-control hidden';
50
+ $depend .= ' data-controller="' . $this->field['dependency'][0] . '"';
51
+ $depend .= ' data-condition="' . $this->field['dependency'][1] . '"';
52
+ $depend .= ' data-value="' . $this->field['dependency'][2] . '"';
53
+ }
54
+
55
+ $id = 'customize-control-' . str_replace( array( '[', ']' ), array( '-', '' ), $this->id );
56
+ $class = 'customize-control customize-control-' . $this->type . $hidden;
57
+
58
+ echo '<li id="' . $id . '" class="' . $class . '"' . $depend . '>';
59
+ $this->render_content();
60
+ echo '</li>';
61
+
62
+ }
63
+
64
+ public function render_content() {
65
+
66
+ $complex = array(
67
+ 'accordion',
68
+ 'background',
69
+ 'backup',
70
+ 'border',
71
+ 'button_set',
72
+ 'checkbox',
73
+ 'color_group',
74
+ 'date',
75
+ 'dimensions',
76
+ 'fieldset',
77
+ 'group',
78
+ 'image_select',
79
+ 'link_color',
80
+ 'media',
81
+ 'palette',
82
+ 'repeater',
83
+ 'sortable',
84
+ 'sorter',
85
+ 'spacing',
86
+ 'switcher',
87
+ 'tabbed',
88
+ 'typography',
89
+ );
90
+
91
+ $field_id = ( ! empty( $this->field['id'] ) ) ? $this->field['id'] : '';
92
+ $custom = ( ! empty( $this->field['customizer'] ) ) ? true : false;
93
+ $is_complex = ( in_array( $this->field['type'], $complex ) ) ? true : false;
94
+ $class = ( $is_complex || $custom ) ? ' spftestimonial-customize-complex' : '';
95
+ $atts = ( $is_complex || $custom ) ? ' data-unique-id="' . $this->unique . '" data-option-id="' . $field_id . '"' : '';
96
+
97
+ if ( ! $is_complex && ! $custom ) {
98
+ $this->field['attributes']['data-customize-setting-link'] = $this->settings['default']->id;
99
+ }
100
+
101
+ $this->field['name'] = $this->settings['default']->id;
102
+
103
+ $this->field['dependency'] = array();
104
+
105
+ echo '<div class="spftestimonial-customize-field' . $class . '"' . $atts . '>';
106
+
107
+ SPFTESTIMONIAL::field( $this->field, $this->value(), $this->unique, 'customize' );
108
+
109
+ echo '</div>';
110
+
111
+ }
112
+
113
+ }
114
+ }
admin/views/tp-metabox/functions/deprecated.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2
+ /**
3
+ *
4
+ * Deprecated framework functions from past framework versions. You shouldn't use these
5
+ * functions and look for the alternatives instead. The functions will be removed in a later version.
6
+ *
7
+ */
admin/views/tp-metabox/functions/helpers.php ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Array search key & value
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! function_exists( 'spftestimonial_array_search' ) ) {
11
+ function spftestimonial_array_search( $array, $key, $value ) {
12
+
13
+ $results = array();
14
+
15
+ if ( is_array( $array ) ) {
16
+ if ( isset( $array[ $key ] ) && $array[ $key ] == $value ) {
17
+ $results[] = $array;
18
+ }
19
+
20
+ foreach ( $array as $sub_array ) {
21
+ $results = array_merge( $results, spftestimonial_array_search( $sub_array, $key, $value ) );
22
+ }
23
+ }
24
+
25
+ return $results;
26
+
27
+ }
28
+ }
29
+
30
+ /**
31
+ *
32
+ * Getting POST Var
33
+ *
34
+ * @since 1.0.0
35
+ * @version 1.0.0
36
+ */
37
+ if ( ! function_exists( 'spftestimonial_get_var' ) ) {
38
+ function spftestimonial_get_var( $var, $default = '' ) {
39
+
40
+ if ( isset( $_POST[ $var ] ) ) {
41
+ return $_POST[ $var ];
42
+ }
43
+
44
+ if ( isset( $_GET[ $var ] ) ) {
45
+ return $_GET[ $var ];
46
+ }
47
+
48
+ return $default;
49
+
50
+ }
51
+ }
52
+
53
+ /**
54
+ *
55
+ * Getting POST Vars
56
+ *
57
+ * @since 1.0.0
58
+ * @version 1.0.0
59
+ */
60
+ if ( ! function_exists( 'spftestimonial_get_vars' ) ) {
61
+ function spftestimonial_get_vars( $var, $depth, $default = '' ) {
62
+
63
+ if ( isset( $_POST[ $var ][ $depth ] ) ) {
64
+ return $_POST[ $var ][ $depth ];
65
+ }
66
+
67
+ if ( isset( $_GET[ $var ][ $depth ] ) ) {
68
+ return $_GET[ $var ][ $depth ];
69
+ }
70
+
71
+ return $default;
72
+
73
+ }
74
+ }
75
+
76
+ /**
77
+ *
78
+ * Between Microtime
79
+ *
80
+ * @since 1.0.0
81
+ * @version 1.0.0
82
+ */
83
+ if ( ! function_exists( 'spftestimonial_microtime' ) ) {
84
+ function spftestimonial_timeout( $timenow, $starttime, $timeout = 30 ) {
85
+
86
+ return ( ( $timenow - $starttime ) < $timeout ) ? true : false;
87
+
88
+ }
89
+ }
90
+
91
+ /**
92
+ *
93
+ * Check for wp editor api
94
+ *
95
+ * @since 1.0.0
96
+ * @version 1.0.0
97
+ */
98
+ if ( ! function_exists( 'spftestimonial_wp_editor_api' ) ) {
99
+ function spftestimonial_wp_editor_api() {
100
+
101
+ global $wp_version;
102
+
103
+ return version_compare( $wp_version, '4.8', '>=' );
104
+
105
+ }
106
+ }
admin/views/tp-metabox/functions/sanitize.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Sanitize
6
+ * Replace letter a to letter b
7
+ *
8
+ * @since 1.0.0
9
+ * @version 1.0.0
10
+ */
11
+ if ( ! function_exists( 'spftestimonial_sanitize_replace_a_to_b' ) ) {
12
+ function spftestimonial_sanitize_replace_a_to_b( $value ) {
13
+ return str_replace( 'a', 'b', $value );
14
+ }
15
+ }
16
+
17
+ /**
18
+ *
19
+ * Sanitize title
20
+ *
21
+ * @since 1.0.0
22
+ * @version 1.0.0
23
+ */
24
+ if ( ! function_exists( 'spftestimonial_sanitize_title' ) ) {
25
+ function spftestimonial_sanitize_title( $value ) {
26
+ return sanitize_title( $value );
27
+ }
28
+ }
admin/views/tp-metabox/functions/validate.php ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Email validate
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! function_exists( 'spftestimonial_validate_email' ) ) {
11
+ function spftestimonial_validate_email( $value ) {
12
+
13
+ if ( ! filter_var( $value, FILTER_VALIDATE_EMAIL ) ) {
14
+ return esc_html__( 'Please write a valid email address!', 'testimonial-free' );
15
+ }
16
+
17
+ }
18
+ }
19
+
20
+ /**
21
+ *
22
+ * Numeric validate
23
+ *
24
+ * @since 1.0.0
25
+ * @version 1.0.0
26
+ */
27
+ if ( ! function_exists( 'spftestimonial_validate_numeric' ) ) {
28
+ function spftestimonial_validate_numeric( $value ) {
29
+
30
+ if ( ! is_numeric( $value ) ) {
31
+ return esc_html__( 'Please write a numeric data!', 'testimonial-free' );
32
+ }
33
+
34
+ }
35
+ }
36
+
37
+ /**
38
+ *
39
+ * Required validate
40
+ *
41
+ * @since 1.0.0
42
+ * @version 1.0.0
43
+ */
44
+ if ( ! function_exists( 'spftestimonial_validate_required' ) ) {
45
+ function spftestimonial_validate_required( $value ) {
46
+
47
+ if ( empty( $value ) ) {
48
+ return esc_html__( 'Error! This field is required!', 'testimonial-free' );
49
+ }
50
+
51
+ }
52
+ }
53
+
54
+ /**
55
+ *
56
+ * URL validate
57
+ *
58
+ * @since 1.0.0
59
+ * @version 1.0.0
60
+ */
61
+ if ( ! function_exists( 'spftestimonial_validate_url' ) ) {
62
+ function spftestimonial_validate_url( $value ) {
63
+
64
+ if ( ! filter_var( $value, FILTER_VALIDATE_URL ) ) {
65
+ return esc_html__( 'Please write a valid url!', 'testimonial-free' );
66
+ }
67
+
68
+ }
69
+ }
70
+
71
+ /**
72
+ *
73
+ * Email validate for Customizer
74
+ *
75
+ * @since 1.0.0
76
+ * @version 1.0.0
77
+ */
78
+ if ( ! function_exists( 'spftestimonial_customize_validate_email' ) ) {
79
+ function spftestimonial_customize_validate_email( $validity, $value, $wp_customize ) {
80
+
81
+ if ( ! sanitize_email( $value ) ) {
82
+ $validity->add( 'required', esc_html__( 'Please write a valid email address!', 'testimonial-free' ) );
83
+ }
84
+
85
+ return $validity;
86
+
87
+ }
88
+ }
89
+
90
+ /**
91
+ *
92
+ * Numeric validate for Customizer
93
+ *
94
+ * @since 1.0.0
95
+ * @version 1.0.0
96
+ */
97
+ if ( ! function_exists( 'spftestimonial_customize_validate_numeric' ) ) {
98
+ function spftestimonial_customize_validate_numeric( $validity, $value, $wp_customize ) {
99
+
100
+ if ( ! is_numeric( $value ) ) {
101
+ $validity->add( 'required', esc_html__( 'Please write a numeric data!', 'testimonial-free' ) );
102
+ }
103
+
104
+ return $validity;
105
+
106
+ }
107
+ }
108
+
109
+ /**
110
+ *
111
+ * Required validate for Customizer
112
+ *
113
+ * @since 1.0.0
114
+ * @version 1.0.0
115
+ */
116
+ if ( ! function_exists( 'spftestimonial_customize_validate_required' ) ) {
117
+ function spftestimonial_customize_validate_required( $validity, $value, $wp_customize ) {
118
+
119
+ if ( empty( $value ) ) {
120
+ $validity->add( 'required', esc_html__( 'Error! This field is required!', 'testimonial-free' ) );
121
+ }
122
+
123
+ return $validity;
124
+
125
+ }
126
+ }
127
+
128
+ /**
129
+ *
130
+ * URL validate for Customizer
131
+ *
132
+ * @since 1.0.0
133
+ * @version 1.0.0
134
+ */
135
+ if ( ! function_exists( 'spftestimonial_customize_validate_url' ) ) {
136
+ function spftestimonial_customize_validate_url( $validity, $value, $wp_customize ) {
137
+
138
+ if ( ! filter_var( $value, FILTER_VALIDATE_URL ) ) {
139
+ $validity->add( 'required', esc_html__( 'Please write a valid url!', 'testimonial-free' ) );
140
+ }
141
+
142
+ return $validity;
143
+
144
+ }
145
+ }
admin/views/tp-metabox/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden.
admin/views/widget.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
  /**
3
  * Testimonial Widget
 
4
  * @since 2.0
5
  */
6
  function sp_testimonial_free_widget() {
@@ -11,9 +12,10 @@ add_action( 'widgets_init', 'sp_testimonial_free_widget' );
11
  class TFREE_Widget_Content extends WP_Widget {
12
 
13
  function __construct() {
14
- parent::__construct( 'TFREE_Widget_Content', __( 'Testimonial', 'testimonial-free' ),
 
15
  array(
16
- 'description' => __( 'Display Testimonials.', 'testimonial-free' )
17
  )
18
  );
19
  }
@@ -71,10 +73,11 @@ class TFREE_Widget_Content extends WP_Widget {
71
  $selected
72
  );
73
  }
74
- echo "</select></p>";
75
 
76
  } else {
77
- echo sprintf( '<p>%1$s <a href="' . admin_url( 'post-new.php?post_type=sp_tfree_shortcodes' ) . '">%3$s</a> %2$s</p>',
 
78
  __( 'You did not generate any shortcode yet.', 'testimonial-free' ),
79
  __( 'to generate a new shortcode now.', 'testimonial-free' ),
80
  __( 'click here', 'testimonial-free' )
@@ -97,21 +100,25 @@ class TFREE_Widget_Content extends WP_Widget {
97
  }
98
 
99
  private function shortcodes_list() {
100
- $shortcodes = get_posts( array(
101
- 'post_type' => 'sp_tfree_shortcodes',
102
- 'post_status' => 'publish',
103
- ) );
 
 
104
 
105
  if ( count( $shortcodes ) < 1 ) {
106
  return array();
107
  }
108
 
109
- return array_map( function ( $shortcode ) {
110
- return (object) array(
111
- 'id' => absint( $shortcode->ID ),
112
- 'title' => esc_html( $shortcode->post_title ),
113
- );
114
- }, $shortcodes );
 
 
115
  }
116
 
117
- }
1
  <?php
2
  /**
3
  * Testimonial Widget
4
+ *
5
  * @since 2.0
6
  */
7
  function sp_testimonial_free_widget() {
12
  class TFREE_Widget_Content extends WP_Widget {
13
 
14
  function __construct() {
15
+ parent::__construct(
16
+ 'TFREE_Widget_Content', __( 'Testimonial', 'testimonial-free' ),
17
  array(
18
+ 'description' => __( 'Display Testimonials.', 'testimonial-free' ),
19
  )
20
  );
21
  }
73
  $selected
74
  );
75
  }
76
+ echo '</select></p>';
77
 
78
  } else {
79
+ echo sprintf(
80
+ '<p>%1$s <a href="' . admin_url( 'post-new.php?post_type=sp_tfree_shortcodes' ) . '">%3$s</a> %2$s</p>',
81
  __( 'You did not generate any shortcode yet.', 'testimonial-free' ),
82
  __( 'to generate a new shortcode now.', 'testimonial-free' ),
83
  __( 'click here', 'testimonial-free' )
100
  }
101
 
102
  private function shortcodes_list() {
103
+ $shortcodes = get_posts(
104
+ array(
105
+ 'post_type' => 'sp_tfree_shortcodes',
106
+ 'post_status' => 'publish',
107
+ )
108
+ );
109
 
110
  if ( count( $shortcodes ) < 1 ) {
111
  return array();
112
  }
113
 
114
+ return array_map(
115
+ function ( $shortcode ) {
116
+ return (object) array(
117
+ 'id' => absint( $shortcode->ID ),
118
+ 'title' => esc_html( $shortcode->post_title ),
119
+ );
120
+ }, $shortcodes
121
+ );
122
  }
123
 
124
+ }
class/metabox.php DELETED
@@ -1,107 +0,0 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit; // Exit if accessed directly.
5
- }
6
-
7
- /**
8
- * This files is to create meta boxes for shortcode
9
- * @package testimonial-free
10
- */
11
- class SP_TFREE_MetaBox {
12
-
13
- /**
14
- * The single instance of the class.
15
- *
16
- * @var self
17
- * @since 2.0
18
- */
19
- private static $_instance = null;
20
-
21
- /**
22
- * Allows for accessing single instance of class. Class should only be constructed once per call.
23
- *
24
- * @since 2.0
25
- * @static
26
- * @return self Main instance.
27
- */
28
- public static function getInstance() {
29
- if ( ! self::$_instance ) {
30
- self::$_instance = new SP_TFREE_MetaBox();
31
- }
32
-
33
- return self::$_instance;
34
- }
35
-
36
- /**
37
- * Register the class with the WordPress API
38
- *
39
- * @since 2.0
40
- */
41
- public function __construct() {
42
- $this->metaboxform = new SP_TFREE_MetaBoxForm();
43
- add_action( 'add_meta_boxes', array( $this, 'add_generator_meta_box' ) );
44
- add_action( 'save_post', array( $this, 'save_meta_box' ) );
45
- }
46
-
47
- /**
48
- * The function responsible for creating the actual generator meta box
49
- *
50
- * @since 2.0
51
- */
52
- public function add_generator_meta_box() {
53
- add_meta_box( 'sp_tfree_shortcode_options', __( 'Shortcode Options', 'testimonial-free' ),
54
- array(
55
- $this, 'sp_tfree_shortcode_meta_boxes'
56
- ), 'sp_tfree_shortcodes', 'normal', 'default'
57
- );
58
- }
59
-
60
- /**
61
- * Renders the the content of the meta box
62
- *
63
- * @since 2.0
64
- */
65
- public function sp_tfree_shortcode_meta_boxes() {
66
-
67
- wp_nonce_field( 'sp_tfree_shortcodes_nonce_action', 'sp_tfree_shortcodes_nonce_name' );
68
-
69
- include_once SP_TFREE_PATH . 'admin/views/tab-navigation.php';
70
- }
71
-
72
- /**
73
- * Save Generator Meta Box
74
- *
75
- * @param $post_id
76
- */
77
- public function save_meta_box( $post_id ) {
78
-
79
- if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
80
- return;
81
- }
82
-
83
- // Check if nonce is set.
84
- if ( ! isset( $_POST['sp_tfree_shortcodes_nonce_name'], $_POST['sp_tfree_meta_box'] ) ) {
85
- return;
86
- }
87
- // Check if nonce is valid.
88
- if ( ! wp_verify_nonce( $_POST['sp_tfree_shortcodes_nonce_name'], 'sp_tfree_shortcodes_nonce_action' ) ) {
89
- return;
90
- }
91
-
92
- // Check if user has permissions to save data.
93
- if ( ! current_user_can( 'edit_post', $post_id ) ) {
94
- return;
95
- }
96
-
97
- foreach ( $_POST['sp_tfree_meta_box'] as $key => $val ) {
98
- if ( is_array( $val ) ) {
99
- $val = implode( ',', $val );
100
- }
101
-
102
- update_post_meta( $post_id, $key, sanitize_text_field( $val ) );
103
- }
104
-
105
- }
106
-
107
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
class/metaboxform.php DELETED
@@ -1,415 +0,0 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit; // Exit if accessed directly
5
- }
6
-
7
- /**
8
- * This is file define the fields of the meta boxes
9
- * @package testimonial-free
10
- */
11
- class SP_TFREE_MetaBoxForm {
12
-
13
- /**
14
- * subheading
15
- *
16
- * @param array $args
17
- */
18
- public function subheading( array $args ) {
19
- if ( ! isset( $args['id'], $args['name'] ) ) {
20
- return;
21
- }
22
-
23
- list( $name, $after ) = $this->field_common( $args );
24
-
25
- echo $this->field_before( $args );
26
- echo sprintf( $name, $after );
27
- echo $this->field_after();
28
-
29
- }
30
-
31
- /**
32
- * text
33
- *
34
- * @param array $args
35
- */
36
- public function text( array $args ) {
37
- if ( ! isset( $args['id'], $args['name'] ) ) {
38
- return;
39
- }
40
-
41
- list( $name, $value, $after ) = $this->field_common( $args );
42
-
43
- echo $this->field_before( $args );
44
- echo sprintf( '<input type="text" class="sp-tfree-input-text" value="%1$s" id="%2$s" name="%3$s">%4$s', $value, $args['id'], $name, $after );
45
- echo $this->field_after();
46
-
47
- }
48
-
49
- /**
50
- * text
51
- *
52
- * @param array $args
53
- */
54
- public function url_disabled( array $args ) {
55
- if ( ! isset( $args['id'], $args['name'] ) ) {
56
- return;
57
- }
58
-
59
- list( $name, $value, $after ) = $this->field_common( $args );
60
-
61
- echo $this->field_before( $args );
62
- echo sprintf( '<input type="text" class="sp-tfree-input-text" value="%1$s" id="%2$s" name="%3$s" disabled>%4$s', $value, $args['id'], $name, $after );
63
- echo $this->field_after();
64
-
65
- }
66
-
67
- /**
68
- * color
69
- *
70
- * @param array $args
71
- */
72
- public function color( array $args ) {
73
- if ( ! isset( $args['id'], $args['name'] ) ) {
74
- return;
75
- }
76
-
77
- list( $name, $value ) = $this->field_common( $args );
78
- $default_value = isset( $args['default'] ) ? $args['default'] : '';
79
-
80
- echo $this->field_before( $args );
81
- echo sprintf( '<input type="text" class="sp-tfree-color-picker" value="%1$s" id="%2$s" name="%3$s" data-default-color="%4$s">', $value, $args['id'], $name, $default_value );
82
- echo $this->field_after();
83
- }
84
-
85
- /**
86
- * number
87
- *
88
- * @param array $args
89
- */
90
- public function number( array $args ) {
91
- if ( ! isset( $args['id'], $args['name'] ) ) {
92
- return;
93
- }
94
-
95
- list( $name, $value, $after ) = $this->field_common( $args );
96
- $min = isset( $args['min'] ) ? $args['min'] : null;
97
- $max = isset( $args['max'] ) ? $args['max'] : null;
98
-
99
- echo $this->field_before( $args );
100
- echo sprintf( '<input type="number" class="sp-tfree-input-number" value="%1$s" id="%2$s" name="%3$s">%4$s', $value, $args['id'], $name, $after );
101
- echo $this->field_after();
102
- }
103
-
104
- /**
105
- * checkbox
106
- *
107
- * @param array $args
108
- */
109
- public function checkbox( array $args ) {
110
- if ( ! isset( $args['id'], $args['name'] ) ) {
111
- return;
112
- }
113
-
114
- list( $name, $value, $after ) = $this->field_common( $args );
115
- $checked = ( $value == 'on' ) ? ' checked' : '';
116
-
117
- echo $this->field_before( $args );
118
- echo sprintf( '<input type="hidden" name="%1$s" value="off">', $name );
119
- echo sprintf( '<label for="%2$s"><input type="checkbox" %4$s value="on" id="%2$s" name="%1$s">%3$s</label>', $name, $args['id'], $after, $checked );
120
- echo $this->field_after();
121
- }
122
-
123
- /**
124
- * select
125
- *
126
- * @param array $args
127
- */
128
- public function select( array $args ) {
129
- if ( ! isset( $args['id'], $args['name'] ) ) {
130
- return;
131
- }
132
-
133
- list( $name, $value ) = $this->field_common( $args );
134
- $multiple = isset( $args['multiple'] ) ? 'multiple' : '';
135
-
136
- echo $this->field_before( $args );
137
- echo sprintf( '<select name="%1$s" id="%2$s" class="sp-tfree-input-text sp-tfree-select" %3$s>', $name,
138
- $args['id'], $multiple );
139
- foreach ( $args['options'] as $key => $option ) {
140
- $selected = ( $value == $key ) ? ' selected="selected"' : '';
141
- echo sprintf( '<option value="%1$s" %3$s>%2$s</option>', $key, $option, $selected );
142
- }
143
- echo '</select>';
144
- echo $this->field_after();
145
- }
146
-
147
- /**
148
- * checkbox
149
- *
150
- * @param array $args
151
- */
152
- public function checkbox_disabled( array $args ) {
153
- if ( ! isset( $args['id'], $args['name'] ) ) {
154
- return;
155
- }
156
-
157
- list( $name, $value, $after ) = $this->field_common( $args );
158
- $checked = ( $value == 'on' ) ? ' checked' : '';
159
-
160
- echo $this->field_before( $args );
161
- echo sprintf( '<input type="hidden" name="%1$s" value="off">', $name );
162
- echo sprintf( '<label for="%2$s"><input disabled type="checkbox" %4$s value="on" id="%2$s" name="%1$s">%3$s</label>', $name, $args['id'], $after, $checked );
163
- echo $this->field_after();
164
- }
165
-
166
-
167
- /**
168
- * Nav for pro ad.
169
- *
170
- * @param array $args
171
- */
172
- public function navigation_style( array $args ) {
173
- if ( ! isset( $args['id'], $args['name'] ) ) {
174
- return;
175
- }
176
-
177
- list( $name, $value ) = $this->field_common( $args );
178
- $multiple = isset( $args['multiple'] ) ? 'multiple' : '';
179
-
180
- echo $this->field_before( $args );
181
- echo '<div class="sp-tfree-image-select">
182
-
183
- <label>
184
- <input type="radio" name="navigation_style" value="thirteen" checked="checked">
185
- <img src="'.SP_TFREE_URL . '/admin/assets/images/nav-13.png'.'" alt="thirteen">
186
- </label>
187
- <div class="sp-tfree-label">
188
- <input disabled type="radio" name="navigation_style" value="one">
189
- <img disabled src="'.SP_TFREE_URL . '/admin/assets/images/nav-1.png'.'" alt="one">
190
- </div>
191
- <div class="sp-tfree-label">
192
- <input disabled type="radio" name="navigation_style" value="two">
193
- <img src="'.SP_TFREE_URL . '/admin/assets/images/nav-2.png'.'" alt="two">
194
- </div>
195
- <div class="sp-tfree-label">
196
- <input disabled type="radio" name="navigation_style" value="three">
197
- <img src="'.SP_TFREE_URL . '/admin/assets/images/nav-3.png'.'" alt="three">
198
- </div>
199
- <div class="sp-tfree-label">
200
- <input disabled type="radio" name="navigation_style" value="four">
201
- <img src="'.SP_TFREE_URL . '/admin/assets/images/nav-4.png'.'" alt="four">
202
- </div>
203
- <div class="sp-tfree-label">
204
- <input disabled type="radio" name="navigation_style" value="five">
205
- <img src="'.SP_TFREE_URL . '/admin/assets/images/nav-5.png'.'" alt="five">
206
- </div>
207
- <div class="sp-tfree-label">
208
- <input disabled type="radio" name="navigation_style" value="six">
209
- <img src="'.SP_TFREE_URL . '/admin/assets/images/nav-6.png'.'" alt="six">
210
- </div>
211
- <div class="sp-tfree-label">
212
- <input disabled type="radio" name="navigation_style" value="seven">
213
- <img src="'.SP_TFREE_URL . '/admin/assets/images/nav-7.png'.'" alt="seven">
214
- </div>
215
- <div class="sp-tfree-label">
216
- <input disabled type="radio" name="navigation_style" value="eight">
217
- <img src="'.SP_TFREE_URL . '/admin/assets/images/nav-8.png'.'" alt="eight">
218
- </div>
219
- <div class="sp-tfree-label">
220
- <input disabled type="radio" name="navigation_style" value="nine">
221
- <img src="'.SP_TFREE_URL . '/admin/assets/images/nav-9.png'.'" alt="nine">
222
- </div>
223
- <div class="sp-tfree-label">
224
- <input disabled type="radio" name="navigation_style" value="ten">
225
- <img src="'.SP_TFREE_URL . '/admin/assets/images/nav-10.png'.'" alt="ten">
226
- </div>
227
- <div class="sp-tfree-label">
228
- <input disabled type="radio" name="navigation_style" value="eleven">
229
- <img src="'.SP_TFREE_URL . '/admin/assets/images/nav-11.png'.'" alt="eleven">
230
- </div>
231
- <div class="sp-tfree-label">
232
- <input disabled type="radio" name="navigation_style" value="twelve">
233
- <img src="'.SP_TFREE_URL . '/admin/assets/images/nav-12.png'.'" alt="twelve">
234
- </div>
235
-
236
- <div class="sp-pro-version-text">Pro</div>
237
- <div class="sp-divider"></div>
238
-
239
- </div>';
240
-
241
- echo $this->field_after();
242
- }
243
-
244
-
245
- /**
246
- * Typography for pro ad.
247
- *
248
- * @param array $args
249
- */
250
- public function typography_type( array $args ) {
251
- if ( ! isset( $args['id'], $args['name'] ) ) {
252
- return;
253
- }
254
-
255
- list( $name, $value ) = $this->field_common( $args );
256
- $multiple = isset( $args['multiple'] ) ? 'multiple' : '';
257
-
258
- echo $this->field_before( $args );
259
- echo '<br><div class="sp_tfree_font_field">
260
- <div class="sp-element sp-typography-family">
261
- Font Family <br>
262
- <select disabled name="sp-typo-family" id="sp-typo-family" class="sp-tfree-select">
263
- <option selected="selected" value="Open Sans">Open Sans</option>
264
- <option value="Libre Barcode 39 Extended Text">Libre Barcode 39 Extended Text</option>
265
- </select>
266
- </div>
267
-
268
- <div class="sp-element sp-typography-variant">
269
- Font Weight <br>
270
- <select disabled name="sp-typo-variant" id="sp-typo-variant" class="sp-tfree-select">
271
- <option value="regular">regular</option>
272
- </select>
273
- </div>
274
-
275
- <div class="sp-element sp-field-number sp-pseudo-field small-input sp-font-size">
276
- Font Size <br>
277
- <input disabled type="number" class="sp-tfree-input-number" value="16" title="Font Size">
278
- </div>
279
-
280
- <div class="sp-element sp-field-number sp-pseudo-field small-input sp-font-height">
281
- Line Height <br>
282
- <input disabled type="number" class="sp-tfree-input-number" value="20" title="Line Height">
283
- </div>
284
- <div class="sp-divider"></div>
285
- <div class="sp-element sp-field-select sp-pseudo-field small-input sp-font-alignment">
286
- Alignment <br>
287
- <select disabled name="sp-font-alignment" id="sp-font-alignment" class="sp-tfree-select">
288
- <option value="left">Left</option>
289
- </select>
290
- </div>
291
-
292
- <div class="sp-element sp-field-select sp-pseudo-field small-input sp-font-transform">
293
- Transform <br>
294
- <select disabled name="sp-font-transform" id="sp-font-transform" class="sp-tfree-select">
295
- <option value="none">None</option>
296
- </select>
297
- </div>
298
-
299
- <div class="sp-element sp-field-select sp-pseudo-field small-input sp-font-spacing">
300
- Letter Spacing <br>
301
- <select disabled name="sp-font-spacing" id="sp-font-spacing" class="sp-tfree-select">
302
- <option value="normal">Normal</option>
303
- </select>
304
- </div>
305
- <div class="sp-divider"></div>
306
- <div class="sp-element sp-typography-color">
307
- Color <br>
308
- <div disabled class="sp-element sp-field-color_picker sp-pseudo-field">
309
- <input disabled type="text" class="sp-tfree-color-picker" value="#444444" id="sp-field-color_picker" name="sp-field-color_picker">
310
- </div>
311
- </div>
312
- <div class="sp-font-preview">The Font Preview</div>
313
-
314
- </div>';
315
-
316
- echo $this->field_after();
317
- }
318
-
319
- /**
320
- * Select layout for pro ad.
321
- *
322
- * @param array $args
323
- */
324
- public function select_layout( array $args ) {
325
- if ( ! isset( $args['id'], $args['name'] ) ) {
326
- return;
327
- }
328
-
329
- list( $name, $value ) = $this->field_common( $args );
330
- $multiple = isset( $args['multiple'] ) ? 'multiple' : '';
331
-
332
- echo $this->field_before( $args );
333
- echo sprintf( '<select name="%1$s" id="%2$s" class="sp-tfree-input-text sp-tfree-select" %3$s>', $name, $args['id'], $multiple
334
- ); ?>
335
- <option value="slider">Slider</option>
336
- <option value="gird" disabled>Grid (Pro)</option>
337
- <option value="masonry" disabled>Masonry (Pro)</option>
338
- <option value="list" disabled>List (Pro)</option>
339
- <option value="filter_grid" disabled>Filter-Grid (Pro)</option>
340
- <option value="filter_masonry" disabled>Filter-Masonry (Pro)</option>
341
- <?php
342
- echo '</select>';
343
- echo $this->field_after();
344
- }
345
-
346
- /**
347
- * Select posts from for pro ad.
348
- *
349
- * @param array $args
350
- */
351
- public function select_testimonials_from( array $args ) {
352
- if ( ! isset( $args['id'], $args['name'] ) ) {
353
- return;
354
- }
355
-
356
- list( $name, $value ) = $this->field_common( $args );
357
- $multiple = isset( $args['multiple'] ) ? 'multiple' : '';
358
-
359
- echo $this->field_before( $args );
360
- echo sprintf( '<select name="%1$s" id="%2$s" class="sp-tfree-input-text sp-tfree-select" %3$s>', $name, $args['id'], $multiple
361
- ); ?>
362
- <option value="latest">Latest</option>
363
- <option value="category" disabled>Category (Pro)</option>
364
- <option value="specific_testimonials" disabled>Specific Testimonials (Pro)</option>
365
- <?php
366
- echo '</select>';
367
- echo $this->field_after();
368
- }
369
-
370
- /**
371
- * field common
372
- *
373
- * @param $args
374
- *
375
- * @return array
376
- */
377
- private function field_common( $args ) {
378
- global $post;
379
-
380
- // Meta Name
381
- $group = isset( $args['group'] ) ? $args['group'] : 'sp_tfree_meta_box';
382
- $multiple = isset( $args['multiple'] ) ? '[]' : '';
383
- $name = sprintf( '%s[%s]%s', $group, $args['id'], $multiple );
384
- $after = isset( $args['after'] ) ? '<span class="sp-tfree-mbf-after">' . $args['after'] . '</span> ' : '';
385
- // Meta Value
386
- $default_value = isset( $args['default'] ) ? $args['default'] : '';
387
- $meta = get_post_meta( $post->ID, $args['id'], true );
388
- $value = ! empty( $meta ) ? $meta : $default_value;
389
- if ( $value == 'zero' ) {
390
- $value = 0;
391
- }
392
-
393
- return array( $name, $value, $after );
394
- }
395
-
396
-
397
- private function field_before( $args ) {
398
- $table = '';
399
- $table .= sprintf( '<div class="sp-tfree-element sp-tfree-input-group" id="field-%s">', $args['id'] );
400
- $table .= sprintf( '<div class="sp-tfree-input-label">' );
401
- $table .= sprintf( '<label for="%1$s"><h4>%2$s</h4></label>', $args['id'], $args['name'] );
402
- if ( ! empty( $args['desc'] ) ) {
403
- $table .= sprintf( '<p class="sp-tfree-input-desc">%s</p>', $args['desc'] );
404
- }
405
- $table .= '</div>';
406
- $table .= sprintf( '<div class="sp-tfree-input-field">' );
407
-
408
- return $table;
409
- }
410
-
411
- private function field_after() {
412
- return '</div></div>';
413
- }
414
-
415
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
class/router.php CHANGED
@@ -1,11 +1,12 @@
1
  <?php
2
 
3
  if ( ! defined( 'ABSPATH' ) ) {
4
- exit; // Exit if accessed directly
5
  }
6
 
7
  /**
8
  * Testimonial - route class
 
9
  * @since 2.0
10
  */
11
  class SP_TFREE_Router {
@@ -53,14 +54,4 @@ class SP_TFREE_Router {
53
  include_once SP_TFREE_PATH . 'includes/functions.php';
54
  }
55
 
56
- /**
57
- * MetaBox
58
- *
59
- * @since 1.0
60
- * @return void
61
- */
62
- function sp_tfree_metabox() {
63
- include_once SP_TFREE_PATH . 'admin/views/metabox/sp-framework.php';
64
- }
65
-
66
- }
1
  <?php
2
 
3
  if ( ! defined( 'ABSPATH' ) ) {
4
+ exit; // Exit if accessed directly.
5
  }
6
 
7
  /**
8
  * Testimonial - route class
9
+ *
10
  * @since 2.0
11
  */
12
  class SP_TFREE_Router {
54
  include_once SP_TFREE_PATH . 'includes/functions.php';
55
  }
56
 
57
+ }
 
 
 
 
 
 
 
 
 
 
class/shortcodes.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
  /**
3
  * This is to register the shortcode post type.
 
4
  * @package testimonial-free
5
  */
6
 
@@ -29,6 +30,7 @@ class SP_TFREE_Shortcodes {
29
 
30
  /**
31
  * Allows for accessing single instance of class. Class should only be constructed once per call.
 
32
  * @return SP_TFREE_Shortcodes
33
  */
34
  public static function getInstance() {
@@ -43,32 +45,34 @@ class SP_TFREE_Shortcodes {
43
  * Shortcode Post Type
44
  */
45
  function register_post_type() {
46
- register_post_type( 'sp_tfree_shortcodes', array(
47
- 'label' => __( 'Generate Shortcode', 'testimonial-free' ),
48
- 'description' => __( 'Generate Shortcode for Testimonial', 'testimonial-free' ),
49
- 'public' => false,
50
- 'show_ui' => true,
51
- 'show_in_menu' => 'edit.php?post_type=spt_testimonial',
52
- 'hierarchical' => false,
53
- 'query_var' => false,
54
- 'supports' => array( 'title' ),
55
- 'capability_type' => 'post',
56
- 'labels' => array(
57
- 'name' => __( 'Testimonial Shortcodes', 'testimonial-free' ),
58
- 'singular_name' => __( 'Testimonial Shortcode', 'testimonial-free' ),
59
- 'menu_name' => __( 'Shortcode Generator', 'testimonial-free' ),
60
- 'add_new' => __( 'Add New', 'testimonial-free' ),
61
- 'add_new_item' => __( 'Add New Shortcode', 'testimonial-free' ),
62
- 'edit' => __( 'Edit', 'testimonial-free' ),
63
- 'edit_item' => __( 'Edit Shortcode', 'testimonial-free' ),
64
- 'new_item' => __( 'New Shortcode', 'testimonial-free' ),
65
- 'view' => __( 'View Shortcode', 'testimonial-free' ),
66
- 'view_item' => __( 'View Shortcode', 'testimonial-free' ),
67
- 'search_items' => __( 'Search Shortcode', 'testimonial-free' ),
68
- 'not_found' => __( 'No Testimonial Shortcode Found', 'testimonial-free' ),
69
- 'not_found_in_trash' => __( 'No Testimonial Shortcode Found in Trash', 'testimonial-free' ),
70
- 'parent' => __( 'Parent Testimonial Shortcode', 'testimonial-free' ),
 
 
71
  )
72
- ) );
73
  }
74
  }
1
  <?php
2
  /**
3
  * This is to register the shortcode post type.
4
+ *
5
  * @package testimonial-free
6
  */
7
 
30
 
31
  /**
32
  * Allows for accessing single instance of class. Class should only be constructed once per call.
33
+ *
34
  * @return SP_TFREE_Shortcodes
35
  */
36
  public static function getInstance() {
45
  * Shortcode Post Type
46
  */
47
  function register_post_type() {
48
+ register_post_type(
49
+ 'sp_tfree_shortcodes', array(
50
+ 'label' => __( 'Generate Shortcode', 'testimonial-free' ),
51
+ 'description' => __( 'Generate Shortcode for Testimonial', 'testimonial-free' ),
52
+ 'public' => false,
53
+ 'show_ui' => true,
54
+ 'show_in_menu' => 'edit.php?post_type=spt_testimonial',
55
+ 'hierarchical' => false,
56
+ 'query_var' => false,
57
+ 'supports' => array( 'title' ),
58
+ 'capability_type' => 'post',
59
+ 'labels' => array(
60
+ 'name' => __( 'Testimonial Shortcodes', 'testimonial-free' ),
61
+ 'singular_name' => __( 'Testimonial Shortcode', 'testimonial-free' ),
62
+ 'menu_name' => __( 'Shortcode Generator', 'testimonial-free' ),
63
+ 'add_new' => __( 'Add New', 'testimonial-free' ),
64
+ 'add_new_item' => __( 'Add New Shortcode', 'testimonial-free' ),
65
+ 'edit' => __( 'Edit', 'testimonial-free' ),
66
+ 'edit_item' => __( 'Edit Shortcode', 'testimonial-free' ),
67
+ 'new_item' => __( 'New Shortcode', 'testimonial-free' ),
68
+ 'view' => __( 'View Shortcode', 'testimonial-free' ),
69
+ 'view_item' => __( 'View Shortcode', 'testimonial-free' ),
70
+ 'search_items' => __( 'Search Shortcode', 'testimonial-free' ),
71
+ 'not_found' => __( 'No Testimonial Shortcode Found', 'testimonial-free' ),
72
+ 'not_found_in_trash' => __( 'No Testimonial Shortcode Found in Trash', 'testimonial-free' ),
73
+ 'parent' => __( 'Parent Testimonial Shortcode', 'testimonial-free' ),
74
+ ),
75
  )
76
+ );
77
  }
78
  }
class/testimonial.php CHANGED
@@ -1,83 +1,86 @@
1
  <?php
2
-
3
  if ( ! defined( 'ABSPATH' ) ) {
4
- exit; // Exit if accessed directly
5
  }
6
 
7
  class SP_TFREE_Testimonial {
8
 
9
- /**
10
- * @var
11
- * @since 2.0
12
- */
13
- private static $_instance;
14
 
15
- /**
16
- * @return SP_TFREE_Testimonial
17
- * @since 2.0
18
- */
19
- public static function getInstance() {
20
- if ( ! self::$_instance ) {
21
- self::$_instance = new self();
22
- }
23
 
24
- return self::$_instance;
25
- }
26
 
27
- /**
28
- * SP_TFREE_Testimonial constructor.
29
- * @since 1.0
30
- */
31
- public function __construct() {
32
- add_filter( 'init', array( $this, 'register_post_type' ) );
33
- }
 
34
 
35
- /**
36
- * Register post type
37
- * @since 1.0
38
- */
39
- function register_post_type() {
40
- register_post_type( 'spt_testimonial', array(
41
- 'label' => __( 'Testimonial', 'testimonial-free' ),
42
- 'description' => __( 'Testimonial custom post type.', 'testimonial-free' ),
43
- 'taxonomies' => array(),
44
- 'public' => false,
45
- 'has_archive' => false,
46
- 'publicaly_queryable' => false,
47
- 'query_var' => false,
48
- 'show_ui' => true,
49
- 'show_in_menu' => true,
50
- 'menu_icon' => SP_TFREE_URL . '/admin/assets/images/icon-32.png',
51
- 'show_in_nav_menus' => true,
52
- 'show_in_admin_bar' => true,
53
- 'hierarchical' => false,
54
- 'menu_position' => 20,
55
- 'supports' => array(
56
- 'title',
57
- 'editor',
58
- 'thumbnail'
59
- ),
60
- 'capability_type' => 'post',
61
- 'labels' => array(
62
- 'name' => __( 'Testimonials', 'testimonial-free' ),
63
- 'singular_name' => __( 'Testimonial', 'testimonial-free' ),
64
- 'menu_name' => __( 'Testimonial', 'testimonial-free' ),
65
- 'all_items' => __( 'Testimonials', 'testimonial-free' ),
66
- 'add_new' => __( 'Add Testimonial', 'testimonial-free' ),
67
- 'add_new_item' => __( 'Add Testimonial', 'testimonial-free' ),
68
- 'edit' => __( 'Edit', 'testimonial-free' ),
69
- 'edit_item' => __( 'Edit Testimonial', 'testimonial-free' ),
70
- 'new_item' => __( 'New Testimonial', 'testimonial-free' ),
71
- 'search_items' => __( 'Search Testimonials', 'testimonial-free' ),
72
- 'not_found' => __( 'No Testimonials found', 'testimonial-free' ),
73
- 'not_found_in_trash' => __( 'No Testimonials found in Trash', 'testimonial-free' ),
74
- 'parent' => __( 'Parent Testimonials', 'testimonial-free' ),
75
- 'featured_image' => __( 'Featured Image for Testimonial', 'testimonial-free' ),
76
- 'set_featured_image' => __( 'Set Testimonial Thumbnail', 'testimonial-free' ),
77
- 'remove_featured_image' => __( 'Remove image', 'testimonial-free' ),
78
- 'use_featured_image' => __( 'Use as image', 'testimonial-free' ),
79
- )
80
- ) );
81
- }
 
 
 
82
 
83
- }
1
  <?php
 
2
  if ( ! defined( 'ABSPATH' ) ) {
3
+ exit; // Exit if accessed directly.
4
  }
5
 
6
  class SP_TFREE_Testimonial {
7
 
8
+ /**
9
+ * @var
10
+ * @since 2.0
11
+ */
12
+ private static $_instance;
13
 
14
+ /**
15
+ * @return SP_TFREE_Testimonial
16
+ * @since 2.0
17
+ */
18
+ public static function getInstance() {
19
+ if ( ! self::$_instance ) {
20
+ self::$_instance = new self();
21
+ }
22
 
23
+ return self::$_instance;
24
+ }
25
 
26
+ /**
27
+ * SP_TFREE_Testimonial constructor.
28
+ *
29
+ * @since 1.0
30
+ */
31
+ public function __construct() {
32
+ add_filter( 'init', array( $this, 'register_post_type' ) );
33
+ }
34
 
35
+ /**
36
+ * Register post type
37
+ *
38
+ * @since 1.0
39
+ */
40
+ function register_post_type() {
41
+ register_post_type(
42
+ 'spt_testimonial', array(
43
+ 'label' => __( 'Testimonial', 'testimonial-free' ),
44
+ 'description' => __( 'Testimonial custom post type.', 'testimonial-free' ),
45
+ 'taxonomies' => array(),
46
+ 'public' => false,
47
+ 'has_archive' => false,
48
+ 'publicaly_queryable' => false,
49
+ 'query_var' => false,
50
+ 'show_ui' => true,
51
+ 'show_in_menu' => true,
52
+ 'menu_icon' => 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4IiB2aWV3Qm94PSIwIDAgNDc4LjI0OCA0NzguMjQ4IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA0NzguMjQ4IDQ3OC4yNDg7IiB4bWw6c3BhY2U9InByZXNlcnZlIiBjbGFzcz0iIj48Zz48Zz4KCTxnPgoJCTxnPgoJCQk8cGF0aCBkPSJNNDU2LjAyLDQ0LjgyMUgyNjQuODNjLTEyLjI2LDAtMjIuMjMyLDkuOTcyLTIyLjIzMiwyMi4yMjl2OTguNjUyYzAsMTIuMjU4LDkuOTc0LDIyLjIzLDIyLjIzMiwyMi4yM2gxNi43ODd2MzkuMTYxICAgICBjMCwyLjcwNywxLjU4LDUuMTY1LDQuMDQzLDYuMjkyYzAuOTIsMC40MiwxLjkwMSwwLjYyNywyLjg3NSwwLjYyN2MxLjYzMSwwLDMuMjQ0LTAuNTc2LDQuNTIzLTEuNjg1bDUxLjM4My00NC4zOTZoMTExLjU3NiAgICAgYzEyLjI2LDAsMjIuMjMtOS45NzMsMjIuMjMtMjIuMjNWNjcuMDVDNDc4LjI1LDU0Ljc5Miw0NjguMjc3LDQ0LjgyMSw0NTYuMDIsNDQuODIxeiBNMzE5LjkyMiwxMTIuMjUybC0xMC4yMDksOS45NTMgICAgIGwyLjQxLDE0LjA1NGMwLjE3NCwxLjAxNS0wLjI0MiwyLjAzOC0xLjA3NiwyLjY0M2MtMC40NjksMC4zNDItMS4wMjcsMC41MTYtMS41ODgsMC41MTZjLTAuNDI4LDAtMC44NjEtMC4xMDMtMS4yNTYtMC4zMSAgICAgbC0xMi42MjEtNi42MzVsLTEyLjYxOSw2LjYzNWMtMC45MTIsMC40NzgtMi4wMTYsMC4zOTgtMi44NDgtMC4yMDZzLTEuMjQ4LTEuNjI4LTEuMDc0LTIuNjQzbDIuNDEtMTQuMDU0bC0xMC4yMTEtOS45NTMgICAgIGMtMC43MzQtMC43MTgtMS4wMDItMS43OTItMC42ODUtMi43NjljMC4zMTctMC45NzgsMS4xNjQtMS42OTEsMi4xODMtMS44MzlsMTQuMTEtMi4wNWw2LjMxLTEyLjc4NiAgICAgYzAuNDU3LTAuOTIzLDEuMzk2LTEuNTA3LDIuNDI0LTEuNTA3czEuOTY5LDAuNTg0LDIuNDIyLDEuNTA3bDYuMzEyLDEyLjc4NmwxNC4xMDcsMi4wNWMxLjAyLDAuMTQ4LDEuODYzLDAuODYxLDIuMTg0LDEuODM5ICAgICBDMzIwLjkyNCwxMTAuNDYsMzIwLjY1OCwxMTEuNTM1LDMxOS45MjIsMTEyLjI1MnogTTM4NC43NjYsMTEyLjI1MmwtMTAuMjExLDkuOTUzbDIuNDEyLDE0LjA1NCAgICAgYzAuMTcyLDEuMDE1LTAuMjQ0LDIuMDM4LTEuMDc2LDIuNjQzYy0wLjQ2OSwwLjM0Mi0xLjAyNSwwLjUxNi0xLjU4OCwwLjUxNmMtMC40MywwLTAuODU5LTAuMTAzLTEuMjYtMC4zMWwtMTIuNjE5LTYuNjM1ICAgICBsLTEyLjYxOSw2LjYzNWMtMC45MTIsMC40NzgtMi4wMTQsMC4zOTgtMi44NDYtMC4yMDZjLTAuODM0LTAuNjA0LTEuMjUtMS42MjgtMS4wNzYtMi42NDNsMi40MS0xNC4wNTRsLTEwLjIwOS05Ljk1MyAgICAgYy0wLjczNC0wLjcxOC0xLjAwMi0xLjc5Mi0wLjY4NC0yLjc2OWMwLjMxNi0wLjk3OCwxLjE2LTEuNjkxLDIuMTgyLTEuODM5bDE0LjEwOS0yLjA1bDYuMzExLTEyLjc4NiAgICAgYzAuNDU1LTAuOTIzLDEuMzk2LTEuNTA3LDIuNDIyLTEuNTA3YzEuMDI5LDAsMS45NjcsMC41ODQsMi40MjIsMS41MDdsNi4zMTIsMTIuNzg2bDE0LjEwOSwyLjA1ICAgICBjMS4wMjEsMC4xNDgsMS44NjMsMC44NjEsMi4xODIsMS44MzlDMzg1Ljc2OCwxMTAuNDYsMzg1LjUsMTExLjUzNSwzODQuNzY2LDExMi4yNTJ6IE00NDkuNjA3LDExMi4yNTJsLTEwLjIxMSw5Ljk1MyAgICAgbDIuNDA4LDE0LjA1NGMwLjE3NiwxLjAxNS0wLjIzOCwyLjAzOC0xLjA3MiwyLjY0M2MtMC40NzEsMC4zNDItMS4wMjcsMC41MTYtMS41OSwwLjUxNmMtMC40MywwLTAuODU5LTAuMTAzLTEuMjU4LTAuMzEgICAgIGwtMTIuNjIxLTYuNjM1bC0xMi42MjEsNi42MzVjLTAuOTA4LDAuNDc4LTIuMDEyLDAuMzk4LTIuODQ0LTAuMjA2Yy0wLjgzNC0wLjYwNC0xLjI0OC0xLjYyOC0xLjA3Ni0yLjY0M2wyLjQxMi0xNC4wNTQgICAgIGwtMTAuMjExLTkuOTUzYy0wLjczNC0wLjcxOC0xLTEuNzkyLTAuNjg0LTIuNzY5YzAuMzE2LTAuOTc4LDEuMTY0LTEuNjkxLDIuMTgyLTEuODM5bDE0LjExMS0yLjA1bDYuMzExLTEyLjc4NiAgICAgYzAuNDUzLTAuOTIzLDEuMzk1LTEuNTA3LDIuNDItMS41MDdjMS4wMjcsMCwxLjk3MSwwLjU4NCwyLjQyNiwxLjUwN0w0MzQsMTA1LjU5NGwxNC4xMDksMi4wNSAgICAgYzEuMDE4LDAuMTQ4LDEuODYxLDAuODYxLDIuMTgyLDEuODM5QzQ1MC42MDksMTEwLjQ2LDQ1MC4zNDQsMTExLjUzNSw0NDkuNjA3LDExMi4yNTJ6IiBkYXRhLW9yaWdpbmFsPSIjMDAwMDAwIiBjbGFzcz0iYWN0aXZlLXBhdGgiIGRhdGEtb2xkX2NvbG9yPSIjMDAwMDAwIiBmaWxsPSIjOUZBNEE5Ii8+CgkJCTxwYXRoIGQ9Ik0xNTIuODQ0LDExMi45MjRjLTQ2Ljc2LDAtNzIuNjM5LDI0LjIzMS03Mi4xNjYsNzAuOTIxYzAuNjg2LDYzLjk0NywyNy44NTksMTAyLjc0LDcyLjE2NiwxMDIuMDYzICAgICBjMCwwLDcyLjEzMSwyLjkyNCw3Mi4xMzEtMTAyLjA2M0MyMjQuOTc1LDEzNy4xNTUsMjAwLjYwNSwxMTIuOTI0LDE1Mi44NDQsMTEyLjkyNHoiIGRhdGEtb3JpZ2luYWw9IiMwMDAwMDAiIGNsYXNzPSJhY3RpdmUtcGF0aCIgZGF0YS1vbGRfY29sb3I9IiMwMDAwMDAiIGZpbGw9IiM5RkE0QTkiLz4KCQkJPHBhdGggZD0iTTI4MC40MjgsMzM0LjQ0NGwtNzIuMDc0LTI4LjczNmwtMTYuODc3LTE0LjIyM2MtNC40NTctMy43NjYtMTEuMDQxLTMuNDg4LTE1LjE3OCwwLjYyMWwtMjMuNDYzLDIzLjMzNmwtMjMuNTMzLTIzLjM0MiAgICAgYy00LjEzNy00LjEwNC0xMC43MTMtNC4zNjktMTUuMTY0LTAuNjE1bC0xNi44ODEsMTQuMjIzbC03Mi4wNzQsMjguNzM5QzEuOTc1LDM0My42OSwxLjk5NSw0MjUuODg0LDAsNDMzLjQyN2gzMDUuNjQ2ICAgICBDMzAzLjY1Niw0MjUuOSwzMDMuNjQ2LDM0My42NzksMjgwLjQyOCwzMzQuNDQ0eiIgZGF0YS1vcmlnaW5hbD0iIzAwMDAwMCIgY2xhc3M9ImFjdGl2ZS1wYXRoIiBkYXRhLW9sZF9jb2xvcj0iIzAwMDAwMCIgZmlsbD0iIzlGQTRBOSIvPgoJCTwvZz4KCTwvZz4KPC9nPjwvZz4gPC9zdmc+Cg==',
53
+ 'show_in_nav_menus' => true,
54
+ 'show_in_admin_bar' => true,
55
+ 'hierarchical' => false,
56
+ 'menu_position' => 20,
57
+ 'supports' => array(
58
+ 'title',
59
+ 'editor',
60
+ 'thumbnail',
61
+ ),
62
+ 'capability_type' => 'post',
63
+ 'labels' => array(
64
+ 'name' => __( 'Testimonials', 'testimonial-free' ),
65
+ 'singular_name' => __( 'Testimonial', 'testimonial-free' ),
66
+ 'menu_name' => __( 'Testimonial', 'testimonial-free' ),
67
+ 'all_items' => __( 'Testimonials', 'testimonial-free' ),
68
+ 'add_new' => __( 'Add Testimonial', 'testimonial-free' ),
69
+ 'add_new_item' => __( 'Add Testimonial', 'testimonial-free' ),
70
+ 'edit' => __( 'Edit', 'testimonial-free' ),
71
+ 'edit_item' => __( 'Edit Testimonial', 'testimonial-free' ),
72
+ 'new_item' => __( 'New Testimonial', 'testimonial-free' ),
73
+ 'search_items' => __( 'Search Testimonials', 'testimonial-free' ),
74
+ 'not_found' => __( 'No Testimonials found', 'testimonial-free' ),
75
+ 'not_found_in_trash' => __( 'No Testimonials found in Trash', 'testimonial-free' ),
76
+ 'parent' => __( 'Parent Testimonials', 'testimonial-free' ),
77
+ 'featured_image' => __( 'Featured Image for Testimonial', 'testimonial-free' ),
78
+ 'set_featured_image' => __( 'Set Testimonial Thumbnail', 'testimonial-free' ),
79
+ 'remove_featured_image' => __( 'Remove image', 'testimonial-free' ),
80
+ 'use_featured_image' => __( 'Use as image', 'testimonial-free' ),
81
+ ),
82
+ )
83
+ );
84
+ }
85
 
86
+ }
includes/class-testimonial-activator.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fired during plugin activation.
4
+ *
5
+ * This class defines all code necessary to run during the plugin's activation.
6
+ *
7
+ * @since 2.1.5
8
+ * @package Testimonial
9
+ * @subpackage Testimonial/includes
10
+ */
11
+ class Testimonial_Activator {
12
+ /**
13
+ * Activation hook function.
14
+ */
15
+ public static function activate() {
16
+
17
+ deactivate_plugins( 'testimonial-pro/testimonial-pro.php' );
18
+ }
19
+
20
+ }
includes/class-testimonial-deactivator.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fired during plugin deactivation.
4
+ *
5
+ * This class defines all code necessary to run during the plugin's deactivation.
6
+ *
7
+ * @since 2.1.5
8
+ * @package Testimonial
9
+ * @subpackage Testimonial/includes
10
+ */
11
+ class Testimonial_Deactivator {
12
+
13
+ /**
14
+ * Deactivation hook function.
15
+ */
16
+ public static function deactivate() {
17
+
18
+ }
19
+
20
+ }
includes/class-testimonial-updates.php ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fired during plugin updates
4
+ *
5
+ * @link https://shapedplugin.com/
6
+ * @since 2.1.5
7
+ *
8
+ * @package Testimonial
9
+ * @subpackage Testimonial/includes
10
+ */
11
+
12
+ // don't call the file directly.
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit;
15
+ }
16
+
17
+ /**
18
+ * Fired during plugin updates.
19
+ *
20
+ * This class defines all code necessary to run during the plugin's updates.
21
+ *
22
+ * @since 2.1.5
23
+ * @package Testimonial
24
+ * @subpackage Testimonial/includes
25
+ * @author ShapedPlugin <support@shapedplugin.com>
26
+ */
27
+ class Testimonial_Updates {
28
+
29
+ /**
30
+ * DB updates that need to be run
31
+ *
32
+ * @var array
33
+ */
34
+ private static $updates = [
35
+ '2.1.5' => 'updates/update-2.1.5.php',
36
+ ];
37
+
38
+ /**
39
+ * Binding all events
40
+ *
41
+ * @since 2.1.5
42
+ *
43
+ * @return void
44
+ */
45
+ public function __construct() {
46
+ add_action( 'plugins_loaded', array( $this, 'do_updates' ) );
47
+ }
48
+
49
+ /**
50
+ * Check if need any update
51
+ *
52
+ * @since 2.1.5
53
+ *
54
+ * @return boolean
55
+ */
56
+ public function is_needs_update() {
57
+ $installed_version = get_option( 'testimonial_version' );
58
+
59
+ if ( false === $installed_version ) {
60
+ update_option( 'testimonial_version', '2.1.4' );
61
+ update_option( 'testimonial_db_version', '2.1.4' );
62
+ }
63
+
64
+ if ( version_compare( $installed_version, SP_TFREE_VERSION, '<' ) ) {
65
+ return true;
66
+ }
67
+
68
+ return false;
69
+ }
70
+
71
+ /**
72
+ * Do updates.
73
+ *
74
+ * @since 2.1.5
75
+ *
76
+ * @return void
77
+ */
78
+ public function do_updates() {
79
+ $this->perform_updates();
80
+ }
81
+
82
+ /**
83
+ * Perform all updates
84
+ *
85
+ * @since 2.1.5
86
+ *
87
+ * @return void
88
+ */
89
+ public function perform_updates() {
90
+ if ( ! $this->is_needs_update() ) {
91
+ return;
92
+ }
93
+
94
+ $installed_version = get_option( 'testimonial_version' );
95
+
96
+ foreach ( self::$updates as $version => $path ) {
97
+ if ( version_compare( $installed_version, $version, '<' ) ) {
98
+ include $path;
99
+ update_option( 'testimonial_version', $version );
100
+ }
101
+ }
102
+
103
+ update_option( 'testimonial_version', SP_TFREE_VERSION );
104
+
105
+ }
106
+
107
+ }
108
+ new Testimonial_Updates();
includes/free/loader.php CHANGED
@@ -9,12 +9,12 @@
9
  class SP_TFREE_Loader {
10
 
11
  function __construct() {
12
- require_once( SP_TFREE_PATH . 'admin/views/scripts.php' );
13
- require_once( SP_TFREE_PATH . 'admin/views/mce-button.php' );
14
- require_once( SP_TFREE_PATH . 'admin/views/widget.php' );
15
- require_once( SP_TFREE_PATH . 'public/views/shortcoderender.php' );
16
- require_once( SP_TFREE_PATH . 'public/views/deprecated-shortcodes.php' );
17
- require_once( SP_TFREE_PATH . 'public/views/scripts.php' );
18
  }
19
 
20
  }
9
  class SP_TFREE_Loader {
10
 
11
  function __construct() {
12
+ require_once SP_TFREE_PATH . 'admin/views/scripts.php';
13
+ require_once SP_TFREE_PATH . 'admin/views/mce-button.php';
14
+ require_once SP_TFREE_PATH . 'admin/views/widget.php';
15
+ require_once SP_TFREE_PATH . 'public/views/shortcoderender.php';
16
+ require_once SP_TFREE_PATH . 'public/views/deprecated-shortcodes.php';
17
+ require_once SP_TFREE_PATH . 'public/views/scripts.php';
18
  }
19
 
20
  }
includes/functions.php CHANGED
@@ -53,8 +53,10 @@ class SP_Testimonial_Free_Functions {
53
  $screen = get_current_screen();
54
  if ( 'spt_testimonial' == get_post_type() || $screen->id == 'spt_testimonial_page_tfree_help' || $screen->post_type == 'sp_tfree_shortcodes' ) {
55
  $url = 'https://wordpress.org/support/plugin/testimonial-free/reviews/?filter=5#new-post';
56
- $text = sprintf( __( 'If you like <strong>Testimonial</strong> please leave us a <a href="%s" target="_blank">&#9733;&#9733;&#9733;&#9733;&#9733;</a> rating. Your Review is very important to us as it helps us to grow more. ', 'testimonial-free' ),
57
- $url );
 
 
58
  }
59
 
60
  return $text;
@@ -64,64 +66,47 @@ class SP_Testimonial_Free_Functions {
64
  * Admin Menu
65
  */
66
  function admin_menu() {
67
- add_submenu_page( 'edit.php?post_type=spt_testimonial', __( 'Testimonial Help', 'testimonial-free' ), __( 'Help', 'testimonial-free' ), 'manage_options', 'tfree_help', array( $this, 'help_page_callback'
68
- ) );
 
 
 
 
 
 
 
 
 
 
69
  }
70
 
71
  /**
72
- * Help Page Callback
73
  */
74
- public function help_page_callback() {
75
  ?>
76
- <div class="wrap about-wrap sp-tfree-help">
77
- <h1><?php _e( 'Welcome to Testimonial!', 'testimonial-free' ); ?></h1>
78
- <p class="about-text"><?php _e( 'Thank you for installing Testimonial! You\'re now running the most popular Testimonial plugin.
79
- This video playlist will help you get started with the plugin.', 'testimonial-free' ); ?></p>
 
 
 
 
 
80
  <div class="wp-badge"></div>
81
-
82
- <hr>
83
-
84
- <div class="headline-feature feature-video">
85
- <iframe width="560" height="315" src="https://www.youtube.com/embed/htnj97_K3ys?list=PLoUb-7uG-5jPTDu5wiWwKhJNuWFWSyA5T" frameborder="0" allowfullscreen></iframe>
86
- </div>
87
-
88
- <hr>
89
-
90
- <div class="feature-section three-col">
91
- <div class="col">
92
- <div class="sp-tfree-feature sp-tfree-text-center">
93
- <i class="sp-tfree-font-icon fa fa-life-ring"></i>
94
- <h3>Need any Assistance?</h3>
95
- <p>Our Expert Support Team is always ready to help you out promptly.</p>
96
- <a href="https://shapedplugin.com/support-forum/" target="_blank" class="button
97
- button-primary">Contact Support</a>
98
- </div>
99
- </div>
100
- <div class="col">
101
- <div class="sp-tfree-feature sp-tfree-text-center">
102
- <i class="sp-tfree-font-icon fa fa-file-text"></i>
103
- <h3>Looking for Documentation?</h3>
104
- <p>We have detailed documentation on every aspects of Testimonial.</p>
105
- <a href="https://shapedplugin.com/docs/testimonial/" target="_blank" class="button button-primary">Documentation</a>
106
- </div>
107
- </div>
108
- <div class="col">
109
- <div class="sp-tfree-feature sp-tfree-text-center">
110
- <i class="sp-tfree-font-icon fa fa-thumbs-up"></i>
111
- <h3>Like This Plugin?</h3>
112
- <p>If you like Testimonial, please leave us a 5 star rating.</p>
113
- <a href="https://wordpress.org/support/plugin/testimonial-free/reviews/#new-post" target="_blank" class="button
114
- button-primary">Rate the Plugin</a>
115
- </div>
116
- </div>
117
- </div>
118
 
119
  <hr>
120
 
121
  <div class="sp-tfree-pro-features">
122
- <h2 class="sp-tfree-text-center">Upgrade to Testimonial Pro!</h2>
123
- <p class="sp-tfree-text-center sp-tfree-pro-subtitle">We've added 100+ extra features in our Premium Version of this plugin. Let’s see some amazing features.</p>
124
- <div class="feature-section three-col masonry-section">
 
125
  <div class="col">
126
  <div class="sp-tfree-feature">
127
  <h3><span class="dashicons dashicons-yes"></span>Advanced Shortcode Generator</h3>
@@ -286,11 +271,86 @@ This video playlist will help you get started with the plugin.', 'testimonial-fr
286
  </div>
287
  </div>
288
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
289
  </div>
290
 
291
- <div class="sp-tfree-upgrade-sticky-footer sp-tfree-text-center">
292
- <p><a href="https://shapedplugin.com/demo/testimonial-pro/" target="_blank" class="button
293
- button-primary">Live Demo</a> <a href="https://shapedplugin.com/plugin/testimonial-pro/" target="_blank" class="button button-primary">Upgrade Now</a></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
294
  </div>
295
 
296
  </div>
@@ -307,11 +367,10 @@ new SP_Testimonial_Free_Functions();
307
  * Multi Language Support
308
  *
309
  * @since 2.0
310
- *
311
  */
312
 
313
  // Polylang plugin support for multi language support.
314
- if ( class_exists('Polylang') ) {
315
 
316
  add_filter( 'pll_get_post_types', 'sp_tfree_testimonial_polylang', 10, 2 );
317
 
@@ -322,24 +381,9 @@ if ( class_exists('Polylang') ) {
322
  unset( $post_types['sp_tfree_shortcodes'] );
323
  } else {
324
  // enables language and translation management for 'tspt_testimonial,sp_free_shortcodes'.
325
- $post_types['spt_testimonial'] = 'spt_testimonial';
326
  $post_types['sp_tfree_shortcodes'] = 'sp_tfree_shortcodes';
327
  }
328
  return $post_types;
329
  }
330
-
331
- }
332
-
333
- /**
334
- * Change the post type
335
- */
336
- global $wpdb;
337
- $old_post_types = array( 'testimonial-free' => 'spt_testimonial' );
338
- foreach ( $old_post_types as $old_type => $type ) {
339
- $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->posts} SET post_type = REPLACE(post_type, %s, %s)
340
- WHERE post_type LIKE %s", $old_type, $type, $old_type ) );
341
- $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->posts} SET guid = REPLACE(guid, %s, %s)
342
- WHERE guid LIKE %s", "post_type={$old_type}", "post_type={$type}", "%post_type={$type}%" ) );
343
- $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->posts} SET guid = REPLACE(guid, %s, %s)
344
- WHERE guid LIKE %s", "/{$old_type}/", "/{$type}/", "%/{$old_type}/%" ) );
345
  }
53
  $screen = get_current_screen();
54
  if ( 'spt_testimonial' == get_post_type() || $screen->id == 'spt_testimonial_page_tfree_help' || $screen->post_type == 'sp_tfree_shortcodes' ) {
55
  $url = 'https://wordpress.org/support/plugin/testimonial-free/reviews/?filter=5#new-post';
56
+ $text = sprintf(
57
+ __( 'If you like <strong>Testimonial</strong> please leave us a <a href="%s" target="_blank">&#9733;&#9733;&#9733;&#9733;&#9733;</a> rating. Your Review is very important to us as it helps us to grow more. ', 'testimonial-free' ),
58
+ $url
59
+ );
60
  }
61
 
62
  return $text;
66
  * Admin Menu
67
  */
68
  function admin_menu() {
69
+ add_submenu_page(
70
+ 'edit.php?post_type=spt_testimonial', __( 'Testimonial Pro', 'testimonial-free' ), __( 'Premium', 'testimonial-free' ), 'manage_options', 'testimonial_premium', array(
71
+ $this,
72
+ 'premium_page_callback',
73
+ )
74
+ );
75
+ add_submenu_page(
76
+ 'edit.php?post_type=spt_testimonial', __( 'Testimonial Help', 'testimonial-free' ), __( 'Help', 'testimonial-free' ), 'manage_options', 'tfree_help', array(
77
+ $this,
78
+ 'help_page_callback',
79
+ )
80
+ );
81
  }
82
 
83
  /**
84
+ * Premium Page Callback
85
  */
86
+ public function premium_page_callback() {
87
  ?>
88
+ <div class="wrap about-wrap sp-tfree-help sp-tfree-upgrade">
89
+ <h1><?php _e( 'Upgrade to <span>Testimonial Pro</span>', 'testimonial-free' ); ?></h1>
90
+ <p class="about-text">
91
+ <?php
92
+ esc_html_e(
93
+ 'Get more Advanced Functionality & Flexibility with the Premium version.', 'testimonial-free'
94
+ );
95
+ ?>
96
+ </p>
97
  <div class="wp-badge"></div>
98
+ <ul>
99
+ <li class="tfree-upgrade-btn"><a href="https://shapedplugin.com/plugin/testimonial-pro/" target="_blank">Buy Testimonial Pro <img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiBmaWxsPSIjZmZmIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xMTUyIDg5NnEwIDI2LTE5IDQ1bC00NDggNDQ4cS0xOSAxOS00NSAxOXQtNDUtMTktMTktNDV2LTg5NnEwLTI2IDE5LTQ1dDQ1LTE5IDQ1IDE5bDQ0OCA0NDhxMTkgMTkgMTkgNDV6Ii8+PC9zdmc+" alt="" style="max-width: 15px;"/></a></li>
100
+ <li class="tfree-upgrade-btn"><a href="https://shapedplugin.com/demo/testimonial-pro" target="_blank">Live Demo & All Features <img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAxNzkyIDE3OTIiIGZpbGw9IiMwMDczYWEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTk3OSA5NjBxMCAxMy0xMCAyM2wtNDY2IDQ2NnEtMTAgMTAtMjMgMTB0LTIzLTEwbC01MC01MHEtMTAtMTAtMTAtMjN0MTAtMjNsMzkzLTM5My0zOTMtMzkzcS0xMC0xMC0xMC0yM3QxMC0yM2w1MC01MHExMC0xMCAyMy0xMHQyMyAxMGw0NjYgNDY2cTEwIDEwIDEwIDIzem0zODQgMHEwIDEzLTEwIDIzbC00NjYgNDY2cS0xMCAxMC0yMyAxMHQtMjMtMTBsLTUwLTUwcS0xMC0xMC0xMC0yM3QxMC0yM2wzOTMtMzkzLTM5My0zOTNxLTEwLTEwLTEwLTIzdDEwLTIzbDUwLTUwcTEwLTEwIDIzLTEwdDIzIDEwbDQ2NiA0NjZxMTAgMTAgMTAgMjN6Ii8+PC9zdmc+" alt="" style="max-width: 15px;"/></a></li>
101
+ </ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
 
103
  <hr>
104
 
105
  <div class="sp-tfree-pro-features">
106
+ <h2 class="sp-tfree-text-center">Premium Features You'll Love</h2>
107
+ <p class="sp-tfree-text-center sp-tfree-pro-subtitle">We've added 150+ extra features in our Premium Version of this plugin. Let’s see some amazing features.</p>
108
+
109
+ <div class="feature-section three-col">
110
  <div class="col">
111
  <div class="sp-tfree-feature">
112
  <h3><span class="dashicons dashicons-yes"></span>Advanced Shortcode Generator</h3>
271
  </div>
272
  </div>
273
  </div>
274
+
275
+ </div>
276
+ <hr>
277
+ <h2 class="sp-tfree-text-center sp-tfree-promo-video-title">Watch How <b>Testimonial Pro</b> Works</h2>
278
+ <div class="headline-feature feature-video">
279
+
280
+ <iframe width="1050" height="590" src="https://www.youtube.com/embed/OA7LgaZHwIY" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
281
+ </div>
282
+ <hr>
283
+ <div class="sp-tfree-join-community sp-tfree-text-center">
284
+ <h2>Join the <b>20000+</b> Happy Users Worldwide!</h2>
285
+ <a class="tfree-upgrade-btn" target="_blank" href="https://shapedplugin.com/plugin/testimonial-pro/">Get a license instantly</a>
286
+ <p>Every purchase comes with <b>7-day</b> money back guarantee and access to our incredibly Top-notch Support with lightening-fast response time and 100% satisfaction rate. One-Time payment, lifetime automatic update.</p>
287
+ </div>
288
+ <br>
289
+ <br>
290
+
291
+ <hr>
292
+ <div class="sp-tfree-upgrade-sticky-footer sp-tfree-text-center">
293
+ <p><a href="https://shapedplugin.com/demo/testimonial-pro/" target="_blank" class="button
294
+ button-primary">Live Demo</a> <a href="https://shapedplugin.com/plugin/testimonial-pro/" target="_blank" class="button button-primary">Upgrade Now</a></p>
295
+ </div>
296
  </div>
297
 
298
+ </div>
299
+ <?php
300
+ }
301
+
302
+ /**
303
+ * Help Page Callback
304
+ */
305
+ public function help_page_callback() {
306
+ ?>
307
+ <div class="wrap about-wrap sp-tfree-help">
308
+ <h1><?php _e( 'Welcome to Testimonial!', 'testimonial-free' ); ?></h1>
309
+ <p class="about-text">
310
+ <?php
311
+ _e(
312
+ 'Thank you for installing Testimonial! You\'re now running the most popular Testimonial plugin.
313
+ This video playlist will help you get started with the plugin.', 'testimonial-free'
314
+ );
315
+ ?>
316
+ </p>
317
+ <div class="wp-badge"></div>
318
+
319
+ <hr>
320
+
321
+ <div class="headline-feature feature-video">
322
+ <iframe width="560" height="315" src="https://www.youtube.com/embed/htnj97_K3ys?list=PLoUb-7uG-5jPTDu5wiWwKhJNuWFWSyA5T" frameborder="0" allowfullscreen></iframe>
323
+ </div>
324
+
325
+ <hr>
326
+
327
+ <div class="feature-section help-section three-col">
328
+ <div class="col">
329
+ <div class="sp-tfree-feature sp-tfree-text-center">
330
+ <i class="sp-tfree-font-icon fa fa-life-ring"></i>
331
+ <h3>Need any Assistance?</h3>
332
+ <p>Our Expert Support Team is always ready to help you out promptly.</p>
333
+ <a href="https://shapedplugin.com/support-forum/" target="_blank" class="button
334
+ button-primary">Contact Support</a>
335
+ </div>
336
+ </div>
337
+ <div class="col">
338
+ <div class="sp-tfree-feature sp-tfree-text-center">
339
+ <i class="sp-tfree-font-icon fa fa-file-text"></i>
340
+ <h3>Looking for Documentation?</h3>
341
+ <p>We have detailed documentation on every aspects of Testimonial.</p>
342
+ <a href="https://shapedplugin.com/docs/docs/testimonial/" target="_blank" class="button button-primary">Documentation</a>
343
+ </div>
344
+ </div>
345
+ <div class="col">
346
+ <div class="sp-tfree-feature sp-tfree-text-center">
347
+ <i class="sp-tfree-font-icon fa fa-thumbs-up"></i>
348
+ <h3>Like This Plugin?</h3>
349
+ <p>If you like Testimonial, please leave us a 5 star rating.</p>
350
+ <a href="https://wordpress.org/support/plugin/testimonial-free/reviews/#new-post" target="_blank" class="button
351
+ button-primary">Rate the Plugin</a>
352
+ </div>
353
+ </div>
354
  </div>
355
 
356
  </div>
367
  * Multi Language Support
368
  *
369
  * @since 2.0
 
370
  */
371
 
372
  // Polylang plugin support for multi language support.
373
+ if ( class_exists( 'Polylang' ) ) {
374
 
375
  add_filter( 'pll_get_post_types', 'sp_tfree_testimonial_polylang', 10, 2 );
376
 
381
  unset( $post_types['sp_tfree_shortcodes'] );
382
  } else {
383
  // enables language and translation management for 'tspt_testimonial,sp_free_shortcodes'.
384
+ $post_types['spt_testimonial'] = 'spt_testimonial';
385
  $post_types['sp_tfree_shortcodes'] = 'sp_tfree_shortcodes';
386
  }
387
  return $post_types;
388
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
389
  }
includes/updates/update-2.1.5.php ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Update version.
4
+ */
5
+ update_option( 'testimonial_version', SP_TFREE_VERSION );
6
+ update_option( 'testimonial_db_version', SP_TFREE_VERSION );
7
+
8
+ /**
9
+ * Convert old to new shortcode meta.
10
+ */
11
+ function covert_old_to_new_shortcode_meta_2_1_5() {
12
+ $args = new WP_Query(
13
+ array(
14
+ 'post_type' => 'sp_tfree_shortcodes',
15
+ 'post_status' => 'any',
16
+ 'posts_per_page' => '300',
17
+ )
18
+ );
19
+ $post_ids = wp_list_pluck( $args->posts, 'ID' );
20
+ if ( count( $post_ids ) > 0 ) {
21
+ foreach ( $post_ids as $post_id ) {
22
+ $slider_layout = get_post_meta( $post_id, 'tfree_slider_layout', true );
23
+ $theme_style = get_post_meta( $post_id, 'tfree_themes', true );
24
+ $testimonials_from = get_post_meta( $post_id, 'tfree_testimonials_from', true );
25
+ $number_of_total_testimonials = get_post_meta( $post_id, 'tfree_number_of_total_testimonials', true );
26
+ $order_by = get_post_meta( $post_id, 'tfree_order_by', true );
27
+ $order = get_post_meta( $post_id, 'tfree_order', true );
28
+ $number_of_column = get_post_meta( $post_id, 'tfree_number_of_column', true );
29
+ $number_of_column_desktop = get_post_meta( $post_id, 'tfree_number_of_column_desktop', true );
30
+ $number_of_column_small_desktop = get_post_meta( $post_id, 'tfree_number_of_column_small_desktop', true );
31
+ $number_of_column_tablet = get_post_meta( $post_id, 'tfree_number_of_column_tablet', true );
32
+ $number_of_column_mobile = get_post_meta( $post_id, 'tfree_number_of_column_mobile', true );
33
+
34
+ $auto_play = 'on' === get_post_meta( $post_id, 'tfree_auto_play', true ) ? 'true' : 'false';
35
+ $auto_play_speed = get_post_meta( $post_id, 'tfree_auto_play_speed', true );
36
+ $scroll_speed = get_post_meta( $post_id, 'tfree_scroll_speed', true );
37
+ $pause_on_hover = 'on' === get_post_meta( $post_id, 'tfree_pause_on_hover', true ) ? true : false;
38
+ $infinite_loop = 'on' === get_post_meta( $post_id, 'tfree_infinite_loop', true ) ? true : false;
39
+ $navigation = 'on' === get_post_meta( $post_id, 'tfree_navigation', true ) ? 'true' : 'false';
40
+ $nav_arrow_color = get_post_meta( $post_id, 'tfree_nav_arrow_color', true );
41
+ $nav_arrow_hover = get_post_meta( $post_id, 'tfree_nav_arrow_hover', true );
42
+ $pagination = 'on' === get_post_meta( $post_id, 'tfree_pagination', true ) ? 'true' : 'false';
43
+ $pagination_color = get_post_meta( $post_id, 'tfree_pagination_color', true );
44
+ $pagination_active_color = get_post_meta( $post_id, 'tfree_pagination_active_color', true );
45
+ $adaptive = 'on' === get_post_meta( $post_id, 'tfree_adaptive', true ) ? true : false;
46
+ $swipe = 'on' === get_post_meta( $post_id, 'tfree_swipe', true ) ? true : false;
47
+ $mouse_draggable = 'on' === get_post_meta( $post_id, 'tfree_mouse_draggable', true ) ? true : false;
48
+ $rtl = 'on' === get_post_meta( $post_id, 'tfree_rtl', true ) ? true : false;
49
+
50
+ $section_title = 'off' === get_post_meta( $post_id, 'tfree_section_title', true ) ? false : true;
51
+ $section_title_color = get_post_meta( $post_id, 'tfree_section_title_color', true );
52
+ $testimonial_title = 'on' === get_post_meta( $post_id, 'tfree_testimonial_title', true ) ? true : false;
53
+ $testimonial_title_color = get_post_meta( $post_id, 'tfree_testimonial_title_color', true );
54
+ $testimonial_content = 'on' === get_post_meta( $post_id, 'tfree_testimonial_content', true ) ? true : false;
55
+ $testimonial_content_color = get_post_meta( $post_id, 'tfree_testimonial_content_color', true );
56
+ $reviewer_name = 'on' === get_post_meta( $post_id, 'tfree_reviewer_name', true ) ? true : false;
57
+ $reviewer_name_color = get_post_meta( $post_id, 'tfree_reviewer_name_color', true );
58
+ $star_rating = 'on' === get_post_meta( $post_id, 'tfree_star_rating', true ) ? true : false;
59
+ $star_rating_color = get_post_meta( $post_id, 'tfree_star_rating_color', true );
60
+ $position = 'on' === get_post_meta( $post_id, 'tfree_position', true ) ? true : false;
61
+ $position_color = get_post_meta( $post_id, 'tfree_position_color', true );
62
+
63
+ add_post_meta(
64
+ $post_id, 'sp_tpro_shortcode_options', array(
65
+ 'layout' => $slider_layout,
66
+ 'theme_style' => $theme_style,
67
+ 'display_testimonials_from' => $testimonials_from,
68
+ 'number_of_total_testimonials' => $number_of_total_testimonials,
69
+ 'testimonial_order_by' => $order_by,
70
+ 'testimonial_order' => $order,
71
+ 'number_of_testimonials' => $number_of_column,
72
+ 'number_of_testimonials_desktop' => $number_of_column_desktop,
73
+ 'number_of_testimonials_small_desktop' => $number_of_column_small_desktop,
74
+ 'number_of_testimonials_tablet' => $number_of_column_tablet,
75
+ 'number_of_testimonials_mobile' => $number_of_column_mobile,
76
+ 'slider_auto_play' => $auto_play,
77
+ 'slider_auto_play_speed' => $auto_play_speed,
78
+ 'slider_scroll_speed' => $scroll_speed,
79
+ 'slider_pause_on_hover' => $pause_on_hover,
80
+ 'slider_infinite' => $infinite_loop,
81
+ 'navigation' => $navigation,
82
+ 'navigation_arrow_color' => $nav_arrow_color,
83
+ 'navigation_hover_arrow_color' => $nav_arrow_hover,
84
+ 'pagination' => $pagination,
85
+ 'pagination_color' => $pagination_color,
86
+ 'pagination_active_color' => $pagination_active_color,
87
+ 'adaptive_height' => $adaptive,
88
+ 'slider_swipe' => $swipe,
89
+ 'slider_draggable' => $mouse_draggable,
90
+ 'rtl_mode' => $rtl,
91
+ 'section_title' => $section_title,
92
+ 'testimonial_title' => $testimonial_title,
93
+ 'testimonial_text' => $testimonial_content,
94
+ 'testimonial_client_name' => $reviewer_name,
95
+ 'testimonial_client_rating' => $star_rating,
96
+ 'testimonial_client_rating_color' => $star_rating_color,
97
+ 'client_designation' => $position,
98
+ 'section_title_typography' => array(
99
+ 'color' => $section_title_color,
100
+ ),
101
+ 'testimonial_title_typography' => array(
102
+ 'color' => $testimonial_title_color,
103
+ ),
104
+ 'testimonial_text_typography' => array(
105
+ 'color' => $testimonial_content_color,
106
+ ),
107
+ 'client_name_typography' => array(
108
+ 'color' => $reviewer_name_color,
109
+ ),
110
+ 'client_designation_company_typography' => array(
111
+ 'color' => $position_color,
112
+ ),
113
+ )
114
+ );
115
+ }
116
+ }
117
+ }
118
+
119
+ /**
120
+ * Delete old shortcode meta.
121
+ */
122
+ function delete_old_shortcode_meta_2_1_5() {
123
+ delete_post_meta_by_key( 'tfree_slider_layout' );
124
+ delete_post_meta_by_key( 'tfree_themes' );
125
+ delete_post_meta_by_key( 'tfree_testimonials_from' );
126
+ delete_post_meta_by_key( 'tfree_number_of_total_testimonials' );
127
+ delete_post_meta_by_key( 'tfree_number_of_column' );
128
+ delete_post_meta_by_key( 'tfree_number_of_column_desktop' );
129
+ delete_post_meta_by_key( 'tfree_number_of_column_small_desktop' );
130
+ delete_post_meta_by_key( 'tfree_number_of_column_tablet' );
131
+ delete_post_meta_by_key( 'tfree_number_of_column_mobile' );
132
+ delete_post_meta_by_key( 'tfree_order_by' );
133
+ delete_post_meta_by_key( 'tfree_order' );
134
+ delete_post_meta_by_key( 'tfree_auto_play' );
135
+ delete_post_meta_by_key( 'tfree_auto_play_speed' );
136
+ delete_post_meta_by_key( 'tfree_scroll_speed' );
137
+ delete_post_meta_by_key( 'tfree_pause_on_hover' );
138
+ delete_post_meta_by_key( 'tfree_infinite_loop' );
139
+ delete_post_meta_by_key( 'tfree_navigation' );
140
+ delete_post_meta_by_key( 'tfree_nav_arrow_color' );
141
+ delete_post_meta_by_key( 'tfree_nav_arrow_hover' );
142
+ delete_post_meta_by_key( 'tfree_pagination' );
143
+ delete_post_meta_by_key( 'tfree_pagination_color' );
144
+ delete_post_meta_by_key( 'tfree_pagination_active_color' );
145
+ delete_post_meta_by_key( 'tfree_adaptive' );
146
+ delete_post_meta_by_key( 'tfree_swipe' );
147
+ delete_post_meta_by_key( 'tfree_mouse_draggable' );
148
+ delete_post_meta_by_key( 'tfree_rtl' );
149
+ delete_post_meta_by_key( 'tfree_section_title' );
150
+ delete_post_meta_by_key( 'tfree_section_title_color' );
151
+ delete_post_meta_by_key( 'tfree_testimonial_title' );
152
+ delete_post_meta_by_key( 'tfree_testimonial_title_color' );
153
+ delete_post_meta_by_key( 'tfree_testimonial_content' );
154
+ delete_post_meta_by_key( 'tfree_testimonial_content_color' );
155
+ delete_post_meta_by_key( 'tfree_reviewer_name' );
156
+ delete_post_meta_by_key( 'tfree_reviewer_name_color' );
157
+ delete_post_meta_by_key( 'tfree_star_rating' );
158
+ delete_post_meta_by_key( 'tfree_star_rating_color' );
159
+ delete_post_meta_by_key( 'tfree_position' );
160
+ delete_post_meta_by_key( 'tfree_position_color' );
161
+ delete_post_meta_by_key( 'tfree_load_section_title_font' );
162
+ delete_post_meta_by_key( 'tfree_load_testimonial_title_font' );
163
+ delete_post_meta_by_key( 'tfree_load_testimonial_content_font' );
164
+ delete_post_meta_by_key( 'tfree_load_name_font' );
165
+ delete_post_meta_by_key( 'tfree_load_identity_font' );
166
+ delete_post_meta_by_key( 'tfree_load_location_font' );
167
+ delete_post_meta_by_key( 'tfree_load_mobile_font' );
168
+ delete_post_meta_by_key( 'tfree_load_email_font' );
169
+ delete_post_meta_by_key( 'tfree_load_website_font' );
170
+ }
171
+
172
+ covert_old_to_new_shortcode_meta_2_1_5();
173
+ delete_old_shortcode_meta_2_1_5();
public/views/deprecated-shortcodes.php CHANGED
@@ -5,12 +5,16 @@ if ( ! defined( 'ABSPATH' ) ) {
5
 
6
  // Testimonial Free shortcode.
7
  function sp_testimonial_free_shortcode( $atts ) {
8
- extract( shortcode_atts( array(
9
- 'color' => '#52b3d9',
10
- 'nav' => 'true',
11
- 'pagination' => 'true',
12
- 'autoplay' => 'true',
13
- ), $atts, 'testimonial-free' ) );
 
 
 
 
14
 
15
  $args = array(
16
  'post_type' => 'spt_testimonial',
@@ -66,16 +70,17 @@ function sp_testimonial_free_shortcode( $atts ) {
66
 
67
  $outline .= '<div id="sp-testimonial-free' . $custom_id . '" class="sp-testimonial-section">';
68
  if ( $que->have_posts() ) {
69
- while ( $que->have_posts() ) : $que->the_post();
 
70
 
71
  $tf_designation = esc_html( get_post_meta( get_the_ID(), 'tf_designation', true ) );
72
 
73
- $testimonial_data = get_post_meta( get_the_ID(), 'sp_tpro_meta_options', true );
74
 
75
  $outline .= '<div class="testimonial-free text-center">';
76
  if ( has_post_thumbnail( $que->post->ID ) ) {
77
  $outline .= '<div class="tf-client-image">';
78
- $outline .= get_the_post_thumbnail( $que->post->ID, 'tf-client-image-size', array( 'class' => "tf-client-img" ) );
79
  $outline .= '</div>';
80
  }
81
  $outline .= '<div class="tf-client-testimonial">';
@@ -90,9 +95,9 @@ function sp_testimonial_free_shortcode( $atts ) {
90
  $outline .= '</h2>';
91
  if ( isset( $testimonial_data['tpro_designation'] ) || $tf_designation ) {
92
  $outline .= '<h6 class="tf-client-designation">';
93
- if ( isset( $tf_designation ) && $tf_designation !== '') {
94
  $outline .= $tf_designation;
95
- } elseif( isset( $testimonial_data['tpro_designation'] ) ) {
96
  $outline .= $testimonial_data['tpro_designation'];
97
  }
98
 
@@ -107,7 +112,7 @@ function sp_testimonial_free_shortcode( $atts ) {
107
  }
108
  $outline .= '</div>';
109
 
110
- wp_reset_query();
111
 
112
  return $outline;
113
 
5
 
6
  // Testimonial Free shortcode.
7
  function sp_testimonial_free_shortcode( $atts ) {
8
+ extract(
9
+ shortcode_atts(
10
+ array(
11
+ 'color' => '#52b3d9',
12
+ 'nav' => 'true',
13
+ 'pagination' => 'true',
14
+ 'autoplay' => 'true',
15
+ ), $atts, 'testimonial-free'
16
+ )
17
+ );
18
 
19
  $args = array(
20
  'post_type' => 'spt_testimonial',
70
 
71
  $outline .= '<div id="sp-testimonial-free' . $custom_id . '" class="sp-testimonial-section">';
72
  if ( $que->have_posts() ) {
73
+ while ( $que->have_posts() ) :
74
+ $que->the_post();
75
 
76
  $tf_designation = esc_html( get_post_meta( get_the_ID(), 'tf_designation', true ) );
77
 
78
+ $testimonial_data = get_post_meta( get_the_ID(), 'sp_tpro_meta_options', true );
79
 
80
  $outline .= '<div class="testimonial-free text-center">';
81
  if ( has_post_thumbnail( $que->post->ID ) ) {
82
  $outline .= '<div class="tf-client-image">';
83
+ $outline .= get_the_post_thumbnail( $que->post->ID, 'tf-client-image-size', array( 'class' => 'tf-client-img' ) );
84
  $outline .= '</div>';
85
  }
86
  $outline .= '<div class="tf-client-testimonial">';
95
  $outline .= '</h2>';
96
  if ( isset( $testimonial_data['tpro_designation'] ) || $tf_designation ) {
97
  $outline .= '<h6 class="tf-client-designation">';
98
+ if ( isset( $tf_designation ) && $tf_designation !== '' ) {
99
  $outline .= $tf_designation;
100
+ } elseif ( isset( $testimonial_data['tpro_designation'] ) ) {
101
  $outline .= $testimonial_data['tpro_designation'];
102
  }
103
 
112
  }
113
  $outline .= '</div>';
114
 
115
+ wp_reset_postdata();
116
 
117
  return $outline;
118
 
public/views/shortcoderender.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
  /**
3
  * This file render the shortcode to the frontend
 
4
  * @package testimonial-free
5
  */
6
  if ( ! defined( 'ABSPATH' ) ) {
@@ -9,18 +10,19 @@ if ( ! defined( 'ABSPATH' ) ) {
9
 
10
  /**
11
  * Testimonial - Shortcode Render class
 
12
  * @since 2.0
13
  */
14
  if ( ! class_exists( 'TFREE_Shortcode_Render' ) ) {
15
  class TFREE_Shortcode_Render {
16
 
17
- public $tfree_five_star = '<i class="fa fa-star" aria-hidden="true"></i>
18
  <i class="fa fa-star" aria-hidden="true"></i>
19
  <i class="fa fa-star" aria-hidden="true"></i>
20
  <i class="fa fa-star" aria-hidden="true"></i>
21
  <i class="fa fa-star" aria-hidden="true"></i>
22
  ';
23
- public $tfree_four_star = '
24
  <i class="fa fa-star" aria-hidden="true"></i>
25
  <i class="fa fa-star" aria-hidden="true"></i>
26
  <i class="fa fa-star" aria-hidden="true"></i>
@@ -34,14 +36,14 @@ if ( ! class_exists( 'TFREE_Shortcode_Render' ) ) {
34
  <i class="fa fa-star-o" aria-hidden="true"></i>
35
  <i class="fa fa-star-o" aria-hidden="true"></i>
36
  ';
37
- public $tfree_two_star = '
38
  <i class="fa fa-star" aria-hidden="true"></i>
39
  <i class="fa fa-star" aria-hidden="true"></i>
40
  <i class="fa fa-star-o" aria-hidden="true"></i>
41
  <i class="fa fa-star-o" aria-hidden="true"></i>
42
  <i class="fa fa-star-o" aria-hidden="true"></i>
43
  ';
44
- public $tfree_one_star = '
45
  <i class="fa fa-star" aria-hidden="true"></i>
46
  <i class="fa fa-star-o" aria-hidden="true"></i>
47
  <i class="fa fa-star-o" aria-hidden="true"></i>
@@ -86,49 +88,102 @@ if ( ! class_exists( 'TFREE_Shortcode_Render' ) ) {
86
  * @since 2.0
87
  */
88
  public function shortcode_render( $attributes ) {
89
- extract( shortcode_atts( array(
90
- 'id' => '',
91
- ), $attributes, 'sp_testimonial' ) );
 
 
 
92
 
93
  $post_id = $attributes['id'];
94
 
95
- $theme_style = get_post_meta( $post_id, 'tfree_themes', true );
96
- $number_of_total_testimonials = get_post_meta( $post_id, 'tfree_number_of_total_testimonials', true );
97
- $order_by = get_post_meta( $post_id, 'tfree_order_by', true );
98
- $order = get_post_meta( $post_id, 'tfree_order', true );
99
- $number_of_column = get_post_meta( $post_id, 'tfree_number_of_column', true );
100
- $number_of_column_desktop = get_post_meta( $post_id, 'tfree_number_of_column_desktop', true );
101
- $number_of_column_small_desktop = get_post_meta( $post_id, 'tfree_number_of_column_small_desktop', true );
102
- $number_of_column_mobile = get_post_meta( $post_id, 'tfree_number_of_column_mobile', true );
103
- $number_of_column_tablet = get_post_meta( $post_id, 'tfree_number_of_column_tablet', true );
104
- $auto_play_speed = get_post_meta( $post_id, 'tfree_auto_play_speed', true );
105
- $scroll_speed = get_post_meta( $post_id, 'tfree_scroll_speed', true );
106
- $nav_arrow_color = get_post_meta( $post_id, 'tfree_nav_arrow_color', true );
107
- $nav_arrow_hover = get_post_meta( $post_id, 'tfree_nav_arrow_hover', true );
108
- $pagination_color = get_post_meta( $post_id, 'tfree_pagination_color', true );
109
- $pagination_active_color = get_post_meta( $post_id, 'tfree_pagination_active_color', true );
110
- $star_rating_color = get_post_meta( $post_id, 'tfree_star_rating_color', true );
111
- $position_color = get_post_meta( $post_id, 'tfree_position_color', true );
112
- $reviewer_name_color = get_post_meta( $post_id, 'tfree_reviewer_name_color', true );
113
- $testimonial_content_color = get_post_meta( $post_id, 'tfree_testimonial_content_color', true );
114
- $testimonial_title_color = get_post_meta( $post_id, 'tfree_testimonial_title_color', true );
115
- $section_title_color = get_post_meta( $post_id, 'tfree_section_title_color', true );
116
-
117
- $section_title = $this->get_meta( $post_id, 'tfree_section_title', 'true' );
118
- $testimonial_title = $this->get_meta( $post_id, 'tfree_testimonial_title', 'true' );
119
- $testimonial_content = $this->get_meta( $post_id, 'tfree_testimonial_content', 'true' );
120
- $reviewer_name = $this->get_meta( $post_id, 'tfree_reviewer_name', 'true' );
121
- $reviewer_position = $this->get_meta( $post_id, 'tfree_position', 'true' );
122
- $star_rating = $this->get_meta( $post_id, 'tfree_star_rating', 'true' );
123
- $auto_play = $this->get_meta( $post_id, 'tfree_auto_play', 'true' );
124
- $pause_on_hover = $this->get_meta( $post_id, 'tfree_pause_on_hover', 'true' );
125
- $infinite_loop = $this->get_meta( $post_id, 'tfree_infinite_loop', 'true' );
126
- $navigation = $this->get_meta( $post_id, 'tfree_navigation', 'true' );
127
- $pagination = $this->get_meta( $post_id, 'tfree_pagination', 'true' );
128
- $adaptive_height = $this->get_meta( $post_id, 'tfree_adaptive', 'true' );
129
- $swipe_on = $this->get_meta( $post_id, 'tfree_swipe', 'true' );
130
- $mouse_draggable = $this->get_meta( $post_id, 'tfree_mouse_draggable', 'true' );
131
- $rtl_mode = $this->get_meta( $post_id, 'tfree_rtl', 'true' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
 
133
  // Enqueue Script.
134
  wp_enqueue_script( 'tfree-slick-min-js' );
@@ -146,44 +201,44 @@ if ( ! class_exists( 'TFREE_Shortcode_Render' ) ) {
146
  }
147
  #sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .slick-prev,
148
  #sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .slick-next{
149
- color: ' . $nav_arrow_color . ';
150
  }
151
  #sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .slick-prev:hover,
152
  #sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .slick-next:hover{
153
- color: ' . $nav_arrow_hover . ';
154
  }
155
  ';
156
- if ( $navigation == 'true' ) {
157
  $outline .= '#sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section{
158
  padding: 0 50px;
159
  }';
160
  }
161
- if ( $star_rating == 'true' ) {
162
  $outline .= '#sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .tfree-client-rating{
163
  color: ' . $star_rating_color . ';
164
  }';
165
  }
166
- if ( $reviewer_position == 'true' ) {
167
  $outline .= '#sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .tfree-client-designation{
168
- color: ' . $position_color . ';
169
  }';
170
  }
171
- if ( $reviewer_name == 'true' ) {
172
  $outline .= '#sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section h2.tfree-client-name{
173
- color: ' . $reviewer_name_color . ';
174
  }';
175
  }
176
- if ( $testimonial_content == 'true' ) {
177
  $outline .= '#sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .tfree-client-testimonial{
178
- color: ' . $testimonial_content_color . ';
179
  }';
180
  }
181
- if ( $testimonial_title == 'true' ) {
182
  $outline .= '#sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .tfree-testimonial-title h3{
183
  color: ' . $testimonial_title_color . ';
184
  }';
185
  }
186
- if ( $section_title == 'true' ) {
187
  $outline .= '#sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .tfree-testimonial-title h3{
188
  color: ' . $section_title_color . ';
189
  }';
@@ -202,64 +257,55 @@ if ( ! class_exists( 'TFREE_Shortcode_Render' ) ) {
202
 
203
  $outline .= '<div id="sp-testimonial-free-wrapper-' . $post_id . '" class="sp-testimonial-free-wrapper">';
204
 
205
- if ( 'true' == $section_title ) {
206
  $outline .= '<h2 class="sp-testimonial-free-section-title">' . get_the_title( $post_id ) . '</h2>';
207
  }
208
 
209
- $outline .= '<div id="sp-testimonial-free-' . $post_id . '" class="sp-testimonial-free-section tfree-style-' . $theme_style . '" data-slick=\'{"dots": ' . $pagination . ', "adaptiveHeight": ' . $adaptive_height . ', "pauseOnHover": ' . $pause_on_hover . ', "slidesToShow": ' . $number_of_column . ', "speed": ' . $scroll_speed . ', "arrows": ' . $navigation . ', "autoplay": ' . $auto_play . ', "autoplaySpeed": ' . $auto_play_speed . ', "swipe": ' . $swipe_on . ', "draggable": ' . $mouse_draggable . ', "rtl": ' . $rtl_mode . ', "infinite": ' . $infinite_loop . ', "responsive": [ {"breakpoint": 1280, "settings": { "slidesToShow": ' . $number_of_column_desktop . ' } }, {"breakpoint": 980, "settings": { "slidesToShow": ' . $number_of_column_small_desktop . ' } }, {"breakpoint": 736, "settings": { "slidesToShow": ' . $number_of_column_tablet . ' } }, {"breakpoint": 480, "settings": { "slidesToShow": ' . $number_of_column_mobile . ' } } ] }\'>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
 
211
  if ( $post_query->have_posts() ) {
212
  while ( $post_query->have_posts() ) :
213
  $post_query->the_post();
214
- $testimonial_data = get_post_meta( get_the_ID(), 'sp_tpro_meta_options', true );
215
- $tfree_designation = ( isset( $testimonial_data['tpro_designation'] ) ? $testimonial_data['tpro_designation']: '' );
216
- $tfree_name = ( isset( $testimonial_data['tpro_name'] ) ? $testimonial_data['tpro_name']: '' );
217
- $tfree_rating_star = ( isset( $testimonial_data['tpro_rating'] ) ? $testimonial_data['tpro_rating']: '' );
218
 
219
- if ( 'theme-one' == $theme_style ) {
 
 
 
 
 
220
  include SP_TFREE_PATH . '/public/views/templates/theme-one.php';
221
  }
222
 
223
- endwhile;
224
  } else {
225
  $outline .= '<h2 class="sp-not-testimonial-found">' . esc_html__( 'No testimonials found', 'testimonial-free' ) . '</h2>';
226
  }
227
 
228
- $outline .= '</div>';
229
- $outline .= '</div>';
230
-
231
- wp_reset_query();
232
-
233
- return $outline;
234
-
235
- }
236
 
237
- /**
238
- * Get post meta by id and key
239
- *
240
- * @param $post_id
241
- * @param $key
242
- * @param $default
243
- *
244
- * @return string|void
245
- */
246
- public function get_meta( $post_id, $key, $default = null ) {
247
- $meta = get_post_meta( $post_id, $key, true );
248
- if ( empty( $meta ) && $default ) {
249
- $meta = $default;
250
- }
251
 
252
- if ( 'zero' == $meta ) {
253
- $meta = '0';
254
- }
255
- if ( 'on' == $meta ) {
256
- $meta = 'true';
257
- }
258
- if ( 'off' == $meta ) {
259
- $meta = 'false';
260
- }
261
 
262
- return esc_attr( $meta );
263
  }
264
 
265
  }
1
  <?php
2
  /**
3
  * This file render the shortcode to the frontend
4
+ *
5
  * @package testimonial-free
6
  */
7
  if ( ! defined( 'ABSPATH' ) ) {
10
 
11
  /**
12
  * Testimonial - Shortcode Render class
13
+ *
14
  * @since 2.0
15
  */
16
  if ( ! class_exists( 'TFREE_Shortcode_Render' ) ) {
17
  class TFREE_Shortcode_Render {
18
 
19
+ public $tfree_five_star = '<i class="fa fa-star" aria-hidden="true"></i>
20
  <i class="fa fa-star" aria-hidden="true"></i>
21
  <i class="fa fa-star" aria-hidden="true"></i>
22
  <i class="fa fa-star" aria-hidden="true"></i>
23
  <i class="fa fa-star" aria-hidden="true"></i>
24
  ';
25
+ public $tfree_four_star = '
26
  <i class="fa fa-star" aria-hidden="true"></i>
27
  <i class="fa fa-star" aria-hidden="true"></i>
28
  <i class="fa fa-star" aria-hidden="true"></i>
36
  <i class="fa fa-star-o" aria-hidden="true"></i>
37
  <i class="fa fa-star-o" aria-hidden="true"></i>
38
  ';
39
+ public $tfree_two_star = '
40
  <i class="fa fa-star" aria-hidden="true"></i>
41
  <i class="fa fa-star" aria-hidden="true"></i>
42
  <i class="fa fa-star-o" aria-hidden="true"></i>
43
  <i class="fa fa-star-o" aria-hidden="true"></i>
44
  <i class="fa fa-star-o" aria-hidden="true"></i>
45
  ';
46
+ public $tfree_one_star = '
47
  <i class="fa fa-star" aria-hidden="true"></i>
48
  <i class="fa fa-star-o" aria-hidden="true"></i>
49
  <i class="fa fa-star-o" aria-hidden="true"></i>
88
  * @since 2.0
89
  */
90
  public function shortcode_render( $attributes ) {
91
+
92
+ shortcode_atts(
93
+ array(
94
+ 'id' => '',
95
+ ), $attributes, 'sp_testimonial'
96
+ );
97
 
98
  $post_id = $attributes['id'];
99
 
100
+ $shortcode_data = get_post_meta( $post_id, 'sp_tpro_shortcode_options', true );
101
+
102
+ // General Settings.
103
+ $theme_style = isset( $shortcode_data['theme_style'] ) ? $shortcode_data['theme_style'] : 'theme-one';
104
+ $number_of_total_testimonials = isset( $shortcode_data['number_of_total_testimonials'] ) ? $shortcode_data['number_of_total_testimonials'] : '10';
105
+ $order_by = isset( $shortcode_data['testimonial_order_by'] ) ? $shortcode_data['testimonial_order_by'] : 'date';
106
+ $order = isset( $shortcode_data['testimonial_order'] ) ? $shortcode_data['testimonial_order'] : 'DESC';
107
+ $number_of_column = isset( $shortcode_data['number_of_testimonials'] ) ? $shortcode_data['number_of_testimonials'] : '1';
108
+ $number_of_column_desktop = isset( $shortcode_data['number_of_testimonials_desktop'] ) ? $shortcode_data['number_of_testimonials_desktop'] : '1';
109
+ $number_of_column_small_desktop = isset( $shortcode_data['number_of_testimonials_small_desktop'] ) ? $shortcode_data['number_of_testimonials_small_desktop'] : '1';
110
+ $number_of_column_tablet = isset( $shortcode_data['number_of_testimonials_tablet'] ) ? $shortcode_data['number_of_testimonials_tablet'] : '1';
111
+ $number_of_column_mobile = isset( $shortcode_data['number_of_testimonials_mobile'] ) ? $shortcode_data['number_of_testimonials_mobile'] : '1';
112
+
113
+ // Slider Settings.
114
+ $slider_auto_play = isset( $shortcode_data['slider_auto_play'] ) ? $shortcode_data['slider_auto_play'] : 'true';
115
+ switch ( $slider_auto_play ) {
116
+ case 'true':
117
+ $auto_play = 'true';
118
+ $auto_play_mobile = 'true';
119
+ break;
120
+ case 'off_on_mobile':
121
+ $auto_play = 'true';
122
+ $auto_play_mobile = 'false';
123
+ break;
124
+ case 'false':
125
+ $auto_play = 'false';
126
+ $auto_play_mobile = 'false';
127
+ break;
128
+ }
129
+ $slider_auto_play_speed = isset( $shortcode_data['slider_auto_play_speed'] ) ? $shortcode_data['slider_auto_play_speed'] : '3000';
130
+ $slider_scroll_speed = isset( $shortcode_data['slider_scroll_speed'] ) ? $shortcode_data['slider_scroll_speed'] : '600';
131
+ $slider_pause_on_hover = isset( $shortcode_data['slider_pause_on_hover'] ) && true === $shortcode_data['slider_pause_on_hover'] ? 'true' : 'false';
132
+ $slider_infinite = isset( $shortcode_data['slider_infinite'] ) && true === $shortcode_data['slider_infinite'] ? 'true' : 'false';
133
+ $slider_navigation = isset( $shortcode_data['navigation'] ) ? $shortcode_data['navigation'] : 'true';
134
+ $navigation_arrow_color = isset( $shortcode_data['navigation_arrow_color'] ) ? $shortcode_data['navigation_arrow_color'] : '#444444';
135
+ $navigation_hover_arrow_color = isset( $shortcode_data['navigation_hover_arrow_color'] ) ? $shortcode_data['navigation_hover_arrow_color'] : '#52b3d9';
136
+ switch ( $slider_navigation ) {
137
+ case 'true':
138
+ $navigation = 'true';
139
+ $navigation_mobile = 'true';
140
+ break;
141
+ case 'hide_on_mobile':
142
+ $navigation = 'true';
143
+ $navigation_mobile = 'false';
144
+ break;
145
+ case 'false':
146
+ $navigation = 'false';
147
+ $navigation_mobile = 'false';
148
+ break;
149
+ }
150
+ $slider_pagination = isset( $shortcode_data['pagination'] ) ? $shortcode_data['pagination'] : 'true';
151
+ $pagination_color = isset( $shortcode_data['pagination_color'] ) ? $shortcode_data['pagination_color'] : '#cccccc';
152
+ $pagination_active_color = isset( $shortcode_data['pagination_active_color'] ) ? $shortcode_data['pagination_active_color'] : '#52b3d9';
153
+ switch ( $slider_pagination ) {
154
+ case 'true':
155
+ $pagination = 'true';
156
+ $pagination_mobile = 'true';
157
+ break;
158
+ case 'hide_on_mobile':
159
+ $pagination = 'true';
160
+ $pagination_mobile = 'false';
161
+ break;
162
+ case 'false':
163
+ $pagination = 'false';
164
+ $pagination_mobile = 'false';
165
+ break;
166
+ }
167
+ $adaptive_height = isset( $shortcode_data['adaptive_height'] ) && true === $shortcode_data['adaptive_height'] ? 'true' : 'false';
168
+ $slider_swipe = isset( $shortcode_data['slider_swipe'] ) && true === $shortcode_data['slider_swipe'] ? 'true' : 'false';
169
+ $slider_draggable = isset( $shortcode_data['slider_draggable'] ) && true === $shortcode_data['slider_draggable'] ? 'true' : 'false';
170
+ $rtl_mode = isset( $shortcode_data['rtl_mode'] ) && true === $shortcode_data['rtl_mode'] ? 'true' : 'false';
171
+
172
+ // Stylization.
173
+ $section_title = isset( $shortcode_data['section_title'] ) ? $shortcode_data['section_title'] : '';
174
+ $testimonial_title = isset( $shortcode_data['testimonial_title'] ) ? $shortcode_data['testimonial_title'] : '';
175
+ $testimonial_text = isset( $shortcode_data['testimonial_text'] ) ? $shortcode_data['testimonial_text'] : '';
176
+ $reviewer_name = isset( $shortcode_data['testimonial_client_name'] ) ? $shortcode_data['testimonial_client_name'] : '';
177
+ $star_rating = isset( $shortcode_data['testimonial_client_rating'] ) ? $shortcode_data['testimonial_client_rating'] : '';
178
+ $star_rating_color = isset( $shortcode_data['testimonial_client_rating_color'] ) ? $shortcode_data['testimonial_client_rating_color'] : '#f3bb00';
179
+ $reviewer_position = isset( $shortcode_data['client_designation'] ) ? $shortcode_data['client_designation'] : '';
180
+
181
+ // Typography.
182
+ $section_title_color = isset( $shortcode_data['section_title_typography'] ) ? $shortcode_data['section_title_typography']['color'] : '#444444';
183
+ $testimonial_title_color = isset( $shortcode_data['testimonial_title_typography'] ) ? $shortcode_data['testimonial_title_typography']['color'] : '#333333';
184
+ $testimonial_text_color = isset( $shortcode_data['testimonial_text_typography'] ) ? $shortcode_data['testimonial_text_typography']['color'] : '#333333';
185
+ $client_name_color = isset( $shortcode_data['client_name_typography'] ) ? $shortcode_data['client_name_typography']['color'] : '#333333';
186
+ $client_designation_color = isset( $shortcode_data['client_designation_company_typography'] ) ? $shortcode_data['client_designation_company_typography']['color'] : '#444444';
187
 
188
  // Enqueue Script.
189
  wp_enqueue_script( 'tfree-slick-min-js' );
201
  }
202
  #sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .slick-prev,
203
  #sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .slick-next{
204
+ color: ' . $navigation_arrow_color . ';
205
  }
206
  #sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .slick-prev:hover,
207
  #sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .slick-next:hover{
208
+ color: ' . $navigation_hover_arrow_color . ';
209
  }
210
  ';
211
+ if ( 'true' == $navigation ) {
212
  $outline .= '#sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section{
213
  padding: 0 50px;
214
  }';
215
  }
216
+ if ( $star_rating ) {
217
  $outline .= '#sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .tfree-client-rating{
218
  color: ' . $star_rating_color . ';
219
  }';
220
  }
221
+ if ( $reviewer_position ) {
222
  $outline .= '#sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .tfree-client-designation{
223
+ color: ' . $client_designation_color . ';
224
  }';
225
  }
226
+ if ( $reviewer_name ) {
227
  $outline .= '#sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section h2.tfree-client-name{
228
+ color: ' . $client_name_color . ';
229
  }';
230
  }
231
+ if ( $testimonial_text ) {
232
  $outline .= '#sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .tfree-client-testimonial{
233
+ color: ' . $testimonial_text_color . ';
234
  }';
235
  }
236
+ if ( $testimonial_title ) {
237
  $outline .= '#sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .tfree-testimonial-title h3{
238
  color: ' . $testimonial_title_color . ';
239
  }';
240
  }
241
+ if ( $section_title ) {
242
  $outline .= '#sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .tfree-testimonial-title h3{
243
  color: ' . $section_title_color . ';
244
  }';
257
 
258
  $outline .= '<div id="sp-testimonial-free-wrapper-' . $post_id . '" class="sp-testimonial-free-wrapper">';
259
 
260
+ if ( $section_title ) {
261
  $outline .= '<h2 class="sp-testimonial-free-section-title">' . get_the_title( $post_id ) . '</h2>';
262
  }
263
 
264
+ $outline .= '<div id="sp-testimonial-free-' . $post_id . '" class="sp-testimonial-free-section tfree-style-' . $theme_style . '" data-slick=\'{"dots": ' . $pagination . ', "adaptiveHeight": ' . $adaptive_height . ', "pauseOnHover": ' . $slider_pause_on_hover . ', "slidesToShow": ' . $number_of_column . ', "speed": ' . $slider_scroll_speed . ', "arrows": ' . $navigation . ', "autoplay": ' . $auto_play . ', "autoplaySpeed": ' . $slider_auto_play_speed . ', "swipe": ' . $slider_swipe . ', "draggable": ' . $slider_draggable . ', "rtl": ' . $rtl_mode . ', "infinite": ' . $slider_infinite . ', "responsive": [
265
+ {
266
+ "breakpoint": 1280, "settings": { "slidesToShow": ' . $number_of_column_desktop . ' }
267
+ },
268
+ {
269
+ "breakpoint": 980, "settings": { "slidesToShow": ' . $number_of_column_small_desktop . ' }
270
+ },
271
+ {
272
+ "breakpoint": 736, "settings": { "slidesToShow": ' . $number_of_column_tablet . ' }
273
+ },
274
+ {
275
+ "breakpoint": 480, "settings": {
276
+ "slidesToShow": ' . $number_of_column_mobile . ',
277
+ "dots": ' . $pagination_mobile . ',
278
+ "arrows": ' . $navigation_mobile . ',
279
+ "autoplay": ' . $auto_play_mobile . '
280
+ }
281
+ }
282
+ ] }\'>';
283
 
284
  if ( $post_query->have_posts() ) {
285
  while ( $post_query->have_posts() ) :
286
  $post_query->the_post();
 
 
 
 
287
 
288
+ $testimonial_data = get_post_meta( get_the_ID(), 'sp_tpro_meta_options', true );
289
+ $tfree_designation = ( isset( $testimonial_data['tpro_designation'] ) ? $testimonial_data['tpro_designation'] : '' );
290
+ $tfree_name = ( isset( $testimonial_data['tpro_name'] ) ? $testimonial_data['tpro_name'] : '' );
291
+ $tfree_rating_star = ( isset( $testimonial_data['tpro_rating'] ) ? $testimonial_data['tpro_rating'] : '' );
292
+
293
+ if ( 'theme-one' === $theme_style ) {
294
  include SP_TFREE_PATH . '/public/views/templates/theme-one.php';
295
  }
296
 
297
+ endwhile;
298
  } else {
299
  $outline .= '<h2 class="sp-not-testimonial-found">' . esc_html__( 'No testimonials found', 'testimonial-free' ) . '</h2>';
300
  }
301
 
302
+ $outline .= '</div>';
303
+ $outline .= '</div>';
 
 
 
 
 
 
304
 
305
+ wp_reset_postdata();
 
 
 
 
 
 
 
 
 
 
 
 
 
306
 
307
+ return $outline;
 
 
 
 
 
 
 
 
308
 
 
309
  }
310
 
311
  }
public/views/templates/theme-one.php CHANGED
@@ -13,68 +13,61 @@ $outline .= '<div itemprop="itemReviewed" itemscope itemtype="http://schema.org/
13
 
14
  if ( has_post_thumbnail( $post_query->post->ID ) ) {
15
  $outline .= '<div class="sp-tfree-client-image" itemprop="image">';
16
- $outline .= get_the_post_thumbnail( $post_query->post->ID, 'tf-client-image-size', array( 'class' => "tfree-client-image" ) );
17
  $outline .= '</div>';
18
  }
19
 
20
- if ( $testimonial_title == 'true' && get_the_title() !== '' ) {
21
  $outline .= '<div class="tfree-testimonial-title"><h3>' . get_the_title() . '</h3></div>';
22
  }
23
 
24
- if ( $testimonial_content == 'true' && get_the_content() !== '' ) {
25
  $outline .= '<div class="tfree-client-testimonial" itemprop="reviewBody">';
26
-
27
- $outline .= '<p class="tfree-testimonial-content">' . apply_filters( 'the_content', get_the_content() ) . '</p>';
28
-
29
  $outline .= '</div>';
30
  }
31
 
32
- if ( $reviewer_name == 'true' && $tfree_name !== '' ) {
33
  $outline .= '<div itemprop="author" itemscope itemtype="http://schema.org/Person">';
34
  $outline .= '<meta itemprop="name" content="' . $tfree_name . '">';
35
  $outline .= '<h2 class="tfree-client-name">' . $tfree_name . '</h2>';
36
  $outline .= '</div>';
37
  }
38
 
39
- if ( $star_rating == 'true' && $tfree_rating_star !== '' ) {
40
 
41
  switch ( $tfree_rating_star ) {
42
  case 'five_star':
43
- $rating_value = '5';
 
44
  break;
45
  case 'four_star':
46
- $rating_value = '4';
 
47
  break;
48
  case 'three_star':
49
- $rating_value = '3';
 
50
  break;
51
  case 'two_star':
52
- $rating_value = '2';
 
53
  break;
54
  case 'one_star':
55
- $rating_value = '1';
 
56
  break;
57
  }
58
 
59
  $outline .= '<div class="tfree-client-rating" itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">';
60
  $outline .= '<meta itemprop="worstRating" content="1"><meta itemprop="ratingValue" content="' . $rating_value . '"><meta itemprop="bestRating" content="5">';
61
- if ( $tfree_rating_star == 'five_star' ) {
62
- $outline .= $this->tfree_five_star;
63
- } elseif ( $tfree_rating_star == 'four_star' ) {
64
- $outline .= $this->tfree_four_star;
65
- } elseif ( $tfree_rating_star == 'three_star' ) {
66
- $outline .= $this->tfree_three_star;
67
- } elseif ( $tfree_rating_star == 'two_star' ) {
68
- $outline .= $this->tfree_two_star;
69
- } elseif ( $tfree_rating_star == 'one_star' ) {
70
- $outline .= $this->tfree_one_star;
71
- }
72
  $outline .= '</div>';
73
  }
74
 
75
- if ( $reviewer_position == 'true' && $tfree_designation !== '' ) {
76
  $outline .= '<div class="tfree-client-designation">';
77
- $outline .= $tfree_designation;
78
  $outline .= '</div>';
79
  }
80
 
13
 
14
  if ( has_post_thumbnail( $post_query->post->ID ) ) {
15
  $outline .= '<div class="sp-tfree-client-image" itemprop="image">';
16
+ $outline .= get_the_post_thumbnail( $post_query->post->ID, 'tf-client-image-size', array( 'class' => 'tfree-client-image' ) );
17
  $outline .= '</div>';
18
  }
19
 
20
+ if ( $testimonial_title && ! empty( get_the_title() ) ) {
21
  $outline .= '<div class="tfree-testimonial-title"><h3>' . get_the_title() . '</h3></div>';
22
  }
23
 
24
+ if ( $testimonial_text && ! empty( get_the_content() ) ) {
25
  $outline .= '<div class="tfree-client-testimonial" itemprop="reviewBody">';
26
+ $outline .= '<p class="tfree-testimonial-content">' . apply_filters( 'the_content', get_the_content() ) . '</p>';
 
 
27
  $outline .= '</div>';
28
  }
29
 
30
+ if ( $reviewer_name && ! empty( $tfree_name ) ) {
31
  $outline .= '<div itemprop="author" itemscope itemtype="http://schema.org/Person">';
32
  $outline .= '<meta itemprop="name" content="' . $tfree_name . '">';
33
  $outline .= '<h2 class="tfree-client-name">' . $tfree_name . '</h2>';
34
  $outline .= '</div>';
35
  }
36
 
37
+ if ( $star_rating && ! empty( $tfree_rating_star ) ) {
38
 
39
  switch ( $tfree_rating_star ) {
40
  case 'five_star':
41
+ $rating_value = '5';
42
+ $star_rating_data = $this->tfree_five_star;
43
  break;
44
  case 'four_star':
45
+ $rating_value = '4';
46
+ $star_rating_data = $this->tfree_four_star;
47
  break;
48
  case 'three_star':
49
+ $rating_value = '3';
50
+ $star_rating_data = $this->tfree_three_star;
51
  break;
52
  case 'two_star':
53
+ $rating_value = '2';
54
+ $star_rating_data = $this->tfree_two_star;
55
  break;
56
  case 'one_star':
57
+ $rating_value = '1';
58
+ $star_rating_data = $this->tfree_one_star;
59
  break;
60
  }
61
 
62
  $outline .= '<div class="tfree-client-rating" itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">';
63
  $outline .= '<meta itemprop="worstRating" content="1"><meta itemprop="ratingValue" content="' . $rating_value . '"><meta itemprop="bestRating" content="5">';
64
+ $outline .= $star_rating_data;
 
 
 
 
 
 
 
 
 
 
65
  $outline .= '</div>';
66
  }
67
 
68
+ if ( $reviewer_position && ! empty( $tfree_designation ) ) {
69
  $outline .= '<div class="tfree-client-designation">';
70
+ $outline .= $tfree_designation;
71
  $outline .= '</div>';
72
  }
73
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: shapedplugin
3
  Donate link: http://shapedplugin.com/donate
4
  Tags: testimonial, testimonials, testimonial showcase, testimonials showcase, testimonial slider, testimonials slider, testimonial carousel, testimonial front-end submission form, testimonials widget, easy testimonial, testimonial rotator, random testimonials, custom testimonial, collect testimonials, social proof, simple testimonial plugin, best testimonials showcase plugin, free testimonial, customers reviews
5
  Requires at least: 4.0
6
- Tested up to: 5.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -85,122 +85,6 @@ Testimonials are a great way to strengthen your brand and reliability with new c
85
  = SUPPORT =
86
  If you find any issue or need help, please ask us. We are active in WordPress.org [Support Forum](https://shapedplugin.com/support-forum/).
87
 
88
-
89
- = TESTIMONIAL PRO =
90
-
91
- **[Testimonial Pro](https://shapedplugin.com/plugin/testimonial-pro/)** vastly improves your styling & user experience and lets you showcase & collect fresh testimonials quickly without coding skills. The Premium version of the plugin comes with the following tons of useful and amazing advanced features. Check it out now!
92
-
93
- = EACH TESTIMONIAL INCLUDES FOLLOWING INPUT FIELDS =
94
-
95
- * Image
96
- * Video
97
- * Testimonial title or Tagline
98
- * Testimonial content or Review message
99
- * Reviewer name
100
- * Rating star
101
- * Reviewer identity or Position
102
- * Company name
103
- * Location
104
- * Mobile or Telephone
105
- * E-mail
106
- * Date
107
- * Website URL
108
- * And Social profile links (Facebook, Twitter, Google Plus, LinkedIn, Instagram, YouTube, Pinterest, Skype, StumbleUpon, Reddit, Dribbble, SnapChat etc.)
109
-
110
- >You can easily show/hide and customize every field.
111
-
112
- The plugin is packed with so many flexible and useful features Layouts (Slider, Grid, Masonry, Filter, and List), 10+ Professionally Pre-designed Themes, 840+ Google fonts, Star rating system, Front-End submission, Video testimonials, Advanced link options, 12+ Social profiles, Absolute freedom on design customization (Colors, Spacings, Alignment, An arrangement of meta fields etc.) It’s possible to craft almost any design what you can imagine. Get designer quality results without writing a single line of code.
113
-
114
- The Testimonial Plugin works great out of the box and super handy. You may expect to find all the must feature like absolute responsiveness, WPBakery integration, WPML Ready, Schema.org compliant JSON-LD markup to appear correctly in search results, shortcode support and more.
115
-
116
-
117
- = PRO VERSION KEY FEATURES =
118
-
119
- * Advanced Shortcode Generator, with advanced query options.
120
- * **5+ Testimonial Layouts** (e.g. Slider, Grid, Masonry, Filter, and List).
121
- * **10+ Professionally Pre-designed Themes.**
122
- * **840+ Google Fonts** (You can also load your theme or custom fonts).
123
- * **100+ Advanced Styling and Layout Customization Options** (Position, fonts family, weights, size, line-height, alignment, transform, letter spacing, color etc).
124
- * **Display reviews of your product or service.**
125
- * Showcase Unlimited Testimonials (Multiple Testimonials showcase anywhere you like).
126
- * **Thumbnail Slider for Testimonial.**
127
- * Duplicate or Clone Testimonial Sliders or Showcase (built-in duplicate option).
128
- * **Testimonials Showcase from specific Categories.**
129
- * **Display Specific Testimonials.**
130
- * **Testimonials Filtering by Categories.**
131
- * Pagination for grid, filter, masonry, and list layouts.
132
- * **Video Testimonial.**
133
- * Lightbox functionality for video with icon and overlay color options.
134
- * **Front-end Submission Form to Collect Testimonials.**
135
- * Drag & drop sorting Submission Form fields.
136
- * Customize the Form by adding or removing fields and changing properties like the order, label, color, and placeholder.
137
- * New Testimonial Notifications e-mail to one, or more, addresses when a new testimonial is submitted.
138
- * Testimonial Pending in Dashboard for approval by Admin.
139
- * Admins and Editors can edit the testimonials before publishing.
140
- * **Star rating system.**
141
- * **Google reCAPTCHA for Testimonial Form spam protection.**
142
- * Testimonial Carousel that shows 2 or more testimonials on each slide.
143
- * You can re-order your testimonials simply by drag & drop, or choose to display the testimonials randomly.
144
- * Create, edit, re-order, delete, and manage Testimonials with no coding knowledge!
145
- * **Rich Snippets/Structured Data compatible.**
146
- * Customize the testimonial border thickness and background color.
147
- * 12+ Social profile icons.
148
- * Change social profile icon position, style (Square, Round, Circle), color, border, background, and hover color.
149
- * **3 Testimonial thumbnail or image styles (Square, Round, Circle).**
150
- * Border or box-shadow option for Testimonial thumbnail or image.
151
- * Set the Testimonial image dimension: (width or height) from settings.
152
- * Set a margin between the testimonials.
153
- * Show excerpt (Read More option).
154
- * Excerpt custom limit option.
155
- * **Testimonial Detail or Read More Link Type (Expand, PopUp).**
156
- * Change Read more button text, color, hover etc.
157
- * Pagination for grid, filter, list and masonry layouts.
158
- * Automatic Identity or Position & Company Name linking via Website URL.
159
- * Multi-creative use plugin: Testimonials, Team, Logos etc.
160
- * Store testimonials for unlimited use.
161
- * Sort by date, random or custom order.
162
- * Smart AutoPlay on/off.
163
- * Set AutoPlay speed.
164
- * Set slide scroll speed.
165
- * Set number of Testimonial(s) to scroll at a time.
166
- * Ticker mode carousel for testimonials.
167
- * 8+ different navigation positions.
168
- * 15+ Modern navigation and pagination styles.
169
- * 6 different navigation arrows.
170
- * Infinite Looping.
171
- * Testimonial fade effect.
172
- * Testimonials order & order by (date, title, modified, author, random).
173
- * Pause on hover.
174
- * Auto-height option for testimonials.
175
- * Set the number of column in mobile, tablet & desktop.
176
- * Testimonial content and Reviewer information alignment (left, center, right).
177
- * Simple embedding using shortcode, PHP function, Shortcode Generator on post editor or via the widget.
178
- * Custom CSS option to override styles, if necessary without editing the CSS files.
179
- * Unlimited color option for all the elements.
180
- * **Ready for translation with [WPML](https://wpml.org/), [Polylang](https://wordpress.org/plugins/polylang/), [qTranslate-x](https://wordpress.org/plugins/qtranslate-x/), [GTranslate](https://wordpress.org/plugins/gtranslate/), [Google Language Translator](https://wordpress.org/plugins/google-language-translator/), [WPGlobus](https://wordpress.org/plugins/wpglobus/)**.
181
- * Widget ready.
182
- * RTL ready.
183
- * **WPBakery integrated.**
184
- * Guaranteed to Work with your any WordPress site.
185
- * Super simple, easy-to-use, powerful, and intuitive backend interface.
186
- * No more pain writing any shortcode.
187
- * All features of the free version.
188
- * Any new features we add in the future (which is often).
189
- * And so much more!
190
-
191
-
192
- = TOP REASONS TO BUY PRO =
193
- * **Fast & Friendly Support.**
194
- * Full Installation Document, User guide, and Tutorials.
195
- * Built-in Automatic Updates to new versions.
196
- * 100% Money Back Guarantee.
197
-
198
-
199
- === Testimonial Pro - Admin Panel Overview ===
200
- [youtube https://www.youtube.com/watch?v=OA7LgaZHwIY]
201
-
202
-
203
-
204
  = NOTE =
205
  This plugin is actively being developed & improved. We’re far from done and are adding new features, functionality, and fixes daily. If there’s a feature you want but we don’t have yet, please [let us know](https://shapedplugin.com/contact-us/).
206
 
@@ -314,6 +198,11 @@ Thank you!
314
 
315
 
316
  == Changelog ==
 
 
 
 
 
317
  = 2.1.4 - Mar 22, 2019 =
318
  * Fix: WordPress 5.2.1 compatible issue.
319
 
3
  Donate link: http://shapedplugin.com/donate
4
  Tags: testimonial, testimonials, testimonial showcase, testimonials showcase, testimonial slider, testimonials slider, testimonial carousel, testimonial front-end submission form, testimonials widget, easy testimonial, testimonial rotator, random testimonials, custom testimonial, collect testimonials, social proof, simple testimonial plugin, best testimonials showcase plugin, free testimonial, customers reviews
5
  Requires at least: 4.0
6
+ Tested up to: 5.3.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
85
  = SUPPORT =
86
  If you find any issue or need help, please ask us. We are active in WordPress.org [Support Forum](https://shapedplugin.com/support-forum/).
87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  = NOTE =
89
  This plugin is actively being developed & improved. We’re far from done and are adding new features, functionality, and fixes daily. If there’s a feature you want but we don’t have yet, please [let us know](https://shapedplugin.com/contact-us/).
90
 
198
 
199
 
200
  == Changelog ==
201
+
202
+ = 2.1.5 - Dec 17, 2019 =
203
+ * Improved: Dashboard UI.
204
+ * Fix: WordPress 5.3.1 compatible issue.
205
+
206
  = 2.1.4 - Mar 22, 2019 =
207
  * Fix: WordPress 5.2.1 compatible issue.
208
 
testimonial-free.php CHANGED
@@ -1,9 +1,18 @@
1
  <?php
2
  /**
 
 
 
 
 
 
 
 
 
3
  * Plugin Name: Testimonial
4
  * Plugin URI: https://shapedplugin.com/plugin/testimonial-pro/
5
  * Description: Most Customizable and Powerful Testimonials Showcase Plugin for WordPress that allows you to manage and display Testimonials or Reviews on any page or widget.
6
- * Version: 2.1.4
7
  * Author: ShapedPlugin
8
  * Author URI: https://shapedplugin.com/
9
  * Text Domain: testimonial-free
@@ -14,20 +23,51 @@ if ( ! defined( 'ABSPATH' ) ) {
14
  exit; // Exit if accessed directly.
15
  }
16
 
17
- /**
18
- * Handles core plugin hooks and action setup.
19
- *
20
- * @package testimonial-free
21
- * @since 2.0
22
- */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  if ( ! class_exists( 'SP_Testimonial_FREE' ) ) {
 
 
 
 
 
 
24
  class SP_Testimonial_FREE {
25
  /**
26
  * Plugin version
27
  *
28
  * @var string
29
  */
30
- public $version = '2.1.4';
31
 
32
  /**
33
  * @var SP_TFREE_Testimonial $shortcode
@@ -39,11 +79,6 @@ if ( ! class_exists( 'SP_Testimonial_FREE' ) ) {
39
  */
40
  public $shortcode;
41
 
42
- /**
43
- * @var SP_TFREE_MetaBox $metabox
44
- */
45
- public $metabox;
46
-
47
  /**
48
  * @var SP_TFREE_Router $router
49
  */
@@ -160,13 +195,12 @@ if ( ! class_exists( 'SP_Testimonial_FREE' ) ) {
160
  */
161
  public function add_plugin_action_links( $links, $file ) {
162
 
163
- if ( $file == SP_TFREE_BASENAME ) {
164
- $new_links = array(
165
- sprintf( '<a href="%s" style="%s">%s</a>', 'https://shapedplugin.com/plugin/testimonial-pro', 'color:red;font-weight:bold', __( 'Go Pro!', 'testimonial-free' ) ),
166
- sprintf( '<a href="%s">%s</a>', admin_url( 'edit.php?post_type=sp_tfree_shortcodes' ), __( 'Shortcode Generator', 'testimonial-free' ) ),
167
- );
168
 
169
- return array_merge( $new_links, $links );
170
  }
171
 
172
  return $links;
@@ -182,9 +216,8 @@ if ( ! class_exists( 'SP_Testimonial_FREE' ) ) {
182
  *
183
  * @return array
184
  */
185
-
186
  function after_testimonial_free_row_meta( $plugin_meta, $file ) {
187
- if ( $file == SP_TFREE_BASENAME ) {
188
  $plugin_meta[] = '<a href="https://shapedplugin.com/demo/testimonial-pro/" target="_blank">' . __( 'Live Demo', 'testimonial-free' ) . '</a>';
189
  }
190
 
@@ -214,8 +247,6 @@ if ( ! class_exists( 'SP_Testimonial_FREE' ) ) {
214
  * @since 2.0
215
  */
216
  function instantiate() {
217
-
218
- $this->metabox = SP_TFREE_MetaBox::getInstance();
219
  $this->testimonial = SP_TFREE_Testimonial::getInstance();
220
  $this->shortcode = SP_TFREE_Shortcodes::getInstance();
221
 
@@ -240,7 +271,6 @@ if ( ! class_exists( 'SP_Testimonial_FREE' ) ) {
240
  */
241
  function includes() {
242
  $this->page()->sp_tfree_function();
243
- $this->page()->sp_tfree_metabox();
244
  $this->router->includes();
245
  }
246
 
@@ -313,25 +343,28 @@ if ( ! class_exists( 'SP_Testimonial_FREE' ) ) {
313
  $rating_star = $testimonial_data['tpro_rating'];
314
  $fill_star = '<i style="color: #f3bb00;" class="fa fa-star"></i>';
315
  $empty_star = '<i class="fa fa-star"></i>';
316
- if ( $rating_star == 'one_star' ) {
317
- $column_field = '<span style="font-size: 16px; color: #d4d4d4;">' . $fill_star . $empty_star . $empty_star . $empty_star . $empty_star . '</span>';
318
- } elseif ( $rating_star == 'two_star' ) {
319
- $column_field = '<span style="font-size: 16px; color: #d4d4d4;">' . $fill_star . $fill_star . $empty_star . $empty_star . $empty_star . '</span>';
320
- } elseif ( $rating_star == 'three_star' ) {
321
- $column_field = '<span style="font-size: 16px; color: #d4d4d4;">' . $fill_star . $fill_star . $fill_star . $empty_star . $empty_star . '</span>';
322
- } elseif ( $rating_star == 'four_star' ) {
323
- $column_field = '<span style="font-size: 16px; color: #d4d4d4;">' . $fill_star . $fill_star . $fill_star . $fill_star . $empty_star . '</span>';
324
- } elseif ( $rating_star == 'five_star' ) {
325
- $column_field = '<span style="font-size: 16px; color: #d4d4d4;">' . $fill_star . $fill_star . $fill_star . $fill_star . $fill_star . '</span>';
326
- } else {
327
- $column_field = '';
 
 
 
 
 
 
 
328
  }
329
 
330
- if ( $column_field !== '' ) {
331
- echo $column_field;
332
- } else {
333
- echo '<span aria-hidden="true">—</span>';
334
- }
335
  }
336
 
337
  break;
@@ -368,7 +401,7 @@ if ( ! class_exists( 'SP_Testimonial_FREE' ) ) {
368
  * @param $plugin
369
  */
370
  function redirect_help_page( $plugin ) {
371
- if ( $plugin == SP_TFREE_BASENAME ) {
372
  exit( wp_redirect( admin_url( 'edit.php?post_type=spt_testimonial&page=tfree_help' ) ) );
373
  }
374
  }
@@ -386,7 +419,5 @@ function sp_testimonial_free() {
386
  return SP_Testimonial_FREE::instance();
387
  }
388
 
389
- if ( ! in_array( 'testimonial-pro/testimonial-pro.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
390
- // sp_testimonial_free instance.
391
- sp_testimonial_free();
392
- }
1
  <?php
2
  /**
3
+ * This file is read by WordPress to generate the plugin information in the plugin
4
+ * admin area. This file also includes all of the dependencies used by the plugin,
5
+ * registers the activation and deactivation functions, and defines a function
6
+ * that starts the plugin.
7
+ *
8
+ * @link https://shapedplugin.com
9
+ * @since 1.0
10
+ * @package Testimonial
11
+ *
12
  * Plugin Name: Testimonial
13
  * Plugin URI: https://shapedplugin.com/plugin/testimonial-pro/
14
  * Description: Most Customizable and Powerful Testimonials Showcase Plugin for WordPress that allows you to manage and display Testimonials or Reviews on any page or widget.
15
+ * Version: 2.1.5
16
  * Author: ShapedPlugin
17
  * Author URI: https://shapedplugin.com/
18
  * Text Domain: testimonial-free
23
  exit; // Exit if accessed directly.
24
  }
25
 
26
+ if ( ! function_exists( 'activate_testimonial' ) ) {
27
+ /**
28
+ * The code that runs during plugin activation.
29
+ * This action is documented in includes/class-testimonial-activator.php
30
+ */
31
+ function activate_testimonial() {
32
+ require_once plugin_dir_path( __FILE__ ) . 'includes/class-testimonial-activator.php';
33
+ Testimonial_Activator::activate();
34
+ }
35
+ }
36
+
37
+ if ( ! function_exists( 'deactivate_testimonial' ) ) {
38
+ /**
39
+ * The code that runs during plugin deactivation.
40
+ * This action is documented in includes/class-testimonial-deactivator.php
41
+ */
42
+ function deactivate_testimonial() {
43
+ require_once plugin_dir_path( __FILE__ ) . 'includes/class-testimonial-deactivator.php';
44
+ Testimonial_Deactivator::deactivate();
45
+ }
46
+ }
47
+
48
+ register_activation_hook( __FILE__, 'activate_testimonial' );
49
+ register_deactivation_hook( __FILE__, 'deactivate_testimonial' );
50
+
51
+ require_once plugin_dir_path( __FILE__ ) . 'includes/class-testimonial-updates.php';
52
+ require_once plugin_dir_path( __FILE__ ) . 'admin/views/notices/review.php';
53
+ require_once plugin_dir_path( __FILE__ ) . 'admin/views/tp-metabox/classes/setup.class.php';
54
+ //require_once plugin_dir_path( __FILE__ ) . 'admin/views/testimonial-settings.php';
55
+ require_once plugin_dir_path( __FILE__ ) . 'admin/views/testimonial-metaboxs.php';
56
+
57
  if ( ! class_exists( 'SP_Testimonial_FREE' ) ) {
58
+ /**
59
+ * Handles core plugin hooks and action setup.
60
+ *
61
+ * @package testimonial-free
62
+ * @since 2.0
63
+ */
64
  class SP_Testimonial_FREE {
65
  /**
66
  * Plugin version
67
  *
68
  * @var string
69
  */
70
+ public $version = '2.1.5';
71
 
72
  /**
73
  * @var SP_TFREE_Testimonial $shortcode
79
  */
80
  public $shortcode;
81
 
 
 
 
 
 
82
  /**
83
  * @var SP_TFREE_Router $router
84
  */
195
  */
196
  public function add_plugin_action_links( $links, $file ) {
197
 
198
+ if ( SP_TFREE_BASENAME === $file ) {
199
+ $ui_links = sprintf( '<a href="%s">%s</a>', admin_url( 'edit.php?post_type=sp_tfree_shortcodes' ), __( 'Shortcode Generator', 'testimonial-free' ) );
200
+
201
+ array_unshift( $links, $ui_links );
 
202
 
203
+ $links['go_pro'] = sprintf( '<a href="%s" style="%s">%s</a>', 'https://shapedplugin.com/plugin/testimonial-pro', 'color:#1dab87;font-weight:bold', __( 'Go Premium!', 'testimonial-free' ) );
204
  }
205
 
206
  return $links;
216
  *
217
  * @return array
218
  */
 
219
  function after_testimonial_free_row_meta( $plugin_meta, $file ) {
220
+ if ( SP_TFREE_BASENAME === $file ) {
221
  $plugin_meta[] = '<a href="https://shapedplugin.com/demo/testimonial-pro/" target="_blank">' . __( 'Live Demo', 'testimonial-free' ) . '</a>';
222
  }
223
 
247
  * @since 2.0
248
  */
249
  function instantiate() {
 
 
250
  $this->testimonial = SP_TFREE_Testimonial::getInstance();
251
  $this->shortcode = SP_TFREE_Shortcodes::getInstance();
252
 
271
  */
272
  function includes() {
273
  $this->page()->sp_tfree_function();
 
274
  $this->router->includes();
275
  }
276
 
343
  $rating_star = $testimonial_data['tpro_rating'];
344
  $fill_star = '<i style="color: #f3bb00;" class="fa fa-star"></i>';
345
  $empty_star = '<i class="fa fa-star"></i>';
346
+ switch ( $rating_star ) {
347
+ case 'one_star':
348
+ $column_field = '<span style="font-size: 16px; color: #d4d4d4;">' . $fill_star . $empty_star . $empty_star . $empty_star . $empty_star . '</span>';
349
+ break;
350
+ case 'two_star':
351
+ $column_field = '<span style="font-size: 16px; color: #d4d4d4;">' . $fill_star . $fill_star . $empty_star . $empty_star . $empty_star . '</span>';
352
+ break;
353
+ case 'three_star':
354
+ $column_field = '<span style="font-size: 16px; color: #d4d4d4;">' . $fill_star . $fill_star . $fill_star . $empty_star . $empty_star . '</span>';
355
+ break;
356
+ case 'four_star':
357
+ $column_field = '<span style="font-size: 16px; color: #d4d4d4;">' . $fill_star . $fill_star . $fill_star . $fill_star . $empty_star . '</span>';
358
+ break;
359
+ case 'five_star':
360
+ $column_field = '<span style="font-size: 16px; color: #d4d4d4;">' . $fill_star . $fill_star . $fill_star . $fill_star . $fill_star . '</span>';
361
+ break;
362
+ default:
363
+ $column_field = '<span aria-hidden="true">—</span>';
364
+ break;
365
  }
366
 
367
+ echo $column_field;
 
 
 
 
368
  }
369
 
370
  break;
401
  * @param $plugin
402
  */
403
  function redirect_help_page( $plugin ) {
404
+ if ( SP_TFREE_BASENAME === $plugin ) {
405
  exit( wp_redirect( admin_url( 'edit.php?post_type=spt_testimonial&page=tfree_help' ) ) );
406
  }
407
  }
419
  return SP_Testimonial_FREE::instance();
420
  }
421
 
422
+ // sp_testimonial_free instance.
423
+ sp_testimonial_free();