Real Testimonials - Version 2.0

Version Description

  • Shortcode Generator
  • Star Rating
  • Section Title
  • Testimonial Title or Tagline
  • Unlimited color options for every field.
  • Show/hide every field.
  • RTL Supported
  • Improved Admin Dashboard UI
Download this release

Release Info

Developer rubel_miah
Plugin Icon 128x128 Real Testimonials
Version 2.0
Comparing to
See all releases

Code changes from version 1.4.2 to 2.0

Files changed (122) hide show
  1. admin/assets/css/admin-meta.css +804 -0
  2. admin/assets/css/admin.css +110 -0
  3. admin/assets/css/chosen.css +448 -0
  4. admin/assets/images/chosen-sprite.png +0 -0
  5. admin/assets/images/chosen-sprite@2x.png +0 -0
  6. admin/assets/images/client-thumb.png +0 -0
  7. admin/assets/images/icon-32.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/pro-feature.png +0 -0
  23. admin/assets/images/sp-icon.png +0 -0
  24. admin/assets/images/tiny-mce.png +0 -0
  25. admin/assets/images/upgrade-ss1.png +0 -0
  26. admin/assets/images/upgrade-ss10.png +0 -0
  27. admin/assets/images/upgrade-ss11.png +0 -0
  28. admin/assets/images/upgrade-ss12.png +0 -0
  29. admin/assets/images/upgrade-ss13.png +0 -0
  30. admin/assets/images/upgrade-ss14.png +0 -0
  31. admin/assets/images/upgrade-ss15.png +0 -0
  32. admin/assets/images/upgrade-ss16.png +0 -0
  33. admin/assets/images/upgrade-ss17.png +0 -0
  34. admin/assets/images/upgrade-ss18.png +0 -0
  35. admin/assets/images/upgrade-ss19.png +0 -0
  36. admin/assets/images/upgrade-ss2.png +0 -0
  37. admin/assets/images/upgrade-ss20.png +0 -0
  38. admin/assets/images/upgrade-ss21.png +0 -0
  39. admin/assets/images/upgrade-ss22.png +0 -0
  40. admin/assets/images/upgrade-ss23.png +0 -0
  41. admin/assets/images/upgrade-ss24.png +0 -0
  42. admin/assets/images/upgrade-ss25.png +0 -0
  43. admin/assets/images/upgrade-ss3.png +0 -0
  44. admin/assets/images/upgrade-ss4.png +0 -0
  45. admin/assets/images/upgrade-ss5.png +0 -0
  46. admin/assets/images/upgrade-ss6.png +0 -0
  47. admin/assets/images/upgrade-ss7.png +0 -0
  48. admin/assets/images/upgrade-ss8.png +0 -0
  49. admin/assets/images/upgrade-ss9.png +0 -0
  50. admin/assets/js/admin-meta.js +32 -0
  51. admin/assets/js/chosen.js +1269 -0
  52. admin/assets/js/help.js +12 -0
  53. admin/assets/js/icon-32.png +0 -0
  54. admin/assets/js/mce-button.js +28 -0
  55. admin/views/mce-button.php +147 -0
  56. admin/views/metabox/assets/css/sp-custom.css +183 -0
  57. admin/views/metabox/assets/css/sp-framework-rtl.css +220 -0
  58. admin/views/metabox/assets/css/sp-framework.css +1323 -0
  59. admin/views/metabox/assets/js/sp-framework.js +356 -0
  60. admin/views/metabox/assets/js/sp-framework.min.js +2 -0
  61. admin/views/metabox/assets/js/sp-plugins.js +1148 -0
  62. admin/views/metabox/assets/js/sp-plugins.min.js +3 -0
  63. admin/views/metabox/classes/abstract.class.php +23 -0
  64. admin/views/metabox/classes/framework.class.php +442 -0
  65. admin/views/metabox/classes/metabox.class.php +252 -0
  66. admin/views/metabox/classes/options.class.php +374 -0
  67. admin/views/metabox/config/metabox.config.php +155 -0
  68. admin/views/metabox/fields/d_text/d_text.php +24 -0
  69. admin/views/metabox/fields/notice/notice.php +24 -0
  70. admin/views/metabox/fields/rating/rating.php +43 -0
  71. admin/views/metabox/fields/text/text.php +24 -0
  72. admin/views/metabox/functions/actions.php +25 -0
  73. admin/views/metabox/functions/enqueue.php +35 -0
  74. admin/views/metabox/functions/fallback.php +86 -0
  75. admin/views/metabox/functions/helpers.php +205 -0
  76. admin/views/metabox/functions/sanitize.php +135 -0
  77. admin/views/metabox/functions/validate.php +55 -0
  78. admin/views/metabox/index.php +1 -0
  79. admin/views/metabox/sp-framework-path.php +398 -0
  80. admin/views/metabox/sp-framework.php +39 -0
  81. admin/views/partials/general-settings.php +96 -0
  82. admin/views/partials/slider-settings.php +124 -0
  83. admin/views/partials/stylization.php +97 -0
  84. admin/views/partials/typography.php +123 -0
  85. admin/views/partials/upgrade-to-pro.php +404 -0
  86. admin/views/scripts.php +63 -0
  87. admin/views/tab-navigation.php +74 -0
  88. admin/views/widget.php +117 -0
  89. assets/css/admin-style.css +0 -57
  90. assets/css/owl.carousel.css +0 -71
  91. assets/css/style.css +0 -95
  92. assets/js/owl.carousel.min.js +0 -47
  93. class/metabox.php +109 -0
  94. class/metaboxform.php +415 -0
  95. class/router.php +66 -0
  96. class/shortcodes.php +74 -0
  97. class/testimonial.php +81 -0
  98. inc/functions.php +0 -91
  99. inc/options/meta-box.php +0 -47
  100. inc/scripts.php +0 -28
  101. includes/free/loader.php +20 -0
  102. includes/functions.php +345 -0
  103. languages/testimonial-free.pot +962 -28
  104. public/assets/css/deprecated-style.css +113 -0
  105. {assets → public/assets}/css/font-awesome.min.css +0 -0
  106. public/assets/css/responsive.css +0 -0
  107. public/assets/css/slick.css +119 -0
  108. public/assets/css/style.css +151 -0
  109. {assets → public/assets}/fonts/FontAwesome.otf +0 -0
  110. {assets → public/assets}/fonts/fontawesome-webfont.eot +0 -0
  111. {assets → public/assets}/fonts/fontawesome-webfont.svg +0 -0
  112. {assets → public/assets}/fonts/fontawesome-webfont.ttf +0 -0
  113. {assets → public/assets}/fonts/fontawesome-webfont.woff +0 -0
  114. {assets → public/assets}/fonts/fontawesome-webfont.woff2 +0 -0
  115. public/assets/js/slick.min.js +18 -0
  116. public/assets/js/sp-slick-active.js +56 -0
  117. inc/shortcodes.php → public/views/deprecated-shortcodes.php +34 -20
  118. public/views/scripts.php +54 -0
  119. public/views/shortcoderender.php +273 -0
  120. public/views/templates/theme-one.php +83 -0
  121. readme.txt +297 -128
  122. testimonial-free.php +370 -137
