Kadence WooCommerce Email Designer - Version 1.0.2

Version Description

  • Bug Fix: PHP 5.2.4 issue.
Download this release

Release Info

Developer britner
Plugin Icon 128x128 Kadence WooCommerce Email Designer
Version 1.0.2
Comparing to
See all releases

Version 1.0.2

Files changed (110) hide show
  1. assets/css/customizer-icon-select.css +373 -0
  2. assets/css/customizer-range-value-control.css +107 -0
  3. assets/css/customizer-repeater-control.css +213 -0
  4. assets/css/customizer-styles.css +153 -0
  5. assets/css/customizer-toggle-switch-control.css +114 -0
  6. assets/css/fonts/iconpicker.eot +0 -0
  7. assets/css/fonts/iconpicker.svg +19 -0
  8. assets/css/fonts/iconpicker.ttf +0 -0
  9. assets/css/fonts/iconpicker.woff +0 -0
  10. assets/css/fonts/woomail-social.eot +0 -0
  11. assets/css/fonts/woomail-social.svg +24 -0
  12. assets/css/fonts/woomail-social.ttf +0 -0
  13. assets/css/fonts/woomail-social.woff +0 -0
  14. assets/css/fonts/woomail-social.woff2 +0 -0
  15. assets/fonts/iconpicker.eot +0 -0
  16. assets/fonts/iconpicker.svg +19 -0
  17. assets/fonts/iconpicker.ttf +0 -0
  18. assets/fonts/iconpicker.woff +0 -0
  19. assets/images/black/digg.png +0 -0
  20. assets/images/black/dribbble.png +0 -0
  21. assets/images/black/facebook.png +0 -0
  22. assets/images/black/google-plus.png +0 -0
  23. assets/images/black/instagram.png +0 -0
  24. assets/images/black/link.png +0 -0
  25. assets/images/black/linkedin.png +0 -0
  26. assets/images/black/rss.png +0 -0
  27. assets/images/black/stumbleupon.png +0 -0
  28. assets/images/black/tumblr.png +0 -0
  29. assets/images/black/twitter.png +0 -0
  30. assets/images/black/vimeo.png +0 -0
  31. assets/images/black/vk.png +0 -0
  32. assets/images/black/youtube.png +0 -0
  33. assets/images/gray/digg.png +0 -0
  34. assets/images/gray/dribbble.png +0 -0
  35. assets/images/gray/facebook.png +0 -0
  36. assets/images/gray/google-plus.png +0 -0
  37. assets/images/gray/instagram.png +0 -0
  38. assets/images/gray/link.png +0 -0
  39. assets/images/gray/linkedin.png +0 -0
  40. assets/images/gray/rss.png +0 -0
  41. assets/images/gray/stumbleupon.png +0 -0
  42. assets/images/gray/tumblr.png +0 -0
  43. assets/images/gray/twitter.png +0 -0
  44. assets/images/gray/vimeo.png +0 -0
  45. assets/images/gray/vk.png +0 -0
  46. assets/images/gray/youtube.png +0 -0
  47. assets/images/kt_flat_template.jpg +0 -0
  48. assets/images/kt_full_template.jpg +0 -0
  49. assets/images/kt_skinny_template.jpg +0 -0
  50. assets/images/white/digg.png +0 -0
  51. assets/images/white/dribbble.png +0 -0
  52. assets/images/white/facebook.png +0 -0
  53. assets/images/white/google-plus.png +0 -0
  54. assets/images/white/instagram.png +0 -0
  55. assets/images/white/link.png +0 -0
  56. assets/images/white/linkedin.png +0 -0
  57. assets/images/white/rss.png +0 -0
  58. assets/images/white/stumbleupon.png +0 -0
  59. assets/images/white/tumblr.png +0 -0
  60. assets/images/white/twitter.png +0 -0
  61. assets/images/white/vimeo.png +0 -0
  62. assets/images/white/vk.png +0 -0
  63. assets/images/white/youtube.png +0 -0
  64. assets/js/customizer-range-value-control.js +29 -0
  65. assets/js/customizer-repeater-control.js +411 -0
  66. assets/js/customizer-scripts.js +219 -0
  67. assets/js/customizer-toggle-switch-control.js +28 -0
  68. includes/class-customizer-kwdimportexport-control.php +40 -0
  69. includes/class-customizer-kwdinfoblock-control.php +22 -0
  70. includes/class-customizer-kwdsendemail-control.php +27 -0
  71. includes/class-customizer-kwdtemplateload-control.php +35 -0
  72. includes/class-customizer-range-value-control.php +44 -0
  73. includes/class-customizer-repeater-control.php +384 -0
  74. includes/class-customizer-toggle-control.php +72 -0
  75. includes/class-kadence-woomail-customizer.php +959 -0
  76. includes/class-kadence-woomail-import-export.php +364 -0
  77. includes/class-kadence-woomail-import-option.php +24 -0
  78. includes/class-kadence-woomail-preview.php +604 -0
  79. includes/class-kadence-woomail-settings.php +2470 -0
  80. includes/class-kadence-woomail-woo.php +118 -0
  81. index.php +3 -0
  82. kadence-woocommerce-email-designer.php +489 -0
  83. languages/kadence-woocommerce-email-designer.pot +1363 -0
  84. preview.php +50 -0
  85. readme.txt +65 -0
  86. templates/woo/emails/admin-cancelled-order.php +61 -0
  87. templates/woo/emails/admin-failed-order.php +61 -0
  88. templates/woo/emails/admin-new-order.php +61 -0
  89. templates/woo/emails/admin-new-renewal-order.php +37 -0
  90. templates/woo/emails/cancelled-subscription.php +70 -0
  91. templates/woo/emails/customer-completed-order.php +61 -0
  92. templates/woo/emails/customer-completed-renewal-order.php +37 -0
  93. templates/woo/emails/customer-completed-switch-order.php +41 -0
  94. templates/woo/emails/customer-invoice.php +73 -0
  95. templates/woo/emails/customer-new-account.php +46 -0
  96. templates/woo/emails/customer-note.php +67 -0
  97. templates/woo/emails/customer-on-hold-order.php +61 -0
  98. templates/woo/emails/customer-processing-order.php +61 -0
  99. templates/woo/emails/customer-processing-renewal-order.php +38 -0
  100. templates/woo/emails/customer-refunded-order.php +61 -0
  101. templates/woo/emails/customer-renewal-invoice.php +34 -0
  102. templates/woo/emails/customer-reset-password.php +42 -0
  103. templates/woo/emails/email-addresses.php +55 -0
  104. templates/woo/emails/email-customer-details.php +41 -0
  105. templates/woo/emails/email-downloads.php +75 -0
  106. templates/woo/emails/email-footer.php +65 -0
  107. templates/woo/emails/email-header.php +97 -0
  108. templates/woo/emails/email-order-details.php +127 -0
  109. templates/woo/emails/email-styles.php +282 -0
  110. templates/woo/emails/subscription-info.php +42 -0
assets/css/customizer-icon-select.css ADDED
@@ -0,0 +1,373 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @font-face {
2
+ font-family: 'woomail-social';
3
+ src: url('fonts/woomail-social.eot?wp6is4');
4
+ src: url('fonts/woomail-social.eot?wp6is4#iefix') format('embedded-opentype'),
5
+ url('fonts/woomail-social.woff2?wp6is4') format('woff2'),
6
+ url('fonts/woomail-social.ttf?wp6is4') format('truetype'),
7
+ url('fonts/woomail-social.woff?wp6is4') format('woff'),
8
+ url('fonts/woomail-social.svg?wp6is4#woomail-social') format('svg');
9
+ font-weight: normal;
10
+ font-style: normal;
11
+ }
12
+
13
+ [class^="kt-woomail-"], [class*=" kt-woomail-"] {
14
+ /* use !important to prevent issues with browser extensions that change fonts */
15
+ font-family: 'woomail-social' !important;
16
+ speak: none;
17
+ font-style: normal;
18
+ font-weight: normal;
19
+ font-variant: normal;
20
+ text-transform: none;
21
+ line-height: 1;
22
+
23
+ /* Better Font Rendering =========== */
24
+ -webkit-font-smoothing: antialiased;
25
+ -moz-osx-font-smoothing: grayscale;
26
+ }
27
+
28
+ .kt-woomail-stumbleupon:before {
29
+ content: "\e900";
30
+ }
31
+ .kt-woomail-vk:before {
32
+ content: "\e901";
33
+ }
34
+ .kt-woomail-twitter:before {
35
+ content: "\f081";
36
+ }
37
+ .kt-woomail-facebook:before {
38
+ content: "\f082";
39
+ }
40
+ .kt-woomail-linkedin:before {
41
+ content: "\f08c";
42
+ }
43
+ .kt-woomail-link:before {
44
+ content: "\f0c1";
45
+ }
46
+ .kt-woomail-google-plus:before {
47
+ content: "\f0d4";
48
+ }
49
+ .kt-woomail-rss:before {
50
+ content: "\f143";
51
+ }
52
+ .kt-woomail-youtube:before {
53
+ content: "\f166";
54
+ }
55
+ .kt-woomail-instagram:before {
56
+ content: "\f16d";
57
+ }
58
+ .kt-woomail-tumblr:before {
59
+ content: "\f174";
60
+ }
61
+ .kt-woomail-dribbble:before {
62
+ content: "\f17d";
63
+ }
64
+ .kt-woomail-vimeo:before {
65
+ content: "\f194";
66
+ }
67
+ .kt-woomail-digg:before {
68
+ content: "\f1a6";
69
+ }
70
+
71
+
72
+ .icons-selector * {
73
+ margin: 0;
74
+ padding: 0;
75
+ border: 0;
76
+ font-size: 100%;
77
+ font: inherit;
78
+ vertical-align: baseline;
79
+ font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
80
+ }
81
+ /* Display */
82
+ .icons-selector {
83
+ display: inline-block;
84
+ }
85
+ /* Icon selector */
86
+ .icons-selector .selector {
87
+ border: 1px solid #EDEDED;
88
+ width: 100px;
89
+ height: 40px;
90
+ background-color: #fff;
91
+ }
92
+ /* Selector open button */
93
+ .icons-selector .selector-button {
94
+ background-color: #F4F4F4;
95
+ width: 39px;
96
+ height: 100%;
97
+ display:block;
98
+ text-align: center;
99
+ cursor: pointer;
100
+ float: left;
101
+ border-left: 1px solid #E1E1E1;
102
+ }
103
+ /* Selector open button hover */
104
+ .icons-selector .selector-button:hover {
105
+ background-color: #f1f1f1;
106
+ }
107
+ .icons-selector .selector-button:hover i {
108
+ color: #999;
109
+ }
110
+ /* Selector open button icon */
111
+ .icons-selector .selector-button i {
112
+ line-height: 40px;
113
+ text-align: center;
114
+ color: #aaa;
115
+ text-shadow: 0px 1px 0px #FFF;
116
+ }
117
+ /* Selected icon container */
118
+ .icons-selector .selected-icon {
119
+ display: block;
120
+ width: 60px;
121
+ height: 100%;
122
+ float: left;
123
+ text-align: center;
124
+ }
125
+ /* Selected icon */
126
+ .icons-selector .selected-icon i {
127
+ line-height: 42px;
128
+ font-size: 18px;
129
+ cursor: default;
130
+ color: #404040;
131
+ }
132
+ /* IconPicker Popup */
133
+ .icons-selector .selector-popup {
134
+ position: absolute;
135
+ z-index: 10000;
136
+ background-color: #fefefe;
137
+ padding: 5px;
138
+ -moz-box-shadow: 0 1px 1px rgba(0,0,0,0.04);
139
+ -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.04);
140
+ box-shadow: 0 1px 1px rgba(0,0,0,0.04);
141
+ height: auto;
142
+ width: 342px;
143
+ border: 1px solid #E5E5E5;
144
+ margin-top:-1px;
145
+ }
146
+ /* Search input */
147
+ .icons-selector .selector-search input[type="text"] {
148
+ border: 0;
149
+ line-height: 20px;
150
+ padding: 10px 2.5%;
151
+ width: 100%;
152
+ border: 1px solid #EDEDED;
153
+ -moz-box-sizing: border-box;
154
+ -webkit-box-sizing: border-box;
155
+ box-sizing: border-box;
156
+ margin-bottom: 5px;
157
+ font-size: 12px;
158
+ color: #404040;
159
+ -moz-box-shadow: none;
160
+ -webkit-box-shadow: none;
161
+ box-shadow: none;
162
+ outline: none;
163
+ }
164
+ /* Search input placeholder */
165
+ .icons-selector input::-webkit-input-placeholder { color:#ddd;text-transform: uppercase; }
166
+ .icons-selector input:-moz-placeholder { color:#ddd;text-transform: uppercase; }
167
+ .icons-selector input::-moz-placeholder { color:#ddd;text-transform: uppercase;}
168
+ .icons-selector input:-ms-input-placeholder { color:#ddd !important;text-transform: uppercase; }
169
+ /* Search and cancel icon */
170
+ .icons-selector .selector-search i {
171
+ color: #eee;
172
+ margin-left: -30px;
173
+ }
174
+ /* Icon Container inside Popup */
175
+ .icons-selector .fip-icons-container {
176
+ width: 100%;
177
+ background-color: #fff;
178
+ border: 1px solid #EDEDED;
179
+ -moz-box-sizing: border-box;
180
+ -webkit-box-sizing: border-box;
181
+ box-sizing: border-box;
182
+ padding: 5px;
183
+ }
184
+ /* Icon container loading */
185
+ .icons-selector .fip-icons-container .loading {
186
+ color:#eee;
187
+ font-size:24px;
188
+ margin:0 auto;
189
+ padding:20px 0;
190
+ text-align:center;
191
+ width:100%;
192
+ }
193
+ /* Single icon box */
194
+ .icons-selector .fip-box {
195
+ height: 40px;
196
+ font-size: 16px;
197
+ border: 1px solid #EFEFEF;
198
+ display: inline-block;
199
+ margin: 2px;
200
+ width: 60px;
201
+ line-height: 42px;
202
+ text-align: center;
203
+ cursor: pointer;
204
+ vertical-align: top;
205
+ }
206
+ /* Single icon box hover */
207
+ .icons-selector .fip-box:hover {
208
+ background-color: #f6f6f6;
209
+ }
210
+ /* Popup footer */
211
+ .icons-selector .selector-footer {
212
+ line-height: 12px;
213
+ padding: 5px 5px 0 5px;
214
+ }
215
+ /* Pagination and footer icons */
216
+ .icons-selector .selector-footer, .icons-selector .selector-footer i {
217
+ color: #999;
218
+ font-size: 24px;
219
+ }
220
+ /* Pagination arrows container */
221
+ .icons-selector .selector-arrows {
222
+ float: right;
223
+ }
224
+ /* Pagination text */
225
+ .icons-selector .selector-pages {
226
+ font-size: 11px;
227
+ }
228
+ /* Pagination arrows icons */
229
+ .icons-selector .selector-arrows i {
230
+ cursor: pointer;
231
+ }
232
+ /* Pagination arrows icons hover */
233
+ .icons-selector .selector-arrows i:hover {
234
+ color: #777;
235
+ }
236
+ /* Currently selected icon color */
237
+ .icons-selector span.current-icon, .icons-selector span.current-icon:hover {
238
+ background-color: #2EA2CC;color: #fff;border: 1px solid #298CBA;
239
+ }
240
+ /* No icons found */
241
+ .icons-selector .icons-picker-error i:before {
242
+ color: #eee;
243
+ font-size: 22px;
244
+ padding: 20px 0;
245
+ display: block;
246
+ margin: 0 auto;
247
+ width: 20px;
248
+ cursor: default;
249
+ }
250
+ /* Icons */
251
+ @font-face {
252
+ font-family: 'iconpicker';
253
+ src: url('fonts/iconpicker.eot?90190138');
254
+ src: url('fonts/iconpicker.eot?90190138#iefix') format('embedded-opentype'),
255
+ url('fonts/iconpicker.woff?90190138') format('woff'),
256
+ url('fonts/iconpicker.ttf?90190138') format('truetype'),
257
+ url('fonts/iconpicker.svg?90190138#iconpicker') format('svg');
258
+ font-weight: normal;
259
+ font-style: normal;
260
+ }
261
+ .icons-selector [class^="fip-icon-"]:before, .icons-selector [class*=" fip-icon-"]:before {
262
+ font-family: "iconpicker";
263
+ font-style: normal;
264
+ font-weight: normal;
265
+ speak: none;
266
+ display: inline-block;
267
+ text-decoration: inherit;
268
+ width: 1em;
269
+ margin-right: .2em;
270
+ text-align: center;
271
+ font-variant: normal;
272
+ text-transform: none;
273
+ line-height: 1em;
274
+ margin-left: .2em;
275
+ }
276
+ /* Search icon */
277
+ .icons-selector .fip-icon-search:before { content: '\e812';cursor: default; }
278
+ /* Cancel search icon */
279
+ .icons-selector .fip-icon-cancel:before { content: '\e814';cursor: pointer; }
280
+ /* No icon set */
281
+ .icons-selector .fip-icon-block:before { content: '\e84e';color: #fed0d0; }
282
+ /* Open picker icon */
283
+ .icons-selector .fip-icon-down-dir:before { content: '\e800'; }
284
+ /* Close picker icon */
285
+ .icons-selector .fip-icon-up-dir:before { content: '\e813'; }
286
+ /* Prev page icon */
287
+ .icons-selector .fip-icon-left-dir:before { content: '\e801'; }
288
+ /* Next page icon */
289
+ .icons-selector .fip-icon-right-dir:before { content: '\e802'; }
290
+ /* Loading icon */
291
+ .icons-selector .fip-icon-spin3:before { content: '\e815'; }
292
+ .icons-selector .fip-icon-spin3 {
293
+ -moz-animation: spin 2s infinite linear;
294
+ -o-animation: spin 2s infinite linear;
295
+ -webkit-animation: spin 2s infinite linear;
296
+ animation: spin 2s infinite linear;
297
+ display: inline-block;
298
+ }
299
+ @-moz-keyframes spin {
300
+ 0% {
301
+ -moz-transform: rotate(0deg);
302
+ -o-transform: rotate(0deg);
303
+ -webkit-transform: rotate(0deg);
304
+ transform: rotate(0deg);
305
+ }
306
+
307
+ 100% {
308
+ -moz-transform: rotate(359deg);
309
+ -o-transform: rotate(359deg);
310
+ -webkit-transform: rotate(359deg);
311
+ transform: rotate(359deg);
312
+ }
313
+ }
314
+ @-webkit-keyframes spin {
315
+ 0% {
316
+ -moz-transform: rotate(0deg);
317
+ -o-transform: rotate(0deg);
318
+ -webkit-transform: rotate(0deg);
319
+ transform: rotate(0deg);
320
+ }
321
+
322
+ 100% {
323
+ -moz-transform: rotate(359deg);
324
+ -o-transform: rotate(359deg);
325
+ -webkit-transform: rotate(359deg);
326
+ transform: rotate(359deg);
327
+ }
328
+ }
329
+ @-o-keyframes spin {
330
+ 0% {
331
+ -moz-transform: rotate(0deg);
332
+ -o-transform: rotate(0deg);
333
+ -webkit-transform: rotate(0deg);
334
+ transform: rotate(0deg);
335
+ }
336
+
337
+ 100% {
338
+ -moz-transform: rotate(359deg);
339
+ -o-transform: rotate(359deg);
340
+ -webkit-transform: rotate(359deg);
341
+ transform: rotate(359deg);
342
+ }
343
+ }
344
+ @-ms-keyframes spin {
345
+ 0% {
346
+ -moz-transform: rotate(0deg);
347
+ -o-transform: rotate(0deg);
348
+ -webkit-transform: rotate(0deg);
349
+ transform: rotate(0deg);
350
+ }
351
+
352
+ 100% {
353
+ -moz-transform: rotate(359deg);
354
+ -o-transform: rotate(359deg);
355
+ -webkit-transform: rotate(359deg);
356
+ transform: rotate(359deg);
357
+ }
358
+ }
359
+ @keyframes spin {
360
+ 0% {
361
+ -moz-transform: rotate(0deg);
362
+ -o-transform: rotate(0deg);
363
+ -webkit-transform: rotate(0deg);
364
+ transform: rotate(0deg);
365
+ }
366
+
367
+ 100% {
368
+ -moz-transform: rotate(359deg);
369
+ -o-transform: rotate(359deg);
370
+ -webkit-transform: rotate(359deg);
371
+ transform: rotate(359deg);
372
+ }
373
+ }
assets/css/customizer-range-value-control.css ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ *, *:before, *:after {
3
+ box-sizing: border-box;
4
+ }
5
+
6
+ body {
7
+ font-family: sans-serif;
8
+ padding: 60px 20px;
9
+ }
10
+
11
+ @media (min-width: 600px) {
12
+ body {
13
+ padding: 60px;
14
+ }
15
+ }
16
+ */
17
+ /*.range-slider {
18
+ margin: 60px 0 0 0%;
19
+ }*/
20
+
21
+ .range-slider {
22
+ width: 100%;
23
+ }
24
+
25
+ .range-slider__range {
26
+ -webkit-appearance: none;
27
+ width: calc(100% - (95px));
28
+ height: 10px;
29
+ border-radius: 5px;
30
+ background: #d7dcdf;
31
+ outline: none;
32
+ padding: 0;
33
+ margin: 0;
34
+ }
35
+
36
+ .range-slider__range::-webkit-slider-thumb {
37
+ -webkit-appearance: none;
38
+ appearance: none;
39
+ width: 20px;
40
+ height: 20px;
41
+ border-radius: 50%;
42
+ background: #0085ba;
43
+ cursor: pointer;
44
+ -webkit-transition: background .15s ease-in-out;
45
+ transition: background .15s ease-in-out;
46
+ }
47
+
48
+ .range-slider__range::-webkit-slider-thumb:hover {
49
+ background: #0085ba;
50
+ }
51
+
52
+ .range-slider__range:active::-webkit-slider-thumb {
53
+ background: #0085ba;
54
+ }
55
+
56
+ .range-slider__range::-moz-range-thumb {
57
+ width: 20px;
58
+ height: 20px;
59
+ border: 0;
60
+ border-radius: 50%;
61
+ background: #0085ba;
62
+ cursor: pointer;
63
+ -webkit-transition: background .15s ease-in-out;
64
+ transition: background .15s ease-in-out;
65
+ }
66
+
67
+ .range-slider__range::-moz-range-thumb:hover {
68
+ background: #0085ba;
69
+ }
70
+
71
+ .range-slider__range:active::-moz-range-thumb {
72
+ background: #0085ba;
73
+ }
74
+
75
+ .range-slider__value {
76
+ display: inline-block;
77
+ position: relative;
78
+ width: 60px;
79
+ color: #fff;
80
+ line-height: 20px;
81
+ text-align: center;
82
+ border-radius: 3px;
83
+ background: #0085ba;
84
+ padding: 5px 10px;
85
+ margin-left: 8px;
86
+ }
87
+
88
+ /*.range-slider__value:after {
89
+ position: absolute;
90
+ top: 8px;
91
+ left: -7px;
92
+ width: 0;
93
+ height: 0;
94
+ border-top: 7px solid transparent;
95
+ border-right: 7px solid #0085ba;
96
+ border-bottom: 7px solid transparent;
97
+ content: '';
98
+ }*/
99
+
100
+ ::-moz-range-track {
101
+ background: #d7dcdf;
102
+ border: 0;
103
+ }
104
+
105
+ input::-moz-focus-inner, input::-moz-focus-outer {
106
+ border: 0;
107
+ }
assets/css/customizer-repeater-control.css ADDED
@@ -0,0 +1,213 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .customizer-repeater-general-control-repeater-container .customizer-repeater-box-content-hidden:after {
2
+ content: "";
3
+ display: table;
4
+ clear: both;
5
+ }
6
+
7
+ .customizer-repeater-general-control-repeater-container .customizer-repeater-box-content-hidden {
8
+ display: none;
9
+ }
10
+
11
+ .customizer-repeater-customize-control-title {
12
+ margin: 0;
13
+ padding: 15px;
14
+ font-size: 1em;
15
+ line-height: 1;
16
+ -webkit-user-select: none;
17
+ -moz-user-select: none;
18
+ -ms-user-select: none;
19
+ user-select: none;
20
+ display: block;
21
+ font-weight: 600;
22
+ color: #23282d;
23
+ border: 1px solid #e5e5e5;
24
+ cursor: move;
25
+ }
26
+
27
+ .customizer-repeater-customize-control-title:hover {
28
+ border: 1px solid #999;
29
+ }
30
+
31
+ .customizer-repeater-customize-control-title:after {
32
+ content: "\f140";
33
+ font-family: dashicons;
34
+ font-size: 20px;
35
+ height: 13px;
36
+ bottom: 3px;
37
+ position: relative;
38
+ float: right;
39
+ }
40
+
41
+ .customizer-repeater-customize-control-title.repeater-expanded:after {
42
+ content: "\f142";
43
+ }
44
+
45
+ .customizer-repeater-box-content-hidden {
46
+ border: 1px solid #e5e5e5;
47
+ border-top: none;
48
+ padding: 1px 10px 10px;
49
+ }
50
+
51
+ .customizer-repeater-box-content-hidden > div {
52
+ margin: 1em 0;
53
+ }
54
+
55
+ .customizer-repeater-box-content-hidden .customize-control-title {
56
+ font-size: 13px;
57
+ line-height: 1.5;
58
+ font-weight: normal;
59
+ margin-bottom: 0;
60
+ margin-top: 1em;
61
+ }
62
+
63
+ .customizer-repeater-box-content-hidden .customize-control-title:after {
64
+ content: ":";
65
+ }
66
+
67
+ .customizer-repeater-box-content-hidden span.description {
68
+ font-size: 12px;
69
+ font-style: normal;
70
+ }
71
+
72
+ .customizer-repeater-general-control-repeater-container, .customizer-repeater-general-control-repeater_container {
73
+ border: 1px solid #e5e5e5;
74
+ border-top: none;
75
+ margin-bottom: 12px;
76
+ width: 100%;
77
+ float: left;
78
+ background: #fff;
79
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
80
+ box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
81
+ }
82
+
83
+ .customizer-repeater-box-content-hidden .wp-picker-container, .customizer-repeater-box-content-hidden .wp-picker-container .wp-color-result, .icp-container {
84
+ margin: 0;
85
+ }
86
+
87
+ .customizer-repeater-box-content-hidden input:not(.icp, .wp-color-picker),
88
+ .customizer-repeater-box-content-hidden textarea,
89
+ .customizer-repeater-box-content-hidden .wp-picker-container {
90
+ margin-bottom: 1em !important;
91
+ }
92
+
93
+ .social-repeater-general-control-remove-field {
94
+ cursor: pointer;
95
+ color: #a00;
96
+ background: none;
97
+ border: none;
98
+ padding: 0;
99
+ margin-top: 10px;
100
+ }
101
+
102
+ .social-repeater-general-control-remove-field:hover {
103
+ color: red;
104
+ }
105
+
106
+ .customizer-repeater-box-content-hidden .wp-picker-holder {
107
+ position: relative;
108
+ left: -10px;
109
+ }
110
+
111
+ .customizer-repeater-box-content-hidden .wp-picker-input-wrap {
112
+ margin-left: 10px;
113
+ }
114
+
115
+ .customizer-repeater-box-content-hidden .wp-picker-container .iris-picker {
116
+ border-left: none;
117
+ border-right: none;
118
+ }
119
+
120
+ button.customizer-repeater-new-field {
121
+ float: right;
122
+ }
123
+
124
+ button.customizer-repeater-new-field:before {
125
+ content: "\f132";
126
+ display: inline-block;
127
+ position: relative;
128
+ left: -2px;
129
+ top: -1px;
130
+ font: 400 20px/1 dashicons;
131
+ vertical-align: middle;
132
+ -webkit-transition: all .2s;
133
+ transition: all .2s;
134
+ -webkit-font-smoothing: antialiased;
135
+ -moz-osx-font-smoothing: grayscale;
136
+ }
137
+
138
+ .customizer-repeater-box-content-hidden > div.customizer-repeater-social-repeater {
139
+ margin-top: 0;
140
+ }
141
+
142
+ .customizer-repeater-general-control-repeater-container .customizer-repeater-icon-control {
143
+ width: 100%;
144
+ margin: 0;
145
+ padding: 0;
146
+ }
147
+
148
+ #customizer-repeater-new-field {
149
+ width: 100%;
150
+ }
151
+
152
+ .customize-control-widget_form .widget-control-save {
153
+ display: block !important;
154
+ }
155
+
156
+ .customizer-repeater-box-content-hidden {
157
+ background-color: #fff;
158
+ }
159
+
160
+ .customizer-repeater-image-control .customizer-repeater-custom-media-button {
161
+ margin-top: 5px;
162
+ }
163
+
164
+ .customizer-icons {
165
+ display: inline-block;
166
+ padding: 0 10px 0 0;
167
+ vertical-align: middle;
168
+ }
169
+
170
+ .social-repeater-remove-social-item {
171
+ display: inline-block;
172
+ vertical-align: top;
173
+ color: #a00;
174
+ border: none;
175
+ background: none;
176
+ cursor: pointer;
177
+ padding: 0;
178
+ }
179
+
180
+ .social-repeater-remove-social-item:hover {
181
+ color: red;
182
+ }
183
+
184
+ .customizer-repeater-social-repeater > .customizer-repeater-social-repeater-container:not(:first-child) {
185
+ margin-top: 25px;
186
+ }
187
+
188
+ .icp-container {
189
+ margin-bottom: 10px;
190
+ }
191
+
192
+ .button-secondary.social-repeater-add-social-item:before {
193
+ content: "\f132";
194
+ display: inline-block;
195
+ position: relative;
196
+ left: -2px;
197
+ top: -1px;
198
+ font: 400 20px/1 dashicons;
199
+ vertical-align: middle;
200
+ -webkit-transition: all .2s;
201
+ transition: all .2s;
202
+ -webkit-font-smoothing: antialiased;
203
+ -moz-osx-font-smoothing: grayscale;
204
+ }
205
+
206
+ .button-secondary.social-repeater-add-social-item {
207
+ vertical-align: text-top;
208
+ float: right;
209
+ }
210
+
211
+ .customizer-repeater-box-content-hidden textarea {
212
+ width: 100%;
213
+ }
assets/css/customizer-styles.css ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ #customize-theme-controls .accordion-section-content {
3
+ background-color: #f9f9f9;
4
+ }
5
+
6
+ /* Color Control Tweaks */
7
+ .wp-picker-container, .wp-picker-input-wrap {
8
+ width: 100%;
9
+ border-radius: 3px;
10
+ overflow: hidden;
11
+ }
12
+ .wp-core-ui .wp-picker-container .wp-color-result.button {
13
+ height: 30px !important;
14
+ border-radius: 3px;
15
+ padding: 0 0 0 40px !important;
16
+ width:100%;
17
+ color:#fff;
18
+ position:relative;
19
+ }
20
+ .wp-core-ui .button.wp-color-result .wp-color-result-text {
21
+ background-color: rgba(0,0,0,.2);
22
+ color: #fff;
23
+ height: 30px;
24
+ line-height: 30px;
25
+ border: none;
26
+ box-shadow: none;
27
+ font-size: 12px;
28
+ border-radius: 3;
29
+ padding: 0 15px;
30
+ }
31
+ .wp-core-ui button.wp-color-result + .wp-picker-input-wrap > label {
32
+ width: 45%;
33
+ }
34
+ .wp-core-ui button.wp-color-result + .wp-picker-input-wrap input[type=text].wp-color-picker {
35
+ width: 100% !important;
36
+ vertical-align: bottom;
37
+ margin-top: 10px;
38
+ line-height: 20px;
39
+ border-color: #ccc;
40
+ }
41
+ .wp-customizer .wp-picker-active .wp-picker-input-wrap .wp-picker-default, .wp-customizer .wp-picker-active .wp-picker-input-wrap .wp-picker-clear {
42
+ display: inline-block !important;
43
+ margin-left: 10%;
44
+ width: 45%;
45
+ height: 28px;
46
+ margin-top: 10px;
47
+ }
48
+ .wp-customizer .wp-picker-container .iris-picker {
49
+ width: 95% !important;
50
+ margin-top: 15px;
51
+ }
52
+ .wp-customizer .wp-picker-container .iris-picker .iris-square {
53
+ width: 80% !important;
54
+ }
55
+ .wp-customizer .wp-picker-container .iris-picker .iris-strip {
56
+ width: 10% !important;
57
+ }
58
+ /* General Tweaks */
59
+ .customize-control-select select {
60
+ min-width: 100%;
61
+ height: 30px;
62
+ border-radius: 3px;
63
+ border-color: #ccc;
64
+ }
65
+ .customize-control-title {
66
+ margin-top: 15px;
67
+ text-transform: uppercase;
68
+ font-size: 12px;
69
+ }
70
+ .customize-control input[type=number], .customize-control input[type=search], .customize-control input[type=tel], .customize-control input[type=url], .customize-control input[type=text], .customize-control input[type=password], .customize-control input[type=email] {
71
+ line-height: 22px;
72
+ border-color:#ccc;
73
+ }
74
+ .customize-control code {
75
+ padding: 10px;
76
+ display: block;
77
+ }
78
+
79
+ /* Mobile preview */
80
+ .preview-mobile #customize-preview iframe {
81
+ width:600px;
82
+ height: 1500px;
83
+ -ms-transform: scale(0.50);
84
+ -moz-transform: scale(0.50);
85
+ -o-transform: scale(0.50);
86
+ -webkit-transform: scale(0.50);
87
+ transform: scale(0.50);
88
+ -ms-transform-origin: 0 0;
89
+ -moz-transform-origin: 0 0;
90
+ -o-transform-origin: 0 0;
91
+ -webkit-transform-origin: 0 0;
92
+ transform-origin: 0 0;
93
+ }
94
+ .preview-mobile .wp-full-overlay-main {
95
+ overflow-y:scroll;
96
+ overflow-x:auto;
97
+ }
98
+
99
+ /* Template Control */
100
+ .customize-control-kwdtemplateload .image-radio-select label {
101
+ display: block;
102
+ height: auto;
103
+ float: none;
104
+ width: 100%;
105
+ margin-bottom: 8px;
106
+ padding: 8px 8px 0;
107
+ box-shadow: none;
108
+ box-sizing: border-box;
109
+ }
110
+ #customize-controls .customize-control-kwdtemplateload label img {
111
+ border: 4px solid #ccc;
112
+ box-sizing: border-box;
113
+ cursor: pointer;
114
+ height: auto;
115
+ max-width: 100%;
116
+ padding: 1px;
117
+ }
118
+ #customize-controls .customize-control-kwdtemplateload label.ktactive img {
119
+ border-color: #00a0d2;
120
+ }
121
+ .customize-control-kwdtemplateload .kt-template-woomail-load-controls:after {
122
+ clear: both;
123
+ display: table;
124
+ content: '';
125
+ }
126
+ /* Also Button for Importer */
127
+ .kadence-woomail-button {
128
+ width: 100%;
129
+ padding: 6px 12px;
130
+ height: auto;
131
+ }
132
+ /* Import Export styles */
133
+ .kadence-woomail-form {
134
+ position: absolute;
135
+ left: -99999px;
136
+ }
137
+ .kt-woomail-hr {
138
+ margin: 20px 0px 10px;
139
+ }
140
+ .kadence-woomail-import-file {
141
+ background: #eeeeee;
142
+ width: 100%;
143
+ margin: 10px 0;
144
+ padding: 10px;
145
+ font-size: 12px;
146
+ }
147
+ .kadence-woomail-uploading, .kadence-woomail-loading {
148
+ background: #eeeeee;
149
+ display: none;
150
+ margin: 10px 0;
151
+ padding: 10px;
152
+ font-size: 12px;
153
+ }
assets/css/customizer-toggle-switch-control.css ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ input[type=checkbox].tgl {
2
+ display: none;
3
+ }
4
+ input[type=checkbox].tgl, input[type=checkbox].tgl:after, input[type=checkbox].tgl:before, input[type=checkbox].tgl *, input[type=checkbox].tgl *:after, input[type=checkbox].tgl *:before, input[type=checkbox].tgl + .tgl-btn {
5
+ box-sizing: border-box;
6
+ }
7
+ input[type=checkbox].tgl::-moz-selection, input[type=checkbox].tgl:after::-moz-selection, input[type=checkbox].tgl:before::-moz-selection, input[type=checkbox].tgl *::-moz-selection, input[type=checkbox].tgl *:after::-moz-selection, input[type=checkbox].tgl *:before::-moz-selection, input[type=checkbox].tgl + .tgl-btn::-moz-selection {
8
+ background: none;
9
+ }
10
+ input[type=checkbox].tgl::selection, input[type=checkbox].tgl:after::selection, input[type=checkbox].tgl:before::selection, input[type=checkbox].tgl *::selection, input[type=checkbox].tgl *:after::selection, input[type=checkbox].tgl *:before::selection, input[type=checkbox].tgl + .tgl-btn::selection {
11
+ background: none;
12
+ }
13
+ input[type=checkbox].tgl + .tgl-btn {
14
+ outline: 0;
15
+ display: block;
16
+ width: 4em;
17
+ height: 2em;
18
+ position: relative;
19
+ cursor: pointer;
20
+ -webkit-user-select: none;
21
+ -moz-user-select: none;
22
+ -ms-user-select: none;
23
+ user-select: none;
24
+ }
25
+ input[type=checkbox].tgl + .tgl-btn:after, input[type=checkbox].tgl + .tgl-btn:before {
26
+ position: relative;
27
+ display: block;
28
+ content: "";
29
+ width: 50%;
30
+ height: 100%;
31
+ }
32
+ input[type=checkbox].tgl + .tgl-btn:after {
33
+ left: 0;
34
+ }
35
+ input[type=checkbox].tgl + .tgl-btn:before {
36
+ display: none;
37
+ }
38
+ input[type=checkbox].tgl:checked + .tgl-btn:after {
39
+ left: 50%;
40
+ }
41
+
42
+ input[type=checkbox].tgl-light + .tgl-btn {
43
+ background: #f0f0f0;
44
+ border-radius: 2em;
45
+ padding: 2px;
46
+ -webkit-transition: all .4s ease;
47
+ transition: all .4s ease;
48
+ }
49
+ input[type=checkbox].tgl-light + .tgl-btn:after {
50
+ border-radius: 50%;
51
+ background: #fff;
52
+ -webkit-transition: all .2s ease;
53
+ transition: all .2s ease;
54
+ }
55
+ input[type=checkbox].tgl-light:checked + .tgl-btn {
56
+ background: #9FD6AE;
57
+ }
58
+
59
+ input[type=checkbox].tgl-ios + .tgl-btn {
60
+ background: #fbfbfb;
61
+ border-radius: 2em;
62
+ padding: 2px;
63
+ -webkit-transition: all .4s ease;
64
+ transition: all .4s ease;
65
+ border: 1px solid #e8eae9;
66
+ }
67
+ input[type=checkbox].tgl-ios + .tgl-btn:after {
68
+ border-radius: 2em;
69
+ background: #fbfbfb;
70
+ -webkit-transition: left 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), padding 0.3s ease, margin 0.3s ease;
71
+ transition: left 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), padding 0.3s ease, margin 0.3s ease;
72
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 4px 0 rgba(0, 0, 0, 0.08);
73
+ }
74
+ input[type=checkbox].tgl-ios + .tgl-btn:hover:after {
75
+ will-change: padding;
76
+ }
77
+ input[type=checkbox].tgl-ios + .tgl-btn:active {
78
+ box-shadow: inset 0 0 0 2em #e8eae9;
79
+ }
80
+ input[type=checkbox].tgl-ios + .tgl-btn:active:after {
81
+ padding-right: .8em;
82
+ }
83
+ input[type=checkbox].tgl-ios:checked + .tgl-btn {
84
+ background: #86d993;
85
+ }
86
+ input[type=checkbox].tgl-ios:checked + .tgl-btn:active {
87
+ box-shadow: none;
88
+ }
89
+ input[type=checkbox].tgl-ios:checked + .tgl-btn:active:after {
90
+ margin-left: -.8em;
91
+ }
92
+
93
+ input[type=checkbox].tgl-flat + .tgl-btn {
94
+ padding: 2px;
95
+ -webkit-transition: all .2s ease;
96
+ transition: all .2s ease;
97
+ background: #fff;
98
+ border: 4px solid #f2f2f2;
99
+ border-radius: 2em;
100
+ }
101
+ input[type=checkbox].tgl-flat + .tgl-btn:after {
102
+ -webkit-transition: all .2s ease;
103
+ transition: all .2s ease;
104
+ background: #f2f2f2;
105
+ content: "";
106
+ border-radius: 1em;
107
+ }
108
+ input[type=checkbox].tgl-flat:checked + .tgl-btn {
109
+ border: 4px solid #7FC6A6;
110
+ }
111
+ input[type=checkbox].tgl-flat:checked + .tgl-btn:after {
112
+ left: 50%;
113
+ background: #7FC6A6;
114
+ }
assets/css/fonts/iconpicker.eot ADDED
Binary file
assets/css/fonts/iconpicker.svg ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Copyright (C) 2014 by original authors @ fontello.com</metadata>
5
+ <defs>
6
+ <font id="iconpicker" horiz-adv-x="1000" >
7
+ <font-face font-family="iconpicker" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
8
+ <missing-glyph horiz-adv-x="1000" />
9
+ <glyph glyph-name="spin3" unicode="&#xe815;" d="m494 850c-266 0-483-210-494-472c-1-19 13-20 13-20l84 0c16 0 19 10 19 18c10 199 176 358 378 358c107 0 205-45 273-118l-58-57c-11-12-11-27 5-31l247-50c21-5 46 11 37 44l-58 227c-2 9-16 22-29 13l-65-60c-89 91-214 148-352 148z m409-508c-16 0-19-10-19-18c-10-199-176-358-377-358c-108 0-205 45-274 118l59 57c10 12 10 27-5 31l-248 50c-21 5-46-11-37-44l58-227c2-9 16-22 30-13l64 60c89-91 214-148 353-148c265 0 482 210 493 473c1 18-13 19-13 19l-84 0z" horiz-adv-x="1000" />
10
+ <glyph glyph-name="search" unicode="&#xe812;" d="m643 386q0 103-74 176t-176 74t-177-74t-73-176t73-177t177-73t176 73t74 177z m286-465q0-29-22-50t-50-21q-30 0-50 21l-191 191q-100-69-223-69q-80 0-153 31t-125 84t-84 125t-31 153t31 152t84 126t125 84t153 31t152-31t126-84t84-126t31-152q0-123-69-223l191-191q21-21 21-51z" horiz-adv-x="928.6" />
11
+ <glyph glyph-name="cancel" unicode="&#xe814;" d="m724 112q0-22-15-38l-76-76q-16-15-38-15t-38 15l-164 165l-164-165q-16-15-38-15t-38 15l-76 76q-16 16-16 38t16 38l164 164l-164 164q-16 16-16 38t16 38l76 76q16 16 38 16t38-16l164-164l164 164q16 16 38 16t38-16l76-76q15-15 15-38t-15-38l-164-164l164-164q15-15 15-38z" horiz-adv-x="785.7" />
12
+ <glyph glyph-name="block" unicode="&#xe84e;" d="m732 352q0 90-48 164l-421-420q76-50 166-50q62 0 118 25t96 65t65 97t24 119z m-557-167l421 421q-75 50-167 50q-83 0-153-40t-110-112t-41-152q0-91 50-167z m682 167q0-88-34-168t-91-137t-137-92t-166-34t-167 34t-137 92t-91 137t-34 168t34 167t91 137t137 91t167 34t166-34t137-91t91-137t34-167z" horiz-adv-x="857.1" />
13
+ <glyph glyph-name="down-dir" unicode="&#xe800;" d="m571 457q0-14-10-25l-250-250q-11-11-25-11t-25 11l-250 250q-11 11-11 25t11 25t25 11h500q14 0 25-11t10-25z" horiz-adv-x="571.4" />
14
+ <glyph glyph-name="up-dir" unicode="&#xe813;" d="m571 171q0-14-10-25t-25-10h-500q-15 0-25 10t-11 25t11 26l250 250q10 10 25 10t25-10l250-250q10-11 10-26z" horiz-adv-x="571.4" />
15
+ <glyph glyph-name="left-dir" unicode="&#xe801;" d="m357 600v-500q0-14-10-25t-26-11t-25 11l-250 250q-10 11-10 25t10 25l250 250q11 11 25 11t26-11t10-25z" horiz-adv-x="357.1" />
16
+ <glyph glyph-name="right-dir" unicode="&#xe802;" d="m321 350q0-14-10-25l-250-250q-11-11-25-11t-25 11t-11 25v500q0 15 11 25t25 11t25-11l250-250q10-10 10-25z" horiz-adv-x="357.1" />
17
+ </font>
18
+ </defs>
19
+ </svg>
assets/css/fonts/iconpicker.ttf ADDED
Binary file
assets/css/fonts/iconpicker.woff ADDED
Binary file
assets/css/fonts/woomail-social.eot ADDED
Binary file
assets/css/fonts/woomail-social.svg ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Generated by IcoMoon</metadata>
5
+ <defs>
6
+ <font id="woomail-social" horiz-adv-x="1024">
7
+ <font-face units-per-em="1024" ascent="960" descent="-64" />
8
+ <missing-glyph horiz-adv-x="1024" />
9
+ <glyph unicode="&#x20;" horiz-adv-x="512" d="" />
10
+ <glyph unicode="&#xe900;" glyph-name="stumbleupon" d="M852 960h-680c-94.6 0-172-77.4-172-172v-680c0-94.6 77.4-172 172-172h680c94.6 0 172 77.4 172 172v680c0 94.6-77.4 172-172 172zM512 640c-35.29 0-64-28.71-64-64v-256c0-105.872-86.13-192-192-192s-192 86.128-192 192v128h128v-128c0-35.29 28.71-64 64-64s64 28.71 64 64v256c0 105.87 86.13 192 192 192s192-86.13 192-178v-62l-82-24-46 24v62c0 21.29-28.71 50-64 50zM960 320c0-105.872-86.13-192-192-192s-192 86.128-192 206v124l46-24 82 24v-124c0-49.29 28.71-78 64-78s64 28.71 64 64v128h128v-128z" />
11
+ <glyph unicode="&#xe901;" glyph-name="vk" d="M928 960h-832c-52.8 0-96-43.2-96-96v-832c0-52.8 43.2-96 96-96h832c52.8 0 96 43.2 96 96v832c0 52.8-43.2 96-96 96zM829.4 243.2l-93.6-1.4c0 0-20.2-4-46.6 14.2-35 24-68 86.6-93.8 78.4-26-8.2-25.2-64.4-25.2-64.4s0.2-12-5.8-18.4c-6.4-7-19.2-8.4-19.2-8.4h-41.8c0 0-92.4-5.6-173.8 79.2-88.8 92.4-167.2 275.8-167.2 275.8s-4.6 12 0.4 17.8c5.6 6.6 20.6 7 20.6 7l100.2 0.6c0 0 9.4-1.6 16.2-6.6 5.6-4 8.6-11.8 8.6-11.8s16.2-41 37.6-78c41.8-72.2 61.4-88 75.6-80.4 20.6 11.2 14.4 102.2 14.4 102.2s0.4 33-10.4 47.6c-8.4 11.4-24.2 14.8-31 15.6-5.6 0.8 3.6 13.8 15.6 19.8 18 8.8 49.8 9.4 87.4 9 29.2-0.2 37.8-2.2 49.2-4.8 34.6-8.4 22.8-40.6 22.8-117.8 0-24.8-4.4-59.6 13.4-71 7.6-5 26.4-0.8 73.4 79 22.2 37.8 39 82.2 39 82.2s3.6 8 9.2 11.4c5.8 3.4 13.6 2.4 13.6 2.4l105.4 0.6c0 0 31.6 3.8 36.8-10.6 5.4-15-11.8-50-54.8-107.4-70.6-94.2-78.6-85.4-19.8-139.8 56-52 67.6-77.4 69.6-80.6 22.8-38.4-26-41.4-26-41.4z" />
12
+ <glyph unicode="&#xf081;" glyph-name="twitter" horiz-adv-x="878" d="M731.429 602.286c-21.714-9.714-44.571-16-69.143-19.429 25.143 14.857 44 38.857 53.143 66.857-23.429-13.714-49.143-24-76.571-29.143-21.714 23.429-53.143 37.714-87.429 37.714-66.286 0-120-53.714-120-120 0-9.143 0.571-18.857 2.857-27.429-100 5.143-188.571 52.571-248 125.714-10.286-17.714-16.571-38.857-16.571-60.571 0-41.714 19.429-78.286 52-100-20 0.571-38.857 6.286-57.143 14.857v-1.143c0-58.286 44-106.857 98.857-117.714-10.286-2.857-18.286-4.571-29.143-4.571-7.429 0-14.857 1.143-22.286 2.286 15.429-47.429 59.429-82.286 112-83.429-41.143-32-92.571-51.429-149.143-51.429-9.714 0-19.429 0.571-28.571 1.714 53.143-33.714 116-53.714 184-53.714 220.571 0 341.714 182.857 341.714 341.714 0 5.143 0 10.286-0.571 15.429 23.429 16.571 44 37.714 60 62.286zM877.714 713.143v-548.571c0-90.857-73.714-164.571-164.571-164.571h-548.571c-90.857 0-164.571 73.714-164.571 164.571v548.571c0 90.857 73.714 164.571 164.571 164.571h548.571c90.857 0 164.571-73.714 164.571-164.571z" />
13
+ <glyph unicode="&#xf082;" glyph-name="facebook" horiz-adv-x="878" d="M713.143 877.714c90.857 0 164.571-73.714 164.571-164.571v-548.571c0-90.857-73.714-164.571-164.571-164.571h-107.429v340h113.714l17.143 132.571h-130.857v84.571c0 38.286 10.286 64 65.714 64l69.714 0.571v118.286c-12 1.714-53.714 5.143-101.714 5.143-101.143 0-170.857-61.714-170.857-174.857v-97.714h-114.286v-132.571h114.286v-340h-304c-90.857 0-164.571 73.714-164.571 164.571v548.571c0 90.857 73.714 164.571 164.571 164.571h548.571z" />
14
+ <glyph unicode="&#xf08c;" glyph-name="linkedin" horiz-adv-x="878" d="M135.429 142.857h132v396.571h-132v-396.571zM276 661.714c-0.571 38.857-28.571 68.571-73.714 68.571s-74.857-29.714-74.857-68.571c0-37.714 28.571-68.571 73.143-68.571h0.571c46.286 0 74.857 30.857 74.857 68.571zM610.286 142.857h132v227.429c0 121.714-65.143 178.286-152 178.286-70.857 0-102.286-39.429-119.429-66.857h1.143v57.714h-132s1.714-37.143 0-396.571v0h132v221.714c0 11.429 0.571 23.429 4 32 9.714 23.429 31.429 48 68 48 47.429 0 66.286-36 66.286-89.714v-212zM877.714 713.143v-548.571c0-90.857-73.714-164.571-164.571-164.571h-548.571c-90.857 0-164.571 73.714-164.571 164.571v548.571c0 90.857 73.714 164.571 164.571 164.571h548.571c90.857 0 164.571-73.714 164.571-164.571z" />
15
+ <glyph unicode="&#xf0c1;" glyph-name="link" horiz-adv-x="951" d="M832 256c0 14.857-5.714 28.571-16 38.857l-118.857 118.857c-10.286 10.286-24.571 16-38.857 16-16.571 0-29.714-6.286-41.143-18.286 18.857-18.857 41.143-34.857 41.143-64 0-30.286-24.571-54.857-54.857-54.857-29.143 0-45.143 22.286-64 41.143-12-11.429-18.857-24.571-18.857-41.714 0-14.286 5.714-28.571 16-38.857l117.714-118.286c10.286-10.286 24.571-15.429 38.857-15.429s28.571 5.143 38.857 14.857l84 83.429c10.286 10.286 16 24 16 38.286zM430.286 658.857c0 14.286-5.714 28.571-16 38.857l-117.714 118.286c-10.286 10.286-24.571 16-38.857 16s-28.571-5.714-38.857-15.429l-84-83.429c-10.286-10.286-16-24-16-38.286 0-14.857 5.714-28.571 16-38.857l118.857-118.857c10.286-10.286 24.571-15.429 38.857-15.429 16.571 0 29.714 5.714 41.143 17.714-18.857 18.857-41.143 34.857-41.143 64 0 30.286 24.571 54.857 54.857 54.857 29.143 0 45.143-22.286 64-41.143 12 11.429 18.857 24.571 18.857 41.714zM941.714 256c0-43.429-17.714-85.714-48.571-116l-84-83.429c-30.857-30.857-72.571-47.429-116-47.429-44 0-85.714 17.143-116.571 48.571l-117.714 118.286c-30.857 30.857-47.429 72.571-47.429 116 0 45.143 18.286 88 50.286 119.429l-50.286 50.286c-31.429-32-73.714-50.286-118.857-50.286-43.429 0-85.714 17.143-116.571 48l-118.857 118.857c-31.429 31.429-48 72.571-48 116.571 0 43.429 17.714 85.714 48.571 116l84 83.429c30.857 30.857 72.571 47.429 116 47.429 44 0 85.714-17.143 116.571-48.571l117.714-118.286c30.857-30.857 47.429-72.571 47.429-116 0-45.143-18.286-88-50.286-119.429l50.286-50.286c31.429 32 73.714 50.286 118.857 50.286 43.429 0 85.714-17.143 116.571-48l118.857-118.857c31.429-31.429 48-72.571 48-116.571z" />
16
+ <glyph unicode="&#xf0d4;" glyph-name="google-plus" horiz-adv-x="878" d="M524 433.714c0 14.286-1.714 25.714-3.429 36.571h-206.857v-75.429h124c-4.571-32-37.143-94.286-124-94.286-75.429 0-136.571 61.714-136.571 138.286s61.143 138.286 136.571 138.286c42.286 0 70.857-17.714 87.429-33.714l59.429 57.714c-38.286 35.429-88 57.143-146.857 57.143-121.714 0-219.429-98.286-219.429-219.429s97.714-219.429 219.429-219.429c126.286 0 210.286 89.143 210.286 214.286zM721.143 407.428h62.286v62.857h-62.286v62.857h-62.857v-62.857h-62.857v-62.857h62.857v-62.857h62.857v62.857zM877.714 713.143v-548.571c0-90.857-73.714-164.571-164.571-164.571h-548.571c-90.857 0-164.571 73.714-164.571 164.571v548.571c0 90.857 73.714 164.571 164.571 164.571h548.571c90.857 0 164.571-73.714 164.571-164.571z" />
17
+ <glyph unicode="&#xf143;" glyph-name="rss" horiz-adv-x="878" d="M292.571 219.428c0 40.571-32.571 73.143-73.143 73.143s-73.143-32.571-73.143-73.143 32.571-73.143 73.143-73.143 73.143 32.571 73.143 73.143zM493.143 165.714c-9.714 177.143-150.286 317.714-327.429 327.429-5.143 0.571-10.286-1.714-13.714-5.143s-5.714-8-5.714-13.143v-73.143c0-9.714 7.429-17.714 17.143-18.286 117.143-8.571 211.429-102.857 220-220 0.571-9.714 8.571-17.143 18.286-17.143h73.143c5.143 0 9.714 2.286 13.143 5.714s5.714 8.571 5.143 13.714zM712.571 165.143c-9.714 297.143-250.286 537.714-547.429 547.429-5.714 0.571-9.714-1.143-13.143-5.143-3.429-3.429-5.714-8-5.714-13.143v-73.143c0-9.714 8-17.714 17.714-18.286 237.143-8.571 430.286-201.714 438.857-438.857 0.571-9.714 8.571-17.714 18.286-17.714h73.143c5.143 0 9.714 2.286 13.143 5.714 4 3.429 5.714 8 5.143 13.143zM877.714 713.143v-548.571c0-90.857-73.714-164.571-164.571-164.571h-548.571c-90.857 0-164.571 73.714-164.571 164.571v548.571c0 90.857 73.714 164.571 164.571 164.571h548.571c90.857 0 164.571-73.714 164.571-164.571z" />
18
+ <glyph unicode="&#xf166;" glyph-name="youtube" horiz-adv-x="878" d="M525.143 206.286v89.714c0 18.857-5.714 28.571-16.571 28.571-6.286 0-12.571-2.857-18.857-9.143v-128c6.286-6.286 12.571-9.143 18.857-9.143 10.857 0 16.571 9.143 16.571 28zM630.286 276h37.714v19.429c0 19.429-6.286 29.143-18.857 29.143s-18.857-9.714-18.857-29.143v-19.429zM304 428v-40h-45.714v-241.714h-42.286v241.714h-44.571v40h132.571zM418.857 356v-209.714h-38.286v22.857c-14.857-17.143-29.143-25.714-43.429-25.714-12 0-20.571 5.143-24 16-2.286 6.286-3.429 16-3.429 30.857v165.714h37.714v-154.286c0-8.571 0-13.714 0.571-14.857 0.571-5.714 3.429-8.571 8.571-8.571 8 0 15.429 5.714 24 17.714v160h38.286zM562.857 292.571v-83.429c0-18.857-1.143-33.143-4-41.714-4.571-16-14.857-24-30.286-24-13.143 0-26.286 8-38.857 23.429v-20.571h-38.286v281.714h38.286v-92c12 14.857 25.143 22.857 38.857 22.857 15.429 0 25.714-8 30.286-24 2.857-8.571 4-22.286 4-42.286zM706.286 218.857v-5.143c0-12.571-0.571-20.571-1.143-24.571-1.143-8.571-4-16-8.571-22.857-10.286-15.429-26.286-22.857-45.714-22.857-20 0-35.429 7.429-46.286 21.714-8 10.286-12 26.857-12 49.143v73.714c0 22.286 3.429 38.286 11.429 49.143 10.857 14.286 26.286 21.714 45.714 21.714 18.857 0 34.286-7.429 44.571-21.714 8-10.857 12-26.857 12-49.143v-43.429h-76v-37.143c0-19.429 6.286-29.143 19.429-29.143 9.143 0 14.857 5.143 17.143 14.857 0 2.286 0.571 10.857 0.571 25.714h38.857zM448.571 689.714v-89.143c0-19.429-6.286-29.143-18.286-29.143-12.571 0-18.286 9.714-18.286 29.143v89.143c0 19.429 5.714 29.714 18.286 29.714 12 0 18.286-10.286 18.286-29.714zM753.143 282.286v0c0 49.143 0 101.143-10.857 148.571-8 33.714-35.429 58.286-68 61.714-77.714 8.571-156.571 8.571-235.429 8.571-78.286 0-157.143 0-234.857-8.571-33.143-3.429-60.571-28-68-61.714-10.857-47.429-11.429-99.429-11.429-148.571v0c0-48.571 0-100.571 11.429-148.571 7.429-33.143 34.857-57.714 67.429-61.714 78.286-8.571 157.143-8.571 235.429-8.571s157.143 0 235.429 8.571c32.571 4 60 28.571 67.429 61.714 11.429 48 11.429 100 11.429 148.571zM321.714 654.286l51.429 169.143h-42.857l-29.143-111.429-30.286 111.429h-44.571c8.571-26.286 18.286-52.571 26.857-78.857 13.714-40 22.286-69.714 26.286-90.286v-114.857h42.286v114.857zM486.857 608v74.286c0 22.286-4 38.857-12 49.714-10.857 14.286-25.714 21.714-44.571 21.714-19.429 0-34.286-7.429-44.571-21.714-8-10.857-12-27.429-12-49.714v-74.286c0-22.286 4-38.857 12-49.714 10.286-14.286 25.143-21.714 44.571-21.714 18.857 0 33.714 7.429 44.571 21.714 8 10.286 12 27.429 12 49.714zM590.286 539.428h38.286v211.429h-38.286v-161.714c-8.571-12-16.571-17.714-24-17.714-5.143 0-8.571 2.857-9.143 9.143-0.571 1.143-0.571 5.714-0.571 14.857v155.429h-38.286v-167.429c0-14.857 1.143-24.571 3.429-31.429 4-10.286 12.571-15.429 24.571-15.429 14.286 0 28.571 8.571 44 25.714v-22.857zM877.714 713.143v-548.571c0-90.857-73.714-164.571-164.571-164.571h-548.571c-90.857 0-164.571 73.714-164.571 164.571v548.571c0 90.857 73.714 164.571 164.571 164.571h548.571c90.857 0 164.571-73.714 164.571-164.571z" />
19
+ <glyph unicode="&#xf16d;" glyph-name="instagram" horiz-adv-x="878" d="M585.143 438.857c0 80.571-65.714 146.286-146.286 146.286s-146.286-65.714-146.286-146.286 65.714-146.286 146.286-146.286 146.286 65.714 146.286 146.286zM664 438.857c0-124.571-100.571-225.143-225.143-225.143s-225.143 100.571-225.143 225.143 100.571 225.143 225.143 225.143 225.143-100.571 225.143-225.143zM725.714 673.143c0-29.143-23.429-52.571-52.571-52.571s-52.571 23.429-52.571 52.571 23.429 52.571 52.571 52.571 52.571-23.429 52.571-52.571zM438.857 798.857c-64 0-201.143 5.143-258.857-17.714-20-8-34.857-17.714-50.286-33.143s-25.143-30.286-33.143-50.286c-22.857-57.714-17.714-194.857-17.714-258.857s-5.143-201.143 17.714-258.857c8-20 17.714-34.857 33.143-50.286s30.286-25.143 50.286-33.143c57.714-22.857 194.857-17.714 258.857-17.714s201.143-5.143 258.857 17.714c20 8 34.857 17.714 50.286 33.143s25.143 30.286 33.143 50.286c22.857 57.714 17.714 194.857 17.714 258.857s5.143 201.143-17.714 258.857c-8 20-17.714 34.857-33.143 50.286s-30.286 25.143-50.286 33.143c-57.714 22.857-194.857 17.714-258.857 17.714zM877.714 438.857c0-60.571 0.571-120.571-2.857-181.143-3.429-70.286-19.429-132.571-70.857-184s-113.714-67.429-184-70.857c-60.571-3.429-120.571-2.857-181.143-2.857s-120.571-0.571-181.143 2.857c-70.286 3.429-132.571 19.429-184 70.857s-67.429 113.714-70.857 184c-3.429 60.571-2.857 120.571-2.857 181.143s-0.571 120.571 2.857 181.143c3.429 70.286 19.429 132.571 70.857 184s113.714 67.429 184 70.857c60.571 3.429 120.571 2.857 181.143 2.857s120.571 0.571 181.143-2.857c70.286-3.429 132.571-19.429 184-70.857s67.429-113.714 70.857-184c3.429-60.571 2.857-120.571 2.857-181.143z" />
20
+ <glyph unicode="&#xf174;" glyph-name="tumblr" horiz-adv-x="878" d="M649.143 116l-35.429 104.571c-13.714-6.857-39.429-12.571-58.857-12.571-58.286-1.714-70.286 40.571-70.286 72v227.429h146.857v110.857h-146.286v186.286h-107.429c-1.714 0-4.571-1.714-5.143-5.714-6.286-56.571-33.143-157.143-144-197.143v-94.286h74.286v-238.857c0-81.714 60-198.286 219.429-195.429 53.714 1.143 113.714 23.429 126.857 42.857zM877.714 713.143v-548.571c0-90.857-73.714-164.571-164.571-164.571h-548.571c-90.857 0-164.571 73.714-164.571 164.571v548.571c0 90.857 73.714 164.571 164.571 164.571h548.571c90.857 0 164.571-73.714 164.571-164.571z" />
21
+ <glyph unicode="&#xf17d;" glyph-name="dribbble" horiz-adv-x="878" d="M585.143 93.714c-5.714 33.143-27.429 147.429-80 284.571-0.571 0-1.714-0.571-2.286-0.571 0 0-222.286-77.714-294.286-234.286-3.429 2.857-8.571 6.286-8.571 6.286 65.143-53.143 148-85.714 238.857-85.714 52 0 101.143 10.857 146.286 29.714zM479.429 440.571c-9.143 21.143-19.429 42.286-30.286 63.429-193.143-57.714-378.286-53.143-384.571-53.143-0.571-4-0.571-8-0.571-12 0-96 36.571-184 96-250.286v0c102.286 182.286 304.571 247.429 304.571 247.429 5.143 1.714 10.286 2.857 14.857 4.571zM418.286 561.714c-65.143 115.429-134.286 209.143-139.429 216-104.571-49.143-182.286-145.714-206.857-261.714 9.714 0 166.286-1.714 346.286 45.714zM809.143 379.428c-8 2.286-112.571 35.429-233.714 16.571 49.143-135.429 69.143-245.714 73.143-268 84 56.571 143.429 146.857 160.571 251.429zM349.143 802.857c-0.571 0-0.571 0-1.143-0.571 0 0 0.571 0.571 1.143 0.571zM686.286 720c-65.714 58.286-152.571 93.714-247.429 93.714-30.286 0-60-4-88.571-10.857 5.714-7.429 76.571-100.571 140.571-218.286 141.143 52.571 194.286 133.714 195.429 135.429zM813.714 442.857c-1.143 88.571-32.571 170.286-85.143 234.286-1.143-1.143-61.143-88-209.143-148.571 8.571-17.714 17.143-36 25.143-54.286 2.857-6.286 5.143-13.143 8-19.429 129.143 16.571 256.571-11.429 261.143-12zM877.714 438.857c0-242.286-196.571-438.857-438.857-438.857s-438.857 196.571-438.857 438.857 196.571 438.857 438.857 438.857 438.857-196.571 438.857-438.857z" />
22
+ <glyph unicode="&#xf194;" glyph-name="vimeo" horiz-adv-x="878" d="M738.286 586.286c4 82.857-26.857 124.571-92 126.857-88 2.857-147.429-46.857-178.286-149.143 16 6.857 31.429 10.857 46.857 10.857 32 0 46.286-18.286 42.286-54.857-1.714-21.714-16-53.714-42.286-95.429-26.857-42.286-46.857-62.857-60-62.857-17.143 0-32 32-46.857 96.571-4.571 19.429-13.143 67.429-25.714 145.714-11.429 72-41.714 105.714-91.429 101.143-20.571-2.286-52.571-20.571-93.714-57.143-30.857-26.857-61.143-54.857-92.571-82.286l29.714-38.286c28.571 19.429 45.143 29.714 49.714 29.714 21.714 0 42.286-34.286 61.143-102.286 17.143-62.857 34.286-125.143 51.429-188 25.714-68 56.571-102.286 93.714-102.286 59.429 0 132.571 56 218.857 168 83.429 107.429 126.857 192 129.143 253.714zM877.714 713.143v-548.571c0-90.857-73.714-164.571-164.571-164.571h-548.571c-90.857 0-164.571 73.714-164.571 164.571v548.571c0 90.857 73.714 164.571 164.571 164.571h548.571c90.857 0 164.571-73.714 164.571-164.571z" />
23
+ <glyph unicode="&#xf1a6;" glyph-name="digg" horiz-adv-x="1170" d="M187.429 789.714h116.571v-561.714h-304v398.286h187.429v163.429zM187.429 321.714v210.857h-70.286v-210.857h70.286zM350.857 626.286v-398.286h117.143v398.286h-117.143zM350.857 789.714v-116.571h117.143v116.571h-117.143zM514.857 626.286h304.571v-538.286h-304.571v93.143h187.429v46.857h-187.429v398.286zM702.286 321.714v210.857h-70.286v-210.857h70.286zM866.286 626.286h304v-538.286h-304v93.143h186.857v46.857h-186.857v398.286zM1053.143 321.714v210.857h-70.286v-210.857h70.286z" />
24
+ </font></defs></svg>
assets/css/fonts/woomail-social.ttf ADDED
Binary file
assets/css/fonts/woomail-social.woff ADDED
Binary file
assets/css/fonts/woomail-social.woff2 ADDED
Binary file
assets/fonts/iconpicker.eot ADDED
Binary file
assets/fonts/iconpicker.svg ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Copyright (C) 2014 by original authors @ fontello.com</metadata>
5
+ <defs>
6
+ <font id="iconpicker" horiz-adv-x="1000" >
7
+ <font-face font-family="iconpicker" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
8
+ <missing-glyph horiz-adv-x="1000" />
9
+ <glyph glyph-name="spin3" unicode="&#xe815;" d="m494 850c-266 0-483-210-494-472c-1-19 13-20 13-20l84 0c16 0 19 10 19 18c10 199 176 358 378 358c107 0 205-45 273-118l-58-57c-11-12-11-27 5-31l247-50c21-5 46 11 37 44l-58 227c-2 9-16 22-29 13l-65-60c-89 91-214 148-352 148z m409-508c-16 0-19-10-19-18c-10-199-176-358-377-358c-108 0-205 45-274 118l59 57c10 12 10 27-5 31l-248 50c-21 5-46-11-37-44l58-227c2-9 16-22 30-13l64 60c89-91 214-148 353-148c265 0 482 210 493 473c1 18-13 19-13 19l-84 0z" horiz-adv-x="1000" />
10
+ <glyph glyph-name="search" unicode="&#xe812;" d="m643 386q0 103-74 176t-176 74t-177-74t-73-176t73-177t177-73t176 73t74 177z m286-465q0-29-22-50t-50-21q-30 0-50 21l-191 191q-100-69-223-69q-80 0-153 31t-125 84t-84 125t-31 153t31 152t84 126t125 84t153 31t152-31t126-84t84-126t31-152q0-123-69-223l191-191q21-21 21-51z" horiz-adv-x="928.6" />
11
+ <glyph glyph-name="cancel" unicode="&#xe814;" d="m724 112q0-22-15-38l-76-76q-16-15-38-15t-38 15l-164 165l-164-165q-16-15-38-15t-38 15l-76 76q-16 16-16 38t16 38l164 164l-164 164q-16 16-16 38t16 38l76 76q16 16 38 16t38-16l164-164l164 164q16 16 38 16t38-16l76-76q15-15 15-38t-15-38l-164-164l164-164q15-15 15-38z" horiz-adv-x="785.7" />
12
+ <glyph glyph-name="block" unicode="&#xe84e;" d="m732 352q0 90-48 164l-421-420q76-50 166-50q62 0 118 25t96 65t65 97t24 119z m-557-167l421 421q-75 50-167 50q-83 0-153-40t-110-112t-41-152q0-91 50-167z m682 167q0-88-34-168t-91-137t-137-92t-166-34t-167 34t-137 92t-91 137t-34 168t34 167t91 137t137 91t167 34t166-34t137-91t91-137t34-167z" horiz-adv-x="857.1" />
13
+ <glyph glyph-name="down-dir" unicode="&#xe800;" d="m571 457q0-14-10-25l-250-250q-11-11-25-11t-25 11l-250 250q-11 11-11 25t11 25t25 11h500q14 0 25-11t10-25z" horiz-adv-x="571.4" />
14
+ <glyph glyph-name="up-dir" unicode="&#xe813;" d="m571 171q0-14-10-25t-25-10h-500q-15 0-25 10t-11 25t11 26l250 250q10 10 25 10t25-10l250-250q10-11 10-26z" horiz-adv-x="571.4" />
15
+ <glyph glyph-name="left-dir" unicode="&#xe801;" d="m357 600v-500q0-14-10-25t-26-11t-25 11l-250 250q-10 11-10 25t10 25l250 250q11 11 25 11t26-11t10-25z" horiz-adv-x="357.1" />
16
+ <glyph glyph-name="right-dir" unicode="&#xe802;" d="m321 350q0-14-10-25l-250-250q-11-11-25-11t-25 11t-11 25v500q0 15 11 25t25 11t25-11l250-250q10-10 10-25z" horiz-adv-x="357.1" />
17
+ </font>
18
+ </defs>
19
+ </svg>
assets/fonts/iconpicker.ttf ADDED
Binary file
assets/fonts/iconpicker.woff ADDED
Binary file
assets/images/black/digg.png ADDED
Binary file
assets/images/black/dribbble.png ADDED
Binary file
assets/images/black/facebook.png ADDED
Binary file
assets/images/black/google-plus.png ADDED
Binary file
assets/images/black/instagram.png ADDED
Binary file
assets/images/black/link.png ADDED
Binary file
assets/images/black/linkedin.png ADDED
Binary file
assets/images/black/rss.png ADDED
Binary file
assets/images/black/stumbleupon.png ADDED
Binary file
assets/images/black/tumblr.png ADDED
Binary file
assets/images/black/twitter.png ADDED
Binary file
assets/images/black/vimeo.png ADDED
Binary file
assets/images/black/vk.png ADDED
Binary file
assets/images/black/youtube.png ADDED
Binary file
assets/images/gray/digg.png ADDED
Binary file
assets/images/gray/dribbble.png ADDED
Binary file
assets/images/gray/facebook.png ADDED
Binary file
assets/images/gray/google-plus.png ADDED
Binary file
assets/images/gray/instagram.png ADDED
Binary file
assets/images/gray/link.png ADDED
Binary file
assets/images/gray/linkedin.png ADDED
Binary file
assets/images/gray/rss.png ADDED
Binary file
assets/images/gray/stumbleupon.png ADDED
Binary file
assets/images/gray/tumblr.png ADDED
Binary file
assets/images/gray/twitter.png ADDED
Binary file
assets/images/gray/vimeo.png ADDED
Binary file
assets/images/gray/vk.png ADDED
Binary file
assets/images/gray/youtube.png ADDED
Binary file
assets/images/kt_flat_template.jpg ADDED
Binary file
assets/images/kt_full_template.jpg ADDED
Binary file
assets/images/kt_skinny_template.jpg ADDED
Binary file
assets/images/white/digg.png ADDED
Binary file
assets/images/white/dribbble.png ADDED
Binary file
assets/images/white/facebook.png ADDED
Binary file
assets/images/white/google-plus.png ADDED
Binary file
assets/images/white/instagram.png ADDED
Binary file
assets/images/white/link.png ADDED
Binary file
assets/images/white/linkedin.png ADDED
Binary file
assets/images/white/rss.png ADDED
Binary file
assets/images/white/stumbleupon.png ADDED
Binary file
assets/images/white/tumblr.png ADDED
Binary file
assets/images/white/twitter.png ADDED
Binary file
assets/images/white/vimeo.png ADDED
Binary file
assets/images/white/vk.png ADDED
Binary file
assets/images/white/youtube.png ADDED
Binary file
assets/js/customizer-range-value-control.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Script run inside a Customizer control sidebar
3
+ */
4
+ (function($) {
5
+ wp.customize.bind('ready', function() {
6
+ rangeSlider();
7
+ });
8
+
9
+ var rangeSlider = function() {
10
+ var slider = $('.range-slider'),
11
+ range = $('.range-slider__range'),
12
+ value = $('.range-slider__value');
13
+
14
+ slider.each(function() {
15
+
16
+ value.each(function() {
17
+ var value = $(this).prev().attr('value');
18
+ var suffix = ($(this).prev().attr('suffix')) ? $(this).prev().attr('suffix') : '';
19
+ $(this).html(value + suffix);
20
+ });
21
+
22
+ range.on('input', function() {
23
+ var suffix = ($(this).attr('suffix')) ? $(this).attr('suffix') : '';
24
+ $(this).next(value).html(this.value + suffix );
25
+ });
26
+ });
27
+ };
28
+
29
+ })(jQuery);
assets/js/customizer-repeater-control.js ADDED
@@ -0,0 +1,411 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* global jQuery */
2
+ /* global wp */
3
+ /**
4
+ * jQuery fontIconPicker - 3.1.1
5
+ *
6
+ * An icon picker built on top of font icons and jQuery
7
+ *
8
+ * http://codeb.it/fontIconPicker
9
+ *
10
+ * @author Alessandro Benoit & Swashata Ghosh
11
+ * @license MIT License
12
+ *
13
+ * {@link https://github.com/micc83/fontIconPicker}
14
+ */
15
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):t.initFontIconPickerNode=e(t.jQuery)}(this,function(t){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t){return function(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var s={theme:"fip-grey",source:!1,emptyIcon:!0,emptyIconValue:"",autoClose:!0,iconsPerPage:20,hasSearch:!0,searchSource:!1,appendTo:"self",useAttribute:!1,attributeName:"data-icon",convertToHex:!0,allCategoryText:"From all categories",unCategorizedText:"Uncategorized",iconGenerator:null,windowDebounceDelay:150,searchPlaceholder:"Search Icons"},n=t=t&&t.hasOwnProperty("default")?t.default:t,o=0;function r(t,e){this.element=n(t),this.settings=n.extend({},s,e),this.settings.emptyIcon&&this.settings.iconsPerPage--,this.iconPicker=n("<div/>",{class:"icons-selector",style:"position: relative",html:this._getPickerTemplate(),attr:{"data-fip-origin":this.element.attr("id")}}),this.iconContainer=this.iconPicker.find(".fip-icons-container"),this.searchIcon=this.iconPicker.find(".selector-search i"),this.selectorPopup=this.iconPicker.find(".selector-popup-wrap"),this.selectorButton=this.iconPicker.find(".selector-button"),this.iconsSearched=[],this.isSearch=!1,this.totalPage=1,this.currentPage=1,this.currentIcon=!1,this.iconsCount=0,this.open=!1,this.guid=o++,this.eventNameSpace=".fontIconPicker".concat(o),this.searchValues=[],this.availableCategoriesSearch=[],this.triggerEvent=null,this.backupSource=[],this.backupSearch=[],this.isCategorized=!1,this.selectCategory=this.iconPicker.find(".icon-category-select"),this.selectedCategory=!1,this.availableCategories=[],this.unCategorizedKey=null,this.init()}function c(t){return!(!(e=t).fn||(!e.fn||!e.fn.fontIconPicker)&&(e.fn.fontIconPicker=function(t){var i=this;return this.each(function(){e.data(this,"fontIconPicker")||e.data(this,"fontIconPicker",new r(this,t))}),this.setIcons=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];i.each(function(){e.data(this,"fontIconPicker").setIcons(t,s)})},this.setIcon=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";i.each(function(){e.data(this,"fontIconPicker").setIcon(t)})},this.destroyPicker=function(){i.each(function(){e.data(this,"fontIconPicker")&&(e.data(this,"fontIconPicker").destroy(),e.removeData(this,"fontIconPicker"))})},this.refreshPicker=function(s){s||(s=t),i.destroyPicker(),i.each(function(){e.data(this,"fontIconPicker")||e.data(this,"fontIconPicker",new r(this,s))})},this.repositionPicker=function(){i.each(function(){e.data(this,"fontIconPicker").resetPosition()})},this.setPage=function(t){i.each(function(){e.data(this,"fontIconPicker").setPage(t)})},this},0));var e}r.prototype={init:function(){this.iconPicker.addClass(this.settings.theme),this.iconPicker.css({left:-9999}).appendTo("body");var t=this.iconPicker.outerHeight(),e=this.iconPicker.outerWidth();this.iconPicker.css({left:""}),this.element.before(this.iconPicker),this.element.css({visibility:"hidden",top:0,position:"relative",zIndex:"-1",left:"-"+e+"px",display:"inline-block",height:t+"px",width:e+"px",padding:"0",margin:"0 -"+e+"px 0 0",border:"0 none",verticalAlign:"top",float:"none"}),this.element.is("select")||(this.triggerEvent="input"),!this.settings.source&&this.element.is("select")?this._populateSourceFromSelect():this._initSourceIndex(),this._loadCategories(),this._loadIcons(),this._initDropDown(),this._initCategoryChanger(),this._initPagination(),this._initIconSearch(),this._initIconSelect(),this._initAutoClose(),this._initFixOnResize()},setIcons:function(t,e){this.settings.source=Array.isArray(t)?i(t):n.extend({},t),this.settings.searchSource=Array.isArray(e)?i(e):n.extend({},e),this._initSourceIndex(),this._loadCategories(),this._resetSearch(),this._loadIcons()},setIcon:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this._setSelectedIcon(t)},destroy:function(){this.iconPicker.off().remove(),this.element.css({visibility:"",top:"",position:"",zIndex:"",left:"",display:"",height:"",width:"",padding:"",margin:"",border:"",verticalAlign:"",float:""}),n(window).off("resize"+this.eventNameSpace),n("html").off("click"+this.eventNameSpace)},resetPosition:function(){this._fixOnResize()},setPage:function(t){"first"==t&&(t=1),"last"==t&&(t=this.totalPage),t=parseInt(t,10),isNaN(t)&&(t=1),t>this.totalPage&&(t=this.totalPage),1>t&&(t=1),this.currentPage=t,this._renderIconContainer()},_initFixOnResize:function(){var t,e,i,s=this;n(window).on("resize"+this.eventNameSpace,(t=function(){s._fixOnResize()},e=this.settings.windowDebounceDelay,function(){var s=this,n=arguments;clearTimeout(i),i=setTimeout(function(){return t.apply(s,n)},e)}))},_initAutoClose:function(){var t=this;this.settings.autoClose&&n("html").on("click"+this.eventNameSpace,function(e){var i=e.target;t.selectorPopup.has(i).length||t.selectorPopup.is(i)||t.iconPicker.has(i).length||t.iconPicker.is(i)||t.open&&t._toggleIconSelector()})},_initIconSelect:function(){var t=this;this.selectorPopup.on("click",".fip-box",function(e){var i=n(e.currentTarget);t._setSelectedIcon(i.attr("data-fip-value")),t._toggleIconSelector()})},_initIconSearch:function(){var t=this;this.selectorPopup.on("input",".icons-search-input",function(e){var i=n(e.currentTarget).val();""!==i?(t.searchIcon.removeClass("fip-icon-search"),t.searchIcon.addClass("fip-icon-cancel"),t.isSearch=!0,t.currentPage=1,t.iconsSearched=[],n.grep(t.searchValues,function(e,s){if(0<=e.toLowerCase().search(i.toLowerCase()))return t.iconsSearched[t.iconsSearched.length]=t.settings.source[s],!0}),t._renderIconContainer()):t._resetSearch()}),this.selectorPopup.on("click",".selector-search .fip-icon-cancel",function(){t.selectorPopup.find(".icons-search-input").focus(),t._resetSearch()})},_initPagination:function(){var t=this;this.selectorPopup.on("click",".selector-arrow-right",function(e){t.currentPage<t.totalPage&&(t.currentPage=t.currentPage+1,t._renderIconContainer())}),this.selectorPopup.on("click",".selector-arrow-left",function(e){1<t.currentPage&&(t.currentPage=t.currentPage-1,t._renderIconContainer())})},_initCategoryChanger:function(){var t=this;this.selectorPopup.on("change keyup",".icon-category-select",function(e){if(!1===t.isCategorized)return!1;var i=n(e.currentTarget),s=i.val();if("all"===i.val())t.settings.source=t.backupSource,t.searchValues=t.backupSearch;else{var o=parseInt(s,10);t.availableCategories[o]&&(t.settings.source=t.availableCategories[o],t.searchValues=t.availableCategoriesSearch[o])}t._resetSearch(),t._loadIcons()})},_initDropDown:function(){var t=this;this.selectorButton.on("click",function(e){t._toggleIconSelector()})},_getPickerTemplate:function(){return'\n<div class="selector" data-fip-origin="'.concat(this.element.attr("id"),'">\n\t<span class="selected-icon">\n\t\t<i class="fip-icon-block"></i>\n\t</span>\n\t<span class="selector-button">\n\t\t<i class="fip-icon-down-dir"></i>\n\t</span>\n</div>\n<div class="selector-popup-wrap" data-fip-origin="').concat(this.element.attr("id"),'">\n\t<div class="selector-popup" style="display: none;"> ').concat(this.settings.hasSearch?'<div class="selector-search">\n\t\t\t<input type="text" name="" value="" placeholder="'.concat(this.settings.searchPlaceholder,'" class="icons-search-input"/>\n\t\t\t<i class="fip-icon-search"></i>\n\t\t</div>'):"",'\n\t\t<div class="selector-category">\n\t\t\t<select name="" class="icon-category-select" style="display: none"></select>\n\t\t</div>\n\t\t<div class="fip-icons-container"></div>\n\t\t<div class="selector-footer" style="display:none;">\n\t\t\t<span class="selector-pages">1/2</span>\n\t\t\t<span class="selector-arrows">\n\t\t\t\t<span class="selector-arrow-left" style="display:none;">\n\t\t\t\t\t<i class="fip-icon-left-dir"></i>\n\t\t\t\t</span>\n\t\t\t\t<span class="selector-arrow-right">\n\t\t\t\t\t<i class="fip-icon-right-dir"></i>\n\t\t\t\t</span>\n\t\t\t</span>\n\t\t</div>\n\t</div>\n</div>')},_initSourceIndex:function(){if("object"===e(this.settings.source)){if(Array.isArray(this.settings.source))this.isCategorized=!1,this.selectCategory.html("").hide(),this.settings.source=n.map(this.settings.source,function(t,e){return"function"==typeof t.toString?t.toString():t}),Array.isArray(this.settings.searchSource)?this.searchValues=n.map(this.settings.searchSource,function(t,e){return"function"==typeof t.toString?t.toString():t}):this.searchValues=this.settings.source.slice(0);else{var t=n.extend(!0,{},this.settings.source);for(var i in this.settings.source=[],this.searchValues=[],this.availableCategoriesSearch=[],this.selectedCategory=!1,this.availableCategories=[],this.unCategorizedKey=null,this.isCategorized=!0,this.selectCategory.html(""),t){var s=this.availableCategories.length,o=n("<option />");for(var r in o.attr("value",s),o.html(i),this.selectCategory.append(o),this.availableCategories[s]=[],this.availableCategoriesSearch[s]=[],t[i]){var c=t[i][r],a=this.settings.searchSource&&this.settings.searchSource[i]&&this.settings.searchSource[i][r]?this.settings.searchSource[i][r]:c;"function"==typeof c.toString&&(c=c.toString()),c&&c!==this.settings.emptyIconValue&&(this.settings.source.push(c),this.availableCategories[s].push(c),this.searchValues.push(a),this.availableCategoriesSearch[s].push(a))}}}this.backupSource=this.settings.source.slice(0),this.backupSearch=this.searchValues.slice(0)}},_populateSourceFromSelect:function(){var t=this;this.settings.source=[],this.settings.searchSource=[],this.element.find("optgroup").length?(this.isCategorized=!0,this.element.find("optgroup").each(function(e,i){var s=t.availableCategories.length,o=n("<option />");o.attr("value",s),o.html(n(i).attr("label")),t.selectCategory.append(o),t.availableCategories[s]=[],t.availableCategoriesSearch[s]=[],n(i).find("option").each(function(e,i){var o=n(i).val(),r=n(i).html();o&&o!==t.settings.emptyIconValue&&(t.settings.source.push(o),t.availableCategories[s].push(o),t.searchValues.push(r),t.availableCategoriesSearch[s].push(r))})}),this.element.find("> option").length&&this.element.find("> option").each(function(e,i){var s=n(i).val(),o=n(i).html();if(!s||""===s||s==t.settings.emptyIconValue)return!0;null===t.unCategorizedKey&&(t.unCategorizedKey=t.availableCategories.length,t.availableCategories[t.unCategorizedKey]=[],t.availableCategoriesSearch[t.unCategorizedKey]=[],n("<option />").attr("value",t.unCategorizedKey).html(t.settings.unCategorizedText).appendTo(t.selectCategory)),t.settings.source.push(s),t.availableCategories[t.unCategorizedKey].push(s),t.searchValues.push(o),t.availableCategoriesSearch[t.unCategorizedKey].push(o)})):this.element.find("option").each(function(e,i){var s=n(i).val(),o=n(i).html();s&&(t.settings.source.push(s),t.searchValues.push(o))}),this.backupSource=this.settings.source.slice(0),this.backupSearch=this.searchValues.slice(0)},_loadCategories:function(){!1!==this.isCategorized&&(n('<option value="all">'+this.settings.allCategoryText+"</option>").prependTo(this.selectCategory),this.selectCategory.show().val("all").trigger("change"))},_loadIcons:function(){this.iconContainer.html('<i class="fip-icon-spin3 animate-spin loading"></i>'),Array.isArray(this.settings.source)&&this._renderIconContainer()},_iconGenerator:function(t){return"function"==typeof this.settings.iconGenerator?this.settings.iconGenerator(t):"<i "+(this.settings.useAttribute?this.settings.attributeName+'="'+(this.settings.convertToHex?"&#x"+parseInt(t,10).toString(16)+";":t)+'"':'class="'+t+'"')+"></i>"},_renderIconContainer:function(){var t,e=this,i=[];if(i=this.isSearch?this.iconsSearched:this.settings.source,this.iconsCount=i.length,this.totalPage=Math.ceil(this.iconsCount/this.settings.iconsPerPage),1<this.totalPage?(this.selectorPopup.find(".selector-footer").show(),this.currentPage<this.totalPage?this.selectorPopup.find(".selector-arrow-right").show():this.selectorPopup.find(".selector-arrow-right").hide(),1<this.currentPage?this.selectorPopup.find(".selector-arrow-left").show():this.selectorPopup.find(".selector-arrow-left").hide()):this.selectorPopup.find(".selector-footer").hide(),this.selectorPopup.find(".selector-pages").html(this.currentPage+"/"+this.totalPage+" <em>("+this.iconsCount+")</em>"),t=(this.currentPage-1)*this.settings.iconsPerPage,this.settings.emptyIcon)this.iconContainer.html('<span class="fip-box" data-fip-value="fip-icon-block"><i class="fip-icon-block"></i></span>');else{if(1>i.length)return void this.iconContainer.html('<span class="icons-picker-error" data-fip-value="fip-icon-block"><i class="fip-icon-block"></i></span>');this.iconContainer.html("")}i=i.slice(t,t+this.settings.iconsPerPage);for(var s,o=function(t,i){var s=i;n.grep(e.settings.source,n.proxy(function(t,e){return t===i&&(s=this.searchValues[e],!0)},e)),n("<span/>",{html:e._iconGenerator(i),attr:{"data-fip-value":i},class:"fip-box",title:s}).appendTo(e.iconContainer)},r=0;s=i[r++];)o(0,s);if(this.settings.emptyIcon||this.element.val()&&-1!==n.inArray(this.element.val(),this.settings.source))if(-1===n.inArray(this.element.val(),this.settings.source))this._setSelectedIcon("");else{var c=this.element.val();c===this.settings.emptyIconValue&&(c="fip-icon-block"),this._setSelectedIcon(c)}else this._setSelectedIcon(i[0])},_setHighlightedIcon:function(){this.iconContainer.find(".current-icon").removeClass("current-icon"),this.currentIcon&&this.iconContainer.find('[data-fip-value="'+this.currentIcon+'"]').addClass("current-icon")},_setSelectedIcon:function(t){"fip-icon-block"===t&&(t="");var e=this.iconPicker.find(".selected-icon");""===t?e.html('<i class="fip-icon-block"></i>'):e.html(this._iconGenerator(t));var i=this.element.val();this.element.val(""===t?this.settings.emptyIconValue:t),i!==t&&(this.element.trigger("change"),null!==this.triggerEvent&&this.element.trigger(this.triggerEvent)),this.currentIcon=t,this._setHighlightedIcon()},_repositionIconSelector:function(){var t=this.iconPicker.offset(),e=t.top+this.iconPicker.outerHeight(!0),i=t.left;this.selectorPopup.css({left:i,top:e})},_fixWindowOverflow:function(){var t=this.selectorPopup.find(".selector-popup").is(":visible");t||this.selectorPopup.find(".selector-popup").show();var e=this.selectorPopup.outerWidth(),i=n(window).width(),s=this.selectorPopup.offset().left,o="self"==this.settings.appendTo?this.selectorPopup.parent().offset():n(this.settings.appendTo).offset();if(t||this.selectorPopup.find(".selector-popup").hide(),s+e>i-20){var r=this.selectorButton.offset().left+this.selectorButton.outerWidth(),c=Math.floor(r-e-1);0>c?this.selectorPopup.css({left:i-20-e-o.left}):this.selectorPopup.css({left:c})}},_fixOnResize:function(){"self"!==this.settings.appendTo&&this._repositionIconSelector(),this._fixWindowOverflow()},_toggleIconSelector:function(){this.open=this.open?0:1,this.open&&("self"!==this.settings.appendTo&&(this.selectorPopup.appendTo(this.settings.appendTo).css({zIndex:1e3}).addClass("icons-selector "+this.settings.theme),this._repositionIconSelector()),this._fixWindowOverflow()),this.selectorPopup.find(".selector-popup").slideToggle(300,n.proxy(function(){this.iconPicker.find(".selector-button i").toggleClass("fip-icon-down-dir"),this.iconPicker.find(".selector-button i").toggleClass("fip-icon-up-dir"),this.open?this.selectorPopup.find(".icons-search-input").trigger("focus").trigger("select"):this.selectorPopup.appendTo(this.iconPicker).css({left:"",top:"",zIndex:""}).removeClass("icons-selector "+this.settings.theme)},this))},_resetSearch:function(){this.selectorPopup.find(".icons-search-input").val(""),this.searchIcon.removeClass("fip-icon-cancel"),this.searchIcon.addClass("fip-icon-search"),this.currentPage=1,this.isSearch=!1,this._renderIconContainer()}},t&&t.fn&&c(t);return function(t){return c(t)}});
16
+
17
+ function media_upload(button_class) {
18
+ 'use strict';
19
+ jQuery('body').on('click', button_class, function () {
20
+ var button_id = '#' + jQuery(this).attr('id');
21
+ var display_field = jQuery(this).parent().children('input:text');
22
+ var _custom_media = true;
23
+
24
+ wp.media.editor.send.attachment = function (props, attachment) {
25
+
26
+ if (_custom_media) {
27
+ if (typeof display_field !== 'undefined') {
28
+ switch (props.size) {
29
+ case 'full':
30
+ display_field.val(attachment.sizes.full.url);
31
+ display_field.trigger('change');
32
+ break;
33
+ case 'medium':
34
+ display_field.val(attachment.sizes.medium.url);
35
+ display_field.trigger('change');
36
+ break;
37
+ case 'thumbnail':
38
+ display_field.val(attachment.sizes.thumbnail.url);
39
+ display_field.trigger('change');
40
+ break;
41
+ default:
42
+ display_field.val(attachment.url);
43
+ display_field.trigger('change');
44
+ }
45
+ }
46
+ _custom_media = false;
47
+ } else {
48
+ return wp.media.editor.send.attachment(button_id, [props, attachment]);
49
+ }
50
+ };
51
+ wp.media.editor.open(button_class);
52
+ window.send_to_editor = function (html) {
53
+
54
+ };
55
+ return false;
56
+ });
57
+ }
58
+
59
+ /********************************************
60
+ *** Generate unique id ***
61
+ *********************************************/
62
+ function customizer_repeater_uniqid(prefix, more_entropy) {
63
+ 'use strict';
64
+ if (typeof prefix === 'undefined') {
65
+ prefix = '';
66
+ }
67
+
68
+ var retId;
69
+ var php_js;
70
+ var formatSeed = function (seed, reqWidth) {
71
+ seed = parseInt(seed, 10)
72
+ .toString(16); // to hex str
73
+ if (reqWidth < seed.length) { // so long we split
74
+ return seed.slice(seed.length - reqWidth);
75
+ }
76
+ if (reqWidth > seed.length) { // so short we pad
77
+ return new Array(1 + (reqWidth - seed.length))
78
+ .join('0') + seed;
79
+ }
80
+ return seed;
81
+ };
82
+
83
+ // BEGIN REDUNDANT
84
+ if (!php_js) {
85
+ php_js = {};
86
+ }
87
+ // END REDUNDANT
88
+ if (!php_js.uniqidSeed) { // init seed with big random int
89
+ php_js.uniqidSeed = Math.floor(Math.random() * 0x75bcd15);
90
+ }
91
+ php_js.uniqidSeed++;
92
+
93
+ retId = prefix; // start with prefix, add current milliseconds hex string
94
+ retId += formatSeed(parseInt(new Date()
95
+ .getTime() / 1000, 10), 8);
96
+ retId += formatSeed(php_js.uniqidSeed, 5); // add seed hex string
97
+ if (more_entropy) {
98
+ // for more entropy we add a float lower to 10
99
+ retId += (Math.random() * 10)
100
+ .toFixed(8)
101
+ .toString();
102
+ }
103
+
104
+ return retId;
105
+ }
106
+
107
+
108
+ /********************************************
109
+ *** General Repeater ***
110
+ *********************************************/
111
+ // function customizer_repeater_refresh_social_icons(th) {
112
+ // 'use strict';
113
+ // var icons_repeater_values = [];
114
+ // th.find('.customizer-repeater-social-repeater-container').each(function () {
115
+ // var icon = jQuery(this).find('.icp').val();
116
+ // var link = jQuery(this).find('.customizer-repeater-social-repeater-link').val();
117
+ // var id = jQuery(this).find('.customizer-repeater-social-repeater-id').val();
118
+
119
+ // if (!id) {
120
+ // id = 'customizer-repeater-social-repeater-' + customizer_repeater_uniqid();
121
+ // jQuery(this).find('.customizer-repeater-social-repeater-id').val(id);
122
+ // }
123
+
124
+ // if (icon !== '' && link !== '') {
125
+ // icons_repeater_values.push({
126
+ // 'icon': icon,
127
+ // 'link': link,
128
+ // 'id': id
129
+ // });
130
+ // }
131
+ // });
132
+
133
+ // th.find('.social-repeater-socials-repeater-colector').val(JSON.stringify(icons_repeater_values));
134
+ // customizer_repeater_refresh_general_control_values();
135
+ // }
136
+
137
+
138
+ function customizer_repeater_refresh_general_control_values() {
139
+ 'use strict';
140
+ jQuery('.customizer-repeater-general-control-repeater').each(function () {
141
+ var values = [];
142
+ var th = jQuery(this);
143
+ th.find('.customizer-repeater-general-control-repeater-container').each(function () {
144
+
145
+ var icon_value = jQuery(this).find('.kadence-icon-select').val();
146
+ var icon_color = jQuery(this).find('.customizer-repeater-icon-color').val();
147
+ var text = jQuery(this).find('.customizer-repeater-text-control').val();
148
+ var link = jQuery(this).find('.customizer-repeater-link-control').val();
149
+ var text2 = jQuery(this).find('.customizer-repeater-text2-control').val();
150
+ var link2 = jQuery(this).find('.customizer-repeater-link2-control').val();
151
+ var color = jQuery(this).find('input.customizer-repeater-color-control').val();
152
+ var color2 = jQuery(this).find('input.customizer-repeater-color2-control').val();
153
+ var image_url = jQuery(this).find('.custom-media-url').val();
154
+ var choice = jQuery(this).find('.customizer-repeater-image-choice').val();
155
+ var title = jQuery(this).find('.customizer-repeater-title-control').val();
156
+ var subtitle = jQuery(this).find('.customizer-repeater-subtitle-control').val();
157
+ var id = jQuery(this).find('.social-repeater-box-id').val();
158
+ if (!id) {
159
+ id = 'social-repeater-' + customizer_repeater_uniqid();
160
+ jQuery(this).find('.social-repeater-box-id').val(id);
161
+ }
162
+ var shortcode = jQuery(this).find('.customizer-repeater-shortcode-control').val();
163
+
164
+ if (text !== '' || image_url !== '' || title !== '' || subtitle !== '' || icon_value !== '' || icon_color !== '' || link !== '' || choice !== '' || shortcode !== '' || color !== '') {
165
+ values.push({
166
+ 'icon_value': (choice === 'customizer_repeater_none' ? '' : icon_value),
167
+ 'icon_color': icon_color,
168
+ 'color': color,
169
+ 'color2': color2,
170
+ 'text': escapeHtml(text),
171
+ 'link': link,
172
+ 'text2': escapeHtml(text2),
173
+ 'link2': link2,
174
+ 'image_url': (choice === 'customizer_repeater_none' ? '' : image_url),
175
+ 'choice': choice,
176
+ 'title': escapeHtml(title),
177
+ 'subtitle': escapeHtml(subtitle),
178
+ 'id': id,
179
+ 'shortcode': escapeHtml(shortcode)
180
+ });
181
+ }
182
+
183
+ });
184
+ th.find('.customizer-repeater-colector').val(JSON.stringify(values));
185
+ th.find('.customizer-repeater-colector').trigger('change');
186
+ });
187
+ }
188
+
189
+ jQuery(document).ready(function ($) {
190
+ kt_icon_picker_init();
191
+ function kt_icon_picker_init(){
192
+ icon_picker = jQuery('select.kadence-icon-select').fontIconPicker({
193
+ emptyIcon:false,
194
+ iconsPerPage:25,
195
+ });
196
+ }
197
+ var theme_conrols = jQuery('#customize-theme-controls');
198
+ theme_conrols.on('click', '.customizer-repeater-customize-control-title', function () {
199
+ jQuery(this).next().slideToggle('medium', function () {
200
+ if (jQuery(this).is(':visible')){
201
+ jQuery(this).prev().addClass('repeater-expanded');
202
+ jQuery(this).css('display', 'block');
203
+ } else {
204
+ jQuery(this).prev().removeClass('repeater-expanded');
205
+ }
206
+ });
207
+ });
208
+
209
+ theme_conrols.on('change', '.kadence-icon-select',function(){
210
+ customizer_repeater_refresh_general_control_values();
211
+ return false;
212
+ });
213
+ theme_conrols.on('change', '.customizer-repeater-icon-color',function(){
214
+ customizer_repeater_refresh_general_control_values();
215
+ return false;
216
+ });
217
+
218
+ theme_conrols.on('change', '.customizer-repeater-image-choice', function () {
219
+ if (jQuery(this).val() === 'customizer_repeater_image') {
220
+ jQuery(this).parent().parent().find('.social-repeater-general-control-icon').hide();
221
+ jQuery(this).parent().parent().find('.customizer-repeater-image-control').show();
222
+ jQuery(this).parent().parent().find('.customizer-repeater-color-control').prev().prev().hide();
223
+ jQuery(this).parent().parent().find('.customizer-repeater-color-control').hide();
224
+ jQuery(this).parent().parent().find('.customizer-repeater-icon-color-control').hide();
225
+
226
+ }
227
+ if (jQuery(this).val() === 'customizer_repeater_icon') {
228
+ jQuery(this).parent().parent().find('.social-repeater-general-control-icon').show();
229
+ jQuery(this).parent().parent().find('.customizer-repeater-image-control').hide();
230
+ jQuery(this).parent().parent().find('.customizer-repeater-color-control').prev().prev().show();
231
+ jQuery(this).parent().parent().find('.customizer-repeater-color-control').show();
232
+ jQuery(this).parent().parent().find('.customizer-repeater-icon-color-control').show();
233
+ }
234
+ if (jQuery(this).val() === 'customizer_repeater_none') {
235
+ jQuery(this).parent().parent().find('.social-repeater-general-control-icon').hide();
236
+ jQuery(this).parent().parent().find('.customizer-repeater-image-control').hide();
237
+ jQuery(this).parent().parent().find('.customizer-repeater-color-control').prev().prev().hide();
238
+ jQuery(this).parent().parent().find('.customizer-repeater-color-control').hide();
239
+ jQuery(this).parent().parent().find('.customizer-repeater-icon-color-control').hide();
240
+ }
241
+
242
+ customizer_repeater_refresh_general_control_values();
243
+ return false;
244
+ });
245
+ media_upload('.customizer-repeater-custom-media-button');
246
+ jQuery('.custom-media-url').on('change', function () {
247
+ customizer_repeater_refresh_general_control_values();
248
+ return false;
249
+ });
250
+
251
+ var color_options = {
252
+ change: function(event, ui){
253
+ customizer_repeater_refresh_general_control_values();
254
+ }
255
+ };
256
+
257
+ /**
258
+ * This adds a new box to repeater
259
+ *
260
+ */
261
+ theme_conrols.on('click', '.customizer-repeater-new-field', function () {
262
+ var th = jQuery(this).parent();
263
+ var id = 'customizer-repeater-' + customizer_repeater_uniqid();
264
+ if (typeof th !== 'undefined') {
265
+ icon_picker.destroyPicker();
266
+ /* Clone the first box*/
267
+ var field = th.find('.customizer-repeater-general-control-repeater-container:first').clone( true, true );
268
+
269
+ if (typeof field !== 'undefined') {
270
+ /*Set the default value for choice between image and icon to icon*/
271
+ field.find('.customizer-repeater-image-choice').val('customizer_repeater_icon');
272
+
273
+ /*Show icon selector*/
274
+ field.find('.social-repeater-general-control-icon').show();
275
+
276
+ /*Hide image selector*/
277
+ if (field.find('.social-repeater-general-control-icon').length > 0) {
278
+ field.find('.customizer-repeater-image-control').hide();
279
+ }
280
+
281
+ /*Show delete box button because it's not the first box*/
282
+ field.find('.social-repeater-general-control-remove-field').show();
283
+
284
+ /*Remove value from icon field*/
285
+ field.find('.kadence-icon-select').val('');
286
+
287
+
288
+ /*Remove value from text field*/
289
+ field.find('.customizer-repeater-text-control').val('');
290
+
291
+ /*Remove value from link field*/
292
+ field.find('.customizer-repeater-link-control').val('');
293
+
294
+ /*Remove value from text field*/
295
+ field.find('.customizer-repeater-text2-control').val('');
296
+
297
+ /*Remove value from link field*/
298
+ field.find('.customizer-repeater-link2-control').val('');
299
+
300
+ /*Set box id*/
301
+ field.find('.social-repeater-box-id').val(id);
302
+
303
+ /*Remove value from media field*/
304
+ field.find('.custom-media-url').val('');
305
+
306
+ /*Remove value from title field*/
307
+ field.find('.customizer-repeater-title-control').val('');
308
+
309
+
310
+ /*Remove value from color field*/
311
+ field.find('div.customizer-repeater-color-control .wp-picker-container').replaceWith('<input type="text" class="customizer-repeater-color-control ' + id + '">');
312
+ field.find('input.customizer-repeater-color-control').wpColorPicker(color_options);
313
+
314
+
315
+ field.find('div.customizer-repeater-color2-control .wp-picker-container').replaceWith('<input type="text" class="customizer-repeater-color2-control ' + id + '">');
316
+ field.find('input.customizer-repeater-color2-control').wpColorPicker(color_options);
317
+
318
+ // field.find('.customize-control-notifications-container').remove();
319
+
320
+
321
+ /*Remove value from subtitle field*/
322
+ field.find('.customizer-repeater-subtitle-control').val('');
323
+
324
+ /*Remove value from shortcode field*/
325
+ field.find('.customizer-repeater-shortcode-control').val('');
326
+
327
+ /*Append new box*/
328
+ th.find('.customizer-repeater-general-control-repeater-container:first').parent().append(field);
329
+
330
+ /*Refresh values*/
331
+ customizer_repeater_refresh_general_control_values();
332
+ }
333
+ kt_icon_picker_init();
334
+ }
335
+ return false;
336
+ });
337
+
338
+
339
+ theme_conrols.on('click', '.social-repeater-general-control-remove-field', function () {
340
+ if (typeof jQuery(this).parent() !== 'undefined') {
341
+ jQuery(this).parent().hide(500, function(){
342
+ jQuery(this).parent().remove();
343
+ customizer_repeater_refresh_general_control_values();
344
+
345
+ });
346
+ }
347
+ return false;
348
+ });
349
+
350
+
351
+ theme_conrols.on('keyup', '.customizer-repeater-title-control', function () {
352
+ customizer_repeater_refresh_general_control_values();
353
+ });
354
+
355
+ jQuery('input.customizer-repeater-color-control').wpColorPicker(color_options);
356
+ jQuery('input.customizer-repeater-color2-control').wpColorPicker(color_options);
357
+
358
+ theme_conrols.on('keyup', '.customizer-repeater-subtitle-control', function () {
359
+ customizer_repeater_refresh_general_control_values();
360
+ });
361
+
362
+ theme_conrols.on('keyup', '.customizer-repeater-shortcode-control', function () {
363
+ customizer_repeater_refresh_general_control_values();
364
+ });
365
+
366
+ theme_conrols.on('keyup', '.customizer-repeater-text-control', function () {
367
+ customizer_repeater_refresh_general_control_values();
368
+ });
369
+
370
+ theme_conrols.on('keyup', '.customizer-repeater-link-control', function () {
371
+ customizer_repeater_refresh_general_control_values();
372
+ });
373
+
374
+ theme_conrols.on('keyup', '.customizer-repeater-text2-control', function () {
375
+ customizer_repeater_refresh_general_control_values();
376
+ });
377
+
378
+ theme_conrols.on('keyup', '.customizer-repeater-link2-control', function () {
379
+ customizer_repeater_refresh_general_control_values();
380
+ });
381
+
382
+ /*Drag and drop to change icons order*/
383
+
384
+ jQuery('.customizer-repeater-general-control-droppable').sortable({
385
+ axis: 'y',
386
+ update: function () {
387
+ customizer_repeater_refresh_general_control_values();
388
+ }
389
+ });
390
+
391
+ });
392
+
393
+ var entityMap = {
394
+ '&': '&amp;',
395
+ '<': '&lt;',
396
+ '>': '&gt;',
397
+ '"': '&quot;',
398
+ '\'': '&#39;',
399
+ '/': '&#x2F;'
400
+ };
401
+
402
+ function escapeHtml(string) {
403
+ 'use strict';
404
+ //noinspection JSUnresolvedFunction
405
+ string = String(string).replace(new RegExp('\r?\n', 'g'), '<br />');
406
+ string = String(string).replace(/\\/g, '&#92;');
407
+ return String(string).replace(/[&<>"'\/]/g, function (s) {
408
+ return entityMap[s];
409
+ });
410
+
411
+ }
assets/js/customizer-scripts.js ADDED
@@ -0,0 +1,219 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Customizer Scripts
3
+ * Need to rewrite and clean up this file.
4
+ */
5
+
6
+ jQuery(document).ready(function() {
7
+
8
+ /**
9
+ * Change description
10
+ */
11
+ jQuery('#customize-info .customize-panel-description').html(kt_woomail.labels.description);
12
+ jQuery('#customize-info .panel-title.site-title').html(kt_woomail.labels.customtitle);
13
+ // Add reset button
14
+ jQuery('#customize-header-actions input#save').after('<input type="submit" name="kt_woomail_reset" id="kt_woomail_reset" class="button button-secondary" value="' + kt_woomail.labels.reset + '" style="float: right; margin-left: 8px; margin-top: 0px;">');
15
+
16
+ // Handle reset button click
17
+ jQuery('#customize-header-actions #kt_woomail_reset').click(function(e) {
18
+
19
+ // Prevent form submit
20
+ e.preventDefault();
21
+
22
+ // Display confirmation prompt
23
+ var confirmation = confirm(kt_woomail.labels.reset_confirmation);
24
+
25
+ // Check user input
26
+ if ( ! confirmation ) {
27
+ return;
28
+ }
29
+
30
+ // Disable reset button
31
+ jQuery(this).prop('disabled', true);
32
+
33
+ // Populate request data object
34
+ var data = {
35
+ wp_customize: 'on',
36
+ action: 'kt_woomail_reset',
37
+ };
38
+
39
+ // Send request to server
40
+ jQuery.post(kt_woomail.ajax_url, data, function() {
41
+ wp.customize.state('saved').set(true);
42
+ window.location.replace(kt_woomail.customizer_url);
43
+ });
44
+ });
45
+ wp.customize.state('saved').bind( 'change', function() {
46
+ if( wp.customize.state( 'saved' ).get() ) {
47
+ jQuery('input[name=kadence-woomail-send-email]').prop('disabled', false);
48
+ } else {
49
+ jQuery('input[name=kadence-woomail-send-email]').prop('disabled', true);
50
+ }
51
+ });
52
+
53
+ // Handle send email button click
54
+ jQuery('input[name=kadence-woomail-send-email]').click(function(e) {
55
+
56
+ // Prevent form submit
57
+ e.preventDefault();
58
+
59
+ // Get recipients
60
+ var recipients = jQuery('input#_customize-input-kt_woomail_email_recipient').val();
61
+ // Display confirmation prompt
62
+ var confirmation = confirm(kt_woomail.labels.send_confirmation);
63
+
64
+ // Check user input
65
+ if ( ! confirmation ) {
66
+ return;
67
+ }
68
+
69
+ // Disable send button
70
+ jQuery(this).prop('disabled', true);
71
+
72
+ // Populate request data object
73
+ var data = {
74
+ wp_customize: 'on',
75
+ action: 'kt_woomail_send_email',
76
+ recipients: recipients,
77
+ };
78
+ // Send request to server
79
+ jQuery.post(kt_woomail.ajax_url, data, function( result ) {
80
+ if ( result != 0 ) {
81
+ alert( kt_woomail.labels.sent );
82
+ } else {
83
+ alert( kt_woomail.labels.failed );
84
+ }
85
+ jQuery(this).prop('disabled', false);
86
+ });
87
+ });
88
+
89
+ jQuery( '.image-radio-select label' ).on( 'click', function(e) {
90
+ var new_val = jQuery(this).attr('data-image-value');
91
+ jQuery('#kt-woomail-prebuilt-template').val(new_val);
92
+ jQuery('.image-radio-select label.ktactive').each( function () {
93
+ jQuery(this).removeClass("ktactive");
94
+ });
95
+ jQuery(this).addClass("ktactive");
96
+ });
97
+
98
+ // Handle mobile button click
99
+ function custom_size_mobile() {
100
+ // get email width.
101
+ var email_width = parseInt( jQuery('#customize-control-kt_woomail_content_width .range-slider__range').val() );
102
+ var ratio = email_width/304;
103
+ var framescale = 100/ratio;
104
+ var framescale = framescale/100;
105
+ jQuery('#customize-preview iframe').width(email_width+'px');
106
+ jQuery('#customize-preview iframe').css({
107
+ '-webkit-transform' : 'scale(' + framescale + ')',
108
+ '-moz-transform' : 'scale(' + framescale + ')',
109
+ '-ms-transform' : 'scale(' + framescale + ')',
110
+ '-o-transform' : 'scale(' + framescale + ')',
111
+ 'transform' : 'scale(' + framescale + ')'
112
+ });
113
+ }
114
+ jQuery('#customize-footer-actions .preview-mobile').click(function(e) {
115
+ custom_size_mobile();
116
+ });
117
+
118
+ jQuery('#customize-footer-actions .preview-desktop').click(function(e) {
119
+ jQuery('#customize-preview iframe').width('100%');
120
+ jQuery('#customize-preview iframe').css({
121
+ '-webkit-transform' : 'scale(1)',
122
+ '-moz-transform' : 'scale(1)',
123
+ '-ms-transform' : 'scale(1)',
124
+ '-o-transform' : 'scale(1)',
125
+ 'transform' : 'scale(1)'
126
+ });
127
+ });
128
+ jQuery('#customize-footer-actions .preview-tablet').click(function(e) {
129
+ jQuery('#customize-preview iframe').width('100%');
130
+ jQuery('#customize-preview iframe').css({
131
+ '-webkit-transform' : 'scale(1)',
132
+ '-moz-transform' : 'scale(1)',
133
+ '-ms-transform' : 'scale(1)',
134
+ '-o-transform' : 'scale(1)',
135
+ 'transform' : 'scale(1)'
136
+ });
137
+ });
138
+
139
+ });
140
+
141
+ ( function( $ ) {
142
+
143
+ var KWMDIE = {
144
+
145
+ init: function() {
146
+ $( 'input[name=kt-woomail-export-button]' ).on( 'click', KWMDIE._export );
147
+ $( 'input[name=kt-woomail-import-button]' ).on( 'click', KWMDIE._import );
148
+ },
149
+
150
+ _export: function() {
151
+ window.location.href = KWMDIEConfig.customizerURL + '&kt-woomail-export=' + KWMDIEConfig.exportNonce;
152
+ },
153
+
154
+ _import: function() {
155
+
156
+ // Display confirmation prompt
157
+ var confirmation = confirm(KWMDIEl10n.confrim_override);
158
+
159
+ // Check user input
160
+ if ( ! confirmation ) {
161
+ return;
162
+ }
163
+
164
+ var win = $( window ),
165
+ body = $( 'body' ),
166
+ form = $( '<form class="kadence-woomail-form" method="POST" enctype="multipart/form-data"></form>' ),
167
+ controls = $( '.kadence-woomail-import-controls' ),
168
+ file = $( 'input[name=kadence-woomail-import-file]' ),
169
+ message = $( '.kadence-woomail-uploading' );
170
+
171
+ if ( '' == file.val() ) {
172
+ alert( KWMDIEl10n.emptyImport );
173
+ } else {
174
+ win.off( 'beforeunload' );
175
+ body.append( form );
176
+ form.append( controls );
177
+ message.show();
178
+ form.submit();
179
+ }
180
+ }
181
+ };
182
+
183
+ $( KWMDIE.init );
184
+
185
+ })( jQuery );
186
+
187
+ ( function( $ ) {
188
+
189
+ var KWMDTL = {
190
+
191
+ init: function() {
192
+ $( 'input[name=kadence-woomail-template-button]' ).on( 'click', KWMDTL._import_template );
193
+ },
194
+ _import_template: function() {
195
+
196
+ // Display confirmation prompt
197
+ var confirmation = confirm(KWMDIEl10n.confrim_override);
198
+
199
+ // Check user input
200
+ if ( ! confirmation ) {
201
+ return;
202
+ }
203
+ var win = $( window ),
204
+ body = $( 'body' ),
205
+ form = $( '<form class="kadence-woomail-template-form" method="POST" enctype="multipart/form-data"></form>' ),
206
+ controls = $( '.kt-template-woomail-load-controls' ),
207
+ message = $( '.kadence-woomail-loading' );
208
+
209
+ win.off( 'beforeunload' );
210
+ body.append( form );
211
+ form.append( controls );
212
+ message.show();
213
+ form.submit();
214
+ }
215
+ };
216
+
217
+ $( KWMDTL.init );
218
+
219
+ })( jQuery );
assets/js/customizer-toggle-switch-control.js ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Script run inside a Customizer control sidebar
3
+ *
4
+ * Enable / disable the control title by toggeling its .disabled-control-title style class on or off.
5
+ */
6
+ ( function( $ ) {
7
+ wp.customize.bind( 'ready', function() { // Ready?
8
+
9
+ var customize = this; // Customize object alias.
10
+ // Array with the control names
11
+ // TODO: Replace #CONTROLNAME01#, #CONTROLNAME02# etc with the real control names.
12
+ var toggleControls = [
13
+ '#CONTROLNAME01#',
14
+ '#CONTROLNAME02#'
15
+ ];
16
+ $.each( toggleControls, function( index, control_name ) {
17
+ customize( control_name, function( value ) {
18
+ var controlTitle = customize.control( control_name ).container.find( '.customize-control-title' ); // Get control title.
19
+ // 1. On loading.
20
+ controlTitle.toggleClass('disabled-control-title', !value.get() );
21
+ // 2. Binding to value change.
22
+ value.bind( function( to ) {
23
+ controlTitle.toggleClass( 'disabled-control-title', !value.get() );
24
+ } );
25
+ } );
26
+ } );
27
+ } );
28
+ } )( jQuery );
includes/class-customizer-kwdimportexport-control.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly
3
+ if ( ! defined('ABSPATH') ) {
4
+ exit;
5
+ }
6
+ /**
7
+ * This is a customized version of https://wordpress.org/plugins/customizer-export-import/
8
+ */
9
+ if ( class_exists( 'WP_Customize_Control' ) && ! class_exists( 'WP_Customize_Kwdimportexport_Control' ) ) {
10
+ class WP_Customize_Kwdimportexport_Control extends WP_Customize_Control {
11
+ public $type = 'kwdimportexport';
12
+
13
+ public function render_content() {
14
+ ?>
15
+ <span class="customize-control-title">
16
+ <?php _e( 'Export', 'kadence-woocommerce-email-designer' ); ?>
17
+ </span>
18
+ <span class="description customize-control-description">
19
+ <?php _e( 'Click the button below to export the customization settings for this plugin.', 'kadence-woocommerce-email-designer' ); ?>
20
+ </span>
21
+ <input type="button" class="button button-primary kadence-woomail-export kadence-woomail-button" name="kt-woomail-export-button" value="<?php esc_attr_e( 'Export', 'kadence-woocommerce-email-designer' ); ?>" />
22
+
23
+ <hr class="kt-woomail-hr" />
24
+
25
+ <span class="customize-control-title">
26
+ <?php _e( 'Import', 'kadence-woocommerce-email-designer' ); ?>
27
+ </span>
28
+ <span class="description customize-control-description">
29
+ <?php _e( 'Upload a file to import customization settings for this plugin.', 'kadence-woocommerce-email-designer' ); ?>
30
+ </span>
31
+ <div class="kadence-woomail-import-controls">
32
+ <input type="file" name="kadence-woomail-import-file" class="kadence-woomail-import-file" />
33
+ <?php wp_nonce_field( 'kt-woomail-importing', 'kt-woomail-import' ); ?>
34
+ </div>
35
+ <div class="kadence-woomail-uploading"><?php _e( 'Uploading...', 'kadence-woocommerce-email-designer' ); ?></div>
36
+ <input type="button" class="button button-primary kadence-woomail-import kadence-woomail-button" name="kt-woomail-import-button" value="<?php esc_attr_e( 'Import', 'kadence-woocommerce-email-designer' ); ?>" />
37
+ <?php
38
+ }
39
+ }
40
+ }
includes/class-customizer-kwdinfoblock-control.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly
3
+ if ( ! defined('ABSPATH') ) {
4
+ exit;
5
+ }
6
+
7
+ if ( class_exists( 'WP_Customize_Control' ) && ! class_exists( 'WP_Customize_Kwdinfoblock_Control' ) ) {
8
+ class WP_Customize_Kwdinfoblock_Control extends WP_Customize_Control {
9
+ public $type = 'kwdinfoblock';
10
+
11
+ public function render_content() {
12
+ ?>
13
+ <label>
14
+ <h3 class="customize-control-title test"><?php echo esc_html( $this->label ); ?></h3>
15
+ <?php if ( ! empty( $this->description ) ) : ?>
16
+ <span class="description customize-control-description"><?php echo $this->description; ?></span>
17
+ <?php endif; ?>
18
+ </label>
19
+ <?php
20
+ }
21
+ }
22
+ }
includes/class-customizer-kwdsendemail-control.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly
3
+ if ( ! defined('ABSPATH') ) {
4
+ exit;
5
+ }
6
+
7
+ if ( class_exists( 'WP_Customize_Control' ) && ! class_exists( 'WP_Customize_Kwdsendemail_Control' ) ) {
8
+ class WP_Customize_Kwdsendemail_Control extends WP_Customize_Control {
9
+ public $type = 'kwdsendemail';
10
+
11
+
12
+ public function render_content() {
13
+ ?>
14
+ <span class="customize-control-title">
15
+ <?php echo esc_html( $this->label ); ?>
16
+ </span>
17
+ <?php if ( ! empty( $this->description ) ) : ?>
18
+ <span class="description customize-control-description"><?php echo $this->description; ?></span>
19
+ <?php endif; ?>
20
+ <input type="text" value="<?php echo esc_attr( $this->value() ); ?>" id="_customize-input-<?php echo $this->id; ?>" <?php $this->input_attrs(); $this->link(); ?>>
21
+ <div style="padding: 10px;"><?php _e( 'Settings must be saved to send preview email.', 'kadence-woocommerce-email-designer' ); ?></div>
22
+ <input type="button" class="button button-primary kadence-woomail-button" name="kadence-woomail-send-email" value="<?php esc_attr_e( 'Send Email', 'kadence-woocommerce-email-designer' ); ?>" />
23
+ <div style="padding: 10px;"><?php _e( 'Some emails will not work correctly with the mockup order. It is best to use a real order for sending preview emails.', 'kadence-woocommerce-email-designer' ); ?></div>
24
+ <?php
25
+ }
26
+ }
27
+ }
includes/class-customizer-kwdtemplateload-control.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly
3
+ if ( ! defined('ABSPATH') ) {
4
+ exit;
5
+ }
6
+
7
+ if ( class_exists( 'WP_Customize_Control' ) && ! class_exists( 'WP_Customize_Kwdtemplateload_Control' ) ) {
8
+ class WP_Customize_Kwdtemplateload_Control extends WP_Customize_Control {
9
+ public $type = 'kwdtemplateload';
10
+
11
+
12
+ public function render_content() {
13
+
14
+ $name = 'kt-woomail-prebuilt-template';
15
+ ?>
16
+ <span class="customize-control-title">
17
+ <?php _e( 'Load Template', 'kadence-woocommerce-email-designer' ); ?>
18
+ </span>
19
+ <div class="kt-template-woomail-load-controls">
20
+ <div id="input_<?php echo $this->id; ?>" class="image-radio-select">
21
+ <?php foreach ( $this->choices as $value => $label ) : ?>
22
+ <label class="<?php echo $this->id . $value; ?> image-radio-select-item" data-image-value="<?php echo esc_attr( $value ); ?>">
23
+ <img src="<?php echo esc_url( KT_WOOMAIL_URL . $label ); ?>" alt="<?php echo esc_attr( $value ); ?>" title="<?php echo esc_attr( $value ); ?>">
24
+ </label>
25
+ <?php endforeach; ?>
26
+ </div>
27
+ <input type="hidden" value="<?php echo esc_attr( $this->value() ); ?>" id="kt-woomail-prebuilt-template" name="kt-woomail-prebuilt-template">
28
+ <?php wp_nonce_field( 'kt-woomail-importing-template', 'kt-woomail-import-template' ); ?>
29
+ </div>
30
+ <div class="kadence-woomail-loading"><?php _e( 'Loading and Saving...', 'kadence-woocommerce-email-designer' ); ?></div>
31
+ <input type="button" class="button button-primary kadence-woomail-button" name="kadence-woomail-template-button" value="<?php esc_attr_e( 'Load Template', 'kadence-woocommerce-email-designer' ); ?>" />
32
+ <?php
33
+ }
34
+ }
35
+ }
includes/class-customizer-range-value-control.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly
3
+ if ( ! defined('ABSPATH') ) {
4
+ exit;
5
+ }
6
+ /**
7
+ * This is a customized version of https://github.com/soderlind/class-customizer-range-value-control
8
+ */
9
+ if ( class_exists( 'WP_Customize_Control' ) && ! class_exists( 'WP_Customize_Rangevalue_Control' ) ) {
10
+ class WP_Customize_Rangevalue_Control extends WP_Customize_Control {
11
+ public $type = 'rangevalue';
12
+
13
+ /**
14
+ * Enqueue scripts/styles.
15
+ *
16
+ * @since 3.4.0
17
+ */
18
+ public function enqueue() {
19
+ wp_enqueue_script( 'customizer-range-value-control', KT_WOOMAIL_URL . 'assets/js/customizer-range-value-control.js', array( 'jquery' ), KT_WOOMAIL_VERSION, true );
20
+ wp_enqueue_style( 'customizer-range-value-control', KT_WOOMAIL_URL . 'assets/css/customizer-range-value-control.css', array(), KT_WOOMAIL_VERSION );
21
+ }
22
+
23
+ /**
24
+ * Render the control's content.
25
+ *
26
+ * @author soderlind
27
+ * @version 1.2.0
28
+ */
29
+ public function render_content() {
30
+ ?>
31
+ <label>
32
+ <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
33
+ <div class="range-slider" style="width:100%; display:flex;flex-direction: row;justify-content: flex-start;">
34
+ <span style="width:100%; flex: 1 0 0; vertical-align: middle;"><input class="range-slider__range" type="range" value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->input_attrs(); $this->link(); ?>>
35
+ <span class="range-slider__value">0</span></span>
36
+ </div>
37
+ <?php if ( ! empty( $this->description ) ) : ?>
38
+ <span class="description customize-control-description"><?php echo $this->description; ?></span>
39
+ <?php endif; ?>
40
+ </label>
41
+ <?php
42
+ }
43
+ }
44
+ }
includes/class-customizer-repeater-control.php ADDED
@@ -0,0 +1,384 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly
3
+ if ( ! defined('ABSPATH') ) {
4
+ exit;
5
+ }
6
+ /**
7
+ * This is a customized version of https://github.com/cristian-ungureanu/customizer-repeater
8
+ */
9
+ if ( class_exists( 'WP_Customize_Control' ) && ! class_exists( 'WP_Customize_Repeater_Control' ) ) {
10
+ class WP_Customize_Repeater_Control extends WP_Customize_Control {
11
+
12
+ public $id;
13
+ private $boxtitle = array();
14
+ private $add_field_label = array();
15
+ private $customizer_icon_container = '';
16
+ private $allowed_html = array();
17
+ public $customizer_repeater_image_control = false;
18
+ public $customizer_repeater_icon_control = false;
19
+ public $customizer_repeater_icon_color = false;
20
+ public $customizer_repeater_title_control = false;
21
+ public $customizer_repeater_link_control = false;
22
+
23
+
24
+
25
+ /*Class constructor*/
26
+ public function __construct( $manager, $id, $args = array() ) {
27
+ parent::__construct( $manager, $id, $args );
28
+ /*Get options from customizer.php*/
29
+ $this->add_field_label = esc_html__( 'Add new field', 'kadence-woocommerce-email-designer' );
30
+ if ( ! empty( $args['add_field_label'] ) ) {
31
+ $this->add_field_label = $args['add_field_label'];
32
+ }
33
+
34
+ $this->boxtitle = esc_html__( 'Customizer Repeater', 'kadence-woocommerce-email-designer' );
35
+ if ( ! empty ( $args['item_name'] ) ) {
36
+ $this->boxtitle = $args['item_name'];
37
+ } elseif ( ! empty( $this->label ) ) {
38
+ $this->boxtitle = $this->label;
39
+ }
40
+
41
+ if ( ! empty( $args['customizer_repeater_image_control'] ) ) {
42
+ $this->customizer_repeater_image_control = $args['customizer_repeater_image_control'];
43
+ }
44
+
45
+ if ( ! empty( $args['customizer_repeater_icon_control'] ) ) {
46
+ $this->customizer_repeater_icon_control = $args['customizer_repeater_icon_control'];
47
+ }
48
+ if ( ! empty( $args['customizer_repeater_icon_color'] ) ) {
49
+ $this->customizer_repeater_icon_color = $args['customizer_repeater_icon_color'];
50
+ }
51
+
52
+ if ( ! empty( $args['customizer_repeater_title_control'] ) ) {
53
+ $this->customizer_repeater_title_control = $args['customizer_repeater_title_control'];
54
+ }
55
+
56
+ if ( ! empty( $args['customizer_repeater_link_control'] ) ) {
57
+ $this->customizer_repeater_link_control = $args['customizer_repeater_link_control'];
58
+ }
59
+
60
+ if ( ! empty( $id ) ) {
61
+ $this->id = $id;
62
+ }
63
+
64
+
65
+ $allowed_array1 = wp_kses_allowed_html( 'post' );
66
+ $allowed_array2 = array(
67
+ 'input' => array(
68
+ 'type' => array(),
69
+ 'class' => array(),
70
+ 'placeholder' => array()
71
+ )
72
+ );
73
+
74
+ $this->allowed_html = array_merge( $allowed_array1, $allowed_array2 );
75
+ }
76
+
77
+ /*Enqueue resources for the control*/
78
+ public function enqueue() {
79
+
80
+ wp_enqueue_style( 'customizer-icon-select', KT_WOOMAIL_URL . 'assets/css/customizer-icon-select.css', array(), KT_WOOMAIL_VERSION );
81
+
82
+ wp_enqueue_style( 'customizer-repeater-control', KT_WOOMAIL_URL . 'assets/css/customizer-repeater-control.css', array(), KT_WOOMAIL_VERSION );
83
+
84
+ wp_enqueue_style( 'wp-color-picker' );
85
+
86
+ wp_enqueue_script( 'customizer-repeater-control', KT_WOOMAIL_URL . 'assets/js/customizer-repeater-control.js', array('jquery', 'jquery-ui-draggable', 'wp-color-picker' ), KT_WOOMAIL_VERSION, true );
87
+
88
+ }
89
+ public function customizer_repeater_sanitize( $input ) {
90
+ $input_decoded = json_decode($input,true);
91
+
92
+ if(!empty($input_decoded)) {
93
+ foreach ($input_decoded as $boxk => $box ){
94
+ foreach ($box as $key => $value){
95
+
96
+ $input_decoded[$boxk][$key] = wp_kses_post( force_balance_tags( $value ) );
97
+
98
+ }
99
+ }
100
+ return json_encode($input_decoded);
101
+ }
102
+ return $input;
103
+ }
104
+
105
+
106
+ public function render_content() {
107
+
108
+ /*Get default options*/
109
+ $this_default = json_decode( $this->setting->default );
110
+
111
+ /*Get values (json format)*/
112
+ $values = $this->value();
113
+
114
+ /*Decode values*/
115
+ $json = json_decode( $values );
116
+
117
+ if ( ! is_array( $json ) ) {
118
+ $json = array( $values );
119
+ } ?>
120
+
121
+ <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
122
+ <div class="customizer-repeater-general-control-repeater customizer-repeater-general-control-droppable">
123
+ <?php
124
+ if ( ( count( $json ) == 1 && '' === $json[0] ) || empty( $json ) ) {
125
+ if ( ! empty( $this_default ) ) {
126
+ $this->iterate_array( $this_default ); ?>
127
+ <input type="hidden"
128
+ id="customizer-repeater-<?php echo esc_attr( $this->id ); ?>-colector" <?php esc_attr( $this->link() ); ?>
129
+ class="customizer-repeater-colector"
130
+ value="<?php echo esc_textarea( json_encode( $this_default ) ); ?>"/>
131
+ <?php
132
+ } else {
133
+ $this->iterate_array(); ?>
134
+ <input type="hidden"
135
+ id="customizer-repeater-<?php echo esc_attr( $this->id ); ?>-colector" <?php esc_attr( $this->link() ); ?>
136
+ class="customizer-repeater-colector"/>
137
+ <?php
138
+ }
139
+ } else {
140
+ $this->iterate_array( $json ); ?>
141
+ <input type="hidden" id="customizer-repeater-<?php echo esc_attr( $this->id ); ?>-colector" <?php esc_attr( $this->link() ); ?>
142
+ class="customizer-repeater-colector" value="<?php echo esc_textarea( $this->value() ); ?>"/>
143
+ <?php
144
+ } ?>
145
+ </div>
146
+ <button type="button" class="button add_field customizer-repeater-new-field">
147
+ <?php echo esc_html( $this->add_field_label ); ?>
148
+ </button>
149
+ <?php
150
+ }
151
+
152
+ private function iterate_array($array = array()){
153
+ /*Counter that helps checking if the box is first and should have the delete button disabled*/
154
+ $it = 0;
155
+ if(!empty($array)){
156
+ foreach($array as $icon){ ?>
157
+ <div class="customizer-repeater-general-control-repeater-container customizer-repeater-draggable">
158
+ <div class="customizer-repeater-customize-control-title">
159
+ <?php echo esc_html( $this->boxtitle ) ?>
160
+ </div>
161
+ <div class="customizer-repeater-box-content-hidden">
162
+ <?php
163
+ $choice = $image_url = $icon_value = $title = $subtitle = $text = $text2 = $link2 = $link = $shortcode = $repeater = $color = $color2 = '';
164
+ if(!empty($icon->id)){
165
+ $id = $icon->id;
166
+ }
167
+ if(!empty($icon->choice)){
168
+ $choice = $icon->choice;
169
+ }
170
+ if(!empty($icon->image_url)){
171
+ $image_url = $icon->image_url;
172
+ }
173
+ if(!empty($icon->icon_value)){
174
+ $icon_value = $icon->icon_value;
175
+ }
176
+ if(!empty($icon->icon_color)){
177
+ $icon_color = $icon->icon_color;
178
+ }
179
+ if(!empty($icon->title)){
180
+ $title = $icon->title;
181
+ }
182
+ if(!empty($icon->link)){
183
+ $link = $icon->link;
184
+ }
185
+
186
+
187
+ if($this->customizer_repeater_image_control == true && $this->customizer_repeater_icon_control == true) {
188
+ $this->icon_type_choice( $choice );
189
+ }
190
+ if($this->customizer_repeater_image_control == true){
191
+ $this->image_control($image_url, $choice);
192
+ }
193
+ if($this->customizer_repeater_icon_control == true){
194
+ $this->icon_picker_control($icon_value, $choice);
195
+ }
196
+ if( $this->customizer_repeater_icon_color == true ){
197
+ $this->icon_color_choice($icon_color, $choice);
198
+ }
199
+ if($this->customizer_repeater_title_control==true){
200
+ $this->input_control(array(
201
+ 'label' => apply_filters('repeater_input_labels_filter', esc_html__( 'Title','kadence-woocommerce-email-designer' ), $this->id, 'customizer_repeater_title_control' ),
202
+ 'class' => 'customizer-repeater-title-control',
203
+ 'type' => apply_filters('customizer_repeater_input_types_filter', '', $this->id, 'customizer_repeater_title_control' ),
204
+ ), $title);
205
+ }
206
+ if($this->customizer_repeater_link_control){
207
+ $this->input_control(array(
208
+ 'label' => apply_filters('repeater_input_labels_filter', esc_html__( 'Link','kadence-woocommerce-email-designer' ), $this->id, 'customizer_repeater_link_control' ),
209
+ 'class' => 'customizer-repeater-link-control',
210
+ 'sanitize_callback' => 'esc_url_raw',
211
+ 'type' => apply_filters('customizer_repeater_input_types_filter', '', $this->id, 'customizer_repeater_link_control' ),
212
+ ), $link);
213
+ }
214
+ ?>
215
+
216
+ <input type="hidden" class="social-repeater-box-id" value="<?php if ( ! empty( $id ) ) {
217
+ echo esc_attr( $id );
218
+ } ?>">
219
+ <button type="button" class="social-repeater-general-control-remove-field" <?php if ( $it == 0 ) {
220
+ echo 'style="display:none;"';
221
+ } ?>>
222
+ <?php esc_html_e( 'Delete field', 'kadence-woocommerce-email-designer' ); ?>
223
+ </button>
224
+
225
+ </div>
226
+ </div>
227
+
228
+ <?php
229
+ $it++;
230
+ }
231
+ } else { ?>
232
+ <div class="customizer-repeater-general-control-repeater-container">
233
+ <div class="customizer-repeater-customize-control-title">
234
+ <?php echo esc_html( $this->boxtitle ) ?>
235
+ </div>
236
+ <div class="customizer-repeater-box-content-hidden">
237
+ <?php
238
+ if ( $this->customizer_repeater_image_control == true && $this->customizer_repeater_icon_control == true ) {
239
+ $this->icon_type_choice();
240
+ }
241
+ if ( $this->customizer_repeater_image_control == true ) {
242
+ $this->image_control();
243
+ }
244
+ if ( $this->customizer_repeater_icon_control == true ) {
245
+ $this->icon_picker_control();
246
+ }
247
+ if ( $this->customizer_repeater_icon_color == true ) {
248
+ $this->icon_color_choice();
249
+ }
250
+
251
+ if ( $this->customizer_repeater_title_control == true ) {
252
+ $this->input_control( array(
253
+ 'label' => apply_filters('repeater_input_labels_filter', esc_html__( 'Title','kadence-woocommerce-email-designer' ), $this->id, 'customizer_repeater_title_control' ),
254
+ 'class' => 'customizer-repeater-title-control',
255
+ 'type' => apply_filters('customizer_repeater_input_types_filter', '', $this->id, 'customizer_repeater_title_control' ),
256
+ ) );
257
+ }
258
+
259
+ if ( $this->customizer_repeater_link_control == true ) {
260
+ $this->input_control( array(
261
+ 'label' => apply_filters('repeater_input_labels_filter', esc_html__( 'Link','kadence-woocommerce-email-designer' ), $this->id, 'customizer_repeater_link_control' ),
262
+ 'class' => 'customizer-repeater-link-control',
263
+ 'type' => apply_filters('customizer_repeater_input_types_filter', '', $this->id, 'customizer_repeater_link_control' ),
264
+ ) );
265
+ }
266
+ ?>
267
+ <input type="hidden" class="social-repeater-box-id">
268
+ <button type="button" class="social-repeater-general-control-remove-field button" style="display:none;">
269
+ <?php esc_html_e( 'Delete field', 'kadence-woocommerce-email-designer' ); ?>
270
+ </button>
271
+ </div>
272
+ </div>
273
+ <?php
274
+ }
275
+ }
276
+
277
+ private function input_control( $options, $value='' ){ ?>
278
+
279
+ <?php
280
+ if( !empty($options['type']) ){
281
+ switch ($options['type']) {
282
+ case 'textarea':?>
283
+ <span class="customize-control-title"><?php echo esc_html( $options['label'] ); ?></span>
284
+ <textarea class="<?php echo esc_attr( $options['class'] ); ?>" placeholder="<?php echo esc_attr( $options['label'] ); ?>"><?php echo ( !empty($options['sanitize_callback']) ? call_user_func_array( $options['sanitize_callback'], array( $value ) ) : esc_attr($value) ); ?></textarea>
285
+ <?php
286
+ break;
287
+ case 'color':
288
+ $style_to_add = '';
289
+ if( $options['choice'] !== 'customizer_repeater_icon' ){
290
+ $style_to_add = 'display:none';
291
+ }?>
292
+ <span class="customize-control-title" <?php if( !empty( $style_to_add ) ) { echo 'style="'.esc_attr( $style_to_add ).'"';} ?>><?php echo esc_html( $options['label'] ); ?></span>
293
+ <div class="<?php echo esc_attr($options['class']); ?>" <?php if( !empty( $style_to_add ) ) { echo 'style="'.esc_attr( $style_to_add ).'"';} ?>>
294
+ <input type="text" value="<?php echo ( !empty($options['sanitize_callback']) ? call_user_func_array( $options['sanitize_callback'], array( $value ) ) : esc_attr($value) ); ?>" class="<?php echo esc_attr($options['class']); ?>" />
295
+ </div>
296
+ <?php
297
+ break;
298
+ }
299
+ } else { ?>
300
+ <span class="customize-control-title"><?php echo esc_html( $options['label'] ); ?></span>
301
+ <input type="text" value="<?php echo ( !empty($options['sanitize_callback']) ? call_user_func_array( $options['sanitize_callback'], array( $value ) ) : esc_attr($value) ); ?>" class="<?php echo esc_attr($options['class']); ?>" placeholder="<?php echo esc_attr( $options['label'] ); ?>"/>
302
+ <?php
303
+ }
304
+ }
305
+
306
+ private function icon_picker_control($value = '', $show = ''){
307
+ ?>
308
+ <div class="social-repeater-general-control-icon" <?php if( $show === 'customizer_repeater_image' || $show === 'customizer_repeater_none' ) { echo 'style="display:none;"'; } ?>>
309
+ <span class="customize-control-title">
310
+ <?php esc_html_e('Choose a Bundled Icon','kadence-woocommerce-email-designer'); ?>
311
+ </span>
312
+ <div class="icon-input-group">
313
+ <select class="kadence-icon-select">
314
+ <?php
315
+ $icons = $this->icon_list();
316
+ foreach( $icons as $icon ){
317
+ if( $value == $icon ) {
318
+ echo '<option selected value="'.$icon.'">'.$icon.'</option>';
319
+ } else {
320
+ echo '<option value="'.$icon.'">'.$icon.'</option>';
321
+ }
322
+ } ?>
323
+ </select>
324
+ </div>
325
+ </div>
326
+ <?php
327
+ }
328
+
329
+ private function image_control($value = '', $show = ''){ ?>
330
+ <div class="customizer-repeater-image-control" <?php if( $show === 'customizer_repeater_icon' || $show === 'customizer_repeater_none' || empty( $show ) ) { echo 'style="display:none;"'; } ?>>
331
+ <span class="customize-control-title">
332
+ <?php esc_html_e('Custom Upload Icon','kadence-woocommerce-email-designer')?>
333
+ </span>
334
+ <input type="text" class="widefat custom-media-url" value="<?php echo esc_attr( $value ); ?>">
335
+ <input type="button" class="button button-secondary customizer-repeater-custom-media-button" value="<?php esc_attr_e( 'Upload Image','kadence-woocommerce-email-designer' ); ?>" />
336
+ </div>
337
+ <?php
338
+ }
339
+
340
+ private function icon_type_choice($value='customizer_repeater_icon'){ ?>
341
+ <span class="customize-control-title">
342
+ <?php esc_html_e('Social Image Source','kadence-woocommerce-email-designer');?>
343
+ </span>
344
+ <select class="customizer-repeater-image-choice">
345
+ <option value="customizer_repeater_icon" <?php selected($value,'customizer_repeater_icon');?>><?php esc_html_e('Bundled Icon','kadence-woocommerce-email-designer'); ?></option>
346
+ <option value="customizer_repeater_image" <?php selected($value,'customizer_repeater_image');?>><?php esc_html_e('Custom Upload Icon','kadence-woocommerce-email-designer'); ?></option>
347
+ <option value="customizer_repeater_none" <?php selected($value,'customizer_repeater_none');?>><?php esc_html_e('None','kadence-woocommerce-email-designer'); ?></option>
348
+ </select>
349
+ <?php
350
+ }
351
+ private function icon_color_choice($value='black', $show = '' ){ ?>
352
+ <div class="customizer-repeater-icon-color-control" <?php if( $show === 'customizer_repeater_image' || $show === 'customizer_repeater_none' ) { echo 'style="display:none;"'; } ?>>
353
+ <span class="customize-control-title">
354
+ <?php esc_html_e('Bundled Icon Color','kadence-woocommerce-email-designer');?>
355
+ </span>
356
+ <select class="customizer-repeater-icon-color">
357
+ <option value="black" <?php selected($value,'black');?>><?php esc_html_e('Black','kadence-woocommerce-email-designer'); ?></option>
358
+ <option value="white" <?php selected($value,'white');?>><?php esc_html_e('White','kadence-woocommerce-email-designer'); ?></option>
359
+ <option value="gray" <?php selected($value,'gray');?>><?php esc_html_e('Gray','kadence-woocommerce-email-designer'); ?></option>
360
+ </select>
361
+ </div>
362
+ <?php
363
+ }
364
+
365
+ private function icon_list(){
366
+ return array(
367
+ 'kt-woomail-twitter',
368
+ 'kt-woomail-facebook',
369
+ 'kt-woomail-linkedin',
370
+ 'kt-woomail-link',
371
+ 'kt-woomail-google-plus',
372
+ 'kt-woomail-rss',
373
+ 'kt-woomail-youtube',
374
+ 'kt-woomail-instagram',
375
+ 'kt-woomail-tumblr',
376
+ 'kt-woomail-dribbble',
377
+ 'kt-woomail-vimeo',
378
+ 'kt-woomail-digg',
379
+ 'kt-woomail-stumbleupon',
380
+ 'kt-woomail-vk',
381
+ );
382
+ }
383
+ }
384
+ }
includes/class-customizer-toggle-control.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly
3
+ if ( ! defined('ABSPATH') ) {
4
+ exit;
5
+ }
6
+ /**
7
+ * This is a customized version of https://github.com/soderlind/class-customizer-toggle-control
8
+ */
9
+ if ( class_exists( 'WP_Customize_Control' ) && ! class_exists( 'WP_Customize_Toggleswitch_Control' ) ) {
10
+ class WP_Customize_Toggleswitch_Control extends WP_Customize_Control {
11
+ public $type = 'toggleswitch';
12
+
13
+ /**
14
+ * Enqueue scripts/styles.
15
+ *
16
+ * @since 3.4.0
17
+ */
18
+ public function enqueue() {
19
+ wp_enqueue_script( 'customizer-toggle-switch-control-js', KT_WOOMAIL_URL . 'assets/js/customizer-toggle-switch-control.js', array( 'jquery' ), KT_WOOMAIL_VERSION, true );
20
+ wp_enqueue_style( 'customizer-toggle-switch-control-css', KT_WOOMAIL_URL . 'assets/css/customizer-toggle-switch-control.css', array(), KT_WOOMAIL_VERSION );
21
+
22
+ $css = '
23
+ .disabled-control-title {
24
+ color: #a0a5aa;
25
+ }
26
+ input[type=checkbox].tgl-light:checked + .tgl-btn {
27
+ background: #0085ba;
28
+ }
29
+ input[type=checkbox].tgl-light + .tgl-btn {
30
+ background: #a0a5aa;
31
+ }
32
+ input[type=checkbox].tgl-light + .tgl-btn:after {
33
+ background: #f7f7f7;
34
+ }
35
+
36
+ input[type=checkbox].tgl-ios:checked + .tgl-btn {
37
+ background: #0085ba;
38
+ }
39
+
40
+ input[type=checkbox].tgl-flat:checked + .tgl-btn {
41
+ border: 4px solid #0085ba;
42
+ }
43
+ input[type=checkbox].tgl-flat:checked + .tgl-btn:after {
44
+ background: #0085ba;
45
+ }
46
+
47
+ ';
48
+ wp_add_inline_style( 'customizer-toggle-switch-control-css' , $css );
49
+ }
50
+
51
+ /**
52
+ * Render the control's content.
53
+ *
54
+ * @author soderlind
55
+ * @version 1.2.0
56
+ */
57
+ public function render_content() {
58
+ ?>
59
+ <label>
60
+ <div style="display:flex;flex-direction: row;justify-content: flex-start; align-items: center;">
61
+ <span class="customize-control-title" style="flex: 2 0 0; vertical-align: middle; margin:20px 0;"><?php echo esc_html( $this->label ); ?></span>
62
+ <input id="cb<?php echo $this->instance_number ?>" type="checkbox" class="tgl tgl-light" value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->link(); checked( $this->value() ); ?> />
63
+ <label for="cb<?php echo $this->instance_number ?>" class="tgl-btn"></label>
64
+ </div>
65
+ <?php if ( ! empty( $this->description ) ) : ?>
66
+ <span class="description customize-control-description"><?php echo $this->description; ?></span>
67
+ <?php endif; ?>
68
+ </label>
69
+ <?php
70
+ }
71
+ }
72
+ }
includes/class-kadence-woomail-customizer.php ADDED
@@ -0,0 +1,959 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly
3
+ if ( ! defined('ABSPATH') ) {
4
+ exit;
5
+ }
6
+
7
+ /**
8
+ * Customizer Setup
9
+ * Heavily borrowed from rightpress Decorator
10
+ */
11
+ if ( ! class_exists( 'Kadence_Woomail_Customizer' ) ) {
12
+
13
+ class Kadence_Woomail_Customizer {
14
+ // Properties
15
+ private static $panels_added = array();
16
+ private static $sections_added = array();
17
+ private static $css_suffixes = null;
18
+ public static $customizer_url = null;
19
+
20
+ /**
21
+ * @var null
22
+ */
23
+ private static $instance = null;
24
+
25
+ /**
26
+ * Instance Control
27
+ */
28
+ public static function get_instance() {
29
+ if ( is_null( self::$instance ) ) {
30
+ self::$instance = new self();
31
+ }
32
+ return self::$instance;
33
+ }
34
+
35
+ /**
36
+ * Class constructor
37
+ *
38
+ * @access public
39
+ * @return void
40
+ */
41
+ public function __construct() {
42
+ // Add settings
43
+ add_action('customize_register', array( $this, 'add_settings' ) );
44
+
45
+ // Maybe add custom styles to default WooCommerce styles
46
+ add_filter( 'woocommerce_email_styles', array( $this, 'maybe_add_custom_styles' ), 9999 );
47
+
48
+ // Ajax handler
49
+ add_action( 'wp_ajax_kt_woomail_reset', array( $this, 'ajax_reset' ) );
50
+
51
+ // Ajax handler
52
+ add_action( 'wp_ajax_kt_woomail_send_email', array( $this, 'ajax_send_email' ) );
53
+
54
+ // Only proceed if this is own request
55
+ if ( ! Kadence_Woomail_Designer::is_own_customizer_request() && ! Kadence_Woomail_Designer::is_own_preview_request() ) {
56
+ return;
57
+ }
58
+
59
+ // Add controls, sections and panels
60
+ add_action('customize_register', array( $this, 'add_controls'));
61
+
62
+ // Add user capability
63
+ add_filter('user_has_cap', array( $this, 'add_customize_capability'), 99);
64
+
65
+ // Remove unrelated components
66
+ add_filter('customize_loaded_components', array( $this, 'remove_unrelated_components'), 99, 2);
67
+
68
+ // Remove unrelated sections
69
+ add_filter('customize_section_active', array( $this, 'remove_unrelated_sections'), 99, 2);
70
+
71
+ // Remove unrelated controls
72
+ add_filter('customize_control_active', array( $this, 'remove_unrelated_controls'), 99, 2);
73
+
74
+ // Enqueue Customizer scripts
75
+ add_filter( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_customizer_scripts' ) );
76
+
77
+ // Changes the publish text to save.
78
+ add_filter( 'gettext', array( $this, 'change_publish_button' ), 10, 2 );
79
+
80
+ // This filters in edits that are not saved while the preview refreshes
81
+ add_action( 'init', array( $this, 'get_customizer_options_override_ready' ) );
82
+
83
+ }
84
+ public function get_customizer_options_override_ready() {
85
+ foreach ( Kadence_Woomail_Settings::$email_types_mapping as $key => $value ) {
86
+ add_filter('pre_option_woocommerce_' . $key .'_settings', array( $this, 'customizer_woo_options_override'), 99, 2 );
87
+ }
88
+ }
89
+ public function customizer_woo_options_override( $value = array(), $option ) {
90
+
91
+ $post_values = json_decode( stripslashes_deep( $_POST['customized'] ), true );
92
+ if ( isset( $_POST['customized'] ) && ! empty( $post_values ) ) {
93
+ if ( is_array( $post_values ) ) {
94
+ foreach ( $post_values as $key => $current_value ) {
95
+ if ( strpos( $key, $option ) !== false ) {
96
+ $subkey = str_replace( $option, '', $key );
97
+ $subkey = str_replace( '[', '', rtrim( $subkey, "]" ) );
98
+ $value[$subkey] = $current_value;
99
+ }
100
+ }
101
+ }
102
+ }
103
+ return $value;
104
+ }
105
+
106
+ public function change_publish_button( $translation, $text ) {
107
+
108
+ if ( $text == 'Publish' ) {
109
+ return __('Save', 'kadence-woocommerce-email-designer');
110
+ } else if ( $text == 'Published' ) {
111
+ return __('Saved', 'kadence-woocommerce-email-designer');
112
+ }
113
+
114
+ return $translation;
115
+ }
116
+
117
+ /**
118
+ * Add customizer capability
119
+ *
120
+ * @access public
121
+ * @param array $capabilities
122
+ * @return array
123
+ */
124
+ public function add_customize_capability( $capabilities ) {
125
+ // Remove filter (circular reference)
126
+ remove_filter('user_has_cap', array($this, 'add_customize_capability'), 99);
127
+
128
+ // Add customize capability for admin user if this is own customizer request
129
+ if ( Kadence_Woomail_Designer::is_admin() && Kadence_Woomail_Designer::is_own_customizer_request() ) {
130
+ $capabilities['customize'] = true;
131
+ }
132
+
133
+ // Add filter
134
+ add_filter('user_has_cap', array($this, 'add_customize_capability'), 99);
135
+
136
+ // Return capabilities
137
+ return $capabilities;
138
+ }
139
+
140
+ /**
141
+ * Get Customizer URL
142
+ *
143
+ */
144
+ public static function get_customizer_url() {
145
+ if ( is_null( Kadence_Woomail_Customizer::$customizer_url ) ) {
146
+ Kadence_Woomail_Customizer::$customizer_url = add_query_arg( array(
147
+ 'kt-woomail-customize' => '1',
148
+ 'url' => urlencode( add_query_arg( array( 'kt-woomail-preview' => '1' ), site_url('/') ) ),
149
+ 'return' => urlencode( Kadence_Woomail_Woo::get_email_settings_page_url() ),
150
+ ), admin_url( 'customize.php' ) );
151
+ }
152
+
153
+ return Kadence_Woomail_Customizer::$customizer_url;
154
+ }
155
+
156
+ /**
157
+ * Change site name for customizer
158
+ *
159
+ * @access public
160
+ * @param string $name
161
+ * @return string
162
+ */
163
+ public function change_site_name( $name ) {
164
+ return __('WooCommerce Emails', 'kadence-woocommerce-email-designer');
165
+ }
166
+
167
+ /**
168
+ * Remove unrelated components
169
+ *
170
+ * @access public
171
+ * @param array $components
172
+ * @param object $wp_customize
173
+ * @return array
174
+ */
175
+ public function remove_unrelated_components($components, $wp_customize) {
176
+ // Iterate over components
177
+ foreach ($components as $component_key => $component) {
178
+
179
+ // Check if current component is own component
180
+ if ( ! Kadence_Woomail_Customizer::is_own_component( $component ) ) {
181
+ unset($components[$component_key]);
182
+ }
183
+ }
184
+
185
+ // Return remaining components
186
+ return $components;
187
+ }
188
+
189
+ /**
190
+ * Remove unrelated sections
191
+ *
192
+ * @access public
193
+ * @param bool $active
194
+ * @param object $section
195
+ * @return bool
196
+ */
197
+ public function remove_unrelated_sections( $active, $section ) {
198
+ // Check if current section is own section
199
+ if ( ! Kadence_Woomail_Customizer::is_own_section( $section->id ) ) {
200
+ return false;
201
+ }
202
+
203
+ // We can override $active completely since this runs only on own Customizer requests
204
+ return true;
205
+ }
206
+
207
+ /**
208
+ * Remove unrelated controls
209
+ *
210
+ * @access public
211
+ * @param bool $active
212
+ * @param object $control
213
+ * @return bool
214
+ */
215
+ public function remove_unrelated_controls( $active, $control ) {
216
+ // Check if current control belongs to own section
217
+ if ( ! Kadence_Woomail_Customizer::is_own_section( $control->section ) ) {
218
+ return false;
219
+ }
220
+
221
+ // We can override $active completely since this runs only on own Customizer requests
222
+ return $active;
223
+ }
224
+
225
+ /**
226
+ * Check if current component is own component
227
+ *
228
+ * @access public
229
+ * @param string $component
230
+ * @return bool
231
+ */
232
+ public static function is_own_component( $component ) {
233
+ return false;
234
+ }
235
+
236
+ /**
237
+ * Check if current section is own section
238
+ *
239
+ * @access public
240
+ * @param string $key
241
+ * @return bool
242
+ */
243
+ public static function is_own_section( $key ) {
244
+ // Iterate over own sections
245
+ foreach ( Kadence_Woomail_Settings::get_sections() as $section_key => $section ) {
246
+ if ($key === 'kt_woomail_' . $section_key) {
247
+ return true;
248
+ }
249
+ }
250
+
251
+ // Section not found
252
+ return false;
253
+ }
254
+
255
+ /**
256
+ * Enqueue Customizer scripts
257
+ *
258
+ * @access public
259
+ * @return void
260
+ */
261
+ public function enqueue_customizer_scripts() {
262
+ // Enqueue Customizer script
263
+ wp_enqueue_style('kt-woomail-customizer-styles', KT_WOOMAIL_URL . '/assets/css/customizer-styles.css', KT_WOOMAIL_VERSION );
264
+ wp_enqueue_script('kt-woomail-customizer-scripts', KT_WOOMAIL_URL . '/assets/js/customizer-scripts.js', array('jquery', 'customize-controls'), KT_WOOMAIL_VERSION, true);
265
+
266
+ // Send variables to Javascript
267
+ wp_localize_script('kt-woomail-customizer-scripts', 'kt_woomail', array(
268
+ 'ajax_url' => admin_url('admin-ajax.php'),
269
+ 'customizer_url' => Kadence_Woomail_Customizer::get_customizer_url(),
270
+ 'labels' => array(
271
+ 'reset' => __('Reset', 'kadence-woocommerce-email-designer'),
272
+ 'customtitle' => __('Woocommerce Emails', 'kadence-woocommerce-email-designer'),
273
+ 'send_confirmation' => __('Are you sure you want to send an email?', 'kadence-woocommerce-email-designer'),
274
+ 'sent' => __('Email Sent!', 'kadence-woocommerce-email-designer'),
275
+ 'failed' => __('Email failed, make sure you have a working email server for your site.', 'kadence-woocommerce-email-designer'),
276
+ 'reset_confirmation' => __('Are you sure you want to reset all changes made to your WooCommerce emails?', 'kadence-woocommerce-email-designer'),
277
+ 'description' => __('<p>Use native WordPress Customizer to make Woocommerce emails match your brand.</p>', 'kadence-woocommerce-email-designer') . '<p>' . sprintf(__('<a href="%s">Kadence Woocommerce Email Designer</a> plugin by <a href="%s">Kadence Themes</a>.', 'kadence-woocommerce-email-designer'), 'https://www.kadencethemes.com', 'https://www.kadencethemes.com') . '</p>',
278
+ ),
279
+ ));
280
+ // Localize
281
+ wp_localize_script( 'kt-woomail-customizer-scripts', 'KWMDIEl10n', array(
282
+ 'emptyImport' => __( 'Please choose a file to import.', 'customizer-export-import' ),
283
+ 'confrim_override' => __( 'WARNING: This will override all of your current settings. Are you sure you want to do that? We suggest geting an export of your current settings incase you want to revert back.', 'customizer-export-import' )
284
+ ));
285
+
286
+ // Config
287
+ wp_localize_script( 'kt-woomail-customizer-scripts', 'KWMDIEConfig', array(
288
+ 'customizerURL' => admin_url( 'customize.php?kt-woomail-customize=1&url='.urlencode( add_query_arg( array( 'kt-woomail-preview' => '1' ), site_url('/') ) ) ),
289
+ 'exportNonce' => wp_create_nonce( 'kt-woomail-exporting' )
290
+ ));
291
+ }
292
+
293
+ /**
294
+ * Add settings
295
+ *
296
+ * @access public
297
+ * @param object $wp_customize
298
+ * @return void
299
+ */
300
+ public function add_settings( $wp_customize ) {
301
+ // Iterate over settings
302
+ foreach ( Kadence_Woomail_Settings::get_settings() as $setting_key => $setting ) {
303
+
304
+ // Add setting
305
+ $wp_customize->add_setting('kt_woomail[' . $setting_key . ']' , array(
306
+ 'type' => 'option',
307
+ 'transport' => isset( $setting['transport'] ) ? $setting['transport'] : 'postMessage',
308
+ 'capability' => Kadence_Woomail_Designer::get_admin_capability(),
309
+ 'default' => isset( $setting['default'] ) ? $setting['default'] : '',
310
+ 'sanitize_callback' => isset( $settings['sanitize_callback'] ) ? array(
311
+ 'WP_Customize_' . $setting['control_type'] . 'Control',
312
+ $settings['sanitize_callback']
313
+ ) : '',
314
+ ));
315
+ }
316
+ // Iterate over settings
317
+ foreach ( Kadence_Woomail_Settings::get_woo_settings() as $setting_key => $setting ) {
318
+ // Add setting
319
+ $wp_customize->add_setting( $setting_key, array(
320
+ 'type' => 'option',
321
+ 'transport' => isset( $setting['transport'] ) ? $setting['transport'] : 'postMessage',
322
+ 'capability' => Kadence_Woomail_Designer::get_admin_capability(),
323
+ 'default' => isset( $setting['default'] ) ? $setting['default'] : '',
324
+ ));
325
+ }
326
+ }
327
+
328
+ /**
329
+ * Add controls, sections and panels
330
+ *
331
+ * @access public
332
+ * @param object $wp_customize
333
+ * @return void
334
+ */
335
+ public function add_controls( $wp_customize ) {
336
+ // Iterate over settings
337
+ foreach ( Kadence_Woomail_Settings::get_settings() as $setting_key => $setting ) {
338
+
339
+ // Maybe add section
340
+ Kadence_Woomail_Customizer::maybe_add_section( $wp_customize, $setting );
341
+
342
+ // Maybe add panel
343
+ Kadence_Woomail_Customizer::maybe_add_panel( $wp_customize, $setting );
344
+
345
+ // Get control class name (none, color, upload, image)
346
+ $control_class = isset( $setting['control_type'] ) ? ucfirst( $setting['control_type'] ) . '_' : '';
347
+ $control_class = 'WP_Customize_' . $control_class . 'Control';
348
+ // Control configuration
349
+ $control_config = array(
350
+ 'label' => $setting['title'],
351
+ 'settings' => 'kt_woomail[' . $setting_key . ']',
352
+ 'capability' => Kadence_Woomail_Designer::get_admin_capability(),
353
+ 'priority' => isset($setting['priority']) ? $setting['priority'] : 10,
354
+ 'active_callback' => ( isset( $setting['active_callback'] ) ) ? array(
355
+ 'Kadence_Woomail_Customizer',
356
+ 'active_callback'
357
+ ) : '__return_true',
358
+ );
359
+
360
+ // Description
361
+ if ( ! empty($setting['description'] ) ) {
362
+ $control_config['description'] = $setting['description'];
363
+ }
364
+
365
+ // Add control to section
366
+ if ( ! empty( $setting['section'] ) ) {
367
+ $control_config['section'] = 'kt_woomail_' . $setting['section'];
368
+ }
369
+
370
+ // Add control to panel
371
+ if ( ! empty( $setting['panel'] ) ) {
372
+ $control_config['panel'] = 'kt_woomail_' . $setting['panel'];
373
+ }
374
+
375
+ // Add custom field type
376
+ if ( ! empty( $setting['type'] ) ) {
377
+ $control_config['type'] = $setting['type'];
378
+ }
379
+
380
+ // Add select field options
381
+ if ( ! empty( $setting['choices'] ) ) {
382
+ $control_config['choices'] = $setting['choices'];
383
+ }
384
+ // Input attributese
385
+ if ( ! empty( $setting['input_attrs'] ) ) {
386
+ $control_config['input_attrs'] = $setting['input_attrs'];
387
+ }
388
+ // Add repeater controls:
389
+ if ( ! empty( $setting['customizer_repeater_image_control'] ) ) {
390
+ $control_config['customizer_repeater_image_control'] = $setting['customizer_repeater_image_control'];
391
+ }
392
+ if ( ! empty( $setting['customizer_repeater_icon_control'] ) ) {
393
+ $control_config['customizer_repeater_icon_control'] = $setting['customizer_repeater_icon_control'];
394
+ }
395
+ if ( ! empty( $setting['customizer_repeater_icon_color'] ) ) {
396
+ $control_config['customizer_repeater_icon_color'] = $setting['customizer_repeater_icon_color'];
397
+ }
398
+ if ( ! empty( $setting['customizer_repeater_title_control'] ) ) {
399
+ $control_config['customizer_repeater_title_control'] = $setting['customizer_repeater_title_control'];
400
+ }
401
+ if ( ! empty( $setting['customizer_repeater_link_control'] ) ) {
402
+ $control_config['customizer_repeater_link_control'] = $setting['customizer_repeater_link_control'];
403
+ }
404
+ // Add control
405
+ $wp_customize->add_control(new $control_class($wp_customize, 'kt_woomail_' . $setting_key, $control_config));
406
+ }
407
+ // Iterate over settings
408
+ foreach (Kadence_Woomail_Settings::get_woo_settings() as $setting_key => $setting) {
409
+
410
+ // Maybe add section
411
+ Kadence_Woomail_Customizer::maybe_add_section( $wp_customize, $setting );
412
+
413
+ // Maybe add panel
414
+ Kadence_Woomail_Customizer::maybe_add_panel( $wp_customize, $setting );
415
+
416
+ // Get control class name (none, color, upload, image)
417
+ $control_class = isset($setting['control_type']) ? ucfirst($setting['control_type']) . '_' : '';
418
+ $control_class = 'WP_Customize_' . $control_class . 'Control';
419
+
420
+ // Control configuration
421
+ $control_config = array(
422
+ 'label' => $setting['title'],
423
+ 'settings' => $setting_key,
424
+ 'capability' => Kadence_Woomail_Designer::get_admin_capability(),
425
+ 'priority' => isset($setting['priority']) ? $setting['priority'] : 10,
426
+ 'active_callback' => ( isset( $setting['active_callback'] ) ) ? array(
427
+ 'Kadence_Woomail_Customizer',
428
+ 'active_woo_callback'
429
+ ) : '__return_true',
430
+ );
431
+
432
+ // Description
433
+ if ( ! empty( $setting['description'] ) ) {
434
+ $control_config['description'] = $setting['description'];
435
+ }
436
+
437
+ // Add control to section
438
+ if ( ! empty( $setting['section'] ) ) {
439
+ $control_config['section'] = 'kt_woomail_' . $setting['section'];
440
+ }
441
+
442
+ // Add control to panel
443
+ if ( ! empty( $setting['panel'] ) ) {
444
+ $control_config['panel'] = 'kt_woomail_' . $setting['panel'];
445
+ }
446
+ // Add custom field type
447
+ if ( ! empty( $setting['type'] ) ) {
448
+ $control_config['type'] = $setting['type'];
449
+ }
450
+ // Add custom field type
451
+ if ( ! empty($setting['label'] ) ) {
452
+ $control_config['label'] = $setting['label'];
453
+ }
454
+
455
+ // Add select field options
456
+ if ( ! empty( $setting['choices'] ) ) {
457
+ $control_config['choices'] = $setting['choices'];
458
+ }
459
+ // Input attributese
460
+ if ( ! empty($setting['input_attrs'] ) ) {
461
+ $control_config['input_attrs'] = $setting['input_attrs'];
462
+ }
463
+ // Add control
464
+ $wp_customize->add_control(new $control_class($wp_customize, $setting_key, $control_config));
465
+ }
466
+ }
467
+ public function active_callback( $object ) {
468
+ if ( ! isset( $object->setting->id ) ) {
469
+ return true;
470
+ }
471
+ $opt_name = explode( '[', $object->setting->id );
472
+ $opt_name = $opt_name[0];
473
+ $id = str_replace( $opt_name.'[', '', str_replace( ']', '', $object->setting->id ));
474
+
475
+ $settings = Kadence_Woomail_Settings::get_settings();
476
+
477
+ if (! isset( $settings[$id] ) ) {
478
+ return true;
479
+ }
480
+ $field_id = $settings[$id]['active_callback']['id'];
481
+ $compare = $settings[$id]['active_callback']['compare'];
482
+ $value = $settings[$id]['active_callback']['value'];
483
+ $field_value = Kadence_Woomail_Customizer::opt($field_id);
484
+ switch ( $compare ) {
485
+ case '==':
486
+ case '=':
487
+ case 'equals':
488
+ case 'equal':
489
+ $show = ( $field_value == $value ) ? true : false;
490
+ break;
491
+
492
+ case '!=':
493
+ case 'not equal':
494
+ $show = ( $field_value != $value ) ? true : false;
495
+ break;
496
+ }
497
+ return $show;
498
+ }
499
+ public function active_woo_callback( $object ) {
500
+ if ( ! isset( $object->setting->id ) ) {
501
+ return true;
502
+ }
503
+ $id = $object->setting->id;
504
+
505
+ $settings = Kadence_Woomail_Settings::get_woo_settings();
506
+
507
+ if (! isset( $settings[$id] ) ) {
508
+ return true;
509
+ }
510
+ $field_id = $settings[$id]['active_callback']['id'];
511
+ $compare = $settings[$id]['active_callback']['compare'];
512
+ $value = $settings[$id]['active_callback']['value'];
513
+ $field_value = Kadence_Woomail_Customizer::opt($field_id);
514
+ switch ( $compare ) {
515
+ case '==':
516
+ case '=':
517
+ case 'equals':
518
+ case 'equal':
519
+ $show = ( $field_value == $value ) ? true : false;
520
+ break;
521
+
522
+ case '!=':
523
+ case 'not equal':
524
+ $show = ( $field_value != $value ) ? true : false;
525
+ break;
526
+ }
527
+ return $show;
528
+ }
529
+ /**
530
+ * Maybe add section
531
+ *
532
+ * @access public
533
+ * @param object $wp_customize
534
+ * @param array $child
535
+ * @return void
536
+ */
537
+ public static function maybe_add_section( $wp_customize, $child ) {
538
+ // Get sections
539
+ $sections = Kadence_Woomail_Settings::get_sections();
540
+
541
+ // Check if section is set and exists
542
+ if ( ! empty( $child['section'] ) && isset( $sections[$child['section']] ) ) {
543
+
544
+ // Reference current section key
545
+ $section_key = $child['section'];
546
+
547
+ // Check if section was not added yet
548
+ if ( ! in_array( $section_key, self::$sections_added, true ) ) {
549
+
550
+ // Reference current section
551
+ $section = $sections[$section_key];
552
+
553
+ // Section config
554
+ $section_config = array(
555
+ 'title' => $section['title'],
556
+ 'priority' => (isset($section['priority']) ? $section['priority'] : 10),
557
+ );
558
+
559
+ // Description
560
+ if ( ! empty($section['description'] ) ) {
561
+ $section_config['description'] = $section['description'];
562
+ }
563
+
564
+ // Maybe add panel
565
+ Kadence_Woomail_Customizer::maybe_add_panel($wp_customize, $section);
566
+
567
+ // Maybe add section to panel
568
+ if ( ! empty( $section['panel'] ) ) {
569
+ $section_config['panel'] = 'kt_woomail_' . $section['panel'];
570
+ }
571
+
572
+ // Register section
573
+ $wp_customize->add_section('kt_woomail_' . $section_key, $section_config);
574
+
575
+ // Track which sections were added
576
+ self::$sections_added[] = $section_key;
577
+ }
578
+ }
579
+ }
580
+
581
+ /**
582
+ * Maybe add panel
583
+ *
584
+ * @access public
585
+ * @param object $wp_customize
586
+ * @param array $child
587
+ * @return void
588
+ */
589
+ public static function maybe_add_panel($wp_customize, $child) {
590
+ // Get panels
591
+ $panels = Kadence_Woomail_Settings::get_panels();
592
+ // Check if panel is set and exists
593
+ if ( ! empty($child['panel'] ) && isset( $panels[ $child['panel'] ] ) ) {
594
+
595
+ // Reference current panel key
596
+ $panel_key = $child['panel'];
597
+
598
+ // Check if panel was not added yet
599
+ if ( ! in_array( $panel_key, self::$panels_added, true ) ) {
600
+
601
+ // Reference current panel
602
+ $panel = $panels[$panel_key];
603
+
604
+ // Panel config
605
+ $panel_config = array(
606
+ 'title' => $panel['title'],
607
+ 'priority' => ( isset( $panel['priority'] ) ? $panel['priority'] : 10 ),
608
+ 'capability' => Kadence_Woomail_Designer::get_admin_capability(),
609
+ );
610
+
611
+ // Panel description
612
+ if ( ! empty($panel['description'] ) ) {
613
+ $panel_config['description'] = $panel['description'];
614
+ }
615
+
616
+ // Register panel
617
+ $wp_customize->add_panel('kt_woomail_' . $panel_key, $panel_config);
618
+
619
+ // Track which panels were added
620
+ self::$panels_added[] = $panel_key;
621
+ }
622
+ }
623
+ }
624
+
625
+ /**
626
+ * Get styles string
627
+ *
628
+ * @access public
629
+ * @param bool $add_custom_css
630
+ * @return string
631
+ */
632
+ public static function get_styles_string( $add_custom_css = true ) {
633
+ $styles_array = array();
634
+ $styles = '';
635
+
636
+ // Iterate over settings
637
+ foreach ( Kadence_Woomail_Settings::get_settings() as $setting_key => $setting ) {
638
+
639
+ // Only add CSS properties
640
+ if (isset($setting['live_method']) && $setting['live_method'] === 'css') {
641
+
642
+ // Iterate over selectors
643
+ foreach ($setting['selectors'] as $selector => $properties) {
644
+
645
+ // Iterate over properties
646
+ foreach ($properties as $property) {
647
+
648
+ // Add value to styles array
649
+ $styles_array[$selector][$property] = Kadence_Woomail_Customizer::opt($setting_key, $selector);
650
+ }
651
+ }
652
+ }
653
+ }
654
+
655
+ // Join property names with values
656
+ foreach ($styles_array as $selector => $properties) {
657
+
658
+ // Open selector
659
+ $styles .= $selector . '{';
660
+
661
+ foreach ($properties as $property_key => $property_value) {
662
+
663
+ // Add property
664
+ $styles .= $property_key . ':' . $property_value . ';';
665
+ }
666
+
667
+ // Close selector
668
+ $styles .= '}';
669
+ }
670
+
671
+ // Add custom CSS
672
+ if ( $add_custom_css ) {
673
+ $styles .= Kadence_Woomail_Customizer::opt( 'custom_css' );
674
+ }
675
+
676
+ // Return styles string
677
+ return $styles;
678
+ }
679
+
680
+ /**
681
+ * Get value for use in templates
682
+ *
683
+ * @access public
684
+ * @param string $key
685
+ * @param string $selector
686
+ * @return string
687
+ */
688
+ public static function opt( $key, $selector = null ) {
689
+ // Get raw value
690
+ $stored_value = Kadence_Woomail_Customizer::get_stored_value( $key, Kadence_Woomail_Settings::get_default_value( $key ) );
691
+
692
+ // Prepare value
693
+ $value = Kadence_Woomail_Customizer::prepare( $key, $stored_value, $selector );
694
+
695
+ // Allow developers to override
696
+ return apply_filters( 'kt_woomail_option_value', $value, $key, $selector, $stored_value );
697
+ }
698
+
699
+ /**
700
+ * Get value stored in database
701
+ *
702
+ * @access public
703
+ * @param string $key
704
+ * @param string $default
705
+ * @return string
706
+ */
707
+ public static function get_stored_value($key, $default = '') {
708
+ // Get all stored values
709
+ $stored = (array) get_option( 'kt_woomail', array());
710
+
711
+ // Check if value exists in stored values array
712
+ if (!empty($stored) && isset($stored[$key])) {
713
+ return $stored[$key];
714
+ }
715
+
716
+ // Stored value not found, use default value
717
+ return $default;
718
+ }
719
+
720
+ /**
721
+ * Prepare value for use in HTML
722
+ *
723
+ * @access public
724
+ * @param string $key
725
+ * @param string $value
726
+ * @param string $selector
727
+ * @return string
728
+ */
729
+ public static function prepare( $key, $value, $selector = null ) {
730
+ // Append CSS suffix to value
731
+ $value .= Kadence_Woomail_Customizer::get_css_suffix($key);
732
+
733
+ // Special case for shadow
734
+ if ( $key === 'shadow' ) {
735
+ $value = '0 ' . ($value > 0 ? 1 : 0) . 'px ' . ($value * 4) . 'px ' . $value . 'px rgba(0,0,0,0.1) !important';
736
+ }
737
+
738
+ // Font family
739
+ if ( substr( $key, -11 ) === 'font_family' ) {
740
+ $value = isset( Kadence_Woomail_Settings::$font_family_mapping[$value] ) ? Kadence_Woomail_Settings::$font_family_mapping[$value] : $value;
741
+ }
742
+
743
+ // Return prepared value
744
+ return $value;
745
+ }
746
+
747
+ /**
748
+ * Get CSS suffix by key or all CSS suffixes
749
+ *
750
+ * @access public
751
+ * @param string $key
752
+ * @return mixed
753
+ */
754
+ public static function get_css_suffix($key = null) {
755
+ // Define CSS suffixes
756
+ if (self::$css_suffixes === null) {
757
+ self::$css_suffixes = array(
758
+ 'email_padding' => 'px',
759
+ 'email_padding_bottom' => 'px',
760
+ 'content_padding_top' => 'px',
761
+ 'content_padding_bottom' => 'px',
762
+ 'content_padding' => 'px',
763
+
764
+ 'content_width' => 'px',
765
+ 'border_width' => 'px',
766
+ 'border_radius' => 'px !important',
767
+
768
+ 'header_image_maxwidth' => 'px',
769
+ 'header_image_padding_top_bottom' => 'px',
770
+
771
+ 'header_padding_top' => 'px',
772
+ 'header_padding_bottom' => 'px',
773
+ 'header_padding_left_right' => 'px',
774
+ 'heading_font_size' => 'px',
775
+ 'heading_line_height' => 'px',
776
+ 'subtitle_font_size' => 'px',
777
+ 'subtitle_line_height' => 'px',
778
+
779
+ 'font_size' => 'px',
780
+ 'line_height' => 'px',
781
+
782
+ 'h2_font_size' => 'px',
783
+ 'h2_line_height' => 'px',
784
+ 'h2_separator_height' => 'px',
785
+ 'h2_padding_top' => 'px',
786
+ 'h2_margin_bottom' => 'px',
787
+ 'h2_padding_bottom' => 'px',
788
+ 'h2_margin_top' => 'px',
789
+ 'h3_font_size' => 'px',
790
+ 'h3_line_height' => 'px',
791
+
792
+ 'addresses_border_width' => 'px',
793
+
794
+ 'footer_top_padding' => 'px',
795
+ 'footer_bottom_padding' => 'px',
796
+ 'footer_left_right_padding' => 'px',
797
+ 'footer_font_size' => 'px',
798
+ 'footer_social_title_size' => 'px',
799
+ 'footer_social_top_padding' => 'px',
800
+ 'footer_social_bottom_padding' => 'px',
801
+ 'footer_social_border_width' => 'px',
802
+
803
+ 'footer_credit_top_padding' => 'px',
804
+ 'footer_credit_bottom_padding' => 'px',
805
+
806
+ 'items_table_border_width' => 'px',
807
+ 'items_table_separator_width' => 'px',
808
+ 'items_table_padding' => 'px',
809
+ );
810
+ }
811
+
812
+ // Return single suffix
813
+ if ( isset( $key ) ) {
814
+ return isset(self::$css_suffixes[$key]) ? self::$css_suffixes[$key] : '';
815
+ }
816
+ // Return all suffixes for use in Javascript
817
+ else {
818
+ return self::$css_suffixes;
819
+ }
820
+ }
821
+
822
+ /**
823
+ * Reset to default values via Ajax request
824
+ *
825
+ * @access public
826
+ * @return void
827
+ */
828
+ public function ajax_send_email() {
829
+ // Check request
830
+ if ( empty($_REQUEST['wp_customize'] ) || $_REQUEST['wp_customize'] !== 'on' || empty($_REQUEST['action']) || $_REQUEST['action'] !== 'kt_woomail_send_email' || empty( $_REQUEST['recipients'] ) ) {
831
+ exit;
832
+ }
833
+
834
+ // Check if user is allowed to send email
835
+ if ( ! Kadence_Woomail_Designer::is_admin()) {
836
+ exit;
837
+ }
838
+
839
+ $recipients = wc_clean( $_REQUEST['recipients'] );
840
+ $content = Kadence_Woomail_Preview::get_preview_email( true, $recipients );
841
+ echo $content;
842
+ }
843
+
844
+
845
+ /**
846
+ * Reset to default values via Ajax request
847
+ *
848
+ * @access public
849
+ * @return void
850
+ */
851
+ public function ajax_reset() {
852
+ // Check request
853
+ if ( empty($_REQUEST['wp_customize'] ) || $_REQUEST['wp_customize'] !== 'on' || empty($_REQUEST['action']) || $_REQUEST['action'] !== 'kt_woomail_reset') {
854
+ exit;
855
+ }
856
+
857
+ // Check if user is allowed to reset values
858
+ if ( ! Kadence_Woomail_Designer::is_admin()) {
859
+ exit;
860
+ }
861
+ global $wp_customize;
862
+
863
+ // Reset to default values
864
+ Kadence_Woomail_Customizer::reset( $wp_customize );
865
+
866
+ exit;
867
+ }
868
+
869
+ /**
870
+ * Reset to default values
871
+ *
872
+ * @access private
873
+ * @return void
874
+ */
875
+ public static function reset( $wp_customize ) {
876
+ update_option('kt_woomail', array());
877
+ // Load the export/import option class.
878
+ require_once KT_WOOMAIL_PATH . 'includes/class-kadence-woomail-import-option.php';
879
+ //Run through the woocommerce settings we are overriding
880
+ foreach ( Kadence_Woomail_Settings::get_woo_settings() as $setting_key => $setting ) {
881
+ $option = new Kadence_Woomail_Import_Option( $wp_customize, $setting_key, array(
882
+ 'default' => '',
883
+ 'type' => 'option',
884
+ 'capability' => Kadence_Woomail_Designer::get_admin_capability(),
885
+ ) );
886
+ if ( 'woocommerce_email_footer_text' == $setting_key ) {
887
+ $option->import( '{site_title}' );
888
+ } else if ( 'woocommerce_email_body_background_color' == $setting_key ) {
889
+ $option->import( '#ffffff' );
890
+ } else if ( 'woocommerce_email_background_color' == $setting_key ) {
891
+ $option->import( '#f7f7f7' );
892
+ } else if ( 'woocommerce_email_text_color' == $setting_key ) {
893
+ $option->import( '#3c3c3c' );
894
+ } else {
895
+ $option->import( '' );
896
+ }
897
+ }
898
+ }
899
+
900
+ /**
901
+ * Maybe add custom styles to default WooCommerce styles
902
+ *
903
+ * @access public
904
+ * @param string $styles
905
+ * @return string
906
+ */
907
+ public function maybe_add_custom_styles( $styles ) {
908
+ // Check if custom styles need to be applied
909
+ if ( Kadence_Woomail_Designer::overwrite_options() ) {
910
+
911
+ // Add custom styles
912
+ $styles .= Kadence_Woomail_Customizer::get_styles_string();
913
+
914
+ // Static styles
915
+ $styles .= Kadence_Woomail_Customizer::get_static_styles();
916
+ }
917
+ // Otherwise apply some fixes for Customizer Preview
918
+ else if ( Kadence_Woomail_Designer::is_own_preview_request() ) {
919
+ $styles .= 'body { background-color: ' . get_option( 'woocommerce_email_background_color' ) . '; }';
920
+ $styles .= Kadence_Woomail_Customizer::get_static_styles();
921
+ }
922
+
923
+ // Return styles
924
+ return $styles;
925
+ }
926
+
927
+ /**
928
+ * Get static styles
929
+ *
930
+ * @access public
931
+ * @return string
932
+ */
933
+ public static function get_static_styles() {
934
+ return "
935
+ html, body {height:100%; position:relative;}
936
+ #body_content_inner > table {
937
+ border-collapse: collapse;
938
+ }
939
+ #body_content_inner > table.td > tbody {
940
+ border-bottom-style: solid;
941
+ }
942
+ #template_header h1 {
943
+ text-shadow:none;
944
+ }
945
+ #template_header_image p {
946
+ margin-bottom:0;
947
+ }
948
+ ";
949
+ }
950
+
951
+
952
+
953
+
954
+
955
+ }
956
+
957
+ Kadence_Woomail_Customizer::get_instance();
958
+
959
+ }
includes/class-kadence-woomail-import-export.php ADDED
@@ -0,0 +1,364 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly
3
+ if ( ! defined('ABSPATH') ) {
4
+ exit;
5
+ }
6
+ if ( ! class_exists( 'Kadence_Woomail_Import_Export' ) ) {
7
+
8
+ class Kadence_Woomail_Import_Export {
9
+ /**
10
+ * @var null
11
+ */
12
+ private static $instance = null;
13
+ private static $woo_core_options = array(
14
+ 'woocommerce_email_header_image',
15
+ 'woocommerce_email_footer_text',
16
+ 'woocommerce_email_body_background_color',
17
+ 'woocommerce_email_text_color',
18
+ 'woocommerce_email_background_color',
19
+ 'woocommerce_new_order_settings[heading]',
20
+ 'woocommerce_new_order_settings[subject]',
21
+
22
+ 'woocommerce_cancelled_order_settings[heading]',
23
+ 'woocommerce_customer_processing_order_settings[heading]',
24
+ 'woocommerce_customer_completed_order_settings[heading]',
25
+ 'woocommerce_customer_refunded_order_settings[heading_full]',
26
+ 'woocommerce_customer_refunded_order_settings[heading_partial]',
27
+
28
+ 'woocommerce_customer_on_hold_order_settings[heading]',
29
+ 'woocommerce_customer_invoice_settings[heading]',
30
+ 'woocommerce_customer_invoice_settings[heading_paid]',
31
+ 'woocommerce_failed_order_settings[heading]',
32
+ 'woocommerce_customer_new_account_settings[heading]',
33
+ 'woocommerce_customer_note_settings[heading]',
34
+ 'woocommerce_customer_reset_password_settings[heading]',
35
+
36
+ 'woocommerce_cancelled_order_settings[subject]',
37
+ 'woocommerce_customer_processing_order_settings[subject]',
38
+ 'woocommerce_customer_completed_order_settings[subject]',
39
+
40
+ 'woocommerce_customer_refunded_order_settings[subject_full]',
41
+ 'woocommerce_customer_refunded_order_settings[subject_partial]',
42
+
43
+ 'woocommerce_customer_on_hold_order_settings[subject]',
44
+
45
+ 'woocommerce_customer_invoice_settings[subject]',
46
+ 'woocommerce_customer_invoice_settings[subject_paid]',
47
+
48
+ 'woocommerce_failed_order_settings[subject]',
49
+ 'woocommerce_customer_new_account_settings[subject]',
50
+ 'woocommerce_customer_note_settings[subject]',
51
+ 'woocommerce_customer_reset_password_settings[subject]',
52
+ );
53
+ private static $prebuilt_options = array(
54
+ 'kt_skinny' => 'a:2:{s:8:"template";s:24:"kadence-woomail-designer";s:7:"options";a:158:{s:30:"kt_woomail[new_order_subtitle]";s:0:"";s:26:"kt_woomail[new_order_body]";s:78:"You have received an order from {customer_full_name}. The order is as follows:";s:36:"kt_woomail[cancelled_order_subtitle]";s:0:"";s:32:"kt_woomail[cancelled_order_body]";s:96:"The order {order_number} from {customer_full_name} has been cancelled. The order was as follows:";s:46:"kt_woomail[customer_processing_order_subtitle]";s:19:"ORDER IS PROCESSING";s:42:"kt_woomail[customer_processing_order_body]";s:111:"Your order has been received and is now being processed. Your order details are shown below for your reference:";s:45:"kt_woomail[customer_completed_order_subtitle]";s:21:"THANKS FOR YOUR ORDER";s:41:"kt_woomail[customer_completed_order_body]";s:118:"Hi there. Your recent order on {site_title} has been completed. Your order details are shown below for your reference:";s:44:"kt_woomail[customer_refunded_order_subtitle]";s:29:"ORDER #{order_number} DETAILS";s:42:"kt_woomail[customer_refunded_order_switch]";b:1;s:45:"kt_woomail[customer_refunded_order_body_full]";s:55:"Hi there. Your order on {site_title} has been refunded.";s:48:"kt_woomail[customer_refunded_order_body_partial]";s:65:"Hi there. Your order on {site_title} has been partially refunded.";s:43:"kt_woomail[customer_on_hold_order_subtitle]";s:21:"THANKS FOR YOUR ORDER";s:39:"kt_woomail[customer_on_hold_order_body]";s:120:"Your order is on-hold until we confirm payment has been received. Your order details are shown below for your reference:";s:37:"kt_woomail[customer_invoice_subtitle]";s:33:"INVOICE FOR ORDER #{order_number}";s:35:"kt_woomail[customer_invoice_switch]";b:1;s:38:"kt_woomail[customer_invoice_body_paid]";s:0:"";s:33:"kt_woomail[customer_invoice_body]";s:69:"An order has been created for you on {site_title}. {invoice_pay_link}";s:33:"kt_woomail[failed_order_subtitle]";s:0:"";s:29:"kt_woomail[failed_order_body]";s:96:"Payment for order {order_number} from {customer_full_name} has failed. The order was as follows:";s:41:"kt_woomail[customer_new_account_subtitle]";s:0:"";s:37:"kt_woomail[customer_new_account_body]";s:84:"Thanks for creating an account on {site_title}. Your username is {customer_username}";s:34:"kt_woomail[customer_note_subtitle]";s:30:"A NOTE WAS ADDED TO YOUR ORDER";s:30:"kt_woomail[customer_note_body]";s:48:"Hello, a note has just been added to your order:";s:44:"kt_woomail[customer_reset_password_subtitle]";s:12:"INSTRUCTIONS";s:40:"kt_woomail[customer_reset_password_body]";s:228:"Someone requested that the password be reset for the following account:
55
+
56
+ Username: {customer_username}
57
+
58
+ If this was a mistake, just ignore this email and nothing will happen.
59
+
60
+ To reset your password, visit the following address:";s:31:"kt_woomail[email_load_template]";s:7:"kt_full";s:22:"kt_woomail[email_type]";s:24:"customer_completed_order";s:27:"kt_woomail[email_text_info]";s:0:"";s:25:"kt_woomail[content_width]";s:3:"480";s:25:"kt_woomail[border_radius]";s:1:"3";s:24:"kt_woomail[border_width]";s:1:"1";s:24:"kt_woomail[border_color]";s:7:"#dedede";s:18:"kt_woomail[shadow]";s:1:"1";s:25:"kt_woomail[email_padding]";s:2:"70";s:32:"kt_woomail[email_padding_bottom]";s:2:"70";s:30:"kt_woomail[header_image_align]";s:6:"center";s:33:"kt_woomail[header_image_maxwidth]";s:3:"300";s:41:"kt_woomail[header_image_background_color]";s:11:"transparent";s:43:"kt_woomail[header_image_padding_top_bottom]";s:1:"0";s:35:"kt_woomail[header_background_color]";s:7:"#ffffff";s:29:"kt_woomail[header_text_align]";s:6:"center";s:30:"kt_woomail[header_padding_top]";s:2:"36";s:33:"kt_woomail[header_padding_bottom]";s:2:"36";s:37:"kt_woomail[header_padding_left_right]";s:2:"48";s:29:"kt_woomail[heading_font_size]";s:2:"30";s:31:"kt_woomail[heading_line_height]";s:2:"40";s:31:"kt_woomail[heading_font_family]";s:9:"helvetica";s:30:"kt_woomail[heading_font_style]";s:6:"normal";s:31:"kt_woomail[heading_font_weight]";s:3:"400";s:25:"kt_woomail[heading_color]";s:7:"#4a2a4d";s:31:"kt_woomail[subtitle_fontt_info]";s:0:"";s:30:"kt_woomail[subtitle_placement]";s:5:"below";s:30:"kt_woomail[subtitle_font_size]";s:2:"18";s:32:"kt_woomail[subtitle_line_height]";s:2:"24";s:32:"kt_woomail[subtitle_font_family]";s:9:"helvetica";s:31:"kt_woomail[subtitle_font_style]";s:6:"normal";s:32:"kt_woomail[subtitle_font_weight]";s:3:"300";s:26:"kt_woomail[subtitle_color]";s:7:"#4a2a4d";s:31:"kt_woomail[content_padding_top]";s:1:"0";s:34:"kt_woomail[content_padding_bottom]";s:1:"0";s:27:"kt_woomail[content_padding]";s:2:"48";s:21:"kt_woomail[font_size]";s:2:"14";s:23:"kt_woomail[line_height]";s:2:"24";s:23:"kt_woomail[font_family]";s:9:"helvetica";s:23:"kt_woomail[font_weight]";s:3:"400";s:22:"kt_woomail[link_color]";s:7:"#4a2a4d";s:24:"kt_woomail[h2_font_size]";s:2:"16";s:26:"kt_woomail[h2_line_height]";s:2:"26";s:26:"kt_woomail[h2_padding_top]";s:1:"0";s:29:"kt_woomail[h2_padding_bottom]";s:1:"0";s:25:"kt_woomail[h2_margin_top]";s:1:"5";s:28:"kt_woomail[h2_margin_bottom]";s:2:"25";s:26:"kt_woomail[h2_font_family]";s:9:"helvetica";s:25:"kt_woomail[h2_font_style]";s:6:"normal";s:26:"kt_woomail[h2_font_weight]";s:3:"500";s:29:"kt_woomail[h2_text_transform]";s:4:"none";s:20:"kt_woomail[h2_color]";s:7:"#4a2a4d";s:25:"kt_woomail[h2_text_align]";s:6:"center";s:20:"kt_woomail[h2_style]";s:4:"none";s:31:"kt_woomail[h2_separator_height]";s:0:"";s:30:"kt_woomail[h2_separator_style]";s:5:"solid";s:30:"kt_woomail[h2_separator_color]";s:7:"#96588a";s:24:"kt_woomail[h3_font_info]";s:0:"";s:24:"kt_woomail[h3_font_size]";s:2:"16";s:26:"kt_woomail[h3_line_height]";s:2:"26";s:26:"kt_woomail[h3_font_family]";s:9:"helvetica";s:25:"kt_woomail[h3_font_style]";s:6:"normal";s:26:"kt_woomail[h3_font_weight]";s:3:"500";s:20:"kt_woomail[h3_color]";s:7:"#787878";s:29:"kt_woomail[order_items_style]";s:6:"normal";s:40:"kt_woomail[items_table_background_color]";s:0:"";s:31:"kt_woomail[items_table_padding]";s:2:"12";s:36:"kt_woomail[items_table_border_width]";s:1:"1";s:36:"kt_woomail[items_table_border_color]";s:7:"#e4e4e4";s:36:"kt_woomail[items_table_border_style]";s:5:"solid";s:31:"kt_woomail[order_heading_style]";s:6:"normal";s:38:"kt_woomail[addresses_background_color]";s:0:"";s:34:"kt_woomail[addresses_border_width]";s:1:"2";s:34:"kt_woomail[addresses_border_color]";s:7:"#e5e5e5";s:34:"kt_woomail[addresses_border_style]";s:5:"solid";s:32:"kt_woomail[addresses_text_color]";s:7:"#8f8f8f";s:32:"kt_woomail[addresses_text_align]";s:6:"center";s:39:"kt_woomail[footer_background_placement]";s:6:"inside";s:35:"kt_woomail[footer_background_color]";s:0:"";s:30:"kt_woomail[footer_top_padding]";s:1:"0";s:33:"kt_woomail[footer_bottom_padding]";s:2:"31";s:37:"kt_woomail[footer_left_right_padding]";s:2:"48";s:34:"kt_woomail[footer_social_repeater]";s:1111:"[{"icon_value":"kt-woomail-facebook","icon_color":"gray","text":"undefined","link":"https://www.facebook.com","text2":"undefined","image_url":"","choice":"customizer_repeater_icon","title":"","subtitle":"undefined","id":"social-repeater-5afb186e6db1f","shortcode":"undefined"},{"icon_value":"kt-woomail-instagram","icon_color":"gray","text":"undefined","link":"https://www.instagram.com","text2":"undefined","image_url":"","choice":"customizer_repeater_icon","title":"","subtitle":"undefined","id":"customizer-repeater-5afb18a75dfdc","shortcode":"undefined"},{"icon_value":"kt-woomail-twitter","icon_color":"gray","text":"undefined","link":"https://www.twitter.com","text2":"undefined","image_url":"","choice":"customizer_repeater_icon","title":"","subtitle":"undefined","id":"customizer-repeater-5afb188d6d776","shortcode":"undefined"},{"icon_value":"kt-woomail-link","icon_color":"gray","text":"undefined","link":"https://www.google.com","text2":"undefined","image_url":"","choice":"customizer_repeater_icon","title":"","subtitle":"undefined","id":"customizer-repeater-5afb18c76ca11","shortcode":"undefined"}]";s:37:"kt_woomail[footer_social_title_color]";s:7:"#000000";s:36:"kt_woomail[footer_social_title_size]";s:2:"18";s:43:"kt_woomail[footer_social_title_font_family]";s:9:"helvetica";s:43:"kt_woomail[footer_social_title_font_weight]";s:3:"400";s:37:"kt_woomail[footer_social_top_padding]";s:2:"15";s:40:"kt_woomail[footer_social_bottom_padding]";s:2:"20";s:38:"kt_woomail[footer_social_border_width]";s:1:"1";s:38:"kt_woomail[footer_social_border_color]";s:7:"#dddddd";s:38:"kt_woomail[footer_social_border_style]";s:5:"solid";s:29:"kt_woomail[footer_text_align]";s:6:"center";s:28:"kt_woomail[footer_font_size]";s:2:"12";s:30:"kt_woomail[footer_font_family]";s:9:"helvetica";s:30:"kt_woomail[footer_font_weight]";s:3:"400";s:24:"kt_woomail[footer_color]";s:7:"#9e9e9e";s:37:"kt_woomail[footer_credit_top_padding]";s:2:"20";s:40:"kt_woomail[footer_credit_bottom_padding]";s:1:"0";s:22:"kt_woomail[custom_css]";s:76:"#addresses td {
61
+ width: 100%;
62
+ display:block;
63
+ margin-bottom:30px
64
+ }";s:25:"kt_woomail[import_export]";s:0:"";s:30:"woocommerce_email_header_image";s:0:"";s:34:"woocommerce_email_background_color";s:7:"#f7f7f7";s:28:"woocommerce_email_text_color";s:7:"#515151";s:39:"woocommerce_email_body_background_color";s:7:"#ffffff";s:29:"woocommerce_email_footer_text";s:12:"{site_title}";s:39:"woocommerce_new_order_settings[subject]";s:65:"[{site_title}] New customer order ({order_number}) - {order_date}";s:39:"woocommerce_new_order_settings[heading]";s:9:"NEW ORDER";s:45:"woocommerce_cancelled_order_settings[subject]";s:47:"[{site_title}] Cancelled order ({order_number})";s:45:"woocommerce_cancelled_order_settings[heading]";s:15:"ORDER CANCELLED";s:55:"woocommerce_customer_processing_order_settings[subject]";s:0:"";s:55:"woocommerce_customer_processing_order_settings[heading]";s:9:"THANK YOU";s:54:"woocommerce_customer_completed_order_settings[subject]";s:0:"";s:54:"woocommerce_customer_completed_order_settings[heading]";s:14:"ORDER COMPLETE";s:58:"woocommerce_customer_refunded_order_settings[subject_full]";s:0:"";s:61:"woocommerce_customer_refunded_order_settings[subject_partial]";s:0:"";s:58:"woocommerce_customer_refunded_order_settings[heading_full]";s:14:"ORDER REFUNDED";s:61:"woocommerce_customer_refunded_order_settings[heading_partial]";s:18:"PARTIALLY REFUNDED";s:52:"woocommerce_customer_on_hold_order_settings[subject]";s:0:"";s:52:"woocommerce_customer_on_hold_order_settings[heading]";s:13:"ORDER DETAILS";s:46:"woocommerce_customer_invoice_settings[subject]";s:0:"";s:51:"woocommerce_customer_invoice_settings[subject_paid]";s:0:"";s:46:"woocommerce_customer_invoice_settings[heading]";s:13:"ORDER DETAILS";s:51:"woocommerce_customer_invoice_settings[heading_paid]";s:13:"ORDER DETAILS";s:42:"woocommerce_failed_order_settings[subject]";s:44:"[{site_title}] Failed order ({order_number})";s:42:"woocommerce_failed_order_settings[heading]";s:12:"ORDER FAILED";s:50:"woocommerce_customer_new_account_settings[subject]";s:0:"";s:50:"woocommerce_customer_new_account_settings[heading]";s:0:"";s:43:"woocommerce_customer_note_settings[subject]";s:0:"";s:43:"woocommerce_customer_note_settings[heading]";s:16:"ORDER NOTE ADDED";s:53:"woocommerce_customer_reset_password_settings[subject]";s:0:"";s:53:"woocommerce_customer_reset_password_settings[heading]";s:14:"PASSWORD RESET";}}',
65
+
66
+ 'kt_full' => 'a:2:{s:8:"template";s:24:"kadence-woomail-designer";s:7:"options";a:158:{s:30:"kt_woomail[new_order_subtitle]";s:24:"Hello from {site_title}!";s:26:"kt_woomail[new_order_body]";s:78:"You have received an order from {customer_full_name}. The order is as follows:";s:36:"kt_woomail[cancelled_order_subtitle]";s:24:"Hello from {site_title}!";s:32:"kt_woomail[cancelled_order_body]";s:96:"The order {order_number} from {customer_full_name} has been cancelled. The order was as follows:";s:46:"kt_woomail[customer_processing_order_subtitle]";s:24:"Hello from {site_title}!";s:42:"kt_woomail[customer_processing_order_body]";s:111:"Your order has been received and is now being processed. Your order details are shown below for your reference:";s:45:"kt_woomail[customer_completed_order_subtitle]";s:24:"Hello from {site_title}!";s:41:"kt_woomail[customer_completed_order_body]";s:118:"Hi there. Your recent order on {site_title} has been completed. Your order details are shown below for your reference:";s:44:"kt_woomail[customer_refunded_order_subtitle]";s:24:"Hello from {site_title}!";s:42:"kt_woomail[customer_refunded_order_switch]";b:1;s:45:"kt_woomail[customer_refunded_order_body_full]";s:55:"Hi there. Your order on {site_title} has been refunded.";s:48:"kt_woomail[customer_refunded_order_body_partial]";s:65:"Hi there. Your order on {site_title} has been partially refunded.";s:43:"kt_woomail[customer_on_hold_order_subtitle]";s:24:"Hello from {site_title}!";s:39:"kt_woomail[customer_on_hold_order_body]";s:120:"Your order is on-hold until we confirm payment has been received. Your order details are shown below for your reference:";s:37:"kt_woomail[customer_invoice_subtitle]";s:24:"Hello from {site_title}!";s:35:"kt_woomail[customer_invoice_switch]";b:0;s:38:"kt_woomail[customer_invoice_body_paid]";s:0:"";s:33:"kt_woomail[customer_invoice_body]";s:69:"An order has been created for you on {site_title}. {invoice_pay_link}";s:33:"kt_woomail[failed_order_subtitle]";s:24:"Hello from {site_title}!";s:29:"kt_woomail[failed_order_body]";s:96:"Payment for order {order_number} from {customer_full_name} has failed. The order was as follows:";s:41:"kt_woomail[customer_new_account_subtitle]";s:24:"Hello from {site_title}!";s:37:"kt_woomail[customer_new_account_body]";s:84:"Thanks for creating an account on {site_title}. Your username is {customer_username}";s:34:"kt_woomail[customer_note_subtitle]";s:24:"Hello from {site_title}!";s:30:"kt_woomail[customer_note_body]";s:48:"Hello, a note has just been added to your order:";s:44:"kt_woomail[customer_reset_password_subtitle]";s:24:"Hello from {site_title}!";s:40:"kt_woomail[customer_reset_password_body]";s:228:"Someone requested that the password be reset for the following account:
67
+
68
+ Username: {customer_username}
69
+
70
+ If this was a mistake, just ignore this email and nothing will happen.
71
+
72
+ To reset your password, visit the following address:";s:31:"kt_woomail[email_load_template]";s:7:"kt_full";s:22:"kt_woomail[email_type]";s:24:"customer_completed_order";s:27:"kt_woomail[email_text_info]";s:0:"";s:25:"kt_woomail[content_width]";s:3:"600";s:25:"kt_woomail[border_radius]";s:1:"0";s:24:"kt_woomail[border_width]";s:1:"0";s:24:"kt_woomail[border_color]";s:7:"#ffffff";s:18:"kt_woomail[shadow]";s:1:"0";s:25:"kt_woomail[email_padding]";s:1:"0";s:32:"kt_woomail[email_padding_bottom]";s:1:"0";s:30:"kt_woomail[header_image_align]";s:6:"center";s:33:"kt_woomail[header_image_maxwidth]";s:3:"260";s:41:"kt_woomail[header_image_background_color]";s:7:"#f2f2f2";s:43:"kt_woomail[header_image_padding_top_bottom]";s:2:"21";s:35:"kt_woomail[header_background_color]";s:7:"#ffffff";s:29:"kt_woomail[header_text_align]";s:6:"center";s:30:"kt_woomail[header_padding_top]";s:2:"36";s:33:"kt_woomail[header_padding_bottom]";s:2:"36";s:37:"kt_woomail[header_padding_left_right]";s:2:"48";s:29:"kt_woomail[heading_font_size]";s:2:"32";s:31:"kt_woomail[heading_line_height]";s:2:"40";s:31:"kt_woomail[heading_font_family]";s:9:"helvetica";s:30:"kt_woomail[heading_font_style]";s:6:"normal";s:31:"kt_woomail[heading_font_weight]";s:3:"600";s:25:"kt_woomail[heading_color]";s:7:"#222222";s:31:"kt_woomail[subtitle_fontt_info]";s:0:"";s:30:"kt_woomail[subtitle_placement]";s:5:"above";s:30:"kt_woomail[subtitle_font_size]";s:2:"20";s:32:"kt_woomail[subtitle_line_height]";s:2:"34";s:32:"kt_woomail[subtitle_font_family]";s:7:"georgia";s:31:"kt_woomail[subtitle_font_style]";s:6:"italic";s:32:"kt_woomail[subtitle_font_weight]";s:3:"400";s:26:"kt_woomail[subtitle_color]";s:7:"#999999";s:31:"kt_woomail[content_padding_top]";s:1:"0";s:34:"kt_woomail[content_padding_bottom]";s:1:"0";s:27:"kt_woomail[content_padding]";s:2:"20";s:21:"kt_woomail[font_size]";s:2:"14";s:23:"kt_woomail[line_height]";s:2:"24";s:23:"kt_woomail[font_family]";s:9:"helvetica";s:23:"kt_woomail[font_weight]";s:3:"400";s:22:"kt_woomail[link_color]";s:7:"#f96a01";s:24:"kt_woomail[h2_font_size]";s:2:"28";s:26:"kt_woomail[h2_line_height]";s:2:"34";s:26:"kt_woomail[h2_padding_top]";s:2:"34";s:29:"kt_woomail[h2_padding_bottom]";s:1:"0";s:25:"kt_woomail[h2_margin_top]";s:2:"30";s:28:"kt_woomail[h2_margin_bottom]";s:2:"30";s:26:"kt_woomail[h2_font_family]";s:9:"helvetica";s:25:"kt_woomail[h2_font_style]";s:6:"normal";s:26:"kt_woomail[h2_font_weight]";s:3:"700";s:29:"kt_woomail[h2_text_transform]";s:4:"none";s:20:"kt_woomail[h2_color]";s:7:"#222222";s:25:"kt_woomail[h2_text_align]";s:6:"center";s:20:"kt_woomail[h2_style]";s:5:"above";s:31:"kt_woomail[h2_separator_height]";s:1:"1";s:30:"kt_woomail[h2_separator_style]";s:6:"dashed";s:30:"kt_woomail[h2_separator_color]";s:7:"#e5e5e5";s:24:"kt_woomail[h3_font_info]";s:0:"";s:24:"kt_woomail[h3_font_size]";s:2:"16";s:26:"kt_woomail[h3_line_height]";s:2:"30";s:26:"kt_woomail[h3_font_family]";s:7:"georgia";s:25:"kt_woomail[h3_font_style]";s:6:"italic";s:26:"kt_woomail[h3_font_weight]";s:3:"400";s:20:"kt_woomail[h3_color]";s:7:"#999999";s:29:"kt_woomail[order_items_style]";s:5:"light";s:40:"kt_woomail[items_table_background_color]";s:0:"";s:31:"kt_woomail[items_table_padding]";s:2:"12";s:36:"kt_woomail[items_table_border_width]";s:1:"1";s:36:"kt_woomail[items_table_border_color]";s:7:"#e5e5e5";s:36:"kt_woomail[items_table_border_style]";s:6:"dashed";s:31:"kt_woomail[order_heading_style]";s:5:"split";s:38:"kt_woomail[addresses_background_color]";s:0:"";s:34:"kt_woomail[addresses_border_width]";s:1:"1";s:34:"kt_woomail[addresses_border_color]";s:7:"#e5e5e5";s:34:"kt_woomail[addresses_border_style]";s:6:"dashed";s:32:"kt_woomail[addresses_text_color]";s:7:"#8f8f8f";s:32:"kt_woomail[addresses_text_align]";s:6:"center";s:39:"kt_woomail[footer_background_placement]";s:7:"outside";s:35:"kt_woomail[footer_background_color]";s:7:"#333333";s:30:"kt_woomail[footer_top_padding]";s:2:"25";s:33:"kt_woomail[footer_bottom_padding]";s:2:"25";s:37:"kt_woomail[footer_left_right_padding]";s:2:"20";s:34:"kt_woomail[footer_social_repeater]";s:1115:"[{"icon_value":"kt-woomail-facebook","icon_color":"white","text":"undefined","link":"https://www.facebook.com","text2":"undefined","image_url":"","choice":"customizer_repeater_icon","title":"","subtitle":"undefined","id":"social-repeater-5afb186e6db1f","shortcode":"undefined"},{"icon_value":"kt-woomail-instagram","icon_color":"white","text":"undefined","link":"https://www.instagram.com","text2":"undefined","image_url":"","choice":"customizer_repeater_icon","title":"","subtitle":"undefined","id":"customizer-repeater-5afb18a75dfdc","shortcode":"undefined"},{"icon_value":"kt-woomail-twitter","icon_color":"white","text":"undefined","link":"https://www.twitter.com","text2":"undefined","image_url":"","choice":"customizer_repeater_icon","title":"","subtitle":"undefined","id":"customizer-repeater-5afb188d6d776","shortcode":"undefined"},{"icon_value":"kt-woomail-link","icon_color":"white","text":"undefined","link":"https://www.google.com","text2":"undefined","image_url":"","choice":"customizer_repeater_icon","title":"","subtitle":"undefined","id":"customizer-repeater-5afb18c76ca11","shortcode":"undefined"}]";s:37:"kt_woomail[footer_social_title_color]";s:7:"#000000";s:36:"kt_woomail[footer_social_title_size]";s:2:"18";s:43:"kt_woomail[footer_social_title_font_family]";s:9:"helvetica";s:43:"kt_woomail[footer_social_title_font_weight]";s:3:"400";s:37:"kt_woomail[footer_social_top_padding]";s:2:"15";s:40:"kt_woomail[footer_social_bottom_padding]";s:2:"30";s:38:"kt_woomail[footer_social_border_width]";s:1:"1";s:38:"kt_woomail[footer_social_border_color]";s:7:"#e5e5e5";s:38:"kt_woomail[footer_social_border_style]";s:6:"dashed";s:29:"kt_woomail[footer_text_align]";s:6:"center";s:28:"kt_woomail[footer_font_size]";s:2:"12";s:30:"kt_woomail[footer_font_family]";s:9:"helvetica";s:30:"kt_woomail[footer_font_weight]";s:3:"400";s:24:"kt_woomail[footer_color]";s:7:"#e5e5e5";s:37:"kt_woomail[footer_credit_top_padding]";s:2:"30";s:40:"kt_woomail[footer_credit_bottom_padding]";s:1:"0";s:22:"kt_woomail[custom_css]";s:0:"";s:25:"kt_woomail[import_export]";s:0:"";s:30:"woocommerce_email_header_image";s:93:"https://www.kadencethemes.com/wp-content/uploads/2018/05/kadence_woomail_example_logo-min.png";s:34:"woocommerce_email_background_color";s:7:"#ffffff";s:28:"woocommerce_email_text_color";s:7:"#515151";s:39:"woocommerce_email_body_background_color";s:7:"#ffffff";s:29:"woocommerce_email_footer_text";s:52:"Copyright © 2018 {site_title}, All rights reserved.";s:39:"woocommerce_new_order_settings[subject]";s:65:"[{site_title}] New customer order ({order_number}) - {order_date}";s:39:"woocommerce_new_order_settings[heading]";s:19:"New customer order!";s:45:"woocommerce_cancelled_order_settings[subject]";s:0:"";s:45:"woocommerce_cancelled_order_settings[heading]";s:31:"Order #{order_number} Cancelled";s:55:"woocommerce_customer_processing_order_settings[subject]";s:0:"";s:55:"woocommerce_customer_processing_order_settings[heading]";s:22:"Thanks for your order!";s:54:"woocommerce_customer_completed_order_settings[subject]";s:0:"";s:54:"woocommerce_customer_completed_order_settings[heading]";s:22:"Thanks for your order!";s:58:"woocommerce_customer_refunded_order_settings[subject_full]";s:0:"";s:61:"woocommerce_customer_refunded_order_settings[subject_partial]";s:0:"";s:58:"woocommerce_customer_refunded_order_settings[heading_full]";s:30:"Order #{order_number} refunded";s:61:"woocommerce_customer_refunded_order_settings[heading_partial]";s:29:"Order #{order_number} details";s:52:"woocommerce_customer_on_hold_order_settings[subject]";s:0:"";s:52:"woocommerce_customer_on_hold_order_settings[heading]";s:22:"Thanks for your order!";s:46:"woocommerce_customer_invoice_settings[subject]";s:0:"";s:51:"woocommerce_customer_invoice_settings[subject_paid]";s:0:"";s:46:"woocommerce_customer_invoice_settings[heading]";s:33:"Invoice for order #{order_number}";s:51:"woocommerce_customer_invoice_settings[heading_paid]";s:22:"Thanks for your order!";s:42:"woocommerce_failed_order_settings[subject]";s:44:"[{site_title}] Failed order ({order_number})";s:42:"woocommerce_failed_order_settings[heading]";s:28:"Order #{order_number} failed";s:50:"woocommerce_customer_new_account_settings[subject]";s:0:"";s:50:"woocommerce_customer_new_account_settings[heading]";s:0:"";s:43:"woocommerce_customer_note_settings[subject]";s:0:"";s:43:"woocommerce_customer_note_settings[heading]";s:41:"A note was added to order #{order_number}";s:53:"woocommerce_customer_reset_password_settings[subject]";s:0:"";s:53:"woocommerce_customer_reset_password_settings[heading]";s:27:"Password reset instructions";}}',
73
+ 'kt_flat' => 'a:2:{s:8:"template";s:24:"kadence-woomail-designer";s:7:"options";a:158:{s:30:"kt_woomail[new_order_subtitle]";s:24:"Hello from {site_title}!";s:26:"kt_woomail[new_order_body]";s:78:"You have received an order from {customer_full_name}. The order is as follows:";s:36:"kt_woomail[cancelled_order_subtitle]";s:24:"Hello from {site_title}!";s:32:"kt_woomail[cancelled_order_body]";s:96:"The order {order_number} from {customer_full_name} has been cancelled. The order was as follows:";s:46:"kt_woomail[customer_processing_order_subtitle]";s:24:"Hello from {site_title}!";s:42:"kt_woomail[customer_processing_order_body]";s:111:"Your order has been received and is now being processed. Your order details are shown below for your reference:";s:45:"kt_woomail[customer_completed_order_subtitle]";s:24:"Hello from {site_title}!";s:41:"kt_woomail[customer_completed_order_body]";s:118:"Hi there. Your recent order on {site_title} has been completed. Your order details are shown below for your reference:";s:44:"kt_woomail[customer_refunded_order_subtitle]";s:24:"Hello from {site_title}!";s:42:"kt_woomail[customer_refunded_order_switch]";b:1;s:45:"kt_woomail[customer_refunded_order_body_full]";s:55:"Hi there. Your order on {site_title} has been refunded.";s:48:"kt_woomail[customer_refunded_order_body_partial]";s:65:"Hi there. Your order on {site_title} has been partially refunded.";s:43:"kt_woomail[customer_on_hold_order_subtitle]";s:24:"Hello from {site_title}!";s:39:"kt_woomail[customer_on_hold_order_body]";s:120:"Your order is on-hold until we confirm payment has been received. Your order details are shown below for your reference:";s:37:"kt_woomail[customer_invoice_subtitle]";s:24:"Hello from {site_title}!";s:35:"kt_woomail[customer_invoice_switch]";b:0;s:38:"kt_woomail[customer_invoice_body_paid]";s:0:"";s:33:"kt_woomail[customer_invoice_body]";s:69:"An order has been created for you on {site_title}. {invoice_pay_link}";s:33:"kt_woomail[failed_order_subtitle]";s:24:"Hello from {site_title}!";s:29:"kt_woomail[failed_order_body]";s:96:"Payment for order {order_number} from {customer_full_name} has failed. The order was as follows:";s:41:"kt_woomail[customer_new_account_subtitle]";s:24:"Hello from {site_title}!";s:37:"kt_woomail[customer_new_account_body]";s:84:"Thanks for creating an account on {site_title}. Your username is {customer_username}";s:34:"kt_woomail[customer_note_subtitle]";s:24:"Hello from {site_title}!";s:30:"kt_woomail[customer_note_body]";s:48:"Hello, a note has just been added to your order:";s:44:"kt_woomail[customer_reset_password_subtitle]";s:24:"Hello from {site_title}!";s:40:"kt_woomail[customer_reset_password_body]";s:228:"Someone requested that the password be reset for the following account:
74
+
75
+ Username: {customer_username}
76
+
77
+ If this was a mistake, just ignore this email and nothing will happen.
78
+
79
+ To reset your password, visit the following address:";s:31:"kt_woomail[email_load_template]";s:7:"kt_full";s:22:"kt_woomail[email_type]";s:24:"customer_completed_order";s:27:"kt_woomail[email_text_info]";s:0:"";s:25:"kt_woomail[content_width]";s:3:"600";s:25:"kt_woomail[border_radius]";s:1:"0";s:24:"kt_woomail[border_width]";s:1:"0";s:24:"kt_woomail[border_color]";s:7:"#ffffff";s:18:"kt_woomail[shadow]";s:1:"0";s:25:"kt_woomail[email_padding]";s:1:"0";s:32:"kt_woomail[email_padding_bottom]";s:1:"0";s:30:"kt_woomail[header_image_align]";s:6:"center";s:33:"kt_woomail[header_image_maxwidth]";s:3:"160";s:41:"kt_woomail[header_image_background_color]";s:7:"#fff7f7";s:43:"kt_woomail[header_image_padding_top_bottom]";s:2:"25";s:35:"kt_woomail[header_background_color]";s:7:"#feee8c";s:29:"kt_woomail[header_text_align]";s:4:"left";s:30:"kt_woomail[header_padding_top]";s:2:"48";s:33:"kt_woomail[header_padding_bottom]";s:2:"48";s:37:"kt_woomail[header_padding_left_right]";s:2:"48";s:29:"kt_woomail[heading_font_size]";s:2:"32";s:31:"kt_woomail[heading_line_height]";s:2:"40";s:31:"kt_woomail[heading_font_family]";s:9:"helvetica";s:30:"kt_woomail[heading_font_style]";s:6:"normal";s:31:"kt_woomail[heading_font_weight]";s:3:"600";s:25:"kt_woomail[heading_color]";s:7:"#000000";s:31:"kt_woomail[subtitle_fontt_info]";s:0:"";s:30:"kt_woomail[subtitle_placement]";s:5:"above";s:30:"kt_woomail[subtitle_font_size]";s:2:"20";s:32:"kt_woomail[subtitle_line_height]";s:2:"34";s:32:"kt_woomail[subtitle_font_family]";s:7:"georgia";s:31:"kt_woomail[subtitle_font_style]";s:6:"italic";s:32:"kt_woomail[subtitle_font_weight]";s:3:"400";s:26:"kt_woomail[subtitle_color]";s:7:"#000000";s:31:"kt_woomail[content_padding_top]";s:1:"0";s:34:"kt_woomail[content_padding_bottom]";s:2:"10";s:27:"kt_woomail[content_padding]";s:2:"48";s:21:"kt_woomail[font_size]";s:2:"14";s:23:"kt_woomail[line_height]";s:2:"24";s:23:"kt_woomail[font_family]";s:9:"helvetica";s:23:"kt_woomail[font_weight]";s:3:"400";s:22:"kt_woomail[link_color]";s:7:"#fe4365";s:24:"kt_woomail[h2_font_size]";s:2:"24";s:26:"kt_woomail[h2_line_height]";s:2:"25";s:26:"kt_woomail[h2_padding_top]";s:1:"0";s:29:"kt_woomail[h2_padding_bottom]";s:1:"0";s:25:"kt_woomail[h2_margin_top]";s:2:"15";s:28:"kt_woomail[h2_margin_bottom]";s:2:"33";s:26:"kt_woomail[h2_font_family]";s:9:"helvetica";s:25:"kt_woomail[h2_font_style]";s:6:"normal";s:26:"kt_woomail[h2_font_weight]";s:3:"700";s:29:"kt_woomail[h2_text_transform]";s:4:"none";s:20:"kt_woomail[h2_color]";s:7:"#000000";s:25:"kt_woomail[h2_text_align]";s:4:"left";s:20:"kt_woomail[h2_style]";s:5:"below";s:31:"kt_woomail[h2_separator_height]";s:1:"2";s:30:"kt_woomail[h2_separator_style]";s:5:"solid";s:30:"kt_woomail[h2_separator_color]";s:7:"#000000";s:24:"kt_woomail[h3_font_info]";s:0:"";s:24:"kt_woomail[h3_font_size]";s:2:"16";s:26:"kt_woomail[h3_line_height]";s:2:"30";s:26:"kt_woomail[h3_font_family]";s:7:"georgia";s:25:"kt_woomail[h3_font_style]";s:6:"italic";s:26:"kt_woomail[h3_font_weight]";s:3:"400";s:20:"kt_woomail[h3_color]";s:7:"#000000";s:29:"kt_woomail[order_items_style]";s:6:"normal";s:40:"kt_woomail[items_table_background_color]";s:0:"";s:31:"kt_woomail[items_table_padding]";s:1:"8";s:36:"kt_woomail[items_table_border_width]";s:1:"1";s:36:"kt_woomail[items_table_border_color]";s:7:"#000000";s:36:"kt_woomail[items_table_border_style]";s:5:"solid";s:31:"kt_woomail[order_heading_style]";s:6:"normal";s:38:"kt_woomail[addresses_background_color]";s:0:"";s:34:"kt_woomail[addresses_border_width]";s:1:"2";s:34:"kt_woomail[addresses_border_color]";s:7:"#000000";s:34:"kt_woomail[addresses_border_style]";s:5:"solid";s:32:"kt_woomail[addresses_text_color]";s:7:"#000000";s:32:"kt_woomail[addresses_text_align]";s:4:"left";s:39:"kt_woomail[footer_background_placement]";s:6:"inside";s:35:"kt_woomail[footer_background_color]";s:7:"#000000";s:30:"kt_woomail[footer_top_padding]";s:2:"25";s:33:"kt_woomail[footer_bottom_padding]";s:2:"25";s:37:"kt_woomail[footer_left_right_padding]";s:2:"48";s:34:"kt_woomail[footer_social_repeater]";s:1115:"[{"icon_value":"kt-woomail-facebook","icon_color":"white","text":"undefined","link":"https://www.facebook.com","text2":"undefined","image_url":"","choice":"customizer_repeater_icon","title":"","subtitle":"undefined","id":"social-repeater-5afb186e6db1f","shortcode":"undefined"},{"icon_value":"kt-woomail-instagram","icon_color":"white","text":"undefined","link":"https://www.instagram.com","text2":"undefined","image_url":"","choice":"customizer_repeater_icon","title":"","subtitle":"undefined","id":"customizer-repeater-5afb18a75dfdc","shortcode":"undefined"},{"icon_value":"kt-woomail-twitter","icon_color":"white","text":"undefined","link":"https://www.twitter.com","text2":"undefined","image_url":"","choice":"customizer_repeater_icon","title":"","subtitle":"undefined","id":"customizer-repeater-5afb188d6d776","shortcode":"undefined"},{"icon_value":"kt-woomail-link","icon_color":"white","text":"undefined","link":"https://www.google.com","text2":"undefined","image_url":"","choice":"customizer_repeater_icon","title":"","subtitle":"undefined","id":"customizer-repeater-5afb18c76ca11","shortcode":"undefined"}]";s:37:"kt_woomail[footer_social_title_color]";s:7:"#000000";s:36:"kt_woomail[footer_social_title_size]";s:2:"18";s:43:"kt_woomail[footer_social_title_font_family]";s:9:"helvetica";s:43:"kt_woomail[footer_social_title_font_weight]";s:3:"400";s:37:"kt_woomail[footer_social_top_padding]";s:2:"15";s:40:"kt_woomail[footer_social_bottom_padding]";s:2:"30";s:38:"kt_woomail[footer_social_border_width]";s:1:"1";s:38:"kt_woomail[footer_social_border_color]";s:7:"#cccccc";s:38:"kt_woomail[footer_social_border_style]";s:5:"solid";s:29:"kt_woomail[footer_text_align]";s:6:"center";s:28:"kt_woomail[footer_font_size]";s:2:"12";s:30:"kt_woomail[footer_font_family]";s:9:"helvetica";s:30:"kt_woomail[footer_font_weight]";s:3:"400";s:24:"kt_woomail[footer_color]";s:7:"#f7f7f7";s:37:"kt_woomail[footer_credit_top_padding]";s:2:"30";s:40:"kt_woomail[footer_credit_bottom_padding]";s:1:"0";s:22:"kt_woomail[custom_css]";s:0:"";s:25:"kt_woomail[import_export]";s:0:"";s:30:"woocommerce_email_header_image";s:99:"https://www.kadencethemes.com/wp-content/uploads/2018/05/kadence_woomail_example_logo_black-min.png";s:34:"woocommerce_email_background_color";s:7:"#fff7f7";s:28:"woocommerce_email_text_color";s:7:"#000000";s:39:"woocommerce_email_body_background_color";s:7:"#feee8c";s:29:"woocommerce_email_footer_text";s:52:"Copyright © 2018 {site_title}, All rights reserved.";s:39:"woocommerce_new_order_settings[subject]";s:65:"[{site_title}] New customer order ({order_number}) - {order_date}";s:39:"woocommerce_new_order_settings[heading]";s:19:"New customer order!";s:45:"woocommerce_cancelled_order_settings[subject]";s:0:"";s:45:"woocommerce_cancelled_order_settings[heading]";s:31:"Order #{order_number} Cancelled";s:55:"woocommerce_customer_processing_order_settings[subject]";s:0:"";s:55:"woocommerce_customer_processing_order_settings[heading]";s:22:"Thanks for your order!";s:54:"woocommerce_customer_completed_order_settings[subject]";s:0:"";s:54:"woocommerce_customer_completed_order_settings[heading]";s:22:"Thanks for your order!";s:58:"woocommerce_customer_refunded_order_settings[subject_full]";s:0:"";s:61:"woocommerce_customer_refunded_order_settings[subject_partial]";s:0:"";s:58:"woocommerce_customer_refunded_order_settings[heading_full]";s:30:"Order #{order_number} refunded";s:61:"woocommerce_customer_refunded_order_settings[heading_partial]";s:29:"Order #{order_number} details";s:52:"woocommerce_customer_on_hold_order_settings[subject]";s:0:"";s:52:"woocommerce_customer_on_hold_order_settings[heading]";s:22:"Thanks for your order!";s:46:"woocommerce_customer_invoice_settings[subject]";s:0:"";s:51:"woocommerce_customer_invoice_settings[subject_paid]";s:0:"";s:46:"woocommerce_customer_invoice_settings[heading]";s:33:"Invoice for order #{order_number}";s:51:"woocommerce_customer_invoice_settings[heading_paid]";s:22:"Thanks for your order!";s:42:"woocommerce_failed_order_settings[subject]";s:44:"[{site_title}] Failed order ({order_number})";s:42:"woocommerce_failed_order_settings[heading]";s:28:"Order #{order_number} failed";s:50:"woocommerce_customer_new_account_settings[subject]";s:0:"";s:50:"woocommerce_customer_new_account_settings[heading]";s:0:"";s:43:"woocommerce_customer_note_settings[subject]";s:0:"";s:43:"woocommerce_customer_note_settings[heading]";s:41:"A note was added to order #{order_number}";s:53:"woocommerce_customer_reset_password_settings[subject]";s:0:"";s:53:"woocommerce_customer_reset_password_settings[heading]";s:27:"Password reset instructions";}}',
80
+ );
81
+ /**
82
+ * Instance Control
83
+ */
84
+ public static function get_instance() {
85
+ if ( is_null( self::$instance ) ) {
86
+ self::$instance = new self();
87
+ }
88
+ return self::$instance;
89
+ }
90
+ /**
91
+ * Class constructor
92
+ *
93
+ * @access public
94
+ * @return void
95
+ */
96
+ public function __construct() {
97
+
98
+ // Only proceed if this is own request
99
+ if ( ! Kadence_Woomail_Designer::is_own_customizer_request() && ! Kadence_Woomail_Designer::is_own_preview_request() ) {
100
+ return;
101
+ }
102
+
103
+ add_action( 'customize_register', array( $this, 'import_export_requests' ), 999999 );
104
+ add_action( 'customize_controls_print_scripts', array( $this, 'controls_print_scripts' ) );
105
+
106
+ }
107
+
108
+ /**
109
+ * Check to see if we need to do an export or import.
110
+ * @param object $wp_customize An instance of WP_Customize_Manager.
111
+ * @return void
112
+ */
113
+ static public function import_export_requests( $wp_customize ) {
114
+ // Check if user is allowed to change values
115
+ if ( ! Kadence_Woomail_Designer::is_admin()) {
116
+ exit;
117
+ }
118
+
119
+ if ( isset( $_REQUEST['kt-woomail-export'] ) ) {
120
+ self::export_woomail( $wp_customize );
121
+ }
122
+ if ( isset( $_REQUEST['kt-woomail-import'] ) && isset( $_FILES['kadence-woomail-import-file'] ) ) {
123
+ self::import_woomail( $wp_customize );
124
+ }
125
+
126
+ if ( isset( $_REQUEST['kt-woomail-import-template'] ) ) {
127
+ self::import_woomail_template( $wp_customize );
128
+ }
129
+
130
+
131
+ }
132
+
133
+ /**
134
+ * Export woomail settings.
135
+ *
136
+ * @access private
137
+ * @param object $wp_customize An instance of WP_Customize_Manager.
138
+ * @return void
139
+ */
140
+ static private function export_woomail( $wp_customize ) {
141
+ if ( ! wp_verify_nonce( $_REQUEST['kt-woomail-export'], 'kt-woomail-exporting' ) ) {
142
+ return;
143
+ }
144
+
145
+ $template = 'kadence-woomail-designer';
146
+ $charset = get_option( 'blog_charset' );
147
+ $data = array(
148
+ 'template' => $template,
149
+ 'options' => array()
150
+ );
151
+
152
+ // Get options from the Customizer API.
153
+ $settings = $wp_customize->settings();
154
+
155
+ foreach ( $settings as $key => $setting ) {
156
+ if ( stristr( $key, 'kt_woomail' ) || in_array( $key, self::$woo_core_options ) ) {
157
+ // to prevent issues we don't want to export the order id.
158
+ if( $key != 'kt_woomail[preview_order_id]' ) {
159
+ $data['options'][ $key ] = $setting->value();
160
+ }
161
+ }
162
+ }
163
+
164
+
165
+ // Set the download headers.
166
+ header( 'Content-disposition: attachment; filename=kadence-woomail-designer-export.dat' );
167
+ header( 'Content-Type: application/octet-stream; charset=' . $charset );
168
+
169
+ // Serialize the export data.
170
+ echo serialize( $data );
171
+
172
+ // Start the download.
173
+ die();
174
+ }
175
+ /**
176
+ * Imports uploaded kadence woo email settings
177
+ *
178
+ * @access private
179
+ * @param object $wp_customize An instance of WP_Customize_Manager.
180
+ * @return void
181
+ */
182
+ static private function import_woomail( $wp_customize ) {
183
+ // Make sure we have a valid nonce.
184
+ if ( ! wp_verify_nonce( $_REQUEST['kt-woomail-import'], 'kt-woomail-importing' ) ) {
185
+ return;
186
+ }
187
+ // Make sure WordPress upload support is loaded.
188
+ if ( ! function_exists( 'wp_handle_upload' ) ) {
189
+ require_once( ABSPATH . 'wp-admin/includes/file.php' );
190
+ }
191
+
192
+ // Load the export/import option class.
193
+ require_once KT_WOOMAIL_PATH . 'includes/class-kadence-woomail-import-option.php';
194
+
195
+ // Setup global vars.
196
+ global $wp_customize;
197
+ global $kt_woomail_import_error;
198
+
199
+ // Setup internal vars.
200
+ $kt_woomail_import_error = false;
201
+ $template = 'kadence-woomail-designer';
202
+ $overrides = array( 'test_form' => false, 'test_type' => false, 'mimes' => array('dat' => 'text/plain') );
203
+ $file = wp_handle_upload( $_FILES['kadence-woomail-import-file'], $overrides );
204
+
205
+ // Make sure we have an uploaded file.
206
+ if ( isset( $file['error'] ) ) {
207
+ $kt_woomail_import_error = $file['error'];
208
+ return;
209
+ }
210
+ if ( ! file_exists( $file['file'] ) ) {
211
+ $kt_woomail_import_error = __( 'Error importing settings! Please try again.', 'kadence-woocommerce-email-designer' );
212
+ return;
213
+ }
214
+
215
+ // Get the upload data.
216
+ $raw = file_get_contents( $file['file'] );
217
+ $data = @unserialize( $raw );
218
+
219
+ // Remove the uploaded file.
220
+ unlink( $file['file'] );
221
+
222
+ // Data checks.
223
+ if ( 'array' != gettype( $data ) ) {
224
+ $kt_woomail_import_error = __( 'Error importing settings! Please check that you uploaded a customizer export file.', 'kadence-woocommerce-email-designer' );
225
+ return;
226
+ }
227
+ if ( ! isset( $data['template'] ) ) {
228
+ $kt_woomail_import_error = __( 'Error importing settings! Please check that you uploaded a customizer export file.', 'kadence-woocommerce-email-designer' );
229
+ return;
230
+ }
231
+ if ( $data['template'] != $template ) {
232
+ $kt_woomail_import_error = __( 'Error importing settings! The settings you uploaded are not for the Kadence Woomail Designer.', 'kadence-woocommerce-email-designer' );
233
+ return;
234
+ }
235
+
236
+ // Import custom options.
237
+ if ( isset( $data['options'] ) ) {
238
+
239
+ foreach ( $data['options'] as $option_key => $option_value ) {
240
+
241
+ $option = new Kadence_Woomail_Import_Option( $wp_customize, $option_key, array(
242
+ 'default' => '',
243
+ 'type' => 'option',
244
+ 'capability' => Kadence_Woomail_Designer::get_admin_capability(),
245
+ ) );
246
+
247
+ $option->import( $option_value );
248
+ }
249
+ }
250
+
251
+
252
+ // Call the customize_save action.
253
+ do_action( 'customize_save', $wp_customize );
254
+
255
+ // Call the customize_save_after action.
256
+ do_action( 'customize_save_after', $wp_customize );
257
+
258
+ wp_redirect( Kadence_Woomail_Customizer::get_customizer_url() );
259
+
260
+ exit;
261
+ }
262
+
263
+ /**
264
+ * Imports prebuilt kadence woo email settings
265
+ *
266
+ * @access private
267
+ * @param object $wp_customize An instance of WP_Customize_Manager.
268
+ * @return void
269
+ */
270
+ static private function import_woomail_template( $wp_customize ) {
271
+ // Make sure we have a valid nonce.
272
+ if ( ! wp_verify_nonce( $_REQUEST['kt-woomail-import-template'], 'kt-woomail-importing-template' ) ) {
273
+ return;
274
+ }
275
+ // Load the export/import option class.
276
+ require_once KT_WOOMAIL_PATH . 'includes/class-kadence-woomail-import-option.php';
277
+
278
+ // Setup global vars.
279
+ global $wp_customize;
280
+ global $kt_woomail_import_error;
281
+
282
+ // Setup internal vars.
283
+ $kt_woomail_import_error = false;
284
+ $template = 'kadence-woomail-designer';
285
+ $prebuilt = $_REQUEST['kt-woomail-prebuilt-template'];
286
+ $raw_data = self::prebuilt( $prebuilt );
287
+
288
+ $data = @unserialize( $raw_data );
289
+
290
+
291
+ // Data checks.
292
+ if ( 'array' != gettype( $data ) ) {
293
+ $kt_woomail_import_error = __( 'Error importing settings! The template you selected is not found.', 'kadence-woocommerce-email-designer' );
294
+ return;
295
+ }
296
+ if ( ! isset( $data['template'] ) ) {
297
+ $kt_woomail_import_error = __( 'Error importing settings! The template you selected is not valid.', 'kadence-woocommerce-email-designer' );
298
+ return;
299
+ }
300
+ if ( $data['template'] != $template ) {
301
+ $kt_woomail_import_error = __( 'Error importing settings! The template you selected is not valid.', 'kadence-woocommerce-email-designer' );
302
+ return;
303
+ }
304
+
305
+
306
+ // Import custom options.
307
+ if ( isset( $data['options'] ) ) {
308
+
309
+ foreach ( $data['options'] as $option_key => $option_value ) {
310
+
311
+ $option = new Kadence_Woomail_Import_Option( $wp_customize, $option_key, array(
312
+ 'default' => '',
313
+ 'type' => 'option',
314
+ 'capability' => Kadence_Woomail_Designer::get_admin_capability(),
315
+ ) );
316
+
317
+ $option->import( $option_value );
318
+ }
319
+ }
320
+
321
+
322
+ // Call the customize_save action.
323
+ do_action( 'customize_save', $wp_customize );
324
+
325
+ // Call the customize_save_after action.
326
+ //do_action( 'customize_save_after', $wp_customize );
327
+
328
+ wp_redirect( Kadence_Woomail_Customizer::get_customizer_url() );
329
+
330
+ exit;
331
+ }
332
+ /**
333
+ * Prints error scripts for the control.
334
+ *
335
+ * @since 0.1
336
+ * @return void
337
+ */
338
+ static public function controls_print_scripts() {
339
+ global $kt_woomail_import_error;
340
+
341
+ if ( $kt_woomail_import_error ) {
342
+ echo '<script> alert("' . $kt_woomail_import_error . '"); </script>';
343
+ }
344
+ }
345
+ /**
346
+ * Get value for prebuilt
347
+ *
348
+ * @access public
349
+ * @param string $key
350
+ * @return string
351
+ */
352
+ public static function prebuilt( $key ) {
353
+ if ( isset( self::$prebuilt_options[$key] ) ) {
354
+ $data = self::$prebuilt_options[$key];
355
+ } else {
356
+ $data = null;
357
+ }
358
+
359
+ // Allow developers to override with there templates
360
+ return apply_filters( 'kadence_woomail_template_data', $data, $key );
361
+ }
362
+ }
363
+ Kadence_Woomail_Import_Export::get_instance();
364
+ }
includes/class-kadence-woomail-import-option.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly
3
+ if ( ! defined('ABSPATH') ) {
4
+ exit;
5
+ }
6
+ /**
7
+ * A class that extends WP_Customize_Setting so we can access
8
+ * the protected updated method when importing options.
9
+ *
10
+ * @since 0.3
11
+ */
12
+ class Kadence_Woomail_Import_Option extends WP_Customize_Setting {
13
+
14
+ /**
15
+ * Import an option value for this setting.
16
+ *
17
+ * @since 0.3
18
+ * @param mixed $value The option value.
19
+ * @return void
20
+ */
21
+ public function import( $value ) {
22
+ $this->update( $value );
23
+ }
24
+ }
includes/class-kadence-woomail-preview.php ADDED
@@ -0,0 +1,604 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if (!defined('ABSPATH')) {
5
+ exit;
6
+ }
7
+
8
+ /**
9
+ * Customizer Setup
10
+ * Heavily borrowed from rightpress Decorator
11
+ */
12
+ if ( ! class_exists( 'Kadence_Woomail_Preview' ) ) {
13
+
14
+ class Kadence_Woomail_Preview {
15
+ // WooCommerce email classes
16
+ public static $current_order = null;
17
+ public static $current_recipients = null;
18
+ public static $email_types_class_names = array(
19
+ 'new_order' => 'WC_Email_New_Order',
20
+ 'cancelled_order' => 'WC_Email_Cancelled_Order',
21
+ 'customer_processing_order' => 'WC_Email_Customer_Processing_Order',
22
+ 'customer_completed_order' => 'WC_Email_Customer_Completed_Order',
23
+ 'customer_refunded_order' => 'WC_Email_Customer_Refunded_Order',
24
+ 'customer_on_hold_order' => 'WC_Email_Customer_On_Hold_Order',
25
+ 'customer_invoice' => 'WC_Email_Customer_Invoice',
26
+ 'failed_order' => 'WC_Email_Failed_Order',
27
+ 'customer_new_account' => 'WC_Email_Customer_New_Account',
28
+ 'customer_note' => 'WC_Email_Customer_Note',
29
+ 'customer_reset_password' => 'WC_Email_Customer_Reset_Password',
30
+ // WooCommerce Subscriptions Plugin
31
+ 'new_renewal_order' => 'WCS_Email_New_Renewal_Order',
32
+ 'customer_processing_renewal_order' => 'WCS_Email_Processing_Renewal_Order',
33
+ 'customer_completed_renewal_order' => 'WCS_Email_Completed_Renewal_Order',
34
+ 'customer_completed_switch_order' => 'WCS_Email_Completed_Switch_Order',
35
+ 'customer_renewal_invoice' => 'WCS_Email_Customer_Renewal_Invoice',
36
+ 'customer_payment_retry' => 'WCS_Email_Customer_Payment_Retry',
37
+ 'cancelled_subscription' => 'WCS_Email_Cancelled_Subscription',
38
+ );
39
+ public static $email_types_order_status = array(
40
+ 'new_order' => 'processing',
41
+ 'cancelled_order' => 'cancelled',
42
+ 'customer_processing_order' => 'processing',
43
+ 'customer_completed_order' => 'completed',
44
+ 'customer_refunded_order' => 'refunded',
45
+ 'customer_on_hold_order' => 'on-hold',
46
+ 'customer_invoice' => 'processing',
47
+ 'failed_order' => 'failed',
48
+ 'customer_new_account' => null,
49
+ 'customer_note' => 'processing',
50
+ 'customer_reset_password' => null,
51
+ // WooCommerce Subscriptions Plugin
52
+ 'new_renewal_order' => 'processing',
53
+ 'customer_processing_renewal_order' => 'processing',
54
+ 'customer_completed_renewal_order' => 'completed',
55
+ 'customer_completed_switch_order' => 'completed',
56
+ 'customer_renewal_invoice' => 'failed',
57
+ 'customer_payment_retry' => 'on-hold',
58
+ 'cancelled_subscription' => 'cancelled',
59
+ );
60
+ /**
61
+ * @var null
62
+ */
63
+ private static $instance = null;
64
+
65
+ /**
66
+ * Instance Control
67
+ */
68
+ public static function get_instance() {
69
+ if ( is_null( self::$instance ) ) {
70
+ self::$instance = new self();
71
+ }
72
+ return self::$instance;
73
+ }
74
+
75
+ /**
76
+ * Class constructor
77
+ *
78
+ * @access public
79
+ * @return void
80
+ */
81
+ public function __construct() {
82
+ // Set up preview
83
+ add_action( 'parse_request', array( $this, 'set_up_preview' ) );
84
+ }
85
+
86
+ /**
87
+ * Set up preview
88
+ *
89
+ * @access public
90
+ * @return void
91
+ */
92
+ public function set_up_preview() {
93
+ // Make sure this is own preview request
94
+ if ( ! Kadence_Woomail_Designer::is_own_preview_request() ) {
95
+ return;
96
+ }
97
+ // Load main view
98
+ include KT_WOOMAIL_PATH . 'preview.php';
99
+
100
+ // Do not load any further elements
101
+ exit;
102
+ }
103
+
104
+ /**
105
+ * Get the email order status
106
+ *
107
+ */
108
+ public static function get_email_order_status( $email_template ) {
109
+ $order_status = apply_filters( 'kadence_woomail_email_type_order_status_array', Kadence_Woomail_Preview::$email_types_order_status );
110
+ if ( isset( $order_status[$email_template] ) ) {
111
+ return $order_status[$email_template];
112
+ } else {
113
+ return false;
114
+ }
115
+ }
116
+ /**
117
+ * Get the email class name
118
+ *
119
+ */
120
+ public static function get_email_class_name( $email_template ) {
121
+ $class_names = apply_filters( 'kadence_woomail_email_type_class_name_array', Kadence_Woomail_Preview::$email_types_class_names );
122
+ if ( isset( $class_names[$email_template] ) ) {
123
+ return $class_names[$email_template];
124
+ } else {
125
+ return 'processing';
126
+ }
127
+ }
128
+ /**
129
+ * Get the email content
130
+ *
131
+ */
132
+ public static function get_preview_email( $send_email = false, $email_addresses = null ) {
133
+ // Load WooCommerce emails
134
+ $wc_emails = WC_Emails::instance();
135
+ $emails = $wc_emails->get_emails();
136
+ $email_template = Kadence_Woomail_Customizer::opt('email_type');
137
+ $preview_id = Kadence_Woomail_Customizer::opt('preview_order_id');
138
+ $email_type = Kadence_Woomail_Preview::get_email_class_name( $email_template );
139
+ if ( false === $email_type ) {
140
+ return false;
141
+ }
142
+ $order_status = Kadence_Woomail_Preview::get_email_order_status( $email_template );
143
+
144
+
145
+ //$order_status = Kadence_Woomail_Preview::$email_types_order_status[$email_template];
146
+
147
+ if ('customer_invoice' == $email_template ) {
148
+ $invoice_paid = Kadence_Woomail_Customizer::opt('customer_invoice_switch');
149
+ if ( ! $invoice_paid ){
150
+ $order_status = 'pending';
151
+ }
152
+ }
153
+ if ('customer_refunded_order' == $email_template ) {
154
+ $partial_preview = Kadence_Woomail_Customizer::opt('customer_refunded_order_switch');
155
+ if ( ! $partial_preview ){
156
+ $partial_status = true;
157
+ } else {
158
+ $partial_status = false;
159
+ }
160
+ }
161
+ // Reference email
162
+ if ( isset( $emails[ $email_type ] ) && is_object( $emails[ $email_type ] ) ) {
163
+ $email = $emails[ $email_type ];
164
+ };
165
+
166
+ // Get an order
167
+ $order = Kadence_Woomail_Preview::get_wc_order_for_preview( $order_status, $preview_id );
168
+ self::$current_order = $order;
169
+
170
+ // Get user ID from order, if guest get current user ID.
171
+ if ( 0 === ( $user_id = (int) get_post_meta( $order->get_id(), '_customer_user', TRUE ) ) ) {
172
+ $user_id = get_current_user_id();
173
+ }
174
+ // Get user object
175
+ $user = get_user_by( 'id', $user_id );
176
+
177
+ if( isset( $email ) ) {
178
+ // Make sure gateways are running in case the email needs to input content from them.
179
+ WC()->payment_gateways();
180
+ // Make sure shipping is running in case the email needs to input content from it.
181
+ WC()->shipping();
182
+
183
+ switch ( $email_template ) {
184
+
185
+ /**
186
+ * WooCommerce (default transactional mails).
187
+ */
188
+
189
+ case 'new_order':
190
+ case 'cancelled_order':
191
+ case 'customer_processing_order':
192
+ case 'customer_completed_order':
193
+ case 'customer_on_hold_order':
194
+ case 'customer_invoice':
195
+ case 'failed_order':
196
+
197
+ $email->object = $order;
198
+ $email->find['order-date'] = '{order_date}';
199
+ $email->find['order-number'] = '{order_number}';
200
+ $email->replace['order-date'] = wc_format_datetime( $email->object->get_date_created() );
201
+ $email->replace['order-number'] = $email->object->get_order_number();
202
+ // Other properties
203
+ $email->recipient = $email->object->get_billing_email();
204
+ break;
205
+
206
+ case 'customer_refunded_order':
207
+
208
+ $email->object = $order;
209
+ $email->partial_refund = $partial_status;
210
+ $email->find['order-date'] = '{order_date}';
211
+ $email->find['order-number'] = '{order_number}';
212
+ $email->replace['order-date'] = wc_format_datetime( $email->object->get_date_created() );
213
+ $email->replace['order-number'] = $email->object->get_order_number();
214
+ // Other properties
215
+ $email->recipient = $email->object->get_billing_email();
216
+ break;
217
+
218
+ case 'customer_new_account':
219
+
220
+ $email->object = $user;
221
+ $email->user_pass = '{user_pass}';
222
+ $email->user_login = stripslashes( $email->object->user_login );
223
+ $email->user_email = stripslashes( $email->object->user_email );
224
+ $email->recipient = $email->user_email;
225
+ $email->password_generated = TRUE;
226
+ break;
227
+
228
+ case 'customer_note':
229
+
230
+ $email->object = $order;
231
+ $email->customer_note = __('Hello! This is an example note', 'kadence-woocommerce-email-designer');
232
+ $email->find['order-date'] = '{order_date}';
233
+ $email->find['order-number'] = '{order_number}';
234
+ $email->replace['order-date'] = wc_format_datetime( $email->object->get_date_created() );
235
+ $email->replace['order-number'] = $email->object->get_order_number();
236
+ // Other properties
237
+ $email->recipient = $email->object->get_billing_email();
238
+ break;
239
+
240
+ case 'customer_reset_password':
241
+
242
+ $email->object = $user;
243
+ $email->user_id = $user_id;
244
+ $email->user_login = $user->user_login;
245
+ $email->user_email = stripslashes( $email->object->user_email );
246
+ $email->reset_key = '{{reset-key}}';
247
+ $email->recipient = stripslashes( $email->object->user_email );
248
+ break;
249
+
250
+
251
+ /**
252
+ * WooCommerce Subscriptions Plugin (from WooCommerce).
253
+ */
254
+
255
+ case 'new_renewal_order':
256
+ case 'new_switch_order':
257
+ case 'customer_processing_renewal_order':
258
+ case 'customer_completed_renewal_order':
259
+ case 'customer_completed_switch_order':
260
+ case 'customer_renewal_invoice':
261
+
262
+ $email->object = $order;
263
+ $email->find['order-date'] = '{order_date}';
264
+ $email->find['order-number'] = '{order_number}';
265
+ $email->replace['order-date'] = wc_format_datetime( $email->object->get_date_created() );
266
+ $email->replace['order-number'] = $email->object->get_order_number();
267
+ // Other properties
268
+ $email->recipient = $email->object->get_billing_email();
269
+
270
+ break;
271
+
272
+ case 'cancelled_subscription':
273
+
274
+
275
+ $email->object = false;
276
+ break;
277
+
278
+ /**
279
+ * Everything else.
280
+ */
281
+
282
+ default:
283
+
284
+ $email->object = $order;
285
+ // Allow unnamed emails preview to be filtered by plugin
286
+ $email = apply_filters('kadence_woomail_preview_email_object', $email );
287
+ break;
288
+ }
289
+
290
+ if ( true === $send_email && ! empty( $email_addresses ) ) {
291
+
292
+ self::$current_recipients = $email_addresses;
293
+
294
+ add_filter( 'woocommerce_email_recipient_' . $email->id, array('Kadence_Woomail_Preview', 'change_recipient'), 99 );
295
+
296
+ if ( $email->get_recipient() ) {
297
+ $content = $email->send( $email->get_recipient(), $email->get_subject(), $email->get_content(), $email->get_headers(), $email->get_attachments() );
298
+ }
299
+
300
+ remove_filter( 'woocommerce_email_recipient_' . $email->id, array('Kadence_Woomail_Preview', 'change_recipient'), 99 );
301
+
302
+ } else {
303
+ if ( false == $email->object) {
304
+ $content = '<div style="padding: 35px 40px; background-color: white;">'.__('This email type can not be previewed because it links with a subscription. We are working on it.', 'kadence-woocommerce-email-designer').'</div>';
305
+ } else {
306
+
307
+ // Get email content and apply styles
308
+ $content = $email->get_content();
309
+ $content = $email->style_inline( $content );
310
+ $content = apply_filters( 'woocommerce_mail_content', $content );
311
+
312
+ if ( 'plain' === $email->email_type ) {
313
+ $content = '<div style="padding: 35px 40px; background-color: white;">' . str_replace( "\n", '<br/>', $content ) . '</div>';
314
+ }
315
+ }
316
+ }
317
+
318
+ } else {
319
+ $content = false;
320
+ }
321
+
322
+ return $content;
323
+ }
324
+
325
+ /**
326
+ * Change Recipient to a custom one.
327
+ *
328
+ * @access public
329
+ * @return string
330
+ */
331
+ public static function change_recipient( $recipient ) {
332
+
333
+ if ( ! empty( self::$current_recipients ) ) {
334
+ $recipient = self::$current_recipients;
335
+ } else {
336
+ // Don't send if not set
337
+ $recipient = '';
338
+ }
339
+ return $recipient;
340
+ }
341
+ /**
342
+ * Print preview email
343
+ *
344
+ * @access public
345
+ * @return void
346
+ */
347
+ public static function print_preview_email() {
348
+
349
+ $content = Kadence_Woomail_Preview::get_preview_email();
350
+ if (false == $content ) {
351
+ echo __( 'An error occurred trying to load this email type. Make sure this email type is enabled or please try another type.', 'kadence-woocommerce-email-designer');
352
+ } else if( ! empty( $content ) ) {
353
+ // Print email content
354
+ echo $content;
355
+ // Print live preview scripts in footer
356
+ add_action('wp_footer', array('Kadence_Woomail_Preview', 'print_live_preview_scripts'), 99);
357
+ }
358
+ }
359
+
360
+ /**
361
+ * send preview email
362
+ *
363
+ * @access public
364
+ * @return void
365
+ */
366
+ public static function send_preview_email() {
367
+
368
+ $content = Kadence_Woomail_Preview::get_preview_email();
369
+ if( ! empty( $content ) ) {
370
+ // Print email content
371
+ echo $content;
372
+ }
373
+ }
374
+
375
+ /**
376
+ * Get WooCommerce order for preview
377
+ *
378
+ * @access public
379
+ * @param string $order_status
380
+ * @return object
381
+ */
382
+ public static function get_wc_order_for_preview( $order_status = null, $order_id = null ) {
383
+ if( ! empty( $order_id ) && 'mockup' != $order_id ) {
384
+ return wc_get_order( $order_id );
385
+ } else {
386
+ // Use mockup order (WC 2.7+)
387
+
388
+ // Instantiate order object
389
+ $order = new WC_Order();
390
+
391
+ // Other order properties
392
+ $order->set_props(array(
393
+ 'id' => 1,
394
+ 'status' => ($order_status === null ? 'processing' : $order_status),
395
+ 'billing_first_name' => 'Sherlock',
396
+ 'billing_last_name' => 'Holmes',
397
+ 'billing_company' => 'Detectives Ltd.',
398
+ 'billing_address_1' => '221B Baker Street',
399
+ 'billing_city' => 'London',
400
+ 'billing_postcode' => 'NW1 6XE',
401
+ 'billing_country' => 'GB',
402
+ 'billing_email' => 'sherlock@holmes.co.uk',
403
+ 'billing_phone' => '02079304832',
404
+ 'date_created' => date('Y-m-d H:i:s'),
405
+ 'total' => 24.90,
406
+ ));
407
+
408
+ // Item #1
409
+ $order_item = new WC_Order_Item_Product();
410
+ $order_item->set_props(array(
411
+ 'name' => 'A Study in Scarlet',
412
+ 'subtotal' => '9.95',
413
+ 'sku' => 'kwd_ex_1',
414
+ ));
415
+ $order->add_item($order_item);
416
+
417
+ // Item #2
418
+ $order_item = new WC_Order_Item_Product();
419
+ $order_item->set_props(array(
420
+ 'name' => 'The Hound of the Baskervilles',
421
+ 'subtotal' => '14.95',
422
+ 'sku' => 'kwd_ex_2',
423
+ ));
424
+ $order->add_item($order_item);
425
+
426
+ // Return mockup order
427
+ return $order;
428
+ }
429
+
430
+ }
431
+
432
+ /**
433
+ * Print live preview scripts
434
+ *
435
+ * @access public
436
+ * @return void
437
+ */
438
+ public static function print_live_preview_scripts() {
439
+ // Open container
440
+ $scripts = '<script type="text/javascript">jQuery(document).ready(function() {';
441
+
442
+ // Font family mapping
443
+ $scripts .= 'var font_family_mapping = ' . json_encode(Kadence_Woomail_Settings::$font_family_mapping) . ';';
444
+
445
+ // Get information from email to use in placeholders.
446
+ $scripts .= 'var pl_site_title = "' . get_bloginfo( 'name', 'display' ).'";';
447
+ $scripts .= 'var pl_order_date = "' . wc_format_datetime( self::$current_order->get_date_created() ).'";';
448
+ $scripts .= 'var pl_order_number = "' . self::$current_order->get_order_number().'";';
449
+ $scripts .= 'var pl_customer_first_name = "' . self::$current_order->get_billing_first_name().'";';
450
+ $scripts .= 'var pl_customer_last_name = "' . self::$current_order->get_billing_last_name().'";';
451
+ $scripts .= 'var pl_customer_full_name = "' . self::$current_order->get_formatted_billing_full_name().'";';
452
+
453
+ // Function to handle special cases
454
+ $scripts .= "function prepare(value, key, selector) {
455
+ if (key === 'border_radius' && selector === '#template_header') {
456
+ value = value.replace('!important', '').trim();
457
+ value = value + ' ' + value + ' 0 0 !important';
458
+ } else if (key === 'footer_padding' && selector === '#template_footer #credit') {
459
+ value = '0 ' + value + ' ' + value + ' ' + value;
460
+ } else if (key === 'footer_content_text' && value !== '') {
461
+ value = '<p>' + value + '</p>';
462
+ } else if (key === 'shadow') {
463
+ value = '0 ' + (value > 0 ? 1 : 0) + 'px ' + (value * 4) + 'px ' + value + 'px rgba(0,0,0,0.1) !important';
464
+ } else if (key.match(/font_family$/)) {
465
+ value = typeof font_family_mapping[value] !== 'undefined' ? font_family_mapping[value] : value;
466
+ } else if (key === 'woocommerce_email_header_image') {
467
+ value = '<p style=\"margin-top:0; margin-bottom:0;\"><img src=\"' + value + '\" style=\"border: none; display: inline; font-weight: bold; height: auto; line-height: 100%; outline: none; text-decoration: none; text-transform: capitalize;\" /></p>';
468
+ } else if (value && value.includes('{site_title}') ) {
469
+ value = value.replace('{site_title}', pl_site_title);
470
+ } else if (value && value.includes('{order_date}') ) {
471
+ value = value.replace('{order_date}', pl_order_date);
472
+ } else if (value && value.includes('{order_number}') ) {
473
+ value = value.replace('{order_number}', pl_order_number);
474
+ } else if (value && value.includes('{customer_first_name}') ) {
475
+ value = value.replace('{customer_first_name}', pl_customer_first_name);
476
+ } else if (value && value.includes('{customer_last_name}') ) {
477
+ value = value.replace('{customer_last_name}', pl_customer_last_name);
478
+ } else if (value && value.includes('{customer_full_name}') ) {
479
+ value = value.replace('{customer_full_name}', pl_customer_full_name);
480
+ }
481
+ return value;
482
+ }";
483
+ // Get CSS suffixes
484
+ $scripts .= 'var suffixes = ' . json_encode(Kadence_Woomail_Customizer::get_css_suffix()) . ';';
485
+
486
+ // Go through kadence woomail settings
487
+ foreach ( Kadence_Woomail_Settings::get_settings() as $setting_key => $setting ) {
488
+
489
+ // No live method
490
+ if ( ! isset( $setting[ 'live_method' ] ) ) {
491
+ continue;
492
+ }
493
+
494
+ // Iterate over selectors
495
+ if ( in_array( $setting['live_method'], array( 'css', 'property' ) ) && ! empty( $setting['selectors'] ) ) {
496
+ foreach ( $setting['selectors'] as $selector => $properties ) {
497
+
498
+ // Iterate over properties
499
+ foreach ( $properties as $property ) {
500
+
501
+ // CSS value change
502
+ if ( ! isset( $setting['live_method'] ) || $setting['live_method'] === 'css' ) {
503
+ $scripts .= "wp.customize('kt_woomail[$setting_key]', function(value) {
504
+ value.bind(function(newval) {
505
+ newval = newval + (typeof suffixes['$setting_key'] !== 'undefined' ? suffixes['$setting_key'] : '');
506
+ newval = prepare(newval, '$setting_key', '$selector');
507
+ jQuery('$selector').css('$property', '').attr('style', function(i, s) { return (s||'') + '$property: ' + newval + ';' });
508
+ });
509
+ });";
510
+ }
511
+
512
+ // DOM object property
513
+ if ( $setting['live_method'] === 'property' ) {
514
+ $scripts .= "wp.customize('kt_woomail[$setting_key]', function(value) {
515
+ value.bind(function(newval) {
516
+ newval = newval + (typeof suffixes['$setting_key'] !== 'undefined' ? suffixes['$setting_key'] : '');
517
+ newval = prepare(newval, '$setting_key', '$selector');
518
+ jQuery('$selector').prop('$property', newval);
519
+ });
520
+ });";
521
+ }
522
+ }
523
+ }
524
+ }
525
+
526
+ // HTML Replace
527
+ if ( $setting['live_method'] === 'replace' && ! empty( $setting[ 'selectors' ] ) ) {
528
+ foreach ( $setting['selectors'] as $selector) {
529
+ $original = json_encode( $setting['original'] );
530
+ $scripts .= "wp.customize('kt_woomail[$setting_key]', function(value) {
531
+ value.bind(function(newval) {
532
+ newval = (newval !== '' ? newval : $original);
533
+ newval = prepare(newval, '$setting_key', '$selector');
534
+ jQuery('$selector').html(newval);
535
+ });
536
+ });";
537
+ }
538
+ }
539
+ }
540
+ // Go through woo settings
541
+ foreach (Kadence_Woomail_Settings::get_woo_settings() as $setting_key => $setting) {
542
+
543
+ // No live method
544
+ if ( ! isset( $setting[ 'live_method' ] ) ) {
545
+ continue;
546
+ }
547
+
548
+ // Iterate over selectors
549
+ if ( in_array( $setting['live_method'], array( 'css', 'property' ) ) && ! empty( $setting['selectors'] ) ) {
550
+ foreach ( $setting['selectors'] as $selector => $properties ) {
551
+
552
+ // Iterate over properties
553
+ foreach ( $properties as $property ) {
554
+
555
+ // CSS value change
556
+ if ( ! isset( $setting['live_method'] ) || $setting['live_method'] === 'css' ) {
557
+ $scripts .= "wp.customize('$setting_key', function(value) {
558
+ value.bind(function(newval) {
559
+ newval = newval + (typeof suffixes['$setting_key'] !== 'undefined' ? suffixes['$setting_key'] : '');
560
+ newval = prepare(newval, '$setting_key', '$selector');
561
+ jQuery('$selector').css('$property', '').attr('style', function(i, s) { return (s||'') + '$property: ' + newval + ';' });
562
+ });
563
+ });";
564
+ }
565
+
566
+ // DOM object property
567
+ if ( $setting['live_method'] === 'property' ) {
568
+ $scripts .= "wp.customize('$setting_key', function(value) {
569
+ value.bind(function(newval) {
570
+ newval = newval + (typeof suffixes['$setting_key'] !== 'undefined' ? suffixes['$setting_key'] : '');
571
+ newval = prepare(newval, '$setting_key', '$selector');
572
+ jQuery('$selector').prop('$property', newval);
573
+ });
574
+ });";
575
+ }
576
+ }
577
+ }
578
+ }
579
+
580
+ // HTML Replace
581
+ if ( $setting['live_method'] === 'replace' && ! empty( $setting[ 'selectors' ] ) ) {
582
+ foreach ( $setting['selectors'] as $selector) {
583
+ $original = json_encode( $setting['original'] );
584
+ $scripts .= "wp.customize('$setting_key', function(value) {
585
+ value.bind(function(newval) {
586
+ newval = (newval !== '' ? newval : $original);
587
+
588
+ newval = prepare(newval, '$setting_key', '$selector');
589
+ jQuery('$selector').html(newval);
590
+ });
591
+ });";
592
+ }
593
+ }
594
+ }
595
+
596
+ // Close container and return
597
+ echo $scripts . '});</script>';
598
+ }
599
+
600
+ }
601
+
602
+ Kadence_Woomail_Preview::get_instance();
603
+
604
+ }
includes/class-kadence-woomail-settings.php ADDED
@@ -0,0 +1,2470 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if ( ! defined( 'ABSPATH' ) ) {
5
+ exit;
6
+ }
7
+
8
+ /**
9
+ * Customizer Settings
10
+ *
11
+ */
12
+ if ( ! class_exists( 'Kadence_Woomail_Settings' ) ) {
13
+
14
+ class Kadence_Woomail_Settings {
15
+ /**
16
+ * @var null
17
+ */
18
+ private static $panels = null;
19
+ private static $sections = null;
20
+ private static $settings = null;
21
+ private static $woo_copy_settings = null;
22
+ private static $woo_settings = null;
23
+ private static $default_values = null;
24
+ private static $order_ids = null;
25
+ private static $email_types = null;
26
+
27
+ // Font family
28
+ public static $font_family_mapping = array(
29
+ 'helvetica' => '"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif',
30
+ 'arial' => 'Arial, Helvetica, sans-serif',
31
+ 'arial_black' => '"Arial Black", Gadget, sans-serif',
32
+ 'courier' => '"Courier New", Courier, monospace',
33
+ 'impact' => 'Impact, Charcoal, sans-serif',
34
+ 'lucida' => '"Lucida Sans Unicode", "Lucida Grande", sans-serif',
35
+ 'palatino' => '"Palatino Linotype", "Book Antiqua", Palatino, serif',
36
+ 'georgia' => 'Georgia, serif',
37
+ );
38
+ // Normal Woocommerce Email Types
39
+ public static $email_types_mapping = array(
40
+ 'new_order' => 'New Order',
41
+ 'cancelled_order' => 'Cancelled Order',
42
+ 'customer_processing_order' => 'Customer Processing Order',
43
+ 'customer_completed_order' => 'Customer Completed Order',
44
+ 'customer_refunded_order' => 'Customer Refunded Order',
45
+ 'customer_on_hold_order' => 'Customer On Hold Order',
46
+ 'customer_invoice' => 'Customer Invoice',
47
+ 'failed_order' => 'Failed Order',
48
+ 'customer_new_account' => 'Customer New Account',
49
+ 'customer_note' => 'Customer Note',
50
+ 'customer_reset_password' => 'Customer Reset Password',
51
+ );
52
+ // Woocommerce Subscription Email Types
53
+ public static $subscription_email_types_mapping = array(
54
+ 'new_renewal_order' => 'New Renewal Order',
55
+ 'customer_processing_renewal_order' => 'Customer Processing Renewal Order',
56
+ 'customer_completed_renewal_order' => 'Customer Completed Renewal Order',
57
+ 'customer_completed_switch_order' => 'Customer Completed Switch Order',
58
+ 'customer_renewal_invoice' => 'Customer Renewal Invoice',
59
+ 'cancelled_subscription' => 'Cancelled Subscription',
60
+ );
61
+
62
+ public static $prebuilt_templates_mapping = array(
63
+ 'kt_full' => 'assets/images/kt_full_template.jpg',
64
+ 'kt_skinny' => 'assets/images/kt_skinny_template.jpg',
65
+ 'kt_flat' => 'assets/images/kt_flat_template.jpg',
66
+ );
67
+ /**
68
+ * Get our customizer panels
69
+ *
70
+ * @access public
71
+ * @return array
72
+ */
73
+ public static function get_panels() {
74
+ // Define panels
75
+ if ( is_null( self::$panels ) ) {
76
+ self::$panels = array(
77
+ // Header
78
+ 'header' => array(
79
+ 'title' => __('Header', 'kadence-woocommerce-email-designer'),
80
+ 'priority' => 20,
81
+ ),
82
+
83
+ // Content
84
+ 'content' => array(
85
+ 'title' => __('Content', 'kadence-woocommerce-email-designer'),
86
+ 'priority' => 30,
87
+ ),
88
+
89
+ // Footer
90
+ 'footer' => array(
91
+ 'title' => __('Footer', 'kadence-woocommerce-email-designer'),
92
+ 'priority' => 40,
93
+ ),
94
+
95
+ );
96
+ }
97
+
98
+ // Return panels
99
+ return self::$panels;
100
+ }
101
+
102
+ /**
103
+ * Get our Customizer sections
104
+ *
105
+ * @access public
106
+ * @return array
107
+ */
108
+ public static function get_sections() {
109
+ // Define sections
110
+ if ( is_null( self::$sections ) ) {
111
+ self::$sections = array(
112
+ 'template' => array(
113
+ 'title' => __('Prebuilt Templates', 'kadence-woocommerce-email-designer'),
114
+ 'priority' => 8,
115
+ ),
116
+ 'mtype' => array(
117
+ 'title' => __('Email Type and Text', 'kadence-woocommerce-email-designer'),
118
+ 'priority' => 10,
119
+ ),
120
+ // Container
121
+ 'container' => array(
122
+ 'title' => __('Container', 'kadence-woocommerce-email-designer'),
123
+ 'priority' => 15,
124
+ ),
125
+
126
+ // Header Style
127
+ 'header_style' => array(
128
+ 'title' => __('Header Style', 'kadence-woocommerce-email-designer'),
129
+ 'panel' => 'header',
130
+ 'priority' => 20,
131
+ ),
132
+
133
+ // Header Image
134
+ 'header_image' => array(
135
+ 'title' => __('Header Image', 'kadence-woocommerce-email-designer'),
136
+ 'panel' => 'header',
137
+ 'priority' => 20,
138
+ ),
139
+
140
+ // Heading
141
+ 'heading' => array(
142
+ 'title' => __('Heading', 'kadence-woocommerce-email-designer'),
143
+ 'panel' => 'header',
144
+ 'priority' => 30,
145
+ ),
146
+
147
+ // Footer Style
148
+ 'footer_style' => array(
149
+ 'title' => __('Footer Style', 'kadence-woocommerce-email-designer'),
150
+ 'panel' => 'footer',
151
+ 'priority' => 40,
152
+ ),
153
+ // Footer social
154
+ 'footer_social' => array(
155
+ 'title' => __('Footer Social', 'kadence-woocommerce-email-designer'),
156
+ 'panel' => 'footer',
157
+ 'priority' => 50,
158
+ ),
159
+ // Footer Content
160
+ 'footer_content' => array(
161
+ 'title' => __('Footer Credit Content', 'kadence-woocommerce-email-designer'),
162
+ 'panel' => 'footer',
163
+ 'priority' => 60,
164
+ ),
165
+
166
+ // Content Container
167
+ 'content_container' => array(
168
+ 'title' => __('Content Container', 'kadence-woocommerce-email-designer'),
169
+ 'panel' => 'content',
170
+ 'priority' => 5,
171
+ ),
172
+ 'headings_style' => array(
173
+ 'title' => __('Content Headings Style', 'kadence-woocommerce-email-designer'),
174
+ 'panel' => 'content',
175
+ 'priority' => 8,
176
+ ),
177
+ // Text Style
178
+ 'text_style' => array(
179
+ 'title' => __('Content Text Style', 'kadence-woocommerce-email-designer'),
180
+ 'panel' => 'content',
181
+ 'priority' => 10,
182
+ ),
183
+ // Items Table
184
+ 'items_table' => array(
185
+ 'title' => __('Order Items', 'kadence-woocommerce-email-designer'),
186
+ 'panel' => 'content',
187
+ 'priority' => 10,
188
+ ),
189
+ // Items Table
190
+ 'addresses' => array(
191
+ 'title' => __('Addresses', 'kadence-woocommerce-email-designer'),
192
+ 'panel' => 'content',
193
+ 'priority' => 10,
194
+ ),
195
+ // Text input
196
+ 'text_input' => array(
197
+ 'title' => __('Text Copy', 'kadence-woocommerce-email-designer'),
198
+ 'panel' => 'content',
199
+ 'priority' => 5,
200
+ ),
201
+
202
+ // Custom Styles
203
+ 'custom_styles' => array(
204
+ 'title' => __('Custom Styles', 'kadence-woocommerce-email-designer'),
205
+ 'priority' => 80,
206
+ ),
207
+ // Import_export
208
+ 'import_export' => array(
209
+ 'title' => __('Import Export', 'kadence-woocommerce-email-designer'),
210
+ 'priority' => 90,
211
+ ),
212
+ // Send Email
213
+ 'send_email' => array(
214
+ 'title' => __('Send Preview Email', 'kadence-woocommerce-email-designer'),
215
+ 'priority' => 100,
216
+ ),
217
+ );
218
+ }
219
+
220
+ // Return sections
221
+ return self::$sections;
222
+ }
223
+
224
+ /**
225
+ * Get woocommerce settings that the plugin will allow editing of
226
+ *
227
+ * @access public
228
+ * @return array
229
+ */
230
+ public static function get_woo_settings() {
231
+
232
+ if ( is_null( self::$woo_settings ) ) {
233
+ $base_options = array();
234
+
235
+ // Email header image
236
+ $base_options[ 'woocommerce_email_header_image' ] = array(
237
+ 'title' => __('Header Image', 'kadence-woocommerce-email-designer'),
238
+ 'control_type' => 'image',
239
+ 'section' => 'header_image',
240
+ 'default' => Kadence_Woomail_Settings::get_default_value( 'header_image' ),
241
+ 'original' => '',
242
+ 'priority' => 5,
243
+ 'live_method' => 'replace',
244
+ 'selectors' => array(
245
+ '#template_header_image'
246
+ ),
247
+ );
248
+ // Email background color
249
+ $base_options['woocommerce_email_background_color'] = array(
250
+ 'title' => __('Container Background color', 'kadence-woocommerce-email-designer'),
251
+ 'section' => 'container',
252
+ 'control_type' => 'color',
253
+ 'priority' => 5,
254
+ 'default' => Kadence_Woomail_Settings::get_default_value('body_background_color'),
255
+ 'live_method' => 'css',
256
+ 'selectors' => array(
257
+ 'body' => array('background-color'),
258
+ '#wrapper' => array('background-color'),
259
+ ),
260
+ );
261
+ // Email text color
262
+ $base_options['woocommerce_email_text_color'] = array(
263
+ 'title' => __('Content Text color', 'kadence-woocommerce-email-designer'),
264
+ 'section' => 'text_style',
265
+ 'control_type' => 'color',
266
+ 'default' => Kadence_Woomail_Settings::get_default_value('text_color'),
267
+ 'live_method' => 'css',
268
+ 'selectors' => array(
269
+ '#body_content_inner' => array('color'),
270
+ '.td' => array('color'),
271
+ '.text' => array('color'),
272
+ 'address' => array('color'),
273
+ ),
274
+ );
275
+ // Email body background color
276
+ $base_options['woocommerce_email_body_background_color'] = array(
277
+ 'title' => __('Content Background color', 'kadence-woocommerce-email-designer'),
278
+ 'section' => 'content_container',
279
+ 'control_type' => 'color',
280
+ 'priority' => 5,
281
+ 'default' => Kadence_Woomail_Settings::get_default_value('background_color'),
282
+ 'live_method' => 'css',
283
+ 'selectors' => array(
284
+ '#body_content' => array('background-color'),
285
+ '#template_container' => array('background-color'),
286
+ 'h2 .separator-bubble' => array('background-color')
287
+ ),
288
+ );
289
+ // Footer Content Footer text
290
+ $base_options['woocommerce_email_footer_text'] = array(
291
+ 'title' => __('Footer text', 'kadence-woocommerce-email-designer'),
292
+ 'type' => 'textarea',
293
+ 'section' => 'footer_content',
294
+ 'default' => Kadence_Woomail_Settings::get_default_value( 'footer_content_text' ),
295
+ 'original' => '',
296
+ 'live_method' => 'replace',
297
+ 'selectors' => array(
298
+ '#template_footer #credit'
299
+ ),
300
+ );
301
+ $email_text = array();
302
+ foreach ( Kadence_Woomail_Settings::get_email_types() as $key => $value ) {
303
+ // Email recipients Text
304
+ if ( 'cancelled_order' == $key || 'new_order' == $key || 'failed_order' == $key ) {
305
+ $email_text['woocommerce_'.$key.'_settings[recipient]'] = array(
306
+ 'title' => __('Recipient(s)', 'kadence-woocommerce-email-designer'),
307
+ 'type' => 'text',
308
+ 'section' => 'mtype',
309
+ 'priority' => 5,
310
+ 'default' => '',
311
+ 'description' => sprintf( __( 'Enter recipients (comma separated) for this email. Defaults to %s.', 'kadence-woocommerce-email-designer' ), '<code>' . esc_attr( get_option( 'admin_email' ) ) . '</code>' ),
312
+ 'active_callback' => array(
313
+ 'id' => 'email_type',
314
+ 'compare' => '==',
315
+ 'value' => $key,
316
+ ),
317
+ );
318
+ }
319
+ if ( 'customer_refunded_order' == $key ) {
320
+ // Email Subject
321
+ $email_text['woocommerce_'.$key.'_settings[subject_full]'] = array(
322
+ 'title' => __('Full refund subject', 'kadence-woocommerce-email-designer'),
323
+ 'type' => 'text',
324
+ 'section' => 'mtype',
325
+ 'priority' => 5,
326
+ 'default' => '',
327
+ 'input_attrs' => array(
328
+ 'placeholder' => Kadence_Woomail_Settings::get_default_value( $key.'_subject_full' ),
329
+ ),
330
+ 'active_callback' => array(
331
+ 'id' => 'email_type',
332
+ 'compare' => '==',
333
+ 'value' => $key,
334
+ ),
335
+ );
336
+ // Email Subject
337
+ $email_text['woocommerce_'.$key.'_settings[subject_partial]'] = array(
338
+ 'title' => __('Partial refund subject', 'kadence-woocommerce-email-designer'),
339
+ 'type' => 'text',
340
+ 'section' => 'mtype',
341
+ 'priority' => 5,
342
+ 'default' => '',
343
+ 'input_attrs' => array(
344
+ 'placeholder' => Kadence_Woomail_Settings::get_default_value( $key.'_subject_partial' ),
345
+ ),
346
+ 'active_callback' => array(
347
+ 'id' => 'email_type',
348
+ 'compare' => '==',
349
+ 'value' => $key,
350
+ ),
351
+ );
352
+ // Email Header Text
353
+ $email_text['woocommerce_'.$key.'_settings[heading_full]'] = array(
354
+ 'title' => __('Full refund Heading Text', 'kadence-woocommerce-email-designer'),
355
+ 'type' => 'text',
356
+ 'section' => 'mtype',
357
+ 'priority' => 5,
358
+ 'default' => '',
359
+ 'input_attrs' => array(
360
+ 'placeholder' => Kadence_Woomail_Settings::get_default_value( $key.'_heading_full' ),
361
+ ),
362
+ 'live_method' => 'replace',
363
+ 'selectors' => array(
364
+ '#header_wrapper h1'
365
+ ),
366
+ 'active_callback' => array(
367
+ 'id' => 'email_type',
368
+ 'compare' => '==',
369
+ 'value' => $key,
370
+ ),
371
+ );
372
+ // Email Header Text
373
+ $email_text['woocommerce_'.$key.'_settings[heading_partial]'] = array(
374
+ 'title' => __('Partial refund Heading Text', 'kadence-woocommerce-email-designer'),
375
+ 'type' => 'text',
376
+ 'section' => 'mtype',
377
+ 'priority' => 5,
378
+ 'default' => '',
379
+ 'input_attrs' => array(
380
+ 'placeholder' => Kadence_Woomail_Settings::get_default_value( $key.'_heading_partial' ),
381
+ ),
382
+ 'active_callback' => array(
383
+ 'id' => 'email_type',
384
+ 'compare' => '==',
385
+ 'value' => $key,
386
+ ),
387
+ );
388
+ } else {
389
+ // Email Subject
390
+ $email_text['woocommerce_'.$key.'_settings[subject]'] = array(
391
+ 'title' => __('Subject Text', 'kadence-woocommerce-email-designer'),
392
+ 'type' => 'text',
393
+ 'section' => 'mtype',
394
+ 'priority' => 5,
395
+ 'default' => '',
396
+ 'input_attrs' => array(
397
+ 'placeholder' => Kadence_Woomail_Settings::get_default_value( $key.'_subject' ),
398
+ ),
399
+ 'active_callback' => array(
400
+ 'id' => 'email_type',
401
+ 'compare' => '==',
402
+ 'value' => $key,
403
+ ),
404
+ );
405
+ if ( 'customer_invoice' == $key ) {
406
+ $email_text['woocommerce_'.$key.'_settings[subject_paid]'] = array(
407
+ 'title' => __('Subject (paid) Text', 'kadence-woocommerce-email-designer'),
408
+ 'type' => 'text',
409
+ 'section' => 'mtype',
410
+ 'priority' => 5,
411
+ 'default' => '',
412
+ 'input_attrs' => array(
413
+ 'placeholder' => Kadence_Woomail_Settings::get_default_value( $key.'_subject_paid' ),
414
+ ),
415
+ 'active_callback' => array(
416
+ 'id' => 'email_type',
417
+ 'compare' => '==',
418
+ 'value' => $key,
419
+ ),
420
+ );
421
+ }
422
+ // Email Header Text
423
+ $email_text['woocommerce_'.$key.'_settings[heading]'] = array(
424
+ 'title' => __('Heading Text', 'kadence-woocommerce-email-designer'),
425
+ 'type' => 'text',
426
+ 'section' => 'mtype',
427
+ 'priority' => 5,
428
+ 'default' => '',
429
+ 'input_attrs' => array(
430
+ 'placeholder' => Kadence_Woomail_Settings::get_default_value( $key.'_heading' ),
431
+ ),
432
+ 'live_method' => 'replace',
433
+ 'selectors' => array(
434
+ '#header_wrapper h1'
435
+ ),
436
+ 'active_callback' => array(
437
+ 'id' => 'email_type',
438
+ 'compare' => '==',
439
+ 'value' => $key,
440
+ ),
441
+ );
442
+ if ( 'customer_invoice' == $key ) {
443
+ $email_text['woocommerce_'.$key.'_settings[heading_paid]'] = array(
444
+ 'title' => __('Heading (paid) Text', 'kadence-woocommerce-email-designer'),
445
+ 'type' => 'text',
446
+ 'section' => 'mtype',
447
+ 'priority' => 5,
448
+ 'default' => '',
449
+ 'input_attrs' => array(
450
+ 'placeholder' => Kadence_Woomail_Settings::get_default_value( $key.'_heading_paid' ),
451
+ ),
452
+ 'active_callback' => array(
453
+ 'id' => 'email_type',
454
+ 'compare' => '==',
455
+ 'value' => $key,
456
+ ),
457
+ );
458
+ }
459
+ }
460
+ }
461
+ self::$woo_settings = array_merge($base_options, $email_text);
462
+ }
463
+ return self::$woo_settings;
464
+ }
465
+
466
+ /**
467
+ * Get our extra settings
468
+ *
469
+ * @access public
470
+ * @return array
471
+ */
472
+ public static function get_settings() {
473
+ // Define settings
474
+ if ( is_null( self::$settings ) ) {
475
+ // Main Base options.
476
+ $mainoptions = array(
477
+ //Email template
478
+ 'email_load_template' => array(
479
+ 'title' => __('Template_load', 'kadence-woocommerce-email-designer'),
480
+ 'section' => 'template',
481
+ 'control_type' => 'kwdtemplateload',
482
+ 'choices' => Kadence_Woomail_Settings::get_email_templates(),
483
+ 'default' => 'kt_full',
484
+ 'transport' => 'refresh',
485
+ ),
486
+ //Preview Order Id
487
+ 'preview_order_id' => array(
488
+ 'title' => __('Preview Order', 'kadence-woocommerce-email-designer'),
489
+ 'section' => 'mtype',
490
+ 'type' => 'select',
491
+ 'priority' => 1,
492
+ 'choices' => Kadence_Woomail_Settings::get_order_ids(),
493
+ 'default' => Kadence_Woomail_Settings::get_default_value('preview_order_id'),
494
+ 'transport' => 'refresh',
495
+ ),
496
+ //Email Type
497
+ 'email_type' => array(
498
+ 'title' => __('Email Type', 'kadence-woocommerce-email-designer'),
499
+ 'section' => 'mtype',
500
+ 'type' => 'select',
501
+ 'priority' => 2,
502
+ 'choices' => Kadence_Woomail_Settings::get_email_types(),
503
+ 'default' => Kadence_Woomail_Settings::get_default_value('email_type'),
504
+ 'transport' => 'refresh',
505
+ ),
506
+ //Placeholder Info
507
+ 'email_text_info' => array(
508
+ 'title' => __('Available placeholders', 'kadence-woocommerce-email-designer'),
509
+ 'section' => 'mtype',
510
+ 'control_type' => 'kwdinfoblock',
511
+ 'priority' => 50,
512
+ 'description' => '<code>{site_title}, {order_date}, {order_number}, {customer_first_name}, {customer_last_name}, {customer_full_name}, {customer_username}</code>',
513
+ ),
514
+ );
515
+ $extra_email_text = array();
516
+ // Get the Extra Text area settings.
517
+ foreach (Kadence_Woomail_Settings::get_customized_email_types() as $key => $value) {
518
+ // Email Subtitle Text
519
+ $extra_email_text[$key.'_subtitle'] = array(
520
+ 'title' => __('Subtitle Text', 'kadence-woocommerce-email-designer'),
521
+ 'type' => 'text',
522
+ 'section' => 'mtype',
523
+ 'default' => '',
524
+ 'original' => '',
525
+ 'live_method' => 'replace',
526
+ 'selectors' => array(
527
+ '#header_wrapper .subtitle'
528
+ ),
529
+ 'active_callback' => array(
530
+ 'id' => 'email_type',
531
+ 'compare' => '==',
532
+ 'value' => $key,
533
+ ),
534
+ );
535
+ if ( 'customer_refunded_order' == $key ) {
536
+ // Email preview switch
537
+ $extra_email_text[$key.'_switch'] = array(
538
+ 'title' => __('Switch off for Partial Refund Preview', 'kadence-woocommerce-email-designer'),
539
+ 'control_type' => 'toggleswitch',
540
+ 'section' => 'mtype',
541
+ 'transport' => 'refresh',
542
+ 'default' => Kadence_Woomail_Settings::get_default_value( $key.'_switch' ),
543
+ 'original' => '',
544
+ 'priority' => 3,
545
+ 'active_callback' => array(
546
+ 'id' => 'email_type',
547
+ 'compare' => '==',
548
+ 'value' => $key,
549
+ ),
550
+ );
551
+ // Email Body Text
552
+ $extra_email_text[$key.'_body_full'] = array(
553
+ 'title' => __('Body Full Refund Text', 'kadence-woocommerce-email-designer'),
554
+ 'type' => 'textarea',
555
+ 'section' => 'mtype',
556
+ 'default' => Kadence_Woomail_Settings::get_default_value( $key.'_body_full' ),
557
+ 'original' => '',
558
+ 'transport' => 'refresh',
559
+ 'active_callback' => array(
560
+ 'id' => 'email_type',
561
+ 'compare' => '==',
562
+ 'value' => $key,
563
+ ),
564
+ );
565
+ // Email Body Text
566
+ $extra_email_text[$key.'_body_partial'] = array(
567
+ 'title' => __('Body Partial Refund Text', 'kadence-woocommerce-email-designer'),
568
+ 'type' => 'textarea',
569
+ 'section' => 'mtype',
570
+ 'default' => Kadence_Woomail_Settings::get_default_value( $key.'_body_partial' ),
571
+ 'original' => '',
572
+ 'active_callback' => array(
573
+ 'id' => 'email_type',
574
+ 'compare' => '==',
575
+ 'value' => $key,
576
+ ),
577
+ );
578
+ } else if ( 'customer_invoice' == $key ) {
579
+ // Email preview switch
580
+ $extra_email_text[$key.'_switch'] = array(
581
+ 'title' => __('Switch off for unpaid preview', 'kadence-woocommerce-email-designer'),
582
+ 'control_type' => 'toggleswitch',
583
+ 'section' => 'mtype',
584
+ 'transport' => 'refresh',
585
+ 'default' => Kadence_Woomail_Settings::get_default_value( $key.'_switch' ),
586
+ 'original' => '',
587
+ 'priority' => 3,
588
+ 'active_callback' => array(
589
+ 'id' => 'email_type',
590
+ 'compare' => '==',
591
+ 'value' => $key,
592
+ ),
593
+ );
594
+ // Email Body Text
595
+ $extra_email_text[$key.'_body_paid'] = array(
596
+ 'title' => __('Body Invoice Paid Text', 'kadence-woocommerce-email-designer'),
597
+ 'type' => 'textarea',
598
+ 'section' => 'mtype',
599
+ 'default' => Kadence_Woomail_Settings::get_default_value( $key.'_body_paid' ),
600
+ 'original' => '',
601
+ 'transport' => 'refresh',
602
+ 'active_callback' => array(
603
+ 'id' => 'email_type',
604
+ 'compare' => '==',
605
+ 'value' => $key,
606
+ ),
607
+ );
608
+ // Email Body Text
609
+ $extra_email_text[$key.'_body'] = array(
610
+ 'title' => __('Body Invoice Pending Payment Text', 'kadence-woocommerce-email-designer'),
611
+ 'type' => 'textarea',
612
+ 'section' => 'mtype',
613
+ 'default' => Kadence_Woomail_Settings::get_default_value( $key.'_body' ),
614
+ 'original' => '',
615
+ 'active_callback' => array(
616
+ 'id' => 'email_type',
617
+ 'compare' => '==',
618
+ 'value' => $key,
619
+ ),
620
+ );
621
+ }else if ( 'customer_renewal_invoice' == $key ) {
622
+ // Email Body Text
623
+ $extra_email_text[$key.'_body_failed'] = array(
624
+ 'title' => __('Body Invoice Failed Text', 'kadence-woocommerce-email-designer'),
625
+ 'type' => 'textarea',
626
+ 'section' => 'mtype',
627
+ 'default' => Kadence_Woomail_Settings::get_default_value( $key.'_body_failed' ),
628
+ 'original' => '',
629
+ 'transport' => 'refresh',
630
+ 'active_callback' => array(
631
+ 'id' => 'email_type',
632
+ 'compare' => '==',
633
+ 'value' => $key,
634
+ ),
635
+ );
636
+ // Email Body Text
637
+ $extra_email_text[$key.'_body'] = array(
638
+ 'title' => __('Body Invoice Pending Payment Text', 'kadence-woocommerce-email-designer'),
639
+ 'type' => 'textarea',
640
+ 'section' => 'mtype',
641
+ 'default' => Kadence_Woomail_Settings::get_default_value( $key.'_body' ),
642
+ 'original' => '',
643
+ 'active_callback' => array(
644
+ 'id' => 'email_type',
645
+ 'compare' => '==',
646
+ 'value' => $key,
647
+ ),
648
+ );
649
+ } else {
650
+ // Email Body Text
651
+ $extra_email_text[$key.'_body'] = array(
652
+ 'title' => __('Body Text', 'kadence-woocommerce-email-designer'),
653
+ 'type' => 'textarea',
654
+ 'section' => 'mtype',
655
+ 'default' => Kadence_Woomail_Settings::get_default_value( $key.'_body' ),
656
+ 'original' => '',
657
+ 'transport' => 'refresh',
658
+ 'active_callback' => array(
659
+ 'id' => 'email_type',
660
+ 'compare' => '==',
661
+ 'value' => $key,
662
+ ),
663
+ );
664
+ }
665
+ }
666
+ $main = array(
667
+ /* CONTAINER STUFF */
668
+ // Email width
669
+ 'content_width' => array(
670
+ 'title' => __('Content Width', 'kadence-woocommerce-email-designer'),
671
+ 'control_type' => 'rangevalue',
672
+ 'section' => 'container',
673
+ 'default' => Kadence_Woomail_Settings::get_default_value('content_width'),
674
+ 'live_method' => 'css',
675
+ 'selectors' => array(
676
+ '#template_container' => array('width'),
677
+ '#template_header' => array('width'),
678
+ '#template_header_image' => array('width'),
679
+ '#template_body' => array('width'),
680
+ '#template_footer' => array('width'),
681
+ ),
682
+ 'input_attrs' => array(
683
+ 'step' => 2,
684
+ 'min' => 350,
685
+ 'max' => 1500,
686
+ ),
687
+ ),
688
+ // Border radius
689
+ 'border_radius' => array(
690
+ 'title' => __('Border radius', 'kadence-woocommerce-email-designer'),
691
+ 'control_type' => 'rangevalue',
692
+ 'section' => 'container',
693
+ 'default' => Kadence_Woomail_Settings::get_default_value('border_radius'),
694
+ 'live_method' => 'css',
695
+ 'selectors' => array(
696
+ '#template_container' => array('border-radius'),
697
+ ),
698
+ 'input_attrs' => array(
699
+ 'step' => 1,
700
+ 'min' => 0,
701
+ 'max' => 100,
702
+ ),
703
+ ),
704
+ // Border Width
705
+ 'border_width' => array(
706
+ 'title' => __('Border Width', 'kadence-woocommerce-email-designer'),
707
+ 'control_type' => 'rangevalue',
708
+ 'section' => 'container',
709
+ 'default' => Kadence_Woomail_Settings::get_default_value('border_width'),
710
+ 'live_method' => 'css',
711
+ 'selectors' => array(
712
+ 'body #template_container' => array('border-width'),
713
+ ),
714
+ 'input_attrs' => array(
715
+ 'step' => 1,
716
+ 'min' => 0,
717
+ 'max' => 20,
718
+ ),
719
+ ),
720
+ // Border Color
721
+ 'border_color' => array(
722
+ 'title' => __('Border color', 'kadence-woocommerce-email-designer'),
723
+ 'section' => 'container',
724
+ 'control_type' => 'color',
725
+ 'default' => Kadence_Woomail_Settings::get_default_value('border_color'),
726
+ 'live_method' => 'css',
727
+ 'selectors' => array(
728
+ 'body #template_container' => array('border-color'),
729
+ ),
730
+ ),
731
+ // Shadow
732
+ 'shadow' => array(
733
+ 'title' => __('Shadow', 'kadence-woocommerce-email-designer'),
734
+ 'control_type' => 'rangevalue',
735
+ 'section' => 'container',
736
+ 'default' => Kadence_Woomail_Settings::get_default_value('shadow'),
737
+ 'live_method' => 'css',
738
+ 'selectors' => array(
739
+ 'body #template_container' => array('box-shadow'),
740
+ ),
741
+ 'input_attrs' => array(
742
+ 'step' => 1,
743
+ 'min' => 0,
744
+ 'max' => 20,
745
+ ),
746
+ ),
747
+ // Email Top Padding
748
+ 'email_padding' => array(
749
+ 'title' => __('Container Top Padding', 'kadence-woocommerce-email-designer'),
750
+ 'control_type' => 'rangevalue',
751
+ 'section' => 'container',
752
+ 'default' => Kadence_Woomail_Settings::get_default_value('email_padding'),
753
+ 'live_method' => 'css',
754
+ 'selectors' => array(
755
+ '#wrapper' => array('padding-top'),
756
+ ),
757
+ 'input_attrs' => array(
758
+ 'step' => 1,
759
+ 'min' => 0,
760
+ 'max' => 250,
761
+ ),
762
+ ),
763
+ // Email Top Padding
764
+ 'email_padding_bottom' => array(
765
+ 'title' => __('Container Botom Padding', 'kadence-woocommerce-email-designer'),
766
+ 'control_type' => 'rangevalue',
767
+ 'section' => 'container',
768
+ 'default' => Kadence_Woomail_Settings::get_default_value('email_padding'),
769
+ 'live_method' => 'css',
770
+ 'selectors' => array(
771
+ '#wrapper' => array('padding-bottom'),
772
+ ),
773
+ 'input_attrs' => array(
774
+ 'step' => 1,
775
+ 'min' => 0,
776
+ 'max' => 250,
777
+ ),
778
+ ),
779
+ /* HEADER IMAGE OPTIONS */
780
+ // Image Align
781
+ 'header_image_align' => array(
782
+ 'title' => __('Image Align', 'kadence-woocommerce-email-designer'),
783
+ 'section' => 'header_image',
784
+ 'default' => Kadence_Woomail_Settings::get_default_value('header_image_align'),
785
+ 'live_method' => 'css',
786
+ 'type' => 'select',
787
+ 'choices' => Kadence_Woomail_Settings::get_image_aligns(),
788
+ 'selectors' => array(
789
+ '#template_header_image' => array('text-align'),
790
+ ),
791
+ ),
792
+ // Image Maxwidth
793
+ 'header_image_maxwidth' => array(
794
+ 'title' => __('Image Max Width', 'kadence-woocommerce-email-designer'),
795
+ 'section' => 'header_image',
796
+ 'default' => Kadence_Woomail_Settings::get_default_value('header_image_maxwidth'),
797
+ 'live_method' => 'css',
798
+ 'control_type' => 'rangevalue',
799
+ 'selectors' => array(
800
+ '#template_header_image img' => array('max-width'),
801
+ ),
802
+ 'input_attrs' => array(
803
+ 'step' => 1,
804
+ 'min' => 10,
805
+ 'max' => 1200,
806
+ ),
807
+ ),
808
+ 'header_image_background_color' => array(
809
+ 'title' => __('Background color', 'kadence-woocommerce-email-designer'),
810
+ 'section' => 'header_image',
811
+ 'control_type' => 'color',
812
+ 'default' => Kadence_Woomail_Settings::get_default_value('header_image_background_color'),
813
+ 'live_method' => 'css',
814
+ 'selectors' => array(
815
+ '#template_header_image_container' => array('background-color'),
816
+ ),
817
+ ),
818
+ // Header Padding top/bottom
819
+ 'header_image_padding_top_bottom' => array(
820
+ 'title' => __('Padding top/bottom', 'kadence-woocommerce-email-designer'),
821
+ 'control_type' => 'rangevalue',
822
+ 'section' => 'header_image',
823
+ 'default' => Kadence_Woomail_Settings::get_default_value('header_image_padding_top_bottom'),
824
+ 'live_method' => 'css',
825
+ 'selectors' => array(
826
+ '#template_header_image' => array('padding-top', 'padding-bottom'),
827
+ ),
828
+ 'input_attrs' => array(
829
+ 'step' => 1,
830
+ 'min' => 0,
831
+ 'max' => 150,
832
+ ),
833
+ ),
834
+ // Header background color
835
+ 'header_background_color' => array(
836
+ 'title' => __('Background color', 'kadence-woocommerce-email-designer'),
837
+ 'section' => 'header_style',
838
+ 'control_type' => 'color',
839
+ 'default' => Kadence_Woomail_Settings::get_default_value('header_background_color'),
840
+ 'live_method' => 'css',
841
+ 'selectors' => array(
842
+ '#template_header' => array('background-color'),
843
+ ),
844
+ ),
845
+ // Header Text align
846
+ 'header_text_align' => array(
847
+ 'title' => __('Text align', 'kadence-woocommerce-email-designer'),
848
+ 'section' => 'header_style',
849
+ 'default' => Kadence_Woomail_Settings::get_default_value('header_text_align'),
850
+ 'live_method' => 'css',
851
+ 'type' => 'select',
852
+ 'choices' => Kadence_Woomail_Settings::get_text_aligns(),
853
+ 'selectors' => array(
854
+ '#header_wrapper h1' => array('text-align'),
855
+ '#header_wrapper' => array('text-align'),
856
+ ),
857
+ ),
858
+
859
+ // Header Padding top/bottom
860
+ 'header_padding_top' => array(
861
+ 'title' => __('Padding Top', 'kadence-woocommerce-email-designer'),
862
+ 'control_type' => 'rangevalue',
863
+ 'section' => 'header_style',
864
+ 'default' => Kadence_Woomail_Settings::get_default_value('header_padding_top_bottom'),
865
+ 'live_method' => 'css',
866
+ 'selectors' => array(
867
+ '#header_wrapper' => array('padding-top'),
868
+ ),
869
+ 'input_attrs' => array(
870
+ 'step' => 1,
871
+ 'min' => 0,
872
+ 'max' => 150,
873
+ ),
874
+ ),
875
+ // Header Padding top/bottom
876
+ 'header_padding_bottom' => array(
877
+ 'title' => __('Padding Bottom', 'kadence-woocommerce-email-designer'),
878
+ 'control_type' => 'rangevalue',
879
+ 'section' => 'header_style',
880
+ 'default' => Kadence_Woomail_Settings::get_default_value('header_padding_top_bottom'),
881
+ 'live_method' => 'css',
882
+ 'selectors' => array(
883
+ '#header_wrapper' => array('padding-bottom'),
884
+ ),
885
+ 'input_attrs' => array(
886
+ 'step' => 1,
887
+ 'min' => 0,
888
+ 'max' => 150,
889
+ ),
890
+ ),
891
+
892
+ // Header Padding left/right
893
+ 'header_padding_left_right' => array(
894
+ 'title' => __('Padding left/right', 'kadence-woocommerce-email-designer'),
895
+ 'control_type' => 'rangevalue',
896
+ 'section' => 'header_style',
897
+ 'default' => Kadence_Woomail_Settings::get_default_value('header_padding_left_right'),
898
+ 'live_method' => 'css',
899
+ 'selectors' => array(
900
+ '#header_wrapper' => array('padding-left', 'padding-right'),
901
+ ),
902
+ 'input_attrs' => array(
903
+ 'step' => 1,
904
+ 'min' => 0,
905
+ 'max' => 150,
906
+ ),
907
+ ),
908
+ // Heading Font size
909
+ 'heading_font_size' => array(
910
+ 'title' => __('Heading Font size', 'kadence-woocommerce-email-designer'),
911
+ 'control_type' => 'rangevalue',
912
+ 'section' => 'heading',
913
+ 'default' => Kadence_Woomail_Settings::get_default_value('heading_font_size'),
914
+ 'live_method' => 'css',
915
+ 'selectors' => array(
916
+ '#template_header h1' => array('font-size'),
917
+ ),
918
+ 'input_attrs' => array(
919
+ 'step' => 1,
920
+ 'min' => 10,
921
+ 'max' => 75,
922
+ ),
923
+ ),
924
+ // heading Line Height
925
+ 'heading_line_height' => array(
926
+ 'title' => __('Heading Line Height', 'kadence-woocommerce-email-designer'),
927
+ 'control_type' => 'rangevalue',
928
+ 'section' => 'heading',
929
+ 'default' => Kadence_Woomail_Settings::get_default_value('heading_line_height'),
930
+ 'live_method' => 'css',
931
+ 'selectors' => array(
932
+ '#template_header h1' => array('line-height'),
933
+ ),
934
+ 'input_attrs' => array(
935
+ 'step' => 1,
936
+ 'min' => 10,
937
+ 'max' => 125,
938
+ ),
939
+ ),
940
+ // Heading Font family
941
+ 'heading_font_family' => array(
942
+ 'title' => __('Heading Font family', 'kadence-woocommerce-email-designer'),
943
+ 'section' => 'heading',
944
+ 'default' => Kadence_Woomail_Settings::get_default_value('heading_font_family'),
945
+ 'live_method' => 'css',
946
+ 'type' => 'select',
947
+ 'choices' => Kadence_Woomail_Settings::get_font_families(),
948
+ 'selectors' => array(
949
+ '#template_header h1' => array('font-family'),
950
+ ),
951
+ ),
952
+ // Heading Font style
953
+ 'heading_font_style' => array(
954
+ 'title' => __('Heading Font Style', 'kadence-woocommerce-email-designer'),
955
+ 'section' => 'heading',
956
+ 'default' => Kadence_Woomail_Settings::get_default_value('heading_font_style'),
957
+ 'live_method' => 'css',
958
+ 'type' => 'select',
959
+ 'choices' => array(
960
+ 'normal' => __('Normal', 'kadence-woocommerce-email-designer'),
961
+ 'italic' => __('Italic', 'kadence-woocommerce-email-designer'),
962
+ ),
963
+ 'selectors' => array(
964
+ '#template_header h1' => array('font-style'),
965
+ ),
966
+ ),
967
+ // Heading Font weight
968
+ 'heading_font_weight' => array(
969
+ 'title' => __('Heading Font weight', 'kadence-woocommerce-email-designer'),
970
+ 'control_type' => 'rangevalue',
971
+ 'section' => 'heading',
972
+ 'default' => Kadence_Woomail_Settings::get_default_value('heading_font_weight'),
973
+ 'live_method' => 'css',
974
+ 'selectors' => array(
975
+ '#template_header h1' => array('font-weight'),
976
+ ),
977
+ 'input_attrs' => array(
978
+ 'step' => 100,
979
+ 'min' => 100,
980
+ 'max' => 900,
981
+ ),
982
+ ),
983
+ // Heading Color
984
+ 'heading_color' => array(
985
+ 'title' => __('Heading Text color', 'kadence-woocommerce-email-designer'),
986
+ 'section' => 'heading',
987
+ 'control_type' => 'color',
988
+ 'default' => Kadence_Woomail_Settings::get_default_value('heading_color'),
989
+ 'live_method' => 'css',
990
+ 'selectors' => array(
991
+ '#template_header' => array('color'),
992
+ '#template_header h1' => array('color'),
993
+ ),
994
+ ),
995
+ //Subtitle Info
996
+ 'subtitle_fontt_info' => array(
997
+ 'title' => __('Subtitle Settings', 'kadence-woocommerce-email-designer'),
998
+ 'section' => 'heading',
999
+ 'control_type' => 'kwdinfoblock',
1000
+ 'description' => '',
1001
+ ),
1002
+ // Subtitle placement
1003
+ 'subtitle_placement' => array(
1004
+ 'title' => __('Subtitle Placement', 'kadence-woocommerce-email-designer'),
1005
+ 'section' => 'heading',
1006
+ 'default' => Kadence_Woomail_Settings::get_default_value('subtitle_placement'),
1007
+ 'transport' => 'refresh',
1008
+ 'type' => 'select',
1009
+ 'choices' => array(
1010
+ 'below' => __('Below Heading', 'kadence-woocommerce-email-designer'),
1011
+ 'above' => __('Above Heading', 'kadence-woocommerce-email-designer'),
1012
+ ),
1013
+ ),
1014
+
1015
+ // Subtitle Font size
1016
+ 'subtitle_font_size' => array(
1017
+ 'title' => __('Subtitle Font Size', 'kadence-woocommerce-email-designer'),
1018
+ 'control_type' => 'rangevalue',
1019
+ 'section' => 'heading',
1020
+ 'default' => Kadence_Woomail_Settings::get_default_value('subtitle_font_size'),
1021
+ 'live_method' => 'css',
1022
+ 'selectors' => array(
1023
+ '#template_header .subtitle' => array('font-size'),
1024
+ ),
1025
+ 'input_attrs' => array(
1026
+ 'step' => 1,
1027
+ 'min' => 10,
1028
+ 'max' => 75,
1029
+ ),
1030
+ ),
1031
+ // Subtitle Line Height
1032
+ 'subtitle_line_height' => array(
1033
+ 'title' => __('Subtitle Line Height', 'kadence-woocommerce-email-designer'),
1034
+ 'control_type' => 'rangevalue',
1035
+ 'section' => 'heading',
1036
+ 'default' => Kadence_Woomail_Settings::get_default_value('subtitle_line_height'),
1037
+ 'live_method' => 'css',
1038
+ 'selectors' => array(
1039
+ '#template_header .subtitle' => array('line-height'),
1040
+ ),
1041
+ 'input_attrs' => array(
1042
+ 'step' => 1,
1043
+ 'min' => 10,
1044
+ 'max' => 125,
1045
+ ),
1046
+ ),
1047
+ // Subtitle Font family
1048
+ 'subtitle_font_family' => array(
1049
+ 'title' => __('Subtitle Font Family', 'kadence-woocommerce-email-designer'),
1050
+ 'section' => 'heading',
1051
+ 'default' => Kadence_Woomail_Settings::get_default_value('subtitle_font_family'),
1052
+ 'live_method' => 'css',
1053
+ 'type' => 'select',
1054
+ 'choices' => Kadence_Woomail_Settings::get_font_families(),
1055
+ 'selectors' => array(
1056
+ '#template_header .subtitle' => array('font-family'),
1057
+ ),
1058
+ ),
1059
+ // Subtitle Font style
1060
+ 'subtitle_font_style' => array(
1061
+ 'title' => __('Subtitle Font Style', 'kadence-woocommerce-email-designer'),
1062
+ 'section' => 'heading',
1063
+ 'default' => Kadence_Woomail_Settings::get_default_value('subtitle_font_style'),
1064
+ 'live_method' => 'css',
1065
+ 'type' => 'select',
1066
+ 'choices' => array(
1067
+ 'normal' => __('Normal', 'kadence-woocommerce-email-designer'),
1068
+ 'italic' => __('Italic', 'kadence-woocommerce-email-designer'),
1069
+ ),
1070
+ 'selectors' => array(
1071
+ '#template_header .subtitle' => array('font-style'),
1072
+ ),
1073
+ ),
1074
+
1075
+ // Subtitle Font weight
1076
+ 'subtitle_font_weight' => array(
1077
+ 'title' => __('Subtitle Font weight', 'kadence-woocommerce-email-designer'),
1078
+ 'control_type' => 'rangevalue',
1079
+ 'section' => 'heading',
1080
+ 'default' => Kadence_Woomail_Settings::get_default_value('subtitle_font_weight'),
1081
+ 'live_method' => 'css',
1082
+ 'selectors' => array(
1083
+ '#template_header .subtitle' => array('font-weight'),
1084
+ ),
1085
+ 'input_attrs' => array(
1086
+ 'step' => 100,
1087
+ 'min' => 100,
1088
+ 'max' => 900,
1089
+ ),
1090
+ ),
1091
+
1092
+ // Subtitle Color
1093
+ 'subtitle_color' => array(
1094
+ 'title' => __('Subtitle Text color', 'kadence-woocommerce-email-designer'),
1095
+ 'section' => 'heading',
1096
+ 'control_type' => 'color',
1097
+ 'default' => Kadence_Woomail_Settings::get_default_value('subtitle_color'),
1098
+ 'live_method' => 'css',
1099
+ 'selectors' => array(
1100
+ '#template_header .subtitle' => array('color'),
1101
+ ),
1102
+ ),
1103
+
1104
+ // Content padding top
1105
+ 'content_padding_top' => array(
1106
+ 'title' => __('Padding Top', 'kadence-woocommerce-email-designer'),
1107
+ 'control_type' => 'rangevalue',
1108
+ 'section' => 'content_container',
1109
+ 'default' => Kadence_Woomail_Settings::get_default_value('content_padding'),
1110
+ 'live_method' => 'css',
1111
+ 'selectors' => array(
1112
+ '#body_content' => array('padding-top'),
1113
+ ),
1114
+ 'input_attrs' => array(
1115
+ 'step' => 1,
1116
+ 'min' => 0,
1117
+ 'max' => 150,
1118
+ ),
1119
+ ),
1120
+ // Content padding
1121
+ 'content_padding_bottom' => array(
1122
+ 'title' => __('Padding Bottom', 'kadence-woocommerce-email-designer'),
1123
+ 'control_type' => 'rangevalue',
1124
+ 'section' => 'content_container',
1125
+ 'default' => Kadence_Woomail_Settings::get_default_value('content_padding_bottom'),
1126
+ 'live_method' => 'css',
1127
+ 'selectors' => array(
1128
+ '#body_content' => array('padding-bottom'),
1129
+ ),
1130
+ 'input_attrs' => array(
1131
+ 'step' => 1,
1132
+ 'min' => 0,
1133
+ 'max' => 150,
1134
+ ),
1135
+ ),
1136
+ // Content padding
1137
+ 'content_padding' => array(
1138
+ 'title' => __('Padding Left/Right', 'kadence-woocommerce-email-designer'),
1139
+ 'control_type' => 'rangevalue',
1140
+ 'section' => 'content_container',
1141
+ 'default' => Kadence_Woomail_Settings::get_default_value('content_padding'),
1142
+ 'live_method' => 'css',
1143
+ 'selectors' => array(
1144
+ '#body_content > table > tbody > tr > td' => array('padding-left', 'padding-right'),
1145
+ '#body_content > table > tr > td' => array('padding-left', 'padding-right'),
1146
+ ),
1147
+ 'input_attrs' => array(
1148
+ 'step' => 1,
1149
+ 'min' => 0,
1150
+ 'max' => 150,
1151
+ ),
1152
+ ),
1153
+ // TEXT STYLE
1154
+ // Font size
1155
+ 'font_size' => array(
1156
+ 'title' => __('Font Size', 'kadence-woocommerce-email-designer'),
1157
+ 'control_type' => 'rangevalue',
1158
+ 'section' => 'text_style',
1159
+ 'default' => Kadence_Woomail_Settings::get_default_value('font_size'),
1160
+ 'live_method' => 'css',
1161
+ 'selectors' => array(
1162
+ '#body_content_inner' => array('font-size'),
1163
+ 'img' => array('font-size'),
1164
+ ),
1165
+ 'input_attrs' => array(
1166
+ 'step' => 1,
1167
+ 'min' => 8,
1168
+ 'max' => 30,
1169
+ ),
1170
+ ),
1171
+ // Line Height
1172
+ 'line_height' => array(
1173
+ 'title' => __('Line Height', 'kadence-woocommerce-email-designer'),
1174
+ 'control_type' => 'rangevalue',
1175
+ 'section' => 'text_style',
1176
+ 'default' => Kadence_Woomail_Settings::get_default_value('line_height'),
1177
+ 'live_method' => 'css',
1178
+ 'selectors' => array(
1179
+ '#body_content_inner' => array('line-height'),
1180
+ 'img' => array('line-height'),
1181
+ ),
1182
+ 'input_attrs' => array(
1183
+ 'step' => 1,
1184
+ 'min' => 10,
1185
+ 'max' => 90,
1186
+ ),
1187
+ ),
1188
+ // Font family
1189
+ 'font_family' => array(
1190
+ 'title' => __('Font Family', 'kadence-woocommerce-email-designer'),
1191
+ 'section' => 'text_style',
1192
+ 'default' => Kadence_Woomail_Settings::get_default_value('font_family'),
1193
+ 'live_method' => 'css',
1194
+ 'type' => 'select',
1195
+ 'choices' => Kadence_Woomail_Settings::get_font_families(),
1196
+ 'selectors' => array(
1197
+ '#body_content_inner' => array('font-family'),
1198
+ '.td' => array('font-family'),
1199
+ '.text' => array('font-family'),
1200
+ ),
1201
+ ),
1202
+ // Font weight
1203
+ 'font_weight' => array(
1204
+ 'title' => __('Font weight', 'kadence-woocommerce-email-designer'),
1205
+ 'control_type' => 'rangevalue',
1206
+ 'section' => 'text_style',
1207
+ 'default' => Kadence_Woomail_Settings::get_default_value('font_weight'),
1208
+ 'live_method' => 'css',
1209
+ 'selectors' => array(
1210
+ '#body_content_inner' => array('font-weight'),
1211
+ ),
1212
+ 'input_attrs' => array(
1213
+ 'step' => 100,
1214
+ 'min' => 100,
1215
+ 'max' => 900,
1216
+ ),
1217
+ ),
1218
+ // Link color
1219
+ 'link_color' => array(
1220
+ 'title' => __('Link Color', 'kadence-woocommerce-email-designer'),
1221
+ 'section' => 'text_style',
1222
+ 'control_type' => 'color',
1223
+ 'default' => Kadence_Woomail_Settings::get_default_value('link_color'),
1224
+ 'live_method' => 'css',
1225
+ 'selectors' => array(
1226
+ 'a' => array('color'),
1227
+ '.link' => array('color'),
1228
+ '.btn' => array('background-color'),
1229
+ ),
1230
+ ),
1231
+ // H2 TEXT STYLE
1232
+ // Font size
1233
+ 'h2_font_size' => array(
1234
+ 'title' => __('H2 Font Size', 'kadence-woocommerce-email-designer'),
1235
+ 'control_type' => 'rangevalue',
1236
+ 'section' => 'headings_style',
1237
+ 'default' => Kadence_Woomail_Settings::get_default_value('h2_font_size'),
1238
+ 'live_method' => 'css',
1239
+ 'selectors' => array(
1240
+ '#template_body h2' => array('font-size'),
1241
+ ),
1242
+ 'input_attrs' => array(
1243
+ 'step' => 1,
1244
+ 'min' => 8,
1245
+ 'max' => 50,
1246
+ ),
1247
+ ),
1248
+ // h2 Line Height
1249
+ 'h2_line_height' => array(
1250
+ 'title' => __('H2 Line Height', 'kadence-woocommerce-email-designer'),
1251
+ 'control_type' => 'rangevalue',
1252
+ 'section' => 'headings_style',
1253
+ 'default' => Kadence_Woomail_Settings::get_default_value('h2_line_height'),
1254
+ 'live_method' => 'css',
1255
+ 'selectors' => array(
1256
+ '#template_body h2' => array('line-height'),
1257
+ ),
1258
+ 'input_attrs' => array(
1259
+ 'step' => 1,
1260
+ 'min' => 10,
1261
+ 'max' => 90,
1262
+ ),
1263
+ ),
1264
+ // h2 padding top
1265
+ 'h2_padding_top' => array(
1266
+ 'title' => __('H2 Padding Top', 'kadence-woocommerce-email-designer'),
1267
+ 'control_type' => 'rangevalue',
1268
+ 'section' => 'headings_style',
1269
+ 'default' => Kadence_Woomail_Settings::get_default_value('h2_padding_top'),
1270
+ 'live_method' => 'css',
1271
+ 'selectors' => array(
1272
+ '#template_body h2' => array('padding-top'),
1273
+ ),
1274
+ 'input_attrs' => array(
1275
+ 'step' => 1,
1276
+ 'min' => 0,
1277
+ 'max' => 60,
1278
+ ),
1279
+ ),
1280
+ // h2 padding bottom
1281
+ 'h2_padding_bottom' => array(
1282
+ 'title' => __('H2 Padding Bottom', 'kadence-woocommerce-email-designer'),
1283
+ 'control_type' => 'rangevalue',
1284
+ 'section' => 'headings_style',
1285
+ 'default' => Kadence_Woomail_Settings::get_default_value('h2_padding_bottom'),
1286
+ 'live_method' => 'css',
1287
+ 'selectors' => array(
1288
+ '#template_body h2' => array('padding-bottom'),
1289
+ ),
1290
+ 'input_attrs' => array(
1291
+ 'step' => 1,
1292
+ 'min' => 0,
1293
+ 'max' => 60,
1294
+ ),
1295
+ ),
1296
+ // h2 margin top
1297
+ 'h2_margin_top' => array(
1298
+ 'title' => __('H2 Margin Top', 'kadence-woocommerce-email-designer'),
1299
+ 'control_type' => 'rangevalue',
1300
+ 'section' => 'headings_style',
1301
+ 'default' => Kadence_Woomail_Settings::get_default_value('h2_margin_top'),
1302
+ 'live_method' => 'css',
1303
+ 'selectors' => array(
1304
+ '#template_body h2' => array('margin-top'),
1305
+ ),
1306
+ 'input_attrs' => array(
1307
+ 'step' => 1,
1308
+ 'min' => 0,
1309
+ 'max' => 60,
1310
+ ),
1311
+ ),
1312
+ // h2 margin bottom
1313
+ 'h2_margin_bottom' => array(
1314
+ 'title' => __('H2 Margin Bottom', 'kadence-woocommerce-email-designer'),
1315
+ 'control_type' => 'rangevalue',
1316
+ 'section' => 'headings_style',
1317
+ 'default' => Kadence_Woomail_Settings::get_default_value('h2_margin_bottom'),
1318
+ 'live_method' => 'css',
1319
+ 'selectors' => array(
1320
+ '#template_body h2' => array('margin-bottom'),
1321
+ ),
1322
+ 'input_attrs' => array(
1323
+ 'step' => 1,
1324
+ 'min' => 0,
1325
+ 'max' => 60,
1326
+ ),
1327
+ ),
1328
+ // h2 Font family
1329
+ 'h2_font_family' => array(
1330
+ 'title' => __('H2 Font Family', 'kadence-woocommerce-email-designer'),
1331
+ 'section' => 'headings_style',
1332
+ 'default' => Kadence_Woomail_Settings::get_default_value('h2_font_family'),
1333
+ 'live_method' => 'css',
1334
+ 'type' => 'select',
1335
+ 'choices' => Kadence_Woomail_Settings::get_font_families(),
1336
+ 'selectors' => array(
1337
+ '#template_body h2' => array('font-family'),
1338
+ '#template_body h2 a' => array('font-family'),
1339
+ ),
1340
+ ),
1341
+ // h2 Font style
1342
+ 'h2_font_style' => array(
1343
+ 'title' => __('H2 Font Style', 'kadence-woocommerce-email-designer'),
1344
+ 'section' => 'headings_style',
1345
+ 'default' => Kadence_Woomail_Settings::get_default_value('h2_font_style'),
1346
+ 'live_method' => 'css',
1347
+ 'type' => 'select',
1348
+ 'choices' => array(
1349
+ 'normal' => __('Normal', 'kadence-woocommerce-email-designer'),
1350
+ 'italic' => __('Italic', 'kadence-woocommerce-email-designer'),
1351
+ ),
1352
+ 'selectors' => array(
1353
+ '#template_body h2' => array('font-style'),
1354
+ '#template_body h2 a' => array('font-style'),
1355
+ ),
1356
+ ),
1357
+ // h2 Font weight
1358
+ 'h2_font_weight' => array(
1359
+ 'title' => __('H2 Font weight', 'kadence-woocommerce-email-designer'),
1360
+ 'control_type' => 'rangevalue',
1361
+ 'section' => 'headings_style',
1362
+ 'default' => Kadence_Woomail_Settings::get_default_value('h2_font_weight'),
1363
+ 'live_method' => 'css',
1364
+ 'selectors' => array(
1365
+ '#template_body h2' => array('font-weight'),
1366
+ '#template_body h2 a' => array('font-weight'),
1367
+ ),
1368
+ 'input_attrs' => array(
1369
+ 'step' => 100,
1370
+ 'min' => 100,
1371
+ 'max' => 900,
1372
+ ),
1373
+ ),
1374
+ // h2 text transform
1375
+ 'h2_text_transform' => array(
1376
+ 'title' => __('H2 Text Transform', 'kadence-woocommerce-email-designer'),
1377
+ 'section' => 'headings_style',
1378
+ 'default' => Kadence_Woomail_Settings::get_default_value('h2_text_transform'),
1379
+ 'live_method' => 'css',
1380
+ 'type' => 'select',
1381
+ 'choices' => array(
1382
+ 'none' => __('None', 'kadence-woocommerce-email-designer'),
1383
+ 'uppercase' => __('Uppercase', 'kadence-woocommerce-email-designer'),
1384
+ 'lowercase' => __('Lowercase', 'kadence-woocommerce-email-designer'),
1385
+ 'capitalize' => __('Capitalize', 'kadence-woocommerce-email-designer'),
1386
+ ),
1387
+ 'selectors' => array(
1388
+ '#template_body h2' => array('text-transform'),
1389
+ ),
1390
+ ),
1391
+ // H2 color
1392
+ 'h2_color' => array(
1393
+ 'title' => __('H2 Color', 'kadence-woocommerce-email-designer'),
1394
+ 'section' => 'headings_style',
1395
+ 'control_type' => 'color',
1396
+ 'default' => Kadence_Woomail_Settings::get_default_value('h2_color'),
1397
+ 'live_method' => 'css',
1398
+ 'selectors' => array(
1399
+ '#template_body h2' => array('color'),
1400
+ '#template_body h2 a' => array('color'),
1401
+ ),
1402
+ ),
1403
+ // h2 text align
1404
+ 'h2_text_align' => array(
1405
+ 'title' => __('H2 Text Align', 'kadence-woocommerce-email-designer'),
1406
+ 'section' => 'headings_style',
1407
+ 'default' => Kadence_Woomail_Settings::get_default_value('h2_text_align'),
1408
+ 'live_method' => 'css',
1409
+ 'type' => 'select',
1410
+ 'choices' => Kadence_Woomail_Settings::get_text_aligns(),
1411
+ 'selectors' => array(
1412
+ '#template_body h2' => array('text-align'),
1413
+ ),
1414
+ ),
1415
+ // h2 style
1416
+ 'h2_style' => array(
1417
+ 'title' => __('H2 Separator', 'kadence-woocommerce-email-designer'),
1418
+ 'section' => 'headings_style',
1419
+ 'default' => Kadence_Woomail_Settings::get_default_value('h2_style'),
1420
+ 'transport' => 'refresh',
1421
+ 'type' => 'select',
1422
+ 'choices' => array(
1423
+ 'none' => __('None', 'kadence-woocommerce-email-designer'),
1424
+ 'below' => __('Separator below', 'kadence-woocommerce-email-designer'),
1425
+ 'above' => __('Separator above', 'kadence-woocommerce-email-designer'),
1426
+ ),
1427
+ ),
1428
+ // separator height
1429
+ 'h2_separator_height' => array(
1430
+ 'title' => __('H2 Separator height', 'kadence-woocommerce-email-designer'),
1431
+ 'section' => 'headings_style',
1432
+ 'control_type' => 'rangevalue',
1433
+ 'default' => Kadence_Woomail_Settings::get_default_value('h2_style'),
1434
+ 'live_method' => 'css',
1435
+ 'type' => 'select',
1436
+ 'input_attrs' => array(
1437
+ 'step' => 1,
1438
+ 'min' => 0,
1439
+ 'max' => 30,
1440
+ ),
1441
+ 'selectors' => array(
1442
+ '.title-style-below #template_body h2' => array('border-bottom-width'),
1443
+ '.title-style-above #template_body h2' => array('border-top-width'),
1444
+ ),
1445
+ ),
1446
+ // h2 style
1447
+ 'h2_separator_style' => array(
1448
+ 'title' => __('H2 Separator Style', 'kadence-woocommerce-email-designer'),
1449
+ 'section' => 'headings_style',
1450
+ 'default' => Kadence_Woomail_Settings::get_default_value('h2_style'),
1451
+ 'live_method' => 'css',
1452
+ 'type' => 'select',
1453
+ 'choices' => array(
1454
+ 'solid' => __('Solid', 'kadence-woocommerce-email-designer'),
1455
+ 'double' => __('Double', 'kadence-woocommerce-email-designer'),
1456
+ 'groove' => __('Groove', 'kadence-woocommerce-email-designer'),
1457
+ 'dotted' => __('Dotted', 'kadence-woocommerce-email-designer'),
1458
+ 'dashed' => __('Dashed', 'kadence-woocommerce-email-designer'),
1459
+ 'ridge' => __('Ridge', 'kadence-woocommerce-email-designer'),
1460
+ ),
1461
+ 'selectors' => array(
1462
+ '.title-style-below #template_body h2' => array('border-bottom-style'),
1463
+ '.title-style-above #template_body h2' => array('border-top-style'),
1464
+ ),
1465
+ ),
1466
+ // separator color
1467
+ 'h2_separator_color' => array(
1468
+ 'title' => __('H2 Separator Color', 'kadence-woocommerce-email-designer'),
1469
+ 'section' => 'headings_style',
1470
+ 'control_type' => 'color',
1471
+ 'default' => Kadence_Woomail_Settings::get_default_value('h2_separator_color'),
1472
+ 'live_method' => 'css',
1473
+ 'selectors' => array(
1474
+ '.title-style-below #template_body h2' => array('border-bottom-color'),
1475
+ '.title-style-above #template_body h2' => array('border-top-color'),
1476
+ ),
1477
+ ),
1478
+ // H3 TEXT STYLE
1479
+ //h3 Info
1480
+ 'h3_font_info' => array(
1481
+ 'title' => __('H3 Settings', 'kadence-woocommerce-email-designer'),
1482
+ 'section' => 'headings_style',
1483
+ 'control_type' => 'kwdinfoblock',
1484
+ 'description' => '',
1485
+ ),
1486
+ // Font size
1487
+ 'h3_font_size' => array(
1488
+ 'title' => __('H3 Font Size', 'kadence-woocommerce-email-designer'),
1489
+ 'control_type' => 'rangevalue',
1490
+ 'section' => 'headings_style',
1491
+ 'default' => Kadence_Woomail_Settings::get_default_value('h3_font_size'),
1492
+ 'live_method' => 'css',
1493
+ 'selectors' => array(
1494
+ '#template_body h3' => array('font-size'),
1495
+ ),
1496
+ 'input_attrs' => array(
1497
+ 'step' => 1,
1498
+ 'min' => 8,
1499
+ 'max' => 30,
1500
+ ),
1501
+ ),
1502
+ // h3 Line Height
1503
+ 'h3_line_height' => array(
1504
+ 'title' => __('H3 Line Height', 'kadence-woocommerce-email-designer'),
1505
+ 'control_type' => 'rangevalue',
1506
+ 'section' => 'headings_style',
1507
+ 'default' => Kadence_Woomail_Settings::get_default_value('h2_line_height'),
1508
+ 'live_method' => 'css',
1509
+ 'selectors' => array(
1510
+ '#template_body h3' => array('line-height'),
1511
+ ),
1512
+ 'input_attrs' => array(
1513
+ 'step' => 1,
1514
+ 'min' => 10,
1515
+ 'max' => 90,
1516
+ ),
1517
+ ),
1518
+ // h3 Font family
1519
+ 'h3_font_family' => array(
1520
+ 'title' => __('H3 Font Family', 'kadence-woocommerce-email-designer'),
1521
+ 'section' => 'headings_style',
1522
+ 'default' => Kadence_Woomail_Settings::get_default_value('h2_font_family'),
1523
+ 'live_method' => 'css',
1524
+ 'type' => 'select',
1525
+ 'choices' => Kadence_Woomail_Settings::get_font_families(),
1526
+ 'selectors' => array(
1527
+ '#template_body h3' => array('font-family'),
1528
+ ),
1529
+ ),
1530
+ // h3 Font style
1531
+ 'h3_font_style' => array(
1532
+ 'title' => __('H3 Font Style', 'kadence-woocommerce-email-designer'),
1533
+ 'section' => 'headings_style',
1534
+ 'default' => Kadence_Woomail_Settings::get_default_value('h3_font_style'),
1535
+ 'live_method' => 'css',
1536
+ 'type' => 'select',
1537
+ 'choices' => array(
1538
+ 'normal' => __('Normal', 'kadence-woocommerce-email-designer'),
1539
+ 'italic' => __('Italic', 'kadence-woocommerce-email-designer'),
1540
+ ),
1541
+ 'selectors' => array(
1542
+ '#template_body h3' => array('font-style'),
1543
+ ),
1544
+ ),
1545
+ // h3 Font weight
1546
+ 'h3_font_weight' => array(
1547
+ 'title' => __('H3 Font weight', 'kadence-woocommerce-email-designer'),
1548
+ 'control_type' => 'rangevalue',
1549
+ 'section' => 'headings_style',
1550
+ 'default' => Kadence_Woomail_Settings::get_default_value('h3_font_weight'),
1551
+ 'live_method' => 'css',
1552
+ 'selectors' => array(
1553
+ '#template_body h3' => array('font-weight'),
1554
+ ),
1555
+ 'input_attrs' => array(
1556
+ 'step' => 100,
1557
+ 'min' => 100,
1558
+ 'max' => 900,
1559
+ ),
1560
+ ),
1561
+ // H3 color
1562
+ 'h3_color' => array(
1563
+ 'title' => __('H3 Color', 'kadence-woocommerce-email-designer'),
1564
+ 'section' => 'headings_style',
1565
+ 'control_type' => 'color',
1566
+ 'default' => Kadence_Woomail_Settings::get_default_value('h3_color'),
1567
+ 'live_method' => 'css',
1568
+ 'selectors' => array(
1569
+ '#template_body h3' => array('color'),
1570
+ ),
1571
+ ),
1572
+ // Order ITEMS
1573
+ 'order_items_style' => array(
1574
+ 'title' => __('Order Table Style', 'kadence-woocommerce-email-designer'),
1575
+ 'section' => 'items_table',
1576
+ 'default' => Kadence_Woomail_Settings::get_default_value('order_items_style'),
1577
+ 'transport' => 'refresh',
1578
+ 'type' => 'select',
1579
+ 'choices' => array(
1580
+ 'normal' => __('Normal', 'kadence-woocommerce-email-designer'),
1581
+ 'light' => __('Light', 'kadence-woocommerce-email-designer'),
1582
+ ),
1583
+ ),
1584
+ // Items table Background color
1585
+ 'items_table_background_color' => array(
1586
+ 'title' => __('Order Table Background color', 'kadence-woocommerce-email-designer'),
1587
+ 'section' => 'items_table',
1588
+ 'control_type' => 'color',
1589
+ 'default' => Kadence_Woomail_Settings::get_default_value('items_table_background_color'),
1590
+ 'live_method' => 'css',
1591
+ 'selectors' => array(
1592
+ '#body_content_inner table.td' => array('background-color'),
1593
+ ),
1594
+ ),
1595
+
1596
+ // Items table Padding
1597
+ 'items_table_padding' => array(
1598
+ 'title' => __('Padding', 'kadence-woocommerce-email-designer'),
1599
+ 'control_type' => 'rangevalue',
1600
+ 'section' => 'items_table',
1601
+ 'default' => Kadence_Woomail_Settings::get_default_value('items_table_padding'),
1602
+ 'live_method' => 'css',
1603
+ 'selectors' => array(
1604
+ '.order-items-normal #body_content_inner table.td th' => array('padding'),
1605
+ '.order-items-normal #body_content_inner table.td td' => array('padding'),
1606
+ '.order-items-light #body_content_inner table.td th' => array('padding-top', 'padding-bottom'),
1607
+ '.order-items-light #body_content_inner table.td td' => array('padding-top', 'padding-bottom'),
1608
+ ),
1609
+ 'input_attrs' => array(
1610
+ 'step' => 1,
1611
+ 'min' => 0,
1612
+ 'max' => 50,
1613
+ ),
1614
+ ),
1615
+
1616
+ // Items table Border width
1617
+ 'items_table_border_width' => array(
1618
+ 'title' => __('Border Width', 'kadence-woocommerce-email-designer'),
1619
+ 'control_type' => 'rangevalue',
1620
+ 'section' => 'items_table',
1621
+ 'default' => Kadence_Woomail_Settings::get_default_value('items_table_border_width'),
1622
+ 'live_method' => 'css',
1623
+ 'selectors' => array(
1624
+ '#body_content_inner .td' => array('border-width'),
1625
+ ),
1626
+ 'input_attrs' => array(
1627
+ 'step' => 1,
1628
+ 'min' => 0,
1629
+ 'max' => 10,
1630
+ ),
1631
+ ),
1632
+
1633
+ // Items table Border color
1634
+ 'items_table_border_color' => array(
1635
+ 'title' => __('Border Color', 'kadence-woocommerce-email-designer'),
1636
+ 'section' => 'items_table',
1637
+ 'control_type' => 'color',
1638
+ 'default' => Kadence_Woomail_Settings::get_default_value('items_table_border_color'),
1639
+ 'live_method' => 'css',
1640
+ 'selectors' => array(
1641
+ '#body_content_inner .td' => array('border-color'),
1642
+ ),
1643
+ ),
1644
+ // tems table border style
1645
+ 'items_table_border_style' => array(
1646
+ 'title' => __('Border Style', 'kadence-woocommerce-email-designer'),
1647
+ 'section' => 'items_table',
1648
+ 'default' => Kadence_Woomail_Settings::get_default_value('items_table_border_style'),
1649
+ 'live_method' => 'css',
1650
+ 'type' => 'select',
1651
+ 'choices' => array(
1652
+ 'solid' => __('Solid', 'kadence-woocommerce-email-designer'),
1653
+ 'double' => __('Double', 'kadence-woocommerce-email-designer'),
1654
+ 'groove' => __('Groove', 'kadence-woocommerce-email-designer'),
1655
+ 'dotted' => __('Dotted', 'kadence-woocommerce-email-designer'),
1656
+ 'dashed' => __('Dashed', 'kadence-woocommerce-email-designer'),
1657
+ 'ridge' => __('Ridge', 'kadence-woocommerce-email-designer'),
1658
+ ),
1659
+ 'selectors' => array(
1660
+ '.order-items-normal #body_content_inner .td' => array('border-style'),
1661
+ '.order-items-light #body_content_inner table.td .td' => array('border-bottom-style'),
1662
+ '.order-items-light #body_content_inner table.td' => array('border-top-style'),
1663
+ ),
1664
+ ),
1665
+ // Order ITEMS
1666
+ 'order_heading_style' => array(
1667
+ 'title' => __('Order Table Heading Style', 'kadence-woocommerce-email-designer'),
1668
+ 'section' => 'items_table',
1669
+ 'default' => Kadence_Woomail_Settings::get_default_value('order_heading_style'),
1670
+ 'transport' => 'refresh',
1671
+ 'type' => 'select',
1672
+ 'choices' => array(
1673
+ 'normal' => __('Normal', 'kadence-woocommerce-email-designer'),
1674
+ 'split' => __('Split', 'kadence-woocommerce-email-designer'),
1675
+ ),
1676
+ ),
1677
+ //addresses Background color
1678
+ 'addresses_background_color' => array(
1679
+ 'title' => __('Address Box Background color', 'kadence-woocommerce-email-designer'),
1680
+ 'section' => 'addresses',
1681
+ 'control_type' => 'color',
1682
+ 'default' => Kadence_Woomail_Settings::get_default_value('addresses_background_color'),
1683
+ 'live_method' => 'css',
1684
+ 'selectors' => array(
1685
+ '#body_content_inner address' => array('background-color'),
1686
+ ),
1687
+ ),
1688
+ // addresses Border width
1689
+ 'addresses_border_width' => array(
1690
+ 'title' => __('Address Box Border Width', 'kadence-woocommerce-email-designer'),
1691
+ 'control_type' => 'rangevalue',
1692
+ 'section' => 'addresses',
1693
+ 'default' => Kadence_Woomail_Settings::get_default_value('addresses_border_width'),
1694
+ 'live_method' => 'css',
1695
+ 'selectors' => array(
1696
+ '#body_content_inner address' => array('border-width'),
1697
+ ),
1698
+ 'input_attrs' => array(
1699
+ 'step' => 1,
1700
+ 'min' => 0,
1701
+ 'max' => 10,
1702
+ ),
1703
+ ),
1704
+ // addresses Border color
1705
+ 'addresses_border_color' => array(
1706
+ 'title' => __('Address Box Border Color', 'kadence-woocommerce-email-designer'),
1707
+ 'section' => 'addresses',
1708
+ 'control_type' => 'color',
1709
+ 'default' => Kadence_Woomail_Settings::get_default_value('addresses_border_color'),
1710
+ 'live_method' => 'css',
1711
+ 'selectors' => array(
1712
+ '#body_content_inner address' => array('border-color'),
1713
+ ),
1714
+ ),
1715
+ // h2 style
1716
+ 'addresses_border_style' => array(
1717
+ 'title' => __('Address Box Border Style', 'kadence-woocommerce-email-designer'),
1718
+ 'section' => 'addresses',
1719
+ 'default' => Kadence_Woomail_Settings::get_default_value('addresses_border_style'),
1720
+ 'live_method' => 'css',
1721
+ 'type' => 'select',
1722
+ 'choices' => array(
1723
+ 'solid' => __('Solid', 'kadence-woocommerce-email-designer'),
1724
+ 'double' => __('Double', 'kadence-woocommerce-email-designer'),
1725
+ 'groove' => __('Groove', 'kadence-woocommerce-email-designer'),
1726
+ 'dotted' => __('Dotted', 'kadence-woocommerce-email-designer'),
1727
+ 'dashed' => __('Dashed', 'kadence-woocommerce-email-designer'),
1728
+ 'ridge' => __('Ridge', 'kadence-woocommerce-email-designer'),
1729
+ ),
1730
+ 'selectors' => array(
1731
+ '#body_content_inner address' => array('border-style'),
1732
+ ),
1733
+ ),
1734
+ // addresses color
1735
+ 'addresses_text_color' => array(
1736
+ 'title' => __('Address Box Text Color', 'kadence-woocommerce-email-designer'),
1737
+ 'section' => 'addresses',
1738
+ 'control_type' => 'color',
1739
+ 'default' => Kadence_Woomail_Settings::get_default_value('addresses_text_color'),
1740
+ 'live_method' => 'css',
1741
+ 'selectors' => array(
1742
+ '#body_content_inner address' => array('color'),
1743
+ ),
1744
+ ),
1745
+ // addresses text align
1746
+ 'addresses_text_align' => array(
1747
+ 'title' => __('Address Box Text Align', 'kadence-woocommerce-email-designer'),
1748
+ 'section' => 'addresses',
1749
+ 'default' => Kadence_Woomail_Settings::get_default_value('addresses_text_align'),
1750
+ 'live_method' => 'css',
1751
+ 'type' => 'select',
1752
+ 'choices' => Kadence_Woomail_Settings::get_text_aligns(),
1753
+ 'selectors' => array(
1754
+ '#body_content_inner address' => array('text-align'),
1755
+ ),
1756
+ ),
1757
+ // Footer Background Width
1758
+ 'footer_background_placement' => array(
1759
+ 'title' => __('Footer Background Placement', 'kadence-woocommerce-email-designer'),
1760
+ 'section' => 'footer_style',
1761
+ 'default' => Kadence_Woomail_Settings::get_default_value('footer_background_placement'),
1762
+ 'transport' => 'refresh',
1763
+ 'type' => 'select',
1764
+ 'choices' => array(
1765
+ 'inside' => __('Inside Body Container', 'kadence-woocommerce-email-designer'),
1766
+ 'outside' => __('Outside Body Container', 'kadence-woocommerce-email-designer'),
1767
+ ),
1768
+ ),
1769
+ // Footer Background Color
1770
+ 'footer_background_color' => array(
1771
+ 'title' => __('Footer Background Color', 'kadence-woocommerce-email-designer'),
1772
+ 'section' => 'footer_style',
1773
+ 'control_type' => 'color',
1774
+ 'default' => Kadence_Woomail_Settings::get_default_value('footer_background_color'),
1775
+ 'live_method' => 'css',
1776
+ 'selectors' => array(
1777
+ '#template_footer_container' => array('background-color'),
1778
+ ),
1779
+ ),
1780
+ // Footer Top Padding
1781
+ 'footer_top_padding' => array(
1782
+ 'title' => __('Top Padding', 'kadence-woocommerce-email-designer'),
1783
+ 'control_type' => 'rangevalue',
1784
+ 'section' => 'footer_style',
1785
+ 'default' => Kadence_Woomail_Settings::get_default_value('footer_top_padding'),
1786
+ 'live_method' => 'css',
1787
+ 'selectors' => array(
1788
+ '#template_footer' => array('padding-top'),
1789
+ ),
1790
+ 'input_attrs' => array(
1791
+ 'step' => 1,
1792
+ 'min' => 0,
1793
+ 'max' => 150,
1794
+ ),
1795
+ ),
1796
+ // Footer Bottom Padding
1797
+ 'footer_bottom_padding' => array(
1798
+ 'title' => __('Bottom Padding', 'kadence-woocommerce-email-designer'),
1799
+ 'control_type' => 'rangevalue',
1800
+ 'section' => 'footer_style',
1801
+ 'default' => Kadence_Woomail_Settings::get_default_value('footer_bottom_padding'),
1802
+ 'live_method' => 'css',
1803
+ 'selectors' => array(
1804
+ '#template_footer' => array('padding-bottom'),
1805
+ ),
1806
+ 'input_attrs' => array(
1807
+ 'step' => 1,
1808
+ 'min' => 0,
1809
+ 'max' => 150,
1810
+ ),
1811
+ ),
1812
+ // Footer left and right Padding
1813
+ 'footer_left_right_padding' => array(
1814
+ 'title' => __('Left/Right Padding', 'kadence-woocommerce-email-designer'),
1815
+ 'control_type' => 'rangevalue',
1816
+ 'section' => 'footer_style',
1817
+ 'default' => Kadence_Woomail_Settings::get_default_value('footer_left_right_padding'),
1818
+ 'live_method' => 'css',
1819
+ 'selectors' => array(
1820
+ '#template_footer' => array('padding-left', 'padding-right'),
1821
+ ),
1822
+ 'input_attrs' => array(
1823
+ 'step' => 1,
1824
+ 'min' => 0,
1825
+ 'max' => 150,
1826
+ ),
1827
+ ),
1828
+ // Footer social repeater
1829
+ 'footer_social_repeater' => array(
1830
+ 'title' => __('Footer Social Options', 'kadence-woocommerce-email-designer'),
1831
+ 'control_type' => 'repeater',
1832
+ 'transport' => 'refresh',
1833
+ 'section' => 'footer_social',
1834
+ 'default' => Kadence_Woomail_Settings::get_default_value( 'social_options' ),
1835
+ 'customizer_repeater_image_control' => true,
1836
+ 'customizer_repeater_icon_control' => true,
1837
+ 'customizer_repeater_icon_color' => true,
1838
+ 'customizer_repeater_title_control' => true,
1839
+ 'customizer_repeater_link_control' => true,
1840
+ 'santitize_callback' => 'customizer_repeater_sanitize'
1841
+ ),
1842
+ // Footer Social Title Color
1843
+ 'footer_social_title_color' => array(
1844
+ 'title' => __('Footer Social Title Color', 'kadence-woocommerce-email-designer'),
1845
+ 'section' => 'footer_social',
1846
+ 'default' => Kadence_Woomail_Settings::get_default_value('footer_social_title_color'),
1847
+ 'live_method' => 'css',
1848
+ 'selectors' => array(
1849
+ '#template_footer a.ft-social-link' => array('color'),
1850
+ ),
1851
+ 'control_type' => 'color',
1852
+ ),
1853
+ // Footer Social Title Font size
1854
+ 'footer_social_title_size' => array(
1855
+ 'title' => __('Footer Social Title Font Size', 'kadence-woocommerce-email-designer'),
1856
+ 'control_type' => 'rangevalue',
1857
+ 'section' => 'footer_social',
1858
+ 'default' => Kadence_Woomail_Settings::get_default_value('footer_social_title_font_size'),
1859
+ 'live_method' => 'css',
1860
+ 'selectors' => array(
1861
+ '#template_footer .ft-social-title' => array('font-size'),
1862
+ ),
1863
+ 'input_attrs' => array(
1864
+ 'step' => 1,
1865
+ 'min' => 8,
1866
+ 'max' => 30,
1867
+ ),
1868
+ ),
1869
+ // Footer Social Title Font family
1870
+ 'footer_social_title_font_family' => array(
1871
+ 'title' => __('Footer Social Title Font Family', 'kadence-woocommerce-email-designer'),
1872
+ 'section' => 'footer_social',
1873
+ 'default' => Kadence_Woomail_Settings::get_default_value('footer_social_title_font_family'),
1874
+ 'live_method' => 'css',
1875
+ 'type' => 'select',
1876
+ 'choices' => Kadence_Woomail_Settings::get_font_families(),
1877
+ 'selectors' => array(
1878
+ '#template_footer a.ft-social-link' => array('font-family'),
1879
+ ),
1880
+ ),
1881
+ // Footer Social Title Font weight
1882
+ 'footer_social_title_font_weight' => array(
1883
+ 'title' => __('Footer Social Title Font Weight', 'kadence-woocommerce-email-designer'),
1884
+ 'control_type' => 'rangevalue',
1885
+ 'section' => 'footer_social',
1886
+ 'default' => Kadence_Woomail_Settings::get_default_value('footer_social_title_font_weight'),
1887
+ 'live_method' => 'css',
1888
+ 'selectors' => array(
1889
+ '#template_footer .ft-social-title' => array('font-weight'),
1890
+ ),
1891
+ 'input_attrs' => array(
1892
+ 'step' => 100,
1893
+ 'min' => 100,
1894
+ 'max' => 900,
1895
+ ),
1896
+ ),
1897
+ // Footer Social Top Padding
1898
+ 'footer_social_top_padding' => array(
1899
+ 'title' => __('Top Padding', 'kadence-woocommerce-email-designer'),
1900
+ 'control_type' => 'rangevalue',
1901
+ 'section' => 'footer_social',
1902
+ 'default' => Kadence_Woomail_Settings::get_default_value('footer_social_top_padding'),
1903
+ 'live_method' => 'css',
1904
+ 'selectors' => array(
1905
+ '#footersocial' => array('padding-top'),
1906
+ ),
1907
+ 'input_attrs' => array(
1908
+ 'step' => 1,
1909
+ 'min' => 0,
1910
+ 'max' => 150,
1911
+ ),
1912
+ ),
1913
+ // Footer Social Bottom Padding
1914
+ 'footer_social_bottom_padding' => array(
1915
+ 'title' => __('Bottom Padding', 'kadence-woocommerce-email-designer'),
1916
+ 'control_type' => 'rangevalue',
1917
+ 'section' => 'footer_social',
1918
+ 'default' => Kadence_Woomail_Settings::get_default_value('footer_social_bottom_padding'),
1919
+ 'live_method' => 'css',
1920
+ 'selectors' => array(
1921
+ '#footersocial' => array('padding-bottom'),
1922
+ ),
1923
+ 'input_attrs' => array(
1924
+ 'step' => 1,
1925
+ 'min' => 0,
1926
+ 'max' => 150,
1927
+ ),
1928
+ ),
1929
+ // Footer Social Bottom Border width
1930
+ 'footer_social_border_width' => array(
1931
+ 'title' => __('Footer Social Bottom Border Width', 'kadence-woocommerce-email-designer'),
1932
+ 'control_type' => 'rangevalue',
1933
+ 'section' => 'footer_social',
1934
+ 'default' => Kadence_Woomail_Settings::get_default_value('footer_social_border_width'),
1935
+ 'live_method' => 'css',
1936
+ 'selectors' => array(
1937
+ '#footersocial' => array('border-bottom-width'),
1938
+ ),
1939
+ 'input_attrs' => array(
1940
+ 'step' => 1,
1941
+ 'min' => 0,
1942
+ 'max' => 10,
1943
+ ),
1944
+ ),
1945
+ // Footer Social Bottom Bordercolor
1946
+ 'footer_social_border_color' => array(
1947
+ 'title' => __('Footer Social Bottom Border Color', 'kadence-woocommerce-email-designer'),
1948
+ 'section' => 'footer_social',
1949
+ 'control_type' => 'color',
1950
+ 'default' => Kadence_Woomail_Settings::get_default_value('footer_social_border_color'),
1951
+ 'live_method' => 'css',
1952
+ 'selectors' => array(
1953
+ '#footersocial' => array('border-bottom-color'),
1954
+ ),
1955
+ ),
1956
+ //Footer Social Bottom Border style
1957
+ 'footer_social_border_style' => array(
1958
+ 'title' => __('Footer Social Bottom Border Style', 'kadence-woocommerce-email-designer'),
1959
+ 'section' => 'footer_social',
1960
+ 'default' => Kadence_Woomail_Settings::get_default_value('footer_social_border_style'),
1961
+ 'live_method' => 'css',
1962
+ 'type' => 'select',
1963
+ 'choices' => array(
1964
+ 'solid' => __('Solid', 'kadence-woocommerce-email-designer'),
1965
+ 'double' => __('Double', 'kadence-woocommerce-email-designer'),
1966
+ 'groove' => __('Groove', 'kadence-woocommerce-email-designer'),
1967
+ 'dotted' => __('Dotted', 'kadence-woocommerce-email-designer'),
1968
+ 'dashed' => __('Dashed', 'kadence-woocommerce-email-designer'),
1969
+ 'ridge' => __('Ridge', 'kadence-woocommerce-email-designer'),
1970
+ ),
1971
+ 'selectors' => array(
1972
+ '#footersocial' => array('border-bottom-style'),
1973
+ ),
1974
+ ),
1975
+ // Footer Text align
1976
+ 'footer_text_align' => array(
1977
+ 'title' => __('Text Align', 'kadence-woocommerce-email-designer'),
1978
+ 'section' => 'footer_content',
1979
+ 'default' => Kadence_Woomail_Settings::get_default_value('footer_text_align'),
1980
+ 'live_method' => 'css',
1981
+ 'type' => 'select',
1982
+ 'choices' => Kadence_Woomail_Settings::get_text_aligns(),
1983
+ 'selectors' => array(
1984
+ '#template_footer #credit' => array('text-align'),
1985
+ ),
1986
+ ),
1987
+
1988
+ // Footer Font size
1989
+ 'footer_font_size' => array(
1990
+ 'title' => __('Font Size', 'kadence-woocommerce-email-designer'),
1991
+ 'control_type' => 'rangevalue',
1992
+ 'section' => 'footer_content',
1993
+ 'default' => Kadence_Woomail_Settings::get_default_value('footer_font_size'),
1994
+ 'live_method' => 'css',
1995
+ 'selectors' => array(
1996
+ '#template_footer #credit' => array('font-size'),
1997
+ ),
1998
+ 'input_attrs' => array(
1999
+ 'step' => 1,
2000
+ 'min' => 8,
2001
+ 'max' => 30,
2002
+ ),
2003
+ ),
2004
+ // Footer Font family
2005
+ 'footer_font_family' => array(
2006
+ 'title' => __('Font Family', 'kadence-woocommerce-email-designer'),
2007
+ 'section' => 'footer_content',
2008
+ 'default' => Kadence_Woomail_Settings::get_default_value('footer_font_family'),
2009
+ 'live_method' => 'css',
2010
+ 'type' => 'select',
2011
+ 'choices' => Kadence_Woomail_Settings::get_font_families(),
2012
+ 'selectors' => array(
2013
+ '#template_footer #credit' => array('font-family'),
2014
+ ),
2015
+ ),
2016
+
2017
+ // Footer Font weight
2018
+ 'footer_font_weight' => array(
2019
+ 'title' => __('Font weight', 'kadence-woocommerce-email-designer'),
2020
+ 'control_type' => 'rangevalue',
2021
+ 'section' => 'footer_content',
2022
+ 'default' => Kadence_Woomail_Settings::get_default_value('footer_font_weight'),
2023
+ 'live_method' => 'css',
2024
+ 'selectors' => array(
2025
+ '#template_footer #credit' => array('font-weight'),
2026
+ ),
2027
+ 'input_attrs' => array(
2028
+ 'step' => 100,
2029
+ 'min' => 100,
2030
+ 'max' => 900,
2031
+ ),
2032
+ ),
2033
+
2034
+ // Footer Color
2035
+ 'footer_color' => array(
2036
+ 'title' => __('Text Color', 'kadence-woocommerce-email-designer'),
2037
+ 'section' => 'footer_content',
2038
+ 'control_type' => 'color',
2039
+ 'default' => Kadence_Woomail_Settings::get_default_value('footer_color'),
2040
+ 'live_method' => 'css',
2041
+ 'selectors' => array(
2042
+ '#template_footer #credit' => array('color'),
2043
+ ),
2044
+ ),
2045
+ // Footer credit Top Padding
2046
+ 'footer_credit_top_padding' => array(
2047
+ 'title' => __('Top Padding', 'kadence-woocommerce-email-designer'),
2048
+ 'control_type' => 'rangevalue',
2049
+ 'section' => 'footer_content',
2050
+ 'default' => Kadence_Woomail_Settings::get_default_value('footer_credit_top_padding'),
2051
+ 'live_method' => 'css',
2052
+ 'selectors' => array(
2053
+ '#template_footer #credit' => array('padding-top'),
2054
+ ),
2055
+ 'input_attrs' => array(
2056
+ 'step' => 1,
2057
+ 'min' => 0,
2058
+ 'max' => 150,
2059
+ ),
2060
+ ),
2061
+ // Footer credit Bottom Padding
2062
+ 'footer_credit_bottom_padding' => array(
2063
+ 'title' => __('Bottom Padding', 'kadence-woocommerce-email-designer'),
2064
+ 'control_type' => 'rangevalue',
2065
+ 'section' => 'footer_content',
2066
+ 'default' => Kadence_Woomail_Settings::get_default_value('footer_credit_bottom_padding'),
2067
+ 'live_method' => 'css',
2068
+ 'selectors' => array(
2069
+ '#template_footer #credit' => array('padding-bottom'),
2070
+ ),
2071
+ 'input_attrs' => array(
2072
+ 'step' => 1,
2073
+ 'min' => 0,
2074
+ 'max' => 150,
2075
+ ),
2076
+ ),
2077
+ 'custom_css' => array(
2078
+ 'title' => __('Custom CSS', 'kadence-woocommerce-email-designer'),
2079
+ 'section' => 'custom_styles',
2080
+ 'default' => '',
2081
+ 'type' => 'textarea',
2082
+ 'live_method' => 'replace',
2083
+ 'original' => '',
2084
+ 'selectors' => array(
2085
+ 'style#kadence_woomail_designer_custom_css'
2086
+ ),
2087
+ ),
2088
+ 'import_export' => array(
2089
+ 'title' => __('Import Export', 'kadence-woocommerce-email-designer'),
2090
+ 'section' => 'import_export',
2091
+ 'default' => '',
2092
+ 'control_type' => 'kwdimportexport',
2093
+ ),
2094
+ 'email_recipient' => array(
2095
+ 'title' => __('Preview Email Recipient', 'kadence-woocommerce-email-designer'),
2096
+ 'description' => __( 'Enter recipients (comma separated) for preview emails', 'kadence-woocommerce-email-designer' ),
2097
+ 'section' => 'send_email',
2098
+ 'default' => Kadence_Woomail_Settings::get_default_value('email_recipient'),
2099
+ 'control_type' => 'kwdsendemail',
2100
+ ),
2101
+ );
2102
+ $mainoptions = array_merge($mainoptions, $main);
2103
+ self::$settings = array_merge($extra_email_text, $mainoptions);
2104
+
2105
+ }
2106
+
2107
+ // Return settings
2108
+ return self::$settings;
2109
+ }
2110
+ /**
2111
+ * Get default values
2112
+ *
2113
+ * @access public
2114
+ * @return array
2115
+ */
2116
+ public static function get_default_values() {
2117
+ // Define default values
2118
+ if ( is_null( self::$default_values ) ) {
2119
+ self::$default_values = array(
2120
+ 'preview_order_id' => 'mockup',
2121
+ 'email_type' => 'new_order',
2122
+ 'email_templates' => 'default',
2123
+
2124
+ 'body_background_color' => '#fdfdfd',
2125
+ 'border_radius' => '3',
2126
+ 'border_width' => '1',
2127
+ 'border_color' => '#dedede',
2128
+ 'shadow' => '1',
2129
+ 'content_width' => '600',
2130
+ 'email_padding' => '70',
2131
+ 'background_color' => '#ffffff',
2132
+
2133
+ 'header_image_maxwidth' => '300',
2134
+ 'header_image_align' => 'center',
2135
+ 'header_image_background_color' => 'transparent',
2136
+ 'header_image_padding_top_bottom' => '0',
2137
+
2138
+ // Subscription Email Text Defaults
2139
+ 'new_renewal_order_heading' => __( 'New customer order', 'kadence-woocommerce-email-designer' ),
2140
+ 'new_renewal_order_subject' => __( '[{site_title}] New customer order ({order_number}) - {order_date}', 'kadence-woocommerce-email-designer' ),
2141
+ 'new_renewal_order_body' => __( 'You have received a subscription renewal order from {customer_full_name}. Their order is as follows:', 'kadence-woocommerce-email-designer' ),
2142
+ 'customer_processing_renewal_order_heading' => __( 'Thank you for your order', 'kadence-woocommerce-email-designer' ),
2143
+ 'customer_processing_renewal_order_subject' => __( 'Your {site_title} order receipt from {order_date}', 'kadence-woocommerce-email-designer' ),
2144
+ 'customer_processing_renewal_order_body' => __( 'Your subscription renewal order has been received and is now being processed. Your order details are shown below for your reference:', 'kadence-woocommerce-email-designer' ),
2145
+ 'customer_completed_renewal_order_heading' => __( 'Your order is complete', 'kadence-woocommerce-email-designer' ),
2146
+ 'customer_completed_renewal_order_subject' => __( 'Your {site_title} order from {order_date} is complete', 'kadence-woocommerce-email-designer' ),
2147
+ 'customer_completed_renewal_order_body' => __( 'Hi there. Your subscription renewal order with {site_title} has been completed. Your order details are shown below for your reference:', 'kadence-woocommerce-email-designer' ),
2148
+ 'customer_completed_switch_order_heading' => __( 'Your order is complete', 'kadence-woocommerce-email-designer' ),
2149
+ 'customer_completed_switch_order_subject' => __( 'Your {site_title} order from {order_date} is complete', 'kadence-woocommerce-email-designer' ),
2150
+ 'customer_completed_switch_order_body' => __( 'Hi there. You have successfully changed your subscription items on {site_title}. Your new order and subscription details are shown below for your reference:', 'kadence-woocommerce-email-designer' ),
2151
+
2152
+ 'customer_renewal_invoice_heading' => __( 'Invoice for order {order_number}', 'kadence-woocommerce-email-designer' ),
2153
+ 'customer_renewal_invoice_subject' => __( 'Invoice for order {order_number}', 'kadence-woocommerce-email-designer' ),
2154
+ 'customer_renewal_invoice_body' => __( 'An invoice has been created for you to renew your subscription with {site_title}. To pay for this invoice please use the following link: {invoice_pay_link}', 'kadence-woocommerce-email-designer' ),
2155
+ 'customer_renewal_invoice_body_failed' => __( 'The automatic payment to renew your subscription with {site_title} has failed. To reactivate the subscription, please login and pay for the renewal from your account page: {invoice_pay_link}', 'kadence-woocommerce-email-designer' ),
2156
+
2157
+
2158
+ 'cancelled_subscription_heading' => __( 'Subscription Cancelled', 'kadence-woocommerce-email-designer' ),
2159
+ 'cancelled_subscription_subject' => __( '[{site_title}] Subscription Cancelled', 'kadence-woocommerce-email-designer' ),
2160
+ 'cancelled_subscription_body' => __( 'A subscription belonging to {customer_full_name} has been cancelled. Their subscription\'s details are as follows:', 'kadence-woocommerce-email-designer' ),
2161
+
2162
+
2163
+ 'customer_payment_retry_heading' => __( 'Automatic payment failed for order {order_number}', 'kadence-woocommerce-email-designer' ),
2164
+ 'customer_payment_retry_subject' => __( 'Automatic payment failed for {order_number}, we will retry {retry_time}', 'kadence-woocommerce-email-designer' ),
2165
+ // Email Text Defaults
2166
+ 'new_order_heading' => __( 'New customer order', 'kadence-woocommerce-email-designer' ),
2167
+ 'cancelled_order_heading' => __( 'Cancelled order', 'kadence-woocommerce-email-designer' ),
2168
+ 'customer_processing_order_heading' => __( 'Thank you for your order', 'kadence-woocommerce-email-designer' ),
2169
+ 'customer_completed_order_heading' => __( 'Your order is complete', 'kadence-woocommerce-email-designer' ),
2170
+ 'customer_refunded_order_heading_full' => __( 'Order {order_number} details', 'kadence-woocommerce-email-designer' ),
2171
+ 'customer_refunded_order_heading_partial' => __( 'Your order has been partially refunded', 'kadence-woocommerce-email-designer' ),
2172
+
2173
+ 'customer_on_hold_order_heading' => __( 'Thank you for your order', 'kadence-woocommerce-email-designer' ),
2174
+ 'customer_invoice_heading' => __( 'Invoice for order {order_number}', 'kadence-woocommerce-email-designer' ),
2175
+ 'customer_invoice_heading_paid' => __( 'Your order details', 'kadence-woocommerce-email-designer' ),
2176
+ 'failed_order_heading' => __( 'Failed order', 'kadence-woocommerce-email-designer' ),
2177
+ 'customer_new_account_heading' => __( 'Welcome to {site_title}', 'kadence-woocommerce-email-designer' ),
2178
+ 'customer_note_heading' => __( 'A note has been added to your order', 'kadence-woocommerce-email-designer' ),
2179
+ 'customer_reset_password_heading' => __( 'Password reset instructions', 'kadence-woocommerce-email-designer' ),
2180
+
2181
+ 'new_order_subject' => __( '[{site_title}] New customer order ({order_number}) - {order_date}', 'kadence-woocommerce-email-designer' ),
2182
+ 'cancelled_order_subject' => __( '[{site_title}] Cancelled order ({order_number})', 'kadence-woocommerce-email-designer' ),
2183
+ 'customer_processing_order_subject' => __( 'Your {site_title} order receipt from {order_date}', 'kadence-woocommerce-email-designer' ),
2184
+ 'customer_completed_order_subject' => __( 'Your {site_title} order from {order_date} is complete', 'kadence-woocommerce-email-designer' ),
2185
+
2186
+ 'customer_refunded_order_subject_full' => __( 'Your {site_title} order from {order_date} has been refunded', 'kadence-woocommerce-email-designer' ),
2187
+ 'customer_refunded_order_subject_partial' => __( 'Your {site_title} order from {order_date} has been partially refunded', 'kadence-woocommerce-email-designer' ),
2188
+
2189
+ 'customer_on_hold_order_subject' => __( 'Your {site_title} order receipt from {order_date}', 'kadence-woocommerce-email-designer' ),
2190
+
2191
+ 'customer_invoice_subject' => __( 'Invoice for order {order_number}', 'kadence-woocommerce-email-designer' ),
2192
+ 'customer_invoice_subject_paid' => __( 'Your {site_title} order from {order_date}', 'kadence-woocommerce-email-designer' ),
2193
+
2194
+ 'failed_order_subject' => __( '[{site_title}] Failed order ({order_number})', 'kadence-woocommerce-email-designer' ),
2195
+ 'customer_new_account_subject' => __( 'Your account on {site_title}', 'kadence-woocommerce-email-designer' ),
2196
+ 'customer_note_subject' => __( 'Note added to your {site_title} order from {order_date}', 'kadence-woocommerce-email-designer' ),
2197
+ 'customer_reset_password_subject' => __( 'Password reset for {site_title}', 'kadence-woocommerce-email-designer' ),
2198
+
2199
+ 'new_order_body' => __( 'You have received an order from {customer_full_name}. The order is as follows:', 'kadence-woocommerce-email-designer' ),
2200
+ 'cancelled_order_body' => __( 'The order {order_number} from {customer_full_name} has been cancelled. The order was as follows:', 'kadence-woocommerce-email-designer' ),
2201
+ 'customer_processing_order_body' => __( 'Your order has been received and is now being processed. Your order details are shown below for your reference:', 'kadence-woocommerce-email-designer' ),
2202
+ 'customer_completed_order_body' => __( 'Hi there. Your recent order on {site_title} has been completed. Your order details are shown below for your reference:', 'kadence-woocommerce-email-designer' ),
2203
+ 'customer_refunded_order_switch' => true,
2204
+ 'customer_refunded_order_body_full' => __( 'Hi there. Your order on {site_title} has been refunded.', 'kadence-woocommerce-email-designer' ),
2205
+ 'customer_refunded_order_body_partial' => __( 'Hi there. Your order on {site_title} has been partially refunded.', 'kadence-woocommerce-email-designer' ),
2206
+
2207
+ 'customer_on_hold_order_body' => __( 'Your order is on-hold until we confirm payment has been received. Your order details are shown below for your reference:', 'kadence-woocommerce-email-designer' ),
2208
+ 'customer_invoice_switch' => true,
2209
+ 'customer_invoice_body' => __( 'An order has been created for you on {site_title}. {invoice_pay_link}', 'kadence-woocommerce-email-designer' ),
2210
+ 'customer_invoice_body_paid' => '',
2211
+ 'failed_order_body' => __( 'Payment for order {order_number} from {customer_full_name} has failed. The order was as follows:', 'kadence-woocommerce-email-designer' ),
2212
+ 'customer_new_account_body' => __( 'Thanks for creating an account on {site_title}. Your username is {customer_username}', 'kadence-woocommerce-email-designer' ),
2213
+ 'customer_note_body' => __( 'Hello, a note has just been added to your order:', 'kadence-woocommerce-email-designer' ),
2214
+ 'customer_reset_password_body' => __( 'Someone requested that the password be reset for the following account:
2215
+
2216
+ Username: {customer_username}
2217
+
2218
+ If this was a mistake, just ignore this email and nothing will happen.
2219
+
2220
+ To reset your password, visit the following address:', 'kadence-woocommerce-email-designer' ),
2221
+
2222
+
2223
+ 'header_background_color' => get_option( 'woocommerce_email_base_color' ),
2224
+ 'header_text_align' => 'left',
2225
+ 'header_padding_top_bottom' => '36',
2226
+ 'header_padding_left_right' => '48',
2227
+
2228
+ 'heading_font_size' => '30',
2229
+ 'heading_line_height' => '40',
2230
+ 'heading_font_family' => 'helvetica',
2231
+ 'heading_font_style' => 'normal',
2232
+ 'heading_color' => '#ffffff',
2233
+ 'heading_font_weight' => '300',
2234
+
2235
+ 'subtitle_placement' => 'below',
2236
+ 'subtitle_font_size' => '18',
2237
+ 'subtitle_line_height' => '24',
2238
+ 'subtitle_font_family' => 'helvetica',
2239
+ 'subtitle_font_style' => 'normal',
2240
+ 'subtitle_color' => '#ffffff',
2241
+ 'subtitle_font_weight' => '300',
2242
+
2243
+ 'content_padding' => '48',
2244
+ 'content_padding_bottom' => '0',
2245
+
2246
+ 'text_color' => '#737373',
2247
+ 'font_family' => 'helvetica',
2248
+ 'font_size' => '14',
2249
+ 'line_height' => '24',
2250
+ 'font_weight' => '400',
2251
+ 'link_color' => get_option( 'woocommerce_email_base_color' ),
2252
+
2253
+ 'h2_font_size' => '18',
2254
+ 'h2_line_height' => '26',
2255
+ 'h2_font_family' => 'helvetica',
2256
+ 'h3_font_style' => 'normal',
2257
+ 'h2_color' => get_option( 'woocommerce_email_base_color' ),
2258
+ 'h2_font_weight' => '700',
2259
+ 'h2_margin_bottom' => '18',
2260
+ 'h2_padding_top' => '0',
2261
+ 'h2_margin_top' => '0',
2262
+ 'h2_padding_bottom' => '0',
2263
+ 'h2_text_transform' => 'none',
2264
+
2265
+ 'h2_separator_color' => get_option( 'woocommerce_email_base_color' ),
2266
+ 'h2_separator_height' => '1',
2267
+ 'h2_separator_style' => 'solid',
2268
+
2269
+ 'h3_font_size' => '16',
2270
+ 'h3_line_height' => '20',
2271
+ 'h3_font_family' => 'helvetica',
2272
+ 'h3_font_style' => 'normal',
2273
+ 'h3_color' => '#787878',
2274
+ 'h3_font_weight' => '500',
2275
+
2276
+ 'order_items_style' => 'normal',
2277
+ 'items_table_border_width' => '1',
2278
+ 'items_table_border_color' => '#e4e4e4',
2279
+ 'items_table_border_style' => 'solid',
2280
+ 'items_table_background_color' => '',
2281
+ 'items_table_padding' => '12',
2282
+ 'order_heading_style' => 'normal',
2283
+
2284
+ 'addresses_border_width' => '1',
2285
+ 'addresses_border_color' => '#e5e5e5',
2286
+ 'addresses_border_style' => 'solid',
2287
+ 'addresses_background_color' => '',
2288
+ 'addresses_text_color' => '#8f8f8f',
2289
+ 'addresses_text_align' => 'left',
2290
+
2291
+ 'footer_background_placement' => 'inside',
2292
+ 'footer_background_color' => '',
2293
+
2294
+ 'footer_top_padding' => '0',
2295
+ 'footer_bottom_padding' => '48',
2296
+ 'footer_left_right_padding' => '48',
2297
+
2298
+ 'footer_social_title_color' => '#000000',
2299
+ 'footer_social_title_font_family' => 'helvetica',
2300
+ 'footer_social_title_font_size' => '18',
2301
+ 'footer_social_title_font_weight' => '400',
2302
+ 'footer_social_top_padding' => '0',
2303
+ 'footer_social_bottom_padding' => '0',
2304
+ 'footer_social_border_width' => '0',
2305
+ 'footer_social_border_color' => '#dddddd',
2306
+ 'footer_social_border_style' => 'solid',
2307
+
2308
+ 'footer_text_align' => 'center',
2309
+ 'footer_font_size' => '12',
2310
+ 'footer_font_family' => 'helvetica',
2311
+ 'footer_color' => '#555555',
2312
+ 'footer_font_weight' => '400',
2313
+ 'footer_credit_bottom_padding' => '0',
2314
+ 'footer_credit_top_padding' => '0',
2315
+
2316
+ 'items_table_border_width' => '1',
2317
+ 'items_table_border_color' => '#e4e4e4',
2318
+ 'footer_content_text' => get_option( 'woocommerce_email_footer_text', '' ),
2319
+ 'email_recipient' => get_option( 'admin_email' ),
2320
+ );
2321
+ }
2322
+
2323
+ // Return default values
2324
+ return self::$default_values;
2325
+ }
2326
+
2327
+ /**
2328
+ * Get default values
2329
+ *
2330
+ * @access public
2331
+ * @param string $key
2332
+ * @return string
2333
+ */
2334
+ public static function get_default_value( $key ) {
2335
+ // Get default values
2336
+ $default_values = Kadence_Woomail_Settings::get_default_values();
2337
+
2338
+ // Check if such key exists and return default value
2339
+ return isset($default_values[$key]) ? $default_values[$key] : '';
2340
+ }
2341
+
2342
+ /**
2343
+ * Get border styles
2344
+ *
2345
+ * @access public
2346
+ * @return array
2347
+ */
2348
+ public static function get_border_styles() {
2349
+ return array(
2350
+ 'none' => __('none', 'kadence-woocommerce-email-designer'),
2351
+ 'hidden' => __('hidden', 'kadence-woocommerce-email-designer'),
2352
+ 'dotted' => __('dotted', 'kadence-woocommerce-email-designer'),
2353
+ 'dashed' => __('dashed', 'kadence-woocommerce-email-designer'),
2354
+ 'solid' => __('solid', 'kadence-woocommerce-email-designer'),
2355
+ 'double' => __('double', 'kadence-woocommerce-email-designer'),
2356
+ 'groove' => __('groove', 'kadence-woocommerce-email-designer'),
2357
+ 'ridge' => __('ridge', 'kadence-woocommerce-email-designer'),
2358
+ 'inset' => __('inset', 'kadence-woocommerce-email-designer'),
2359
+ 'outset' => __('outset', 'kadence-woocommerce-email-designer'),
2360
+ );
2361
+ }
2362
+
2363
+ /**
2364
+ * Get text align options
2365
+ *
2366
+ * @access public
2367
+ * @return array
2368
+ */
2369
+ public static function get_text_aligns() {
2370
+ return array(
2371
+ 'left' => __('Left', 'kadence-woocommerce-email-designer'),
2372
+ 'center' => __('Center', 'kadence-woocommerce-email-designer'),
2373
+ 'right' => __('Right', 'kadence-woocommerce-email-designer'),
2374
+ 'justify' => __('Justify', 'kadence-woocommerce-email-designer'),
2375
+ );
2376
+ }
2377
+ public static function get_image_aligns() {
2378
+ return array(
2379
+ 'left' => __('Left', 'kadence-woocommerce-email-designer'),
2380
+ 'center' => __('Center', 'kadence-woocommerce-email-designer'),
2381
+ 'right' => __('Right', 'kadence-woocommerce-email-designer'),
2382
+ );
2383
+ }
2384
+ /**
2385
+ * Get Order Ids
2386
+ *
2387
+ * @access public
2388
+ * @return array
2389
+ */
2390
+ public static function get_order_ids() {
2391
+ if ( is_null( self::$order_ids ) ) {
2392
+ //self::$order_ids
2393
+ $order_array = array();
2394
+ $order_array['mockup'] = __('Mockup Order', 'kadence-woocommerce-email-designer');
2395
+ $orders = new WP_Query( array(
2396
+ 'post_type' => 'shop_order',
2397
+ 'post_status' => array_keys( wc_get_order_statuses() ),
2398
+ 'posts_per_page' => 20,
2399
+ ));
2400
+ if ( $orders->posts ) {
2401
+ foreach ( $orders->posts as $order ) {
2402
+ // Get order object.
2403
+ $order_object = new WC_Order( $order->ID );
2404
+ $order_array[ $order_object->get_id() ] = $order_object->get_id().' - '.$order_object->get_billing_first_name().' '.$order_object->get_billing_last_name();
2405
+ }
2406
+ }
2407
+ self::$order_ids = $order_array;
2408
+ }
2409
+ return self::$order_ids;
2410
+ }
2411
+ /**
2412
+ * Get font families
2413
+ *
2414
+ * @access public
2415
+ * @return array
2416
+ */
2417
+ public static function get_font_families() {
2418
+ return apply_filters( 'kadence_woomail_email_font_families', Kadence_Woomail_Settings::$font_family_mapping );
2419
+ }
2420
+ /**
2421
+ * Get Email Types
2422
+ *
2423
+ * @access public
2424
+ * @return array
2425
+ */
2426
+ public static function get_email_types() {
2427
+ if ( is_null( self::$email_types ) ) {
2428
+ $types = Kadence_Woomail_Settings::$email_types_mapping;
2429
+ if ( class_exists( 'WC_Subscriptions' ) ) {
2430
+ $types = array_merge($types, Kadence_Woomail_Settings::$subscription_email_types_mapping );
2431
+ }
2432
+
2433
+ self::$email_types = apply_filters( 'kadence_woomail_email_types', $types );
2434
+ }
2435
+
2436
+ return self::$email_types;
2437
+ }
2438
+
2439
+ /**
2440
+ * Get Email Types
2441
+ *
2442
+ * @access public
2443
+ * @return array
2444
+ */
2445
+ public static function get_customized_email_types() {
2446
+ if ( is_null( self::$email_types ) ) {
2447
+ $types = Kadence_Woomail_Settings::$email_types_mapping;
2448
+ if ( class_exists( 'WC_Subscriptions' ) ) {
2449
+ $types = array_merge($types, Kadence_Woomail_Settings::$subscription_email_types_mapping );
2450
+ }
2451
+
2452
+ self::$email_types = apply_filters( 'kadence_woomail_customized_email_types', $types );
2453
+ }
2454
+
2455
+ return self::$email_types;
2456
+ }
2457
+
2458
+ /**
2459
+ * Get Email Templates
2460
+ *
2461
+ * @access public
2462
+ * @return array
2463
+ */
2464
+ public static function get_email_templates() {
2465
+ return apply_filters( 'kadence_woomail_prebuilt_email_templates_settings', Kadence_Woomail_Settings::$prebuilt_templates_mapping );
2466
+ }
2467
+
2468
+
2469
+ }
2470
+ }
includes/class-kadence-woomail-woo.php ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if (!defined('ABSPATH')) {
5
+ exit;
6
+ }
7
+
8
+ /**
9
+ * Integration with WooCommerce Settings Page
10
+ *
11
+ */
12
+ if ( ! class_exists( 'Kadence_Woomail_Woo' ) ) {
13
+
14
+ class Kadence_Woomail_Woo {
15
+
16
+ /**
17
+ * @var null
18
+ */
19
+ private static $instance = null;
20
+
21
+ /**
22
+ * Instance Control
23
+ */
24
+ public static function get_instance() {
25
+ if ( is_null( self::$instance ) ) {
26
+ self::$instance = new self();
27
+ }
28
+ return self::$instance;
29
+ }
30
+
31
+ /**
32
+ * Class constructor
33
+ *
34
+ * @access public
35
+ * @return void
36
+ */
37
+ public function __construct() {
38
+
39
+ // Add email Customzier setting to normal woocommerce email settings area.
40
+ add_filter( 'woocommerce_email_settings', array( $this, 'add_mail_customizer_to_woocommerce_email_settings' ) );
41
+
42
+ // Print email Customzier button in normal woocommerce email settings area.
43
+ add_action( 'woocommerce_admin_field_kt_woomail_open_customizer_button', array( $this, 'print_open_customizer_button' ) );
44
+
45
+ }
46
+
47
+ /**
48
+ * Add Open Designer to settings button
49
+ *
50
+ * @access public
51
+ * @param array $settings
52
+ * @return array
53
+ */
54
+ public function add_mail_customizer_to_woocommerce_email_settings($settings) {
55
+
56
+ // Open section
57
+ $settings[] = array(
58
+ 'id' => 'kt_woomail',
59
+ 'type' => 'title',
60
+ 'title' => __('Woocommerce Email Designer', 'kadence-woocommerce-email-designer'),
61
+ );
62
+
63
+ // Add Open Designer button
64
+ $settings[] = array(
65
+ 'id' => 'kt_woomail_open_customizer_button',
66
+ 'type' => 'kt_woomail_open_customizer_button',
67
+ );
68
+
69
+ // Close section
70
+ $settings[] = array(
71
+ 'id' => 'kt_woomail',
72
+ 'type' => 'sectionend',
73
+ );
74
+
75
+ // Return remaining settings
76
+ return $settings;
77
+
78
+ }
79
+
80
+ /**
81
+ * Print Open Designer button
82
+ *
83
+ * @access public
84
+ * @param array $options
85
+ * @return void
86
+ */
87
+ public function print_open_customizer_button( $options ) { ?>
88
+ <tr valign="top">
89
+ <th scope="row" class="titledesc">
90
+ <?php _e('Customize WooCommerce Emails', 'kadence-woocommerce-email-designer'); ?>
91
+ </th>
92
+ <td class="forminp forminp-<?php echo sanitize_title($options['type']); ?>">
93
+ <a href="<?php echo Kadence_Woomail_Customizer::get_customizer_url(); ?>">
94
+ <button type="button" class="button button-secondary" value="<?php _e('Open Woocommerce Email Designer', 'kadence-woocommerce-email-designer'); ?>">
95
+ <?php _e('Open Woocommerce Email Designer', 'kadence-woocommerce-email-designer'); ?>
96
+ </button>
97
+ </a>
98
+ <p class="description"><?php printf(__('Make Woocommerce Emails match your brand. <a href="%s">Kadence Woocommerce Email Designer</a> plugin by <a href="%s">Kadence Themes</a>.', 'kadence-woocommerce-email-designer'), 'https://www.kadencethemes.com/products/kadence-woomail-designer', 'https://www.kadencethemes.com'); ?></p>
99
+ </td>
100
+ </tr>
101
+ <?php
102
+ }
103
+
104
+ /**
105
+ * Get WooCommerce email settings page URL
106
+ *
107
+ * @access public
108
+ * @return string
109
+ */
110
+ public static function get_email_settings_page_url() {
111
+ return admin_url('admin.php?page=wc-settings&tab=email');
112
+ }
113
+
114
+ }
115
+
116
+ Kadence_Woomail_Woo::get_instance();
117
+
118
+ }
index.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+ // Silence is golden.
3
+ ?>
kadence-woocommerce-email-designer.php ADDED
@@ -0,0 +1,489 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Kadence WooCommerce Email Designer
4
+ Plugin URI: http://kadencethemes.com/products/woocommerce-email-designer/
5
+ Description: Customize the default woocommerce email templates design and text through the native WordPress customizer. Preview emails and send test emails.
6
+ Version: 1.0.2
7
+ Author: Kadence Themes
8
+ Author URI: http://kadencethemes.com/
9
+ License: GPLv2 or later
10
+ Text Domain: kadence-woocommerce-email-designer
11
+ */
12
+
13
+ class Kadence_Woomail_Designer {
14
+ /**
15
+ * @var null
16
+ */
17
+ private static $instance = null;
18
+ private static $admin_capability = null;
19
+ private static $overwrite_options = null;
20
+
21
+ /**
22
+ * Instance Control
23
+ */
24
+ public static function get_instance() {
25
+ if ( is_null( self::$instance ) ) {
26
+ self::$instance = new self();
27
+ }
28
+ return self::$instance;
29
+ }
30
+ public function __construct() {
31
+ add_action('plugins_loaded', array( $this, 'on_plugins_loaded' ) );
32
+ }
33
+ public function on_plugins_loaded() {
34
+
35
+ define( 'KT_WOOMAIL_PATH' , realpath( plugin_dir_path(__FILE__) ) . DIRECTORY_SEPARATOR );
36
+ define( 'KT_WOOMAIL_URL' , plugin_dir_url(__FILE__) );
37
+ define( 'KT_WOOMAIL_VERSION' , '1.0.0' );
38
+
39
+ if( ! kadence_woomail_is_woo_active() ) {
40
+ add_action( 'admin_notices', array( $this, 'admin_notice_need_woocommerce' ) );
41
+ return;
42
+ }
43
+ require_once( KT_WOOMAIL_PATH . 'includes/class-kadence-woomail-settings.php'); //Gets all settings
44
+ require_once( KT_WOOMAIL_PATH . 'includes/class-kadence-woomail-customizer.php'); // Gets custom customzier set up
45
+ require_once( KT_WOOMAIL_PATH . 'includes/class-kadence-woomail-import-export.php'); // Adds Customizer control
46
+ require_once( KT_WOOMAIL_PATH . 'includes/class-customizer-range-value-control.php'); // Adds Customizer control
47
+ require_once( KT_WOOMAIL_PATH . 'includes/class-customizer-kwdtemplateload-control.php'); // Adds Customizer control
48
+ require_once( KT_WOOMAIL_PATH . 'includes/class-customizer-kwdsendemail-control.php'); // Adds Customizer control
49
+ require_once( KT_WOOMAIL_PATH . 'includes/class-customizer-repeater-control.php'); // Adds Customizer control
50
+ require_once( KT_WOOMAIL_PATH . 'includes/class-customizer-kwdinfoblock-control.php'); // Adds Customizer control
51
+ require_once( KT_WOOMAIL_PATH . 'includes/class-customizer-kwdimportexport-control.php'); // Adds Customizer control
52
+ require_once( KT_WOOMAIL_PATH . 'includes/class-customizer-toggle-control.php'); // Adds customzier control
53
+ require_once( KT_WOOMAIL_PATH . 'includes/class-kadence-woomail-preview.php'); // Builds the email preview for customzier
54
+ require_once( KT_WOOMAIL_PATH . 'includes/class-kadence-woomail-woo.php'); // Add settings to woocommerce email settings page.
55
+
56
+
57
+ add_action( 'init', array( $this, 'on_init' ) );
58
+ // Add admin menu
59
+ add_action( 'admin_menu', array( $this, 'admin_menu') );
60
+ // Get translation set up
61
+ load_plugin_textdomain( 'kadence-woocommerce-email-designer', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
62
+ // Add link for plugin page
63
+ add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array( $this, 'plugins_page_links' ) );
64
+ }
65
+ public function on_init() {
66
+ // Remove the woocommerce call for email header
67
+ remove_action( 'woocommerce_email_header', array( WC()->mailer(), 'email_header' ) );
68
+
69
+ // Add our custom call for email header
70
+ add_action( 'woocommerce_email_header', array( $this, 'add_email_header' ), 20, 2 );
71
+
72
+ // Use our templates instead of woocommerce.
73
+ add_filter( 'woocommerce_locate_template', array( $this, 'filter_locate_template' ), 10, 3 );
74
+
75
+ // Add extra placeholder support for subject and title fields.
76
+ add_filter( 'woocommerce_email_format_string', array( $this, 'add_extra_placeholders' ), 20, 2);
77
+
78
+ // Hook in main text areas for customized emails
79
+ add_action( 'kadence_woomail_designer_email_details', array( $this, 'email_main_text_area' ), 10, 4);
80
+
81
+ // Hook in main text areas for customized emails
82
+ add_action( 'kadence_woomail_designer_email_text', array( $this, 'email_main_text_area_no_order' ), 10, 1);
83
+
84
+ // Hook in footer container
85
+ add_action( 'kadence_woomail_designer_email_footer', array( $this, 'email_footer_content' ), 10 );
86
+
87
+ }
88
+ // Add a notice about woocommerce being needed.
89
+ public function admin_notice_need_woocommerce() {
90
+ echo '<div class="notice notice-error is-dismissible">';
91
+ echo '<p>'.__( 'Kadence Woocommerce Email Designer requires WooCommerce to be active to work', 'kadence-woocommerce-email-designer' ).'</p>';
92
+ echo '</div>';
93
+ }
94
+ // set up the footer content
95
+ public function email_footer_content() {
96
+ $social_links = Kadence_Woomail_Customizer::opt( 'footer_social_repeater' );
97
+ $social_links = json_decode($social_links);
98
+ ?>
99
+ <div id="template_footer_container">
100
+ <!-- Footer -->
101
+ <table border="0" cellpadding="10" cellspacing="0" width="600" id="template_footer">
102
+ <?php if( !empty( $social_links ) && is_array( $social_links ) ) { ?>
103
+ <tr>
104
+ <td valign="top">
105
+ <table id="footersocial" border="0" cellpadding="10" cellspacing="0" width="100%">
106
+ <tr>
107
+ <?php $items = count($social_links);
108
+ foreach( $social_links as $social_link ) {
109
+ echo '<td valign="middle" style="width:'.round( 100/$items, 2 ).'%">';
110
+ echo '<a href="'.esc_url( $social_link->link ).'" class="ft-social-link" style="display:block; text-align:center; text-decoration: none;">';
111
+ if ( 'customizer_repeater_image' == $social_link->choice ) {
112
+ echo '<img src="'.esc_attr( $social_link->image_url ).'" style="max-width:24px; vertical-align: bottom;">';
113
+ } else if ( 'customizer_repeater_icon' == $social_link->choice ) {
114
+ $img_string = str_replace('kt-woomail-','',$social_link->icon_value);
115
+ if ( ! empty( $social_link->icon_color ) ) {
116
+ $color = $social_link->icon_color;
117
+ } else {
118
+ $color = 'black';
119
+ }
120
+ echo '<img src="'.esc_attr( KT_WOOMAIL_URL . 'assets/images/'. $color .'/'. $img_string ).'.png" style="max-width:24px; vertical-align: bottom;">';
121
+ }
122
+ echo '<span class="ft-social-title">'.esc_html( $social_link->title ).'</span>';
123
+ echo '</a>';
124
+ echo '</td>';
125
+ }
126
+ ?>
127
+ </tr>
128
+ </table>
129
+ </td>
130
+ </tr>
131
+ <?php } ?>
132
+ <tr>
133
+ <td valign="top">
134
+ <table border="0" cellpadding="10" cellspacing="0" width="100%">
135
+ <tr>
136
+ <td colspan="2" valign="middle" id="credit">
137
+ <?php echo wpautop( wp_kses_post( wptexturize( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) ) ) ); ?>
138
+ </td>
139
+ </tr>
140
+ </table>
141
+ </td>
142
+ </tr>
143
+ </table>
144
+ <!-- End Footer -->
145
+ </div>
146
+ <?php
147
+ }
148
+ /**
149
+ * Check if WooCommerce settings need to be overwritten and custom styles applied
150
+ * This is true when plugin is active and at least one custom option is stored in the database
151
+ *
152
+ * @access public
153
+ * @return bool
154
+ */
155
+ public static function overwrite_options() {
156
+
157
+ // Check if any settings were saved
158
+ if ( self::$overwrite_options === null ) {
159
+ $option = get_option( 'kt_woomail', array() );
160
+ self::$overwrite_options = ! empty( $option );
161
+ }
162
+
163
+ // Return result
164
+ return self::$overwrite_options;
165
+ }
166
+
167
+ /**
168
+ * Hook in main text areas for customized emails
169
+ *
170
+ * @access public
171
+ * @return void
172
+ */
173
+ public function email_main_text_area( $order, $sent_to_admin, $plain_text, $email ) {
174
+
175
+ // Get Email ID
176
+ $key = $email->id;
177
+
178
+ if ( 'customer_refunded_order' == $key ) {
179
+ if( $email->partial_refund ) {
180
+ $body_text = Kadence_Woomail_Customizer::opt( $key.'_body_partial' );
181
+ } else {
182
+ $body_text = Kadence_Woomail_Customizer::opt( $key.'_body_full' );
183
+ }
184
+ } else if ( 'customer_invoice' == $key ) {
185
+ if( $order->has_status( 'pending' ) ) {
186
+ $body_text = Kadence_Woomail_Customizer::opt( $key.'_body' );
187
+ $pay_link = '<a href="' . esc_url( $order->get_checkout_payment_url() ) . '">' . esc_html__( 'Pay for this order', 'kadence-woocommerce-email-designer' ) . '</a>';
188
+ $body_text = str_replace( '{invoice_pay_link}', $pay_link, $body_text );
189
+ } else {
190
+ $body_text = Kadence_Woomail_Customizer::opt( $key.'_body_paid' );
191
+ }
192
+ } else if ( 'customer_renewal_invoice' == $key ) {
193
+ if( $order->has_status( 'pending' ) ) {
194
+ $body_text = Kadence_Woomail_Customizer::opt( $key.'_body' );
195
+ $pay_link = '<a href="' . esc_url( $order->get_checkout_payment_url() ) . '">' . esc_html__( 'Pay Now &raquo;', 'kadence-woocommerce-email-designer' ) . '</a>';
196
+ $body_text = str_replace( '{invoice_pay_link}', $pay_link, $body_text );
197
+ } else {
198
+ $body_text = Kadence_Woomail_Customizer::opt( $key.'_body_failed' );
199
+ $pay_link = '<a href="' . esc_url( $order->get_checkout_payment_url() ) . '">' . esc_html__( 'Pay Now &raquo;', 'kadence-woocommerce-email-designer' ) . '</a>';
200
+ $body_text = str_replace( '{invoice_pay_link}', $pay_link, $body_text );
201
+ }
202
+ } else {
203
+ $body_text = Kadence_Woomail_Customizer::opt( $key.'_body' );
204
+ }
205
+ $body_text = str_replace( '{site_title}', get_bloginfo( 'name', 'display' ), $body_text );
206
+ if ( $order ) {
207
+ // Check for placeholders
208
+ $body_text = str_replace( '{order_date}', wc_format_datetime( $order->get_date_created() ), $body_text );
209
+ $body_text = str_replace( '{order_number}', $order->get_order_number(), $body_text );
210
+ $body_text = str_replace( '{customer_first_name}', $order->get_billing_first_name(), $body_text );
211
+ $body_text = str_replace( '{customer_last_name}', $order->get_billing_last_name(), $body_text );
212
+ $body_text = str_replace( '{customer_full_name}', $order->get_formatted_billing_full_name(), $body_text );
213
+ }
214
+
215
+ $body_text = apply_filters( 'kadence_woomail_order_body_text', $body_text, $order, $sent_to_admin, $plain_text, $email );
216
+
217
+ // auto wrap text
218
+ $body_text = wpautop( $body_text );
219
+
220
+ echo wp_kses_post( $body_text );
221
+
222
+ }
223
+
224
+ /**
225
+ * Filter Subtitle for Placeholders
226
+ *
227
+ * @access public
228
+ * @return void
229
+ */
230
+ public static function filter_subtitle( $subtitle, $email ) {
231
+
232
+ // Check for placeholders
233
+ $subtitle = str_replace( '{site_title}', get_bloginfo( 'name', 'display' ), $subtitle );
234
+ if ( is_a( $email->object, 'WP_User' ) ) {
235
+ $first_name = get_user_meta( $email->object->ID, 'billing_first_name', true );
236
+ if( empty( $first_name ) ) {
237
+ // Fall back to user display name
238
+ $first_name = $email->object->display_name;
239
+ }
240
+
241
+ $last_name = get_user_meta( $email->object->ID, 'billing_last_name', true );
242
+ if( empty( $last_name ) ) {
243
+ // Fall back to user display name
244
+ $last_name = $email->object->display_name;
245
+ }
246
+
247
+ $full_name = get_user_meta( $email->object->ID, 'formatted_billing_full_name', true );
248
+ if( empty( $full_name ) ) {
249
+ // Fall back to user display name
250
+ $full_name = $email->object->display_name;
251
+ }
252
+ $subtitle = str_replace( '{customer_first_name}', $first_name, $subtitle );
253
+ $subtitle = str_replace( '{customer_last_name}', $last_name, $subtitle );
254
+ $subtitle = str_replace( '{customer_full_name}', $full_name, $subtitle );
255
+ $subtitle = str_replace( '{customer_username}', $email->user_login, $subtitle );
256
+
257
+ } else if( is_a( $email->object, 'WC_Order' ) ) {
258
+ $subtitle = str_replace( '{order_date}', wc_format_datetime( $email->object->get_date_created() ), $subtitle );
259
+ $subtitle = str_replace( '{order_number}', $email->object->get_order_number(), $subtitle );
260
+ $subtitle = str_replace( '{customer_first_name}', $email->object->get_billing_first_name(), $subtitle );
261
+ $subtitle = str_replace( '{customer_last_name}', $email->object->get_billing_last_name(), $subtitle );
262
+ $subtitle = str_replace( '{customer_full_name}', $email->object->get_formatted_billing_full_name(), $subtitle );
263
+ }
264
+
265
+
266
+ return $subtitle;
267
+
268
+ }
269
+
270
+ /**
271
+ * Hook in main text areas for customized emails
272
+ *
273
+ * @access public
274
+ * @return void
275
+ */
276
+ public function email_main_text_area_no_order( $email ) {
277
+
278
+ // Get Email ID
279
+ $key = $email->id;
280
+
281
+ $body_text = Kadence_Woomail_Customizer::opt( $key.'_body' );
282
+ // Check for placeholders
283
+ $body_text = str_replace( '{site_title}', get_bloginfo( 'name', 'display' ), $body_text );
284
+ if ( is_a( $email->object, 'WP_User' ) ) {
285
+
286
+ $first_name = get_user_meta( $email->object->ID, 'billing_first_name', true );
287
+ if( empty( $first_name ) ) {
288
+ // Fall back to user display name
289
+ $first_name = $email->object->display_name;
290
+ }
291
+
292
+ $last_name = get_user_meta( $email->object->ID, 'billing_last_name', true );
293
+ if( empty( $last_name ) ) {
294
+ // Fall back to user display name
295
+ $last_name = $email->object->display_name;
296
+ }
297
+
298
+ $full_name = get_user_meta( $email->object->ID, 'formatted_billing_full_name', true );
299
+ if( empty( $full_name ) ) {
300
+ // Fall back to user display name
301
+ $full_name = $email->object->display_name;
302
+ }
303
+ $body_text = str_replace( '{customer_first_name}', $first_name, $body_text );
304
+ $body_text = str_replace( '{customer_last_name}', $last_name, $body_text );
305
+ $body_text = str_replace( '{customer_full_name}', $full_name, $body_text );
306
+ $body_text = str_replace( '{customer_username}', $email->user_login, $body_text );
307
+ }
308
+
309
+ $body_text = apply_filters( 'kadence_woomail_no_order_body_text', $body_text, $email );
310
+
311
+ // auto wrap text
312
+ $body_text = wpautop( $body_text );
313
+
314
+ echo wp_kses_post( $body_text );
315
+
316
+ }
317
+
318
+ /**
319
+ * Filter through strings to add support for extra placeholders
320
+ *
321
+ * @access public
322
+ * @return string
323
+ */
324
+ public function add_extra_placeholders( $string, $email ) {
325
+
326
+ if ( is_a( $email->object, 'WC_Order' ) ) {
327
+ $string = str_replace( '{customer_first_name}', $email->object->get_billing_first_name(), $string );
328
+ $string = str_replace( '{customer_last_name}', $email->object->get_billing_last_name(), $string );
329
+ $string = str_replace( '{customer_full_name}', $email->object->get_formatted_billing_full_name(), $string );
330
+ }
331
+
332
+ return $string;
333
+ }
334
+
335
+ /**
336
+ * Add submenu under woocommerce for email customizer
337
+ *
338
+ * @access public
339
+ * @return void
340
+ */
341
+ public function admin_menu() {
342
+ add_submenu_page(
343
+ 'woocommerce',
344
+ __( 'Email Customizer', 'kadence-woocommerce-email-designer' ),
345
+ __( 'Email Customizer', 'kadence-woocommerce-email-designer' ),
346
+ 'manage_woocommerce',
347
+ 'customize.php?kt-woomail-customize=1&url='.urlencode( add_query_arg( array( 'kt-woomail-preview' => '1' ), site_url('/') ) )
348
+ );
349
+ }
350
+
351
+ /**
352
+ * Add submenu under woocommerce for email customizer
353
+ *
354
+ * @access public
355
+ * @return array
356
+ */
357
+ public function plugins_page_links( $links ) {
358
+ $settings_link = '<a href="' . Kadence_Woomail_Customizer::get_customizer_url() .'">'.__('Open Email Designer', 'kadence-woocommerce-email-designer').'</a>';
359
+ array_unshift($links, $settings_link);
360
+
361
+ return $links;
362
+ }
363
+
364
+ /**
365
+ * Checks to see if we are opening our custom customizer preview
366
+ *
367
+ * @access public
368
+ * @return bool
369
+ */
370
+ public static function is_own_preview_request(){
371
+ return isset( $_REQUEST['kt-woomail-preview'] ) && $_REQUEST[ 'kt-woomail-preview' ] === '1';
372
+ }
373
+
374
+ /**
375
+ * Checks to see if we are opening our custom customizer controls
376
+ *
377
+ * @access public
378
+ * @return bool
379
+ */
380
+ public static function is_own_customizer_request() {
381
+ return isset( $_REQUEST['kt-woomail-customize'] ) && $_REQUEST['kt-woomail-customize'] === '1';
382
+ }
383
+
384
+ /**
385
+ * Gets the capability setting needed to edit in the email customizer
386
+ *
387
+ * @access public
388
+ * @return string
389
+ */
390
+ public static function get_admin_capability() {
391
+ // Get capability
392
+ if ( is_null( self::$admin_capability ) ) {
393
+ self::$admin_capability = apply_filters( 'kt_woomail_capability', 'manage_woocommerce' );
394
+ }
395
+
396
+ // Return capability
397
+ return self::$admin_capability;
398
+ }
399
+
400
+ /**
401
+ * check if user is authorized to use the email customizer
402
+ *
403
+ * @access public
404
+ * @return bool
405
+ */
406
+ public static function is_admin() {
407
+ return current_user_can( Kadence_Woomail_Designer::get_admin_capability() );
408
+ }
409
+
410
+ /**
411
+ * Hook in email header with access to the email object
412
+ *
413
+ * @access public
414
+ * @return template
415
+ */
416
+ public function add_email_header( $email_heading, $email ) {
417
+ wc_get_template( 'emails/email-header.php', array( 'email_heading' => $email_heading, 'email' => $email ) );
418
+ }
419
+
420
+ /**
421
+ * Filter in custom email templates with priority to child themes
422
+ *
423
+ * @access public
424
+ * @return string
425
+ */
426
+ public function filter_locate_template( $template, $template_name, $template_path ) {
427
+ // Make sure we are working with an email template
428
+ if ( ! in_array( 'emails', explode( '/', $template_name ) ) ) {
429
+ return $template;
430
+ }
431
+ // clone template
432
+ $_template = $template;
433
+
434
+ // Get the woocommerce template path if empty
435
+ if ( ! $template_path ) {
436
+ global $woocommerce;
437
+ $template_path = $woocommerce->template_url;
438
+ }
439
+
440
+ // Get our template path
441
+ $plugin_path = KT_WOOMAIL_PATH . 'templates/woo/';
442
+
443
+ // Look within passed path within the theme - this is priority
444
+ $template = locate_template( array( $template_path . $template_name, $template_name ) );
445
+
446
+ // If theme isn't trying to override get the template from this plugin, if it exists
447
+ if ( ! $template && file_exists( $plugin_path . $template_name ) ) {
448
+ $template = $plugin_path . $template_name;
449
+ }
450
+
451
+
452
+ // else if we still don't have a template use default
453
+ if ( ! $template ) {
454
+ $template = $_template;
455
+ }
456
+
457
+ // Return template
458
+ return $template;
459
+
460
+ }
461
+ }
462
+ Kadence_Woomail_Designer::get_instance();
463
+
464
+ /**
465
+ * Checks if WooCommerce is enabled
466
+ */
467
+ class Kadence_Woomail_Plugin_Check {
468
+
469
+ private static $active_plugins;
470
+
471
+ public static function init() {
472
+
473
+ self::$active_plugins = (array) get_option( 'active_plugins', array() );
474
+
475
+ if ( is_multisite() )
476
+ self::$active_plugins = array_merge( self::$active_plugins, get_site_option( 'active_sitewide_plugins', array() ) );
477
+ }
478
+
479
+ public static function active_check_woo() {
480
+
481
+ if ( ! self::$active_plugins ) self::init();
482
+ return in_array( 'woocommerce/woocommerce.php', self::$active_plugins ) || array_key_exists( 'woocommerce/woocommerce.php', self::$active_plugins );
483
+ }
484
+
485
+ }
486
+
487
+ function kadence_woomail_is_woo_active() {
488
+ return Kadence_Woomail_Plugin_Check::active_check_woo();
489
+ }
languages/kadence-woocommerce-email-designer.pot ADDED
@@ -0,0 +1,1363 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #, fuzzy
2
+ msgid ""
3
+ msgstr ""
4
+ "Project-Id-Version: Kadence Woocommerce Email Designer\n"
5
+ "POT-Creation-Date: 2018-05-29 15:07-0600\n"
6
+ "PO-Revision-Date: 2015-05-08 13:15-0700\n"
7
+ "Last-Translator: \n"
8
+ "Language-Team: \n"
9
+ "Language: en\n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 2.0.7\n"
14
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;esc_attr_e;esc_attr__;esc_html__;"
15
+ "esc_html_e;esc_attr_x;_x;esc_html_x\n"
16
+ "X-Poedit-Basepath: ..\n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+ "X-Poedit-SearchPath-0: .\n"
19
+
20
+ #: includes/class-customizer-kwdimportexport-control.php:16
21
+ #: includes/class-customizer-kwdimportexport-control.php:21
22
+ msgid "Export"
23
+ msgstr ""
24
+
25
+ #: includes/class-customizer-kwdimportexport-control.php:19
26
+ msgid ""
27
+ "Click the button below to export the customization settings for this plugin."
28
+ msgstr ""
29
+
30
+ #: includes/class-customizer-kwdimportexport-control.php:26
31
+ #: includes/class-customizer-kwdimportexport-control.php:36
32
+ msgid "Import"
33
+ msgstr ""
34
+
35
+ #: includes/class-customizer-kwdimportexport-control.php:29
36
+ msgid "Upload a file to import customization settings for this plugin."
37
+ msgstr ""
38
+
39
+ #: includes/class-customizer-kwdimportexport-control.php:35
40
+ msgid "Uploading..."
41
+ msgstr ""
42
+
43
+ #: includes/class-customizer-kwdsendemail-control.php:21
44
+ msgid "Settings must be saved to send preview email."
45
+ msgstr ""
46
+
47
+ #: includes/class-customizer-kwdsendemail-control.php:22
48
+ msgid "Send Email"
49
+ msgstr ""
50
+
51
+ #: includes/class-customizer-kwdsendemail-control.php:23
52
+ msgid ""
53
+ "Some emails will not work correctly with the mockup order. It is best to use "
54
+ "a real order for sending preview emails."
55
+ msgstr ""
56
+
57
+ #: includes/class-customizer-kwdtemplateload-control.php:17
58
+ #: includes/class-customizer-kwdtemplateload-control.php:31
59
+ msgid "Load Template"
60
+ msgstr ""
61
+
62
+ #: includes/class-customizer-kwdtemplateload-control.php:30
63
+ msgid "Loading and Saving..."
64
+ msgstr ""
65
+
66
+ #: includes/class-customizer-repeater-control.php:29
67
+ msgid "Add new field"
68
+ msgstr ""
69
+
70
+ #: includes/class-customizer-repeater-control.php:34
71
+ msgid "Customizer Repeater"
72
+ msgstr ""
73
+
74
+ #: includes/class-customizer-repeater-control.php:201
75
+ #: includes/class-customizer-repeater-control.php:253
76
+ msgid "Title"
77
+ msgstr ""
78
+
79
+ #: includes/class-customizer-repeater-control.php:208
80
+ #: includes/class-customizer-repeater-control.php:261
81
+ msgid "Link"
82
+ msgstr ""
83
+
84
+ #: includes/class-customizer-repeater-control.php:222
85
+ #: includes/class-customizer-repeater-control.php:269
86
+ msgid "Delete field"
87
+ msgstr ""
88
+
89
+ #: includes/class-customizer-repeater-control.php:310
90
+ msgid "Choose a Bundled Icon"
91
+ msgstr ""
92
+
93
+ #: includes/class-customizer-repeater-control.php:332
94
+ #: includes/class-customizer-repeater-control.php:346
95
+ msgid "Custom Upload Icon"
96
+ msgstr ""
97
+
98
+ #: includes/class-customizer-repeater-control.php:335
99
+ msgid "Upload Image"
100
+ msgstr ""
101
+
102
+ #: includes/class-customizer-repeater-control.php:342
103
+ msgid "Social Image Source"
104
+ msgstr ""
105
+
106
+ #: includes/class-customizer-repeater-control.php:345
107
+ msgid "Bundled Icon"
108
+ msgstr ""
109
+
110
+ #: includes/class-customizer-repeater-control.php:347
111
+ #: includes/class-kadence-woomail-settings.php:1382
112
+ #: includes/class-kadence-woomail-settings.php:1423
113
+ msgid "None"
114
+ msgstr ""
115
+
116
+ #: includes/class-customizer-repeater-control.php:354
117
+ msgid "Bundled Icon Color"
118
+ msgstr ""
119
+
120
+ #: includes/class-customizer-repeater-control.php:357
121
+ msgid "Black"
122
+ msgstr ""
123
+
124
+ #: includes/class-customizer-repeater-control.php:358
125
+ msgid "White"
126
+ msgstr ""
127
+
128
+ #: includes/class-customizer-repeater-control.php:359
129
+ msgid "Gray"
130
+ msgstr ""
131
+
132
+ #: includes/class-kadence-woomail-customizer.php:109
133
+ msgid "Save"
134
+ msgstr ""
135
+
136
+ #: includes/class-kadence-woomail-customizer.php:111
137
+ msgid "Saved"
138
+ msgstr ""
139
+
140
+ #: includes/class-kadence-woomail-customizer.php:164
141
+ msgid "WooCommerce Emails"
142
+ msgstr ""
143
+
144
+ #: includes/class-kadence-woomail-customizer.php:271
145
+ msgid "Reset"
146
+ msgstr ""
147
+
148
+ #: includes/class-kadence-woomail-customizer.php:272
149
+ msgid "Woocommerce Emails"
150
+ msgstr ""
151
+
152
+ #: includes/class-kadence-woomail-customizer.php:273
153
+ msgid "Are you sure you want to send an email?"
154
+ msgstr ""
155
+
156
+ #: includes/class-kadence-woomail-customizer.php:274
157
+ msgid "Email Sent!"
158
+ msgstr ""
159
+
160
+ #: includes/class-kadence-woomail-customizer.php:275
161
+ msgid "Email failed, make sure you have a working email server for your site."
162
+ msgstr ""
163
+
164
+ #: includes/class-kadence-woomail-customizer.php:276
165
+ msgid ""
166
+ "Are you sure you want to reset all changes made to your WooCommerce emails?"
167
+ msgstr ""
168
+
169
+ #: includes/class-kadence-woomail-customizer.php:277
170
+ msgid ""
171
+ "<p>Use native WordPress Customizer to make Woocommerce emails match your "
172
+ "brand.</p>"
173
+ msgstr ""
174
+
175
+ #: includes/class-kadence-woomail-customizer.php:277
176
+ #, php-format
177
+ msgid ""
178
+ "<a href=\"%s\">Kadence Woocommerce Email Designer</a> plugin by <a href=\"%s"
179
+ "\">Kadence Themes</a>."
180
+ msgstr ""
181
+
182
+ #: includes/class-kadence-woomail-customizer.php:282
183
+ msgid "Please choose a file to import."
184
+ msgstr ""
185
+
186
+ #: includes/class-kadence-woomail-customizer.php:283
187
+ msgid ""
188
+ "WARNING: This will override all of your current settings. Are you sure you "
189
+ "want to do that? We suggest geting an export of your current settings incase "
190
+ "you want to revert back."
191
+ msgstr ""
192
+
193
+ #: includes/class-kadence-woomail-import-export.php:211
194
+ msgid "Error importing settings! Please try again."
195
+ msgstr ""
196
+
197
+ #: includes/class-kadence-woomail-import-export.php:224
198
+ #: includes/class-kadence-woomail-import-export.php:228
199
+ msgid ""
200
+ "Error importing settings! Please check that you uploaded a customizer export "
201
+ "file."
202
+ msgstr ""
203
+
204
+ #: includes/class-kadence-woomail-import-export.php:232
205
+ msgid ""
206
+ "Error importing settings! The settings you uploaded are not for the Kadence "
207
+ "Woomail Designer."
208
+ msgstr ""
209
+
210
+ #: includes/class-kadence-woomail-import-export.php:293
211
+ msgid "Error importing settings! The template you selected is not found."
212
+ msgstr ""
213
+
214
+ #: includes/class-kadence-woomail-import-export.php:297
215
+ #: includes/class-kadence-woomail-import-export.php:301
216
+ msgid "Error importing settings! The template you selected is not valid."
217
+ msgstr ""
218
+
219
+ #: includes/class-kadence-woomail-preview.php:231
220
+ msgid "Hello! This is an example note"
221
+ msgstr ""
222
+
223
+ #: includes/class-kadence-woomail-preview.php:304
224
+ msgid ""
225
+ "This email type can not be previewed because it links with a subscription. "
226
+ "We are working on it."
227
+ msgstr ""
228
+
229
+ #: includes/class-kadence-woomail-preview.php:351
230
+ msgid ""
231
+ "An error occurred trying to load this email type. Make sure this email type "
232
+ "is enabled or please try another type."
233
+ msgstr ""
234
+
235
+ #: includes/class-kadence-woomail-settings.php:79
236
+ msgid "Header"
237
+ msgstr ""
238
+
239
+ #: includes/class-kadence-woomail-settings.php:85
240
+ msgid "Content"
241
+ msgstr ""
242
+
243
+ #: includes/class-kadence-woomail-settings.php:91
244
+ msgid "Footer"
245
+ msgstr ""
246
+
247
+ #: includes/class-kadence-woomail-settings.php:113
248
+ msgid "Prebuilt Templates"
249
+ msgstr ""
250
+
251
+ #: includes/class-kadence-woomail-settings.php:117
252
+ msgid "Email Type and Text"
253
+ msgstr ""
254
+
255
+ #: includes/class-kadence-woomail-settings.php:122
256
+ msgid "Container"
257
+ msgstr ""
258
+
259
+ #: includes/class-kadence-woomail-settings.php:128
260
+ msgid "Header Style"
261
+ msgstr ""
262
+
263
+ #: includes/class-kadence-woomail-settings.php:135
264
+ #: includes/class-kadence-woomail-settings.php:237
265
+ msgid "Header Image"
266
+ msgstr ""
267
+
268
+ #: includes/class-kadence-woomail-settings.php:142
269
+ msgid "Heading"
270
+ msgstr ""
271
+
272
+ #: includes/class-kadence-woomail-settings.php:149
273
+ msgid "Footer Style"
274
+ msgstr ""
275
+
276
+ #: includes/class-kadence-woomail-settings.php:155
277
+ msgid "Footer Social"
278
+ msgstr ""
279
+
280
+ #: includes/class-kadence-woomail-settings.php:161
281
+ msgid "Footer Credit Content"
282
+ msgstr ""
283
+
284
+ #: includes/class-kadence-woomail-settings.php:168
285
+ msgid "Content Container"
286
+ msgstr ""
287
+
288
+ #: includes/class-kadence-woomail-settings.php:173
289
+ msgid "Content Headings Style"
290
+ msgstr ""
291
+
292
+ #: includes/class-kadence-woomail-settings.php:179
293
+ msgid "Content Text Style"
294
+ msgstr ""
295
+
296
+ #: includes/class-kadence-woomail-settings.php:185
297
+ msgid "Order Items"
298
+ msgstr ""
299
+
300
+ #: includes/class-kadence-woomail-settings.php:191
301
+ msgid "Addresses"
302
+ msgstr ""
303
+
304
+ #: includes/class-kadence-woomail-settings.php:197
305
+ msgid "Text Copy"
306
+ msgstr ""
307
+
308
+ #: includes/class-kadence-woomail-settings.php:204
309
+ msgid "Custom Styles"
310
+ msgstr ""
311
+
312
+ #: includes/class-kadence-woomail-settings.php:209
313
+ #: includes/class-kadence-woomail-settings.php:2089
314
+ msgid "Import Export"
315
+ msgstr ""
316
+
317
+ #: includes/class-kadence-woomail-settings.php:214
318
+ msgid "Send Preview Email"
319
+ msgstr ""
320
+
321
+ #: includes/class-kadence-woomail-settings.php:250
322
+ msgid "Container Background color"
323
+ msgstr ""
324
+
325
+ #: includes/class-kadence-woomail-settings.php:263
326
+ msgid "Content Text color"
327
+ msgstr ""
328
+
329
+ #: includes/class-kadence-woomail-settings.php:277
330
+ msgid "Content Background color"
331
+ msgstr ""
332
+
333
+ #: includes/class-kadence-woomail-settings.php:291
334
+ msgid "Footer text"
335
+ msgstr ""
336
+
337
+ #: includes/class-kadence-woomail-settings.php:306
338
+ msgid "Recipient(s)"
339
+ msgstr ""
340
+
341
+ #: includes/class-kadence-woomail-settings.php:311
342
+ #, php-format
343
+ msgid "Enter recipients (comma separated) for this email. Defaults to %s."
344
+ msgstr ""
345
+
346
+ #: includes/class-kadence-woomail-settings.php:322
347
+ msgid "Full refund subject"
348
+ msgstr ""
349
+
350
+ #: includes/class-kadence-woomail-settings.php:338
351
+ msgid "Partial refund subject"
352
+ msgstr ""
353
+
354
+ #: includes/class-kadence-woomail-settings.php:354
355
+ msgid "Full refund Heading Text"
356
+ msgstr ""
357
+
358
+ #: includes/class-kadence-woomail-settings.php:374
359
+ msgid "Partial refund Heading Text"
360
+ msgstr ""
361
+
362
+ #: includes/class-kadence-woomail-settings.php:391
363
+ msgid "Subject Text"
364
+ msgstr ""
365
+
366
+ #: includes/class-kadence-woomail-settings.php:407
367
+ msgid "Subject (paid) Text"
368
+ msgstr ""
369
+
370
+ #: includes/class-kadence-woomail-settings.php:424
371
+ msgid "Heading Text"
372
+ msgstr ""
373
+
374
+ #: includes/class-kadence-woomail-settings.php:444
375
+ msgid "Heading (paid) Text"
376
+ msgstr ""
377
+
378
+ #: includes/class-kadence-woomail-settings.php:479
379
+ msgid "Template_load"
380
+ msgstr ""
381
+
382
+ #: includes/class-kadence-woomail-settings.php:488
383
+ msgid "Preview Order"
384
+ msgstr ""
385
+
386
+ #: includes/class-kadence-woomail-settings.php:498
387
+ msgid "Email Type"
388
+ msgstr ""
389
+
390
+ #: includes/class-kadence-woomail-settings.php:508
391
+ msgid "Available placeholders"
392
+ msgstr ""
393
+
394
+ #: includes/class-kadence-woomail-settings.php:520
395
+ msgid "Subtitle Text"
396
+ msgstr ""
397
+
398
+ #: includes/class-kadence-woomail-settings.php:538
399
+ msgid "Switch off for Partial Refund Preview"
400
+ msgstr ""
401
+
402
+ #: includes/class-kadence-woomail-settings.php:553
403
+ msgid "Body Full Refund Text"
404
+ msgstr ""
405
+
406
+ #: includes/class-kadence-woomail-settings.php:567
407
+ msgid "Body Partial Refund Text"
408
+ msgstr ""
409
+
410
+ #: includes/class-kadence-woomail-settings.php:581
411
+ msgid "Switch off for unpaid preview"
412
+ msgstr ""
413
+
414
+ #: includes/class-kadence-woomail-settings.php:596
415
+ msgid "Body Invoice Paid Text"
416
+ msgstr ""
417
+
418
+ #: includes/class-kadence-woomail-settings.php:610
419
+ #: includes/class-kadence-woomail-settings.php:638
420
+ msgid "Body Invoice Pending Payment Text"
421
+ msgstr ""
422
+
423
+ #: includes/class-kadence-woomail-settings.php:624
424
+ msgid "Body Invoice Failed Text"
425
+ msgstr ""
426
+
427
+ #: includes/class-kadence-woomail-settings.php:652
428
+ msgid "Body Text"
429
+ msgstr ""
430
+
431
+ #: includes/class-kadence-woomail-settings.php:670
432
+ msgid "Content Width"
433
+ msgstr ""
434
+
435
+ #: includes/class-kadence-woomail-settings.php:690
436
+ msgid "Border radius"
437
+ msgstr ""
438
+
439
+ #: includes/class-kadence-woomail-settings.php:706
440
+ #: includes/class-kadence-woomail-settings.php:1618
441
+ msgid "Border Width"
442
+ msgstr ""
443
+
444
+ #: includes/class-kadence-woomail-settings.php:722
445
+ msgid "Border color"
446
+ msgstr ""
447
+
448
+ #: includes/class-kadence-woomail-settings.php:733
449
+ msgid "Shadow"
450
+ msgstr ""
451
+
452
+ #: includes/class-kadence-woomail-settings.php:749
453
+ msgid "Container Top Padding"
454
+ msgstr ""
455
+
456
+ #: includes/class-kadence-woomail-settings.php:765
457
+ msgid "Container Botom Padding"
458
+ msgstr ""
459
+
460
+ #: includes/class-kadence-woomail-settings.php:782
461
+ msgid "Image Align"
462
+ msgstr ""
463
+
464
+ #: includes/class-kadence-woomail-settings.php:794
465
+ msgid "Image Max Width"
466
+ msgstr ""
467
+
468
+ #: includes/class-kadence-woomail-settings.php:809
469
+ #: includes/class-kadence-woomail-settings.php:836
470
+ msgid "Background color"
471
+ msgstr ""
472
+
473
+ #: includes/class-kadence-woomail-settings.php:820
474
+ msgid "Padding top/bottom"
475
+ msgstr ""
476
+
477
+ #: includes/class-kadence-woomail-settings.php:847
478
+ msgid "Text align"
479
+ msgstr ""
480
+
481
+ #: includes/class-kadence-woomail-settings.php:861
482
+ #: includes/class-kadence-woomail-settings.php:1106
483
+ msgid "Padding Top"
484
+ msgstr ""
485
+
486
+ #: includes/class-kadence-woomail-settings.php:877
487
+ #: includes/class-kadence-woomail-settings.php:1122
488
+ msgid "Padding Bottom"
489
+ msgstr ""
490
+
491
+ #: includes/class-kadence-woomail-settings.php:894
492
+ msgid "Padding left/right"
493
+ msgstr ""
494
+
495
+ #: includes/class-kadence-woomail-settings.php:910
496
+ msgid "Heading Font size"
497
+ msgstr ""
498
+
499
+ #: includes/class-kadence-woomail-settings.php:926
500
+ msgid "Heading Line Height"
501
+ msgstr ""
502
+
503
+ #: includes/class-kadence-woomail-settings.php:942
504
+ msgid "Heading Font family"
505
+ msgstr ""
506
+
507
+ #: includes/class-kadence-woomail-settings.php:954
508
+ msgid "Heading Font Style"
509
+ msgstr ""
510
+
511
+ #: includes/class-kadence-woomail-settings.php:960
512
+ #: includes/class-kadence-woomail-settings.php:1067
513
+ #: includes/class-kadence-woomail-settings.php:1349
514
+ #: includes/class-kadence-woomail-settings.php:1538
515
+ #: includes/class-kadence-woomail-settings.php:1580
516
+ #: includes/class-kadence-woomail-settings.php:1673
517
+ msgid "Normal"
518
+ msgstr ""
519
+
520
+ #: includes/class-kadence-woomail-settings.php:961
521
+ #: includes/class-kadence-woomail-settings.php:1068
522
+ #: includes/class-kadence-woomail-settings.php:1350
523
+ #: includes/class-kadence-woomail-settings.php:1539
524
+ msgid "Italic"
525
+ msgstr ""
526
+
527
+ #: includes/class-kadence-woomail-settings.php:969
528
+ msgid "Heading Font weight"
529
+ msgstr ""
530
+
531
+ #: includes/class-kadence-woomail-settings.php:985
532
+ msgid "Heading Text color"
533
+ msgstr ""
534
+
535
+ #: includes/class-kadence-woomail-settings.php:997
536
+ msgid "Subtitle Settings"
537
+ msgstr ""
538
+
539
+ #: includes/class-kadence-woomail-settings.php:1004
540
+ msgid "Subtitle Placement"
541
+ msgstr ""
542
+
543
+ #: includes/class-kadence-woomail-settings.php:1010
544
+ msgid "Below Heading"
545
+ msgstr ""
546
+
547
+ #: includes/class-kadence-woomail-settings.php:1011
548
+ msgid "Above Heading"
549
+ msgstr ""
550
+
551
+ #: includes/class-kadence-woomail-settings.php:1017
552
+ msgid "Subtitle Font Size"
553
+ msgstr ""
554
+
555
+ #: includes/class-kadence-woomail-settings.php:1033
556
+ msgid "Subtitle Line Height"
557
+ msgstr ""
558
+
559
+ #: includes/class-kadence-woomail-settings.php:1049
560
+ msgid "Subtitle Font Family"
561
+ msgstr ""
562
+
563
+ #: includes/class-kadence-woomail-settings.php:1061
564
+ msgid "Subtitle Font Style"
565
+ msgstr ""
566
+
567
+ #: includes/class-kadence-woomail-settings.php:1077
568
+ msgid "Subtitle Font weight"
569
+ msgstr ""
570
+
571
+ #: includes/class-kadence-woomail-settings.php:1094
572
+ msgid "Subtitle Text color"
573
+ msgstr ""
574
+
575
+ #: includes/class-kadence-woomail-settings.php:1138
576
+ msgid "Padding Left/Right"
577
+ msgstr ""
578
+
579
+ #: includes/class-kadence-woomail-settings.php:1156
580
+ #: includes/class-kadence-woomail-settings.php:1990
581
+ msgid "Font Size"
582
+ msgstr ""
583
+
584
+ #: includes/class-kadence-woomail-settings.php:1173
585
+ msgid "Line Height"
586
+ msgstr ""
587
+
588
+ #: includes/class-kadence-woomail-settings.php:1190
589
+ #: includes/class-kadence-woomail-settings.php:2006
590
+ msgid "Font Family"
591
+ msgstr ""
592
+
593
+ #: includes/class-kadence-woomail-settings.php:1204
594
+ #: includes/class-kadence-woomail-settings.php:2019
595
+ msgid "Font weight"
596
+ msgstr ""
597
+
598
+ #: includes/class-kadence-woomail-settings.php:1220
599
+ msgid "Link Color"
600
+ msgstr ""
601
+
602
+ #: includes/class-kadence-woomail-settings.php:1234
603
+ msgid "H2 Font Size"
604
+ msgstr ""
605
+
606
+ #: includes/class-kadence-woomail-settings.php:1250
607
+ msgid "H2 Line Height"
608
+ msgstr ""
609
+
610
+ #: includes/class-kadence-woomail-settings.php:1266
611
+ msgid "H2 Padding Top"
612
+ msgstr ""
613
+
614
+ #: includes/class-kadence-woomail-settings.php:1282
615
+ msgid "H2 Padding Bottom"
616
+ msgstr ""
617
+
618
+ #: includes/class-kadence-woomail-settings.php:1298
619
+ msgid "H2 Margin Top"
620
+ msgstr ""
621
+
622
+ #: includes/class-kadence-woomail-settings.php:1314
623
+ msgid "H2 Margin Bottom"
624
+ msgstr ""
625
+
626
+ #: includes/class-kadence-woomail-settings.php:1330
627
+ msgid "H2 Font Family"
628
+ msgstr ""
629
+
630
+ #: includes/class-kadence-woomail-settings.php:1343
631
+ msgid "H2 Font Style"
632
+ msgstr ""
633
+
634
+ #: includes/class-kadence-woomail-settings.php:1359
635
+ msgid "H2 Font weight"
636
+ msgstr ""
637
+
638
+ #: includes/class-kadence-woomail-settings.php:1376
639
+ msgid "H2 Text Transform"
640
+ msgstr ""
641
+
642
+ #: includes/class-kadence-woomail-settings.php:1383
643
+ msgid "Uppercase"
644
+ msgstr ""
645
+
646
+ #: includes/class-kadence-woomail-settings.php:1384
647
+ msgid "Lowercase"
648
+ msgstr ""
649
+
650
+ #: includes/class-kadence-woomail-settings.php:1385
651
+ msgid "Capitalize"
652
+ msgstr ""
653
+
654
+ #: includes/class-kadence-woomail-settings.php:1393
655
+ msgid "H2 Color"
656
+ msgstr ""
657
+
658
+ #: includes/class-kadence-woomail-settings.php:1405
659
+ msgid "H2 Text Align"
660
+ msgstr ""
661
+
662
+ #: includes/class-kadence-woomail-settings.php:1417
663
+ msgid "H2 Separator"
664
+ msgstr ""
665
+
666
+ #: includes/class-kadence-woomail-settings.php:1424
667
+ msgid "Separator below"
668
+ msgstr ""
669
+
670
+ #: includes/class-kadence-woomail-settings.php:1425
671
+ msgid "Separator above"
672
+ msgstr ""
673
+
674
+ #: includes/class-kadence-woomail-settings.php:1430
675
+ msgid "H2 Separator height"
676
+ msgstr ""
677
+
678
+ #: includes/class-kadence-woomail-settings.php:1448
679
+ msgid "H2 Separator Style"
680
+ msgstr ""
681
+
682
+ #: includes/class-kadence-woomail-settings.php:1454
683
+ #: includes/class-kadence-woomail-settings.php:1652
684
+ #: includes/class-kadence-woomail-settings.php:1723
685
+ #: includes/class-kadence-woomail-settings.php:1964
686
+ msgid "Solid"
687
+ msgstr ""
688
+
689
+ #: includes/class-kadence-woomail-settings.php:1455
690
+ #: includes/class-kadence-woomail-settings.php:1653
691
+ #: includes/class-kadence-woomail-settings.php:1724
692
+ #: includes/class-kadence-woomail-settings.php:1965
693
+ msgid "Double"
694
+ msgstr ""
695
+
696
+ #: includes/class-kadence-woomail-settings.php:1456
697
+ #: includes/class-kadence-woomail-settings.php:1654
698
+ #: includes/class-kadence-woomail-settings.php:1725
699
+ #: includes/class-kadence-woomail-settings.php:1966
700
+ msgid "Groove"
701
+ msgstr ""
702
+
703
+ #: includes/class-kadence-woomail-settings.php:1457
704
+ #: includes/class-kadence-woomail-settings.php:1655
705
+ #: includes/class-kadence-woomail-settings.php:1726
706
+ #: includes/class-kadence-woomail-settings.php:1967
707
+ msgid "Dotted"
708
+ msgstr ""
709
+
710
+ #: includes/class-kadence-woomail-settings.php:1458
711
+ #: includes/class-kadence-woomail-settings.php:1656
712
+ #: includes/class-kadence-woomail-settings.php:1727
713
+ #: includes/class-kadence-woomail-settings.php:1968
714
+ msgid "Dashed"
715
+ msgstr ""
716
+
717
+ #: includes/class-kadence-woomail-settings.php:1459
718
+ #: includes/class-kadence-woomail-settings.php:1657
719
+ #: includes/class-kadence-woomail-settings.php:1728
720
+ #: includes/class-kadence-woomail-settings.php:1969
721
+ msgid "Ridge"
722
+ msgstr ""
723
+
724
+ #: includes/class-kadence-woomail-settings.php:1468
725
+ msgid "H2 Separator Color"
726
+ msgstr ""
727
+
728
+ #: includes/class-kadence-woomail-settings.php:1481
729
+ msgid "H3 Settings"
730
+ msgstr ""
731
+
732
+ #: includes/class-kadence-woomail-settings.php:1488
733
+ msgid "H3 Font Size"
734
+ msgstr ""
735
+
736
+ #: includes/class-kadence-woomail-settings.php:1504
737
+ msgid "H3 Line Height"
738
+ msgstr ""
739
+
740
+ #: includes/class-kadence-woomail-settings.php:1520
741
+ msgid "H3 Font Family"
742
+ msgstr ""
743
+
744
+ #: includes/class-kadence-woomail-settings.php:1532
745
+ msgid "H3 Font Style"
746
+ msgstr ""
747
+
748
+ #: includes/class-kadence-woomail-settings.php:1547
749
+ msgid "H3 Font weight"
750
+ msgstr ""
751
+
752
+ #: includes/class-kadence-woomail-settings.php:1563
753
+ msgid "H3 Color"
754
+ msgstr ""
755
+
756
+ #: includes/class-kadence-woomail-settings.php:1574
757
+ msgid "Order Table Style"
758
+ msgstr ""
759
+
760
+ #: includes/class-kadence-woomail-settings.php:1581
761
+ msgid "Light"
762
+ msgstr ""
763
+
764
+ #: includes/class-kadence-woomail-settings.php:1586
765
+ msgid "Order Table Background color"
766
+ msgstr ""
767
+
768
+ #: includes/class-kadence-woomail-settings.php:1598
769
+ msgid "Padding"
770
+ msgstr ""
771
+
772
+ #: includes/class-kadence-woomail-settings.php:1635
773
+ msgid "Border Color"
774
+ msgstr ""
775
+
776
+ #: includes/class-kadence-woomail-settings.php:1646
777
+ msgid "Border Style"
778
+ msgstr ""
779
+
780
+ #: includes/class-kadence-woomail-settings.php:1667
781
+ msgid "Order Table Heading Style"
782
+ msgstr ""
783
+
784
+ #: includes/class-kadence-woomail-settings.php:1674
785
+ msgid "Split"
786
+ msgstr ""
787
+
788
+ #: includes/class-kadence-woomail-settings.php:1679
789
+ msgid "Address Box Background color"
790
+ msgstr ""
791
+
792
+ #: includes/class-kadence-woomail-settings.php:1690
793
+ msgid "Address Box Border Width"
794
+ msgstr ""
795
+
796
+ #: includes/class-kadence-woomail-settings.php:1706
797
+ msgid "Address Box Border Color"
798
+ msgstr ""
799
+
800
+ #: includes/class-kadence-woomail-settings.php:1717
801
+ msgid "Address Box Border Style"
802
+ msgstr ""
803
+
804
+ #: includes/class-kadence-woomail-settings.php:1736
805
+ msgid "Address Box Text Color"
806
+ msgstr ""
807
+
808
+ #: includes/class-kadence-woomail-settings.php:1747
809
+ msgid "Address Box Text Align"
810
+ msgstr ""
811
+
812
+ #: includes/class-kadence-woomail-settings.php:1759
813
+ msgid "Footer Background Placement"
814
+ msgstr ""
815
+
816
+ #: includes/class-kadence-woomail-settings.php:1765
817
+ msgid "Inside Body Container"
818
+ msgstr ""
819
+
820
+ #: includes/class-kadence-woomail-settings.php:1766
821
+ msgid "Outside Body Container"
822
+ msgstr ""
823
+
824
+ #: includes/class-kadence-woomail-settings.php:1771
825
+ msgid "Footer Background Color"
826
+ msgstr ""
827
+
828
+ #: includes/class-kadence-woomail-settings.php:1782
829
+ #: includes/class-kadence-woomail-settings.php:1899
830
+ #: includes/class-kadence-woomail-settings.php:2047
831
+ msgid "Top Padding"
832
+ msgstr ""
833
+
834
+ #: includes/class-kadence-woomail-settings.php:1798
835
+ #: includes/class-kadence-woomail-settings.php:1915
836
+ #: includes/class-kadence-woomail-settings.php:2063
837
+ msgid "Bottom Padding"
838
+ msgstr ""
839
+
840
+ #: includes/class-kadence-woomail-settings.php:1814
841
+ msgid "Left/Right Padding"
842
+ msgstr ""
843
+
844
+ #: includes/class-kadence-woomail-settings.php:1830
845
+ msgid "Footer Social Options"
846
+ msgstr ""
847
+
848
+ #: includes/class-kadence-woomail-settings.php:1844
849
+ msgid "Footer Social Title Color"
850
+ msgstr ""
851
+
852
+ #: includes/class-kadence-woomail-settings.php:1855
853
+ msgid "Footer Social Title Font Size"
854
+ msgstr ""
855
+
856
+ #: includes/class-kadence-woomail-settings.php:1871
857
+ msgid "Footer Social Title Font Family"
858
+ msgstr ""
859
+
860
+ #: includes/class-kadence-woomail-settings.php:1883
861
+ msgid "Footer Social Title Font Weight"
862
+ msgstr ""
863
+
864
+ #: includes/class-kadence-woomail-settings.php:1931
865
+ msgid "Footer Social Bottom Border Width"
866
+ msgstr ""
867
+
868
+ #: includes/class-kadence-woomail-settings.php:1947
869
+ msgid "Footer Social Bottom Border Color"
870
+ msgstr ""
871
+
872
+ #: includes/class-kadence-woomail-settings.php:1958
873
+ msgid "Footer Social Bottom Border Style"
874
+ msgstr ""
875
+
876
+ #: includes/class-kadence-woomail-settings.php:1977
877
+ msgid "Text Align"
878
+ msgstr ""
879
+
880
+ #: includes/class-kadence-woomail-settings.php:2036
881
+ msgid "Text Color"
882
+ msgstr ""
883
+
884
+ #: includes/class-kadence-woomail-settings.php:2078
885
+ msgid "Custom CSS"
886
+ msgstr ""
887
+
888
+ #: includes/class-kadence-woomail-settings.php:2095
889
+ msgid "Preview Email Recipient"
890
+ msgstr ""
891
+
892
+ #: includes/class-kadence-woomail-settings.php:2096
893
+ msgid "Enter recipients (comma separated) for preview emails"
894
+ msgstr ""
895
+
896
+ #: includes/class-kadence-woomail-settings.php:2139
897
+ #: includes/class-kadence-woomail-settings.php:2166
898
+ msgid "New customer order"
899
+ msgstr ""
900
+
901
+ #: includes/class-kadence-woomail-settings.php:2140
902
+ #: includes/class-kadence-woomail-settings.php:2181
903
+ msgid "[{site_title}] New customer order ({order_number}) - {order_date}"
904
+ msgstr ""
905
+
906
+ #: includes/class-kadence-woomail-settings.php:2141
907
+ msgid ""
908
+ "You have received a subscription renewal order from {customer_full_name}. "
909
+ "Their order is as follows:"
910
+ msgstr ""
911
+
912
+ #: includes/class-kadence-woomail-settings.php:2142
913
+ #: includes/class-kadence-woomail-settings.php:2168
914
+ #: includes/class-kadence-woomail-settings.php:2173
915
+ msgid "Thank you for your order"
916
+ msgstr ""
917
+
918
+ #: includes/class-kadence-woomail-settings.php:2143
919
+ #: includes/class-kadence-woomail-settings.php:2183
920
+ #: includes/class-kadence-woomail-settings.php:2189
921
+ msgid "Your {site_title} order receipt from {order_date}"
922
+ msgstr ""
923
+
924
+ #: includes/class-kadence-woomail-settings.php:2144
925
+ msgid ""
926
+ "Your subscription renewal order has been received and is now being "
927
+ "processed. Your order details are shown below for your reference:"
928
+ msgstr ""
929
+
930
+ #: includes/class-kadence-woomail-settings.php:2145
931
+ #: includes/class-kadence-woomail-settings.php:2148
932
+ #: includes/class-kadence-woomail-settings.php:2169
933
+ msgid "Your order is complete"
934
+ msgstr ""
935
+
936
+ #: includes/class-kadence-woomail-settings.php:2146
937
+ #: includes/class-kadence-woomail-settings.php:2149
938
+ #: includes/class-kadence-woomail-settings.php:2184
939
+ msgid "Your {site_title} order from {order_date} is complete"
940
+ msgstr ""
941
+
942
+ #: includes/class-kadence-woomail-settings.php:2147
943
+ msgid ""
944
+ "Hi there. Your subscription renewal order with {site_title} has been "
945
+ "completed. Your order details are shown below for your reference:"
946
+ msgstr ""
947
+
948
+ #: includes/class-kadence-woomail-settings.php:2150
949
+ msgid ""
950
+ "Hi there. You have successfully changed your subscription items on "
951
+ "{site_title}. Your new order and subscription details are shown below for "
952
+ "your reference:"
953
+ msgstr ""
954
+
955
+ #: includes/class-kadence-woomail-settings.php:2152
956
+ #: includes/class-kadence-woomail-settings.php:2153
957
+ #: includes/class-kadence-woomail-settings.php:2174
958
+ #: includes/class-kadence-woomail-settings.php:2191
959
+ msgid "Invoice for order {order_number}"
960
+ msgstr ""
961
+
962
+ #: includes/class-kadence-woomail-settings.php:2154
963
+ msgid ""
964
+ "An invoice has been created for you to renew your subscription with "
965
+ "{site_title}. To pay for this invoice please use the following link: "
966
+ "{invoice_pay_link}"
967
+ msgstr ""
968
+
969
+ #: includes/class-kadence-woomail-settings.php:2155
970
+ msgid ""
971
+ "The automatic payment to renew your subscription with {site_title} has "
972
+ "failed. To reactivate the subscription, please login and pay for the renewal "
973
+ "from your account page: {invoice_pay_link}"
974
+ msgstr ""
975
+
976
+ #: includes/class-kadence-woomail-settings.php:2158
977
+ msgid "Subscription Cancelled"
978
+ msgstr ""
979
+
980
+ #: includes/class-kadence-woomail-settings.php:2159
981
+ msgid "[{site_title}] Subscription Cancelled"
982
+ msgstr ""
983
+
984
+ #: includes/class-kadence-woomail-settings.php:2160
985
+ msgid ""
986
+ "A subscription belonging to {customer_full_name} has been cancelled. Their "
987
+ "subscription's details are as follows:"
988
+ msgstr ""
989
+
990
+ #: includes/class-kadence-woomail-settings.php:2163
991
+ msgid "Automatic payment failed for order {order_number}"
992
+ msgstr ""
993
+
994
+ #: includes/class-kadence-woomail-settings.php:2164
995
+ msgid "Automatic payment failed for {order_number}, we will retry {retry_time}"
996
+ msgstr ""
997
+
998
+ #: includes/class-kadence-woomail-settings.php:2167
999
+ msgid "Cancelled order"
1000
+ msgstr ""
1001
+
1002
+ #: includes/class-kadence-woomail-settings.php:2170
1003
+ msgid "Order {order_number} details"
1004
+ msgstr ""
1005
+
1006
+ #: includes/class-kadence-woomail-settings.php:2171
1007
+ msgid "Your order has been partially refunded"
1008
+ msgstr ""
1009
+
1010
+ #: includes/class-kadence-woomail-settings.php:2175
1011
+ msgid "Your order details"
1012
+ msgstr ""
1013
+
1014
+ #: includes/class-kadence-woomail-settings.php:2176
1015
+ msgid "Failed order"
1016
+ msgstr ""
1017
+
1018
+ #: includes/class-kadence-woomail-settings.php:2177
1019
+ msgid "Welcome to {site_title}"
1020
+ msgstr ""
1021
+
1022
+ #: includes/class-kadence-woomail-settings.php:2178
1023
+ msgid "A note has been added to your order"
1024
+ msgstr ""
1025
+
1026
+ #: includes/class-kadence-woomail-settings.php:2179
1027
+ msgid "Password reset instructions"
1028
+ msgstr ""
1029
+
1030
+ #: includes/class-kadence-woomail-settings.php:2182
1031
+ msgid "[{site_title}] Cancelled order ({order_number})"
1032
+ msgstr ""
1033
+
1034
+ #: includes/class-kadence-woomail-settings.php:2186
1035
+ msgid "Your {site_title} order from {order_date} has been refunded"
1036
+ msgstr ""
1037
+
1038
+ #: includes/class-kadence-woomail-settings.php:2187
1039
+ msgid "Your {site_title} order from {order_date} has been partially refunded"
1040
+ msgstr ""
1041
+
1042
+ #: includes/class-kadence-woomail-settings.php:2192
1043
+ msgid "Your {site_title} order from {order_date}"
1044
+ msgstr ""
1045
+
1046
+ #: includes/class-kadence-woomail-settings.php:2194
1047
+ msgid "[{site_title}] Failed order ({order_number})"
1048
+ msgstr ""
1049
+
1050
+ #: includes/class-kadence-woomail-settings.php:2195
1051
+ msgid "Your account on {site_title}"
1052
+ msgstr ""
1053
+
1054
+ #: includes/class-kadence-woomail-settings.php:2196
1055
+ msgid "Note added to your {site_title} order from {order_date}"
1056
+ msgstr ""
1057
+
1058
+ #: includes/class-kadence-woomail-settings.php:2197
1059
+ msgid "Password reset for {site_title}"
1060
+ msgstr ""
1061
+
1062
+ #: includes/class-kadence-woomail-settings.php:2199
1063
+ msgid ""
1064
+ "You have received an order from {customer_full_name}. The order is as "
1065
+ "follows:"
1066
+ msgstr ""
1067
+
1068
+ #: includes/class-kadence-woomail-settings.php:2200
1069
+ msgid ""
1070
+ "The order {order_number} from {customer_full_name} has been cancelled. The "
1071
+ "order was as follows:"
1072
+ msgstr ""
1073
+
1074
+ #: includes/class-kadence-woomail-settings.php:2201
1075
+ msgid ""
1076
+ "Your order has been received and is now being processed. Your order details "
1077
+ "are shown below for your reference:"
1078
+ msgstr ""
1079
+
1080
+ #: includes/class-kadence-woomail-settings.php:2202
1081
+ msgid ""
1082
+ "Hi there. Your recent order on {site_title} has been completed. Your order "
1083
+ "details are shown below for your reference:"
1084
+ msgstr ""
1085
+
1086
+ #: includes/class-kadence-woomail-settings.php:2204
1087
+ msgid "Hi there. Your order on {site_title} has been refunded."
1088
+ msgstr ""
1089
+
1090
+ #: includes/class-kadence-woomail-settings.php:2205
1091
+ msgid "Hi there. Your order on {site_title} has been partially refunded."
1092
+ msgstr ""
1093
+
1094
+ #: includes/class-kadence-woomail-settings.php:2207
1095
+ msgid ""
1096
+ "Your order is on-hold until we confirm payment has been received. Your order "
1097
+ "details are shown below for your reference:"
1098
+ msgstr ""
1099
+
1100
+ #: includes/class-kadence-woomail-settings.php:2209
1101
+ msgid "An order has been created for you on {site_title}. {invoice_pay_link}"
1102
+ msgstr ""
1103
+
1104
+ #: includes/class-kadence-woomail-settings.php:2211
1105
+ msgid ""
1106
+ "Payment for order {order_number} from {customer_full_name} has failed. The "
1107
+ "order was as follows:"
1108
+ msgstr ""
1109
+
1110
+ #: includes/class-kadence-woomail-settings.php:2212
1111
+ msgid ""
1112
+ "Thanks for creating an account on {site_title}. Your username is "
1113
+ "{customer_username}"
1114
+ msgstr ""
1115
+
1116
+ #: includes/class-kadence-woomail-settings.php:2213
1117
+ msgid "Hello, a note has just been added to your order:"
1118
+ msgstr ""
1119
+
1120
+ #: includes/class-kadence-woomail-settings.php:2214
1121
+ msgid ""
1122
+ "Someone requested that the password be reset for the following account:\n"
1123
+ "\n"
1124
+ "Username: {customer_username}\n"
1125
+ "\n"
1126
+ "If this was a mistake, just ignore this email and nothing will happen.\n"
1127
+ "\n"
1128
+ "To reset your password, visit the following address:"
1129
+ msgstr ""
1130
+
1131
+ #: includes/class-kadence-woomail-settings.php:2350
1132
+ msgid "none"
1133
+ msgstr ""
1134
+
1135
+ #: includes/class-kadence-woomail-settings.php:2351
1136
+ msgid "hidden"
1137
+ msgstr ""
1138
+
1139
+ #: includes/class-kadence-woomail-settings.php:2352
1140
+ msgid "dotted"
1141
+ msgstr ""
1142
+
1143
+ #: includes/class-kadence-woomail-settings.php:2353
1144
+ msgid "dashed"
1145
+ msgstr ""
1146
+
1147
+ #: includes/class-kadence-woomail-settings.php:2354
1148
+ msgid "solid"
1149
+ msgstr ""
1150
+
1151
+ #: includes/class-kadence-woomail-settings.php:2355
1152
+ msgid "double"
1153
+ msgstr ""
1154
+
1155
+ #: includes/class-kadence-woomail-settings.php:2356
1156
+ msgid "groove"
1157
+ msgstr ""
1158
+
1159
+ #: includes/class-kadence-woomail-settings.php:2357
1160
+ msgid "ridge"
1161
+ msgstr ""
1162
+
1163
+ #: includes/class-kadence-woomail-settings.php:2358
1164
+ msgid "inset"
1165
+ msgstr ""
1166
+
1167
+ #: includes/class-kadence-woomail-settings.php:2359
1168
+ msgid "outset"
1169
+ msgstr ""
1170
+
1171
+ #: includes/class-kadence-woomail-settings.php:2371
1172
+ #: includes/class-kadence-woomail-settings.php:2379
1173
+ msgid "Left"
1174
+ msgstr ""
1175
+
1176
+ #: includes/class-kadence-woomail-settings.php:2372
1177
+ #: includes/class-kadence-woomail-settings.php:2380
1178
+ msgid "Center"
1179
+ msgstr ""
1180
+
1181
+ #: includes/class-kadence-woomail-settings.php:2373
1182
+ #: includes/class-kadence-woomail-settings.php:2381
1183
+ msgid "Right"
1184
+ msgstr ""
1185
+
1186
+ #: includes/class-kadence-woomail-settings.php:2374
1187
+ msgid "Justify"
1188
+ msgstr ""
1189
+
1190
+ #: includes/class-kadence-woomail-settings.php:2394
1191
+ msgid "Mockup Order"
1192
+ msgstr ""
1193
+
1194
+ #: includes/class-kadence-woomail-woo.php:60
1195
+ msgid "Woocommerce Email Designer"
1196
+ msgstr ""
1197
+
1198
+ #: includes/class-kadence-woomail-woo.php:90
1199
+ msgid "Customize WooCommerce Emails"
1200
+ msgstr ""
1201
+
1202
+ #: includes/class-kadence-woomail-woo.php:94
1203
+ #: includes/class-kadence-woomail-woo.php:95
1204
+ msgid "Open Woocommerce Email Designer"
1205
+ msgstr ""
1206
+
1207
+ #: includes/class-kadence-woomail-woo.php:98
1208
+ #, php-format
1209
+ msgid ""
1210
+ "Make Woocommerce Emails match your brand. <a href=\"%s\">Kadence Woocommerce "
1211
+ "Email Designer</a> plugin by <a href=\"%s\">Kadence Themes</a>."
1212
+ msgstr ""
1213
+
1214
+ #: kadence-woocommerce-email-designer.php:91
1215
+ msgid ""
1216
+ "Kadence Woocommerce Email Designer requires WooCommerce to be active to work"
1217
+ msgstr ""
1218
+
1219
+ #: kadence-woocommerce-email-designer.php:187
1220
+ msgid "Pay for this order"
1221
+ msgstr ""
1222
+
1223
+ #: kadence-woocommerce-email-designer.php:195
1224
+ #: kadence-woocommerce-email-designer.php:199
1225
+ msgid "Pay Now &raquo;"
1226
+ msgstr ""
1227
+
1228
+ #: kadence-woocommerce-email-designer.php:344
1229
+ #: kadence-woocommerce-email-designer.php:345
1230
+ msgid "Email Customizer"
1231
+ msgstr ""
1232
+
1233
+ #: kadence-woocommerce-email-designer.php:358
1234
+ msgid "Open Email Designer"
1235
+ msgstr ""
1236
+
1237
+ #: preview.php:30
1238
+ msgid "Email Designer"
1239
+ msgstr ""
1240
+
1241
+ #: templates/woo/emails/cancelled-subscription.php:34
1242
+ #: templates/woo/emails/subscription-info.php:24
1243
+ msgid "Subscription"
1244
+ msgstr ""
1245
+
1246
+ #: templates/woo/emails/cancelled-subscription.php:35
1247
+ #: templates/woo/emails/email-order-details.php:84
1248
+ #: templates/woo/emails/subscription-info.php:27
1249
+ msgid "Price"
1250
+ msgstr ""
1251
+
1252
+ #: templates/woo/emails/cancelled-subscription.php:36
1253
+ msgid "Last Order Date"
1254
+ msgstr ""
1255
+
1256
+ #: templates/woo/emails/cancelled-subscription.php:37
1257
+ msgid "End of Prepaid Term"
1258
+ msgstr ""
1259
+
1260
+ #: templates/woo/emails/cancelled-subscription.php:54
1261
+ msgid "-"
1262
+ msgstr ""
1263
+
1264
+ #: templates/woo/emails/customer-completed-switch-order.php:34
1265
+ msgid "New Subscription Details"
1266
+ msgstr ""
1267
+
1268
+ #: templates/woo/emails/customer-new-account.php:40
1269
+ #, php-format
1270
+ msgid "Your password has been automatically generated: %s"
1271
+ msgstr ""
1272
+
1273
+ #: templates/woo/emails/customer-new-account.php:44
1274
+ #, php-format
1275
+ msgid ""
1276
+ "You can access your account area to view your orders and change your "
1277
+ "password here: %s."
1278
+ msgstr ""
1279
+
1280
+ #: templates/woo/emails/customer-note.php:41
1281
+ msgid "For your reference, your order details are shown below."
1282
+ msgstr ""
1283
+
1284
+ #: templates/woo/emails/customer-reset-password.php:38
1285
+ msgid "Click here to reset your password"
1286
+ msgstr ""
1287
+
1288
+ #: templates/woo/emails/email-addresses.php:35
1289
+ msgid "Billing address"
1290
+ msgstr ""
1291
+
1292
+ #: templates/woo/emails/email-addresses.php:38
1293
+ msgid "N/A"
1294
+ msgstr ""
1295
+
1296
+ #: templates/woo/emails/email-addresses.php:49
1297
+ msgid "Shipping address"
1298
+ msgstr ""
1299
+
1300
+ #: templates/woo/emails/email-customer-details.php:34
1301
+ msgid "Customer details"
1302
+ msgstr ""
1303
+
1304
+ #: templates/woo/emails/email-downloads.php:33
1305
+ msgid "Downloads"
1306
+ msgstr ""
1307
+
1308
+ #: templates/woo/emails/email-downloads.php:66
1309
+ msgid "Never"
1310
+ msgstr ""
1311
+
1312
+ #: templates/woo/emails/email-order-details.php:40
1313
+ msgid "Order Details"
1314
+ msgstr ""
1315
+
1316
+ #. translators: %s: Order ID.
1317
+ #: templates/woo/emails/email-order-details.php:53
1318
+ #, php-format
1319
+ msgid "Order number: %s"
1320
+ msgstr ""
1321
+
1322
+ #: templates/woo/emails/email-order-details.php:58
1323
+ msgid "Order date:"
1324
+ msgstr ""
1325
+
1326
+ #. translators: %s: Order ID.
1327
+ #: templates/woo/emails/email-order-details.php:73
1328
+ #, php-format
1329
+ msgid "Order #%s"
1330
+ msgstr ""
1331
+
1332
+ #: templates/woo/emails/email-order-details.php:82
1333
+ msgid "Product"
1334
+ msgstr ""
1335
+
1336
+ #: templates/woo/emails/email-order-details.php:83
1337
+ msgid "Quantity"
1338
+ msgstr ""
1339
+
1340
+ #: templates/woo/emails/email-order-details.php:117
1341
+ msgid "Note:"
1342
+ msgstr ""
1343
+
1344
+ #: templates/woo/emails/subscription-info.php:19
1345
+ msgid "Subscription Information:"
1346
+ msgstr ""
1347
+
1348
+ #: templates/woo/emails/subscription-info.php:25
1349
+ msgid "Start Date"
1350
+ msgstr ""
1351
+
1352
+ #: templates/woo/emails/subscription-info.php:26
1353
+ msgid "End Date"
1354
+ msgstr ""
1355
+
1356
+ #: templates/woo/emails/subscription-info.php:33
1357
+ #, php-format
1358
+ msgid "#%s"
1359
+ msgstr ""
1360
+
1361
+ #: templates/woo/emails/subscription-info.php:35
1362
+ msgid "When Cancelled"
1363
+ msgstr ""
preview.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * View for email preview
5
+ */
6
+
7
+ // Exit if accessed directly
8
+ if (!defined('ABSPATH')) {
9
+ exit;
10
+ }
11
+
12
+ ?>
13
+
14
+ <!DOCTYPE html>
15
+ <!--[if IE 7]>
16
+ <html class="ie ie7" <?php language_attributes(); ?>>
17
+ <![endif]-->
18
+ <!--[if IE 8]>
19
+ <html class="ie ie8" <?php language_attributes(); ?>>
20
+ <![endif]-->
21
+ <!--[if !(IE 7) & !(IE 8)]><!-->
22
+ <html <?php language_attributes(); ?>>
23
+ <!--<![endif]-->
24
+
25
+ <head>
26
+
27
+ <meta charset="<?php bloginfo('charset'); ?>" />
28
+ <meta name="viewport" content="width=device-width" />
29
+
30
+ <title><?php echo __('Email Designer', 'kadence-woomail-designer'); ?></title>
31
+
32
+ <style type="text/css" id="kadence_woomail_designer_custom_css"><?php echo Kadence_Woomail_Customizer::opt('custom_css'); ?>.mfp-hide {display: none;}</style>
33
+
34
+ </head>
35
+
36
+ <body>
37
+
38
+ <div id="kt_woomail_preview_wrapper" style="display: block;">
39
+
40
+ <?php Kadence_Woomail_Preview::print_preview_email(); ?>
41
+
42
+ </div>
43
+
44
+ <?php
45
+ do_action( 'woomail_footer' );
46
+ wp_footer(); ?>
47
+
48
+ </body>
49
+
50
+ </html>
readme.txt ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Kadence WooCommerce Email Designer ===
2
+ Contributors: britner
3
+ Tags: woocommerce, mail, email, email template, email templates, email design, preview, woocommerce emails, customize, customizer
4
+ Donate link: https://www.kadencethemes.com/about-us/
5
+ Requires PHP: 5.2.4
6
+ Requires at least: 4.4
7
+ Tested up to: 4.9.6
8
+ Stable tag: 1.0.2
9
+ License: GPLv2 or later
10
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
+
12
+ Customize the default WooCommerce email templates design and text through the native WordPress customizer. Preview emails and send test emails.
13
+
14
+ == Description ==
15
+
16
+ This plugin lets you easily customize the default transactional WooCommerce email templates. Edit the design using the native WordPress customizer for instant visual edits. Customize the text (including body text) or each email template in WooCommerce without editing code.
17
+
18
+ = Features Include =
19
+
20
+ * Live Preview your WooCommerce emails.
21
+ * Import pre-built email designs to get started.
22
+ * Customize emails to match your brand style.
23
+ * Customize Heading, Subtitle, and Body Text
24
+ * Send test emails for real email inbox testing.
25
+ * Export and import your settings with ease.
26
+
27
+ = Don't send bland emails =
28
+
29
+ Make an impression with your customers and represent your brand well by customizing your WooCommerce emails design and content with Kadence WooCommerce Email Designer.
30
+
31
+ = Support =
32
+
33
+ We are happy to help as best we can with questions! Please use the support forums.
34
+
35
+ = Credits =
36
+
37
+ Thanks to RightPress, we heavily pulled code and structure for this plugin from [Decorator – WooCommerce Email Customizer by RightPress](https://wordpress.org/plugins/decorator-woocommerce-email-customizer/).
38
+ Thanks to The Beaver Builder Team, we adapted our import/export control functionality from [Customizer Export/Import](https://wordpress.org/plugins/customizer-export-import/)
39
+ Thanks to cristian-ungureanu, we adapted our footer social media control functionality from [Customizer Repeater](https://github.com/cristian-ungureanu/customizer-repeater/)
40
+ Thanks to soderlind, we adapted our range control functionality from [WordPress Customizer Range Value Control](https://github.com/soderlind/class-customizer-range-value-control/)
41
+ Thanks to soderlind, we adapted our toggle control functionality from [WordPress Customizer Toggle Control](https://github.com/soderlind/class-customizer-toggle-control/)
42
+
43
+ == Installation ==
44
+
45
+ Install the plugin into the `/wp-content/plugins/` folder, and activate it.
46
+
47
+ == Screenshots ==
48
+
49
+ 1. Overview of available options
50
+
51
+ 2. Customize colors, fonts, backgrounds, etc
52
+
53
+ 3. Change/edit text copy to match your brand
54
+
55
+
56
+ == Changelog ==
57
+
58
+ = 1.0.2 =
59
+ * Bug Fix: PHP 5.2.4 issue.
60
+
61
+ = 1.0.1 =
62
+ * Bug Fix: Behind separator can't be absolute positioned.
63
+
64
+ = 1.0.0 =
65
+ * initial release
templates/woo/emails/admin-cancelled-order.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Admin cancelled order email
4
+ *
5
+ * This template can be overridden by copying it to yourtheme/woocommerce/emails/admin-cancelled-order.php.
6
+ *
7
+ * HOWEVER, on occasion WooCommerce will need to update template files and you
8
+ * (the theme developer) will need to copy the new files to your theme to
9
+ * maintain compatibility. We try to do this as little as possible, but it does
10
+ * happen. When this occurs the version of the template file will be bumped and
11
+ * the readme will list any important changes.
12
+ *
13
+ * @see https://docs.woocommerce.com/document/template-structure/
14
+ * @author WooThemes
15
+ * @package WooCommerce/Templates/Emails
16
+ * @version 2.5.0
17
+ */
18
+
19
+ /**
20
+ * NOTES ABOUT TEMPLATE EDIT FOR KADENCE WOOMAIL DESIGNER,
21
+ * 1. add hook 'kadence_woomail_designer_email_details' to pull in main text
22
+ * 2. Remove static main text area.
23
+ */
24
+
25
+ if ( ! defined( 'ABSPATH' ) ) {
26
+ exit;
27
+ }
28
+
29
+ /**
30
+ * @hooked WC_Emails::email_header() Output the email header
31
+ */
32
+ do_action( 'woocommerce_email_header', $email_heading, $email );
33
+
34
+ /**
35
+ * @hooked Kadence_Woomail_Designer::email_main_text_area
36
+ */
37
+ do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $plain_text, $email );
38
+
39
+ /**
40
+ * @hooked WC_Emails::order_details() Shows the order details table.
41
+ * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
42
+ * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
43
+ * @since 2.5.0
44
+ */
45
+ do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
46
+
47
+ /**
48
+ * @hooked WC_Emails::order_meta() Shows order meta data.
49
+ */
50
+ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
51
+
52
+ /**
53
+ * @hooked WC_Emails::customer_details() Shows customer details
54
+ * @hooked WC_Emails::email_address() Shows email address
55
+ */
56
+ do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
57
+
58
+ /**
59
+ * @hooked WC_Emails::email_footer() Output the email footer
60
+ */
61
+ do_action( 'woocommerce_email_footer', $email );
templates/woo/emails/admin-failed-order.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Admin failed order email
4
+ *
5
+ * This template can be overridden by copying it to yourtheme/woocommerce/emails/admin-failed-order.php
6
+ *
7
+ * HOWEVER, on occasion WooCommerce will need to update template files and you
8
+ * (the theme developer) will need to copy the new files to your theme to
9
+ * maintain compatibility. We try to do this as little as possible, but it does
10
+ * happen. When this occurs the version of the template file will be bumped and
11
+ * the readme will list any important changes.
12
+ *
13
+ * @see https://docs.woocommerce.com/document/template-structure/
14
+ * @author WooThemes
15
+ * @package WooCommerce/Templates/Emails
16
+ * @version 2.5.0
17
+ */
18
+
19
+ /**
20
+ * NOTES ABOUT TEMPLATE EDIT FOR KADENCE WOOMAIL DESIGNER,
21
+ * 1. add hook 'kadence_woomail_designer_email_details' to pull in main text
22
+ * 2. Remove static main text area.
23
+ */
24
+
25
+ if ( ! defined( 'ABSPATH' ) ) {
26
+ exit;
27
+ }
28
+
29
+ /**
30
+ * @hooked WC_Emails::email_header() Output the email header
31
+ */
32
+ do_action( 'woocommerce_email_header', $email_heading, $email );
33
+
34
+ /**
35
+ * @hooked Kadence_Woomail_Designer::email_main_text_area
36
+ */
37
+ do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $plain_text, $email );
38
+
39
+ /**
40
+ * @hooked WC_Emails::order_details() Shows the order details table.
41
+ * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
42
+ * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
43
+ * @since 2.5.0
44
+ */
45
+ do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
46
+
47
+ /**
48
+ * @hooked WC_Emails::order_meta() Shows order meta data.
49
+ */
50
+ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
51
+
52
+ /**
53
+ * @hooked WC_Emails::customer_details() Shows customer details
54
+ * @hooked WC_Emails::email_address() Shows email address
55
+ */
56
+ do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
57
+
58
+ /**
59
+ * @hooked WC_Emails::email_footer() Output the email footer
60
+ */
61
+ do_action( 'woocommerce_email_footer', $email );
templates/woo/emails/admin-new-order.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Admin new order email
4
+ *
5
+ * This template can be overridden by copying it to yourtheme/woocommerce/emails/admin-new-order.php.
6
+ *
7
+ * HOWEVER, on occasion WooCommerce will need to update template files and you
8
+ * (the theme developer) will need to copy the new files to your theme to
9
+ * maintain compatibility. We try to do this as little as possible, but it does
10
+ * happen. When this occurs the version of the template file will be bumped and
11
+ * the readme will list any important changes.
12
+ *
13
+ * @see https://docs.woocommerce.com/document/template-structure/
14
+ * @author WooThemes
15
+ * @package WooCommerce/Templates/Emails/HTML
16
+ * @version 2.5.0
17
+ */
18
+
19
+ /**
20
+ * NOTES ABOUT TEMPLATE EDIT FOR KADENCE WOOMAIL DESIGNER,
21
+ * 1. add hook 'kadence_woomail_designer_email_details' to pull in main text
22
+ * 2. Remove static main text area.
23
+ */
24
+
25
+ if ( ! defined( 'ABSPATH' ) ) {
26
+ exit;
27
+ }
28
+
29
+ /**
30
+ * @hooked WC_Emails::email_header() Output the email header
31
+ */
32
+ do_action( 'woocommerce_email_header', $email_heading, $email );
33
+
34
+ /**
35
+ * @hooked Kadence_Woomail_Designer::email_main_text_area
36
+ */
37
+ do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $plain_text, $email );
38
+
39
+ /**
40
+ * @hooked WC_Emails::order_details() Shows the order details table.
41
+ * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
42
+ * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
43
+ * @since 2.5.0
44
+ */
45
+ do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
46
+
47
+ /**
48
+ * @hooked WC_Emails::order_meta() Shows order meta data.
49
+ */
50
+ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
51
+
52
+ /**
53
+ * @hooked WC_Emails::customer_details() Shows customer details
54
+ * @hooked WC_Emails::email_address() Shows email address
55
+ */
56
+ do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
57
+
58
+ /**
59
+ * @hooked WC_Emails::email_footer() Output the email footer
60
+ */
61
+ do_action( 'woocommerce_email_footer', $email );
templates/woo/emails/admin-new-renewal-order.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Admin new renewal order email
4
+ *
5
+ * @author Brent Shepherd
6
+ * @package WooCommerce_Subscriptions/Templates/Emails
7
+ * @version 1.4.0
8
+ */
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit; // Exit if accessed directly
11
+ }
12
+
13
+ /**
14
+ * NOTES ABOUT TEMPLATE EDIT FOR KADENCE WOOMAIL DESIGNER,
15
+ * 1. add hook 'kadence_woomail_designer_email_details' to pull in main text
16
+ * 2. Remove static main text area.
17
+ */
18
+
19
+ do_action( 'woocommerce_email_header', $email_heading, $email );
20
+
21
+ /**
22
+ * @hooked Kadence_Woomail_Designer::email_main_text_area
23
+ */
24
+ do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $plain_text, $email );
25
+
26
+ /**
27
+ * @hooked WC_Subscriptions_Email::order_details() Shows the order details table.
28
+ * @since 2.1.0
29
+ */
30
+ do_action( 'woocommerce_subscriptions_email_order_details', $order, $sent_to_admin, $plain_text, $email );
31
+
32
+ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
33
+
34
+ do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
35
+
36
+ do_action( 'woocommerce_email_footer', $email );
37
+ ?>
templates/woo/emails/cancelled-subscription.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Cancelled Subscription email
4
+ *
5
+ * @author Prospress
6
+ * @package WooCommerce_Subscriptions/Templates/Emails
7
+ * @version 2.1.0
8
+ */
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit; // Exit if accessed directly
11
+ }
12
+
13
+ /**
14
+ * NOTES ABOUT TEMPLATE EDIT FOR KADENCE WOOMAIL DESIGNER,
15
+ * 1. add hook 'kadence_woomail_designer_email_details' to pull in main text
16
+ * 2. Remove static main text area.
17
+ */
18
+
19
+ ?>
20
+
21
+ <?php do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
22
+
23
+ <?php
24
+ /**
25
+ * @hooked Kadence_Woomail_Designer::email_main_text_area
26
+ */
27
+ do_action( 'kadence_woomail_designer_email_details', $subscription, $sent_to_admin, $plain_text, $email );
28
+
29
+ ?>
30
+
31
+ <table class="td" cellspacing="0" cellpadding="6" style="width: 100%; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;" border="1">
32
+ <thead>
33
+ <tr>
34
+ <th class="td" scope="col" style="text-align:left;"><?php esc_html_e( 'Subscription', 'kadence-woocommerce-email-designer' ); ?></th>
35
+ <th class="td" scope="col" style="text-align:left;"><?php echo esc_html_x( 'Price', 'table headings in notification email', 'kadence-woocommerce-email-designer' ); ?></th>
36
+ <th class="td" scope="col" style="text-align:left;"><?php echo esc_html_x( 'Last Order Date', 'table heading', 'kadence-woocommerce-email-designer' ); ?></th>
37
+ <th class="td" scope="col" style="text-align:left;"><?php echo esc_html_x( 'End of Prepaid Term', 'table headings in notification email', 'kadence-woocommerce-email-designer' ); ?></th>
38
+ </tr>
39
+ </thead>
40
+ <tbody>
41
+ <tr>
42
+ <td class="td" width="1%" style="text-align:left; vertical-align:middle;">
43
+ <a href="<?php echo esc_url( wcs_get_edit_post_link( $subscription->get_id() ) ); ?>">#<?php echo esc_html( $subscription->get_order_number() ); ?></a>
44
+ </td>
45
+ <td class="td" style="text-align:left; vertical-align:middle;">
46
+ <?php echo wp_kses_post( $subscription->get_formatted_order_total() ); ?>
47
+ </td>
48
+ <td class="td" style="text-align:left; vertical-align:middle;">
49
+ <?php
50
+ $last_order_time_created = $subscription->get_time( 'last_order_date_created', 'site' );
51
+ if ( ! empty( $last_order_time_created ) ) {
52
+ echo esc_html( date_i18n( wc_date_format(), $last_order_time_created ) );
53
+ } else {
54
+ esc_html_e( '-', 'kadence-woocommerce-email-designer' );
55
+ }
56
+ ?>
57
+ </td>
58
+ <td class="td" style="text-align:left; vertical-align:middle;">
59
+ <?php echo esc_html( date_i18n( wc_date_format(), $subscription->get_time( 'end', 'site' ) ) ); ?>
60
+ </td>
61
+ </tr>
62
+ </tbody>
63
+ </table>
64
+ <br/>
65
+
66
+ <?php do_action( 'woocommerce_subscriptions_email_order_details', $subscription, $sent_to_admin, $plain_text, $email ); ?>
67
+
68
+ <?php do_action( 'woocommerce_email_customer_details', $subscription, $sent_to_admin, $plain_text, $email ); ?>
69
+
70
+ <?php do_action( 'woocommerce_email_footer', $email ); ?>
templates/woo/emails/customer-completed-order.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Customer completed order email
4
+ *
5
+ * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-completed-order.php.
6
+ *
7
+ * HOWEVER, on occasion WooCommerce will need to update template files and you
8
+ * (the theme developer) will need to copy the new files to your theme to
9
+ * maintain compatibility. We try to do this as little as possible, but it does
10
+ * happen. When this occurs the version of the template file will be bumped and
11
+ * the readme will list any important changes.
12
+ *
13
+ * @see https://docs.woocommerce.com/document/template-structure/
14
+ * @author WooThemes
15
+ * @package WooCommerce/Templates/Emails
16
+ * @version 2.5.0
17
+ */
18
+
19
+ /**
20
+ * NOTES ABOUT TEMPLATE EDIT FOR KADENCE WOOMAIL DESIGNER,
21
+ * 1. add hook 'kadence_woomail_designer_email_details' to pull in main text
22
+ * 2. Remove static main text area.
23
+ */
24
+
25
+ if ( ! defined( 'ABSPATH' ) ) {
26
+ exit;
27
+ }
28
+
29
+ /**
30
+ * @hooked WC_Emails::email_header() Output the email header
31
+ */
32
+ do_action( 'woocommerce_email_header', $email_heading, $email );
33
+
34
+ /**
35
+ * @hooked Kadence_Woomail_Designer::email_main_text_area
36
+ */
37
+ do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $plain_text, $email );
38
+
39
+ /**
40
+ * @hooked WC_Emails::order_details() Shows the order details table.
41
+ * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
42
+ * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
43
+ * @since 2.5.0
44
+ */
45
+ do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
46
+
47
+ /**
48
+ * @hooked WC_Emails::order_meta() Shows order meta data.
49
+ */
50
+ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
51
+
52
+ /**
53
+ * @hooked WC_Emails::customer_details() Shows customer details
54
+ * @hooked WC_Emails::email_address() Shows email address
55
+ */
56
+ do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
57
+
58
+ /**
59
+ * @hooked WC_Emails::email_footer() Output the email footer
60
+ */
61
+ do_action( 'woocommerce_email_footer', $email );
templates/woo/emails/customer-completed-renewal-order.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Customer completed renewal order email
4
+ *
5
+ * @author Brent Shepherd
6
+ * @package WooCommerce_Subscriptions/Templates/Emails
7
+ * @version 1.4.0
8
+ */
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit; // Exit if accessed directly
12
+ }
13
+
14
+ /**
15
+ * NOTES ABOUT TEMPLATE EDIT FOR KADENCE WOOMAIL DESIGNER,
16
+ * 1. add hook 'kadence_woomail_designer_email_details' to pull in main text
17
+ * 2. Remove static main text area.
18
+ */
19
+
20
+ ?>
21
+
22
+ <?php do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
23
+
24
+ <?php
25
+ /**
26
+ * @hooked Kadence_Woomail_Designer::email_main_text_area
27
+ */
28
+ do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $plain_text, $email );
29
+ ?>
30
+
31
+ <?php do_action( 'woocommerce_subscriptions_email_order_details', $order, $sent_to_admin, $plain_text, $email ); ?>
32
+
33
+ <?php do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); ?>
34
+
35
+ <?php do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email ); ?>
36
+
37
+ <?php do_action( 'woocommerce_email_footer', $email ); ?>
templates/woo/emails/customer-completed-switch-order.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Customer completed subscription change email
4
+ *
5
+ * @author Brent Shepherd
6
+ * @package WooCommerce_Subscriptions/Templates/Emails
7
+ * @version 1.4.0
8
+ */
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit; // Exit if accessed directly
12
+ }
13
+
14
+ /**
15
+ * NOTES ABOUT TEMPLATE EDIT FOR KADENCE WOOMAIL DESIGNER,
16
+ * 1. add hook 'kadence_woomail_designer_email_details' to pull in main text
17
+ * 2. Remove static main text area.
18
+ */
19
+ ?>
20
+
21
+ <?php do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
22
+
23
+ <?php
24
+ /**
25
+ * @hooked Kadence_Woomail_Designer::email_main_text_area
26
+ */
27
+ do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $plain_text, $email );
28
+ ?>
29
+
30
+ <?php do_action( 'woocommerce_subscriptions_email_order_details', $order, $sent_to_admin, $plain_text, $email ); ?>
31
+
32
+ <?php do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); ?>
33
+
34
+ <h2><?php echo esc_html__( 'New Subscription Details', 'woocommerce-subscriptions' ); ?></h2>
35
+ <?php foreach ( $subscriptions as $subscription ) : ?>
36
+ <?php do_action( 'woocommerce_subscriptions_email_order_details', $subscription, $sent_to_admin, $plain_text, $email ); ?>
37
+ <?php endforeach; ?>
38
+
39
+ <?php do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email ); ?>
40
+
41
+ <?php do_action( 'woocommerce_email_footer', $email ); ?>
templates/woo/emails/customer-invoice.php ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Customer invoice email
4
+ *
5
+ * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-invoice.php.
6
+ *
7
+ * HOWEVER, on occasion WooCommerce will need to update template files and you
8
+ * (the theme developer) will need to copy the new files to your theme to
9
+ * maintain compatibility. We try to do this as little as possible, but it does
10
+ * happen. When this occurs the version of the template file will be bumped and
11
+ * the readme will list any important changes.
12
+ *
13
+ * @see https://docs.woocommerce.com/document/template-structure/
14
+ * @author WooThemes
15
+ * @package WooCommerce/Templates/Emails
16
+ * @version 3.3.0
17
+ */
18
+
19
+ /**
20
+ * NOTES ABOUT TEMPLATE EDIT FOR KADENCE WOOMAIL DESIGNER,
21
+ * 1. add hook 'kadence_woomail_designer_email_text' to pull in main text
22
+ * 2. Remove static main text area.
23
+ */
24
+
25
+ if ( ! defined( 'ABSPATH' ) ) {
26
+ exit;
27
+ }
28
+
29
+ /**
30
+ * Executes the e-mail header.
31
+ *
32
+ * @hooked WC_Emails::email_header() Output the email header
33
+ */
34
+ do_action( 'woocommerce_email_header', $email_heading, $email );
35
+
36
+
37
+ /**
38
+ * @hooked Kadence_Woomail_Designer::email_main_text_area
39
+ */
40
+ do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $plain_text, $email );
41
+
42
+
43
+ /**
44
+ * Hook for the woocommerce_email_order_details.
45
+ *
46
+ * @hooked WC_Emails::order_details() Shows the order details table.
47
+ * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
48
+ * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
49
+ * @since 2.5.0
50
+ */
51
+ do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
52
+
53
+ /**
54
+ * Hook for the woocommerce_email_order_meta.
55
+ *
56
+ * @hooked WC_Emails::order_meta() Shows order meta data.
57
+ */
58
+ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
59
+
60
+ /**
61
+ * Hook for woocommerce_email_customer_details.
62
+ *
63
+ * @hooked WC_Emails::customer_details() Shows customer details
64
+ * @hooked WC_Emails::email_address() Shows email address
65
+ */
66
+ do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
67
+
68
+ /**
69
+ * Executes the email footer.
70
+ *
71
+ * @hooked WC_Emails::email_footer() Output the email footer
72
+ */
73
+ do_action( 'woocommerce_email_footer', $email );
templates/woo/emails/customer-new-account.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Customer new account email
4
+ *
5
+ * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-new-account.php.
6
+ *
7
+ * HOWEVER, on occasion WooCommerce will need to update template files and you
8
+ * (the theme developer) will need to copy the new files to your theme to
9
+ * maintain compatibility. We try to do this as little as possible, but it does
10
+ * happen. When this occurs the version of the template file will be bumped and
11
+ * the readme will list any important changes.
12
+ *
13
+ * @see https://docs.woocommerce.com/document/template-structure/
14
+ * @author WooThemes
15
+ * @package WooCommerce/Templates/Emails
16
+ * @version 1.6.4
17
+ */
18
+
19
+ /**
20
+ * NOTES ABOUT TEMPLATE EDIT FOR KADENCE WOOMAIL DESIGNER,
21
+ * 1. add hook 'kadence_woomail_designer_email_text' to pull in main text
22
+ * 2. Remove static main text area.
23
+ */
24
+
25
+ if ( ! defined( 'ABSPATH' ) ) {
26
+ exit; // Exit if accessed directly
27
+ }
28
+
29
+ ?>
30
+
31
+ <?php do_action( 'woocommerce_email_header', $email_heading, $email );
32
+
33
+ /**
34
+ * @hooked Kadence_Woomail_Designer::email_main_text_area_no_order
35
+ */
36
+ do_action( 'kadence_woomail_designer_email_text', $email ); ?>
37
+
38
+ <?php if ( 'yes' === get_option( 'woocommerce_registration_generate_password' ) && $password_generated ) : ?>
39
+
40
+ <p><?php printf( __( 'Your password has been automatically generated: %s', 'kadence-woocommerce-email-designer' ), '<strong>' . esc_html( $user_pass ) . '</strong>' ); ?></p>
41
+
42
+ <?php endif; ?>
43
+
44
+ <p><?php printf( __( 'You can access your account area to view your orders and change your password here: %s.', 'kadence-woocommerce-email-designer' ), make_clickable( esc_url( wc_get_page_permalink( 'myaccount' ) ) ) ); ?></p>
45
+
46
+ <?php do_action( 'woocommerce_email_footer', $email );
templates/woo/emails/customer-note.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Customer note email
4
+ *
5
+ * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-note.php.
6
+ *
7
+ * HOWEVER, on occasion WooCommerce will need to update template files and you
8
+ * (the theme developer) will need to copy the new files to your theme to
9
+ * maintain compatibility. We try to do this as little as possible, but it does
10
+ * happen. When this occurs the version of the template file will be bumped and
11
+ * the readme will list any important changes.
12
+ *
13
+ * @see https://docs.woocommerce.com/document/template-structure/
14
+ * @author WooThemes
15
+ * @package WooCommerce/Templates/Emails
16
+ * @version 2.5.0
17
+ */
18
+
19
+ /**
20
+ * NOTES ABOUT TEMPLATE EDIT FOR KADENCE WOOMAIL DESIGNER,
21
+ * 1. add hook 'kadence_woomail_designer_email_details' to pull in main text
22
+ * 2. Remove static main text area.
23
+ */
24
+
25
+ if ( ! defined( 'ABSPATH' ) ) {
26
+ exit;
27
+ }
28
+
29
+ /**
30
+ * @hooked WC_Emails::email_header() Output the email header
31
+ */
32
+ do_action( 'woocommerce_email_header', $email_heading, $email );
33
+
34
+ /**
35
+ * @hooked Kadence_Woomail_Designer::email_main_text_area
36
+ */
37
+ do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $plain_text, $email ); ?>
38
+
39
+ <blockquote><?php echo wpautop( wptexturize( $customer_note ) ) ?></blockquote>
40
+
41
+ <p><?php _e( "For your reference, your order details are shown below.", 'kadence-woocommerce-email-designer' ); ?></p>
42
+
43
+ <?php
44
+
45
+ /**
46
+ * @hooked WC_Emails::order_details() Shows the order details table.
47
+ * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
48
+ * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
49
+ * @since 2.5.0
50
+ */
51
+ do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
52
+
53
+ /**
54
+ * @hooked WC_Emails::order_meta() Shows order meta data.
55
+ */
56
+ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
57
+
58
+ /**
59
+ * @hooked WC_Emails::customer_details() Shows customer details
60
+ * @hooked WC_Emails::email_address() Shows email address
61
+ */
62
+ do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
63
+
64
+ /**
65
+ * @hooked WC_Emails::email_footer() Output the email footer
66
+ */
67
+ do_action( 'woocommerce_email_footer', $email );
templates/woo/emails/customer-on-hold-order.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Customer on-hold order email
4
+ *
5
+ * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-on-hold-order.php.
6
+ *
7
+ * HOWEVER, on occasion WooCommerce will need to update template files and you
8
+ * (the theme developer) will need to copy the new files to your theme to
9
+ * maintain compatibility. We try to do this as little as possible, but it does
10
+ * happen. When this occurs the version of the template file will be bumped and
11
+ * the readme will list any important changes.
12
+ *
13
+ * @see https://docs.woocommerce.com/document/template-structure/
14
+ * @author WooThemes
15
+ * @package WooCommerce/Templates/Emails
16
+ * @version 2.5.0
17
+ */
18
+
19
+ /**
20
+ * NOTES ABOUT TEMPLATE EDIT FOR KADENCE WOOMAIL DESIGNER,
21
+ * 1. add hook 'kadence_woomail_designer_email_details' to pull in main text
22
+ * 2. Remove static main text area.
23
+ */
24
+
25
+ if ( ! defined( 'ABSPATH' ) ) {
26
+ exit;
27
+ }
28
+
29
+ /**
30
+ * @hooked WC_Emails::email_header() Output the email header
31
+ */
32
+ do_action( 'woocommerce_email_header', $email_heading, $email );
33
+
34
+ /**
35
+ * @hooked Kadence_Woomail_Designer::email_main_text_area
36
+ */
37
+ do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $plain_text, $email );
38
+
39
+ /**
40
+ * @hooked WC_Emails::order_details() Shows the order details table.
41
+ * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
42
+ * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
43
+ * @since 2.5.0
44
+ */
45
+ do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
46
+
47
+ /**
48
+ * @hooked WC_Emails::order_meta() Shows order meta data.
49
+ */
50
+ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
51
+
52
+ /**
53
+ * @hooked WC_Emails::customer_details() Shows customer details
54
+ * @hooked WC_Emails::email_address() Shows email address
55
+ */
56
+ do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
57
+
58
+ /**
59
+ * @hooked WC_Emails::email_footer() Output the email footer
60
+ */
61
+ do_action( 'woocommerce_email_footer', $email );
templates/woo/emails/customer-processing-order.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Customer processing order email
4
+ *
5
+ * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-processing-order.php.
6
+ *
7
+ * HOWEVER, on occasion WooCommerce will need to update template files and you
8
+ * (the theme developer) will need to copy the new files to your theme to
9
+ * maintain compatibility. We try to do this as little as possible, but it does
10
+ * happen. When this occurs the version of the template file will be bumped and
11
+ * the readme will list any important changes.
12
+ *
13
+ * @see https://docs.woocommerce.com/document/template-structure/
14
+ * @author WooThemes
15
+ * @package WooCommerce/Templates/Emails
16
+ * @version 2.5.0
17
+ */
18
+
19
+ /**
20
+ * NOTES ABOUT TEMPLATE EDIT FOR KADENCE WOOMAIL DESIGNER,
21
+ * 1. add hook 'kadence_woomail_designer_email_details' to pull in main text
22
+ * 2. Remove static main text area.
23
+ */
24
+
25
+ if ( ! defined( 'ABSPATH' ) ) {
26
+ exit;
27
+ }
28
+
29
+ /**
30
+ * @hooked WC_Emails::email_header() Output the email header
31
+ */
32
+ do_action( 'woocommerce_email_header', $email_heading, $email );
33
+
34
+ /**
35
+ * @hooked Kadence_Woomail_Designer::email_main_text_area
36
+ */
37
+ do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $plain_text, $email );
38
+
39
+ /**
40
+ * @hooked WC_Emails::order_details() Shows the order details table.
41
+ * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
42
+ * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
43
+ * @since 2.5.0
44
+ */
45
+ do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
46
+
47
+ /**
48
+ * @hooked WC_Emails::order_meta() Shows order meta data.
49
+ */
50
+ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
51
+
52
+ /**
53
+ * @hooked WC_Emails::customer_details() Shows customer details
54
+ * @hooked WC_Emails::email_address() Shows email address
55
+ */
56
+ do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
57
+
58
+ /**
59
+ * @hooked WC_Emails::email_footer() Output the email footer
60
+ */
61
+ do_action( 'woocommerce_email_footer', $email );
templates/woo/emails/customer-processing-renewal-order.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Customer processing renewal order email
4
+ *
5
+ * @author Brent Shepherd
6
+ * @package WooCommerce_Subscriptions/Templates/Emails
7
+ * @version 1.4.0
8
+ */
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit; // Exit if accessed directly
12
+ }
13
+
14
+ /**
15
+ * NOTES ABOUT TEMPLATE EDIT FOR KADENCE WOOMAIL DESIGNER,
16
+ * 1. add hook 'kadence_woomail_designer_email_details' to pull in main text
17
+ * 2. Remove static main text area.
18
+ */
19
+ ?>
20
+
21
+ <?php do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
22
+
23
+ <?php
24
+
25
+ /**
26
+ * @hooked Kadence_Woomail_Designer::email_main_text_area
27
+ */
28
+ do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $plain_text, $email );
29
+
30
+ ?>
31
+
32
+ <?php do_action( 'woocommerce_subscriptions_email_order_details', $order, $sent_to_admin, $plain_text, $email ); ?>
33
+
34
+ <?php do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); ?>
35
+
36
+ <?php do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email ); ?>
37
+
38
+ <?php do_action( 'woocommerce_email_footer', $email ); ?>
templates/woo/emails/customer-refunded-order.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Customer refunded order email
4
+ *
5
+ * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-refunded-order.php.
6
+ *
7
+ * HOWEVER, on occasion WooCommerce will need to update template files and you
8
+ * (the theme developer) will need to copy the new files to your theme to
9
+ * maintain compatibility. We try to do this as little as possible, but it does
10
+ * happen. When this occurs the version of the template file will be bumped and
11
+ * the readme will list any important changes.
12
+ *
13
+ * @see https://docs.woocommerce.com/document/template-structure/
14
+ * @author WooThemes
15
+ * @package WooCommerce/Templates/Emails
16
+ * @version 2.5.0
17
+ */
18
+
19
+ /**
20
+ * NOTES ABOUT TEMPLATE EDIT FOR KADENCE WOOMAIL DESIGNER,
21
+ * 1. add hook 'kadence_woomail_designer_email_details' to pull in main text
22
+ * 2. Remove static main text area.
23
+ */
24
+
25
+ if ( ! defined( 'ABSPATH' ) ) {
26
+ exit;
27
+ }
28
+
29
+ /**
30
+ * @hooked WC_Emails::email_header() Output the email header
31
+ */
32
+ do_action( 'woocommerce_email_header', $email_heading, $email );
33
+
34
+ /**
35
+ * @hooked Kadence_Woomail_Designer::email_main_text_area
36
+ */
37
+ do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $plain_text, $email );
38
+
39
+ /**
40
+ * @hooked WC_Emails::order_details() Shows the order details table.
41
+ * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
42
+ * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
43
+ * @since 2.5.0
44
+ */
45
+ do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
46
+
47
+ /**
48
+ * @hooked WC_Emails::order_meta() Shows order meta data.
49
+ */
50
+ do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
51
+
52
+ /**
53
+ * @hooked WC_Emails::customer_details() Shows customer details
54
+ * @hooked WC_Emails::email_address() Shows email address
55
+ */
56
+ do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
57
+
58
+ /**
59
+ * @hooked WC_Emails::email_footer() Output the email footer
60
+ */
61
+ do_action( 'woocommerce_email_footer', $email );
templates/woo/emails/customer-renewal-invoice.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Customer renewal invoice email
4
+ *
5
+ * @author Brent Shepherd
6
+ * @package WooCommerce_Subscriptions/Templates/Emails
7
+ * @version 1.4.0
8
+ */
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit; // Exit if accessed directly
11
+ }
12
+
13
+ /**
14
+ * NOTES ABOUT TEMPLATE EDIT FOR KADENCE WOOMAIL DESIGNER,
15
+ * 1. add hook 'kadence_woomail_designer_email_details' to pull in main text
16
+ * 2. Remove static main text area.
17
+ */
18
+
19
+ ?>
20
+
21
+ <?php do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
22
+
23
+ <?php
24
+
25
+ /**
26
+ * @hooked Kadence_Woomail_Designer::email_main_text_area
27
+ */
28
+ do_action( 'kadence_woomail_designer_email_details', $order, $sent_to_admin, $plain_text, $email );
29
+
30
+ ?>
31
+
32
+ <?php do_action( 'woocommerce_subscriptions_email_order_details', $order, $sent_to_admin, $plain_text, $email ); ?>
33
+
34
+ <?php do_action( 'woocommerce_email_footer', $email ); ?>
templates/woo/emails/customer-reset-password.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Customer Reset Password email
4
+ *
5
+ * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-reset-password.php.
6
+ *
7
+ * HOWEVER, on occasion WooCommerce will need to update template files and you
8
+ * (the theme developer) will need to copy the new files to your theme to
9
+ * maintain compatibility. We try to do this as little as possible, but it does
10
+ * happen. When this occurs the version of the template file will be bumped and
11
+ * the readme will list any important changes.
12
+ *
13
+ * @see https://docs.woocommerce.com/document/template-structure/
14
+ * @author WooThemes
15
+ * @package WooCommerce/Templates/Emails
16
+ * @version 2.0.0
17
+ */
18
+
19
+ /**
20
+ * NOTES ABOUT TEMPLATE EDIT FOR KADENCE WOOMAIL DESIGNER,
21
+ * 1. add hook 'kadence_woomail_designer_email_details' to pull in main text
22
+ * 2. Remove static main text area.
23
+ */
24
+
25
+ if ( ! defined( 'ABSPATH' ) ) {
26
+ exit; // Exit if accessed directly
27
+ }
28
+
29
+ do_action( 'woocommerce_email_header', $email_heading, $email );
30
+
31
+ /**
32
+ * @hooked Kadence_Woomail_Designer::email_main_text_area_no_order
33
+ */
34
+ do_action( 'kadence_woomail_designer_email_text', $email ); ?>
35
+
36
+ <p>
37
+ <a class="link" href="<?php echo esc_url( add_query_arg( array( 'key' => $reset_key, 'id' => $user_id ), wc_get_endpoint_url( 'lost-password', '', wc_get_page_permalink( 'myaccount' ) ) ) ); ?>">
38
+ <?php _e( 'Click here to reset your password', 'kadence-woocommerce-email-designer' ); ?></a>
39
+ </p>
40
+ <p></p>
41
+
42
+ <?php do_action( 'woocommerce_email_footer', $email ); ?>
templates/woo/emails/email-addresses.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Email Addresses
4
+ *
5
+ * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-addresses.php.
6
+ *
7
+ * HOWEVER, on occasion WooCommerce will need to update template files and you
8
+ * (the theme developer) will need to copy the new files to your theme to
9
+ * maintain compatibility. We try to do this as little as possible, but it does
10
+ * happen. When this occurs the version of the template file will be bumped and
11
+ * the readme will list any important changes.
12
+ *
13
+ * @see https://docs.woocommerce.com/document/template-structure/
14
+ * @author WooThemes
15
+ * @package WooCommerce/Templates/Emails
16
+ * @version 3.2.1
17
+ */
18
+
19
+ /**
20
+ * EDIT NOTES FOR KADENCE WOOMAIL DESIGNER
21
+ *
22
+ *
23
+ */
24
+
25
+
26
+ if ( ! defined( 'ABSPATH' ) ) {
27
+ exit;
28
+ }
29
+
30
+ $text_align = is_rtl() ? 'right' : 'left';
31
+
32
+ ?><table id="addresses" cellspacing="0" cellpadding="0" style="width: 100%; vertical-align: top; margin-bottom: 40px; padding:0;" border="0">
33
+ <tr>
34
+ <td style="text-align:<?php echo $text_align; ?>; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; border:0; padding:0;" valign="top" width="50%">
35
+ <h2><?php _e( 'Billing address', 'kadence-woocommerce-email-designer' ); ?></h2>
36
+
37
+ <address class="address">
38
+ <?php echo ( $address = $order->get_formatted_billing_address() ) ? $address : __( 'N/A', 'kadence-woocommerce-email-designer' ); ?>
39
+ <?php if ( $order->get_billing_phone() ) : ?>
40
+ <br/><?php echo esc_html( $order->get_billing_phone() ); ?>
41
+ <?php endif; ?>
42
+ <?php if ( $order->get_billing_email() ) : ?>
43
+ <p><?php echo esc_html( $order->get_billing_email() ); ?></p>
44
+ <?php endif; ?>
45
+ </address>
46
+ </td>
47
+ <?php if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() && ( $shipping = $order->get_formatted_shipping_address() ) ) : ?>
48
+ <td style="text-align:<?php echo $text_align; ?>; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; padding:0;" valign="top" width="50%">
49
+ <h2><?php _e( 'Shipping address', 'kadence-woocommerce-email-designer' ); ?></h2>
50
+
51
+ <address class="address"><?php echo $shipping; ?></address>
52
+ </td>
53
+ <?php endif; ?>
54
+ </tr>
55
+ </table>
templates/woo/emails/email-customer-details.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Additional Customer Details
4
+ *
5
+ * This is extra customer data which can be filtered by plugins. It outputs below the order item table.
6
+ *
7
+ * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-customer-details.php.
8
+ *
9
+ * HOWEVER, on occasion WooCommerce will need to update template files and you
10
+ * (the theme developer) will need to copy the new files to your theme to
11
+ * maintain compatibility. We try to do this as little as possible, but it does
12
+ * happen. When this occurs the version of the template file will be bumped and
13
+ * the readme will list any important changes.
14
+ *
15
+ * @see https://docs.woocommerce.com/document/template-structure/
16
+ * @author WooThemes
17
+ * @package WooCommerce/Templates/Emails
18
+ * @version 2.5.0
19
+ */
20
+
21
+ /**
22
+ * EDIT NOTES FOR KADENCE WOOMAIL DESIGNER
23
+ *
24
+ *
25
+ */
26
+
27
+ if ( ! defined( 'ABSPATH' ) ) {
28
+ exit;
29
+ }
30
+
31
+ ?>
32
+ <?php if ( ! empty( $fields ) ) : ?>
33
+ <div style="font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; margin-bottom: 40px;">
34
+ <h2><?php _e( 'Customer details', 'kadence-woocommerce-email-designer' ); ?></h2>
35
+ <ul>
36
+ <?php foreach ( $fields as $field ) : ?>
37
+ <li><strong><?php echo wp_kses_post( $field['label'] ); ?>:</strong> <span class="text"><?php echo wp_kses_post( $field['value'] ); ?></span></li>
38
+ <?php endforeach; ?>
39
+ </ul>
40
+ </div>
41
+ <?php endif; ?>
templates/woo/emails/email-downloads.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Email Downloads.
4
+ *
5
+ * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-downloads.php.
6
+ *
7
+ * HOWEVER, on occasion WooCommerce will need to update template files and you
8
+ * (the theme developer) will need to copy the new files to your theme to
9
+ * maintain compatibility. We try to do this as little as possible, but it does
10
+ * happen. When this occurs the version of the template file will be bumped and
11
+ * the readme will list any important changes.
12
+ *
13
+ * @see https://docs.woocommerce.com/document/template-structure/
14
+ * @author WooThemes
15
+ * @package WooCommerce/Templates
16
+ * @version 3.4.0
17
+ */
18
+
19
+ /**
20
+ * EDIT NOTES FOR KADENCE WOOMAIL DESIGNER
21
+ *
22
+ * ADDED: Clear Div
23
+ */
24
+
25
+ if ( ! defined( 'ABSPATH' ) ) {
26
+ exit;
27
+ }
28
+
29
+ $text_align = is_rtl() ? 'right' : 'left';
30
+
31
+ ?>
32
+ <div style="clear:both; height:1px;"></div>
33
+ <h2 class="woocommerce-order-downloads__title"><?php esc_html_e( 'Downloads', 'kadence-woocommerce-email-designer' ); ?></h2>
34
+
35
+ <table class="td" cellspacing="0" cellpadding="6" style="width: 100%; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; margin-bottom: 40px;" border="1">
36
+ <thead>
37
+ <tr>
38
+ <?php foreach ( $columns as $column_id => $column_name ) : ?>
39
+ <th class="td" scope="col" style="text-align:<?php echo $text_align; ?>;"><?php echo esc_html( $column_name ); ?></th>
40
+ <?php endforeach; ?>
41
+ </tr>
42
+ </thead>
43
+
44
+ <?php foreach ( $downloads as $download ) : ?>
45
+ <tr>
46
+ <?php foreach ( $columns as $column_id => $column_name ) : ?>
47
+ <td class="td" style="text-align:<?php echo $text_align; ?>;"><?php
48
+ if ( has_action( 'woocommerce_email_downloads_column_' . $column_id ) ) {
49
+ do_action( 'woocommerce_email_downloads_column_' . $column_id, $download, $plain_text );
50
+ } else {
51
+ switch ( $column_id ) {
52
+ case 'download-product' : ?>
53
+ <a href="<?php echo esc_url( get_permalink( $download['product_id'] ) ); ?>"><?php echo esc_html( $download['product_name'] ); ?></a>
54
+ <?php
55
+ break;
56
+ case 'download-file' : ?>
57
+ <a href="<?php echo esc_url( $download['download_url'] ); ?>" class="woocommerce-MyAccount-downloads-file button alt"><?php echo esc_html( $download['download_name'] ); ?></a>
58
+ <?php
59
+ break;
60
+ case 'download-expires' : ?>
61
+ <?php if ( ! empty( $download['access_expires'] ) ) {
62
+ ?>
63
+ <time datetime="<?php echo esc_attr( date( 'Y-m-d', strtotime( $download['access_expires'] ) ) ); ?>" title="<?php echo esc_attr( strtotime( $download['access_expires'] ) ); ?>"><?php echo esc_html( date_i18n( get_option( 'date_format' ), strtotime( $download['access_expires'] ) ) ); ?></time>
64
+ <?php
65
+ } else {
66
+ esc_html_e( 'Never', 'kadence-woocommerce-email-designer' );
67
+ }
68
+ break;
69
+ }
70
+ }
71
+ ?></td>
72
+ <?php endforeach; ?>
73
+ </tr>
74
+ <?php endforeach; ?>
75
+ </table>
templates/woo/emails/email-footer.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Email Footer
4
+ *
5
+ * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-footer.php.
6
+ *
7
+ * HOWEVER, on occasion WooCommerce will need to update template files and you
8
+ * (the theme developer) will need to copy the new files to your theme to
9
+ * maintain compatibility. We try to do this as little as possible, but it does
10
+ * happen. When this occurs the version of the template file will be bumped and
11
+ * the readme will list any important changes.
12
+ *
13
+ * @see https://docs.woocommerce.com/document/template-structure/
14
+ * @author WooThemes
15
+ * @package WooCommerce/Templates/Emails
16
+ * @version 2.3.0
17
+ */
18
+
19
+ /**
20
+ * EDIT NOTES FOR KADENCE WOOMAIL DESIGNER
21
+ *
22
+ * Add option tp Move footer out of template container so background can be fullwidth
23
+ * Change width="600" to width 100% for tables
24
+ * Add subtitle option.
25
+ * Add Header image container
26
+ * Add Order Style Class
27
+ */
28
+
29
+ if ( ! defined( 'ABSPATH' ) ) {
30
+ exit; // Exit if accessed directly
31
+ }
32
+ $footer_placement = Kadence_Woomail_Customizer::opt( 'footer_background_placement' );
33
+ if ( empty( $footer_placement ) ) {
34
+ $footer_placement = 'inside';
35
+ }
36
+
37
+ ?>
38
+ </div>
39
+ </td>
40
+ </tr>
41
+ </table>
42
+ <!-- End Content -->
43
+ </td>
44
+ </tr>
45
+ </table>
46
+ <!-- End Body -->
47
+ </td>
48
+ </tr>
49
+ <tr>
50
+ <td align="center" valign="top">
51
+ <?php if( 'inside' == $footer_placement ) {
52
+ do_action('kadence_woomail_designer_email_footer');
53
+ } ?>
54
+ </td>
55
+ </tr>
56
+ </table> <!-- End template container -->
57
+ <?php if( 'outside' == $footer_placement ) {
58
+ do_action('kadence_woomail_designer_email_footer');
59
+ } ?>
60
+ </td>
61
+ </tr>
62
+ </table>
63
+ </div>
64
+ </body>
65
+ </html>
templates/woo/emails/email-header.php ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Email Header
4
+ *
5
+ * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-header.php.
6
+ *
7
+ * HOWEVER, on occasion WooCommerce will need to update template files and you
8
+ * (the theme developer) will need to copy the new files to your theme to
9
+ * maintain compatibility. We try to do this as little as possible, but it does
10
+ * happen. When this occurs the version of the template file will be bumped and
11
+ * the readme will list any important changes.
12
+ *
13
+ * @see https://docs.woocommerce.com/document/template-structure/
14
+ * @author WooThemes
15
+ * @package WooCommerce/Templates/Emails
16
+ * @version 2.4.0
17
+ */
18
+
19
+ if ( ! defined( 'ABSPATH' ) ) {
20
+ exit; // Exit if accessed directly
21
+ }
22
+ /**
23
+ * EDIT NOTES FOR KADENCE WOOMAIL DESIGNER
24
+ *
25
+ * add class to body tag so you can style this specifically
26
+ * Change width="600" to width 100% for tables
27
+ * Add subtitle option.
28
+ * Add Header image container
29
+ * Add Order Style Class
30
+ */
31
+ $key = $email->id;
32
+ $email_subtitle = Kadence_Woomail_Customizer::opt( $key.'_subtitle' );
33
+ if ( ! empty( $email_subtitle ) ) {
34
+ $email_subtitle = Kadence_Woomail_Designer::filter_subtitle( $email_subtitle, $email );
35
+ }
36
+ $subtitle_placement = Kadence_Woomail_Customizer::opt( 'subtitle_placement' );
37
+ $order_style = Kadence_Woomail_Customizer::opt( 'order_items_style' );
38
+ if ( empty( $order_style ) ) {
39
+ $order_style = 'normal';
40
+ }
41
+ $h2_style = Kadence_Woomail_Customizer::opt( 'h2_style' );
42
+ if ( empty( $h2_style ) ) {
43
+ $h2_style = 'none';
44
+ }
45
+
46
+ ?>
47
+ <!DOCTYPE html>
48
+ <html <?php language_attributes(); ?>>
49
+ <head>
50
+ <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" />
51
+ <title><?php echo get_bloginfo( 'name', 'display' ); ?></title>
52
+ </head>
53
+ <body <?php echo is_rtl() ? 'rightmargin' : 'leftmargin'; ?>="0" marginwidth="0" topmargin="0" marginheight="0" offset="0" class="kt-woo-wrap order-items-<?php echo esc_attr( $order_style );?> title-style-<?php echo esc_attr( $h2_style );?>">
54
+ <div id="wrapper" dir="<?php echo is_rtl() ? 'rtl' : 'ltr'?>">
55
+ <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
56
+ <tr>
57
+ <td align="center" valign="top">
58
+ <div id="template_header_image_container">
59
+ <div id="template_header_image">
60
+ <?php
61
+ if ( $img = get_option( 'woocommerce_email_header_image' ) ) {
62
+ echo '<p style="margin-top:0;"><img src="' . esc_url( $img ) . '" alt="' . get_bloginfo( 'name', 'display' ) . '" /></p>';
63
+ }
64
+ ?>
65
+ </div>
66
+ </div>
67
+ <table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_container">
68
+ <tr>
69
+ <td align="center" valign="top">
70
+ <!-- Header -->
71
+ <table border="0" cellpadding="0" cellspacing="0" width="600" id="template_header">
72
+ <tr>
73
+ <td id="header_wrapper">
74
+ <?php if ( 'above' == $subtitle_placement ) { ?>
75
+ <div class="subtitle"><?php echo $email_subtitle; ?></div>
76
+ <?php } ?>
77
+ <h1><?php echo $email_heading; ?></h1>
78
+ <?php if ( 'below' == $subtitle_placement ) { ?>
79
+ <div class="subtitle"><?php echo $email_subtitle; ?></div>
80
+ <?php } ?>
81
+ </td>
82
+ </tr>
83
+ </table>
84
+ <!-- End Header -->
85
+ </td>
86
+ </tr>
87
+ <tr>
88
+ <td align="center" valign="top">
89
+ <!-- Body -->
90
+ <table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_body">
91
+ <tr>
92
+ <td valign="top" id="body_content">
93
+ <!-- Content -->
94
+ <table border="0" cellpadding="20" cellspacing="0" width="100%">
95
+ <tr>
96
+ <td valign="top">
97
+ <div id="body_content_inner">
templates/woo/emails/email-order-details.php ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Order details table shown in emails.
4
+ *
5
+ * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-order-details.php.
6
+ *
7
+ * HOWEVER, on occasion WooCommerce will need to update template files and you
8
+ * (the theme developer) will need to copy the new files to your theme to
9
+ * maintain compatibility. We try to do this as little as possible, but it does
10
+ * happen. When this occurs the version of the template file will be bumped and
11
+ * the readme will list any important changes.
12
+ *
13
+ * @see https://docs.woocommerce.com/document/template-structure/
14
+ * @package WooCommerce/Templates/Emails
15
+ * @version 3.3.1
16
+ */
17
+
18
+ /*
19
+ * EDIT NOTES FOR KADENCE WOOMAIL DESIGNER
20
+ *
21
+ * ADDED: option to split up order heading.
22
+ */
23
+
24
+ if ( ! defined( 'ABSPATH' ) ) {
25
+ exit;
26
+ }
27
+
28
+ $text_align = is_rtl() ? 'right' : 'left';
29
+
30
+ do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ); ?>
31
+ <div style="clear:both; height:1px;"></div>
32
+ <?php $order_head_style = Kadence_Woomail_Customizer::opt( 'order_heading_style' );
33
+ if ( empty( $order_head_style ) ) {
34
+ $order_head_style = 'normal';
35
+ }
36
+ if ( 'split' == $order_head_style ) {
37
+ ?>
38
+ <h2>
39
+ <?php
40
+ echo __( 'Order Details', 'kadence-woocommerce-email-designer' );
41
+ ?>
42
+ </h2>
43
+ <h3 style="text-align: left; float:left;">
44
+ <?php
45
+ if ( $sent_to_admin ) {
46
+ $before = '<a class="link" href="' . esc_url( $order->get_edit_order_url() ) . '">';
47
+ $after = '</a>';
48
+ } else {
49
+ $before = '';
50
+ $after = '';
51
+ }
52
+ /* translators: %s: Order ID. */
53
+ echo wp_kses_post( $before . sprintf( __( 'Order number: %s', 'kadence-woocommerce-email-designer' ) . $after, $order->get_order_number() ) );
54
+ ?>
55
+ </h3>
56
+ <h3 style="text-align: right; float:right;">
57
+ <?php
58
+ echo wp_kses_post( sprintf( __( 'Order date:', 'kadence-woocommerce-email-designer' ) . '<time datetime="%s">%s</time>', $order->get_date_created()->format( 'c' ), wc_format_datetime( $order->get_date_created() ) ) );
59
+ ?>
60
+ </h3>
61
+ <?php
62
+ } else { ?>
63
+ <h2>
64
+ <?php
65
+ if ( $sent_to_admin ) {
66
+ $before = '<a class="link" href="' . esc_url( $order->get_edit_order_url() ) . '">';
67
+ $after = '</a>';
68
+ } else {
69
+ $before = '';
70
+ $after = '';
71
+ }
72
+ /* translators: %s: Order ID. */
73
+ echo wp_kses_post( $before . sprintf( __( 'Order #%s', 'kadence-woocommerce-email-designer' ) . $after . ' (<time datetime="%s">%s</time>)', $order->get_order_number(), $order->get_date_created()->format( 'c' ), wc_format_datetime( $order->get_date_created() ) ) );
74
+ ?>
75
+ </h2>
76
+ <?php } ?>
77
+
78
+ <div style="margin-bottom: 40px;">
79
+ <table class="td" cellspacing="0" cellpadding="6" style="width: 100%; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;" border="1">
80
+ <thead>
81
+ <tr>
82
+ <th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Product', 'kadence-woocommerce-email-designer' ); ?></th>
83
+ <th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Quantity', 'kadence-woocommerce-email-designer' ); ?></th>
84
+ <th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Price', 'kadence-woocommerce-email-designer' ); ?></th>
85
+ </tr>
86
+ </thead>
87
+ <tbody>
88
+ <?php
89
+ echo wc_get_email_order_items( $order, array( // WPCS: XSS ok.
90
+ 'show_sku' => $sent_to_admin,
91
+ 'show_image' => false,
92
+ 'image_size' => array( 32, 32 ),
93
+ 'plain_text' => $plain_text,
94
+ 'sent_to_admin' => $sent_to_admin,
95
+ ) );
96
+ ?>
97
+ </tbody>
98
+ <tfoot>
99
+ <?php
100
+ $totals = $order->get_order_item_totals();
101
+
102
+ if ( $totals ) {
103
+ $i = 0;
104
+ foreach ( $totals as $total ) {
105
+ $i++;
106
+ ?>
107
+ <tr>
108
+ <th class="td" scope="row" colspan="2" style="text-align:<?php echo esc_attr( $text_align ); ?>; <?php echo ( 1 === $i ) ? 'border-top-width: 4px;' : ''; ?>"><?php echo wp_kses_post( $total['label'] ); ?></th>
109
+ <td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>; <?php echo ( 1 === $i ) ? 'border-top-width: 4px;' : ''; ?>"><?php echo wp_kses_post( $total['value'] ); ?></td>
110
+ </tr>
111
+ <?php
112
+ }
113
+ }
114
+ if ( $order->get_customer_note() ) {
115
+ ?>
116
+ <tr>
117
+ <th class="td" scope="row" colspan="2" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Note:', 'kadence-woocommerce-email-designer' ); ?></th>
118
+ <td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( wptexturize( $order->get_customer_note() ) ); ?></td>
119
+ </tr>
120
+ <?php
121
+ }
122
+ ?>
123
+ </tfoot>
124
+ </table>
125
+ </div>
126
+
127
+ <?php do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text, $email ); ?>
templates/woo/emails/email-styles.php ADDED
@@ -0,0 +1,282 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Email Styles
4
+ *
5
+ * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-styles.php.
6
+ *
7
+ * HOWEVER, on occasion WooCommerce will need to update template files and you
8
+ * (the theme developer) will need to copy the new files to your theme to
9
+ * maintain compatibility. We try to do this as little as possible, but it does
10
+ * happen. When this occurs the version of the template file will be bumped and
11
+ * the readme will list any important changes.
12
+ *
13
+ * @see https://docs.woocommerce.com/document/template-structure/
14
+ * @author WooThemes
15
+ * @package WooCommerce/Templates/Emails
16
+ * @version 3.3.0
17
+ */
18
+
19
+ if ( ! defined( 'ABSPATH' ) ) {
20
+ exit;
21
+ }
22
+
23
+ // Load colors.
24
+ $bg = get_option( 'woocommerce_email_background_color' );
25
+ $body = get_option( 'woocommerce_email_body_background_color' );
26
+ $base = get_option( 'woocommerce_email_base_color' );
27
+ $base_text = wc_light_or_dark( $base, '#202020', '#ffffff' );
28
+ $text = get_option( 'woocommerce_email_text_color' );
29
+
30
+ // Pick a contrasting color for links.
31
+ $link = wc_hex_is_light( $base ) ? $base : $base_text;
32
+ if ( wc_hex_is_light( $body ) ) {
33
+ $link = wc_hex_is_light( $base ) ? $base_text : $base;
34
+ }
35
+
36
+ $bg_darker_10 = wc_hex_darker( $bg, 10 );
37
+ $body_darker_10 = wc_hex_darker( $body, 10 );
38
+ $base_lighter_20 = wc_hex_lighter( $base, 20 );
39
+ $base_lighter_40 = wc_hex_lighter( $base, 40 );
40
+ $text_lighter_20 = wc_hex_lighter( $text, 20 );
41
+
42
+ // !important; is a gmail hack to prevent styles being stripped if it doesn't like something.
43
+ /*
44
+ EDIT NOTES
45
+ Added overflow:hidden; to template container
46
+ Removed border-radius from template header
47
+
48
+ Remove Top Padding from #body_content table td
49
+ ADDED: Body background color to pull from wrapper background
50
+ ADDED: light order table styles
51
+ ADDED: Separator styles
52
+ CHANGED h3 margin from 16px 0 8px to 0 0 8px;
53
+ CHANGED address padding from 12px 12px 0 to 12px;
54
+ ADDED address > p margin bottom 0;
55
+ ADDED Padding left if shipping address
56
+ ADDED footer social links
57
+ Change footer credits padding to 10px.
58
+ ADDED : btn styling.
59
+ */
60
+ ?>
61
+ body {
62
+ background-color: <?php echo esc_attr( $bg ); ?>;
63
+ }
64
+ #wrapper {
65
+ background-color: <?php echo esc_attr( $bg ); ?>;
66
+ margin: 0;
67
+ padding: 70px 0 70px 0;
68
+ -webkit-text-size-adjust: none !important;
69
+ width: 100%;
70
+ }
71
+
72
+ #template_container {
73
+ box-shadow: 0 1px 4px rgba(0,0,0,0.1) !important;
74
+ background-color: <?php echo esc_attr( $body ); ?>;
75
+ border: 1px solid <?php echo esc_attr( $bg_darker_10 ); ?>;
76
+ border-radius: 3px !important;
77
+ overflow:hidden;
78
+ }
79
+
80
+ #template_header {
81
+ background-color: <?php echo esc_attr( $base ); ?>;
82
+ color: <?php echo esc_attr( $base_text ); ?>;
83
+ border-bottom: 0;
84
+ font-weight: bold;
85
+ line-height: 100%;
86
+ vertical-align: middle;
87
+ font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
88
+ }
89
+
90
+ #template_header h1,
91
+ #template_header h1 a {
92
+ color: <?php echo esc_attr( $base_text ); ?>;
93
+ }
94
+
95
+ #template_footer td {
96
+ padding: 0;
97
+ -webkit-border-radius: 6px;
98
+ }
99
+
100
+ #template_footer #credit {
101
+ border:0;
102
+ color: <?php echo esc_attr( $base_lighter_40 ); ?>;
103
+ font-family: Arial;
104
+ font-size:12px;
105
+ line-height:125%;
106
+ text-align:center;
107
+ padding: 10px;
108
+ }
109
+
110
+ #body_content {
111
+ background-color: <?php echo esc_attr( $body ); ?>;
112
+ }
113
+
114
+ #body_content table td {
115
+ padding: 0px 48px 0;
116
+ }
117
+
118
+ #body_content table td td {
119
+ padding: 12px;
120
+ }
121
+
122
+ #body_content table td th {
123
+ padding: 12px;
124
+ }
125
+
126
+ #body_content td ul.wc-item-meta {
127
+ font-size: small;
128
+ margin: 1em 0 0;
129
+ padding: 0;
130
+ list-style: none;
131
+ }
132
+
133
+ #body_content td ul.wc-item-meta li {
134
+ margin: 0.5em 0 0;
135
+ padding: 0;
136
+ }
137
+
138
+ #body_content td ul.wc-item-meta li p {
139
+ margin: 0;
140
+ }
141
+
142
+ #body_content p {
143
+ margin: 0 0 16px;
144
+ }
145
+
146
+ #body_content_inner {
147
+ color: <?php echo esc_attr( $text_lighter_20 ); ?>;
148
+ font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
149
+ font-size: 14px;
150
+ line-height: 150%;
151
+ text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
152
+ }
153
+
154
+ .td {
155
+ color: <?php echo esc_attr( $text_lighter_20 ); ?>;
156
+ border: 1px solid <?php echo esc_attr( $body_darker_10 ); ?>;
157
+ }
158
+ .address {
159
+ padding:12px 12px;
160
+ color: <?php echo esc_attr( $text_lighter_20 ); ?>;
161
+ border: 1px solid <?php echo esc_attr( $body_darker_10 ); ?>;
162
+ }
163
+ #body_content .address p {
164
+ margin: 0;
165
+ }
166
+ #addresses tr td:nth-child(2) {
167
+ padding-left:10px;
168
+ }
169
+
170
+ .text {
171
+ color: <?php echo esc_attr( $text ); ?>;
172
+ font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
173
+ }
174
+
175
+ .link {
176
+ color: <?php echo esc_attr( $base ); ?>;
177
+ }
178
+ #header_wrapper {
179
+ padding: 36px 48px;
180
+ display: block;
181
+ }
182
+
183
+ h1 {
184
+ color: <?php echo esc_attr( $base ); ?>;
185
+ font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
186
+ font-size: 30px;
187
+ font-weight: 300;
188
+ line-height: 150%;
189
+ margin: 0;
190
+ text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
191
+ text-shadow: 0 1px 0 <?php echo esc_attr( $base_lighter_20 ); ?>;
192
+ }
193
+
194
+ h2 {
195
+ color: <?php echo esc_attr( $base ); ?>;
196
+ display: block;
197
+ font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
198
+ font-size: 18px;
199
+ font-weight: bold;
200
+ line-height: 130%;
201
+ margin: 0 0 18px;
202
+ text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
203
+ }
204
+
205
+ h3 {
206
+ color: <?php echo esc_attr( $base ); ?>;
207
+ display: block;
208
+ font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
209
+ font-size: 16px;
210
+ font-weight: bold;
211
+ line-height: 130%;
212
+ margin: 0px 0 8px;
213
+ text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
214
+ }
215
+
216
+ a {
217
+ color: <?php echo esc_attr( $link ); ?>;
218
+ font-weight: normal;
219
+ text-decoration: underline;
220
+ }
221
+ .btn {
222
+ padding: 6px 10px;
223
+ display: inline-block;
224
+ color:white !important;
225
+ background-color: <?php echo esc_attr( $base ); ?>;
226
+ text-decoration: none;
227
+ font-weight: bold;
228
+ }
229
+ img {
230
+ border: none;
231
+ display: inline;
232
+ font-size: 14px;
233
+ font-weight: bold;
234
+ height: auto;
235
+ line-height: 100%;
236
+ outline: none;
237
+ text-decoration: none;
238
+ text-transform: capitalize;
239
+ }
240
+
241
+
242
+ .order-items-light table.td .td {
243
+ border-left: 0 !important;
244
+ border-right: 0 !important;
245
+ border-top: 0 !important;
246
+ }
247
+ .order-items-light table.td {
248
+ border-left: 0 !important;
249
+ border-right: 0 !important;
250
+ border-bottom: 0 !important;
251
+ }
252
+ .order-items-light tr th.td {
253
+ font-weight:bold;
254
+ }
255
+ .order-items-light tr .td {
256
+ text-align:center !important;
257
+ }
258
+ .order-items-light tr .td:first-child {
259
+ padding-left: 0 !important;
260
+ text-align:left !important;
261
+ }
262
+ .order-items-light tr .td:last-child {
263
+ padding-right: 0 !important;
264
+ text-align:right !important;
265
+ }
266
+
267
+ .title-style-behind #template_container h2 {
268
+ border-top:0 !important;
269
+ border-bottom:0 !important;
270
+ }
271
+ .title-style-above #template_container h2 {
272
+ border-bottom:0 !important;
273
+ }
274
+ .title-style-below #template_container h2 {
275
+ border-top:0 !important;
276
+ }
277
+ .ft-social-title {
278
+ font-size: 18px;
279
+ line-height: 24px;
280
+ padding-left: 5px;
281
+ }
282
+ <?php
templates/woo/emails/subscription-info.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Subscription information template
4
+ *
5
+ * @author Brent Shepherd / Chuck Mac
6
+ * @package WooCommerce_Subscriptions/Templates/Emails
7
+ * @version 1.5.0
8
+ */
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit; // Exit if accessed directly
11
+ }
12
+ /*
13
+ * EDIT NOTES FOR KADENCE WOOMAIL DESIGNER
14
+ * ADDED: Separator spans.
15
+ */
16
+ ?>
17
+ <?php if ( ! empty( $subscriptions ) ) : ?>
18
+ <div style="clear:both; height:1px;"></div>
19
+ <h2><?php esc_html_e( 'Subscription Information:', 'kadence-woocommerce-email-designer' ); ?></h2>
20
+ <div style="margin-bottom: 40px;">
21
+ <table class="td" cellspacing="0" cellpadding="6" style="width: 100%; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;" border="1">
22
+ <thead>
23
+ <tr>
24
+ <th class="td" scope="col" style="text-align:left;"><?php esc_html_e( 'Subscription', 'kadence-woocommerce-email-designer' ); ?></th>
25
+ <th class="td" scope="col" style="text-align:left;"><?php echo esc_html_x( 'Start Date', 'table heading', 'kadence-woocommerce-email-designer' ); ?></th>
26
+ <th class="td" scope="col" style="text-align:left;"><?php echo esc_html_x( 'End Date', 'table heading', 'kadence-woocommerce-email-designer' ); ?></th>
27
+ <th class="td" scope="col" style="text-align:left;"><?php echo esc_html_x( 'Price', 'table heading', 'kadence-woocommerce-email-designer' ); ?></th>
28
+ </tr>
29
+ </thead>
30
+ <tbody>
31
+ <?php foreach ( $subscriptions as $subscription ) : ?>
32
+ <tr>
33
+ <td class="td" scope="row" style="text-align:left;"><a href="<?php echo esc_url( ( $is_admin_email ) ? wcs_get_edit_post_link( $subscription->get_id() ) : $subscription->get_view_order_url() ); ?>"><?php echo sprintf( esc_html_x( '#%s', 'subscription number in email table. (eg: #106)', 'kadence-woocommerce-email-designer' ), esc_html( $subscription->get_order_number() ) ); ?></a></td>
34
+ <td class="td" scope="row" style="text-align:left;"><?php echo esc_html( date_i18n( wc_date_format(), $subscription->get_time( 'date_created', 'site' ) ) ); ?></td>
35
+ <td class="td" scope="row" style="text-align:left;"><?php echo esc_html( ( 0 < $subscription->get_time( 'end' ) ) ? date_i18n( wc_date_format(), $subscription->get_time( 'end', 'site' ) ) : _x( 'When Cancelled', 'Used as end date for an indefinite subscription', 'kadence-woocommerce-email-designer' ) ); ?></td>
36
+ <td class="td" scope="row" style="text-align:left;"><?php echo wp_kses_post( $subscription->get_formatted_order_total() ); ?></td>
37
+ </tr>
38
+ <?php endforeach; ?>
39
+ </tbody>
40
+ </table>
41
+ </div>
42
+ <?php endif; ?>