admin/assets/css/admin-meta.css ADDED
@@ -0,0 +1,804 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ }
17
+
18
+ div.sp-tfree-help .headline-feature.feature-video iframe{
19
+ position: absolute;
20
+ top: 0;
21
+ left: 0;
22
+ width: 100%;
23
+ height: 100%;
24
+ }
25
+ div.sp-tfree-help .feature-section .sp-tfree-feature{
26
+ background-color: #fff;
27
+ padding: 20px 20px;
28
+ border: 1px solid #ddd;
29
+ }
30
+ div.sp-tfree-help .feature-section .sp-tfree-feature h3{
31
+ font-size: 16px;
32
+ margin-top: 18px;
33
+ }
34
+
35
+ div.sp-tfree-help .feature-section i.sp-tfree-font-icon{
36
+ font-size: 30px;
37
+ display: block;
38
+ color: #52b3d9;
39
+ }
40
+ div.sp-tfree-help .sp-tfree-pro-features .feature-section span.dashicons{
41
+ font-size: 22px;
42
+ color: #fff;
43
+ background-color: #52b3d9;
44
+ width: 28px;
45
+ height: 28px;
46
+ line-height: 28px;
47
+ border-radius: 50%;
48
+ margin-right: 10px;
49
+ }
50
+ div.sp-tfree-help .sp-tfree-pro-features .feature-section{
51
+ margin-bottom: 40px;
52
+ }
53
+ div.sp-tfree-help .sp-tfree-pro-features .feature-section .sp-tfree-feature h3{
54
+ margin-top:0;
55
+ }
56
+ div.sp-tfree-help .sp-tfree-pro-features .feature-section .sp-tfree-feature p{
57
+ margin-bottom:0;
58
+ }
59
+ div.sp-tfree-help .sp-tfree-pro-features .feature-section .sp-tfree-feature{
60
+ box-shadow: 0 0 10px 0 #dddddd;
61
+ margin: 4px;
62
+ border: 0 solid;
63
+ }
64
+ div.sp-tfree-help .sp-tfree-pro-features .feature-section.three-col .col{
65
+ min-width: 31.3%;
66
+ max-width: 31.3%;
67
+ margin-top: 20px;
68
+ padding-left: 2%;
69
+ }
70
+ div.sp-tfree-help .sp-tfree-pro-features .sp-tfree-pro-subtitle{
71
+ font-size: 1.2em;
72
+ margin-bottom: 26px;
73
+ }
74
+
75
+ div.sp-tfree-help .sp-tfree-upgrade-sticky-footer{
76
+ position: fixed;
77
+ bottom: 0;
78
+ background: #fff;
79
+ width: calc(100% - 195px);
80
+ z-index: 9;
81
+ margin-left: -25px;
82
+ text-align: center;
83
+ border: 1px solid #dfdfdf;
84
+ padding: 15px 0;
85
+ border-bottom: none;
86
+ }
87
+ div.sp-tfree-help .sp-tfree-pro-features h2{
88
+ font-size: 2.5em;
89
+ font-weight: 400;
90
+ }
91
+ div.sp-tfree-help .sp-tfree-upgrade-sticky-footer h3{
92
+ margin-top: 17px;
93
+ margin-bottom: 20px;
94
+ }
95
+
96
+ div.sp-tfree-help .sp-tfree-upgrade-sticky-footer a.button{
97
+ margin: 0 8px;
98
+ }
99
+
100
+ /* Responsive CSS */
101
+ @media (max-width: 960px) {
102
+ div.sp-tfree-help .sp-tfree-upgrade-sticky-footer {
103
+ width: calc(100%);
104
+ }
105
+ }
106
+ @media (max-width: 500px) {
107
+ div.sp-tfree-help .wp-badge {
108
+ background-position-x: center;
109
+ }
110
+ }
admin/assets/css/chosen.css ADDED
@@ -0,0 +1,448 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
Binary file
admin/assets/images/chosen-sprite@2x.png ADDED
Binary file
admin/assets/images/client-thumb.png ADDED
Binary file
admin/assets/images/icon-32.png ADDED
Binary file
admin/assets/images/logo.png ADDED
Binary file
admin/assets/images/nav-1.png ADDED
Binary file
admin/assets/images/nav-10.png ADDED
Binary file
admin/assets/images/nav-11.png ADDED
Binary file
admin/assets/images/nav-12.png ADDED
Binary file
admin/assets/images/nav-13.png ADDED
Binary file
admin/assets/images/nav-2.png ADDED
Binary file
admin/assets/images/nav-3.png ADDED
Binary file
admin/assets/images/nav-4.png ADDED
Binary file
admin/assets/images/nav-5.png ADDED
Binary file
admin/assets/images/nav-6.png ADDED
Binary file
admin/assets/images/nav-7.png ADDED
Binary file
admin/assets/images/nav-8.png ADDED
Binary file
admin/assets/images/nav-9.png ADDED
Binary file
admin/assets/images/pro-feature.png ADDED
Binary file
admin/assets/images/sp-icon.png ADDED
Binary file
admin/assets/images/tiny-mce.png ADDED
Binary file
admin/assets/images/upgrade-ss1.png ADDED
Binary file
admin/assets/images/upgrade-ss10.png ADDED
Binary file
admin/assets/images/upgrade-ss11.png ADDED
Binary file
admin/assets/images/upgrade-ss12.png ADDED
Binary file
admin/assets/images/upgrade-ss13.png ADDED
Binary file
admin/assets/images/upgrade-ss14.png ADDED
Binary file
admin/assets/images/upgrade-ss15.png ADDED
Binary file
admin/assets/images/upgrade-ss16.png ADDED
Binary file
admin/assets/images/upgrade-ss17.png ADDED
Binary file
admin/assets/images/upgrade-ss18.png ADDED
Binary file
admin/assets/images/upgrade-ss19.png ADDED
Binary file
admin/assets/images/upgrade-ss2.png ADDED
Binary file
admin/assets/images/upgrade-ss20.png ADDED
Binary file
admin/assets/images/upgrade-ss21.png ADDED
Binary file
admin/assets/images/upgrade-ss22.png ADDED
Binary file
admin/assets/images/upgrade-ss23.png ADDED
Binary file
admin/assets/images/upgrade-ss24.png ADDED
Binary file
admin/assets/images/upgrade-ss25.png ADDED
Binary file
admin/assets/images/upgrade-ss3.png ADDED
Binary file
admin/assets/images/upgrade-ss4.png ADDED
Binary file
admin/assets/images/upgrade-ss5.png ADDED
Binary file
admin/assets/images/upgrade-ss6.png ADDED
Binary file
admin/assets/images/upgrade-ss7.png ADDED
Binary file
admin/assets/images/upgrade-ss8.png ADDED
Binary file
admin/assets/images/upgrade-ss9.png ADDED
Binary file
admin/assets/js/admin-meta.js ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,1269 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
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/assets/js/icon-32.png ADDED
Binary file
admin/assets/js/mce-button.js ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function() {
2
+ tinymce.PluginManager.add('sp_tfree_mce_button', function( editor, url ) {
3
+ editor.addButton('sp_tfree_mce_button', {
4
+ text: false,
5
+ icon: false,
6
+ image: url + '/icon-32.png',
7
+ tooltip: 'Testimonial',
8
+ onclick: function () {
9
+ editor.windowManager.open({
10
+ title: 'Insert Shortcode',
11
+ width: 400,
12
+ height: 100,
13
+ body: [
14
+ {
15
+ type: 'listbox',
16
+ name: 'listboxName',
17
+ label: 'Select Shortcode',
18
+ 'values': editor.settings.spTFREEShortcodeList
19
+ }
20
+ ],
21
+ onsubmit: function( e ) {
22
+ editor.insertContent( '[sp_testimonial id="' + e.data.listboxName + '"]');
23
+ }
24
+ });
25
+ }
26
+ });
27
+ });
28
+ })();
admin/views/mce-button.php ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Make sure we don't expose any info if called directly
3
+ if ( !defined( 'ABSPATH' ) ){
4
+ exit;
5
+ }
6
+
7
+ if( !class_exists( 'SP_TFREE_MCE_Shortcode_list' ) ) {
8
+ class SP_TFREE_MCE_Shortcode_list {
9
+
10
+ private static $instance;
11
+
12
+ /**
13
+ * Initiator
14
+ * @since 2.0
15
+ */
16
+ public static function init() {
17
+ return self::$instance;
18
+ }
19
+
20
+ /**
21
+ * Constructor
22
+ * @since 2.0
23
+ */
24
+ public function __construct() {
25
+ add_action( 'wp_ajax_tfree_cpt_list', array( $this, 'tfree_list_ajax' ) );
26
+ add_action( 'admin_footer', array( $this, 'tfree_cpt_list' ) );
27
+ add_action( 'admin_head', array( $this, 'tfree_mce_button' ) );
28
+ }
29
+
30
+ // Hooks your functions into the correct filters
31
+ function tfree_mce_button() {
32
+ // check user permissions
33
+ if ( !current_user_can( 'edit_posts' ) && !current_user_can( 'edit_pages' ) ) {
34
+ return;
35
+ }
36
+ // check if WYSIWYG is enabled
37
+ if ( 'true' == get_user_option( 'rich_editing' ) ) {
38
+ add_filter( 'mce_external_plugins', array( $this, 'add_mce_plugin' ) );
39
+ add_filter( 'mce_buttons', array( $this, 'register_mce_button' ) );
40
+ }
41
+ }
42
+
43
+ // Script for our mce button
44
+ function add_mce_plugin( $plugin_array ) {
45
+ $plugin_array['sp_tfree_mce_button'] = SP_TFREE_URL . 'admin/assets/js/mce-button.js';
46
+ return $plugin_array;
47
+ }
48
+
49
+ // Register our button in the editor
50
+ function register_mce_button( $buttons ) {
51
+ array_push( $buttons, 'sp_tfree_mce_button' );
52
+ return $buttons;
53
+ }
54
+
55
+ /**
56
+ * Function to fetch cpt posts list
57
+ * @since 2.0
58
+ * @return string
59
+ */
60
+ public function posts( $post_type ) {
61
+
62
+ global $wpdb;
63
+ $cpt_type = $post_type;
64
+ $cpt_post_status = 'publish';
65
+ $cpt = $wpdb->get_results( $wpdb->prepare(
66
+ "SELECT ID, post_title
67
+ FROM $wpdb->posts
68
+ WHERE $wpdb->posts.post_type = %s
69
+ AND $wpdb->posts.post_status = %s
70
+ ORDER BY ID DESC",
71
+ $cpt_type,
72
+ $cpt_post_status
73
+ ) );
74
+
75
+ $list = array();
76
+
77
+ foreach ( $cpt as $post ) {
78
+ $selected = '';
79
+ $post_id = $post->ID;
80
+ $post_name = $post->post_title;
81
+ $list[] = array(
82
+ 'text' => $post_name,
83
+ 'value' => $post_id
84
+ );
85
+ }
86
+
87
+ wp_send_json( $list );
88
+ }
89
+
90
+ /**
91
+ * Function to fetch buttons
92
+ * @since 2.0
93
+ * @return string
94
+ */
95
+ public function tfree_list_ajax() {
96
+ // check for nonce
97
+ check_ajax_referer( 'sp-mce-nonce', 'security' );
98
+ $posts = $this->posts( 'sp_tfree_shortcodes' ); // change 'post' if you need posts list
99
+ return $posts;
100
+ }
101
+
102
+ /**
103
+ * Function to output button list ajax script
104
+ * @since 2.0
105
+ * @return string
106
+ */
107
+ public function tfree_cpt_list() {
108
+ // create nonce
109
+ global $current_screen;
110
+ $current_screen->post_type;
111
+ if( $current_screen == 'post' || 'page' ){
112
+ $nonce = wp_create_nonce( 'sp-mce-nonce' );
113
+ ?>
114
+ <script type="text/javascript">
115
+ jQuery( document ).ready( function( $ ) {
116
+ var data = {
117
+ 'action' : 'tfree_cpt_list', // wp ajax action
118
+ 'security' : '<?php echo $nonce; ?>' // nonce value created earlier
119
+ };
120
+ // fire ajax
121
+ jQuery.post( ajaxurl, data, function( response ) {
122
+ // if nonce fails then not authorized else settings saved
123
+ if( response === '-1' ){
124
+ // do nothing
125
+ console.log('error');
126
+ } else {
127
+ if (typeof(tinyMCE) != 'undefined') {
128
+ if (tinyMCE.activeEditor != null) {
129
+ tinyMCE.activeEditor.settings.spTFREEShortcodeList = response;
130
+ }
131
+ }
132
+ }
133
+ });
134
+ });
135
+ </script>
136
+ <?php
137
+ }
138
+ }
139
+
140
+ } // Mce Class
141
+ }
142
+
143
+ /**
144
+ * Kicking this off
145
+ */
146
+ $sp_mce_btn = new SP_TFREE_MCE_Shortcode_list();
147
+ $sp_mce_btn->init();
admin/views/metabox/assets/css/sp-custom.css ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,1323 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,356 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,2 @@
 
 
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 ADDED
@@ -0,0 +1,1148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,3 @@
 
 
 
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 ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,442 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,252 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,374 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden.
admin/views/metabox/sp-framework-path.php ADDED
@@ -0,0 +1,398 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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/partials/general-settings.php ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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' => 50
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
+
96
+ </div>
admin/views/partials/slider-settings.php ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_swipe',
107
+ 'name' => __( 'Swipe', 'testimonial-free' ),
108
+ 'desc' => __( 'On/Off swipe mode.', 'testimonial-free' ),
109
+ 'default' => 'on'
110
+ ) );
111
+ $this->metaboxform->checkbox( array(
112
+ 'id' => 'tfree_mouse_draggable',
113
+ 'name' => __( 'Mouse Draggable', 'testimonial-free' ),
114
+ 'desc' => __( 'On/Off mouse draggable mode.', 'testimonial-free' ),
115
+ 'default' => 'on'
116
+ ) );
117
+ $this->metaboxform->checkbox( array(
118
+ 'id' => 'tfree_rtl',
119
+ 'name' => __( 'RTL', 'testimonial-free' ),
120
+ 'desc' => __( 'On/Off right to left mode.', 'testimonial-free' ),
121
+ 'default' => 'off'
122
+ ) );
123
+ ?>
124
+ </div>
admin/views/partials/stylization.php ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,404 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ } // if direct access
6
+
7
+ /**
8
+ * Admin Scripts and styles
9
+ */
10
+ class SP_TFREE_Admin_Scripts {
11
+
12
+ /**
13
+ * @var null
14
+ * @since 2.0
15
+ */
16
+ protected static $_instance = null;
17
+
18
+ /**
19
+ * @return SP_TFREE_Admin_Scripts
20
+ * @since 2.0
21
+ */
22
+ public static function instance() {
23
+ if ( is_null( self::$_instance ) ) {
24
+ self::$_instance = new self();
25
+ }
26
+
27
+ return self::$_instance;
28
+ }
29
+
30
+ /**
31
+ * Initialize the class
32
+ */
33
+ public function __construct() {
34
+
35
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );
36
+ }
37
+
38
+ /**
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();
admin/views/tab-navigation.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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://wordpress.org/support/plugin/testimonial-free" 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/widget.php ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Testimonial Widget
4
+ * @since 2.0
5
+ */
6
+ function sp_testimonial_free_widget() {
7
+ register_widget( 'TFREE_Widget_Content' );
8
+ }
9
+ add_action( 'widgets_init', 'sp_testimonial_free_widget' );
10
+
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
+ }
20
+
21
+ /**
22
+ * Outputs the content of the widget
23
+ *
24
+ * @param array $args
25
+ * @param array $instance
26
+ */
27
+ public function widget( $args, $instance ) {
28
+ extract( $args );
29
+
30
+ $title = apply_filters( 'widget_title', esc_attr( $instance['title'] ) );
31
+ $shortcode_id = isset( $instance['shortcode_id'] ) ? absint( $instance['shortcode_id'] ) : 0;
32
+
33
+ if ( ! $shortcode_id ) {
34
+ return;
35
+ }
36
+
37
+ echo $args['before_widget'];
38
+
39
+ if ( ! empty( $title ) ) {
40
+ echo $args['before_title'] . $title . $args['after_title'];
41
+ }
42
+
43
+ echo do_shortcode( '[sp_testimonial id=' . $shortcode_id . ']' );
44
+ echo $args['after_widget'];
45
+ }
46
+
47
+
48
+ /**
49
+ * Outputs the options form on admin
50
+ *
51
+ * @param array $instance The widget options
52
+ */
53
+ public function form( $instance ) {
54
+ $shortcodes = $this->shortcodes_list();
55
+ $shortcode_id = ! empty( $instance['shortcode_id'] ) ? absint( $instance['shortcode_id'] ) : null;
56
+ $title = ! empty( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
57
+
58
+ if ( count( $shortcodes ) > 0 ) {
59
+
60
+ echo sprintf( '<p><label for="%1$s">%2$s</label>', $this->get_field_id( 'title' ), __( 'Title:', 'testimonial-free' ) );
61
+ echo sprintf( '<input type="text" class="widefat" id="%1$s" name="%2$s" value="%3$s" /></p>', $this->get_field_id( 'title' ), $this->get_field_name( 'title' ), $title );
62
+
63
+ echo sprintf( '<p><label>%s</label>', __( 'Testimonial Shortcodes:', 'testimonial-free' ) );
64
+ echo sprintf( '<select class="widefat" name="%s">', $this->get_field_name( 'shortcode_id' ) );
65
+ foreach ( $shortcodes as $shortcode ) {
66
+ $selected = $shortcode->id == $shortcode_id ? 'selected="selected"' : '';
67
+ echo sprintf(
68
+ '<option value="%1$d" %3$s>%2$s</option>',
69
+ $shortcode->id,
70
+ $shortcode->title,
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' )
81
+ );
82
+ }
83
+ }
84
+
85
+ /**
86
+ * Processing widget options on save
87
+ *
88
+ * @param array $new_instance The new options
89
+ * @param array $old_instance The previous options
90
+ */
91
+ public function update( $new_instance, $old_instance ) {
92
+ $instance = array();
93
+ $instance['title'] = sanitize_text_field( $new_instance['title'] );
94
+ $instance['shortcode_id'] = absint( $new_instance['shortcode_id'] );
95
+
96
+ return $instance;
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
+ }
assets/css/admin-style.css DELETED
@@ -1,57 +0,0 @@
1
-
2
- /* Meta Box */
3
- .sp-meta-box-framework {
4
- margin: -6px -12px -12px -12px;
5
- }
6
- .sp-mb-element {
7
- position: relative;
8
- padding: 30px;
9
- border-bottom: 1px solid #eee;
10
- }
11
- .sp-mb-element:hover {
12
- background-color: #f9f9f9;
13
- }
14
- .sp-mb-element:last-child{
15
- border-bottom: 0;
16
- }
17
- .sp-mb-element .sp-mb-title label{
18
- margin: 0;
19
- color: #23282d;
20
- font-weight: 700;
21
- font-size: 13px;
22
- }
23
- .sp-mb-element .sp-mb-title {
24
- position: relative;
25
- width: 25%;
26
- float: left;
27
- }
28
- .sp-mb-desc {
29
- font-style: italic;
30
- font-weight: 400;
31
- margin-top: 8px;
32
- color: #999;
33
- }
34
- .sp-mb-element p:last-child {
35
- margin-bottom: 0 !important;
36
- }
37
- .sp-mb-element .sp-mb-field-set {
38
- margin-left: 30%;
39
- }
40
- .sp-mb-field-text input {
41
- width: 340px;
42
- max-width: 100%;
43
- }
44
- .clear {
45
- clear: both;
46
- }
47
-
48
- @media only screen and (max-width: 1200px) {
49
- .sp-meta-box-framework .sp-mb-element .sp-mb-title {
50
- float: none;
51
- width: 100%;
52
- margin-bottom: 10px;
53
- }
54
- .sp-meta-box-framework .sp-mb-element .sp-mb-field-set {
55
- margin-left: 0;
56
- }
57
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/owl.carousel.css DELETED
@@ -1,71 +0,0 @@
1
- /*
2
- * Core Owl Carousel CSS File
3
- * v1.3.3
4
- */
5
-
6
- /* clearfix */
7
- .owl-carousel .owl-wrapper:after {
8
- content: ".";
9
- display: block;
10
- clear: both;
11
- visibility: hidden;
12
- line-height: 0;
13
- height: 0;
14
- }
15
- /* display none until init */
16
- .owl-carousel{
17
- display: none;
18
- position: relative;
19
- width: 100%;
20
- -ms-touch-action: pan-y;
21
- }
22
- .owl-carousel .owl-wrapper{
23
- display: none;
24
- position: relative;
25
- -webkit-transform: translate3d(0px, 0px, 0px);
26
- }
27
- .owl-carousel .owl-wrapper-outer{
28
- overflow: hidden;
29
- position: relative;
30
- width: 100%;
31
- }
32
- .owl-carousel .owl-wrapper-outer.autoHeight{
33
- -webkit-transition: height 500ms ease-in-out;
34
- -moz-transition: height 500ms ease-in-out;
35
- -ms-transition: height 500ms ease-in-out;
36
- -o-transition: height 500ms ease-in-out;
37
- transition: height 500ms ease-in-out;
38
- }
39
-
40
- .owl-carousel .owl-item{
41
- float: left;
42
- }
43
- .owl-controls .owl-page,
44
- .owl-controls .owl-buttons div{
45
- cursor: pointer;
46
- }
47
- .owl-controls {
48
- -webkit-user-select: none;
49
- -khtml-user-select: none;
50
- -moz-user-select: none;
51
- -ms-user-select: none;
52
- user-select: none;
53
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
54
- }
55
-
56
- /* mouse grab icon */
57
- .grabbing {
58
- cursor:url(grabbing.png) 8 8, move;
59
- }
60
-
61
- /* fix */
62
- .owl-carousel .owl-wrapper,
63
- .owl-carousel .owl-item{
64
- -webkit-backface-visibility: hidden;
65
- -moz-backface-visibility: hidden;
66
- -ms-backface-visibility: hidden;
67
- -webkit-transform: translate3d(0,0,0);
68
- -moz-transform: translate3d(0,0,0);
69
- -ms-transform: translate3d(0,0,0);
70
- }
71
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/style.css DELETED
@@ -1,95 +0,0 @@
1
-
2
- a{
3
- -webkit-transition: all 0.3s ease;
4
- -moz-transition: all 0.3s ease;
5
- transition: all 0.3s ease;
6
- }
7
-
8
- .clear{
9
- clear: both;
10
- }
11
-
12
- .text-center {
13
- text-align: center;
14
- }
15
-
16
- .sp-testimonial-section{
17
- padding: 0 30px;
18
- }
19
-
20
- .sp-testimonial-section .testimonial-free{
21
- margin: 0 15px;
22
- font-size: 14px;
23
- line-height: 24px;
24
- }
25
-
26
- .testimonial-free .tf-client-name{
27
- color: #343434;
28
- font-size: 18px;
29
- line-height: 18px;
30
- font-weight: 700;
31
- margin-top: 25px;
32
- margin-bottom: 0;
33
- }
34
-
35
- .testimonial-free .tf-client-designation{
36
- color: #999999;
37
- font-size: 14px;
38
- margin-bottom: 0;
39
- margin-top: 14px;
40
- line-height: 16px;
41
- }
42
-
43
- .sp-testimonial-section .owl-controls .owl-buttons div{
44
- position: absolute;
45
- top: 50%;
46
- font-size: 26px;
47
- line-height: 26px;
48
- margin-top: -14px;
49
- }
50
-
51
- .sp-testimonial-section .owl-controls .owl-buttons div:hover{
52
- color: #52b3d9;
53
- }
54
-
55
- .sp-testimonial-section .owl-controls .owl-buttons div.owl-prev{
56
- left: 0;
57
- }
58
-
59
- .sp-testimonial-section .owl-controls .owl-buttons div.owl-next{
60
- right: 0;
61
- }
62
-
63
- .sp-testimonial-section .owl-controls .owl-pagination{
64
- text-align: center;
65
- margin-top: 24px;
66
- }
67
-
68
- .sp-testimonial-section .owl-controls .owl-pagination .owl-page{
69
- background-color: #cccccc;
70
- width: 12px;
71
- height: 12px;
72
- display: inline-block;
73
- border-radius: 100%;
74
- margin: 0 4px;
75
- }
76
-
77
- .sp-testimonial-section .owl-controls .owl-pagination .owl-page.active{
78
- background-color: #52b3d9;
79
- }
80
-
81
-
82
-
83
- /* Image Style */
84
- .tf-client-image{
85
- width: 90px;
86
- height: 90px;
87
- margin: 0 auto 20px;
88
- }
89
- .tf-client-image img{
90
- -webkit-border-radius: 100%;
91
- -moz-border-radius: 100%;
92
- border-radius: 100%;
93
- }
94
-
95
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/js/owl.carousel.min.js DELETED
@@ -1,47 +0,0 @@
1
- "function"!==typeof Object.create&&(Object.create=function(f){function g(){}g.prototype=f;return new g});
2
- (function(f,g,k){var l={init:function(a,b){this.$elem=f(b);this.options=f.extend({},f.fn.owlCarousel.options,this.$elem.data(),a);this.userOptions=a;this.loadContent()},loadContent:function(){function a(a){var d,e="";if("function"===typeof b.options.jsonSuccess)b.options.jsonSuccess.apply(this,[a]);else{for(d in a.owl)a.owl.hasOwnProperty(d)&&(e+=a.owl[d].item);b.$elem.html(e)}b.logIn()}var b=this,e;"function"===typeof b.options.beforeInit&&b.options.beforeInit.apply(this,[b.$elem]);"string"===typeof b.options.jsonPath?
3
- (e=b.options.jsonPath,f.getJSON(e,a)):b.logIn()},logIn:function(){this.$elem.data("owl-originalStyles",this.$elem.attr("style"));this.$elem.data("owl-originalClasses",this.$elem.attr("class"));this.$elem.css({opacity:0});this.orignalItems=this.options.items;this.checkBrowser();this.wrapperWidth=0;this.checkVisible=null;this.setVars()},setVars:function(){if(0===this.$elem.children().length)return!1;this.baseClass();this.eventTypes();this.$userItems=this.$elem.children();this.itemsAmount=this.$userItems.length;
4
- this.wrapItems();this.$owlItems=this.$elem.find(".owl-item");this.$owlWrapper=this.$elem.find(".owl-wrapper");this.playDirection="next";this.prevItem=0;this.prevArr=[0];this.currentItem=0;this.customEvents();this.onStartup()},onStartup:function(){this.updateItems();this.calculateAll();this.buildControls();this.updateControls();this.response();this.moveEvents();this.stopOnHover();this.owlStatus();!1!==this.options.transitionStyle&&this.transitionTypes(this.options.transitionStyle);!0===this.options.autoPlay&&
5
- (this.options.autoPlay=5E3);this.play();this.$elem.find(".owl-wrapper").css("display","block");this.$elem.is(":visible")?this.$elem.css("opacity",1):this.watchVisibility();this.onstartup=!1;this.eachMoveUpdate();"function"===typeof this.options.afterInit&&this.options.afterInit.apply(this,[this.$elem])},eachMoveUpdate:function(){!0===this.options.lazyLoad&&this.lazyLoad();!0===this.options.autoHeight&&this.autoHeight();this.onVisibleItems();"function"===typeof this.options.afterAction&&this.options.afterAction.apply(this,
6
- [this.$elem])},updateVars:function(){"function"===typeof this.options.beforeUpdate&&this.options.beforeUpdate.apply(this,[this.$elem]);this.watchVisibility();this.updateItems();this.calculateAll();this.updatePosition();this.updateControls();this.eachMoveUpdate();"function"===typeof this.options.afterUpdate&&this.options.afterUpdate.apply(this,[this.$elem])},reload:function(){var a=this;g.setTimeout(function(){a.updateVars()},0)},watchVisibility:function(){var a=this;if(!1===a.$elem.is(":visible"))a.$elem.css({opacity:0}),
7
- g.clearInterval(a.autoPlayInterval),g.clearInterval(a.checkVisible);else return!1;a.checkVisible=g.setInterval(function(){a.$elem.is(":visible")&&(a.reload(),a.$elem.animate({opacity:1},200),g.clearInterval(a.checkVisible))},500)},wrapItems:function(){this.$userItems.wrapAll('<div class="owl-wrapper">').wrap('<div class="owl-item"></div>');this.$elem.find(".owl-wrapper").wrap('<div class="owl-wrapper-outer">');this.wrapperOuter=this.$elem.find(".owl-wrapper-outer");this.$elem.css("display","block")},
8
- baseClass:function(){var a=this.$elem.hasClass(this.options.baseClass),b=this.$elem.hasClass(this.options.theme);a||this.$elem.addClass(this.options.baseClass);b||this.$elem.addClass(this.options.theme)},updateItems:function(){var a,b;if(!1===this.options.responsive)return!1;if(!0===this.options.singleItem)return this.options.items=this.orignalItems=1,this.options.itemsCustom=!1,this.options.itemsDesktop=!1,this.options.itemsDesktopSmall=!1,this.options.itemsTablet=!1,this.options.itemsTabletSmall=
9
- !1,this.options.itemsMobile=!1;a=f(this.options.responsiveBaseWidth).width();a>(this.options.itemsDesktop[0]||this.orignalItems)&&(this.options.items=this.orignalItems);if(!1!==this.options.itemsCustom)for(this.options.itemsCustom.sort(function(a,b){return a[0]-b[0]}),b=0;b<this.options.itemsCustom.length;b+=1)this.options.itemsCustom[b][0]<=a&&(this.options.items=this.options.itemsCustom[b][1]);else a<=this.options.itemsDesktop[0]&&!1!==this.options.itemsDesktop&&(this.options.items=this.options.itemsDesktop[1]),
10
- a<=this.options.itemsDesktopSmall[0]&&!1!==this.options.itemsDesktopSmall&&(this.options.items=this.options.itemsDesktopSmall[1]),a<=this.options.itemsTablet[0]&&!1!==this.options.itemsTablet&&(this.options.items=this.options.itemsTablet[1]),a<=this.options.itemsTabletSmall[0]&&!1!==this.options.itemsTabletSmall&&(this.options.items=this.options.itemsTabletSmall[1]),a<=this.options.itemsMobile[0]&&!1!==this.options.itemsMobile&&(this.options.items=this.options.itemsMobile[1]);this.options.items>this.itemsAmount&&
11
- !0===this.options.itemsScaleUp&&(this.options.items=this.itemsAmount)},response:function(){var a=this,b,e;if(!0!==a.options.responsive)return!1;e=f(g).width();a.resizer=function(){f(g).width()!==e&&(!1!==a.options.autoPlay&&g.clearInterval(a.autoPlayInterval),g.clearTimeout(b),b=g.setTimeout(function(){e=f(g).width();a.updateVars()},a.options.responsiveRefreshRate))};f(g).resize(a.resizer)},updatePosition:function(){this.jumpTo(this.currentItem);!1!==this.options.autoPlay&&this.checkAp()},appendItemsSizes:function(){var a=
12
- this,b=0,e=a.itemsAmount-a.options.items;a.$owlItems.each(function(c){var d=f(this);d.css({width:a.itemWidth}).data("owl-item",Number(c));if(0===c%a.options.items||c===e)c>e||(b+=1);d.data("owl-roundPages",b)})},appendWrapperSizes:function(){this.$owlWrapper.css({width:this.$owlItems.length*this.itemWidth*2,left:0});this.appendItemsSizes()},calculateAll:function(){this.calculateWidth();this.appendWrapperSizes();this.loops();this.max()},calculateWidth:function(){this.itemWidth=Math.round(this.$elem.width()/
13
- this.options.items)},max:function(){var a=-1*(this.itemsAmount*this.itemWidth-this.options.items*this.itemWidth);this.options.items>this.itemsAmount?this.maximumPixels=a=this.maximumItem=0:(this.maximumItem=this.itemsAmount-this.options.items,this.maximumPixels=a);return a},min:function(){return 0},loops:function(){var a=0,b=0,e,c;this.positionsInArray=[0];this.pagesInArray=[];for(e=0;e<this.itemsAmount;e+=1)b+=this.itemWidth,this.positionsInArray.push(-b),!0===this.options.scrollPerPage&&(c=f(this.$owlItems[e]),
14
- c=c.data("owl-roundPages"),c!==a&&(this.pagesInArray[a]=this.positionsInArray[e],a=c))},buildControls:function(){if(!0===this.options.navigation||!0===this.options.pagination)this.owlControls=f('<div class="owl-controls"/>').toggleClass("clickable",!this.browser.isTouch).appendTo(this.$elem);!0===this.options.pagination&&this.buildPagination();!0===this.options.navigation&&this.buildButtons()},buildButtons:function(){var a=this,b=f('<div class="owl-buttons"/>');a.owlControls.append(b);a.buttonPrev=
15
- f("<div/>",{"class":"owl-prev",html:a.options.navigationText[0]||""});a.buttonNext=f("<div/>",{"class":"owl-next",html:a.options.navigationText[1]||""});b.append(a.buttonPrev).append(a.buttonNext);b.on("touchstart.owlControls mousedown.owlControls",'div[class^="owl"]',function(a){a.preventDefault()});b.on("touchend.owlControls mouseup.owlControls",'div[class^="owl"]',function(b){b.preventDefault();f(this).hasClass("owl-next")?a.next():a.prev()})},buildPagination:function(){var a=this;a.paginationWrapper=
16
- f('<div class="owl-pagination"/>');a.owlControls.append(a.paginationWrapper);a.paginationWrapper.on("touchend.owlControls mouseup.owlControls",".owl-page",function(b){b.preventDefault();Number(f(this).data("owl-page"))!==a.currentItem&&a.goTo(Number(f(this).data("owl-page")),!0)})},updatePagination:function(){var a,b,e,c,d,g;if(!1===this.options.pagination)return!1;this.paginationWrapper.html("");a=0;b=this.itemsAmount-this.itemsAmount%this.options.items;for(c=0;c<this.itemsAmount;c+=1)0===c%this.options.items&&
17
- (a+=1,b===c&&(e=this.itemsAmount-this.options.items),d=f("<div/>",{"class":"owl-page"}),g=f("<span></span>",{text:!0===this.options.paginationNumbers?a:"","class":!0===this.options.paginationNumbers?"owl-numbers":""}),d.append(g),d.data("owl-page",b===c?e:c),d.data("owl-roundPages",a),this.paginationWrapper.append(d));this.checkPagination()},checkPagination:function(){var a=this;if(!1===a.options.pagination)return!1;a.paginationWrapper.find(".owl-page").each(function(){f(this).data("owl-roundPages")===
18
- f(a.$owlItems[a.currentItem]).data("owl-roundPages")&&(a.paginationWrapper.find(".owl-page").removeClass("active"),f(this).addClass("active"))})},checkNavigation:function(){if(!1===this.options.navigation)return!1;!1===this.options.rewindNav&&(0===this.currentItem&&0===this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.addClass("disabled")):0===this.currentItem&&0!==this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.removeClass("disabled")):this.currentItem===
19
- this.maximumItem?(this.buttonPrev.removeClass("disabled"),this.buttonNext.addClass("disabled")):0!==this.currentItem&&this.currentItem!==this.maximumItem&&(this.buttonPrev.removeClass("disabled"),this.buttonNext.removeClass("disabled")))},updateControls:function(){this.updatePagination();this.checkNavigation();this.owlControls&&(this.options.items>=this.itemsAmount?this.owlControls.hide():this.owlControls.show())},destroyControls:function(){this.owlControls&&this.owlControls.remove()},next:function(a){if(this.isTransition)return!1;
20
- this.currentItem+=!0===this.options.scrollPerPage?this.options.items:1;if(this.currentItem>this.maximumItem+(!0===this.options.scrollPerPage?this.options.items-1:0))if(!0===this.options.rewindNav)this.currentItem=0,a="rewind";else return this.currentItem=this.maximumItem,!1;this.goTo(this.currentItem,a)},prev:function(a){if(this.isTransition)return!1;this.currentItem=!0===this.options.scrollPerPage&&0<this.currentItem&&this.currentItem<this.options.items?0:this.currentItem-(!0===this.options.scrollPerPage?
21
- this.options.items:1);if(0>this.currentItem)if(!0===this.options.rewindNav)this.currentItem=this.maximumItem,a="rewind";else return this.currentItem=0,!1;this.goTo(this.currentItem,a)},goTo:function(a,b,e){var c=this;if(c.isTransition)return!1;"function"===typeof c.options.beforeMove&&c.options.beforeMove.apply(this,[c.$elem]);a>=c.maximumItem?a=c.maximumItem:0>=a&&(a=0);c.currentItem=c.owl.currentItem=a;if(!1!==c.options.transitionStyle&&"drag"!==e&&1===c.options.items&&!0===c.browser.support3d)return c.swapSpeed(0),
22
- !0===c.browser.support3d?c.transition3d(c.positionsInArray[a]):c.css2slide(c.positionsInArray[a],1),c.afterGo(),c.singleItemTransition(),!1;a=c.positionsInArray[a];!0===c.browser.support3d?(c.isCss3Finish=!1,!0===b?(c.swapSpeed("paginationSpeed"),g.setTimeout(function(){c.isCss3Finish=!0},c.options.paginationSpeed)):"rewind"===b?(c.swapSpeed(c.options.rewindSpeed),g.setTimeout(function(){c.isCss3Finish=!0},c.options.rewindSpeed)):(c.swapSpeed("slideSpeed"),g.setTimeout(function(){c.isCss3Finish=!0},
23
- c.options.slideSpeed)),c.transition3d(a)):!0===b?c.css2slide(a,c.options.paginationSpeed):"rewind"===b?c.css2slide(a,c.options.rewindSpeed):c.css2slide(a,c.options.slideSpeed);c.afterGo()},jumpTo:function(a){"function"===typeof this.options.beforeMove&&this.options.beforeMove.apply(this,[this.$elem]);a>=this.maximumItem||-1===a?a=this.maximumItem:0>=a&&(a=0);this.swapSpeed(0);!0===this.browser.support3d?this.transition3d(this.positionsInArray[a]):this.css2slide(this.positionsInArray[a],1);this.currentItem=
24
- this.owl.currentItem=a;this.afterGo()},afterGo:function(){this.prevArr.push(this.currentItem);this.prevItem=this.owl.prevItem=this.prevArr[this.prevArr.length-2];this.prevArr.shift(0);this.prevItem!==this.currentItem&&(this.checkPagination(),this.checkNavigation(),this.eachMoveUpdate(),!1!==this.options.autoPlay&&this.checkAp());"function"===typeof this.options.afterMove&&this.prevItem!==this.currentItem&&this.options.afterMove.apply(this,[this.$elem])},stop:function(){this.apStatus="stop";g.clearInterval(this.autoPlayInterval)},
25
- checkAp:function(){"stop"!==this.apStatus&&this.play()},play:function(){var a=this;a.apStatus="play";if(!1===a.options.autoPlay)return!1;g.clearInterval(a.autoPlayInterval);a.autoPlayInterval=g.setInterval(function(){a.next(!0)},a.options.autoPlay)},swapSpeed:function(a){"slideSpeed"===a?this.$owlWrapper.css(this.addCssSpeed(this.options.slideSpeed)):"paginationSpeed"===a?this.$owlWrapper.css(this.addCssSpeed(this.options.paginationSpeed)):"string"!==typeof a&&this.$owlWrapper.css(this.addCssSpeed(a))},
26
- addCssSpeed:function(a){return{"-webkit-transition":"all "+a+"ms ease","-moz-transition":"all "+a+"ms ease","-o-transition":"all "+a+"ms ease",transition:"all "+a+"ms ease"}},removeTransition:function(){return{"-webkit-transition":"","-moz-transition":"","-o-transition":"",transition:""}},doTranslate:function(a){return{"-webkit-transform":"translate3d("+a+"px, 0px, 0px)","-moz-transform":"translate3d("+a+"px, 0px, 0px)","-o-transform":"translate3d("+a+"px, 0px, 0px)","-ms-transform":"translate3d("+
27
- a+"px, 0px, 0px)",transform:"translate3d("+a+"px, 0px,0px)"}},transition3d:function(a){this.$owlWrapper.css(this.doTranslate(a))},css2move:function(a){this.$owlWrapper.css({left:a})},css2slide:function(a,b){var e=this;e.isCssFinish=!1;e.$owlWrapper.stop(!0,!0).animate({left:a},{duration:b||e.options.slideSpeed,complete:function(){e.isCssFinish=!0}})},checkBrowser:function(){var a=k.createElement("div");a.style.cssText=" -moz-transform:translate3d(0px, 0px, 0px); -ms-transform:translate3d(0px, 0px, 0px); -o-transform:translate3d(0px, 0px, 0px); -webkit-transform:translate3d(0px, 0px, 0px); transform:translate3d(0px, 0px, 0px)";
28
- a=a.style.cssText.match(/translate3d\(0px, 0px, 0px\)/g);this.browser={support3d:null!==a&&1===a.length,isTouch:"ontouchstart"in g||g.navigator.msMaxTouchPoints}},moveEvents:function(){if(!1!==this.options.mouseDrag||!1!==this.options.touchDrag)this.gestures(),this.disabledEvents()},eventTypes:function(){var a=["s","e","x"];this.ev_types={};!0===this.options.mouseDrag&&!0===this.options.touchDrag?a=["touchstart.owl mousedown.owl","touchmove.owl mousemove.owl","touchend.owl touchcancel.owl mouseup.owl"]:
29
- !1===this.options.mouseDrag&&!0===this.options.touchDrag?a=["touchstart.owl","touchmove.owl","touchend.owl touchcancel.owl"]:!0===this.options.mouseDrag&&!1===this.options.touchDrag&&(a=["mousedown.owl","mousemove.owl","mouseup.owl"]);this.ev_types.start=a[0];this.ev_types.move=a[1];this.ev_types.end=a[2]},disabledEvents:function(){this.$elem.on("dragstart.owl",function(a){a.preventDefault()});this.$elem.on("mousedown.disableTextSelect",function(a){return f(a.target).is("input, textarea, select, option")})},
30
- gestures:function(){function a(a){if(void 0!==a.touches)return{x:a.touches[0].pageX,y:a.touches[0].pageY};if(void 0===a.touches){if(void 0!==a.pageX)return{x:a.pageX,y:a.pageY};if(void 0===a.pageX)return{x:a.clientX,y:a.clientY}}}function b(a){"on"===a?(f(k).on(d.ev_types.move,e),f(k).on(d.ev_types.end,c)):"off"===a&&(f(k).off(d.ev_types.move),f(k).off(d.ev_types.end))}function e(b){b=b.originalEvent||b||g.event;d.newPosX=a(b).x-h.offsetX;d.newPosY=a(b).y-h.offsetY;d.newRelativeX=d.newPosX-h.relativePos;
31
- "function"===typeof d.options.startDragging&&!0!==h.dragging&&0!==d.newRelativeX&&(h.dragging=!0,d.options.startDragging.apply(d,[d.$elem]));(8<d.newRelativeX||-8>d.newRelativeX)&&!0===d.browser.isTouch&&(void 0!==b.preventDefault?b.preventDefault():b.returnValue=!1,h.sliding=!0);(10<d.newPosY||-10>d.newPosY)&&!1===h.sliding&&f(k).off("touchmove.owl");d.newPosX=Math.max(Math.min(d.newPosX,d.newRelativeX/5),d.maximumPixels+d.newRelativeX/5);!0===d.browser.support3d?d.transition3d(d.newPosX):d.css2move(d.newPosX)}
32
- function c(a){a=a.originalEvent||a||g.event;var c;a.target=a.target||a.srcElement;h.dragging=!1;!0!==d.browser.isTouch&&d.$owlWrapper.removeClass("grabbing");d.dragDirection=0>d.newRelativeX?d.owl.dragDirection="left":d.owl.dragDirection="right";0!==d.newRelativeX&&(c=d.getNewPosition(),d.goTo(c,!1,"drag"),h.targetElement===a.target&&!0!==d.browser.isTouch&&(f(a.target).on("click.disable",function(a){a.stopImmediatePropagation();a.stopPropagation();a.preventDefault();f(a.target).off("click.disable")}),
33
- a=f._data(a.target,"events").click,c=a.pop(),a.splice(0,0,c)));b("off")}var d=this,h={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};d.isCssFinish=!0;d.$elem.on(d.ev_types.start,".owl-wrapper",function(c){c=c.originalEvent||c||g.event;var e;if(3===c.which)return!1;if(!(d.itemsAmount<=d.options.items)){if(!1===d.isCssFinish&&!d.options.dragBeforeAnimFinish||!1===d.isCss3Finish&&!d.options.dragBeforeAnimFinish)return!1;
34
- !1!==d.options.autoPlay&&g.clearInterval(d.autoPlayInterval);!0===d.browser.isTouch||d.$owlWrapper.hasClass("grabbing")||d.$owlWrapper.addClass("grabbing");d.newPosX=0;d.newRelativeX=0;f(this).css(d.removeTransition());e=f(this).position();h.relativePos=e.left;h.offsetX=a(c).x-e.left;h.offsetY=a(c).y-e.top;b("on");h.sliding=!1;h.targetElement=c.target||c.srcElement}})},getNewPosition:function(){var a=this.closestItem();a>this.maximumItem?a=this.currentItem=this.maximumItem:0<=this.newPosX&&(this.currentItem=
35
- a=0);return a},closestItem:function(){var a=this,b=!0===a.options.scrollPerPage?a.pagesInArray:a.positionsInArray,e=a.newPosX,c=null;f.each(b,function(d,g){e-a.itemWidth/20>b[d+1]&&e-a.itemWidth/20<g&&"left"===a.moveDirection()?(c=g,a.currentItem=!0===a.options.scrollPerPage?f.inArray(c,a.positionsInArray):d):e+a.itemWidth/20<g&&e+a.itemWidth/20>(b[d+1]||b[d]-a.itemWidth)&&"right"===a.moveDirection()&&(!0===a.options.scrollPerPage?(c=b[d+1]||b[b.length-1],a.currentItem=f.inArray(c,a.positionsInArray)):
36
- (c=b[d+1],a.currentItem=d+1))});return a.currentItem},moveDirection:function(){var a;0>this.newRelativeX?(a="right",this.playDirection="next"):(a="left",this.playDirection="prev");return a},customEvents:function(){var a=this;a.$elem.on("owl.next",function(){a.next()});a.$elem.on("owl.prev",function(){a.prev()});a.$elem.on("owl.play",function(b,e){a.options.autoPlay=e;a.play();a.hoverStatus="play"});a.$elem.on("owl.stop",function(){a.stop();a.hoverStatus="stop"});a.$elem.on("owl.goTo",function(b,e){a.goTo(e)});
37
- a.$elem.on("owl.jumpTo",function(b,e){a.jumpTo(e)})},stopOnHover:function(){var a=this;!0===a.options.stopOnHover&&!0!==a.browser.isTouch&&!1!==a.options.autoPlay&&(a.$elem.on("mouseover",function(){a.stop()}),a.$elem.on("mouseout",function(){"stop"!==a.hoverStatus&&a.play()}))},lazyLoad:function(){var a,b,e,c,d;if(!1===this.options.lazyLoad)return!1;for(a=0;a<this.itemsAmount;a+=1)b=f(this.$owlItems[a]),"loaded"!==b.data("owl-loaded")&&(e=b.data("owl-item"),c=b.find(".lazyOwl"),"string"!==typeof c.data("src")?
38
- b.data("owl-loaded","loaded"):(void 0===b.data("owl-loaded")&&(c.hide(),b.addClass("loading").data("owl-loaded","checked")),(d=!0===this.options.lazyFollow?e>=this.currentItem:!0)&&e<this.currentItem+this.options.items&&c.length&&this.lazyPreload(b,c)))},lazyPreload:function(a,b){function e(){a.data("owl-loaded","loaded").removeClass("loading");b.removeAttr("data-src");"fade"===d.options.lazyEffect?b.fadeIn(400):b.show();"function"===typeof d.options.afterLazyLoad&&d.options.afterLazyLoad.apply(this,
39
- [d.$elem])}function c(){f+=1;d.completeImg(b.get(0))||!0===k?e():100>=f?g.setTimeout(c,100):e()}var d=this,f=0,k;"DIV"===b.prop("tagName")?(b.css("background-image","url("+b.data("src")+")"),k=!0):b[0].src=b.data("src");c()},autoHeight:function(){function a(){var a=f(e.$owlItems[e.currentItem]).height();e.wrapperOuter.css("height",a+"px");e.wrapperOuter.hasClass("autoHeight")||g.setTimeout(function(){e.wrapperOuter.addClass("autoHeight")},0)}function b(){d+=1;e.completeImg(c.get(0))?a():100>=d?g.setTimeout(b,
40
- 100):e.wrapperOuter.css("height","")}var e=this,c=f(e.$owlItems[e.currentItem]).find("img"),d;void 0!==c.get(0)?(d=0,b()):a()},completeImg:function(a){return!a.complete||"undefined"!==typeof a.naturalWidth&&0===a.naturalWidth?!1:!0},onVisibleItems:function(){var a;!0===this.options.addClassActive&&this.$owlItems.removeClass("active");this.visibleItems=[];for(a=this.currentItem;a<this.currentItem+this.options.items;a+=1)this.visibleItems.push(a),!0===this.options.addClassActive&&f(this.$owlItems[a]).addClass("active");
41
- this.owl.visibleItems=this.visibleItems},transitionTypes:function(a){this.outClass="owl-"+a+"-out";this.inClass="owl-"+a+"-in"},singleItemTransition:function(){var a=this,b=a.outClass,e=a.inClass,c=a.$owlItems.eq(a.currentItem),d=a.$owlItems.eq(a.prevItem),f=Math.abs(a.positionsInArray[a.currentItem])+a.positionsInArray[a.prevItem],g=Math.abs(a.positionsInArray[a.currentItem])+a.itemWidth/2;a.isTransition=!0;a.$owlWrapper.addClass("owl-origin").css({"-webkit-transform-origin":g+"px","-moz-perspective-origin":g+
42
- "px","perspective-origin":g+"px"});d.css({position:"relative",left:f+"px"}).addClass(b).on("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend",function(){a.endPrev=!0;d.off("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend");a.clearTransStyle(d,b)});c.addClass(e).on("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend",function(){a.endCurrent=!0;c.off("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend");a.clearTransStyle(c,e)})},clearTransStyle:function(a,
43
- b){a.css({position:"",left:""}).removeClass(b);this.endPrev&&this.endCurrent&&(this.$owlWrapper.removeClass("owl-origin"),this.isTransition=this.endCurrent=this.endPrev=!1)},owlStatus:function(){this.owl={userOptions:this.userOptions,baseElement:this.$elem,userItems:this.$userItems,owlItems:this.$owlItems,currentItem:this.currentItem,prevItem:this.prevItem,visibleItems:this.visibleItems,isTouch:this.browser.isTouch,browser:this.browser,dragDirection:this.dragDirection}},clearEvents:function(){this.$elem.off(".owl owl mousedown.disableTextSelect");
44
- f(k).off(".owl owl");f(g).off("resize",this.resizer)},unWrap:function(){0!==this.$elem.children().length&&(this.$owlWrapper.unwrap(),this.$userItems.unwrap().unwrap(),this.owlControls&&this.owlControls.remove());this.clearEvents();this.$elem.attr("style",this.$elem.data("owl-originalStyles")||"").attr("class",this.$elem.data("owl-originalClasses"))},destroy:function(){this.stop();g.clearInterval(this.checkVisible);this.unWrap();this.$elem.removeData()},reinit:function(a){a=f.extend({},this.userOptions,
45
- a);this.unWrap();this.init(a,this.$elem)},addItem:function(a,b){var e;if(!a)return!1;if(0===this.$elem.children().length)return this.$elem.append(a),this.setVars(),!1;this.unWrap();e=void 0===b||-1===b?-1:b;e>=this.$userItems.length||-1===e?this.$userItems.eq(-1).after(a):this.$userItems.eq(e).before(a);this.setVars()},removeItem:function(a){if(0===this.$elem.children().length)return!1;a=void 0===a||-1===a?-1:a;this.unWrap();this.$userItems.eq(a).remove();this.setVars()}};f.fn.owlCarousel=function(a){return this.each(function(){if(!0===
46
- f(this).data("owl-init"))return!1;f(this).data("owl-init",!0);var b=Object.create(l);b.init(a,this);f.data(this,"owlCarousel",b)})};f.fn.owlCarousel.options={items:5,itemsCustom:!1,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,2],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!1,itemsScaleUp:!1,slideSpeed:200,paginationSpeed:800,rewindSpeed:1E3,autoPlay:!1,stopOnHover:!1,navigation:!1,navigationText:["prev","next"],rewindNav:!0,scrollPerPage:!1,pagination:!0,paginationNumbers:!1,
47
- responsive:!0,responsiveRefreshRate:200,responsiveBaseWidth:g,baseClass:"owl-carousel",theme:"owl-theme",lazyLoad:!1,lazyFollow:!0,lazyEffect:"fade",autoHeight:!1,jsonPath:!1,jsonSuccess:!1,dragBeforeAnimFinish:!0,mouseDrag:!0,touchDrag:!0,addClassActive:!1,transitionStyle:!1,beforeUpdate:!1,afterUpdate:!1,beforeInit:!1,afterInit:!1,beforeMove:!1,afterMove:!1,afterAction:!1,startDragging:!1,afterLazyLoad:!1}})(jQuery,window,document);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
class/metabox.php ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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' ), array(
54
+ $this,
55
+ '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
+ /**
74
+ * Save Generator Meta Box
75
+ *
76
+ * @param $post_id
77
+ */
78
+ public function save_meta_box( $post_id ) {
79
+
80
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
81
+ return;
82
+ }
83
+
84
+ // Check if nonce is set
85
+ if ( ! isset( $_POST['sp_tfree_shortcodes_nonce_name'], $_POST['sp_tfree_meta_box'] ) ) {
86
+ return;
87
+ }
88
+ // Check if nonce is valid.
89
+ if ( ! wp_verify_nonce( $_POST['sp_tfree_shortcodes_nonce_name'], 'sp_tfree_shortcodes_nonce_action' ) ) {
90
+ return;
91
+ }
92
+
93
+
94
+ // Check if user has permissions to save data
95
+ if ( ! current_user_can( 'edit_post', $post_id ) ) {
96
+ return;
97
+ }
98
+
99
+ foreach ( $_POST['sp_tfree_meta_box'] as $key => $val ) {
100
+ if ( is_array( $val ) ) {
101
+ $val = implode( ',', $val );
102
+ }
103
+
104
+ update_post_meta( $post_id, $key, sanitize_text_field( $val ) );
105
+ }
106
+
107
+ }
108
+
109
+ }
class/metaboxform.php ADDED
@@ -0,0 +1,415 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 {
12
+
13
+ /**
14
+ * @var SP_TFREE_Router single instance of the class
15
+ *
16
+ * @since 2.0
17
+ */
18
+ protected static $_instance = null;
19
+
20
+
21
+ /**
22
+ * Main SP_TFREE_Router Instance
23
+ *
24
+ * @since 2.0
25
+ * @static
26
+ * @return self Main instance
27
+ */
28
+ public static function instance() {
29
+ if ( is_null( self::$_instance ) ) {
30
+ self::$_instance = new self();
31
+ }
32
+
33
+ return self::$_instance;
34
+ }
35
+
36
+ /**
37
+ * Include the required files
38
+ *
39
+ * @since 1.0
40
+ * @return void
41
+ */
42
+ function includes() {
43
+ include_once SP_TFREE_PATH . 'includes/free/loader.php';
44
+ }
45
+
46
+ /**
47
+ * function
48
+ *
49
+ * @since 1.0
50
+ * @return void
51
+ */
52
+ function sp_tfree_function() {
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
+ }
class/shortcodes.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This is to register the shortcode post type.
4
+ * @package testimonial-free
5
+ */
6
+
7
+ if ( ! defined( 'ABSPATH' ) ) {
8
+ exit; // Exit if accessed directly
9
+ }
10
+
11
+ class SP_TFREE_Shortcodes {
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
+ * Register the class with the WordPress API
23
+ *
24
+ * @since 2.0
25
+ */
26
+ public function __construct() {
27
+ add_filter('init', array($this, 'register_post_type'));
28
+ }
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() {
35
+ if ( ! self::$_instance ) {
36
+ self::$_instance = new self();
37
+ }
38
+
39
+ return self::$_instance;
40
+ }
41
+
42
+ /**
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
+ }
class/testimonial.php ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ 'show_ui' => true,
46
+ 'show_in_menu' => true,
47
+ 'menu_icon' => SP_TFREE_URL . '/admin/assets/images/icon-32.png',
48
+ 'show_in_nav_menus' => true,
49
+ 'show_in_admin_bar' => true,
50
+ 'hierarchical' => false,
51
+ 'query_var' => true,
52
+ 'menu_position' => 20,
53
+ 'supports' => array(
54
+ 'title',
55
+ 'editor',
56
+ 'thumbnail'
57
+ ),
58
+ 'capability_type' => 'post',
59
+ 'labels' => array(
60
+ 'name' => __( 'Testimonials', 'testimonial-free' ),
61
+ 'singular_name' => __( 'Testimonial', 'testimonial-free' ),
62
+ 'menu_name' => __( 'Testimonial', 'testimonial-free' ),
63
+ 'all_items' => __( 'Testimonials', 'testimonial-free' ),
64
+ 'add_new' => __( 'Add Testimonial', 'testimonial-free' ),
65
+ 'add_new_item' => __( 'Add Testimonial', 'testimonial-free' ),
66
+ 'edit' => __( 'Edit', 'testimonial-free' ),
67
+ 'edit_item' => __( 'Edit Testimonial', 'testimonial-free' ),
68
+ 'new_item' => __( 'New Testimonial', 'testimonial-free' ),
69
+ 'search_items' => __( 'Search Testimonials', 'testimonial-free' ),
70
+ 'not_found' => __( 'No Testimonials found', 'testimonial-free' ),
71
+ 'not_found_in_trash' => __( 'No Testimonials found in Trash', 'testimonial-free' ),
72
+ 'parent' => __( 'Parent Testimonials', 'testimonial-free' ),
73
+ 'featured_image' => __( 'Featured Image for Testimonial', 'testimonial-free' ),
74
+ 'set_featured_image' => __( 'Set Testimonial Thumbnail', 'testimonial-free' ),
75
+ 'remove_featured_image' => __( 'Remove image', 'testimonial-free' ),
76
+ 'use_featured_image' => __( 'Use as image', 'testimonial-free' ),
77
+ )
78
+ ) );
79
+ }
80
+
81
+ }
inc/functions.php DELETED
@@ -1,91 +0,0 @@
1
- <?php
2
-
3
- // Post thumbnails
4
- add_theme_support( 'post-thumbnails' );
5
- add_image_size( 'tf-client-image-size', 100, 100, true );
6
-
7
-
8
- /* Load plugin textDomain. */
9
- function sp_testimonial_free_load_text_domain() {
10
- load_plugin_textdomain( 'testimonial-free', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' );
11
- }
12
- add_action( 'plugins_loaded', 'sp_testimonial_free_load_text_domain' );
13
-
14
-
15
- function testimonial_free_register_post_type() {
16
-
17
- $labels = array(
18
- 'name' => esc_html__( 'Testimonials', 'testimonial-free' ),
19
- 'singular_name' => esc_html__( 'Testimonial', 'testimonial-free' ),
20
- 'add_new' => esc_html__( 'Add New Testimonial', 'testimonial-free' ),
21
- 'add_new_item' => esc_html__( 'Add New Testimonial', 'testimonial-free' ),
22
- 'edit_item' => esc_html__( 'Edit Testimonial', 'testimonial-free' ),
23
- 'new_item' => esc_html__( 'New Testimonial', 'testimonial-free' ),
24
- 'view_item' => esc_html__( 'View Testimonial', 'testimonial-free' ),
25
- 'search_items' => esc_html__( 'Search Testimonials', 'testimonial-free' ),
26
- 'not_found' => esc_html__( 'No Testimonials found', 'testimonial-free' ),
27
- 'not_found_in_trash' => esc_html__( 'No Testimonials found in Trash', 'testimonial-free' ),
28
- 'parent_item_colon' => esc_html__( 'Parent Testimonial:', 'testimonial-free' ),
29
- 'menu_name' => esc_html__( 'Testimonials', 'testimonial-free' ),
30
- );
31
-
32
- $args = array(
33
- 'labels' => $labels,
34
- 'hierarchical' => false,
35
- 'description' => 'description',
36
- 'taxonomies' => array(),
37
- 'public' => true,
38
- 'show_ui' => true,
39
- 'show_in_menu' => true,
40
- 'show_in_admin_bar' => true,
41
- 'menu_position' => null,
42
- 'menu_icon' => 'dashicons-format-quote',
43
- 'show_in_nav_menus' => true,
44
- 'publicly_queryable' => false,
45
- 'exclude_from_search' => false,
46
- 'has_archive' => true,
47
- 'query_var' => true,
48
- 'can_export' => true,
49
- 'rewrite' => true,
50
- 'capability_type' => 'post',
51
- 'supports' => array(
52
- 'title',
53
- 'editor',
54
- 'thumbnail',
55
- 'page-attributes'
56
- )
57
- );
58
-
59
- register_post_type( 'testimonial-free', $args );
60
- }
61
-
62
- add_action( 'init', 'testimonial_free_register_post_type' );
63
-
64
-
65
- // Change title placeholder
66
- function sp_testimonial_free_change_default_title($title) {
67
- $screen = get_current_screen();
68
- if('testimonial-free' == $screen->post_type) {
69
- $title = esc_html__('Type client name here', 'testimonial-free');
70
- }
71
- return $title;
72
- }
73
- add_filter('enter_title_here','sp_testimonial_free_change_default_title');
74
-
75
-
76
- // show shortcode
77
- add_filter( 'views_edit-testimonial-free', function ( $view_shortcode ) {
78
- echo '<p>Shortcode <input style="background: #ffffff;width: 245px;padding: 6px;" type="text" onClick="this.select();"
79
- value="[testimonial-free color=&#34;#52b3d9&#34; nav=&#34;true&#34; pagination=&#34;true&#34;]" /></p>';
80
-
81
- return $view_shortcode;
82
- } );
83
-
84
-
85
- /* Including files */
86
- if(file_exists( SP_TF_PATH . 'inc/options/meta-box.php')){
87
- require_once(SP_TF_PATH . "inc/options/meta-box.php");
88
- }
89
- if(file_exists( SP_TF_PATH . 'inc/shortcodes.php')){
90
- require_once(SP_TF_PATH . "inc/shortcodes.php");
91
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/options/meta-box.php DELETED
@@ -1,47 +0,0 @@
1
- <?php
2
-
3
- function sp_testimonial_free_meta_box() {
4
- add_meta_box( 'sp_testimonial_free_meta_box_section', esc_html__('Testimonial Options', 'testimonial-free'),
5
- 'display_sp_testimonial_free_meta_box',
6
- 'testimonial-free', 'normal', 'high'
7
- );
8
- }
9
- add_action( 'admin_init', 'sp_testimonial_free_meta_box' );
10
-
11
-
12
- function display_sp_testimonial_free_meta_box( $client_designation) {
13
- //
14
- $tf_designation = esc_html( get_post_meta( $client_designation->ID, 'tf_designation', true ) );
15
-
16
- ?>
17
- <div class="sp-meta-box-framework">
18
-
19
- <div class="sp-mb-element sp-mb-field-text">
20
- <div class="sp-mb-title">
21
- <label for="tf_client_designation"><?php esc_html_e('Designation:', 'testimonial-free') ?></label>
22
- <p class="sp-mb-desc"><?php esc_html_e('Type client designation here.', 'testimonial-free') ?></p>
23
- </div>
24
- <div class="sp-mb-field-set">
25
- <input type="text" id="tf_client_designation" name="tf_client_designation" value="<?php echo esc_html($tf_designation); ?>"/>
26
- </div>
27
- <div class="clear"></div>
28
- </div>
29
-
30
- </div>
31
-
32
- <?php
33
- }
34
-
35
-
36
- function add_sp_testimonial_free_fields( $client_designation_id, $client_designation) {
37
-
38
- if ( $client_designation->post_type == 'testimonial-free' ) {
39
- // Store data in post meta table if present in post data
40
- $tf_client_designation = sanitize_text_field($_POST['tf_client_designation']);
41
-
42
- if ( isset($tf_client_designation ) ) {
43
- update_post_meta( $client_designation_id, 'tf_designation', $tf_client_designation );
44
- }
45
- }
46
- }
47
- add_action( 'save_post', 'add_sp_testimonial_free_fields', 10, 2 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/scripts.php DELETED
@@ -1,28 +0,0 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
-
5
- /*** Plugin Scripts and CSS ***/
6
- if (!function_exists('sp_tf_scripts_and_style')) {
7
- function sp_tf_scripts_and_style(){
8
- // CSS Files
9
- wp_enqueue_style('owl-carousel-css', SP_TF_URL . 'assets/css/owl.carousel.css', array(), NULL);
10
- wp_enqueue_style( 'font-awesome-css', SP_TF_URL . 'assets/css/font-awesome.min.css', array(), NULL );
11
- wp_enqueue_style('tf-style', SP_TF_URL . 'assets/css/style.css');
12
-
13
- //JS Files
14
- wp_enqueue_script( 'owl-carousel-min-js', SP_TF_URL . 'assets/js/owl.carousel.min.js', array('jquery'), NULL, TRUE );
15
- wp_enqueue_script( 'jquery-masonry', array('jquery'), NULL, TRUE );
16
- }
17
- add_action('wp_enqueue_scripts', 'sp_tf_scripts_and_style');
18
- }
19
-
20
- /*** Plugin admin Scripts and CSS ***/
21
- if(is_admin()) {
22
- function sp_tf_admin_scripts_and_style() {
23
- // CSS Files
24
- wp_enqueue_style('tf-admin-style', SP_TF_URL . 'assets/css/admin-style.css', array(), NULL);
25
-
26
- }
27
- add_action('admin_footer', 'sp_tf_admin_scripts_and_style');
28
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/free/loader.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The Free Loader Class
4
+ * @package testimonial-free
5
+ * @since 2.0
6
+ */
7
+ class SP_TFREE_Loader {
8
+
9
+ function __construct() {
10
+ require_once( SP_TFREE_PATH . "admin/views/scripts.php" );
11
+ require_once( SP_TFREE_PATH . "admin/views/mce-button.php" );
12
+ require_once( SP_TFREE_PATH . "admin/views/widget.php" );
13
+ require_once( SP_TFREE_PATH . "public/views/shortcoderender.php" );
14
+ require_once( SP_TFREE_PATH . "public/views/deprecated-shortcodes.php" );
15
+ require_once( SP_TFREE_PATH . "public/views/scripts.php" );
16
+ }
17
+
18
+ }
19
+
20
+ new SP_TFREE_Loader();
includes/functions.php ADDED
@@ -0,0 +1,345 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ } // if direct access
5
+
6
+ /**
7
+ * Functions
8
+ */
9
+ class SP_Testimonial_Free_Functions {
10
+
11
+ /**
12
+ * Initialize the class
13
+ */
14
+ public function __construct() {
15
+ add_filter( 'post_updated_messages', array( $this, 'sp_tfree_change_default_post_update_message' ) );
16
+ add_filter( 'admin_footer_text', array( $this, 'admin_footer' ), 1, 2 );
17
+ add_action( 'admin_menu', array( $this, 'admin_menu' ) );
18
+ // Post thumbnails
19
+ add_theme_support( 'post-thumbnails' );
20
+ add_image_size( 'tf-client-image-size', 120, 120, true );
21
+ }
22
+
23
+ /**
24
+ * Post update messages for Shortcode Generator
25
+ */
26
+ function sp_tfree_change_default_post_update_message( $message ) {
27
+ $screen = get_current_screen();
28
+ if ( 'sp_tfree_shortcodes' == $screen->post_type ) {
29
+ $message['post'][1] = $title = esc_html__( 'Shortcode updated.', 'testimonial-free' );
30
+ $message['post'][4] = $title = esc_html__( 'Shortcode updated.', 'testimonial-free' );
31
+ $message['post'][6] = $title = esc_html__( 'Shortcode published.', 'testimonial-free' );
32
+ $message['post'][8] = $title = esc_html__( 'Shortcode submitted.', 'testimonial-free' );
33
+ $message['post'][10] = $title = esc_html__( 'Shortcode draft updated.', 'testimonial-free' );
34
+ }elseif ( 'spt_testimonial' == $screen->post_type ) {
35
+ $message['post'][1] = $title = esc_html__( 'Testimonial updated.', 'testimonial-free' );
36
+ $message['post'][4] = $title = esc_html__( 'Testimonial updated.', 'testimonial-free' );
37
+ $message['post'][6] = $title = esc_html__( 'Testimonial published.', 'testimonial-free' );
38
+ $message['post'][8] = $title = esc_html__( 'Testimonial submitted.', 'testimonial-free' );
39
+ $message['post'][10] = $title = esc_html__( 'Testimonial draft updated.', 'testimonial-free' );
40
+ }
41
+
42
+ return $message;
43
+ }
44
+
45
+ /**
46
+ * Review Text
47
+ *
48
+ * @param $text
49
+ *
50
+ * @return string
51
+ */
52
+ public function admin_footer( $text ) {
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;
61
+ }
62
+
63
+ /**
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://wordpress.org/support/plugin/testimonial-free" 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>
128
+ <p>Understanding long-shortcodes attributes are very painful. Testimonial Pro comes with built-in Shortcode Generator to control easily the look and function of the Testimonials showcase. Customize your experience with Shortcode Generator.</p>
129
+ </div>
130
+ </div>
131
+ <div class="col">
132
+ <div class="sp-tfree-feature">
133
+ <h3><span class="dashicons dashicons-yes"></span>Easy To Use–No Coding Required</h3>
134
+ <p>Testimonial Pro is very easy to use for anyone who is familiar with WordPress. After installing Testimonials Pro, it will add a powerful, easy to use Testimonial menu on your WordPress dashboard. You’ll be able to manage it and showcase your testimonials easily!</p>
135
+ </div>
136
+ </div>
137
+ <div class="col">
138
+ <div class="sp-tfree-feature">
139
+ <h3><span class="dashicons dashicons-yes"></span>Slider, Grid, Masonry, List, & Filter Layouts</h3>
140
+ <p>You can select from 5 beautiful testimonial layouts: Slider, Grid, Masonry, List, & Filter. Creating a customized layout is super easy. You can change the number of layout columns, reviewer info to show, font, & color etc.</p>
141
+ </div>
142
+ </div>
143
+ <div class="col">
144
+ <div class="sp-tfree-feature">
145
+ <h3><span class="dashicons dashicons-yes"></span>10+ Professional Themes</h3>
146
+ <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>
147
+ </div>
148
+ </div>
149
+ <div class="col">
150
+ <div class="sp-tfree-feature">
151
+ <h3><span class="dashicons dashicons-yes"></span>840+ Google Fonts</h3>
152
+ <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>
153
+ </div>
154
+ </div>
155
+ <div class="col">
156
+ <div class="sp-tfree-feature">
157
+ <h3><span class="dashicons dashicons-yes"></span>100+ Visual Customisation Options</h3>
158
+ <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.</p>
159
+ </div>
160
+ </div>
161
+ <div class="col">
162
+ <div class="sp-tfree-feature">
163
+ <h3><span class="dashicons dashicons-yes"></span>14 Display Options</h3>
164
+ <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>
165
+ </div>
166
+ </div>
167
+ <div class="col">
168
+ <div class="sp-tfree-feature">
169
+ <h3><span class="dashicons dashicons-yes"></span>Highly Customizable</h3>
170
+ <p>Testimonial Pro is extremely customizable with plenty of amazing options. From layouts to fonts to unlimited color options, themes are carefully made with easy customization in mind, effortlessly!</p>
171
+ </div>
172
+ </div>
173
+ <div class="col">
174
+ <div class="sp-tfree-feature">
175
+ <h3><span class="dashicons dashicons-yes"></span>Drag & Drop Re-Ordering!</h3>
176
+ <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>
177
+ </div>
178
+ </div>
179
+ <div class="col">
180
+ <div class="sp-tfree-feature">
181
+ <h3><span class="dashicons dashicons-yes"></span>Showcase by Specific Category</h3>
182
+ <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>
183
+ </div>
184
+ </div>
185
+ <div class="col">
186
+ <div class="sp-tfree-feature">
187
+ <h3><span class="dashicons dashicons-yes"></span>Display Specific Testimonials</h3>
188
+ <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>
189
+ </div>
190
+ </div>
191
+ <div class="col">
192
+ <div class="sp-tfree-feature">
193
+ <h3><span class="dashicons dashicons-yes"></span>Front-end Submission Form</h3>
194
+ <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>
195
+ </div>
196
+ </div>
197
+ <div class="col">
198
+ <div class="sp-tfree-feature">
199
+ <h3><span class="dashicons dashicons-yes"></span>Front-end Form Fields Control</h3>
200
+ <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.</p>
201
+ </div>
202
+ </div>
203
+ <div class="col">
204
+ <div class="sp-tfree-feature">
205
+ <h3><span class="dashicons dashicons-yes"></span>Thumbnail Slider</h3>
206
+ <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>
207
+ </div>
208
+ </div>
209
+ <div class="col">
210
+ <div class="sp-tfree-feature">
211
+ <h3><span class="dashicons dashicons-yes"></span>Video Testimonial & Lightbox</h3>
212
+ <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>
213
+ </div>
214
+ </div>
215
+ <div class="col">
216
+ <div class="sp-tfree-feature">
217
+ <h3><span class="dashicons dashicons-yes"></span>Read More & Characters Limit</h3>
218
+ <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>
219
+ </div>
220
+ </div>
221
+ <div class="col">
222
+ <div class="sp-tfree-feature">
223
+ <h3><span class="dashicons dashicons-yes"></span>Read More Action Type (Expand/PopUp)</h3>
224
+ <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>
225
+ </div>
226
+ </div>
227
+ <div class="col">
228
+ <div class="sp-tfree-feature">
229
+ <h3><span class="dashicons dashicons-yes"></span>Advanced Link Options</h3>
230
+ <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>
231
+ </div>
232
+ </div>
233
+ <div class="col">
234
+ <div class="sp-tfree-feature">
235
+ <h3><span class="dashicons dashicons-yes"></span>Rich Snippets Compatible</h3>
236
+ <p>The plugin is Rich Snippets compatible. When used properly this information might display in the search engine result pages!
237
+ Testimonial Pro uses schema.org compliant JSON-LD markup to appear correctly in search results.</p>
238
+ </div>
239
+ </div>
240
+ <div class="col">
241
+ <div class="sp-tfree-feature">
242
+ <h3><span class="dashicons dashicons-yes"></span>Slider Control Options</h3>
243
+ <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>
244
+ </div>
245
+ </div>
246
+ <div class="col">
247
+ <div class="sp-tfree-feature">
248
+ <h3><span class="dashicons dashicons-yes"></span>Navigation Styles & Positions</h3>
249
+ <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. You can set your desired style, position and color your own way.</p>
250
+ </div>
251
+ </div>
252
+ <div class="col">
253
+ <div class="sp-tfree-feature">
254
+ <h3><span class="dashicons dashicons-yes"></span>Custom Image Re-sizing</h3>
255
+ <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>
256
+ </div>
257
+ </div>
258
+ <div class="col">
259
+ <div class="sp-tfree-feature">
260
+ <h3><span class="dashicons dashicons-yes"></span>WPBakery (formerly Visual Composer) & Widget Ready</h3>
261
+ <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>
262
+ </div>
263
+ </div>
264
+ <div class="col">
265
+ <div class="sp-tfree-feature">
266
+ <h3><span class="dashicons dashicons-yes"></span>Translation Ready (WPML)</h3>
267
+ <p>Testimonial Pro is fully Translation ready with WPML, Polylang, qTranslate-x, GTranslate, Google Language Translator, WPGlobus – Multilingual Everything! You can easily translate into your language.</p>
268
+ </div>
269
+ </div>
270
+ <div class="col">
271
+ <div class="sp-tfree-feature">
272
+ <h3><span class="dashicons dashicons-yes"></span>Duplicate or Clone</h3>
273
+ <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>
274
+ </div>
275
+ </div>
276
+ <div class="col">
277
+ <div class="sp-tfree-feature">
278
+ <h3><span class="dashicons dashicons-yes"></span>Built-in Automatic Updates</h3>
279
+ <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>
280
+ </div>
281
+ </div>
282
+ <div class="col">
283
+ <div class="sp-tfree-feature">
284
+ <h3><span class="dashicons dashicons-yes"></span>Fast & Friendly Support (24x7)</h3>
285
+ <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 dedicated support team who are always ready to make you happy!</p>
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>
297
+ <?php
298
+ }
299
+
300
+
301
+ }
302
+
303
+ new SP_Testimonial_Free_Functions();
304
+
305
+ /**
306
+ *
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
+
318
+ function sp_free_testimonial_polylang( $post_types, $is_settings ) {
319
+ if ( $is_settings ) {
320
+ // hides 'spt_testimonial,sp_tfree_shortcodes' from the list of custom post types in Polylang settings
321
+ unset( $post_types['spt_testimonial'] );
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
+ }
languages/testimonial-free.pot CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: Testimonial Free\n"
4
- "POT-Creation-Date: 2017-04-22 11:54+0600\n"
5
- "PO-Revision-Date: 2017-04-22 11:54+0600\n"
6
  "Last-Translator: \n"
7
  "Language-Team: ShapedPlugin <support@shapedplugin.com>\n"
8
  "Language: en\n"
@@ -17,62 +17,996 @@ msgstr ""
17
  "esc_atts_e;esc_atts_x\n"
18
  "X-Poedit-SearchPath-0: ..\n"
19
 
20
- #: ../inc/functions.php:18 ../inc/functions.php:29
21
- msgid "Testimonials"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  msgstr ""
23
 
24
- #: ../inc/functions.php:19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  msgid "Testimonial"
26
  msgstr ""
27
 
28
- #: ../inc/functions.php:20 ../inc/functions.php:21
29
- msgid "Add New Testimonial"
30
  msgstr ""
31
 
32
- #: ../inc/functions.php:22
33
- msgid "Edit Testimonial"
34
  msgstr ""
35
 
36
- #: ../inc/functions.php:23
37
- msgid "New Testimonial"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  msgstr ""
39
 
40
- #: ../inc/functions.php:24
41
- msgid "View Testimonial"
42
  msgstr ""
43
 
44
- #: ../inc/functions.php:25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  msgid "Search Testimonials"
46
  msgstr ""
47
 
48
- #: ../inc/functions.php:26
49
  msgid "No Testimonials found"
50
  msgstr ""
51
 
52
- #: ../inc/functions.php:27
53
  msgid "No Testimonials found in Trash"
54
  msgstr ""
55
 
56
- #: ../inc/functions.php:28
57
- msgid "Parent Testimonial:"
58
  msgstr ""
59
 
60
- #: ../inc/functions.php:69
61
- msgid "Type client name here"
62
  msgstr ""
63
 
64
- #: ../inc/options/meta-box.php:4
65
- msgid "Testimonial Options"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  msgstr ""
67
 
68
- #: ../inc/options/meta-box.php:21
69
- msgid "Designation:"
70
  msgstr ""
71
 
72
- #: ../inc/options/meta-box.php:22
73
- msgid "Type client designation here."
74
  msgstr ""
75
 
76
- #: ../inc/shortcodes.php:98
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  msgid "No testimonials found"
78
  msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: Testimonial\n"
4
+ "POT-Creation-Date: 2018-04-14 16:36+0600\n"
5
+ "PO-Revision-Date: 2018-04-14 16:37+0600\n"
6
  "Last-Translator: \n"
7
  "Language-Team: ShapedPlugin <support@shapedplugin.com>\n"
8
  "Language: en\n"
17
  "esc_atts_e;esc_atts_x\n"
18
  "X-Poedit-SearchPath-0: ..\n"
19
 
20
+ #: ../admin/views/metabox/classes/framework.class.php:171
21
+ msgid "Success. Imported backup options."
22
+ msgstr ""
23
+
24
+ #: ../admin/views/metabox/classes/framework.class.php:176
25
+ msgid "Default options restored."
26
+ msgstr ""
27
+
28
+ #: ../admin/views/metabox/classes/framework.class.php:195
29
+ msgid "Default options restored for only this section."
30
+ msgstr ""
31
+
32
+ #: ../admin/views/metabox/classes/framework.class.php:335
33
+ msgid "Settings saved."
34
+ msgstr ""
35
+
36
+ #: ../admin/views/metabox/classes/framework.class.php:337
37
+ msgid "Save Changes"
38
+ msgstr ""
39
+
40
+ #: ../admin/views/metabox/classes/framework.class.php:337
41
+ msgid "Saving..."
42
+ msgstr ""
43
+
44
+ #: ../admin/views/metabox/classes/framework.class.php:338
45
+ msgid "Restore"
46
+ msgstr ""
47
+
48
+ #: ../admin/views/metabox/classes/framework.class.php:341
49
+ msgid "Reset All Options"
50
+ msgstr ""
51
+
52
+ #: ../admin/views/metabox/classes/options.class.php:125
53
+ msgid "CONFIG"
54
+ msgstr ""
55
+
56
+ #: ../admin/views/metabox/classes/options.class.php:131
57
+ #: ../admin/views/metabox/classes/options.class.php:151
58
+ msgid "USAGE"
59
+ msgstr ""
60
+
61
+ #: ../admin/views/metabox/classes/options.class.php:137
62
+ msgid "VALUE"
63
+ msgstr ""
64
+
65
+ #: ../admin/views/metabox/classes/options.class.php:155
66
+ #: ../admin/views/partials/general-settings.php:76
67
+ msgid "ID"
68
+ msgstr ""
69
+
70
+ #: ../admin/views/metabox/classes/options.class.php:227
71
+ #, php-format
72
+ msgid "You are editing language: ( <strong>%s</strong> )"
73
+ msgstr ""
74
+
75
+ #: ../admin/views/metabox/config/metabox.config.php:17
76
+ msgid "Testimonial Options"
77
+ msgstr ""
78
+
79
+ #: ../admin/views/metabox/config/metabox.config.php:26
80
+ msgid "Reviewer Information"
81
+ msgstr ""
82
+
83
+ #: ../admin/views/metabox/config/metabox.config.php:35
84
+ #: ../admin/views/partials/stylization.php:58 ../testimonial-free.php:294
85
+ msgid "Name"
86
+ msgstr ""
87
+
88
+ #: ../admin/views/metabox/config/metabox.config.php:36
89
+ msgid "Type reviewer name here."
90
+ msgstr ""
91
+
92
+ #: ../admin/views/metabox/config/metabox.config.php:41
93
+ #: ../admin/views/partials/stylization.php:84
94
+ msgid "Identity or Position"
95
+ msgstr ""
96
+
97
+ #: ../admin/views/metabox/config/metabox.config.php:42
98
+ msgid "Type reviewer identity or position here."
99
+ msgstr ""
100
+
101
+ #: ../admin/views/metabox/config/metabox.config.php:47
102
+ msgid "Rating Star"
103
+ msgstr ""
104
+
105
+ #: ../admin/views/metabox/config/metabox.config.php:48
106
+ msgid "Rating star along with testimonial."
107
+ msgstr ""
108
+
109
+ #: ../admin/views/metabox/config/metabox.config.php:50
110
+ msgid "5 Stars"
111
+ msgstr ""
112
+
113
+ #: ../admin/views/metabox/config/metabox.config.php:51
114
+ msgid "4 Stars"
115
+ msgstr ""
116
+
117
+ #: ../admin/views/metabox/config/metabox.config.php:52
118
+ msgid "3 Stars"
119
+ msgstr ""
120
+
121
+ #: ../admin/views/metabox/config/metabox.config.php:53
122
+ msgid "2 Stars"
123
+ msgstr ""
124
+
125
+ #: ../admin/views/metabox/config/metabox.config.php:54
126
+ msgid "1 Star"
127
+ msgstr ""
128
+
129
+ #: ../admin/views/metabox/config/metabox.config.php:64
130
+ msgid "Social Profiles"
131
+ msgstr ""
132
+
133
+ #: ../admin/views/metabox/config/metabox.config.php:73
134
+ msgid ""
135
+ "These Social Profile options are available in the <b><a href=\"https://"
136
+ "shapedplugin.com/plugin/testimonial-pro\" target=\"_blank\">Pro Version</a></"
137
+ "b>."
138
+ msgstr ""
139
+
140
+ #: ../admin/views/metabox/config/metabox.config.php:78
141
+ msgid "Facebook"
142
  msgstr ""
143
 
144
+ #: ../admin/views/metabox/config/metabox.config.php:79
145
+ msgid "Type facebook URL here."
146
+ msgstr ""
147
+
148
+ #: ../admin/views/metabox/config/metabox.config.php:84
149
+ msgid "Twitter"
150
+ msgstr ""
151
+
152
+ #: ../admin/views/metabox/config/metabox.config.php:85
153
+ msgid "Type twitter URL here."
154
+ msgstr ""
155
+
156
+ #: ../admin/views/metabox/config/metabox.config.php:90
157
+ msgid "Google Plus"
158
+ msgstr ""
159
+
160
+ #: ../admin/views/metabox/config/metabox.config.php:91
161
+ msgid "Type google plus URL here."
162
+ msgstr ""
163
+
164
+ #: ../admin/views/metabox/config/metabox.config.php:96
165
+ msgid "LinkedIn"
166
+ msgstr ""
167
+
168
+ #: ../admin/views/metabox/config/metabox.config.php:97
169
+ msgid "Type linkedin URL here."
170
+ msgstr ""
171
+
172
+ #: ../admin/views/metabox/config/metabox.config.php:102
173
+ msgid "Instagram"
174
+ msgstr ""
175
+
176
+ #: ../admin/views/metabox/config/metabox.config.php:103
177
+ msgid "Type Instagram URL here."
178
+ msgstr ""
179
+
180
+ #: ../admin/views/metabox/config/metabox.config.php:108
181
+ msgid "YouTube"
182
+ msgstr ""
183
+
184
+ #: ../admin/views/metabox/config/metabox.config.php:109
185
+ msgid "Type youtube URL here."
186
+ msgstr ""
187
+
188
+ #: ../admin/views/metabox/config/metabox.config.php:114
189
+ msgid "Pinterest"
190
+ msgstr ""
191
+
192
+ #: ../admin/views/metabox/config/metabox.config.php:115
193
+ msgid "Type pinterest URL here."
194
+ msgstr ""
195
+
196
+ #: ../admin/views/metabox/config/metabox.config.php:120
197
+ msgid "Skype"
198
+ msgstr ""
199
+
200
+ #: ../admin/views/metabox/config/metabox.config.php:121
201
+ msgid "Type skype URL here."
202
+ msgstr ""
203
+
204
+ #: ../admin/views/metabox/config/metabox.config.php:126
205
+ msgid "StumbleUpon"
206
+ msgstr ""
207
+
208
+ #: ../admin/views/metabox/config/metabox.config.php:127
209
+ msgid "Type stumbleupon URL here."
210
+ msgstr ""
211
+
212
+ #: ../admin/views/metabox/config/metabox.config.php:132
213
+ msgid "Reddit"
214
+ msgstr ""
215
+
216
+ #: ../admin/views/metabox/config/metabox.config.php:133
217
+ msgid "Type reddit URL here."
218
+ msgstr ""
219
+
220
+ #: ../admin/views/metabox/config/metabox.config.php:138
221
+ msgid "Dribbble"
222
+ msgstr ""
223
+
224
+ #: ../admin/views/metabox/config/metabox.config.php:139
225
+ msgid "Type dribbble URL here."
226
+ msgstr ""
227
+
228
+ #: ../admin/views/metabox/config/metabox.config.php:144
229
+ msgid "SnapChat"
230
+ msgstr ""
231
+
232
+ #: ../admin/views/metabox/config/metabox.config.php:145
233
+ msgid "Type snapchat URL here."
234
+ msgstr ""
235
+
236
+ #: ../admin/views/metabox/functions/helpers.php:48
237
+ msgid "This field class is not available!"
238
+ msgstr ""
239
+
240
+ #: ../admin/views/metabox/functions/validate.php:14
241
+ msgid "Please write a valid email address!"
242
+ msgstr ""
243
+
244
+ #: ../admin/views/metabox/functions/validate.php:33
245
+ msgid "Please write a numeric data!"
246
+ msgstr ""
247
+
248
+ #: ../admin/views/metabox/functions/validate.php:51
249
+ msgid "Fatal Error! This field is required!"
250
+ msgstr ""
251
+
252
+ #: ../admin/views/partials/general-settings.php:16
253
+ msgid "Layout"
254
+ msgstr ""
255
+
256
+ #: ../admin/views/partials/general-settings.php:17
257
+ msgid "Select a layout to display the testimonials."
258
+ msgstr ""
259
+
260
+ #: ../admin/views/partials/general-settings.php:22
261
+ msgid "Select Theme"
262
+ msgstr ""
263
+
264
+ #: ../admin/views/partials/general-settings.php:23
265
+ msgid "Select which theme you want to display."
266
+ msgstr ""
267
+
268
+ #: ../admin/views/partials/general-settings.php:25
269
+ msgid "Theme One"
270
+ msgstr ""
271
+
272
+ #: ../admin/views/partials/general-settings.php:31
273
+ msgid "Display Testimonials from"
274
+ msgstr ""
275
+
276
+ #: ../admin/views/partials/general-settings.php:32
277
+ msgid "Select an option to display the testimonials."
278
+ msgstr ""
279
+
280
+ #: ../admin/views/partials/general-settings.php:37
281
+ msgid "Total Testimonials"
282
+ msgstr ""
283
+
284
+ #: ../admin/views/partials/general-settings.php:38
285
+ msgid "Number of total testimonials to display."
286
+ msgstr ""
287
+
288
+ #: ../admin/views/partials/general-settings.php:43
289
+ msgid "Testimonial Column(s)"
290
+ msgstr ""
291
+
292
+ #: ../admin/views/partials/general-settings.php:44
293
+ msgid "Set number of column(s) for the screen larger than 1280px."
294
+ msgstr ""
295
+
296
+ #: ../admin/views/partials/general-settings.php:49
297
+ msgid "Testimonial Column(s) on Desktop"
298
+ msgstr ""
299
+
300
+ #: ../admin/views/partials/general-settings.php:50
301
+ msgid "Set number of column on desktop for the screen smaller than 1280px."
302
+ msgstr ""
303
+
304
+ #: ../admin/views/partials/general-settings.php:55
305
+ msgid "Testimonial Column(s) on Small Desktop"
306
+ msgstr ""
307
+
308
+ #: ../admin/views/partials/general-settings.php:56
309
+ msgid ""
310
+ "Set number of column on small desktop for the screen smaller than 980px."
311
+ msgstr ""
312
+
313
+ #: ../admin/views/partials/general-settings.php:61
314
+ msgid "Testimonial Column(s) on Tablet"
315
+ msgstr ""
316
+
317
+ #: ../admin/views/partials/general-settings.php:62
318
+ msgid "Set number of column on tablet for the screen smaller than 736px."
319
+ msgstr ""
320
+
321
+ #: ../admin/views/partials/general-settings.php:67
322
+ msgid "Testimonial Column(s) on Mobile"
323
+ msgstr ""
324
+
325
+ #: ../admin/views/partials/general-settings.php:68
326
+ msgid "Set number of column on mobile for the screen smaller than 480px."
327
+ msgstr ""
328
+
329
+ #: ../admin/views/partials/general-settings.php:73
330
+ msgid "Order By"
331
+ msgstr ""
332
+
333
+ #: ../admin/views/partials/general-settings.php:74
334
+ msgid "Select an order by option."
335
+ msgstr ""
336
+
337
+ #: ../admin/views/partials/general-settings.php:77 ../testimonial-free.php:259
338
+ #: ../testimonial-free.php:297
339
+ msgid "Date"
340
+ msgstr ""
341
+
342
+ #: ../admin/views/partials/general-settings.php:78 ../testimonial-free.php:292
343
+ msgid "Title"
344
+ msgstr ""
345
+
346
+ #: ../admin/views/partials/general-settings.php:79
347
+ msgid "Modified"
348
+ msgstr ""
349
+
350
+ #: ../admin/views/partials/general-settings.php:85
351
+ msgid "Order"
352
+ msgstr ""
353
+
354
+ #: ../admin/views/partials/general-settings.php:86
355
+ msgid "Select an order option."
356
+ msgstr ""
357
+
358
+ #: ../admin/views/partials/general-settings.php:88
359
+ msgid "Ascending"
360
+ msgstr ""
361
+
362
+ #: ../admin/views/partials/general-settings.php:89
363
+ msgid "Descending"
364
+ msgstr ""
365
+
366
+ #: ../admin/views/partials/slider-settings.php:15
367
+ msgid "AutoPlay"
368
+ msgstr ""
369
+
370
+ #: ../admin/views/partials/slider-settings.php:16
371
+ msgid "Check to on autoplay."
372
+ msgstr ""
373
+
374
+ #: ../admin/views/partials/slider-settings.php:21
375
+ msgid "AutoPlay Speed"
376
+ msgstr ""
377
+
378
+ #: ../admin/views/partials/slider-settings.php:22
379
+ msgid "Set autoplay speed."
380
+ msgstr ""
381
+
382
+ #: ../admin/views/partials/slider-settings.php:23
383
+ msgid "(Millisecond)"
384
+ msgstr ""
385
+
386
+ #: ../admin/views/partials/slider-settings.php:28
387
+ msgid "Pagination Speed"
388
+ msgstr ""
389
+
390
+ #: ../admin/views/partials/slider-settings.php:29
391
+ msgid "Set pagination/slide scroll speed."
392
+ msgstr ""
393
+
394
+ #: ../admin/views/partials/slider-settings.php:30
395
+ msgid "(Millisecond)."
396
+ msgstr ""
397
+
398
+ #: ../admin/views/partials/slider-settings.php:35
399
+ msgid "Pause on Hover"
400
+ msgstr ""
401
+
402
+ #: ../admin/views/partials/slider-settings.php:36
403
+ msgid "Check to activate slider pause on hover."
404
+ msgstr ""
405
+
406
+ #: ../admin/views/partials/slider-settings.php:41
407
+ msgid "Infinite Loop"
408
+ msgstr ""
409
+
410
+ #: ../admin/views/partials/slider-settings.php:42
411
+ msgid "Check to activate infinite loop mode."
412
+ msgstr ""
413
+
414
+ #: ../admin/views/partials/slider-settings.php:47
415
+ msgid "Navigation Settings"
416
+ msgstr ""
417
+
418
+ #: ../admin/views/partials/slider-settings.php:51
419
+ msgid "Navigation"
420
+ msgstr ""
421
+
422
+ #: ../admin/views/partials/slider-settings.php:52
423
+ msgid "Show/Hide slider navigation."
424
+ msgstr ""
425
+
426
+ #: ../admin/views/partials/slider-settings.php:58
427
+ msgid "Choose a Style"
428
+ msgstr ""
429
+
430
+ #: ../admin/views/partials/slider-settings.php:59
431
+ msgid "Choose a slider navigation style."
432
+ msgstr ""
433
+
434
+ #: ../admin/views/partials/slider-settings.php:64
435
+ msgid "Arrow Color"
436
+ msgstr ""
437
+
438
+ #: ../admin/views/partials/slider-settings.php:65
439
+ msgid "Set the navigation arrow color."
440
+ msgstr ""
441
+
442
+ #: ../admin/views/partials/slider-settings.php:71
443
+ msgid "Arrow Hover Color"
444
+ msgstr ""
445
+
446
+ #: ../admin/views/partials/slider-settings.php:72
447
+ msgid "Set the navigation arrow hover color."
448
+ msgstr ""
449
+
450
+ #: ../admin/views/partials/slider-settings.php:78
451
+ msgid "Pagination Settings"
452
+ msgstr ""
453
+
454
+ #: ../admin/views/partials/slider-settings.php:82
455
+ msgid "Pagination"
456
+ msgstr ""
457
+
458
+ #: ../admin/views/partials/slider-settings.php:83
459
+ msgid "Show/Hide pagination."
460
+ msgstr ""
461
+
462
+ #: ../admin/views/partials/slider-settings.php:90
463
+ msgid "Dots Color"
464
+ msgstr ""
465
+
466
+ #: ../admin/views/partials/slider-settings.php:91
467
+ msgid "Set the pagination dots color."
468
+ msgstr ""
469
+
470
+ #: ../admin/views/partials/slider-settings.php:97
471
+ msgid "Active Color"
472
+ msgstr ""
473
+
474
+ #: ../admin/views/partials/slider-settings.php:98
475
+ msgid "Set the pagination active color."
476
+ msgstr ""
477
+
478
+ #: ../admin/views/partials/slider-settings.php:103
479
+ msgid "Misc. Settings"
480
+ msgstr ""
481
+
482
+ #: ../admin/views/partials/slider-settings.php:107
483
+ msgid "Swipe"
484
+ msgstr ""
485
+
486
+ #: ../admin/views/partials/slider-settings.php:108
487
+ msgid "On/Off swipe mode."
488
+ msgstr ""
489
+
490
+ #: ../admin/views/partials/slider-settings.php:113
491
+ msgid "Mouse Draggable"
492
+ msgstr ""
493
+
494
+ #: ../admin/views/partials/slider-settings.php:114
495
+ msgid "On/Off mouse draggable mode."
496
+ msgstr ""
497
+
498
+ #: ../admin/views/partials/slider-settings.php:119
499
+ msgid "RTL"
500
+ msgstr ""
501
+
502
+ #: ../admin/views/partials/slider-settings.php:120
503
+ msgid "On/Off right to left mode."
504
+ msgstr ""
505
+
506
+ #: ../admin/views/partials/stylization.php:15
507
+ msgid "Section Title"
508
+ msgstr ""
509
+
510
+ #: ../admin/views/partials/stylization.php:16
511
+ msgid ""
512
+ "Show/Hide the shortcode title as testimonial section title e.g. What Our "
513
+ "Customers Saying."
514
+ msgstr ""
515
+
516
+ #: ../admin/views/partials/stylization.php:22
517
+ msgid "Section Title Color"
518
+ msgstr ""
519
+
520
+ #: ../admin/views/partials/stylization.php:23
521
+ msgid "Set section title color."
522
+ msgstr ""
523
+
524
+ #: ../admin/views/partials/stylization.php:28
525
+ msgid "Testimonial Title"
526
+ msgstr ""
527
+
528
+ #: ../admin/views/partials/stylization.php:29
529
+ msgid "Check to show testimonial title or tagline."
530
+ msgstr ""
531
+
532
+ #: ../admin/views/partials/stylization.php:35
533
+ msgid "Testimonial Title Color"
534
+ msgstr ""
535
+
536
+ #: ../admin/views/partials/stylization.php:36
537
+ msgid "Set testimonial title or tagline color."
538
+ msgstr ""
539
+
540
+ #: ../admin/views/partials/stylization.php:41
541
+ msgid "Testimonial Content"
542
+ msgstr ""
543
+
544
+ #: ../admin/views/partials/stylization.php:42
545
+ msgid "Check to show testimonial content."
546
+ msgstr ""
547
+
548
+ #: ../admin/views/partials/stylization.php:48
549
+ msgid "Testimonial Content Color"
550
+ msgstr ""
551
+
552
+ #: ../admin/views/partials/stylization.php:49
553
+ msgid "Set testimonial content color."
554
+ msgstr ""
555
+
556
+ #: ../admin/views/partials/stylization.php:54
557
+ msgid "Reviewer Information Settings"
558
+ msgstr ""
559
+
560
+ #: ../admin/views/partials/stylization.php:59
561
+ msgid "Show/Hide reviewer name."
562
+ msgstr ""
563
+
564
+ #: ../admin/views/partials/stylization.php:65
565
+ msgid "Name Color"
566
+ msgstr ""
567
+
568
+ #: ../admin/views/partials/stylization.php:66
569
+ msgid "Set reviewer name color."
570
+ msgstr ""
571
+
572
+ #: ../admin/views/partials/stylization.php:71
573
+ msgid "Star Rating"
574
+ msgstr ""
575
+
576
+ #: ../admin/views/partials/stylization.php:72
577
+ msgid "Show/Hide star ratings."
578
+ msgstr ""
579
+
580
+ #: ../admin/views/partials/stylization.php:78
581
+ msgid "Star Rating Color"
582
+ msgstr ""
583
+
584
+ #: ../admin/views/partials/stylization.php:79
585
+ msgid "Set color for star rating."
586
+ msgstr ""
587
+
588
+ #: ../admin/views/partials/stylization.php:85
589
+ msgid "Show/Hide identity or position."
590
+ msgstr ""
591
+
592
+ #: ../admin/views/partials/stylization.php:91
593
+ msgid "Identity or Position Color"
594
+ msgstr ""
595
+
596
+ #: ../admin/views/partials/stylization.php:92
597
+ msgid "Set color for identity or position."
598
+ msgstr ""
599
+
600
+ #: ../admin/views/partials/typography.php:13
601
+ msgid "Load Section Title Font"
602
+ msgstr ""
603
+
604
+ #: ../admin/views/partials/typography.php:14
605
+ msgid "On/Off google font for the section title."
606
+ msgstr ""
607
+
608
+ #: ../admin/views/partials/typography.php:19
609
+ msgid "Section Title Font"
610
+ msgstr ""
611
+
612
+ #: ../admin/views/partials/typography.php:20
613
+ msgid "Set testimonial section title font properties."
614
+ msgstr ""
615
+
616
+ #: ../admin/views/partials/typography.php:24
617
+ msgid "Load Testimonial Title Font"
618
+ msgstr ""
619
+
620
+ #: ../admin/views/partials/typography.php:25
621
+ msgid "On/Off google font for the testimonial tagline or title."
622
+ msgstr ""
623
+
624
+ #: ../admin/views/partials/typography.php:30
625
+ msgid "Testimonial Title Font"
626
+ msgstr ""
627
+
628
+ #: ../admin/views/partials/typography.php:31
629
+ msgid "Set testimonial tagline or title font properties."
630
+ msgstr ""
631
+
632
+ #: ../admin/views/partials/typography.php:35
633
+ msgid "Load Testimonial Content Font"
634
+ msgstr ""
635
+
636
+ #: ../admin/views/partials/typography.php:36
637
+ msgid "On/Off google font for the testimonial content."
638
+ msgstr ""
639
+
640
+ #: ../admin/views/partials/typography.php:41
641
+ msgid "Testimonial Content Font"
642
+ msgstr ""
643
+
644
+ #: ../admin/views/partials/typography.php:42
645
+ msgid "Set testimonial content font properties."
646
+ msgstr ""
647
+
648
+ #: ../admin/views/partials/typography.php:46
649
+ msgid "Load Name Font"
650
+ msgstr ""
651
+
652
+ #: ../admin/views/partials/typography.php:47
653
+ msgid "On/Off google font for the name."
654
+ msgstr ""
655
+
656
+ #: ../admin/views/partials/typography.php:52
657
+ msgid "Name Font"
658
+ msgstr ""
659
+
660
+ #: ../admin/views/partials/typography.php:53
661
+ msgid "Set name font properties."
662
+ msgstr ""
663
+
664
+ #: ../admin/views/partials/typography.php:57
665
+ msgid "Load Identity or Position & Company Name Font"
666
+ msgstr ""
667
+
668
+ #: ../admin/views/partials/typography.php:58
669
+ msgid "On/Off google font for the identity or position & company name."
670
+ msgstr ""
671
+
672
+ #: ../admin/views/partials/typography.php:63
673
+ msgid "Identity or Position & Company Name Font"
674
+ msgstr ""
675
+
676
+ #: ../admin/views/partials/typography.php:64
677
+ msgid "Set identity or position & company name font properties."
678
+ msgstr ""
679
+
680
+ #: ../admin/views/partials/typography.php:68
681
+ msgid "Load Location Font"
682
+ msgstr ""
683
+
684
+ #: ../admin/views/partials/typography.php:69
685
+ msgid "On/Off google font for the location."
686
+ msgstr ""
687
+
688
+ #: ../admin/views/partials/typography.php:74
689
+ msgid "Location Font"
690
+ msgstr ""
691
+
692
+ #: ../admin/views/partials/typography.php:75
693
+ msgid "Set location font properties."
694
+ msgstr ""
695
+
696
+ #: ../admin/views/partials/typography.php:79
697
+ msgid "Load Phone or Mobile Font"
698
+ msgstr ""
699
+
700
+ #: ../admin/views/partials/typography.php:80
701
+ msgid "On/Off google font for the phone or mobile."
702
+ msgstr ""
703
+
704
+ #: ../admin/views/partials/typography.php:85
705
+ msgid "Phone or Mobile Font"
706
+ msgstr ""
707
+
708
+ #: ../admin/views/partials/typography.php:86
709
+ msgid "Set phone or mobile font properties."
710
+ msgstr ""
711
+
712
+ #: ../admin/views/partials/typography.php:90
713
+ msgid "Load Email Address Font"
714
+ msgstr ""
715
+
716
+ #: ../admin/views/partials/typography.php:91
717
+ msgid "On/Off google font for the email address."
718
+ msgstr ""
719
+
720
+ #: ../admin/views/partials/typography.php:96
721
+ msgid "Email Address Font"
722
+ msgstr ""
723
+
724
+ #: ../admin/views/partials/typography.php:97
725
+ msgid "Set email address font properties."
726
+ msgstr ""
727
+
728
+ #: ../admin/views/partials/typography.php:101
729
+ msgid "Load Date Font"
730
+ msgstr ""
731
+
732
+ #: ../admin/views/partials/typography.php:102
733
+ msgid "On/Off google font for the date."
734
+ msgstr ""
735
+
736
+ #: ../admin/views/partials/typography.php:107
737
+ msgid "Date Font"
738
+ msgstr ""
739
+
740
+ #: ../admin/views/partials/typography.php:108
741
+ msgid "Set date font properties."
742
+ msgstr ""
743
+
744
+ #: ../admin/views/partials/typography.php:112
745
+ msgid "Load Website Font"
746
+ msgstr ""
747
+
748
+ #: ../admin/views/partials/typography.php:113
749
+ msgid "On/Off google font for the website."
750
+ msgstr ""
751
+
752
+ #: ../admin/views/partials/typography.php:118
753
+ msgid "Website Font"
754
+ msgstr ""
755
+
756
+ #: ../admin/views/partials/typography.php:119
757
+ msgid "Set website font properties."
758
+ msgstr ""
759
+
760
+ #: ../admin/views/tab-navigation.php:13 ../admin/views/widget.php:14
761
+ #: ../class/testimonial.php:41 ../class/testimonial.php:61
762
+ #: ../class/testimonial.php:62
763
  msgid "Testimonial"
764
  msgstr ""
765
 
766
+ #: ../admin/views/tab-navigation.php:22 ../testimonial-free.php:257
767
+ msgid "Shortcode"
768
  msgstr ""
769
 
770
+ #: ../admin/views/tab-navigation.php:23
771
+ msgid "Copy and paste this shortcode into your posts or pages:"
772
  msgstr ""
773
 
774
+ #: ../admin/views/tab-navigation.php:34
775
+ msgid "Template Include"
776
+ msgstr ""
777
+
778
+ #: ../admin/views/tab-navigation.php:36
779
+ msgid "Paste the PHP code into your template file:"
780
+ msgstr ""
781
+
782
+ #: ../admin/views/tab-navigation.php:45
783
+ msgid "Post or Page editor"
784
+ msgstr ""
785
+
786
+ #: ../admin/views/tab-navigation.php:47
787
+ msgid "Insert the shortcode with the TinyMCE button:"
788
+ msgstr ""
789
+
790
+ #: ../admin/views/widget.php:16
791
+ msgid "Display Testimonials."
792
+ msgstr ""
793
+
794
+ #: ../admin/views/widget.php:60
795
+ msgid "Title:"
796
+ msgstr ""
797
+
798
+ #: ../admin/views/widget.php:63
799
+ msgid "Testimonial Shortcodes:"
800
+ msgstr ""
801
+
802
+ #: ../admin/views/widget.php:78
803
+ msgid "You did not generate any shortcode yet."
804
+ msgstr ""
805
+
806
+ #: ../admin/views/widget.php:79
807
+ msgid "to generate a new shortcode now."
808
+ msgstr ""
809
+
810
+ #: ../admin/views/widget.php:80
811
+ msgid "click here"
812
+ msgstr ""
813
+
814
+ #: ../class/metabox.php:53
815
+ msgid "Shortcode Options"
816
+ msgstr ""
817
+
818
+ #: ../class/shortcodes.php:47
819
+ msgid "Generate Shortcode"
820
+ msgstr ""
821
+
822
+ #: ../class/shortcodes.php:48
823
+ msgid "Generate Shortcode for Testimonial"
824
+ msgstr ""
825
+
826
+ #: ../class/shortcodes.php:57
827
+ msgid "Testimonial Shortcodes"
828
+ msgstr ""
829
+
830
+ #: ../class/shortcodes.php:58
831
+ msgid "Testimonial Shortcode"
832
+ msgstr ""
833
+
834
+ #: ../class/shortcodes.php:59 ../testimonial-free.php:166
835
+ msgid "Shortcode Generator"
836
+ msgstr ""
837
+
838
+ #: ../class/shortcodes.php:60
839
+ msgid "Add New"
840
+ msgstr ""
841
+
842
+ #: ../class/shortcodes.php:61
843
+ msgid "Add New Shortcode"
844
+ msgstr ""
845
+
846
+ #: ../class/shortcodes.php:62 ../class/testimonial.php:66
847
+ msgid "Edit"
848
+ msgstr ""
849
+
850
+ #: ../class/shortcodes.php:63
851
+ msgid "Edit Shortcode"
852
+ msgstr ""
853
+
854
+ #: ../class/shortcodes.php:64
855
+ msgid "New Shortcode"
856
+ msgstr ""
857
+
858
+ #: ../class/shortcodes.php:65 ../class/shortcodes.php:66
859
+ msgid "View Shortcode"
860
  msgstr ""
861
 
862
+ #: ../class/shortcodes.php:67
863
+ msgid "Search Shortcode"
864
  msgstr ""
865
 
866
+ #: ../class/shortcodes.php:68
867
+ msgid "No Testimonial Shortcode Found"
868
+ msgstr ""
869
+
870
+ #: ../class/shortcodes.php:69
871
+ msgid "No Testimonial Shortcode Found in Trash"
872
+ msgstr ""
873
+
874
+ #: ../class/shortcodes.php:70
875
+ msgid "Parent Testimonial Shortcode"
876
+ msgstr ""
877
+
878
+ #: ../class/testimonial.php:42
879
+ msgid "Testimonial custom post type."
880
+ msgstr ""
881
+
882
+ #: ../class/testimonial.php:60 ../class/testimonial.php:63
883
+ msgid "Testimonials"
884
+ msgstr ""
885
+
886
+ #: ../class/testimonial.php:64 ../class/testimonial.php:65
887
+ msgid "Add Testimonial"
888
+ msgstr ""
889
+
890
+ #: ../class/testimonial.php:67
891
+ msgid "Edit Testimonial"
892
+ msgstr ""
893
+
894
+ #: ../class/testimonial.php:68
895
+ msgid "New Testimonial"
896
+ msgstr ""
897
+
898
+ #: ../class/testimonial.php:69
899
  msgid "Search Testimonials"
900
  msgstr ""
901
 
902
+ #: ../class/testimonial.php:70
903
  msgid "No Testimonials found"
904
  msgstr ""
905
 
906
+ #: ../class/testimonial.php:71
907
  msgid "No Testimonials found in Trash"
908
  msgstr ""
909
 
910
+ #: ../class/testimonial.php:72
911
+ msgid "Parent Testimonials"
912
  msgstr ""
913
 
914
+ #: ../class/testimonial.php:73
915
+ msgid "Featured Image for Testimonial"
916
  msgstr ""
917
 
918
+ #: ../class/testimonial.php:74
919
+ msgid "Set Testimonial Thumbnail"
920
+ msgstr ""
921
+
922
+ #: ../class/testimonial.php:75
923
+ msgid "Remove image"
924
+ msgstr ""
925
+
926
+ #: ../class/testimonial.php:76
927
+ msgid "Use as image"
928
+ msgstr ""
929
+
930
+ #: ../includes/functions.php:29 ../includes/functions.php:30
931
+ msgid "Shortcode updated."
932
+ msgstr ""
933
+
934
+ #: ../includes/functions.php:31
935
+ msgid "Shortcode published."
936
+ msgstr ""
937
+
938
+ #: ../includes/functions.php:32
939
+ msgid "Shortcode submitted."
940
+ msgstr ""
941
+
942
+ #: ../includes/functions.php:33
943
+ msgid "Shortcode draft updated."
944
+ msgstr ""
945
+
946
+ #: ../includes/functions.php:35 ../includes/functions.php:36
947
+ msgid "Testimonial updated."
948
+ msgstr ""
949
+
950
+ #: ../includes/functions.php:37
951
+ msgid "Testimonial published."
952
  msgstr ""
953
 
954
+ #: ../includes/functions.php:38
955
+ msgid "Testimonial submitted."
956
  msgstr ""
957
 
958
+ #: ../includes/functions.php:39
959
+ msgid "Testimonial draft updated."
960
  msgstr ""
961
 
962
+ #: ../includes/functions.php:56
963
+ #, php-format
964
+ msgid ""
965
+ "If you like <strong>Testimonial</strong> please leave us a <a href=\"%s\" "
966
+ "target=\"_blank\">&#9733;&#9733;&#9733;&#9733;&#9733;</a> rating. Your "
967
+ "Review is very important to us as it helps us to grow more. "
968
+ msgstr ""
969
+
970
+ #: ../includes/functions.php:67
971
+ msgid "Testimonial Help"
972
+ msgstr ""
973
+
974
+ #: ../includes/functions.php:67
975
+ msgid "Help"
976
+ msgstr ""
977
+
978
+ #: ../includes/functions.php:77
979
+ msgid "Welcome to Testimonial!"
980
+ msgstr ""
981
+
982
+ #: ../includes/functions.php:78
983
+ msgid ""
984
+ "Thank you for installing Testimonial! You're now running the most popular "
985
+ "Testimonial plugin.\n"
986
+ "This video will help you get started with the plugin."
987
+ msgstr ""
988
+
989
+ #: ../public/views/deprecated-shortcodes.php:113
990
+ #: ../public/views/shortcoderender.php:234
991
  msgid "No testimonials found"
992
  msgstr ""
993
+
994
+ #: ../testimonial-free.php:165
995
+ msgid "Go Pro!"
996
+ msgstr ""
997
+
998
+ #: ../testimonial-free.php:188
999
+ msgid "Live Demo"
1000
+ msgstr ""
1001
+
1002
+ #: ../testimonial-free.php:256
1003
+ msgid "Slider Title"
1004
+ msgstr ""
1005
+
1006
+ #: ../testimonial-free.php:293
1007
+ msgid "Image"
1008
+ msgstr ""
1009
+
1010
+ #: ../testimonial-free.php:295
1011
+ msgid "Rating"
1012
+ msgstr ""
public/assets/css/deprecated-style.css ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .sp-testimonial-section a{
2
+ -webkit-transition: all 0.3s ease;
3
+ -moz-transition: all 0.3s ease;
4
+ transition: all 0.3s ease;
5
+ }
6
+
7
+ .sp-testimonial-section .clear{
8
+ clear: both;
9
+ }
10
+
11
+ .sp-testimonial-section .text-center {
12
+ text-align: center;
13
+ }
14
+
15
+ .sp-testimonial-section{
16
+ padding: 0 30px;
17
+ }
18
+
19
+ .sp-testimonial-section .testimonial-free{
20
+ margin: 0 15px;
21
+ font-size: 14px;
22
+ line-height: 24px;
23
+ }
24
+
25
+ .sp-testimonial-section .testimonial-free:focus,
26
+ .sp-testimonial-section .slick-dots li button:focus{
27
+ outline: none;
28
+ }
29
+
30
+ .sp-testimonial-section .testimonial-free .tf-client-name{
31
+ color: #343434;
32
+ font-size: 18px;
33
+ line-height: 18px;
34
+ font-weight: 700;
35
+ margin-top: 25px;
36
+ margin-bottom: 0;
37
+ }
38
+
39
+ .sp-testimonial-section .testimonial-free .tf-client-designation{
40
+ color: #999999;
41
+ font-size: 14px;
42
+ margin-bottom: 0;
43
+ margin-top: 14px;
44
+ line-height: 16px;
45
+ }
46
+
47
+ .sp-testimonial-section .slick-prev,
48
+ .sp-testimonial-section .slick-next{
49
+ font-size: 26px;
50
+ line-height: 26px;
51
+ color: #444444;
52
+ -webkit-transition: all 0.3s ease;
53
+ -moz-transition: all 0.3s ease;
54
+ transition: all 0.3s ease;
55
+ text-align: center;
56
+ position: absolute;
57
+ z-index: 9;
58
+ cursor: pointer;
59
+ top: 50%;
60
+ margin-top: -14px;
61
+ }
62
+ .sp-testimonial-section .slick-prev:hover,
63
+ .sp-testimonial-section .slick-next:hover{
64
+ color: #52b3d9;
65
+ }
66
+ .sp-testimonial-section .slick-prev{
67
+ left: 0;
68
+ }
69
+ .sp-testimonial-section .slick-next{
70
+ right: 0;
71
+ }
72
+
73
+ .sp-testimonial-section .slick-dots{
74
+ margin: 0;
75
+ margin-top:20px;
76
+ padding: 0;
77
+ list-style: none;
78
+ text-align: center;
79
+ }
80
+ .sp-testimonial-section .slick-dots li{
81
+ display: inline-block;
82
+ border: 0;
83
+ padding: 0;
84
+ width: 12px;
85
+ height: 12px;
86
+ margin: 3px;
87
+ overflow: hidden;
88
+ }
89
+ .sp-testimonial-section .slick-dots li button{
90
+ border-radius: 50%;
91
+ text-indent: -999px;
92
+ width: 12px;
93
+ height: 12px;
94
+ padding: 0;
95
+ border: 0;
96
+ background: #cccccc;
97
+ display: block;
98
+ }
99
+ .sp-testimonial-section .slick-dots li.slick-active button{
100
+ background: #52b3d9;
101
+ }
102
+
103
+ /* Image Style */
104
+ .sp-testimonial-section .tf-client-image{
105
+ max-width: 90px;
106
+ max-height: 90px;
107
+ margin: 0 auto 20px;
108
+ }
109
+ .sp-testimonial-section .tf-client-image img{
110
+ -webkit-border-radius: 100%;
111
+ -moz-border-radius: 100%;
112
+ border-radius: 100%;
113
+ }
{assets → public/assets}/css/font-awesome.min.css RENAMED
File without changes
public/assets/css/responsive.css ADDED
File without changes
public/assets/css/slick.css ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Slider */
2
+ .slick-slider
3
+ {
4
+ position: relative;
5
+
6
+ display: block;
7
+ box-sizing: border-box;
8
+
9
+ -webkit-user-select: none;
10
+ -moz-user-select: none;
11
+ -ms-user-select: none;
12
+ user-select: none;
13
+
14
+ -webkit-touch-callout: none;
15
+ -khtml-user-select: none;
16
+ -ms-touch-action: pan-y;
17
+ touch-action: pan-y;
18
+ -webkit-tap-highlight-color: transparent;
19
+ }
20
+
21
+ .slick-list
22
+ {
23
+ position: relative;
24
+
25
+ display: block;
26
+ overflow: hidden;
27
+
28
+ margin: 0;
29
+ padding: 0;
30
+ }
31
+ .slick-list:focus
32
+ {
33
+ outline: none;
34
+ }
35
+ .slick-list.dragging
36
+ {
37
+ cursor: pointer;
38
+ cursor: hand;
39
+ }
40
+
41
+ .slick-slider .slick-track,
42
+ .slick-slider .slick-list
43
+ {
44
+ -webkit-transform: translate3d(0, 0, 0);
45
+ -moz-transform: translate3d(0, 0, 0);
46
+ -ms-transform: translate3d(0, 0, 0);
47
+ -o-transform: translate3d(0, 0, 0);
48
+ transform: translate3d(0, 0, 0);
49
+ }
50
+
51
+ .slick-track
52
+ {
53
+ position: relative;
54
+ top: 0;
55
+ left: 0;
56
+
57
+ display: block;
58
+ margin-left: auto;
59
+ margin-right: auto;
60
+ }
61
+ .slick-track:before,
62
+ .slick-track:after
63
+ {
64
+ display: table;
65
+
66
+ content: '';
67
+ }
68
+ .slick-track:after
69
+ {
70
+ clear: both;
71
+ }
72
+ .slick-loading .slick-track
73
+ {
74
+ visibility: hidden;
75
+ }
76
+
77
+ .slick-slide
78
+ {
79
+ display: none;
80
+ float: left;
81
+
82
+ height: 100%;
83
+ min-height: 1px;
84
+ }
85
+ [dir='rtl'] .slick-slide
86
+ {
87
+ float: right;
88
+ }
89
+ .slick-slide img
90
+ {
91
+ display: block;
92
+ }
93
+ .slick-slide.slick-loading img
94
+ {
95
+ display: none;
96
+ }
97
+ .slick-slide.dragging img
98
+ {
99
+ pointer-events: none;
100
+ }
101
+ .slick-initialized .slick-slide
102
+ {
103
+ display: block;
104
+ }
105
+ .slick-loading .slick-slide
106
+ {
107
+ visibility: hidden;
108
+ }
109
+ .slick-vertical .slick-slide
110
+ {
111
+ display: block;
112
+
113
+ height: auto;
114
+
115
+ border: 1px solid transparent;
116
+ }
117
+ .slick-arrow.slick-hidden {
118
+ display: none;
119
+ }
public/assets/css/style.css ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .sp-tfree-config{
2
+ display: none;
3
+ }
4
+
5
+ div.sp-testimonial-free-section{
6
+ display: none;
7
+ }
8
+ div.sp-testimonial-free-section .slick-list{
9
+ margin-right: -24px;
10
+ }
11
+ div.sp-testimonial-free-section.slick-initialized {
12
+ display: block;
13
+ }
14
+
15
+ .sp-testimonial-free-section .sp-testimonial-free-item:focus,
16
+ .sp-testimonial-free-section .slick-dots li.slick-active button:focus{
17
+ outline: none;
18
+ }
19
+ .sp-testimonial-free-section .sp-testimonial-free-item{
20
+ text-align: center;
21
+ padding-right: 24px;
22
+ }
23
+
24
+ .sp-testimonial-free-wrapper h2.sp-testimonial-free-section-title {
25
+ margin: 0;
26
+ padding: 0;
27
+ margin-bottom: 50px;
28
+ font-size: 25px;
29
+ line-height: 22px;
30
+ font-weight: 600;
31
+ font-style: normal;
32
+ text-align: center;
33
+ }
34
+ .sp-testimonial-free-section .tfree-testimonial-title {
35
+ margin: 0px 0px 18px 0px;
36
+ }
37
+ .sp-testimonial-free-section .tfree-testimonial-title h3{
38
+ font-size: 20px;
39
+ line-height: 30px;
40
+ text-transform: none;
41
+ text-align: center;
42
+ letter-spacing: normal;
43
+ font-weight: 600;
44
+ font-style: normal;
45
+ padding: 0;
46
+ margin: 0;
47
+ }
48
+ .sp-testimonial-free-section .tfree-client-testimonial {
49
+ font-size: 16px;
50
+ line-height: 26px;
51
+ text-transform: none;
52
+ text-align: center;
53
+ letter-spacing: normal;
54
+ font-weight: 400;
55
+ font-style: normal;
56
+ margin: 0px 0px 20px 0px;
57
+ }
58
+ .sp-testimonial-free-section .tfree-client-testimonial p.tfree-testimonial-content {
59
+ display: inline;
60
+ margin: 0;
61
+ padding: 0;
62
+ }
63
+ .sp-testimonial-free-section h2.tfree-client-name {
64
+ font-size: 16px;
65
+ line-height: 24px;
66
+ text-transform: none;
67
+ text-align: center;
68
+ letter-spacing: normal;
69
+ font-weight: 700;
70
+ font-style: normal;
71
+ margin: 0px 0px 8px 0px;
72
+ padding: 0;
73
+ }
74
+ .sp-testimonial-free-section .tfree-client-rating {
75
+ margin: 0px 0px 6px 0px;
76
+ text-align: center;
77
+ line-height: 1;
78
+ }
79
+ .sp-testimonial-free-section .tfree-client-rating i.fa {
80
+ font-size: 19px;
81
+ margin-right: -1px;
82
+ }
83
+ .sp-testimonial-free-section .tfree-client-designation {
84
+ font-size: 16px;
85
+ line-height: 24px;
86
+ text-transform: none;
87
+ text-align: center;
88
+ letter-spacing: normal;
89
+ font-weight: 400;
90
+ font-style: normal;
91
+ }
92
+
93
+ /* Image */
94
+ .sp-testimonial-free-section .sp-tfree-client-image{
95
+ margin: 0px 0px 22px 0px;
96
+ }
97
+ .sp-testimonial-free-section .sp-tfree-client-image img{
98
+ display: inline-block;
99
+ -webkit-border-radius: 50%;
100
+ -moz-border-radius: 50%;
101
+ border-radius: 50%;
102
+ }
103
+
104
+ /* Dots */
105
+ .sp-testimonial-free-section .slick-dots {
106
+ margin: 0;
107
+ margin-top: 20px;
108
+ padding: 0;
109
+ list-style: none;
110
+ text-align: center;
111
+ }
112
+ .sp-testimonial-free-section .slick-dots li {
113
+ display: inline-block;
114
+ border: 0;
115
+ padding: 0;
116
+ width: 13px;
117
+ height: 13px;
118
+ margin: 3px;
119
+ overflow: hidden;
120
+ }
121
+ .sp-testimonial-free-section .slick-dots li button {
122
+ border-radius: 50%;
123
+ text-indent: -999px;
124
+ width: 13px;
125
+ height: 13px;
126
+ padding: 0;
127
+ border: 0;
128
+ display: block;
129
+ }
130
+
131
+ /* Nav */
132
+ .sp-testimonial-free-section .slick-prev,
133
+ .sp-testimonial-free-section .slick-next{
134
+ font-size: 26px;
135
+ line-height: 26px;
136
+ -webkit-transition: all 0.3s ease;
137
+ -moz-transition: all 0.3s ease;
138
+ transition: all 0.3s ease;
139
+ text-align: center;
140
+ position: absolute;
141
+ z-index: 9;
142
+ cursor: pointer;
143
+ top: 50%;
144
+ margin-top: -14px;
145
+ }
146
+ .sp-testimonial-free-section .slick-prev{
147
+ left: 0;
148
+ }
149
+ .sp-testimonial-free-section .slick-next{
150
+ right: 0;
151
+ }
{assets → public/assets}/fonts/FontAwesome.otf RENAMED
File without changes
{assets → public/assets}/fonts/fontawesome-webfont.eot RENAMED
File without changes
{assets → public/assets}/fonts/fontawesome-webfont.svg RENAMED
File without changes
{assets → public/assets}/fonts/fontawesome-webfont.ttf RENAMED
File without changes
{assets → public/assets}/fonts/fontawesome-webfont.woff RENAMED
File without changes
{assets → public/assets}/fonts/fontawesome-webfont.woff2 RENAMED
File without changes
public/assets/js/slick.min.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ _ _ _ _
3
+ ___| (_) ___| | __ (_)___
4
+ / __| | |/ __| |/ / | / __|
5
+ \__ \ | | (__| < _ | \__ \
6
+ |___/_|_|\___|_|\_(_)/ |___/
7
+ |__/
8
+
9
+ Version: 1.6.0
10
+ Author: Ken Wheeler
11
+ Website: http://kenwheeler.github.io
12
+ Docs: http://kenwheeler.github.io/slick
13
+ Repo: http://github.com/kenwheeler/slick
14
+ Issues: http://github.com/kenwheeler/slick/issues
15
+
16
+ */
17
+ !function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";var b=window.Slick||{};b=function(){function c(c,d){var f,e=this;e.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(c),appendDots:a(c),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(b,c){return a('<button type="button" data-role="none" role="button" tabindex="0" />').text(c+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},e.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},a.extend(e,e.initials),e.activeBreakpoint=null,e.animType=null,e.animProp=null,e.breakpoints=[],e.breakpointSettings=[],e.cssTransitions=!1,e.focussed=!1,e.interrupted=!1,e.hidden="hidden",e.paused=!0,e.positionProp=null,e.respondTo=null,e.rowCount=1,e.shouldClick=!0,e.$slider=a(c),e.$slidesCache=null,e.transformType=null,e.transitionType=null,e.visibilityChange="visibilitychange",e.windowWidth=0,e.windowTimer=null,f=a(c).data("slick")||{},e.options=a.extend({},e.defaults,d,f),e.currentSlide=e.options.initialSlide,e.originalSettings=e.options,"undefined"!=typeof document.mozHidden?(e.hidden="mozHidden",e.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(e.hidden="webkitHidden",e.visibilityChange="webkitvisibilitychange"),e.autoPlay=a.proxy(e.autoPlay,e),e.autoPlayClear=a.proxy(e.autoPlayClear,e),e.autoPlayIterator=a.proxy(e.autoPlayIterator,e),e.changeSlide=a.proxy(e.changeSlide,e),e.clickHandler=a.proxy(e.clickHandler,e),e.selectHandler=a.proxy(e.selectHandler,e),e.setPosition=a.proxy(e.setPosition,e),e.swipeHandler=a.proxy(e.swipeHandler,e),e.dragHandler=a.proxy(e.dragHandler,e),e.keyHandler=a.proxy(e.keyHandler,e),e.instanceUid=b++,e.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,e.registerBreakpoints(),e.init(!0)}var b=0;return c}(),b.prototype.activateADA=function(){var a=this;a.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},b.prototype.addSlide=b.prototype.slickAdd=function(b,c,d){var e=this;if("boolean"==typeof c)d=c,c=null;else if(0>c||c>=e.slideCount)return!1;e.unload(),"number"==typeof c?0===c&&0===e.$slides.length?a(b).appendTo(e.$slideTrack):d?a(b).insertBefore(e.$slides.eq(c)):a(b).insertAfter(e.$slides.eq(c)):d===!0?a(b).prependTo(e.$slideTrack):a(b).appendTo(e.$slideTrack),e.$slides=e.$slideTrack.children(this.options.slide),e.$slideTrack.children(this.options.slide).detach(),e.$slideTrack.append(e.$slides),e.$slides.each(function(b,c){a(c).attr("data-slick-index",b)}),e.$slidesCache=e.$slides,e.reinit()},b.prototype.animateHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.animate({height:b},a.options.speed)}},b.prototype.animateSlide=function(b,c){var d={},e=this;e.animateHeight(),e.options.rtl===!0&&e.options.vertical===!1&&(b=-b),e.transformsEnabled===!1?e.options.vertical===!1?e.$slideTrack.animate({left:b},e.options.speed,e.options.easing,c):e.$slideTrack.animate({top:b},e.options.speed,e.options.easing,c):e.cssTransitions===!1?(e.options.rtl===!0&&(e.currentLeft=-e.currentLeft),a({animStart:e.currentLeft}).animate({animStart:b},{duration:e.options.speed,easing:e.options.easing,step:function(a){a=Math.ceil(a),e.options.vertical===!1?(d[e.animType]="translate("+a+"px, 0px)",e.$slideTrack.css(d)):(d[e.animType]="translate(0px,"+a+"px)",e.$slideTrack.css(d))},complete:function(){c&&c.call()}})):(e.applyTransition(),b=Math.ceil(b),e.options.vertical===!1?d[e.animType]="translate3d("+b+"px, 0px, 0px)":d[e.animType]="translate3d(0px,"+b+"px, 0px)",e.$slideTrack.css(d),c&&setTimeout(function(){e.disableTransition(),c.call()},e.options.speed))},b.prototype.getNavTarget=function(){var b=this,c=b.options.asNavFor;return c&&null!==c&&(c=a(c).not(b.$slider)),c},b.prototype.asNavFor=function(b){var c=this,d=c.getNavTarget();null!==d&&"object"==typeof d&&d.each(function(){var c=a(this).slick("getSlick");c.unslicked||c.slideHandler(b,!0)})},b.prototype.applyTransition=function(a){var b=this,c={};b.options.fade===!1?c[b.transitionType]=b.transformType+" "+b.options.speed+"ms "+b.options.cssEase:c[b.transitionType]="opacity "+b.options.speed+"ms "+b.options.cssEase,b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.autoPlay=function(){var a=this;a.autoPlayClear(),a.slideCount>a.options.slidesToShow&&(a.autoPlayTimer=setInterval(a.autoPlayIterator,a.options.autoplaySpeed))},b.prototype.autoPlayClear=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer)},b.prototype.autoPlayIterator=function(){var a=this,b=a.currentSlide+a.options.slidesToScroll;a.paused||a.interrupted||a.focussed||(a.options.infinite===!1&&(1===a.direction&&a.currentSlide+1===a.slideCount-1?a.direction=0:0===a.direction&&(b=a.currentSlide-a.options.slidesToScroll,a.currentSlide-1===0&&(a.direction=1))),a.slideHandler(b))},b.prototype.buildArrows=function(){var b=this;b.options.arrows===!0&&(b.$prevArrow=a(b.options.prevArrow).addClass("slick-arrow"),b.$nextArrow=a(b.options.nextArrow).addClass("slick-arrow"),b.slideCount>b.options.slidesToShow?(b.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.prependTo(b.options.appendArrows),b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.appendTo(b.options.appendArrows),b.options.infinite!==!0&&b.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):b.$prevArrow.add(b.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},b.prototype.buildDots=function(){var c,d,b=this;if(b.options.dots===!0&&b.slideCount>b.options.slidesToShow){for(b.$slider.addClass("slick-dotted"),d=a("<ul />").addClass(b.options.dotsClass),c=0;c<=b.getDotCount();c+=1)d.append(a("<li />").append(b.options.customPaging.call(this,b,c)));b.$dots=d.appendTo(b.options.appendDots),b.$dots.find("li").first().addClass("slick-active").attr("aria-hidden","false")}},b.prototype.buildOut=function(){var b=this;b.$slides=b.$slider.children(b.options.slide+":not(.slick-cloned)").addClass("slick-slide"),b.slideCount=b.$slides.length,b.$slides.each(function(b,c){a(c).attr("data-slick-index",b).data("originalStyling",a(c).attr("style")||"")}),b.$slider.addClass("slick-slider"),b.$slideTrack=0===b.slideCount?a('<div class="slick-track"/>').appendTo(b.$slider):b.$slides.wrapAll('<div class="slick-track"/>').parent(),b.$list=b.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent(),b.$slideTrack.css("opacity",0),(b.options.centerMode===!0||b.options.swipeToSlide===!0)&&(b.options.slidesToScroll=1),a("img[data-lazy]",b.$slider).not("[src]").addClass("slick-loading"),b.setupInfinite(),b.buildArrows(),b.buildDots(),b.updateDots(),b.setSlideClasses("number"==typeof b.currentSlide?b.currentSlide:0),b.options.draggable===!0&&b.$list.addClass("draggable")},b.prototype.buildRows=function(){var b,c,d,e,f,g,h,a=this;if(e=document.createDocumentFragment(),g=a.$slider.children(),a.options.rows>1){for(h=a.options.slidesPerRow*a.options.rows,f=Math.ceil(g.length/h),b=0;f>b;b++){var i=document.createElement("div");for(c=0;c<a.options.rows;c++){var j=document.createElement("div");for(d=0;d<a.options.slidesPerRow;d++){var k=b*h+(c*a.options.slidesPerRow+d);g.get(k)&&j.appendChild(g.get(k))}i.appendChild(j)}e.appendChild(i)}a.$slider.empty().append(e),a.$slider.children().children().children().css({width:100/a.options.slidesPerRow+"%",display:"inline-block"})}},b.prototype.checkResponsive=function(b,c){var e,f,g,d=this,h=!1,i=d.$slider.width(),j=window.innerWidth||a(window).width();if("window"===d.respondTo?g=j:"slider"===d.respondTo?g=i:"min"===d.respondTo&&(g=Math.min(j,i)),d.options.responsive&&d.options.responsive.length&&null!==d.options.responsive){f=null;for(e in d.breakpoints)d.breakpoints.hasOwnProperty(e)&&(d.originalSettings.mobileFirst===!1?g<d.breakpoints[e]&&(f=d.breakpoints[e]):g>d.breakpoints[e]&&(f=d.breakpoints[e]));null!==f?null!==d.activeBreakpoint?(f!==d.activeBreakpoint||c)&&(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):null!==d.activeBreakpoint&&(d.activeBreakpoint=null,d.options=d.originalSettings,b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b),h=f),b||h===!1||d.$slider.trigger("breakpoint",[d,h])}},b.prototype.changeSlide=function(b,c){var f,g,h,d=this,e=a(b.currentTarget);switch(e.is("a")&&b.preventDefault(),e.is("li")||(e=e.closest("li")),h=d.slideCount%d.options.slidesToScroll!==0,f=h?0:(d.slideCount-d.currentSlide)%d.options.slidesToScroll,b.data.message){case"previous":g=0===f?d.options.slidesToScroll:d.options.slidesToShow-f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide-g,!1,c);break;case"next":g=0===f?d.options.slidesToScroll:f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide+g,!1,c);break;case"index":var i=0===b.data.index?0:b.data.index||e.index()*d.options.slidesToScroll;d.slideHandler(d.checkNavigable(i),!1,c),e.children().trigger("focus");break;default:return}},b.prototype.checkNavigable=function(a){var c,d,b=this;if(c=b.getNavigableIndexes(),d=0,a>c[c.length-1])a=c[c.length-1];else for(var e in c){if(a<c[e]){a=d;break}d=c[e]}return a},b.prototype.cleanUpEvents=function(){var b=this;b.options.dots&&null!==b.$dots&&a("li",b.$dots).off("click.slick",b.changeSlide).off("mouseenter.slick",a.proxy(b.interrupt,b,!0)).off("mouseleave.slick",a.proxy(b.interrupt,b,!1)),b.$slider.off("focus.slick blur.slick"),b.options.arrows===!0&&b.slideCount>b.options.slidesToShow&&(b.$prevArrow&&b.$prevArrow.off("click.slick",b.changeSlide),b.$nextArrow&&b.$nextArrow.off("click.slick",b.changeSlide)),b.$list.off("touchstart.slick mousedown.slick",b.swipeHandler),b.$list.off("touchmove.slick mousemove.slick",b.swipeHandler),b.$list.off("touchend.slick mouseup.slick",b.swipeHandler),b.$list.off("touchcancel.slick mouseleave.slick",b.swipeHandler),b.$list.off("click.slick",b.clickHandler),a(document).off(b.visibilityChange,b.visibility),b.cleanUpSlideEvents(),b.options.accessibility===!0&&b.$list.off("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().off("click.slick",b.selectHandler),a(window).off("orientationchange.slick.slick-"+b.instanceUid,b.orientationChange),a(window).off("resize.slick.slick-"+b.instanceUid,b.resize),a("[draggable!=true]",b.$slideTrack).off("dragstart",b.preventDefault),a(window).off("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).off("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.cleanUpSlideEvents=function(){var b=this;b.$list.off("mouseenter.slick",a.proxy(b.interrupt,b,!0)),b.$list.off("mouseleave.slick",a.proxy(b.interrupt,b,!1))},b.prototype.cleanUpRows=function(){var b,a=this;a.options.rows>1&&(b=a.$slides.children().children(),b.removeAttr("style"),a.$slider.empty().append(b))},b.prototype.clickHandler=function(a){var b=this;b.shouldClick===!1&&(a.stopImmediatePropagation(),a.stopPropagation(),a.preventDefault())},b.prototype.destroy=function(b){var c=this;c.autoPlayClear(),c.touchObject={},c.cleanUpEvents(),a(".slick-cloned",c.$slider).detach(),c.$dots&&c.$dots.remove(),c.$prevArrow&&c.$prevArrow.length&&(c.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.prevArrow)&&c.$prevArrow.remove()),c.$nextArrow&&c.$nextArrow.length&&(c.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.nextArrow)&&c.$nextArrow.remove()),c.$slides&&(c.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){a(this).attr("style",a(this).data("originalStyling"))}),c.$slideTrack.children(this.options.slide).detach(),c.$slideTrack.detach(),c.$list.detach(),c.$slider.append(c.$slides)),c.cleanUpRows(),c.$slider.removeClass("slick-slider"),c.$slider.removeClass("slick-initialized"),c.$slider.removeClass("slick-dotted"),c.unslicked=!0,b||c.$slider.trigger("destroy",[c])},b.prototype.disableTransition=function(a){var b=this,c={};c[b.transitionType]="",b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.fadeSlide=function(a,b){var c=this;c.cssTransitions===!1?(c.$slides.eq(a).css({zIndex:c.options.zIndex}),c.$slides.eq(a).animate({opacity:1},c.options.speed,c.options.easing,b)):(c.applyTransition(a),c.$slides.eq(a).css({opacity:1,zIndex:c.options.zIndex}),b&&setTimeout(function(){c.disableTransition(a),b.call()},c.options.speed))},b.prototype.fadeSlideOut=function(a){var b=this;b.cssTransitions===!1?b.$slides.eq(a).animate({opacity:0,zIndex:b.options.zIndex-2},b.options.speed,b.options.easing):(b.applyTransition(a),b.$slides.eq(a).css({opacity:0,zIndex:b.options.zIndex-2}))},b.prototype.filterSlides=b.prototype.slickFilter=function(a){var b=this;null!==a&&(b.$slidesCache=b.$slides,b.unload(),b.$slideTrack.children(this.options.slide).detach(),b.$slidesCache.filter(a).appendTo(b.$slideTrack),b.reinit())},b.prototype.focusHandler=function(){var b=this;b.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*:not(.slick-arrow)",function(c){c.stopImmediatePropagation();var d=a(this);setTimeout(function(){b.options.pauseOnFocus&&(b.focussed=d.is(":focus"),b.autoPlay())},0)})},b.prototype.getCurrent=b.prototype.slickCurrentSlide=function(){var a=this;return a.currentSlide},b.prototype.getDotCount=function(){var a=this,b=0,c=0,d=0;if(a.options.infinite===!0)for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else if(a.options.centerMode===!0)d=a.slideCount;else if(a.options.asNavFor)for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else d=1+Math.ceil((a.slideCount-a.options.slidesToShow)/a.options.slidesToScroll);return d-1},b.prototype.getLeft=function(a){var c,d,f,b=this,e=0;return b.slideOffset=0,d=b.$slides.first().outerHeight(!0),b.options.infinite===!0?(b.slideCount>b.options.slidesToShow&&(b.slideOffset=b.slideWidth*b.options.slidesToShow*-1,e=d*b.options.slidesToShow*-1),b.slideCount%b.options.slidesToScroll!==0&&a+b.options.slidesToScroll>b.slideCount&&b.slideCount>b.options.slidesToShow&&(a>b.slideCount?(b.slideOffset=(b.options.slidesToShow-(a-b.slideCount))*b.slideWidth*-1,e=(b.options.slidesToShow-(a-b.slideCount))*d*-1):(b.slideOffset=b.slideCount%b.options.slidesToScroll*b.slideWidth*-1,e=b.slideCount%b.options.slidesToScroll*d*-1))):a+b.options.slidesToShow>b.slideCount&&(b.slideOffset=(a+b.options.slidesToShow-b.slideCount)*b.slideWidth,e=(a+b.options.slidesToShow-b.slideCount)*d),b.slideCount<=b.options.slidesToShow&&(b.slideOffset=0,e=0),b.options.centerMode===!0&&b.options.infinite===!0?b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)-b.slideWidth:b.options.centerMode===!0&&(b.slideOffset=0,b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)),c=b.options.vertical===!1?a*b.slideWidth*-1+b.slideOffset:a*d*-1+e,b.options.variableWidth===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow),c=b.options.rtl===!0?f[0]?-1*(b.$slideTrack.width()-f[0].offsetLeft-f.width()):0:f[0]?-1*f[0].offsetLeft:0,b.options.centerMode===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow+1),c=b.options.rtl===!0?f[0]?-1*(b.$slideTrack.width()-f[0].offsetLeft-f.width()):0:f[0]?-1*f[0].offsetLeft:0,c+=(b.$list.width()-f.outerWidth())/2)),c},b.prototype.getOption=b.prototype.slickGetOption=function(a){var b=this;return b.options[a]},b.prototype.getNavigableIndexes=function(){var e,a=this,b=0,c=0,d=[];for(a.options.infinite===!1?e=a.slideCount:(b=-1*a.options.slidesToScroll,c=-1*a.options.slidesToScroll,e=2*a.slideCount);e>b;)d.push(b),b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;return d},b.prototype.getSlick=function(){return this},b.prototype.getSlideCount=function(){var c,d,e,b=this;return e=b.options.centerMode===!0?b.slideWidth*Math.floor(b.options.slidesToShow/2):0,b.options.swipeToSlide===!0?(b.$slideTrack.find(".slick-slide").each(function(c,f){return f.offsetLeft-e+a(f).outerWidth()/2>-1*b.swipeLeft?(d=f,!1):void 0}),c=Math.abs(a(d).attr("data-slick-index")-b.currentSlide)||1):b.options.slidesToScroll},b.prototype.goTo=b.prototype.slickGoTo=function(a,b){var c=this;c.changeSlide({data:{message:"index",index:parseInt(a)}},b)},b.prototype.init=function(b){var c=this;a(c.$slider).hasClass("slick-initialized")||(a(c.$slider).addClass("slick-initialized"),c.buildRows(),c.buildOut(),c.setProps(),c.startLoad(),c.loadSlider(),c.initializeEvents(),c.updateArrows(),c.updateDots(),c.checkResponsive(!0),c.focusHandler()),b&&c.$slider.trigger("init",[c]),c.options.accessibility===!0&&c.initADA(),c.options.autoplay&&(c.paused=!1,c.autoPlay())},b.prototype.initADA=function(){var b=this;b.$slides.add(b.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),b.$slideTrack.attr("role","listbox"),b.$slides.not(b.$slideTrack.find(".slick-cloned")).each(function(c){a(this).attr({role:"option","aria-describedby":"slick-slide"+b.instanceUid+c})}),null!==b.$dots&&b.$dots.attr("role","tablist").find("li").each(function(c){a(this).attr({role:"presentation","aria-selected":"false","aria-controls":"navigation"+b.instanceUid+c,id:"slick-slide"+b.instanceUid+c})}).first().attr("aria-selected","true").end().find("button").attr("role","button").end().closest("div").attr("role","toolbar"),b.activateADA()},b.prototype.initArrowEvents=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},a.changeSlide),a.$nextArrow.off("click.slick").on("click.slick",{message:"next"},a.changeSlide))},b.prototype.initDotEvents=function(){var b=this;b.options.dots===!0&&b.slideCount>b.options.slidesToShow&&a("li",b.$dots).on("click.slick",{message:"index"},b.changeSlide),b.options.dots===!0&&b.options.pauseOnDotsHover===!0&&a("li",b.$dots).on("mouseenter.slick",a.proxy(b.interrupt,b,!0)).on("mouseleave.slick",a.proxy(b.interrupt,b,!1))},b.prototype.initSlideEvents=function(){var b=this;b.options.pauseOnHover&&(b.$list.on("mouseenter.slick",a.proxy(b.interrupt,b,!0)),b.$list.on("mouseleave.slick",a.proxy(b.interrupt,b,!1)))},b.prototype.initializeEvents=function(){var b=this;b.initArrowEvents(),b.initDotEvents(),b.initSlideEvents(),b.$list.on("touchstart.slick mousedown.slick",{action:"start"},b.swipeHandler),b.$list.on("touchmove.slick mousemove.slick",{action:"move"},b.swipeHandler),b.$list.on("touchend.slick mouseup.slick",{action:"end"},b.swipeHandler),b.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},b.swipeHandler),b.$list.on("click.slick",b.clickHandler),a(document).on(b.visibilityChange,a.proxy(b.visibility,b)),b.options.accessibility===!0&&b.$list.on("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),a(window).on("orientationchange.slick.slick-"+b.instanceUid,a.proxy(b.orientationChange,b)),a(window).on("resize.slick.slick-"+b.instanceUid,a.proxy(b.resize,b)),a("[draggable!=true]",b.$slideTrack).on("dragstart",b.preventDefault),a(window).on("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).on("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.initUI=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.show(),a.$nextArrow.show()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.show()},b.prototype.keyHandler=function(a){var b=this;a.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===a.keyCode&&b.options.accessibility===!0?b.changeSlide({data:{message:b.options.rtl===!0?"next":"previous"}}):39===a.keyCode&&b.options.accessibility===!0&&b.changeSlide({data:{message:b.options.rtl===!0?"previous":"next"}}))},b.prototype.lazyLoad=function(){function g(c){a("img[data-lazy]",c).each(function(){var c=a(this),d=a(this).attr("data-lazy"),e=document.createElement("img");e.onload=function(){c.animate({opacity:0},100,function(){c.attr("src",d).animate({opacity:1},200,function(){c.removeAttr("data-lazy").removeClass("slick-loading")}),b.$slider.trigger("lazyLoaded",[b,c,d])})},e.onerror=function(){c.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),b.$slider.trigger("lazyLoadError",[b,c,d])},e.src=d})}var c,d,e,f,b=this;b.options.centerMode===!0?b.options.infinite===!0?(e=b.currentSlide+(b.options.slidesToShow/2+1),f=e+b.options.slidesToShow+2):(e=Math.max(0,b.currentSlide-(b.options.slidesToShow/2+1)),f=2+(b.options.slidesToShow/2+1)+b.currentSlide):(e=b.options.infinite?b.options.slidesToShow+b.currentSlide:b.currentSlide,f=Math.ceil(e+b.options.slidesToShow),b.options.fade===!0&&(e>0&&e--,f<=b.slideCount&&f++)),c=b.$slider.find(".slick-slide").slice(e,f),g(c),b.slideCount<=b.options.slidesToShow?(d=b.$slider.find(".slick-slide"),g(d)):b.currentSlide>=b.slideCount-b.options.slidesToShow?(d=b.$slider.find(".slick-cloned").slice(0,b.options.slidesToShow),g(d)):0===b.currentSlide&&(d=b.$slider.find(".slick-cloned").slice(-1*b.options.slidesToShow),g(d))},b.prototype.loadSlider=function(){var a=this;a.setPosition(),a.$slideTrack.css({opacity:1}),a.$slider.removeClass("slick-loading"),a.initUI(),"progressive"===a.options.lazyLoad&&a.progressiveLazyLoad()},b.prototype.next=b.prototype.slickNext=function(){var a=this;a.changeSlide({data:{message:"next"}})},b.prototype.orientationChange=function(){var a=this;a.checkResponsive(),a.setPosition()},b.prototype.pause=b.prototype.slickPause=function(){var a=this;a.autoPlayClear(),a.paused=!0},b.prototype.play=b.prototype.slickPlay=function(){var a=this;a.autoPlay(),a.options.autoplay=!0,a.paused=!1,a.focussed=!1,a.interrupted=!1},b.prototype.postSlide=function(a){var b=this;b.unslicked||(b.$slider.trigger("afterChange",[b,a]),b.animating=!1,b.setPosition(),b.swipeLeft=null,b.options.autoplay&&b.autoPlay(),b.options.accessibility===!0&&b.initADA())},b.prototype.prev=b.prototype.slickPrev=function(){var a=this;a.changeSlide({data:{message:"previous"}})},b.prototype.preventDefault=function(a){a.preventDefault()},b.prototype.progressiveLazyLoad=function(b){b=b||1;var e,f,g,c=this,d=a("img[data-lazy]",c.$slider);d.length?(e=d.first(),f=e.attr("data-lazy"),g=document.createElement("img"),g.onload=function(){e.attr("src",f).removeAttr("data-lazy").removeClass("slick-loading"),c.options.adaptiveHeight===!0&&c.setPosition(),c.$slider.trigger("lazyLoaded",[c,e,f]),c.progressiveLazyLoad()},g.onerror=function(){3>b?setTimeout(function(){c.progressiveLazyLoad(b+1)},500):(e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),c.$slider.trigger("lazyLoadError",[c,e,f]),c.progressiveLazyLoad())},g.src=f):c.$slider.trigger("allImagesLoaded",[c])},b.prototype.refresh=function(b){var d,e,c=this;e=c.slideCount-c.options.slidesToShow,!c.options.infinite&&c.currentSlide>e&&(c.currentSlide=e),c.slideCount<=c.options.slidesToShow&&(c.currentSlide=0),d=c.currentSlide,c.destroy(!0),a.extend(c,c.initials,{currentSlide:d}),c.init(),b||c.changeSlide({data:{message:"index",index:d}},!1)},b.prototype.registerBreakpoints=function(){var c,d,e,b=this,f=b.options.responsive||null;if("array"===a.type(f)&&f.length){b.respondTo=b.options.respondTo||"window";for(c in f)if(e=b.breakpoints.length-1,d=f[c].breakpoint,f.hasOwnProperty(c)){for(;e>=0;)b.breakpoints[e]&&b.breakpoints[e]===d&&b.breakpoints.splice(e,1),e--;b.breakpoints.push(d),b.breakpointSettings[d]=f[c].settings}b.breakpoints.sort(function(a,c){return b.options.mobileFirst?a-c:c-a})}},b.prototype.reinit=function(){var b=this;b.$slides=b.$slideTrack.children(b.options.slide).addClass("slick-slide"),b.slideCount=b.$slides.length,b.currentSlide>=b.slideCount&&0!==b.currentSlide&&(b.currentSlide=b.currentSlide-b.options.slidesToScroll),b.slideCount<=b.options.slidesToShow&&(b.currentSlide=0),b.registerBreakpoints(),b.setProps(),b.setupInfinite(),b.buildArrows(),b.updateArrows(),b.initArrowEvents(),b.buildDots(),b.updateDots(),b.initDotEvents(),b.cleanUpSlideEvents(),b.initSlideEvents(),b.checkResponsive(!1,!0),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),b.setSlideClasses("number"==typeof b.currentSlide?b.currentSlide:0),b.setPosition(),b.focusHandler(),b.paused=!b.options.autoplay,b.autoPlay(),b.$slider.trigger("reInit",[b])},b.prototype.resize=function(){var b=this;a(window).width()!==b.windowWidth&&(clearTimeout(b.windowDelay),b.windowDelay=window.setTimeout(function(){b.windowWidth=a(window).width(),b.checkResponsive(),b.unslicked||b.setPosition()},50))},b.prototype.removeSlide=b.prototype.slickRemove=function(a,b,c){var d=this;return"boolean"==typeof a?(b=a,a=b===!0?0:d.slideCount-1):a=b===!0?--a:a,d.slideCount<1||0>a||a>d.slideCount-1?!1:(d.unload(),c===!0?d.$slideTrack.children().remove():d.$slideTrack.children(this.options.slide).eq(a).remove(),d.$slides=d.$slideTrack.children(this.options.slide),d.$slideTrack.children(this.options.slide).detach(),d.$slideTrack.append(d.$slides),d.$slidesCache=d.$slides,void d.reinit())},b.prototype.setCSS=function(a){var d,e,b=this,c={};b.options.rtl===!0&&(a=-a),d="left"==b.positionProp?Math.ceil(a)+"px":"0px",e="top"==b.positionProp?Math.ceil(a)+"px":"0px",c[b.positionProp]=a,b.transformsEnabled===!1?b.$slideTrack.css(c):(c={},b.cssTransitions===!1?(c[b.animType]="translate("+d+", "+e+")",b.$slideTrack.css(c)):(c[b.animType]="translate3d("+d+", "+e+", 0px)",b.$slideTrack.css(c)))},b.prototype.setDimensions=function(){var a=this;a.options.vertical===!1?a.options.centerMode===!0&&a.$list.css({padding:"0px "+a.options.centerPadding}):(a.$list.height(a.$slides.first().outerHeight(!0)*a.options.slidesToShow),a.options.centerMode===!0&&a.$list.css({padding:a.options.centerPadding+" 0px"})),a.listWidth=a.$list.width(),a.listHeight=a.$list.height(),a.options.vertical===!1&&a.options.variableWidth===!1?(a.slideWidth=Math.ceil(a.listWidth/a.options.slidesToShow),a.$slideTrack.width(Math.ceil(a.slideWidth*a.$slideTrack.children(".slick-slide").length))):a.options.variableWidth===!0?a.$slideTrack.width(5e3*a.slideCount):(a.slideWidth=Math.ceil(a.listWidth),a.$slideTrack.height(Math.ceil(a.$slides.first().outerHeight(!0)*a.$slideTrack.children(".slick-slide").length)));var b=a.$slides.first().outerWidth(!0)-a.$slides.first().width();a.options.variableWidth===!1&&a.$slideTrack.children(".slick-slide").width(a.slideWidth-b)},b.prototype.setFade=function(){var c,b=this;b.$slides.each(function(d,e){c=b.slideWidth*d*-1,b.options.rtl===!0?a(e).css({position:"relative",right:c,top:0,zIndex:b.options.zIndex-2,opacity:0}):a(e).css({position:"relative",left:c,top:0,zIndex:b.options.zIndex-2,opacity:0})}),b.$slides.eq(b.currentSlide).css({zIndex:b.options.zIndex-1,opacity:1})},b.prototype.setHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.css("height",b)}},b.prototype.setOption=b.prototype.slickSetOption=function(){var c,d,e,f,h,b=this,g=!1;if("object"===a.type(arguments[0])?(e=arguments[0],g=arguments[1],h="multiple"):"string"===a.type(arguments[0])&&(e=arguments[0],f=arguments[1],g=arguments[2],"responsive"===arguments[0]&&"array"===a.type(arguments[1])?h="responsive":"undefined"!=typeof arguments[1]&&(h="single")),"single"===h)b.options[e]=f;else if("multiple"===h)a.each(e,function(a,c){b.options[a]=c});else if("responsive"===h)for(d in f)if("array"!==a.type(b.options.responsive))b.options.responsive=[f[d]];else{for(c=b.options.responsive.length-1;c>=0;)b.options.responsive[c].breakpoint===f[d].breakpoint&&b.options.responsive.splice(c,1),c--;b.options.responsive.push(f[d])}g&&(b.unload(),b.reinit())},b.prototype.setPosition=function(){var a=this;a.setDimensions(),a.setHeight(),a.options.fade===!1?a.setCSS(a.getLeft(a.currentSlide)):a.setFade(),a.$slider.trigger("setPosition",[a])},b.prototype.setProps=function(){var a=this,b=document.body.style;a.positionProp=a.options.vertical===!0?"top":"left","top"===a.positionProp?a.$slider.addClass("slick-vertical"):a.$slider.removeClass("slick-vertical"),(void 0!==b.WebkitTransition||void 0!==b.MozTransition||void 0!==b.msTransition)&&a.options.useCSS===!0&&(a.cssTransitions=!0),a.options.fade&&("number"==typeof a.options.zIndex?a.options.zIndex<3&&(a.options.zIndex=3):a.options.zIndex=a.defaults.zIndex),void 0!==b.OTransform&&(a.animType="OTransform",a.transformType="-o-transform",a.transitionType="OTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.MozTransform&&(a.animType="MozTransform",a.transformType="-moz-transform",a.transitionType="MozTransition",void 0===b.perspectiveProperty&&void 0===b.MozPerspective&&(a.animType=!1)),void 0!==b.webkitTransform&&(a.animType="webkitTransform",a.transformType="-webkit-transform",a.transitionType="webkitTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.msTransform&&(a.animType="msTransform",a.transformType="-ms-transform",a.transitionType="msTransition",void 0===b.msTransform&&(a.animType=!1)),void 0!==b.transform&&a.animType!==!1&&(a.animType="transform",a.transformType="transform",a.transitionType="transition"),a.transformsEnabled=a.options.useTransform&&null!==a.animType&&a.animType!==!1},b.prototype.setSlideClasses=function(a){var c,d,e,f,b=this;d=b.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),b.$slides.eq(a).addClass("slick-current"),b.options.centerMode===!0?(c=Math.floor(b.options.slidesToShow/2),b.options.infinite===!0&&(a>=c&&a<=b.slideCount-1-c?b.$slides.slice(a-c,a+c+1).addClass("slick-active").attr("aria-hidden","false"):(e=b.options.slidesToShow+a,
18
+ d.slice(e-c+1,e+c+2).addClass("slick-active").attr("aria-hidden","false")),0===a?d.eq(d.length-1-b.options.slidesToShow).addClass("slick-center"):a===b.slideCount-1&&d.eq(b.options.slidesToShow).addClass("slick-center")),b.$slides.eq(a).addClass("slick-center")):a>=0&&a<=b.slideCount-b.options.slidesToShow?b.$slides.slice(a,a+b.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):d.length<=b.options.slidesToShow?d.addClass("slick-active").attr("aria-hidden","false"):(f=b.slideCount%b.options.slidesToShow,e=b.options.infinite===!0?b.options.slidesToShow+a:a,b.options.slidesToShow==b.options.slidesToScroll&&b.slideCount-a<b.options.slidesToShow?d.slice(e-(b.options.slidesToShow-f),e+f).addClass("slick-active").attr("aria-hidden","false"):d.slice(e,e+b.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false")),"ondemand"===b.options.lazyLoad&&b.lazyLoad()},b.prototype.setupInfinite=function(){var c,d,e,b=this;if(b.options.fade===!0&&(b.options.centerMode=!1),b.options.infinite===!0&&b.options.fade===!1&&(d=null,b.slideCount>b.options.slidesToShow)){for(e=b.options.centerMode===!0?b.options.slidesToShow+1:b.options.slidesToShow,c=b.slideCount;c>b.slideCount-e;c-=1)d=c-1,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d-b.slideCount).prependTo(b.$slideTrack).addClass("slick-cloned");for(c=0;e>c;c+=1)d=c,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d+b.slideCount).appendTo(b.$slideTrack).addClass("slick-cloned");b.$slideTrack.find(".slick-cloned").find("[id]").each(function(){a(this).attr("id","")})}},b.prototype.interrupt=function(a){var b=this;a||b.autoPlay(),b.interrupted=a},b.prototype.selectHandler=function(b){var c=this,d=a(b.target).is(".slick-slide")?a(b.target):a(b.target).parents(".slick-slide"),e=parseInt(d.attr("data-slick-index"));return e||(e=0),c.slideCount<=c.options.slidesToShow?(c.setSlideClasses(e),void c.asNavFor(e)):void c.slideHandler(e)},b.prototype.slideHandler=function(a,b,c){var d,e,f,g,j,h=null,i=this;return b=b||!1,i.animating===!0&&i.options.waitForAnimate===!0||i.options.fade===!0&&i.currentSlide===a||i.slideCount<=i.options.slidesToShow?void 0:(b===!1&&i.asNavFor(a),d=a,h=i.getLeft(d),g=i.getLeft(i.currentSlide),i.currentLeft=null===i.swipeLeft?g:i.swipeLeft,i.options.infinite===!1&&i.options.centerMode===!1&&(0>a||a>i.getDotCount()*i.options.slidesToScroll)?void(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d))):i.options.infinite===!1&&i.options.centerMode===!0&&(0>a||a>i.slideCount-i.options.slidesToScroll)?void(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d))):(i.options.autoplay&&clearInterval(i.autoPlayTimer),e=0>d?i.slideCount%i.options.slidesToScroll!==0?i.slideCount-i.slideCount%i.options.slidesToScroll:i.slideCount+d:d>=i.slideCount?i.slideCount%i.options.slidesToScroll!==0?0:d-i.slideCount:d,i.animating=!0,i.$slider.trigger("beforeChange",[i,i.currentSlide,e]),f=i.currentSlide,i.currentSlide=e,i.setSlideClasses(i.currentSlide),i.options.asNavFor&&(j=i.getNavTarget(),j=j.slick("getSlick"),j.slideCount<=j.options.slidesToShow&&j.setSlideClasses(i.currentSlide)),i.updateDots(),i.updateArrows(),i.options.fade===!0?(c!==!0?(i.fadeSlideOut(f),i.fadeSlide(e,function(){i.postSlide(e)})):i.postSlide(e),void i.animateHeight()):void(c!==!0?i.animateSlide(h,function(){i.postSlide(e)}):i.postSlide(e))))},b.prototype.startLoad=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.hide(),a.$nextArrow.hide()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.hide(),a.$slider.addClass("slick-loading")},b.prototype.swipeDirection=function(){var a,b,c,d,e=this;return a=e.touchObject.startX-e.touchObject.curX,b=e.touchObject.startY-e.touchObject.curY,c=Math.atan2(b,a),d=Math.round(180*c/Math.PI),0>d&&(d=360-Math.abs(d)),45>=d&&d>=0?e.options.rtl===!1?"left":"right":360>=d&&d>=315?e.options.rtl===!1?"left":"right":d>=135&&225>=d?e.options.rtl===!1?"right":"left":e.options.verticalSwiping===!0?d>=35&&135>=d?"down":"up":"vertical"},b.prototype.swipeEnd=function(a){var c,d,b=this;if(b.dragging=!1,b.interrupted=!1,b.shouldClick=b.touchObject.swipeLength>10?!1:!0,void 0===b.touchObject.curX)return!1;if(b.touchObject.edgeHit===!0&&b.$slider.trigger("edge",[b,b.swipeDirection()]),b.touchObject.swipeLength>=b.touchObject.minSwipe){switch(d=b.swipeDirection()){case"left":case"down":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide+b.getSlideCount()):b.currentSlide+b.getSlideCount(),b.currentDirection=0;break;case"right":case"up":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide-b.getSlideCount()):b.currentSlide-b.getSlideCount(),b.currentDirection=1}"vertical"!=d&&(b.slideHandler(c),b.touchObject={},b.$slider.trigger("swipe",[b,d]))}else b.touchObject.startX!==b.touchObject.curX&&(b.slideHandler(b.currentSlide),b.touchObject={})},b.prototype.swipeHandler=function(a){var b=this;if(!(b.options.swipe===!1||"ontouchend"in document&&b.options.swipe===!1||b.options.draggable===!1&&-1!==a.type.indexOf("mouse")))switch(b.touchObject.fingerCount=a.originalEvent&&void 0!==a.originalEvent.touches?a.originalEvent.touches.length:1,b.touchObject.minSwipe=b.listWidth/b.options.touchThreshold,b.options.verticalSwiping===!0&&(b.touchObject.minSwipe=b.listHeight/b.options.touchThreshold),a.data.action){case"start":b.swipeStart(a);break;case"move":b.swipeMove(a);break;case"end":b.swipeEnd(a)}},b.prototype.swipeMove=function(a){var d,e,f,g,h,b=this;return h=void 0!==a.originalEvent?a.originalEvent.touches:null,!b.dragging||h&&1!==h.length?!1:(d=b.getLeft(b.currentSlide),b.touchObject.curX=void 0!==h?h[0].pageX:a.clientX,b.touchObject.curY=void 0!==h?h[0].pageY:a.clientY,b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curX-b.touchObject.startX,2))),b.options.verticalSwiping===!0&&(b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curY-b.touchObject.startY,2)))),e=b.swipeDirection(),"vertical"!==e?(void 0!==a.originalEvent&&b.touchObject.swipeLength>4&&a.preventDefault(),g=(b.options.rtl===!1?1:-1)*(b.touchObject.curX>b.touchObject.startX?1:-1),b.options.verticalSwiping===!0&&(g=b.touchObject.curY>b.touchObject.startY?1:-1),f=b.touchObject.swipeLength,b.touchObject.edgeHit=!1,b.options.infinite===!1&&(0===b.currentSlide&&"right"===e||b.currentSlide>=b.getDotCount()&&"left"===e)&&(f=b.touchObject.swipeLength*b.options.edgeFriction,b.touchObject.edgeHit=!0),b.options.vertical===!1?b.swipeLeft=d+f*g:b.swipeLeft=d+f*(b.$list.height()/b.listWidth)*g,b.options.verticalSwiping===!0&&(b.swipeLeft=d+f*g),b.options.fade===!0||b.options.touchMove===!1?!1:b.animating===!0?(b.swipeLeft=null,!1):void b.setCSS(b.swipeLeft)):void 0)},b.prototype.swipeStart=function(a){var c,b=this;return b.interrupted=!0,1!==b.touchObject.fingerCount||b.slideCount<=b.options.slidesToShow?(b.touchObject={},!1):(void 0!==a.originalEvent&&void 0!==a.originalEvent.touches&&(c=a.originalEvent.touches[0]),b.touchObject.startX=b.touchObject.curX=void 0!==c?c.pageX:a.clientX,b.touchObject.startY=b.touchObject.curY=void 0!==c?c.pageY:a.clientY,void(b.dragging=!0))},b.prototype.unfilterSlides=b.prototype.slickUnfilter=function(){var a=this;null!==a.$slidesCache&&(a.unload(),a.$slideTrack.children(this.options.slide).detach(),a.$slidesCache.appendTo(a.$slideTrack),a.reinit())},b.prototype.unload=function(){var b=this;a(".slick-cloned",b.$slider).remove(),b.$dots&&b.$dots.remove(),b.$prevArrow&&b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.remove(),b.$nextArrow&&b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.remove(),b.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},b.prototype.unslick=function(a){var b=this;b.$slider.trigger("unslick",[b,a]),b.destroy()},b.prototype.updateArrows=function(){var b,a=this;b=Math.floor(a.options.slidesToShow/2),a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&!a.options.infinite&&(a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===a.currentSlide?(a.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-a.options.slidesToShow&&a.options.centerMode===!1?(a.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-1&&a.options.centerMode===!0&&(a.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},b.prototype.updateDots=function(){var a=this;null!==a.$dots&&(a.$dots.find("li").removeClass("slick-active").attr("aria-hidden","true"),a.$dots.find("li").eq(Math.floor(a.currentSlide/a.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden","false"))},b.prototype.visibility=function(){var a=this;a.options.autoplay&&(document[a.hidden]?a.interrupted=!0:a.interrupted=!1)},a.fn.slick=function(){var f,g,a=this,c=arguments[0],d=Array.prototype.slice.call(arguments,1),e=a.length;for(f=0;e>f;f++)if("object"==typeof c||"undefined"==typeof c?a[f].slick=new b(a[f],c):g=a[f].slick[c].apply(a[f].slick,d),"undefined"!=typeof g)return g;return a}});
public/assets/js/sp-slick-active.js ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function ($) {
2
+
3
+ $('.sp-testimonial-free-section').each(function (index) {
4
+
5
+ var tfree_custom_slider_id = $(this).attr('id');
6
+ var tfree_config = $.parseJSON($(this).closest('.sp-testimonial-free-wrapper').find('.sp-tfree-config').text());
7
+
8
+
9
+ if ( tfree_custom_slider_id != '') {
10
+
11
+ jQuery('#' + tfree_custom_slider_id).slick({
12
+ pauseOnFocus: false,
13
+ infinite: (tfree_config.infinite_loop) == "true" ? true : false,
14
+ slidesToShow: parseInt(tfree_config.number_of_column),
15
+ slidesToScroll: 1,
16
+ autoplay: (tfree_config.auto_play) == "true" ? true : false,
17
+ autoplaySpeed: parseInt(tfree_config.auto_play_speed),
18
+ speed: parseInt(tfree_config.scroll_speed),
19
+ pauseOnHover: (tfree_config.pause_on_hover) == "true" ? true : false,
20
+ swipe: (tfree_config.swipe_on) == "true" ? true : false,
21
+ draggable: (tfree_config.mouse_draggable) == "true" ? true : false,
22
+ arrows: (tfree_config.navigation) == "true" ? true : false,
23
+ prevArrow: "<div class='slick-prev'><i class='fa fa-angle-left'></i></div>",
24
+ nextArrow: "<div class='slick-next'><i class='fa fa-angle-right'></i></div>",
25
+ dots: (tfree_config.pagination) == "true" ? true : false,
26
+ rtl: (tfree_config.rtl_mode) == "true" ? true : false,
27
+ responsive: [
28
+ {
29
+ breakpoint: 1280,
30
+ settings: {
31
+ slidesToShow: parseInt(tfree_config.number_of_column_desktop)
32
+ }
33
+ },
34
+ {
35
+ breakpoint: 980,
36
+ settings: {
37
+ slidesToShow: parseInt(tfree_config.number_of_column_small_desktop)
38
+ }
39
+ },
40
+ {
41
+ breakpoint: 736,
42
+ settings: {
43
+ slidesToShow: parseInt(tfree_config.number_of_column_tablet)
44
+ }
45
+ },
46
+ {
47
+ breakpoint: 480,
48
+ settings: {
49
+ slidesToShow: parseInt(tfree_config.number_of_column_mobile)
50
+ }
51
+ }
52
+ ]
53
+ });
54
+ }
55
+ });
56
+ });
inc/shortcodes.php → public/views/deprecated-shortcodes.php RENAMED
@@ -1,5 +1,7 @@
1
  <?php
2
- if ( ! defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly
 
 
3
 
4
  // Testimonial Free shortcode
5
  function sp_testimonial_free_shortcode( $atts ) {
@@ -7,12 +9,12 @@ function sp_testimonial_free_shortcode( $atts ) {
7
  'color' => '#52b3d9',
8
  'nav' => 'true',
9
  'pagination' => 'true',
10
- 'autoplay' => 'true',
11
  ), $atts, 'testimonial-free' ) );
12
 
13
 
14
  $args = array(
15
- 'post_type' => 'testimonial-free',
16
  'orderby' => 'date',
17
  'order' => 'DESC',
18
  'posts_per_page' => -1,
@@ -20,24 +22,23 @@ function sp_testimonial_free_shortcode( $atts ) {
20
 
21
  $que = new WP_Query( $args );
22
 
23
-
24
  $custom_id = uniqid();
25
 
 
 
26
  $outline = '';
27
 
28
  $outline .= '
29
  <script type="text/javascript">
30
  jQuery(document).ready(function() {
31
- jQuery("#sp-testimonial-free' . $custom_id . '").owlCarousel({
32
- items: 1,
33
- singleItem : true,
34
- navigation: ' . $nav . ',
35
- navigationText: ["<i class=\'fa fa-angle-left\'></i>","<i class=\'fa fa-angle-right\'></i>"],
36
- pagination: ' . $pagination . ',
37
- autoHeight: true,
38
- autoPlay: '.$autoplay.',
39
- slideSpeed: 900,
40
- stopOnHover: false,
41
  });
42
 
43
  });
@@ -57,11 +58,12 @@ function sp_testimonial_free_shortcode( $atts ) {
57
 
58
 
59
  $outline .= '<style type="text/css">
60
- .sp-testimonial-section .owl-controls .owl-buttons div:hover{
 
61
  color: ' . $color . ';
62
  }
63
- .sp-testimonial-section .owl-controls .owl-pagination .owl-page.active{
64
- background-color: ' . $color . ';
65
  }
66
  </style>';
67
 
@@ -71,6 +73,7 @@ function sp_testimonial_free_shortcode( $atts ) {
71
 
72
  $tf_designation = esc_html( get_post_meta( get_the_ID(), 'tf_designation', true ) );
73
 
 
74
 
75
  $outline .= '<div class="testimonial-free text-center">';
76
  if ( has_post_thumbnail( $que->post->ID ) ) {
@@ -82,14 +85,25 @@ function sp_testimonial_free_shortcode( $atts ) {
82
  $outline .= get_the_content();
83
  $outline .= '</div>';
84
  $outline .= '<h2 class="tf-client-name">';
85
- $outline .= get_the_title();
 
 
 
 
86
  $outline .= '</h2>';
87
- if ( $tf_designation ) {
88
  $outline .= '<h6 class="tf-client-designation">';
89
- $outline .= $tf_designation;
 
 
 
 
 
90
  $outline .= '</h6>';
91
  }
92
 
 
 
93
 
94
  $outline .= '</div>'; //testimonial free
95
 
1
  <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ } // Exit if accessed directly
5
 
6
  // Testimonial Free shortcode
7
  function sp_testimonial_free_shortcode( $atts ) {
9
  'color' => '#52b3d9',
10
  'nav' => 'true',
11
  'pagination' => 'true',
12
+ 'autoplay' => 'true',
13
  ), $atts, 'testimonial-free' ) );
14
 
15
 
16
  $args = array(
17
+ 'post_type' => 'spt_testimonial',
18
  'orderby' => 'date',
19
  'order' => 'DESC',
20
  'posts_per_page' => -1,
22
 
23
  $que = new WP_Query( $args );
24
 
 
25
  $custom_id = uniqid();
26
 
27
+ wp_enqueue_script( 'tfree-slick-min-js' );
28
+
29
  $outline = '';
30
 
31
  $outline .= '
32
  <script type="text/javascript">
33
  jQuery(document).ready(function() {
34
+ jQuery("#sp-testimonial-free' . $custom_id . '").slick({
35
+ slidesToScroll: 1,
36
+ arrows: ' . $nav . ',
37
+ prevArrow: "<div class=\'slick-prev\'><i class=\'fa fa-angle-left\'></i></div>",
38
+ nextArrow: "<div class=\'slick-next\'><i class=\'fa fa-angle-right\'></i></div>",
39
+ dots: ' . $pagination . ',
40
+ autoplay: ' . $autoplay . ',
41
+ pauseOnHover: false,
 
 
42
  });
43
 
44
  });
58
 
59
 
60
  $outline .= '<style type="text/css">
61
+ #sp-testimonial-free' . $custom_id . '.sp-testimonial-section .slick-prev:hover,
62
+ #sp-testimonial-free' . $custom_id . '.sp-testimonial-section .slick-next:hover{
63
  color: ' . $color . ';
64
  }
65
+ #sp-testimonial-free' . $custom_id . '.sp-testimonial-section .slick-dots li.slick-active button{
66
+ background: ' . $color . ';
67
  }
68
  </style>';
69
 
73
 
74
  $tf_designation = esc_html( get_post_meta( get_the_ID(), 'tf_designation', true ) );
75
 
76
+ $testimonial_data = get_post_meta( get_the_ID(), 'sp_tpro_meta_options', true );
77
 
78
  $outline .= '<div class="testimonial-free text-center">';
79
  if ( has_post_thumbnail( $que->post->ID ) ) {
85
  $outline .= get_the_content();
86
  $outline .= '</div>';
87
  $outline .= '<h2 class="tf-client-name">';
88
+ if(isset($testimonial_data['tpro_name']) && $testimonial_data['tpro_name'] !== ''){
89
+ $outline .= $testimonial_data['tpro_name'];
90
+ } else{
91
+ $outline .= get_the_title();
92
+ }
93
  $outline .= '</h2>';
94
+ if ( $tf_designation || $testimonial_data['tpro_designation'] ) {
95
  $outline .= '<h6 class="tf-client-designation">';
96
+ if(isset($tf_designation) && $tf_designation !== ''){
97
+ $outline .= $tf_designation;
98
+ } elseif(isset($testimonial_data['tpro_designation'])){
99
+ $outline .= $testimonial_data['tpro_designation'];
100
+ }
101
+
102
  $outline .= '</h6>';
103
  }
104
 
105
+ //var_dump($testimonial_data['tpro_designation']);
106
+
107
 
108
  $outline .= '</div>'; //testimonial free
109
 
public/views/scripts.php ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) { exit; } // if direct access
4
+
5
+ /**
6
+ * Scripts and styles
7
+ */
8
+ class SP_TFREE_Front_Scripts{
9
+
10
+ /**
11
+ * @var null
12
+ * @since 1.0
13
+ */
14
+ protected static $_instance = null;
15
+
16
+ /**
17
+ * @return SP_TFREE_Front_Scripts
18
+ * @since 1.0
19
+ */
20
+ public static function instance() {
21
+ if ( is_null( self::$_instance ) ) {
22
+ self::$_instance = new self();
23
+ }
24
+
25
+ return self::$_instance;
26
+ }
27
+
28
+ /**
29
+ * Initialize the class
30
+ */
31
+ public function __construct() {
32
+
33
+ add_action( 'wp_enqueue_scripts', array( $this, 'front_scripts' ) );
34
+ }
35
+
36
+ /**
37
+ * Plugin Scripts and Styles
38
+ */
39
+ function front_scripts() {
40
+ // CSS Files
41
+ wp_enqueue_style( 'tfree-slick', SP_TFREE_URL . 'public/assets/css/slick.css', array(), SP_TFREE_VERSION );
42
+ wp_enqueue_style( 'tfree-font-awesome', SP_TFREE_URL . 'public/assets/css/font-awesome.min.css', array(), SP_TFREE_VERSION );
43
+ wp_enqueue_style( 'tfree-deprecated-style', SP_TFREE_URL . 'public/assets/css/deprecated-style.css', array(), SP_TFREE_VERSION );
44
+ wp_enqueue_style( 'tfree-style', SP_TFREE_URL . 'public/assets/css/style.css', array(), SP_TFREE_VERSION );
45
+ wp_enqueue_style( 'tfree-responsive', SP_TFREE_URL . 'public/assets/css/responsive.css', array(), SP_TFREE_VERSION );
46
+
47
+ //JS Files
48
+ wp_register_script( 'tfree-slick-min-js', SP_TFREE_URL . 'public/assets/js/slick.min.js', array( 'jquery' ), SP_TFREE_VERSION, true );
49
+ wp_register_script( 'tfree-slick-active', SP_TFREE_URL . 'public/assets/js/sp-slick-active.js', array( 'jquery' ), SP_TFREE_VERSION, true );
50
+
51
+ }
52
+
53
+ }
54
+ new SP_TFREE_Front_Scripts();
public/views/shortcoderender.php ADDED
@@ -0,0 +1,273 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file render the shortcode to the frontend
4
+ * @package testimonial-free
5
+ */
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit; // Exit if accessed directly
8
+ }
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>
27
+ <i class="fa fa-star" aria-hidden="true"></i>
28
+ <i class="fa fa-star-o" aria-hidden="true"></i>
29
+ ';
30
+ public $tfree_three_star = '
31
+ <i class="fa fa-star" aria-hidden="true"></i>
32
+ <i class="fa fa-star" aria-hidden="true"></i>
33
+ <i class="fa fa-star" aria-hidden="true"></i>
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>
48
+ <i class="fa fa-star-o" aria-hidden="true"></i>
49
+ <i class="fa fa-star-o" aria-hidden="true"></i>
50
+ ';
51
+
52
+ /**
53
+ * @var TFREE_Shortcode_Render single instance of the class
54
+ *
55
+ * @since 2.0
56
+ */
57
+ protected static $_instance = null;
58
+
59
+
60
+ /**
61
+ * TFREE_Shortcode_Render Instance
62
+ *
63
+ * @since 2.0
64
+ * @static
65
+ * @return self Main instance
66
+ */
67
+ public static function instance() {
68
+ if ( is_null( self::$_instance ) ) {
69
+ self::$_instance = new self();
70
+ }
71
+
72
+ return self::$_instance;
73
+ }
74
+
75
+ /**
76
+ * TFREE_Shortcode_Render constructor.
77
+ */
78
+ public function __construct() {
79
+ add_shortcode( 'sp_testimonial', array( $this, 'shortcode_render' ) );
80
+ }
81
+
82
+ /**
83
+ * @param $attributes
84
+ *
85
+ * @return string
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
+
96
+ $theme_style = get_post_meta( $post_id, 'tfree_themes', true );
97
+ $number_of_total_testimonials = get_post_meta( $post_id, 'tfree_number_of_total_testimonials', true );
98
+ $order_by = get_post_meta( $post_id, 'tfree_order_by', true );
99
+ $order = get_post_meta( $post_id, 'tfree_order', true );
100
+ $number_of_column = get_post_meta( $post_id, 'tfree_number_of_column', true );
101
+ $number_of_column_desktop = get_post_meta( $post_id, 'tfree_number_of_column_desktop', true );
102
+ $number_of_column_small_desktop = get_post_meta( $post_id, 'tfree_number_of_column_small_desktop', true );
103
+ $number_of_column_mobile = get_post_meta( $post_id, 'tfree_number_of_column_mobile', true );
104
+ $number_of_column_tablet = get_post_meta( $post_id, 'tfree_number_of_column_tablet', true );
105
+ $auto_play_speed = get_post_meta( $post_id, 'tfree_auto_play_speed', true );
106
+ $scroll_speed = get_post_meta( $post_id, 'tfree_scroll_speed', true );
107
+ $nav_arrow_color = get_post_meta( $post_id, 'tfree_nav_arrow_color', true );
108
+ $nav_arrow_hover = get_post_meta( $post_id, 'tfree_nav_arrow_hover', true );
109
+ $pagination_color = get_post_meta( $post_id, 'tfree_pagination_color', true );
110
+ $pagination_active_color = get_post_meta( $post_id, 'tfree_pagination_active_color', true );
111
+ $star_rating_color = get_post_meta( $post_id, 'tfree_star_rating_color', true );
112
+ $position_color = get_post_meta( $post_id, 'tfree_position_color', true );
113
+ $reviewer_name_color = get_post_meta( $post_id, 'tfree_reviewer_name_color', true );
114
+ $testimonial_content_color = get_post_meta( $post_id, 'tfree_testimonial_content_color', true );
115
+ $testimonial_title_color = get_post_meta( $post_id, 'tfree_testimonial_title_color', true );
116
+ $section_title_color = get_post_meta( $post_id, 'tfree_section_title_color', true );
117
+
118
+ $section_title = $this->get_meta( $post_id, 'tfree_section_title', 'true' );
119
+ $testimonial_title = $this->get_meta( $post_id, 'tfree_testimonial_title', 'true' );
120
+ $testimonial_content = $this->get_meta( $post_id, 'tfree_testimonial_content', 'true' );
121
+ $reviewer_name = $this->get_meta( $post_id, 'tfree_reviewer_name', 'true' );
122
+ $reviewer_position = $this->get_meta( $post_id, 'tfree_position', 'true' );
123
+ $star_rating = $this->get_meta( $post_id, 'tfree_star_rating', 'true' );
124
+ $auto_play = $this->get_meta( $post_id, 'tfree_auto_play', 'true' );
125
+ $pause_on_hover = $this->get_meta( $post_id, 'tfree_pause_on_hover', 'true' );
126
+ $infinite_loop = $this->get_meta( $post_id, 'tfree_infinite_loop', 'true' );
127
+ $navigation = $this->get_meta( $post_id, 'tfree_navigation', 'true' );
128
+ $pagination = $this->get_meta( $post_id, 'tfree_pagination', '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
+
134
+ // Enqueue Script
135
+ wp_enqueue_script( 'tfree-slick-min-js' );
136
+ wp_enqueue_script( 'tfree-slick-active' );
137
+
138
+
139
+ $tfree_config = compact( 'number_of_column', 'number_of_column_desktop', 'number_of_column_small_desktop', 'number_of_column_tablet', 'number_of_column_mobile', 'auto_play', 'auto_play_speed', 'scroll_speed', 'pause_on_hover', 'infinite_loop', 'navigation', 'pagination', 'swipe_on', 'mouse_draggable', 'rtl_mode' );
140
+
141
+ $outline = '';
142
+
143
+ // Style
144
+ $outline .= '<style>';
145
+ $outline .= '#sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .slick-dots li button{
146
+ background: ' . $pagination_color . ';
147
+ }
148
+ #sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .slick-dots li.slick-active button{
149
+ background: ' . $pagination_active_color . ';
150
+ }
151
+ #sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .slick-prev,
152
+ #sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .slick-next{
153
+ color: ' . $nav_arrow_color . ';
154
+ }
155
+ #sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .slick-prev:hover,
156
+ #sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .slick-next:hover{
157
+ color: ' . $nav_arrow_hover . ';
158
+ }
159
+ ';
160
+ if ( $navigation == 'true' ) {
161
+ $outline .= '#sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section{
162
+ padding: 0 50px;
163
+ }';
164
+ }
165
+ if ( $star_rating == 'true' ) {
166
+ $outline .= '#sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .tfree-client-rating{
167
+ color: ' . $star_rating_color . ';
168
+ }';
169
+ }
170
+ if ( $reviewer_position == 'true' ) {
171
+ $outline .= '#sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .tfree-client-designation{
172
+ color: ' . $position_color . ';
173
+ }';
174
+ }
175
+ if ( $reviewer_name == 'true' ) {
176
+ $outline .= '#sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section h2.tfree-client-name{
177
+ color: ' . $reviewer_name_color . ';
178
+ }';
179
+ }
180
+ if ( $testimonial_content == 'true' ) {
181
+ $outline .= '#sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .tfree-client-testimonial{
182
+ color: ' . $testimonial_content_color . ';
183
+ }';
184
+ }
185
+ if ( $testimonial_title == 'true' ) {
186
+ $outline .= '#sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .tfree-testimonial-title h3{
187
+ color: ' . $testimonial_title_color . ';
188
+ }';
189
+ }
190
+ if ( $section_title == 'true' ) {
191
+ $outline .= '#sp-testimonial-free-wrapper-' . $post_id . ' .sp-testimonial-free-section .tfree-testimonial-title h3{
192
+ color: ' . $section_title_color . ';
193
+ }';
194
+ }
195
+
196
+ $outline .= '</style>';
197
+
198
+ $args = array(
199
+ 'post_type' => 'spt_testimonial',
200
+ 'orderby' => $order_by,
201
+ 'order' => $order,
202
+ 'posts_per_page' => $number_of_total_testimonials
203
+ );
204
+
205
+ $post_query = new WP_Query( $args );
206
+
207
+
208
+ $outline .= '<div id="sp-testimonial-free-wrapper-' . $post_id . '" class="sp-testimonial-free-wrapper">';
209
+ $outline .= '<div class="sp-tfree-config">' . json_encode( $tfree_config ) . '</div>';
210
+ if ( $section_title == 'true' ) {
211
+ $outline .= '<h2 class="sp-testimonial-free-section-title">' . get_the_title( $post_id ) . '</h2>';
212
+ }
213
+
214
+ $outline .= '<div id="sp-testimonial-free-' . $post_id . '" class="sp-testimonial-free-section tfree-style-' . $theme_style . '">';
215
+
216
+ if ( $post_query->have_posts() ) {
217
+ while ( $post_query->have_posts() ) : $post_query->the_post();
218
+
219
+ $testimonial_data = get_post_meta( get_the_ID(), 'sp_tpro_meta_options', true );
220
+ $tfree_designation = (isset($testimonial_data['tpro_designation']) ? $testimonial_data['tpro_designation']: '');
221
+ $tfree_name = (isset($testimonial_data['tpro_name'])?$testimonial_data['tpro_name']: '');
222
+ $tfree_rating_star = (isset($testimonial_data['tpro_rating']) ? $testimonial_data['tpro_rating']: '');
223
+
224
+ if ( $theme_style == 'theme-one' ) {
225
+ include SP_TFREE_PATH . '/public/views/templates/theme-one.php';
226
+ }
227
+
228
+ endwhile;
229
+ } else {
230
+ $outline .= '<h2 class="sp-not-testimonial-found">' . esc_html__( 'No testimonials found', 'testimonial-free' ) . '</h2>';
231
+ }
232
+
233
+ $outline .= '</div>';
234
+ $outline .= '</div>';
235
+
236
+ wp_reset_query();
237
+
238
+ return $outline;
239
+
240
+ }
241
+
242
+ /**
243
+ * Get post meta by id and key
244
+ *
245
+ * @param $post_id
246
+ * @param $key
247
+ * @param $default
248
+ *
249
+ * @return string|void
250
+ */
251
+ public function get_meta( $post_id, $key, $default = null ) {
252
+ $meta = get_post_meta( $post_id, $key, true );
253
+ if ( empty( $meta ) && $default ) {
254
+ $meta = $default;
255
+ }
256
+
257
+ if ( $meta == 'zero' ) {
258
+ $meta = '0';
259
+ }
260
+ if ( $meta == 'on' ) {
261
+ $meta = 'true';
262
+ }
263
+ if ( $meta == 'off' ) {
264
+ $meta = 'false';
265
+ }
266
+
267
+ return esc_attr( $meta );
268
+ }
269
+
270
+ }
271
+
272
+ new TFREE_Shortcode_Render();
273
+ }
public/views/templates/theme-one.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Theme One
4
+ */
5
+
6
+ $outline .= '<div class="sp-testimonial-free-item" itemscope itemtype="http://schema.org/Review">';
7
+
8
+ $outline .= '<div class="sp-testimonial-free">';
9
+
10
+ $outline .= '<div itemprop="itemReviewed" itemscope itemtype="http://schema.org/Thing">
11
+ <meta itemprop="name" content="Testimonials">
12
+ </div>';
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">'. 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
+
81
+ $outline .= '</div>'; //sp-testimonial-free
82
+
83
+ $outline .= '</div>'; //sp-testimonial-free-item
readme.txt CHANGED
@@ -1,156 +1,325 @@
1
- === Testimonial - Best Testimonials Showcase Plugin ===
2
  Contributors: shapedplugin
3
  Donate link: http://shapedplugin.com/donate
4
- Tags: free testimonial, testimonial, testimonials, customer testimonial, customer testimonials, customer review, customer reviews, customers reviews, client testimonial, testimonial feed, testimonial widget, testimonials client, customer, quote, quotes, recommendation, reference, review, reviews, testimonial slider, slider, testimonial carousel, carousel, customer comments, comments, praise, rotator, rotators, shortcode, sidebar, shortcode plugin, testimonial shortcode, easy testimonial, best testimonial, advanced shortcode testimonial plugin, advanced testimonial showcase plugin, pro testimonial, premium testimonial plugin, testimony, witness, case studies, clients, flat design, grid, responsive, reviews, rich snippets, star rating, grid style testimonial, list style testimonial, rating, showcase, testimonial showcase, custom testimonial, easy testimonial slider, feedback, feedback slider, ratings, Responsive testimonial slider, simple testimonial, add testimonials, add testimonials widget, author data, company data, custom post type, display testimonials, multiple testimonials, unlimited testimonials, Testimonials plugin, testimonials shortcode, testimonials widget, translation-ready, user comments, widgets, best, content slider, responsive slider, sliders, super, Testimonial Rotator, testimonial slider, Testimonials Manager, top, testimonial layouts, testimonial shortcode, shapedplugin, 5 star testimonials
5
  Requires at least: 4.0
6
- Tested up to: 4.9
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
- Testimonial is a clean, easy-to-use and Powerful Testimonials Management System for WordPress that allows you to manage and display Testimonials.
11
 
12
 
13
  == Description ==
14
- [Live Demo](http://shapedplugin.com/demo/testimonial_pro/) | [Upgrade to PRO](http://shapedplugin.com/plugin/testimonial-pro/) | [Documentation](http://shapedplugin.com/docs/docs/testimonial-pro/) | [Support](http://shapedplugin.com/support/)
15
-
16
- <p>Testimonial is a Clean, Easy-to-use and Powerful Testimonials Management System for WordPress. This plugin will help you to display easily attractive and eye catching Unlimited testimonials, reviews or quotes in multiple ways anywhere (like post, page, custom template, sidebar, widget) of your site using shortcode.</p>
17
-
18
- **Features**
19
-
20
- <ul>
21
- <li>100% Responsive.</li>
22
- <li>Light weight, Clean & Beautiful.</li>
23
- <li>Easy Shortcode System.</li>
24
- <li>Show/hide Navigation.</li>
25
- <li>Show/hide Pagination.</li>
26
- <li>AutoPlay on/off.</li>
27
- <li>Unlimited Colors.</li>
28
- <li>Add Unlimited Testimonials.</li>
29
- <li>Translation Ready.</li>
30
- <li>Touch-swiped enabled.</li>
31
- <li>Developer friendly & easy to customize.</li>
32
- <li>Compatible with any theme.</li>
33
- <li>24/7Free Basic Support.</li>
34
- </ul>
35
-
36
- <p>Want more options & stunning features? This plugin has also a <a target="_blank" href="http://shapedplugin.com/plugin/testimonial-pro/">Premium Version</a> with so many cool features. Check it out now!</p>
37
-
38
- **Pro Features**
39
-
40
- <ul>
41
- <li>20+ Predefined Testimonial Styles</li>
42
- <li>Front-end Submission form</li>
43
- <li>Notification e-mail for new Testimonial submission to Admin</li>
44
- <li>Testimonial pending status for approval by Admin</li>
45
- <li>Show/hide front-end submission form fields</li>
46
- <li>Google reCAPTCHA option</li>
47
- <li>Testimonials from specific Categories</li>
48
- <li>Grid Testimonial Showcase</li>
49
- <li>List Testimonial showcase</li>
50
- <li>Filterable Testimonial Showcase</li>
51
- <li>Simple Pagination Style</li>
52
- <li>Read More option to Expand content</li>
53
- <li>Characters custom limit option</li>
54
- <li>Change Read More text</li>
55
- <li>Change Read More close text</li>
56
- <li>Designation/Company name field HTML supported</li>
57
- <li>Different client images styles (Circle, Round, Square, Border)</li>
58
- <li>Star Rating System</li>
59
- <li>Show/hide star rating</li>
60
- <li>Unlimited colors</li>
61
- <li>Show/hide Navigation arrows</li>
62
- <li>Show/hide Bullets</li>
63
- <li>Testimonials Order by (date, title, modified, author, random)</li>
64
- <li>Order (Descending, Ascending)</li>
65
- <li>Set Testimonial Auto-play speed time</li>
66
- <li>Testimonial stop on hover</li>
67
- <li>Display maximum number of testimonials displayed in devices (Mobile, Tablet, Desktop)</li>
68
- <li>Testimonial Auto height option</li>
69
- <li>Unlimited Testimonials anywhere (like post, page, custom template, sidebar, widget)</li>
70
- <li>Easy-to-use interface allows you to manage, edit, create, and delete Testimonials with no coding knowledge!</li>
71
- <li>Shortcodes to be used everywhere</li>
72
- <li>Widget Ready</li>
73
- <li>Visual Composer Supported (Add-on)</li>
74
- <li>Used FontAwesome arrow for Previous/Next</li>
75
- <li>Nice bullet control system</li>
76
- <li>Unique settings for each Testimonial</li>
77
- <li>7 Days money back guarantee</li>
78
- <li>Extensive online documentation</li>
79
- <li>Lifetime free update</li>
80
- <li>24/7 Free &amp; Quick Developer support</li>
81
- <li>And many more options…</li>
82
- </ul>
83
-
84
-
85
-
86
- <p>Testimonial Free for WordPress plugin is the most complete plugin on the WordPress.org directory. This plugin can give you the easiest way to start adding your customer testimonials, right now! <a target="_blank" href="http://shapedplugin.com/plugin/testimonial-pro/">Buy Pro Version Now</a> to get started, Pro is really awesome! It will inherit the styling from your Theme - just install and get to work adding your testimonials! With so many options your Testimonials Showcase will completely be unique and special. </p>
87
-
88
-
89
- <p><h4>Why Testimonials are important to your success?</h4>
90
- Social Proof is one of six principles of Influence. People are especially susceptible to it when they’re feeling uncertain about a company or brand. When a potential customer lands on your site, how will they feel about your brand? Most website visitors don’t immediately trust a new brand. Hence the power of a great testimonial.</p>
91
-
92
-
93
- <p><h4>Beautifully Designed Testimonial Layouts</h4>
94
- Good Looking Testimonials equal to Good Looking Sales Reports. Sorry to say, but it’s true! Having a positive testimonial that looks ugly or out of date can end up resulting in a net gain of zero! This is why we’ve worked hard to give you the ability to create beautiful testimonials in an instant.</p>
95
-
96
-
97
- <p><h4>Impress Potential Customers</h4>
98
- A beautifully written and attractive looking testimonial from past happy customers reassures the potential customer that purchasing from your company is the right decision to make.</p>
99
-
100
-
101
- <p><h4>Why We Made Testimonial</h4>
102
- Thoughtfully designed testimonials, that look good from the get-go and were easy to create, have been a struggle for many WordPress users. Until now. Testimonials by ShapedPlugin designs are modern, sheik and very customizable, right out of the box. </p>
103
-
104
-
105
- <p><h4>Premium Version is Awesome! Why late?</h4>
106
- The Pro Version is not only awesome Testimonial plugin, but also a complete solution of your Testimonials on the website.</p>
107
-
108
-
109
- <p><strong>Note:</strong> 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 <a target="_blank" href="http://shapedplugin.com/contact-us/">let us know</a>.</p>
110
 
111
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
 
113
 
114
 
115
  == Installation ==
116
 
117
- Installing this plugin as regular WordPress plugin.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
 
119
- After install, you are ready to use Testimonial in your post, page, widget or anywhere you like. How to create Testimonial? lets see.
120
 
121
 
122
- 1. Upload the folder testimonial-free to "/wp-content/plugins/" '
123
- 2. Activate the plugin through the "Plugins" menu in WordPress .
124
- 3. Add testimonial going to wp-admin -> Testimonials -> Add New Testimonial.
125
- 4. Call shortcode to your WordPress editor directly, by using
126
- `
127
- [testimonial-free]
128
- `
129
- Call shortcode to your php template file using
130
- `
131
- <?php echo do_shortcode('[testimonial-free]'); ?>
132
- `
133
-
134
- Shortcode attributes
135
- `
136
- autoplay = true / false
137
- nav = true / false
138
- pagination = true / false
139
- color = color code
140
- `
141
-
142
-
143
- Now save your page, then visit the newly created page & see something awesome. :)
144
-
145
 
146
  == Screenshots ==
147
- 1. Live Demo [Free]
148
- 2. Front-end Submission form [Pro]
149
- 3. Live Demos [Pro]
 
 
 
 
 
150
 
151
 
152
  == Changelog ==
153
 
 
 
 
 
 
 
 
 
 
 
154
  = 1.4.2 =
155
  * AutoPlay on/off
156
 
1
+ === Testimonial Best Testimonials Showcase Plugin ===
2
  Contributors: shapedplugin
3
  Donate link: http://shapedplugin.com/donate
4
+ Tags: free testimonial, testimonial, testimonials, customer testimonial, customer testimonials, customer review, customer reviews, customers reviews, client testimonial, testimonial feed, testimonial widget, testimonials client, customer, quote, quotes, recommendation, reference, review, reviews, testimonial slider, slider, testimonial carousel, carousel, customer comments, comments, praise, rotator, rotators, shortcode, sidebar, shortcode plugin, testimonial shortcode, easy testimonial, best testimonial, advanced shortcode testimonial plugin, advanced testimonial showcase plugin, pro testimonial, premium testimonial plugin, testimony, witness, case studies, clients, flat design, grid, responsive, reviews, rich snippets, star rating, grid style testimonial, list style testimonial, rating, showcase, testimonial showcase, custom testimonial, easy testimonial slider, feedback, feedback slider, ratings, Responsive testimonial slider, simple testimonial, add testimonials, add testimonials widget, custom post type, display testimonials, multiple testimonials, unlimited testimonials, testimonials plugin, testimonials shortcode, testimonials widget, translation ready, user comments, widgets, best, content slider, responsive slider, sliders, super, Testimonial Rotator, testimonial slider, Testimonials Manager, top, testimonial layouts, testimonial shortcode, shapedplugin, 5 star testimonials
5
  Requires at least: 4.0
6
+ Tested up to: 4.9.5
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
+ Most Customizable and Powerful Testimonials Showcase Plugin for WordPress that allows you to manage and display Testimonials or Reviews on any page or widget.
11
 
12
 
13
  == Description ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
 
16
+ **[Live Demo](http://shapedplugin.com/demo/testimonial-pro/)**
17
+
18
+ [youtube https://www.youtube.com/watch?v=htnj97_K3ys]
19
+
20
+
21
+ = Overview =
22
+
23
+ **Testimonial**™ is the **Best Testimonials Showcase Plugin for WordPress** built to display testimonials, reviews or quotes in multiple ways on any page or widget! The plugin comes with the easiest Shortcode Generator settings panel that can help you build awesome and unique testimonials showcase with responsive layouts and customizable styles on your website.
24
+
25
+ Since Testimonials are so important to your potential customers, it is important that you showcase them effectively on your website and that you are regularly collecting fresh testimonials. Testimonials Pro helps you do both.
26
+
27
+
28
+ = Why Do You Need Testimonials on Your Website? =
29
+
30
+ Testimonials are a great way to strengthen your brand and reliability with new customers.
31
+
32
+ * Help potential customers get to know that you are a faithful business.
33
+ * Give you the scope to point out specific features or compelling reasons why a customer should buy from you.
34
+ * Testimonials, when used effectively, are a great tool to increase conversions rates on your website!
35
+
36
+ = Basic Input Fields =
37
+
38
+ * Image
39
+ * Testimonial title or Tagline
40
+ * Testimonial content or Review message
41
+ * Reviewer name
42
+ * Rating star
43
+ * Reviewer identity or Position
44
+
45
+
46
+
47
+ = FEATURES OF THIS PLUGIN =
48
+
49
+ * Fully Responsive and Mobile friendly.
50
+ * Shortcode Generator through an intuitive admin UI.
51
+ * Beautiful, minimalist & light-weight.
52
+ * Add unlimited testimonials.
53
+ * AutoPlay on/off.
54
+ * Control AutoPlay speed.
55
+ * Stop on hover slider.
56
+ * Infinite loop for the slider.
57
+ * Set a maximum number of testimonials to show.
58
+ * Show/hide navigation arrows & pagination dots.
59
+ * Control slider pagination speed.
60
+ * Star rating system.
61
+ * Show/hide section title.
62
+ * Show/hide testimonial title or tagline.
63
+ * Show/hide testimonial content or review message.
64
+ * Show/hide reviewer name.
65
+ * Show/hide star rating.
66
+ * Show/hide reviewer identity or position.
67
+ * Unlimited color options for every field.
68
+ * Multiple testimonial sliders or showcases (supports more than one slider per page).
69
+ * Unique settings for each testimonial showcase.
70
+ * Control number of testimonial columns on different devices.
71
+ * Testimonials order & order by.
72
+ * Insert the generated shortcode with TinyMCE button.
73
+ * Touch, swipe or tap on iOS, Android, Blackberry or any other touch devices with on/off option.
74
+ * Mouse draggable on/off.
75
+ * Easy to customize and stylize.
76
+ * Extremely user-friendly settings panel for coders and non-coders alike.
77
+ * 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/).
78
+ * Widget Ready.
79
+ * RTL Ready.
80
+ * Compatible with any theme.
81
+ * Schema.org compliant JSON-LD markup & optimized for speed.
82
+ * Support all modern browsers: Firefox, Chrome, IE, Safari etc.
83
+ * Basic support forum.
84
+ * And much more options.
85
+
86
+
87
+ = TESTIMONIAL PRO =
88
+
89
+ Upgrade to **[Testimonial Pro](https://shapedplugin.com/plugin/testimonial-pro/)** to get access to following tons of useful and amazing features. Check it out now!
90
+
91
+ = EACH TESTIMONIAL INCLUDES FOLLOWING INPUT FIELDS =
92
+
93
+ * Image
94
+ * Video
95
+ * Testimonial title or Tagline
96
+ * Testimonial content or Review message
97
+ * Reviewer name
98
+ * Rating star
99
+ * Reviewer identity or Position
100
+ * Company name
101
+ * Location
102
+ * Mobile or Telephone
103
+ * E-mail
104
+ * Date
105
+ * Website URL
106
+ * And Social profile links (Facebook, Twitter, Google Plus, LinkedIn, Instagram, YouTube, Pinterest, Skype, StumbleUpon, Reddit, Dribbble, SnapChat etc.)
107
+
108
+ >You can easily show/hide and customize every field.
109
+
110
+ 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.
111
+
112
+ 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 (formerly Visual Composer) integration, WPML Ready, Schema.org compliant JSON-LD markup to appear correctly in search results, shortcode support and more.
113
+
114
+
115
+ = PRO VERSION KEY FEATURES =
116
+
117
+ * Advanced Shortcode Generator, with advanced query options.
118
+ * **5+ Testimonial Layouts** (e.g. Slider, Grid, Masonry, Filter, and List).
119
+ * **10+ Professionally Pre-designed Themes.**
120
+ * **840+ Google Fonts** (You can also load your theme or custom fonts).
121
+ * **100+ Advanced Styling and Layout Customization Options** (Position, fonts family, weights, size, line-height, alignment, transform, letter spacing, color etc).
122
+ * **Display reviews of your product or service.**
123
+ * Showcase Unlimited Testimonials (Multiple Testimonials showcase anywhere you like).
124
+ * **Thumbnail Slider for Testimonial.**
125
+ * Duplicate or Clone Testimonial Sliders or Showcase (built-in duplicate option).
126
+ * **Testimonials Showcase from specific Categories.**
127
+ * **Display Specific Testimonials.**
128
+ * **Testimonials Filtering by Categories.**
129
+ * Pagination for grid, filter, masonry, and list layouts.
130
+ * **Video Testimonial.**
131
+ * Lightbox functionality for video with icon and overlay color options.
132
+ * **Front-end Submission Form to Collect Testimonials.**
133
+ * Drag & drop sorting Submission Form fields.
134
+ * Customize the Form by adding or removing fields and changing properties like the order, label, color, and placeholder.
135
+ * New Testimonial Notifications e-mail to one, or more, addresses when a new testimonial is submitted.
136
+ * Testimonial Pending in Dashboard for approval by Admin.
137
+ * Admins and Editors can edit the testimonials before publishing.
138
+ * **Star rating system.**
139
+ * **Google reCAPTCHA for Testimonial Form spam protection.**
140
+ * Testimonial Carousel that shows 2 or more testimonials on each slide.
141
+ * You can re-order your testimonials simply by drag & drop, or choose to display the testimonials randomly.
142
+ * Create, edit, re-order, delete, and manage Testimonials with no coding knowledge!
143
+ * **Rich Snippets/Structured Data compatible.**
144
+ * Customize the testimonial border thickness and background color.
145
+ * 12+ Social profile icons.
146
+ * Change social profile icon position, style (Square, Round, Circle), color, border, background, and hover color.
147
+ * **3 Testimonial thumbnail or image styles (Square, Round, Circle).**
148
+ * Border or box-shadow option for Testimonial thumbnail or image.
149
+ * Set the Testimonial image dimension: (width or height) from settings.
150
+ * Set a margin between the testimonials.
151
+ * Show excerpt (Read More option).
152
+ * Excerpt custom limit option.
153
+ * **Testimonial Detail or Read More Link Type (Expand, PopUp).**
154
+ * Change Read more button text, color, hover etc.
155
+ * Pagination for grid, filter, list and masonry layouts.
156
+ * Automatic Identity or Position & Company Name linking via Website URL.
157
+ * Multi-creative use plugin: Testimonials, Team, Logos etc.
158
+ * Store testimonials for unlimited use.
159
+ * Sort by date, random or custom order.
160
+ * Smart AutoPlay on/off.
161
+ * Set AutoPlay speed.
162
+ * Set slide scroll speed.
163
+ * Set number of Testimonial(s) to scroll at a time.
164
+ * Ticker mode carousel for testimonials.
165
+ * 8+ different navigation positions.
166
+ * 15+ Modern navigation and pagination styles.
167
+ * 6 different navigation arrows.
168
+ * Infinite Looping.
169
+ * Testimonial fade effect.
170
+ * Testimonials order & order by (date, title, modified, author, random).
171
+ * Pause on hover.
172
+ * Auto-height option for testimonials.
173
+ * Set the number of column in mobile, tablet & desktop.
174
+ * Testimonial content and Reviewer information alignment (left, center, right).
175
+ * Simple embedding using shortcode, PHP function, Shortcode Generator on post editor or via the widget.
176
+ * Custom CSS option to override styles, if necessary without editing the CSS files.
177
+ * Unlimited color option for all the elements.
178
+ * 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/).
179
+ * Widget ready.
180
+ * RTL ready.
181
+ * **WPBakery (formerly Visual Composer) integrated.**
182
+ * Guaranteed to Work with your any WordPress site.
183
+ * Super simple, easy-to-use, powerful, and intuitive backend interface.
184
+ * No more pain writing any shortcode.
185
+ * All features of the free version.
186
+ * Any new features we add in the future (which is often).
187
+ * And so much more!
188
+
189
+
190
+ = TOP REASONS TO BUY PRO =
191
+ * **Fast & Friendly Support(24x7).**
192
+ * Full Installation Document, User guide, and Tutorials.
193
+ * Built-in Automatic Updates to new versions.
194
+ * 100% Money Back Guarantee.
195
+
196
+
197
+ [youtube https://www.youtube.com/watch?v=OA7LgaZHwIY]
198
+
199
+
200
+ = NOTE =
201
+ 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/).
202
+
203
+
204
+ = DONATE or BUY PREMIUM =
205
+ Please [Donate](http://shapedplugin.com/donate) or [Buy Premium](https://shapedplugin.com/plugin/testimonial-pro/) version for this awesome plugin to continue it’s development to bring more awesome features.
206
 
207
 
208
 
209
  == Installation ==
210
 
211
+ = MINIMUM REQUIREMENTS =
212
+
213
+ * PHP 5.6 or later
214
+ * MySQL 5.6 or later
215
+ * WordPress 4.0 or later
216
+
217
+ **This section describes how to install the plugin and get it working**
218
+
219
+ = AUTOMATIC INSTALLATION (EASIEST WAY) =
220
+
221
+ To do an automatic install of Testimonial, login to your WordPress dashboard, navigate to the Plugins menu and click Add New.
222
+ In the search field type “Testimonial by ShapedPlugin”. Once you have found it you can install it by simply clicking "Install Now" and then "Activate".
223
+
224
+ = MANUAL INSTALLATION =
225
+
226
+ **Uploading in WordPress Dashboard**
227
+
228
+ * Download testimonial-free.zip
229
+ * Navigate to the ‘Add New’ in the plugins dashboard
230
+ * Navigate to the ‘Upload’ area
231
+ * Select testimonial-free.zip from your computer
232
+ * Click ‘Install Now’
233
+ * Activate the plugin in the Plugin dashboard
234
+
235
+ **Using FTP**
236
+
237
+ * Download testimonial-free.zip
238
+ * Extract the testimonial-free directory to your computer
239
+ * Upload the testimonial-free directory to the /wp-content/plugins/ directory
240
+ * Activate the plugin in the Plugin dashboard
241
+
242
+ You will now see the Testimonial menu in your WordPress admin panel.
243
+
244
+ The WordPress codex contains <a href="https://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation">instructions</a> on how to install a WordPress plugin.
245
+
246
+
247
+ == Frequently Asked Questions ==
248
+
249
+ = How can I Showcase Testimonials? =
250
+ After activating the plugin, you will see “Testimonial” in WordPress Admin Dashboard.
251
+
252
+ Firstly, Go to “Add Testimonial” and add your testimonials as many as you want.
253
+
254
+ Secondly, Go to Shortcode Generator > Add New Shortcode and you will find 3 Tabs “General Settings”, “Slider Settings” and “Stylization”
255
+
256
+ You can customize the setting fields how you want & publish and you will see a generated shortcode in the top area.
257
+
258
+ Finally, You need to insert it any page or post through TinyMCE button easily.
259
+
260
+ = Is the Testimonial fully responsive? =
261
+ Yes, the Testimonial is fully responsive & columns structured. You can control to show the number of testimonial columns on different devices (Desktop, Tablet, Mobile etc.).
262
+
263
+ = Do I need coding skills to showcase testimonials? =
264
+ No coding skills required - very easy to use. No more pain writing any shortcode attributes to display testimonial on your website. With just a few clicks, you can amazingly showcase your testimonials using a very intuitive Shortcode Generator settings.
265
+
266
+ = Will it automatically use my existing testimonials when Upgrade to Pro? =
267
+ Yes. If you already have testimonials in the free version on your theme or site, you will automatically get the testimonials to use in the Pro version.
268
+
269
+ = Should I purchase the Pro version? =
270
+ Testimonial Pro includes tons of amazing and useful features that can definitely increase your conversion rate. If you’re interested to get the Testimonial Pro, Please go to [Upgrade to Pro!](https://shapedplugin.com/plugin/testimonial-pro/) Page and browse [Live Demo](https://shapedplugin.com/demo/testimonial-pro/).
271
+
272
+ = Is the Testimonial compatible with my theme or design? =
273
+ Testimonial works nicely with any theme if themes are developed according to WordPress standard.
274
+
275
+ = How can I get support if the plugin is not working? =
276
+ If you face any problem with our plugin or something is not working as it should, first follow the preliminary steps:
277
+ Test the plugin with a WordPress default theme, to be sure that the error is not caused by the theme you are currently using.
278
+
279
+ Deactivate all plugins you are using and check if the problem is still occurring.
280
+ Ensure that your plugin version and your theme version are updated and that the problem you are experiencing has not already been solved in a later plugin update.
281
+
282
+ If none of the previously listed actions help you solve the problem, then, submit a ticket in the forum and describe your problem accurately, specify WordPress and Plugin versions you are using and any other information that might help us solve your problem as quickly as possible.
283
+
284
+ PRO version users [Support Forum](https://shapedplugin.com/support/) and Free or Lite Version [Support Forum](https://wordpress.org/support/plugin/testimonial-free).
285
+
286
+ = Is Testimonial translation ready? =
287
+ Yes, Testimonial is fully Translation ready, supporting .pot language files! You can translate into your language with the following popular plugins like WPML, Polylang, qTranslate-x, GTranslate, Google Language Translator, WPGlobus etc.
288
+
289
+ = Where can I report bugs? =
290
+ Bugs can be reported in our support forum.
291
+
292
+ = Do you want to encourage us for future improvement? =
293
+ If you like this plugin, please give [5 stars](https://wordpress.org/support/plugin/testimonial-free/reviews/?filter=5#new-post) to encourage us for future improvement
294
+
295
+ Thank you!
296
 
 
297
 
298
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299
 
300
  == Screenshots ==
301
+ 1. Default Free Demo
302
+ 2. Add New Testimonial
303
+ 3. Testimonials
304
+ 4. General Settings
305
+ 5. Slider Settings
306
+ 6. Stylization
307
+ 7. Typography(Pro)
308
+
309
 
310
 
311
  == Changelog ==
312
 
313
+ = 2.0 =
314
+ * Shortcode Generator
315
+ * Star Rating
316
+ * Section Title
317
+ * Testimonial Title or Tagline
318
+ * Unlimited color options for every field.
319
+ * Show/hide every field.
320
+ * RTL Supported
321
+ * Improved Admin Dashboard UI
322
+
323
  = 1.4.2 =
324
  * AutoPlay on/off
325
 
testimonial-free.php CHANGED
@@ -1,158 +1,391 @@
1
  <?php
2
- /*
3
- Plugin Name: Testimonial
4
- Description: Testimonial is a clean, easy-to-use and Powerful Testimonials Management System for WordPress that allows you to manage and display Testimonials.
5
- Plugin URI: http://shapedplugin.com/plugin/testimonial-pro
6
- Author: ShapedPlugin
7
- Author URI: http://shapedplugin.com
8
- Version: 1.4.2
9
- */
 
 
 
 
 
 
10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
- /* Define */
13
- define( 'SP_TF_URL', plugins_url('/') . plugin_basename( dirname( __FILE__ ) ) . '/' );
14
- define( 'SP_TF_PATH', plugin_dir_path( __FILE__ ) );
 
 
 
15
 
 
 
16
 
17
- /* Including files */
18
- if(file_exists( SP_TF_PATH . 'inc/scripts.php')){
19
- require_once(SP_TF_PATH . "inc/scripts.php");
20
- }
21
- if(file_exists( SP_TF_PATH . 'inc/functions.php')){
22
- require_once(SP_TF_PATH . "inc/functions.php");
23
- }
24
 
25
- /* Plugin Action Links */
26
- function sp_testimonial_free_action_links( $links ) {
27
- $links[] = '<a target="_blank" href="https://shapedplugin.com/plugin/testimonial-pro/" style="color: red; font-weight: 600;">Go
28
- Pro!</a>';
29
 
30
- return $links;
31
- }
32
- add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'sp_testimonial_free_action_links' );
33
 
 
 
 
34
 
35
- // Redirect after active
36
- function sp_testimonial_free_active_redirect( $plugin ) {
37
- if ( $plugin == plugin_basename( __FILE__ ) ) {
38
- exit( wp_redirect( admin_url( 'options-general.php' ) ) );
39
- }
40
- }
41
- add_action( 'activated_plugin', 'sp_testimonial_free_active_redirect' );
 
 
 
 
42
 
 
 
 
 
 
 
 
 
 
 
 
43
 
44
- // admin menu
45
- function sp_testimonial_free_options_framwrork() {
46
- add_options_page( 'Testimonial Pro Info', 'Testimonial Pro Info', 'manage_options', 'sp-tf-settings', 'sp_tf_options_framwrork' );
47
- }
48
- add_action( 'admin_menu', 'sp_testimonial_free_options_framwrork' );
 
 
 
 
 
 
49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
 
51
- if ( is_admin() ) : // Load only if we are viewing an admin page
52
 
53
- function sp_testimonial_free_register_settings() {
54
- // Register settings and call sanitation functions
55
- register_setting( 'sp_tf_p_options', 'sp_tf_options', 'sp_tf_validate_options' );
56
- }
57
- add_action( 'admin_init', 'sp_testimonial_free_register_settings' );
58
-
59
-
60
- // Function to generate options page
61
- function sp_tf_options_framwrork() {
62
-
63
- if ( ! isset( $_REQUEST['updated'] ) ) {
64
- $_REQUEST['updated'] = false;
65
- } // This checks whether the form has just been submitted. ?>
66
-
67
-
68
- <div class="wrap about-wrap">
69
-
70
- <h1>Welcome to Testimonial Free</h1>
71
-
72
- <div class="about-text">Thank you for using our Testimonial Free plugin.</div>
73
-
74
-
75
- <hr>
76
-
77
- <h3>Want some cool features of this plugin?</h3>
78
-
79
- <p>We've added many extra features in our <a href="https://shapedplugin.com/plugin/testimonial-pro/">Premium
80
- Version</a> of this
81
- plugin. Let see some amazing features. <a href="https://shapedplugin.com/plugin/testimonial-pro/">Buy Premium Version Now.</a></p>
82
-
83
-
84
-
85
- <div class="feature-section two-col">
86
- <h2>Pro Version Features</h2>
87
- <div class="col">
88
- <ul>
89
- <li><span class="dashicons dashicons-yes"></span> 20+ Predefined Testimonial Theme Styles</li>
90
- <li><span class="dashicons dashicons-yes"></span> Front-end Submission form</li>
91
- <li><span class="dashicons dashicons-yes"></span> Notification e-mail for Testimonial submission to Admin</li>
92
- <li><span class="dashicons dashicons-yes"></span> Testimonial pending for approval by Admin to show in frontend</li>
93
- <li><span class="dashicons dashicons-yes"></span> Front-end submission form fields show/hide options</li>
94
- <li><span class="dashicons dashicons-yes"></span> 100% Responsive & Mobile Friendly</li>
95
- <li><span class="dashicons dashicons-yes"></span> Very Light weight, clean & beautiful design</li>
96
- <li><span class="dashicons dashicons-yes"></span> Testimonials from specific Categories</li>
97
- <li><span class="dashicons dashicons-yes"></span> Grid Testimonial Showcase</li>
98
- <li><span class="dashicons dashicons-yes"></span> List Testimonial showcase</li>
99
- <li><span class="dashicons dashicons-yes"></span> Filterable Testimonial Showcase</li>
100
- <li><span class="dashicons dashicons-yes"></span> Testimonials Order by (Date, Title, modified, Author, Random)</li>
101
- <li><span class="dashicons dashicons-yes"></span> Order (Decending, Ascending)</li>
102
- <li><span class="dashicons dashicons-yes"></span> Set Testimonial Auto-play time</li>
103
- <li><span class="dashicons dashicons-yes"></span> Testimonial stop on hover</li>
104
- <li><span class="dashicons dashicons-yes"></span> Set different style client images (Circle, Round, Square, Border)</li>
105
- <li><span class="dashicons dashicons-yes"></span> Show maximum number of testimonials displayed in devices</li>
106
- </ul>
107
- </div>
108
- <div class="col">
109
- <ul>
110
- <li><span class="dashicons dashicons-yes"></span> Testimonial Auto height option</li>
111
- <li><span class="dashicons dashicons-yes"></span> Simple Pagination Style</li>
112
- <li><span class="dashicons dashicons-yes"></span> Unlimited Testimonials anywhere</li>
113
- <li><span class="dashicons dashicons-yes"></span> Show/hide Testimonial next/prev buttons</li>
114
- <li><span class="dashicons dashicons-yes"></span> Star Rating System</li>
115
- <li><span class="dashicons dashicons-yes"></span> Unlimited colors</li>
116
- <li><span class="dashicons dashicons-yes"></span> Widget Ready</li>
117
- <li><span class="dashicons dashicons-yes"></span> Visual Composer Supported (Add-on)</li>
118
- <li><span class="dashicons dashicons-yes"></span> All Major Browsers compatible</li>
119
- <li><span class="dashicons dashicons-yes"></span> Fully Localized or Translation Ready</li>
120
- <li><span class="dashicons dashicons-yes"></span> Mobile, Tablet touch-swiped</li>
121
- <li><span class="dashicons dashicons-yes"></span> Work with all standard WordPress themes</li>
122
- <li><span class="dashicons dashicons-yes"></span> Developer friendly & easy to customize</li>
123
- <li><span class="dashicons dashicons-yes"></span> Extensive online documentation</li>
124
- <li><span class="dashicons dashicons-yes"></span> Lifetime free update</li>
125
- <li><span class="dashicons dashicons-yes"></span> 24/7 Free & Quick Developer support</li>
126
- <li><span class="dashicons dashicons-yes"></span> And many more…</li>
127
- </ul>
128
- </div>
129
- </div>
130
-
131
- <h2><a href="https://shapedplugin.com/plugin/testimonial-pro/" class="button button-primary button-hero">Buy
132
- PRO Version Now</a>
133
- </h2>
134
- <br>
135
- <br>
136
-
137
- </div>
138
-
139
- <?php
140
- }
141
 
142
- endif; // EndIf is_admin()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
 
144
- register_activation_hook( __FILE__, 'shapedplugin_tf_activate' );
145
- add_action( 'admin_init', 'shapedplugin_tf_redirect' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
 
147
- function shapedplugin_tf_activate() {
148
- add_option( 'shapedplugin_tf_activation_redirect', true );
149
- }
 
 
 
150
 
151
- function shapedplugin_tf_redirect() {
152
- if ( get_option( 'shapedplugin_tf_activation_redirect', false ) ) {
153
- delete_option( 'shapedplugin_tf_activation_redirect' );
154
- if ( ! isset( $_GET['activate-multi'] ) ) {
155
- wp_redirect( "options-general.php?page=sp-tf-settings" );
156
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  }
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.0
7
+ * Author: ShapedPlugin
8
+ * Author URI: https://shapedplugin.com/
9
+ * Text Domain: testimonial-free
10
+ * Domain Path: /languages
11
+ */
12
+
13
+ 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.0';
31
+
32
+ /**
33
+ * @var SP_TFREE_Testimonial $shortcode
34
+ */
35
+ public $testimonial;
36
+
37
+ /**
38
+ * @var SP_TFREE_Shortcodes $shortcode
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
+ */
50
+ public $router;
51
+
52
+ /**
53
+ * @var null
54
+ * @since 2.0
55
+ */
56
+ protected static $_instance = null;
57
+
58
+ /**
59
+ * @return SP_Testimonial_FREE
60
+ * @since 2.0
61
+ */
62
+ public static function instance() {
63
+ if ( is_null( self::$_instance ) ) {
64
+ self::$_instance = new self();
65
+ }
66
+
67
+ return self::$_instance;
68
+ }
69
 
70
+ /**
71
+ * SP_Testimonial_FREE constructor.
72
+ */
73
+ function __construct() {
74
+ // Define constants
75
+ $this->define_constants();
76
 
77
+ //Required class file include
78
+ spl_autoload_register( array( $this, 'autoload' ) );
79
 
80
+ // Include required files
81
+ $this->includes();
 
 
 
 
 
82
 
83
+ // instantiate classes
84
+ $this->instantiate();
 
 
85
 
86
+ // Initialize the filter hooks
87
+ $this->init_filters();
 
88
 
89
+ // Initialize the action hooks
90
+ $this->init_actions();
91
+ }
92
 
93
+ /**
94
+ * Initialize WordPress filter hooks
95
+ *
96
+ * @return void
97
+ */
98
+ function init_filters() {
99
+ add_filter( 'plugin_action_links', array( $this, 'add_plugin_action_links' ), 10, 2 );
100
+ add_filter( 'manage_sp_tfree_shortcodes_posts_columns', array( $this, 'add_shortcode_column' ) );
101
+ add_filter( "plugin_row_meta", array( $this, 'after_testimonial_free_row_meta' ), 10, 4 );
102
+ add_filter( 'manage_spt_testimonial_posts_columns', array( $this, 'add_testimonial_column' ) );
103
+ }
104
 
105
+ /**
106
+ * Initialize WordPress action hooks
107
+ *
108
+ * @return void
109
+ */
110
+ function init_actions() {
111
+ add_action( 'plugins_loaded', array( $this, 'load_text_domain' ) );
112
+ add_action( 'manage_sp_tfree_shortcodes_posts_custom_column', array( $this, 'add_shortcode_form' ), 10, 2 );
113
+ add_action( 'manage_spt_testimonial_posts_custom_column', array( $this, 'add_testimonial_extra_column' ), 10, 2 );
114
+ add_action( 'activated_plugin', array( $this, 'redirect_help_page' ));
115
+ }
116
 
117
+ /**
118
+ * Define constants
119
+ *
120
+ * @since 2.0
121
+ */
122
+ public function define_constants() {
123
+ $this->define( 'SP_TFREE_VERSION', $this->version );
124
+ $this->define( 'SP_TFREE_PATH', plugin_dir_path( __FILE__ ) );
125
+ $this->define( 'SP_TFREE_URL', plugin_dir_url( __FILE__ ) );
126
+ $this->define( 'SP_TFREE_BASENAME', plugin_basename( __FILE__ ) );
127
+ }
128
 
129
+ /**
130
+ * Define constant if not already set
131
+ *
132
+ * @since 2.0
133
+ *
134
+ * @param string $name
135
+ * @param string|bool $value
136
+ */
137
+ public function define( $name, $value ) {
138
+ if ( ! defined( $name ) ) {
139
+ define( $name, $value );
140
+ }
141
+ }
142
 
 
143
 
144
+ /**
145
+ * Load TextDomain for plugin.
146
+ *
147
+ * @since 2.0
148
+ */
149
+ public function load_text_domain() {
150
+ load_plugin_textdomain( 'testimonial-free', false, SP_TFREE_BASENAME . '/languages' );
151
+ }
152
+
153
+ /**
154
+ * Add plugin action menu
155
+ *
156
+ * @param array $links
157
+ * @param string $file
158
+ *
159
+ * @return array
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;
173
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
 
175
+ /**
176
+ * Add plugin row meta link
177
+ *
178
+ * @since 2.0
179
+ *
180
+ * @param $plugin_meta
181
+ * @param $file
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
+
191
+ return $plugin_meta;
192
+ }
193
 
194
+ /**
195
+ * Autoload class files on demand
196
+ *
197
+ * @param string $class requested class name
198
+ */
199
+ function autoload( $class ) {
200
+ $name = explode( '_', $class );
201
+ if ( isset( $name[2] ) ) {
202
+ $class_name = strtolower( $name[2] );
203
+ $filename = SP_TFREE_PATH . '/class/' . $class_name . '.php';
204
+
205
+ if ( file_exists( $filename ) ) {
206
+ require_once $filename;
207
+ }
208
+ }
209
+ }
210
 
211
+ /**
212
+ * Instantiate all the required classes
213
+ *
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
+
222
+ do_action( 'sp_tfree_instantiate', $this );
223
  }
224
+
225
+ /**
226
+ * page router instantiate
227
+ *
228
+ * @since 2.0
229
+ */
230
+ function page() {
231
+ $this->router = SP_TFREE_Router::instance();
232
+
233
+ return $this->router;
234
+ }
235
+
236
+ /**
237
+ * Include the required files
238
+ *
239
+ * @return void
240
+ */
241
+ function includes() {
242
+ $this->page()->sp_tfree_function();
243
+ $this->page()->sp_tfree_metabox();
244
+ $this->router->includes();
245
+ }
246
+
247
+ /**
248
+ * ShortCode Column
249
+ *
250
+ * @param $columns
251
+ *
252
+ * @return array
253
+ */
254
+ function add_shortcode_column() {
255
+ $new_columns['cb'] = '<input type="checkbox" />';
256
+ $new_columns['title'] = __( 'Slider Title', 'testimonial-free' );
257
+ $new_columns['shortcode'] = __( 'Shortcode', 'testimonial-free' );
258
+ $new_columns[''] = '';
259
+ $new_columns['date'] = __( 'Date', 'testimonial-free' );
260
+
261
+ return $new_columns;
262
+ }
263
+
264
+ /**
265
+ * @param $column
266
+ * @param $post_id
267
+ */
268
+ function add_shortcode_form( $column, $post_id ) {
269
+
270
+ switch ( $column ) {
271
+
272
+ case 'shortcode':
273
+ $column_field = '<input style="width: 270px;padding: 6px;" type="text" onClick="this.select();" readonly="readonly" value="[sp_testimonial ' . 'id=&quot;' . $post_id . '&quot;' . ']"/>';
274
+ echo $column_field;
275
+ break;
276
+ default:
277
+ break;
278
+
279
+ } // end switch
280
+
281
+ }
282
+
283
+ /**
284
+ * Testimonial Column
285
+ *
286
+ * @param $columns
287
+ *
288
+ * @return array
289
+ */
290
+ function add_testimonial_column() {
291
+ $new_columns['cb'] = '<input type="checkbox" />';
292
+ $new_columns['title'] = __( 'Title', 'testimonial-pro' );
293
+ $new_columns['image'] = __( 'Image', 'testimonial-pro' );
294
+ $new_columns['name'] = __( 'Name', 'testimonial-pro' );
295
+ $new_columns['rating'] = __( 'Rating', 'testimonial-pro' );
296
+ $new_columns[''] = '';
297
+ $new_columns['date'] = __( 'Date', 'testimonial-pro' );
298
+
299
+ return $new_columns;
300
+ }
301
+
302
+ /**
303
+ * @param $column
304
+ * @param $post_id
305
+ */
306
+ function add_testimonial_extra_column( $column, $post_id ) {
307
+
308
+ switch ( $column ) {
309
+
310
+ case 'rating':
311
+ $testimonial_data = get_post_meta( $post_id, 'sp_tpro_meta_options', true );
312
+ if(isset($testimonial_data['tpro_rating'])) {
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;
338
+ case 'image':
339
+ add_image_size( 'sp_tfree_client_small_img', 50, 50, true );
340
+ $testimonial_client_image = get_the_post_thumbnail( get_the_ID(), 'sp_tfree_client_small_img' );
341
+ if ($testimonial_client_image !== ''){
342
+ echo $testimonial_client_image;
343
+ } else{
344
+ echo '<span aria-hidden="true">—</span>';
345
+ }
346
+ break;
347
+ default:
348
+ break;
349
+ case 'name':
350
+ $testimonial_data = get_post_meta( $post_id, 'sp_tpro_meta_options', true );
351
+ if(isset($testimonial_data['tpro_name'])) {
352
+ $testimonial_client_name = $testimonial_data['tpro_name'];
353
+ if ( $testimonial_client_name !== '' ) {
354
+ echo $testimonial_client_name;
355
+ } else {
356
+ echo '<span aria-hidden="true">—</span>';
357
+ }
358
+ }
359
+ break;
360
+
361
+ } // end switch
362
+
363
+ }
364
+
365
+ /**
366
+ * Redirect after active
367
+ * @param $plugin
368
+ */
369
+ function redirect_help_page( $plugin ) {
370
+ if ( $plugin == SP_TFREE_BASENAME ) {
371
+ exit( wp_redirect( admin_url( 'edit.php?post_type=spt_testimonial&page=tfree_help' ) ) );
372
+ }
373
+ }
374
+
375
  }
376
+ }
377
+
378
+ /**
379
+ * Returns the main instance.
380
+ *
381
+ * @since 2.0
382
+ * @return SP_Testimonial_FREE
383
+ */
384
+ function sp_testimonial_free() {
385
+ return SP_Testimonial_FREE::instance();
386
+ }
387
+
388
+ if ( ! in_array( 'testimonial-pro/testimonial-pro.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
389
+ //sp_testimonial_free instance.
390
+ sp_testimonial_free();
391
  }