Customify – A Theme Customizer Booster - Version 2.5.0

Version Description

  • JavaScript cleanup and performance enhancements
  • Fixed some bugs with the Style Manager.
  • Fixed some rare bugs with the plugin config merge.
Download this release

Release Info

Developer pixelgrade
Plugin Icon Customify – A Theme Customizer Booster
Version 2.5.0
Comparing to
See all releases

Code changes from version 2.4.0 to 2.5.0

css/admin.css CHANGED
@@ -1,38 +1 @@
1
- /* This stylesheet is used to style the admin option form of the plugin. */
2
- .extendable_options {
3
- height: 0;
4
- overflow: hidden;
5
- }
6
-
7
- fieldset.group {
8
- border-left: 1px solid #333;
9
- padding-left: 20px;
10
- }
11
-
12
- .postbox h3.hndle {
13
- padding: 7px;
14
- font-size: 15px;
15
- }
16
-
17
- .postbox .row {
18
- width: 100%;
19
- display: inline-block;
20
- padding: 5px 0;
21
- }
22
-
23
- .postbox .row .field {
24
- width: 100%;
25
- display: inline-block;
26
- padding: 5px 0;
27
- }
28
-
29
- .postbox .row .group {
30
- border: 1px solid rgba(203, 203, 203, 0.2);
31
- background-color: rgba(203, 203, 203, 0.2);
32
- padding-left: 15px;
33
- margin-left: 5px;
34
- }
35
-
36
- .postbox .uninstall_area {
37
- margin-top: 15px;
38
- }
1
+ .extendable_options{height:0;overflow:hidden}fieldset.group{border-left:1px solid #333;padding-left:20px}.postbox h3.hndle{padding:7px;font-size:15px}.postbox .row{width:100%;display:inline-block;padding:5px 0}.postbox .row .field{width:100%;display:inline-block;padding:5px 0}.postbox .row .group{border:1px solid rgba(203,203,203,0.2);background-color:rgba(203,203,203,0.2);padding-left:15px;margin-left:5px}.postbox .uninstall_area{margin-top:15px}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/customizer.css CHANGED
@@ -1,3245 +1 @@
1
- .sm-radio-group {
2
- position: relative;
3
- border-radius: 999em;
4
- overflow: hidden;
5
- height: 2.428em;
6
- display: -webkit-box;
7
- display: -ms-flexbox;
8
- display: flex;
9
- -ms-flex-wrap: nowrap;
10
- flex-wrap: nowrap;
11
- -webkit-box-align: stretch;
12
- -ms-flex-align: stretch;
13
- align-items: stretch;
14
- color: rgba(65, 107, 126, 0.7);
15
- font-size: 14px;
16
- -webkit-font-smoothing: antialiased;
17
- font-weight: 600;
18
- line-height: 1.142em;
19
- }
20
-
21
- .sm-radio-group > * {
22
- -webkit-box-flex: 1;
23
- -ms-flex: 1 1 0px;
24
- flex: 1 1 0;
25
- }
26
-
27
- .sm-radio-group:after {
28
- content: "";
29
- position: absolute;
30
- top: 0;
31
- right: 0;
32
- bottom: 0;
33
- left: 0;
34
- border: 0.142em solid #57abd5;
35
- border-radius: 999em;
36
- pointer-events: none;
37
- }
38
-
39
- .sm-radio-group input[type="radio"] {
40
- display: none;
41
- }
42
-
43
- .sm-radio-group input[type="radio"]:checked + label {
44
- background-color: #57abd5;
45
- color: #ffffff;
46
- }
47
-
48
- .sm-radio-group input[type="radio"]:checked + label:before {
49
- content: "";
50
- display: inline-block;
51
- color: inherit;
52
- position: relative;
53
- top: .285em;
54
- margin-right: .45em;
55
- height: .8em;
56
- width: .55em;
57
- border-right: 2px solid;
58
- border-bottom: 2px solid;
59
- -webkit-transform: translateY(-50%) rotate(45deg);
60
- transform: translateY(-50%) rotate(45deg);
61
- }
62
-
63
- .sm-radio-group label {
64
- display: -webkit-box;
65
- display: -ms-flexbox;
66
- display: flex;
67
- -webkit-box-align: center;
68
- -ms-flex-align: center;
69
- align-items: center;
70
- -webkit-box-pack: center;
71
- -ms-flex-pack: center;
72
- justify-content: center;
73
- position: relative;
74
- cursor: pointer;
75
- -webkit-transition: all .25s ease;
76
- transition: all .25s ease;
77
- color: inherit;
78
- }
79
-
80
- .sm-radio-group label:hover {
81
- color: #416b7e;
82
- }
83
-
84
- .sm-radio-group label:nth-of-type(2) {
85
- border-left: 2px solid #57abd5;
86
- border-right: 2px solid #57abd5;
87
- }
88
-
89
- [id="customize-control-sm_coloration_level_control"] .sm-radio-group {
90
- display: -webkit-box;
91
- display: -ms-flexbox;
92
- display: flex;
93
- -webkit-box-orient: horizontal;
94
- -webkit-box-direction: reverse;
95
- -ms-flex-direction: row-reverse;
96
- flex-direction: row-reverse;
97
- -ms-flex-wrap: nowrap;
98
- flex-wrap: nowrap;
99
- -webkit-box-align: stretch;
100
- -ms-flex-align: stretch;
101
- align-items: stretch;
102
- -webkit-box-pack: start;
103
- -ms-flex-pack: start;
104
- justify-content: flex-start;
105
- }
106
-
107
- [id="customize-control-sm_coloration_level_control"] .sm-radio-group > * {
108
- -webkit-box-flex: 0;
109
- -ms-flex: 0 0 33.33%;
110
- flex: 0 0 33.33%;
111
- }
112
-
113
- [id="customize-control-sm_coloration_level_control"] .sm-radio-group input[type="radio"]:last-of-type:checked + label {
114
- background: -webkit-gradient(linear, left top, right top, from(#3DAAE0), to(#D557BE));
115
- background: linear-gradient(90deg, #3DAAE0 0%, #D557BE 100%);
116
- }
117
-
118
- [id="customize-control-sm_coloration_level_control"] .sm-radio-group input[type="radio"]:nth-of-type(1):checked ~ label:last-of-type, [id="customize-control-sm_coloration_level_control"] .sm-radio-group input[type="radio"]:nth-of-type(2):checked ~ label:last-of-type {
119
- margin-right: -33.33%;
120
- }
121
-
122
- [id="customize-control-sm_coloration_level_control"] .sm-radio-group label:nth-of-type(1) {
123
- -webkit-box-ordinal-group: 5;
124
- -ms-flex-order: 4;
125
- order: 4;
126
- }
127
-
128
- [id="customize-control-sm_coloration_level_control"] .sm-radio-group label:nth-of-type(2) {
129
- -webkit-box-ordinal-group: 4;
130
- -ms-flex-order: 3;
131
- order: 3;
132
- border-left: 2px solid #57abd5;
133
- border-right: 2px solid #57abd5;
134
- }
135
-
136
- [id="customize-control-sm_coloration_level_control"] .sm-radio-group label:nth-of-type(3) {
137
- -webkit-box-ordinal-group: 3;
138
- -ms-flex-order: 2;
139
- order: 2;
140
- }
141
-
142
- [id="customize-control-sm_coloration_level_control"] .sm-radio-group label:nth-of-type(4) {
143
- -webkit-box-ordinal-group: 2;
144
- -ms-flex-order: 1;
145
- order: 1;
146
- border-left: 2px solid #57abd5;
147
- }
148
-
149
- [id="sub-accordion-section-sm_color_palettes_section"].sm-view-customize li.customize-control-sm_switch {
150
- display: -webkit-box !important;
151
- display: -ms-flexbox !important;
152
- display: flex !important;
153
- -webkit-box-align: center;
154
- -ms-flex-align: center;
155
- align-items: center;
156
- -webkit-box-pack: justify;
157
- -ms-flex-pack: justify;
158
- justify-content: space-between;
159
- padding-top: 42px;
160
- padding-bottom: 42px;
161
- }
162
-
163
- [id="sub-accordion-section-sm_color_palettes_section"].sm-view-customize li.customize-control-sm_switch .customize-control-title, [id="sub-accordion-section-sm_color_palettes_section"].sm-view-customize li.customize-control-sm_switch .separator.label {
164
- display: inline-block;
165
- }
166
-
167
- .sm-switch {
168
- display: -webkit-box;
169
- display: -ms-flexbox;
170
- display: flex;
171
- -ms-flex-wrap: nowrap;
172
- flex-wrap: nowrap;
173
- -webkit-box-align: stretch;
174
- -ms-flex-align: stretch;
175
- align-items: stretch;
176
- -webkit-box-pack: start;
177
- -ms-flex-pack: start;
178
- justify-content: flex-start;
179
- overflow: hidden;
180
- position: relative;
181
- height: 2.428em;
182
- max-width: 5.5em;
183
- border-radius: 999em;
184
- color: #ffffff;
185
- font-size: 14px;
186
- -webkit-font-smoothing: antialiased;
187
- font-weight: 600;
188
- line-height: 1.142em;
189
- z-index: 10;
190
- }
191
-
192
- .sm-switch input[type="radio"] {
193
- display: none;
194
- }
195
-
196
- .sm-switch input[type="radio"] + label {
197
- display: -webkit-box;
198
- display: -ms-flexbox;
199
- display: flex;
200
- -webkit-box-align: center;
201
- -ms-flex-align: center;
202
- align-items: center;
203
- -webkit-box-flex: 0;
204
- -ms-flex: 0 0 100%;
205
- flex: 0 0 100%;
206
- }
207
-
208
- .sm-switch input[type="radio"] + label, .sm-switch input[type="radio"] + label:after {
209
- -webkit-transition: all 0.2s ease-out;
210
- transition: all 0.2s ease-out;
211
- }
212
-
213
- .sm-switch input[type="radio"]:checked + label {
214
- pointer-events: none;
215
- }
216
-
217
- .sm-switch input[type="radio"]:nth-of-type(1) + label {
218
- padding-left: 1.214em;
219
- }
220
-
221
- .sm-switch input[type="radio"]:nth-of-type(1) + label:after {
222
- content: "";
223
- position: absolute;
224
- top: 0;
225
- right: 0;
226
- bottom: 0;
227
- left: 0;
228
- background-color: #57abd5;
229
- z-index: -1;
230
- }
231
-
232
- .sm-switch input[type="radio"]:nth-of-type(1):not(:checked) + label {
233
- -webkit-transform: translateX(-100%) translateX(2.125em);
234
- transform: translateX(-100%) translateX(2.125em);
235
- }
236
-
237
- .sm-switch input[type="radio"]:nth-of-type(1):not(:checked) + label:after {
238
- background: #cccccc;
239
- -webkit-transform: translateX(100%) translateX(-2.125em);
240
- transform: translateX(100%) translateX(-2.125em);
241
- }
242
-
243
- .sm-switch input[type="radio"]:nth-of-type(1):not(:checked) + label ~ label {
244
- -webkit-transform: translateX(-100%);
245
- transform: translateX(-100%);
246
- }
247
-
248
- .sm-switch input[type="radio"]:nth-of-type(1):checked + label ~ label {
249
- -webkit-transform: translateX(-2.4em);
250
- transform: translateX(-2.4em);
251
- }
252
-
253
- .sm-switch input[type="radio"]:nth-of-type(1):checked + label ~ label:before {
254
- -webkit-transform: translateX(-100%) translateX(2.125em);
255
- transform: translateX(-100%) translateX(2.125em);
256
- }
257
-
258
- .sm-switch input[type="radio"]:nth-of-type(2) + label {
259
- -webkit-box-orient: horizontal;
260
- -webkit-box-direction: reverse;
261
- -ms-flex-direction: row-reverse;
262
- flex-direction: row-reverse;
263
- padding-right: 1em;
264
- }
265
-
266
- .sm-switch input[type="radio"]:nth-of-type(2) + label:before {
267
- content: "";
268
- position: absolute;
269
- top: 0;
270
- right: 0;
271
- bottom: 0;
272
- left: 0;
273
- }
274
-
275
- .sm-switch input[type="radio"]:nth-of-type(2) + label:after {
276
- content: "";
277
- display: block;
278
- height: 2.142em;
279
- width: 2.142em;
280
- margin-right: auto;
281
- margin-left: 0.125em;
282
- border-radius: 50%;
283
- background-color: #ffffff;
284
- -webkit-box-shadow: 1px 2px 2px 0 rgba(23, 21, 21, 0.15);
285
- box-shadow: 1px 2px 2px 0 rgba(23, 21, 21, 0.15);
286
- pointer-events: none;
287
- }
288
-
289
- .wp-full-overlay-sidebar *, .wp-full-overlay-sidebar *:before, .wp-full-overlay-sidebar *:after {
290
- -webkit-box-sizing: border-box;
291
- box-sizing: border-box;
292
- }
293
-
294
- .iris-picker,
295
- .iris-picker * {
296
- -webkit-box-sizing: content-box;
297
- box-sizing: content-box;
298
- }
299
-
300
- .wp-full-overlay-sidebar-content .accordion-section-content {
301
- overflow: visible;
302
- }
303
-
304
- .control-section:not(.control-section-themes) .customize-control {
305
- padding: 0;
306
- width: 100%;
307
- min-height: initial;
308
- }
309
-
310
- #customize-header-actions #customize-save-button-wrapper {
311
- margin-top: 7px;
312
- }
313
-
314
- .wp-full-overlay-footer .devices button {
315
- float: left;
316
- border-radius: 0;
317
- }
318
-
319
- .customize-controls-close {
320
- width: 48px;
321
- height: 44px;
322
- color: #7da9c3;
323
- background: #ffffff;
324
- border-top: none;
325
- border-right-color: #e0e8ef;
326
- }
327
-
328
- .customize-controls-close:focus, .customize-controls-close:hover {
329
- background: #f5fcff;
330
- }
331
-
332
- .customize-controls-close:before {
333
- top: 0px;
334
- }
335
-
336
- #customize-controls .customize-info {
337
- border-bottom-color: #e0e8ef;
338
- }
339
-
340
- .customize-panel-back, .customize-section-back {
341
- height: 74px;
342
- color: #7da9c3;
343
- border-right-color: #e0e8ef;
344
- }
345
-
346
- .customize-panel-back:hover, .customize-panel-back:focus, .customize-section-back:hover, .customize-section-back:focus {
347
- border-left-color: #f5fcff;
348
- background: #f5fcff;
349
- }
350
-
351
- #customize-theme-controls .theme * {
352
- -webkit-box-sizing: content-box;
353
- box-sizing: content-box;
354
- }
355
-
356
- #customize-theme-controls .accordion-section-content {
357
- padding: 17px;
358
- }
359
-
360
- #customize-theme-controls .customize-section-title {
361
- margin-top: -17px;
362
- margin-right: -17px;
363
- }
364
-
365
- #customize-theme-controls #accordion-section-add_menu {
366
- border-bottom: none;
367
- }
368
-
369
- #customize-theme-controls #accordion-section-add_menu .add-menu-toggle {
370
- float: none;
371
- }
372
-
373
- #customize-theme-controls .customize-pane-child.open {
374
- height: 100%;
375
- }
376
-
377
- #customize-controls .description {
378
- font-size: 12px;
379
- font-weight: 300;
380
- font-style: normal;
381
- line-height: 1.6;
382
- color: #4d7b90;
383
- text-indent: 0;
384
- }
385
-
386
- .customize-control-description {
387
- margin-top: 6px;
388
- }
389
-
390
- .customize-control {
391
- margin-bottom: 24px;
392
- }
393
-
394
- #accordion-section-themes + .control-section {
395
- border-top: none;
396
- }
397
-
398
- #customize-controls .panel-meta.customize-info .accordion-section-title {
399
- border-top: none;
400
- height: 74px;
401
- }
402
-
403
- .button-controls:after {
404
- content: " ";
405
- display: table;
406
- clear: both;
407
- }
408
-
409
- .wp-core-ui .button:not(.theme-details):not(.collapse-sidebar):not(.wp-color-result),
410
- .wp-core-ui .button-primary,
411
- .wp-core-ui .button-secondary {
412
- width: auto;
413
- padding-left: 15px;
414
- padding-right: 15px;
415
- font-weight: 400;
416
- color: #F5FCFF;
417
- text-shadow: none;
418
- border: none;
419
- background: #AED2E5;
420
- -webkit-box-shadow: 0px 2px 0px 0px #8DBED7;
421
- box-shadow: 0px 2px 0px 0px #8DBED7;
422
- border-radius: 4px;
423
- }
424
-
425
- .wp-core-ui .button:not(.theme-details):not(.collapse-sidebar):not(.wp-color-result):hover,
426
- .wp-core-ui .button-primary:hover,
427
- .wp-core-ui .button-secondary:hover {
428
- color: white;
429
- text-shadow: none;
430
- background: #98C6DD;
431
- -webkit-box-shadow: 0px 2px 0px 0px #74A7C2;
432
- box-shadow: 0px 2px 0px 0px #74A7C2;
433
- }
434
-
435
- .wp-core-ui #customize-header-actions .button-primary {
436
- background: #73C5EE;
437
- -webkit-box-shadow: 0px 2px 0px 0px #57ABD5;
438
- box-shadow: 0px 2px 0px 0px #57ABD5;
439
- }
440
-
441
- .wp-core-ui #customize-header-actions .button-primary:hover {
442
- background: #58B0DD;
443
- -webkit-box-shadow: 0px 2px 0px 0px #3F8AAF;
444
- box-shadow: 0px 2px 0px 0px #3F8AAF;
445
- }
446
-
447
- .wp-core-ui #customize-header-actions .button-primary.has-next-sibling {
448
- border-right: 1px solid #57ABD5;
449
- }
450
-
451
- .wp-core-ui #customize-header-actions .button-primary:disabled {
452
- color: white !important;
453
- background: #AED2E5 !important;
454
- opacity: 0.7;
455
- -webkit-box-shadow: 0px 2px 0px 0px #8db5ca !important;
456
- box-shadow: 0px 2px 0px 0px #8db5ca !important;
457
- }
458
-
459
- .wp-core-ui #customize-header-actions .button-primary:disabled.has-next-sibling {
460
- border-right: none;
461
- }
462
-
463
- .wp-core-ui .reset_section,
464
- .wp-core-ui .reset_panel {
465
- width: 100%;
466
- height: 4em;
467
- display: block;
468
- margin: 0px 0 25px;
469
- }
470
-
471
- .wp-core-ui .reset_panel {
472
- margin-top: 10px;
473
- }
474
-
475
- .separator.label {
476
- display: block;
477
- font-size: 14px;
478
- line-height: 24px;
479
- font-weight: 500;
480
- }
481
-
482
- .customize-control-title, .separator.label {
483
- color: #2A3B44;
484
- }
485
-
486
- .separator.section:before, .separator.sub-section:before {
487
- content: "";
488
- position: absolute;
489
- top: 0;
490
- bottom: 0;
491
- left: -18px;
492
- right: -18px;
493
- z-index: -1;
494
- }
495
-
496
- .separator.label {
497
- font-weight: 500;
498
- }
499
-
500
- .separator.large {
501
- margin-top: 12px;
502
- font-size: 16px;
503
- color: #39474D;
504
- }
505
-
506
- .separator.section {
507
- position: relative;
508
- padding: 14px 0;
509
- margin-bottom: 0;
510
- background: none;
511
- border: none;
512
- }
513
-
514
- .separator.section[id*="layout"] {
515
- margin-top: 0;
516
- }
517
-
518
- .separator.section[id*="layout"]:before {
519
- border: none;
520
- }
521
-
522
- .separator.section:before {
523
- border: 1px solid #e0e8ef;
524
- background-color: #ffffff;
525
- -webkit-box-shadow: 0px 1px 0px 0px #DFE8EF;
526
- box-shadow: 0px 1px 0px 0px #DFE8EF;
527
- }
528
-
529
- .separator.sub-section {
530
- position: relative;
531
- padding: 12px 0;
532
- }
533
-
534
- .separator.sub-section:before {
535
- border-top: 1px solid #e0e8ef;
536
- border-bottom: 1px solid #e0e8ef;
537
- background-color: #f6fbff;
538
- }
539
-
540
- .separator.sub-section + span {
541
- margin-top: 20px;
542
- font-style: normal;
543
- }
544
-
545
- .section-navigation-wrapper {
546
- position: relative;
547
- height: 43px;
548
- margin: -15px -12px 0 -12px;
549
- margin-right: -17px;
550
- margin-left: -17px;
551
- }
552
-
553
- .section-navigation {
554
- display: -webkit-box;
555
- display: -ms-flexbox;
556
- display: flex;
557
- margin-top: -1px;
558
- clear: both;
559
- border-top: 1px solid #e0e8ef;
560
- }
561
-
562
- .section-navigation a {
563
- -webkit-box-flex: 1;
564
- -ms-flex: 1 1 auto;
565
- flex: 1 1 auto;
566
- display: block;
567
- padding: 12px 0;
568
- color: #3b484e;
569
- background-color: #ffffff;
570
- border-bottom: 1px solid #e0e8ef;
571
- border-right: 1px solid #e0e8ef;
572
- text-align: center;
573
- text-decoration: none;
574
- -webkit-transition: background-color .15s ease-in-out;
575
- transition: background-color .15s ease-in-out;
576
- }
577
-
578
- .section-navigation a:last-child {
579
- border-right: 0;
580
- }
581
-
582
- #customize-controls .customize-info.is-sticky.is-sticky,
583
- #customize-controls .customize-section-title.is-sticky.is-sticky {
584
- top: 40px;
585
- }
586
-
587
- #customize-controls .customize-info.is-in-view.is-in-view,
588
- #customize-controls .customize-section-title.is-in-view.is-in-view {
589
- -webkit-box-shadow: none;
590
- box-shadow: none;
591
- }
592
-
593
- #customize-controls .has-nav .customize-info,
594
- #customize-controls .has-nav .customize-section-title {
595
- margin-right: -12px;
596
- }
597
-
598
- #customize-controls .customize-section-title.customize-section-title {
599
- border-bottom: 0;
600
- }
601
-
602
- .customize-section-description-container.section-meta.has-nav {
603
- margin-bottom: 0;
604
- }
605
-
606
- .font-options__wrapper {
607
- position: relative;
608
- }
609
-
610
- .font-options__wrapper:after {
611
- content: "";
612
- position: absolute;
613
- top: 90%;
614
- left: 0;
615
- right: 0;
616
- z-index: 0;
617
- display: block;
618
- height: 30px;
619
- }
620
-
621
- .font-options__head {
622
- display: -webkit-box;
623
- display: -ms-flexbox;
624
- display: flex;
625
- -webkit-box-pack: justify;
626
- -ms-flex-pack: justify;
627
- justify-content: space-between;
628
- }
629
-
630
- .font-options__head.font-options__head {
631
- -webkit-appearance: none;
632
- text-overflow: ellipsis;
633
- white-space: nowrap;
634
- }
635
-
636
- .font-options__font-title {
637
- margin-right: 26px;
638
- margin-left: 10px;
639
- font-size: 12px;
640
- line-height: 20px;
641
- font-weight: 300;
642
- color: #98c6dd;
643
- text-overflow: ellipsis;
644
- overflow: hidden;
645
- white-space: nowrap;
646
- }
647
-
648
- .font-options__options-list {
649
- position: absolute;
650
- top: calc(100% + 6px);
651
- left: -6px;
652
- right: -6px;
653
- z-index: 2;
654
- display: block;
655
- padding: 10px;
656
- border: 1px solid #dfe8ef;
657
- border-radius: 5px;
658
- background-color: #ffffff;
659
- opacity: 0;
660
- display: none;
661
- -webkit-transition: opacity .15s linear;
662
- transition: opacity .15s linear;
663
- }
664
-
665
- .font-options__options-list:last-child {
666
- margin-bottom: 0;
667
- }
668
-
669
- .font-options__options-list:before, .font-options__options-list:after {
670
- content: "";
671
- position: absolute;
672
- top: -20px;
673
- right: 25px;
674
- height: 0;
675
- width: 0;
676
- border: solid transparent;
677
- z-index: 10;
678
- }
679
-
680
- .font-options__options-list:before {
681
- border-bottom-color: white;
682
- border-width: 10px;
683
- z-index: 11;
684
- }
685
-
686
- .font-options__options-list:after {
687
- border-bottom-color: rgba(0, 0, 0, 0.075);
688
- border-width: 12px;
689
- top: -24px;
690
- right: 23px;
691
- }
692
-
693
- .customize-control-color .wp-picker-container .wp-picker-open + .wp-picker-input-wrap:after {
694
- content: "";
695
- position: absolute;
696
- bottom: 100%;
697
- right: 12px;
698
- border-collapse: separate;
699
- width: 0;
700
- height: 0;
701
- border-width: 0 9px 9px 9px;
702
- border-style: solid;
703
- border-color: transparent transparent #fff transparent;
704
- }
705
-
706
- .font-options__head, .wp-full-overlay-sidebar-content .customize-control input[type=text]:not(#_customize-input-wpcom_custom_css_content_width_control):not(.wp-color-picker),
707
- .wp-full-overlay-sidebar-content .customize-control input[type=checkbox],
708
- .wp-full-overlay-sidebar-content .customize-control input[type=password],
709
- .wp-full-overlay-sidebar-content .customize-control input[type=color],
710
- .wp-full-overlay-sidebar-content .customize-control input[type=date],
711
- .wp-full-overlay-sidebar-content .customize-control input[type=datetime],
712
- .wp-full-overlay-sidebar-content .customize-control input[type=datetime-local],
713
- .wp-full-overlay-sidebar-content .customize-control input[type=email],
714
- .wp-full-overlay-sidebar-content .customize-control input[type=month],
715
- .wp-full-overlay-sidebar-content .customize-control input[type=number],
716
- .wp-full-overlay-sidebar-content .customize-control input[type=radio],
717
- .wp-full-overlay-sidebar-content .customize-control input[type=tel],
718
- .wp-full-overlay-sidebar-content .customize-control input[type=time],
719
- .wp-full-overlay-sidebar-content .customize-control input[type=url],
720
- .wp-full-overlay-sidebar-content .customize-control input[type=week],
721
- .wp-full-overlay-sidebar-content .customize-control input[type=search],
722
- .wp-full-overlay-sidebar-content .customize-control select,
723
- .wp-full-overlay-sidebar-content .customize-control textarea,
724
- .wp-full-overlay-sidebar-content .customize-control input.range-value[type="number"], ul.font-options__options-list .select2-container .select2-selection--single, #customize-theme-controls .select2-container .select2-selection--multiple {
725
- width: 100%;
726
- height: 44px;
727
- padding: 10px 14px;
728
- background: #FFFFFF;
729
- border: 2px solid #B8DAEB;
730
- border-radius: 4px;
731
- font-size: 14px;
732
- line-height: 1.5;
733
- color: #416B7E;
734
- outline: 0;
735
- }
736
-
737
- .font-options__head:focus, .wp-full-overlay-sidebar-content .customize-control input:focus[type=text]:not(#_customize-input-wpcom_custom_css_content_width_control):not(.wp-color-picker),
738
- .wp-full-overlay-sidebar-content .customize-control input:focus[type=checkbox],
739
- .wp-full-overlay-sidebar-content .customize-control input:focus[type=password],
740
- .wp-full-overlay-sidebar-content .customize-control input:focus[type=color],
741
- .wp-full-overlay-sidebar-content .customize-control input:focus[type=date],
742
- .wp-full-overlay-sidebar-content .customize-control input:focus[type=datetime],
743
- .wp-full-overlay-sidebar-content .customize-control input:focus[type=datetime-local],
744
- .wp-full-overlay-sidebar-content .customize-control input:focus[type=email],
745
- .wp-full-overlay-sidebar-content .customize-control input:focus[type=month],
746
- .wp-full-overlay-sidebar-content .customize-control input:focus[type=number],
747
- .wp-full-overlay-sidebar-content .customize-control input:focus[type=radio],
748
- .wp-full-overlay-sidebar-content .customize-control input:focus[type=tel],
749
- .wp-full-overlay-sidebar-content .customize-control input:focus[type=time],
750
- .wp-full-overlay-sidebar-content .customize-control input:focus[type=url],
751
- .wp-full-overlay-sidebar-content .customize-control input:focus[type=week],
752
- .wp-full-overlay-sidebar-content .customize-control input:focus[type=search],
753
- .wp-full-overlay-sidebar-content .customize-control select:focus,
754
- .wp-full-overlay-sidebar-content .customize-control textarea:focus,
755
- .wp-full-overlay-sidebar-content .customize-control input.range-value:focus[type="number"], ul.font-options__options-list .select2-container .select2-selection--single:focus, #customize-theme-controls .select2-container .select2-selection--multiple:focus {
756
- border-color: #73C5EE;
757
- -webkit-box-shadow: none;
758
- box-shadow: none;
759
- }
760
-
761
- .font-options__head,
762
- .wp-full-overlay-sidebar-content .customize-control select, ul.font-options__options-list .select2-container .select2-selection--single, #customize-theme-controls .select2-container .select2-selection--multiple {
763
- width: 100%;
764
- -webkit-appearance: button;
765
- -moz-appearance: none;
766
- font-weight: 600;
767
- background: white url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjE1cHgiIGhlaWdodD0iOXB4IiB2aWV3Qm94PSIwIDAgMTUgOSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJDdXN0b21pZnktQ29weS0yIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMjU2LjAwMDAwMCwgLTM4Ni4wMDAwMDApIiBmaWxsPSIjOThDNkRFIj4KICAgICAgICAgICAgPGcgaWQ9IkhlYWRlciIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIxLjAwMDAwMCwgNDcuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0iQ29udGVudCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAuMDAwMDAwLCA3NS4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iVGl0bGUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI2LjAwMDAwMCwgMjE5LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iRmllbGQtLS1TZWxlY3QtQ29weSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iU2VsZWN0IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwMDAwMCwgMjcuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTI1NC40ODEyLDE4IEwyNTYsMTkuNTE0IEwyNDguNSwyNyBMMjQxLDE5LjUxNCBMMjQyLjUxODgsMTggTDI0OC41LDIzLjk2NzIgTDI1NC40ODEyLDE4IFoiIGlkPSJQYWdlLTEiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+) no-repeat;
768
- background-position: right 16px top 16px;
769
- }
770
-
771
- .font-options__head[multiple], .wp-full-overlay-sidebar-content .customize-control select[multiple], ul.font-options__options-list .select2-container .select2-selection--single[multiple], #customize-theme-controls .select2-container .select2-selection--multiple[multiple] {
772
- background: white;
773
- }
774
-
775
- .wp-full-overlay-sidebar-content .customize-control input[type=text],
776
- .wp-full-overlay-sidebar-content .customize-control textarea {
777
- font-size: 13px;
778
- }
779
-
780
- .wp-full-overlay-sidebar-content .customize-control textarea {
781
- height: auto;
782
- }
783
-
784
- .wp-full-overlay-sidebar-content .customize-control input[type=checkbox],
785
- .wp-full-overlay-sidebar-content .customize-control input[type=radio] {
786
- width: 22px;
787
- height: 22px;
788
- }
789
-
790
- .wp-full-overlay-sidebar-content .customize-control input[type=checkbox]:checked,
791
- .wp-full-overlay-sidebar-content .customize-control input[type=radio]:checked {
792
- background: #73C5EE;
793
- border-color: #5AB9E8;
794
- }
795
-
796
- .wp-full-overlay-sidebar-content .customize-control input[type=checkbox]:checked:before,
797
- .wp-full-overlay-sidebar-content .customize-control input[type=radio]:checked:before {
798
- color: white;
799
- margin: -1px 0 0 -2px;
800
- }
801
-
802
- .wp-full-overlay-sidebar-content .customize-control .awesome_preset input[type=radio]:checked {
803
- background: transparent;
804
- }
805
-
806
- .wp-full-overlay-sidebar-content .customize-control.customize-control-checkbox:not(#customize-control-jetpack_css_mode_control) label:not(:only-of-type),
807
- .wp-full-overlay-sidebar-content .customize-control.customize-control-checkbox:not(#customize-control-jetpack_css_mode_control) > .customize-inside-control-row:not(:only-of-type), .wp-full-overlay-sidebar-content .customize-control.customize-control-radio label:not(:only-of-type),
808
- .wp-full-overlay-sidebar-content .customize-control.customize-control-radio > .customize-inside-control-row:not(:only-of-type) {
809
- margin-left: 30px;
810
- padding-top: 0;
811
- padding-bottom: 0;
812
- display: inline-block;
813
- width: calc(49% - 30px);
814
- text-indent: -6px;
815
- }
816
-
817
- .wp-full-overlay-sidebar-content .customize-control.customize-control-checkbox:not(#customize-control-jetpack_css_mode_control) label, .wp-full-overlay-sidebar-content .customize-control.customize-control-radio label {
818
- color: #416B7E;
819
- }
820
-
821
- [id*="divider"] + .wp-full-overlay-sidebar-content .customize-control.customize-control-checkbox:not(#customize-control-jetpack_css_mode_control), [id*="divider"] + .wp-full-overlay-sidebar-content .customize-control.customize-control-radio {
822
- margin-top: 0;
823
- }
824
-
825
- .wp-full-overlay-sidebar-content .customize-control input[type=radio] {
826
- border-radius: 50%;
827
- }
828
-
829
- .wp-full-overlay-sidebar-content .customize-control input[type=radio]:checked:before {
830
- content: none;
831
- }
832
-
833
- .customize-control-html + .wp-full-overlay-sidebar-content .customize-control.customize-control-checkbox {
834
- margin-top: -24px;
835
- }
836
-
837
- .wp-full-overlay-sidebar-content .customize-control.customize-control-radio label,
838
- .wp-full-overlay-sidebar-content .customize-control.customize-control-radio .customize-inside-control-row {
839
- margin-top: 12px;
840
- }
841
-
842
- .wp-full-overlay-sidebar-content .customize-control.customize-control-radio#customize-control-changeset_status .customize-inside-control-row {
843
- margin-top: 0;
844
- text-indent: 0;
845
- }
846
-
847
- .wp-full-overlay-sidebar-content .customize-control input[type="range"] {
848
- width: 65%;
849
- }
850
-
851
- .wp-full-overlay-sidebar-content .customize-control input[type="range"] {
852
- position: relative;
853
- -webkit-appearance: none;
854
- width: calc(100% - 55px);
855
- height: 22px;
856
- overflow: hidden;
857
- outline: none;
858
- background: none;
859
- }
860
-
861
- .wp-full-overlay-sidebar-content .customize-control input[type="range"]:before {
862
- content: " ";
863
- position: absolute;
864
- top: 8px;
865
- left: 0;
866
- height: 6px;
867
- width: 100%;
868
- background: #DFE8EF;
869
- -webkit-box-shadow: inset 0px 1px 3px 0px rgba(0, 0, 0, 0.3);
870
- box-shadow: inset 0px 1px 3px 0px rgba(0, 0, 0, 0.3);
871
- border-radius: 10px;
872
- }
873
-
874
- .wp-full-overlay-sidebar-content .customize-control input[type="range"]::-webkit-slider-thumb {
875
- -webkit-appearance: none;
876
- width: 22px;
877
- height: 22px;
878
- background: #27ae60;
879
- position: relative;
880
- z-index: 3;
881
- background: #FFFFFF;
882
- border: 2px solid #B8DAEB;
883
- border-radius: 4px;
884
- }
885
-
886
- .wp-full-overlay-sidebar-content .customize-control input[type="range"]::-webkit-slider-thumb:before {
887
- content: "..";
888
- position: absolute;
889
- left: 5px;
890
- top: -5px;
891
- color: #B8DAEB;
892
- font-size: 1em;
893
- letter-spacing: 1px;
894
- }
895
-
896
- .wp-full-overlay-sidebar-content .customize-control input[type="range"]::-webkit-slider-thumb:after {
897
- content: " ";
898
- width: calc(100% - 55px);
899
- height: 6px;
900
- position: absolute;
901
- z-index: 1;
902
- right: 20px;
903
- top: 6px;
904
- background: #73C5EE;
905
- }
906
-
907
- .wp-full-overlay-sidebar-content .customize-control input[type="number"].range-value {
908
- min-width: 40px;
909
- max-width: 80px;
910
- width: auto;
911
- height: 30px;
912
- top: -5px;
913
- float: right;
914
- padding: 4px 0px 5px 0px;
915
- margin-left: 10px;
916
- font-size: 13px;
917
- line-height: 1;
918
- text-align: center;
919
- }
920
-
921
- .wp-full-overlay-sidebar-content .customize-control input[type=number]::-webkit-inner-spin-button,
922
- .wp-full-overlay-sidebar-content .customize-control input[type=number]::-webkit-outer-spin-button {
923
- -webkit-appearance: none;
924
- margin: 0;
925
- }
926
-
927
- .customize-control-color {
928
- display: block;
929
- }
930
-
931
- .customize-control-color .customize-control-title, .customize-control-color .separator.label {
932
- float: left;
933
- }
934
-
935
- .customize-control-color .wp-picker-container {
936
- position: relative;
937
- float: right;
938
- top: -3px;
939
- }
940
-
941
- .customize-control-color .wp-picker-container .wp-picker-holder {
942
- position: relative;
943
- }
944
-
945
- .customize-control-color .wp-picker-container .wp-color-result,
946
- .customize-control-color .wp-picker-container .wp-color-result.button {
947
- top: 0;
948
- height: 30px;
949
- width: 40px;
950
- margin: 0;
951
- padding: 0;
952
- border-radius: 4px;
953
- background: #2ECC71;
954
- border: 2px solid #B8DAEB;
955
- -webkit-box-shadow: none;
956
- box-shadow: none;
957
- }
958
-
959
- .customize-control-color .wp-picker-container .wp-color-result:after,
960
- .customize-control-color .wp-picker-container .wp-color-result .wp-color-result-text,
961
- .customize-control-color .wp-picker-container .wp-color-result.button:after,
962
- .customize-control-color .wp-picker-container .wp-color-result.button .wp-color-result-text {
963
- display: none;
964
- }
965
-
966
- .customize-control-color .wp-picker-container .iris-picker {
967
- position: absolute;
968
- top: 40px;
969
- right: 0;
970
- z-index: 1000;
971
- width: 275px !important;
972
- border-top: none;
973
- border-color: #DFDFDE;
974
- border-radius: 0 0 3px 3px;
975
- border: none;
976
- background: white;
977
- }
978
-
979
- .customize-control-color .wp-picker-container .iris-picker, .customize-control-color .wp-picker-container .iris-picker * {
980
- -webkit-box-sizing: content-box;
981
- box-sizing: content-box;
982
- }
983
-
984
- .customize-control-color .wp-picker-container .iris-picker .iris-square {
985
- width: 215px !important;
986
- height: 173px !important;
987
- margin-right: 0;
988
- }
989
-
990
- .customize-control-color .wp-picker-container .iris-picker .iris-strip {
991
- float: right;
992
- -webkit-box-shadow: rgba(0, 0, 0, 0.4) 0 1px 1px inset;
993
- box-shadow: rgba(0, 0, 0, 0.4) 0 1px 1px inset;
994
- }
995
-
996
- .customize-control-color .wp-picker-container .iris-picker .iris-strip .ui-slider-handle {
997
- border-color: #aaa !important;
998
- opacity: 1;
999
- -webkit-box-shadow: none;
1000
- box-shadow: none;
1001
- }
1002
-
1003
- .customize-control-color .wp-picker-container .iris-picker .iris-palette {
1004
- width: 24px !important;
1005
- height: 24px !important;
1006
- border-radius: 50px;
1007
- -webkit-box-shadow: rgba(0, 0, 0, 0.4) 0 1px 1px inset;
1008
- box-shadow: rgba(0, 0, 0, 0.4) 0 1px 1px inset;
1009
- }
1010
-
1011
- .customize-control-color .wp-picker-container .wp-picker-open + .wp-picker-input-wrap {
1012
- position: absolute;
1013
- z-index: 1000;
1014
- top: 35px;
1015
- right: 0;
1016
- width: 275px;
1017
- padding: 9px 12px;
1018
- background: white;
1019
- border: none;
1020
- border-radius: 3px 3px 0 0;
1021
- }
1022
-
1023
- .customize-control-color .wp-picker-container .wp-picker-open + .wp-picker-input-wrap input.wp-color-picker {
1024
- float: left;
1025
- width: 100px;
1026
- font-size: 13px;
1027
- text-align: left;
1028
- margin: 0;
1029
- padding: 6px 12px;
1030
- height: auto;
1031
- }
1032
-
1033
- .customize-control-color .wp-picker-container .wp-picker-open + .wp-picker-input-wrap input.button {
1034
- float: right;
1035
- padding: 4px 12px;
1036
- height: 30px;
1037
- }
1038
-
1039
- .customize-control-font:last-child {
1040
- margin-bottom: 150px;
1041
- }
1042
-
1043
- #accordion-section-live_css_edit_section .customize-section-title {
1044
- margin-top: -13px;
1045
- border-bottom: 1px solid #ddd;
1046
- }
1047
-
1048
- #accordion-section-live_css_edit_section #css_editor {
1049
- top: 70px;
1050
- border-top: 10px solid white;
1051
- overflow: visible;
1052
- }
1053
-
1054
- #accordion-section-live_css_edit_section #css_editor:before {
1055
- content: "";
1056
- width: 48px;
1057
- height: 10px;
1058
- display: block;
1059
- background: #e8e8e8;
1060
- top: -10px;
1061
- position: absolute;
1062
- z-index: 10000000;
1063
- left: 0;
1064
- }
1065
-
1066
- #accordion-section-live_css_edit_section .ace_scroller {
1067
- padding-left: 10px;
1068
- }
1069
-
1070
- .wp-full-overlay.editor_opened {
1071
- margin-left: 500px;
1072
- }
1073
-
1074
- .wp-full-overlay.editor_opened #customize-controls {
1075
- width: 500px;
1076
- }
1077
-
1078
- .wp-full-overlay.editor_opened.collapsed #customize-controls {
1079
- width: 300px;
1080
- }
1081
-
1082
- .customize-control-media .current,
1083
- .customize-control-site_icon .current,
1084
- li#customize-control-site_logo .current {
1085
- margin-bottom: 10px;
1086
- min-height: 44px;
1087
- background: #F5FCFF;
1088
- border: 2px solid #B8DAEB;
1089
- border-radius: 4px;
1090
- }
1091
-
1092
- .customize-control-media .current .container, .customize-control-media .current span,
1093
- .customize-control-site_icon .current .container,
1094
- .customize-control-site_icon .current span,
1095
- li#customize-control-site_logo .current .container,
1096
- li#customize-control-site_logo .current span {
1097
- border: none;
1098
- }
1099
-
1100
- .customize-control-media .inner, .customize-control-media .current span,
1101
- .customize-control-site_icon .inner,
1102
- .customize-control-site_icon .current span,
1103
- li#customize-control-site_logo .inner,
1104
- li#customize-control-site_logo .current span {
1105
- font-size: 13px;
1106
- color: #98C6DD;
1107
- }
1108
-
1109
- .customize-control-media .inner,
1110
- .customize-control-site_icon .inner,
1111
- li#customize-control-site_logo .inner {
1112
- line-height: 1.4;
1113
- }
1114
-
1115
- .customize-control-media .thumbnail-image,
1116
- .customize-control-site_icon .thumbnail-image,
1117
- li#customize-control-site_logo .thumbnail-image {
1118
- padding: 14px;
1119
- text-align: center;
1120
- }
1121
-
1122
- .customize-control-media .thumbnail-image img,
1123
- .customize-control-site_icon .thumbnail-image img,
1124
- li#customize-control-site_logo .thumbnail-image img {
1125
- width: auto;
1126
- }
1127
-
1128
- .customize-control-media .actions,
1129
- .customize-control-site_icon .actions,
1130
- li#customize-control-site_logo .actions {
1131
- margin-bottom: 0;
1132
- }
1133
-
1134
- .customize-control-typography select, .customize-control-typography select {
1135
- margin-bottom: 10px;
1136
- }
1137
-
1138
- .customize-control-typography .description, .customize-control-typography .description {
1139
- margin-top: -3px;
1140
- }
1141
-
1142
- .customize-control-typography ul li, .customize-control-typography ul li {
1143
- width: 100%;
1144
- margin: 0;
1145
- }
1146
-
1147
- .default-preset-button {
1148
- background-color: #F5F6F6;
1149
- float: right;
1150
- padding: 1px 8px;
1151
- border-radius: 3px;
1152
- border: 1px solid #CBCBCB;
1153
- margin-right: 4px;
1154
- font-family: "Open Sans",sans-serif;
1155
- font-size: 13px;
1156
- }
1157
-
1158
- .customize-control-preset .description {
1159
- margin-right: 5px;
1160
- font-style: normal;
1161
- }
1162
-
1163
- .customify_preset.radio_buttons .customify_radio_button {
1164
- border: none;
1165
- display: inline-block;
1166
- padding: 2px;
1167
- margin: 3px;
1168
- position: relative;
1169
- overflow: hidden;
1170
- height: auto;
1171
- }
1172
-
1173
- .customify_preset.radio_buttons .customify_radio_button input[type="radio"] {
1174
- opacity: 0;
1175
- width: 100%;
1176
- height: 100%;
1177
- position: absolute;
1178
- z-index: 9999;
1179
- }
1180
-
1181
- .customify_preset.radio_buttons .customify_radio_button input[type="radio"]:checked + label {
1182
- background-color: #ebebeb;
1183
- }
1184
-
1185
- .customify_preset.radio_buttons .customify_radio_button input[type="radio"]:checked + label:before {
1186
- content: '>';
1187
- color: inherit;
1188
- }
1189
-
1190
- .customify_preset.radio_buttons .customify_radio_button input[type="radio"]:checked + label:after {
1191
- content: '<';
1192
- color: inherit;
1193
- }
1194
-
1195
- .customify_preset.radio_buttons .customify_radio_button input[type="radio"]:checked:before {
1196
- opacity: 0;
1197
- }
1198
-
1199
- .customify_preset.radio_buttons .customify_radio_button label {
1200
- position: relative;
1201
- z-index: 999;
1202
- border-left: 4px solid;
1203
- }
1204
-
1205
- .customify_preset .awesome_preset {
1206
- width: 45%;
1207
- position: relative;
1208
- display: inline-block;
1209
- text-align: center;
1210
- color: white;
1211
- margin-top: 5px;
1212
- margin-bottom: 25px;
1213
- -webkit-transition: all 0.2s;
1214
- transition: all 0.2s;
1215
- }
1216
-
1217
- .customify_preset .awesome_preset:hover {
1218
- opacity: 0.9;
1219
- }
1220
-
1221
- .customify_preset .awesome_preset:before {
1222
- content: '';
1223
- position: absolute;
1224
- top: 1px;
1225
- left: 1px;
1226
- right: 1px;
1227
- bottom: 1px;
1228
- border: 1px solid #FFF;
1229
- background: transparent;
1230
- opacity: .5;
1231
- border-radius: 4px;
1232
- z-index: 5;
1233
- }
1234
-
1235
- .customify_preset .awesome_preset .preset-wrap .preset-color {
1236
- height: 128px;
1237
- border-radius: 4px 4px 0 0;
1238
- padding: 17px 0 27px;
1239
- }
1240
-
1241
- .customify_preset .awesome_preset .preset-wrap .preset-color .first-font {
1242
- display: inline-block;
1243
- width: 100%;
1244
- font-size: 55px;
1245
- line-height: 1;
1246
- }
1247
-
1248
- .customify_preset .awesome_preset .preset-wrap .preset-color .secondary-font {
1249
- display: inline-block;
1250
- width: 100%;
1251
- font-size: 20px;
1252
- line-height: 1;
1253
- margin-top: 8px;
1254
- }
1255
-
1256
- .customify_preset .awesome_preset .preset-wrap .preset-name {
1257
- position: relative;
1258
- font-size: 11px;
1259
- text-transform: UPPERCASE;
1260
- border-radius: 0 0 4px 4px;
1261
- padding: 1px;
1262
- }
1263
-
1264
- .customify_preset .awesome_preset .preset-wrap .preset-name:before {
1265
- content: '';
1266
- position: absolute;
1267
- border-color: inherit;
1268
- border: 10px solid;
1269
- border-left-color: transparent;
1270
- border-right-color: transparent;
1271
- border-top: transparent;
1272
- top: -10px;
1273
- border-bottom-color: inherit;
1274
- left: 40%;
1275
- }
1276
-
1277
- .customify_preset .awesome_preset:nth-child(odd) {
1278
- margin-right: 7%;
1279
- }
1280
-
1281
- .customify_preset .awesome_preset input[type=radio] {
1282
- height: 100%;
1283
- width: 100%;
1284
- position: absolute;
1285
- border: 0;
1286
- -webkit-box-shadow: none;
1287
- box-shadow: none;
1288
- color: #006505;
1289
- background-color: transparent;
1290
- border-radius: 0;
1291
- margin: 0;
1292
- display: inline-block;
1293
- top: 0;
1294
- left: 0;
1295
- z-index: 10;
1296
- }
1297
-
1298
- .customify_preset .awesome_preset input[type=radio]:checked:before {
1299
- position: absolute;
1300
- height: 25px;
1301
- width: 25px;
1302
- top: -13px;
1303
- right: -14px;
1304
- background: #FFF;
1305
- z-index: 1;
1306
- }
1307
-
1308
- .customify_preset .awesome_preset input[type=radio]:checked:after {
1309
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
1310
- filter: alpha(opacity=0);
1311
- content: '';
1312
- position: absolute;
1313
- width: 26px;
1314
- height: 26px;
1315
- border-radius: 50%;
1316
- top: -5px;
1317
- right: -5px;
1318
- z-index: 10;
1319
- background: #73C5EE url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjEzcHgiIGhlaWdodD0iOXB4IiB2aWV3Qm94PSIwIDAgMTMgOSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJDdXN0b21pZnktQ29weSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIxLjAwMDAwMCwgLTQwOC4wMDAwMDApIiBmaWxsPSIjRkZGRkZGIj4KICAgICAgICAgICAgPGcgaWQ9IkhlYWRlciIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIxLjAwMDAwMCwgNDcuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0iQ29udGVudCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAuMDAwMDAwLCA3NS4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iRmllbGQtLS1DaGVja2JveC1Db3B5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyNy4wMDAwMDAsIDI0OS4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICAgICAgPGcgaWQ9IkNoZWNrYm94IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwMDAwMCwgMzAuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTAuMDM4NDk1LDE2IEwxNy4xMTYxMzc1LDguOTIxNDg3NiBMMTUuMTk0NjQ5OCw3IEwxMC4wMzg0OTUsMTIuMTU1MDY3NCBMNi45MjE0ODc2LDkuMDM4OTI5OTcgTDUsMTAuOTYwNDE3NiBMMTAuMDM4NDk1LDE2IFoiIGlkPSJQYWdlLTEiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+) no-repeat;
1320
- background-position: center center;
1321
- }
1322
-
1323
- .customify_radio_image {
1324
- display: inline-block;
1325
- }
1326
-
1327
- .customify_radio_image label {
1328
- display: block;
1329
- float: left;
1330
- margin-right: 10px;
1331
- position: relative;
1332
- }
1333
-
1334
- .customify_radio_image label input[type=radio] {
1335
- position: absolute;
1336
- top: 0;
1337
- bottom: 0;
1338
- left: 0;
1339
- right: 0;
1340
- width: 100%;
1341
- height: 100%;
1342
- visibility: hidden;
1343
- }
1344
-
1345
- .customify_radio_image label input[type=radio] img {
1346
- cursor: pointer;
1347
- border: 2px solid transparent;
1348
- }
1349
-
1350
- .customify_radio_image label input[type=radio]:checked + img {
1351
- border: 3px solid #73C5EE;
1352
- }
1353
-
1354
- .customify_ace_editor {
1355
- display: block;
1356
- min-height: 200px;
1357
- border: 1px solid #ddd;
1358
- }
1359
-
1360
- .customize-control-custom_background .hide {
1361
- display: none;
1362
- }
1363
-
1364
- .customize-control-custom_background .upload_button_div {
1365
- margin: 10px 0;
1366
- }
1367
-
1368
- .customize-control-custom_background .upload_button_div > * {
1369
- margin-right: 10px;
1370
- }
1371
-
1372
- .customize-control-custom_background .preview_screenshot {
1373
- text-align: center;
1374
- margin: 10px 0;
1375
- }
1376
-
1377
- .customize-control-custom_background .preview_screenshot img {
1378
- border: 2px solid #ccc;
1379
- }
1380
-
1381
- #customify_import_demo_data_button {
1382
- width: 70%;
1383
- text-align: center;
1384
- padding: 10px;
1385
- display: inline-block;
1386
- height: auto;
1387
- margin: 0 15% 10% 15%;
1388
- }
1389
-
1390
- .import_step_note {
1391
- margin: 5px;
1392
- width: 100%;
1393
- display: inline-block;
1394
- }
1395
-
1396
- .import_step_note:before {
1397
- content: "\1F449";
1398
- }
1399
-
1400
- .import_step_note.success:before {
1401
- content: "\1F44D";
1402
- }
1403
-
1404
- .import_step_note.failed:before {
1405
- content: "\274C";
1406
- }
1407
-
1408
- #customize-header-actions {
1409
- background: #ffffff;
1410
- border-color: #e0e8ef;
1411
- }
1412
-
1413
- .wp-full-overlay-sidebar,
1414
- .customize-themes-panel,
1415
- #customize-sidebar-outer-content {
1416
- background: #F7F9FA;
1417
- border-right: 1px solid #e0e8ef;
1418
- }
1419
-
1420
- .outer-section-open #customize-controls .wp-full-overlay-sidebar-content,
1421
- .attachment-media-view, .media-widget-preview.media_audio, .media-widget-preview.media_image {
1422
- background: #F7F9FA;
1423
- }
1424
-
1425
- #customize-theme-controls #accordion-section-menu_locations {
1426
- border-bottom: 1px solid #e0e8ef;
1427
- }
1428
-
1429
- #customize-controls #accordion-section-themes > .accordion-section-title {
1430
- font-weight: 600;
1431
- border-bottom: 1px solid #e0e8ef;
1432
- }
1433
-
1434
- #customize-controls #accordion-section-themes > .accordion-section-title:hover {
1435
- background: #fff;
1436
- }
1437
-
1438
- #customize-controls .panel-meta.customize-info {
1439
- border-bottom-color: #e0e8ef;
1440
- }
1441
-
1442
- #customize-theme-controls .control-section .accordion-section-title {
1443
- font-weight: 400;
1444
- border-top: 1px solid #e0e8ef;
1445
- border-bottom: none;
1446
- }
1447
-
1448
- #customize-theme-controls .control-section:last-of-type > .accordion-section-title {
1449
- border-bottom: 1px solid #e0e8ef;
1450
- }
1451
-
1452
- #customize-theme-controls .customize-section-title {
1453
- border-top: 1px solid #e0e8ef;
1454
- border-bottom: 1px solid #e0e8ef;
1455
- }
1456
-
1457
- #customize-controls .control-section .accordion-section-title:focus, #customize-controls .control-section .accordion-section-title:hover, #customize-controls .control-section.open .accordion-section-title, #customize-controls .control-section:hover > .accordion-section-title {
1458
- color: #056184;
1459
- background: #f5fcff;
1460
- border-left-color: #f5fcff;
1461
- }
1462
-
1463
- .wp-customizer {
1464
- /* SECTION: NAV MENUS */
1465
- }
1466
-
1467
- .wp-customizer .menu-item-edit-active .menu-item-handle, .wp-customizer .section-open .menu-item-settings, .wp-customizer .menu-item-bar .menu-item-handle:hover {
1468
- border-color: #e0e8ef;
1469
- }
1470
-
1471
- .wp-customizer .section-open .menu-item-settings {
1472
- background: #f5fcff;
1473
- }
1474
-
1475
- .wp-customizer .control-section-nav_menu .menu-location-settings {
1476
- border-top-color: #e0e8ef !important;
1477
- }
1478
-
1479
- [data-balloon] {
1480
- position: relative;
1481
- }
1482
-
1483
- [data-balloon]::before {
1484
- opacity: 0;
1485
- pointer-events: none;
1486
- -webkit-transition: all .18s ease-out;
1487
- transition: all .18s ease-out;
1488
- background: rgba(17, 17, 17, 0.9);
1489
- border-radius: 4px;
1490
- color: #fff;
1491
- content: attr(data-balloon);
1492
- font-size: 12px;
1493
- padding: .5em 1em;
1494
- position: absolute;
1495
- white-space: nowrap;
1496
- z-index: 10;
1497
- }
1498
-
1499
- [data-balloon]::after {
1500
- background: no-repeat url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="36px" height="12px"><path fill="rgba(17, 17, 17, 0.9)" transform="rotate(0)" d="M2.658,0.000 C-13.615,0.000 50.938,0.000 34.662,0.000 C28.662,0.000 23.035,12.002 18.660,12.002 C14.285,12.002 8.594,0.000 2.658,0.000 Z"/></svg>');
1501
- background-size: 100% auto;
1502
- width: 18px;
1503
- height: 6px;
1504
- opacity: 0;
1505
- pointer-events: none;
1506
- -webkit-transition: all .18s ease-out;
1507
- transition: all .18s ease-out;
1508
- content: '';
1509
- position: absolute;
1510
- z-index: 10;
1511
- }
1512
-
1513
- [data-balloon]:hover::before, [data-balloon]:hover::after {
1514
- opacity: 1;
1515
- pointer-events: auto;
1516
- }
1517
-
1518
- [data-balloon][data-balloon-pos="up"]::before {
1519
- bottom: 100%;
1520
- left: 50%;
1521
- margin-bottom: 11px;
1522
- -webkit-transform: translate3d(-50%, 10px, 0);
1523
- transform: translate3d(-50%, 10px, 0);
1524
- -webkit-transform-origin: top;
1525
- transform-origin: top;
1526
- }
1527
-
1528
- [data-balloon][data-balloon-pos="up"]::after {
1529
- bottom: 100%;
1530
- left: 50%;
1531
- margin-bottom: 5px;
1532
- -webkit-transform: translate3d(-50%, 10px, 0);
1533
- transform: translate3d(-50%, 10px, 0);
1534
- -webkit-transform-origin: top;
1535
- transform-origin: top;
1536
- }
1537
-
1538
- [data-balloon][data-balloon-pos="up"]:hover::before {
1539
- -webkit-transform: translate3d(-50%, 0, 0);
1540
- transform: translate3d(-50%, 0, 0);
1541
- }
1542
-
1543
- [data-balloon][data-balloon-pos="up"]:hover::after {
1544
- -webkit-transform: translate3d(-50%, 0, 0);
1545
- transform: translate3d(-50%, 0, 0);
1546
- }
1547
-
1548
- [data-balloon][data-balloon-pos='down']::before {
1549
- left: 50%;
1550
- margin-top: 11px;
1551
- top: 100%;
1552
- -webkit-transform: translate3d(-50%, -10px, 0);
1553
- transform: translate3d(-50%, -10px, 0);
1554
- }
1555
-
1556
- [data-balloon][data-balloon-pos='down']::after {
1557
- background: no-repeat url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="36px" height="12px"><path fill="rgba(17, 17, 17, 0.9)" transform="rotate(180 18 6)" d="M2.658,0.000 C-13.615,0.000 50.938,0.000 34.662,0.000 C28.662,0.000 23.035,12.002 18.660,12.002 C14.285,12.002 8.594,0.000 2.658,0.000 Z"/></svg>');
1558
- background-size: 100% auto;
1559
- width: 18px;
1560
- height: 6px;
1561
- left: 50%;
1562
- margin-top: 5px;
1563
- top: 100%;
1564
- -webkit-transform: translate3d(-50%, -10px, 0);
1565
- transform: translate3d(-50%, -10px, 0);
1566
- }
1567
-
1568
- [data-balloon][data-balloon-pos='down']:hover::before {
1569
- -webkit-transform: translate3d(-50%, 0, 0);
1570
- transform: translate3d(-50%, 0, 0);
1571
- }
1572
-
1573
- [data-balloon][data-balloon-pos='down']:hover::after {
1574
- -webkit-transform: translate3d(-50%, 0, 0);
1575
- transform: translate3d(-50%, 0, 0);
1576
- }
1577
-
1578
- [data-balloon][data-balloon-pos='left']::before {
1579
- margin-right: 11px;
1580
- right: 100%;
1581
- top: 50%;
1582
- -webkit-transform: translate3d(10px, -50%, 0);
1583
- transform: translate3d(10px, -50%, 0);
1584
- }
1585
-
1586
- [data-balloon][data-balloon-pos='left']::after {
1587
- background: no-repeat url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12px" height="36px"><path fill="rgba(17, 17, 17, 0.9)" transform="rotate(-90 18 18)" d="M2.658,0.000 C-13.615,0.000 50.938,0.000 34.662,0.000 C28.662,0.000 23.035,12.002 18.660,12.002 C14.285,12.002 8.594,0.000 2.658,0.000 Z"/></svg>');
1588
- background-size: 100% auto;
1589
- width: 6px;
1590
- height: 18px;
1591
- margin-right: 5px;
1592
- right: 100%;
1593
- top: 50%;
1594
- -webkit-transform: translate3d(10px, -50%, 0);
1595
- transform: translate3d(10px, -50%, 0);
1596
- }
1597
-
1598
- [data-balloon][data-balloon-pos='left']:hover::before {
1599
- -webkit-transform: translate3d(0, -50%, 0);
1600
- transform: translate3d(0, -50%, 0);
1601
- }
1602
-
1603
- [data-balloon][data-balloon-pos='left']:hover::after {
1604
- -webkit-transform: translate3d(0, -50%, 0);
1605
- transform: translate3d(0, -50%, 0);
1606
- }
1607
-
1608
- [data-balloon][data-balloon-pos='right']::before {
1609
- left: 100%;
1610
- margin-left: 11px;
1611
- top: 50%;
1612
- -webkit-transform: translate3d(-10px, -50%, 0);
1613
- transform: translate3d(-10px, -50%, 0);
1614
- }
1615
-
1616
- [data-balloon][data-balloon-pos='right']::after {
1617
- background: no-repeat url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12px" height="36px"><path fill="rgba(17, 17, 17, 0.9)" transform="rotate(90 6 6)" d="M2.658,0.000 C-13.615,0.000 50.938,0.000 34.662,0.000 C28.662,0.000 23.035,12.002 18.660,12.002 C14.285,12.002 8.594,0.000 2.658,0.000 Z"/></svg>');
1618
- background-size: 100% auto;
1619
- width: 6px;
1620
- height: 18px;
1621
- left: 100%;
1622
- margin-left: 5px;
1623
- top: 50%;
1624
- -webkit-transform: translate3d(-10px, -50%, 0);
1625
- transform: translate3d(-10px, -50%, 0);
1626
- }
1627
-
1628
- [data-balloon][data-balloon-pos='right']:hover::before {
1629
- -webkit-transform: translate3d(0, -50%, 0);
1630
- transform: translate3d(0, -50%, 0);
1631
- }
1632
-
1633
- [data-balloon][data-balloon-pos='right']:hover::after {
1634
- -webkit-transform: translate3d(0, -50%, 0);
1635
- transform: translate3d(0, -50%, 0);
1636
- }
1637
-
1638
- [data-balloon][data-balloon-length='small']::before {
1639
- white-space: normal;
1640
- width: 80px;
1641
- }
1642
-
1643
- [data-balloon][data-balloon-length='medium']::before {
1644
- white-space: normal;
1645
- width: 150px;
1646
- }
1647
-
1648
- [data-balloon][data-balloon-length='large']::before {
1649
- white-space: normal;
1650
- width: 260px;
1651
- }
1652
-
1653
- [data-balloon][data-balloon-length='xlarge']::before {
1654
- white-space: normal;
1655
- width: 380px;
1656
- }
1657
-
1658
- @media screen and (max-width: 768px) {
1659
- [data-balloon][data-balloon-length='xlarge']::before {
1660
- white-space: normal;
1661
- width: 90vw;
1662
- }
1663
- }
1664
-
1665
- [data-balloon][data-balloon-length='fit']::before {
1666
- white-space: normal;
1667
- width: 100%;
1668
- }
1669
-
1670
- /* ==========================================================================
1671
- #FEEDBACK MODAL
1672
- ========================================================================== */
1673
- body.modal-open {
1674
- overflow: hidden;
1675
- }
1676
-
1677
- body.modal-open #style-manager-user-feedback-modal .modal {
1678
- overflow-x: hidden;
1679
- overflow-y: auto;
1680
- visibility: visible;
1681
- opacity: 1;
1682
- -webkit-transform: translate(0, 0);
1683
- transform: translate(0, 0);
1684
- }
1685
-
1686
- #style-manager-user-feedback-modal {
1687
- height: 100%;
1688
- }
1689
-
1690
- #style-manager-user-feedback-modal .modal {
1691
- position: relative;
1692
- height: 100%;
1693
- display: -webkit-box;
1694
- display: -ms-flexbox;
1695
- display: flex;
1696
- -webkit-box-align: center;
1697
- -ms-flex-align: center;
1698
- align-items: center;
1699
- top: 0;
1700
- right: 0;
1701
- bottom: 0;
1702
- left: 0;
1703
- z-index: 1050;
1704
- opacity: 0;
1705
- visibility: hidden;
1706
- overflow: hidden;
1707
- outline: 0;
1708
- -webkit-transition: all .3s ease;
1709
- transition: all .3s ease;
1710
- -webkit-transform: translate(0, -10%);
1711
- transform: translate(0, -10%);
1712
- font-family: 'Galano Grotesque Alt', -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
1713
- font-weight: 400;
1714
- font-size: 16px;
1715
- line-height: 1.7;
1716
- }
1717
-
1718
- #style-manager-user-feedback-modal .modal-dialog {
1719
- position: relative;
1720
- width: auto;
1721
- margin: 10px;
1722
- text-align: left;
1723
- }
1724
-
1725
- #style-manager-user-feedback-modal .modal-content {
1726
- position: relative;
1727
- display: -webkit-box;
1728
- display: -ms-flexbox;
1729
- display: flex;
1730
- -webkit-box-orient: vertical;
1731
- -webkit-box-direction: normal;
1732
- -ms-flex-direction: column;
1733
- flex-direction: column;
1734
- background-color: #fff;
1735
- background-clip: padding-box;
1736
- border: none;
1737
- border-radius: 4px;
1738
- -webkit-box-shadow: 0 4px 4px 0 rgba(42, 54, 52, 0.1), 0 8px 8px 0 rgba(42, 54, 52, 0.1), 0 16px 16px 0 rgba(42, 54, 52, 0.1), 0 16px 32px 0 rgba(42, 54, 52, 0.1), 0 32px 64px 0 rgba(42, 54, 52, 0.1), 0 64px 128px 0 rgba(42, 54, 52, 0.1);
1739
- box-shadow: 0 4px 4px 0 rgba(42, 54, 52, 0.1), 0 8px 8px 0 rgba(42, 54, 52, 0.1), 0 16px 16px 0 rgba(42, 54, 52, 0.1), 0 16px 32px 0 rgba(42, 54, 52, 0.1), 0 32px 64px 0 rgba(42, 54, 52, 0.1), 0 64px 128px 0 rgba(42, 54, 52, 0.1);
1740
- outline: 0;
1741
- }
1742
-
1743
- #style-manager-user-feedback-modal .modal-content p {
1744
- color: #000;
1745
- }
1746
-
1747
- #style-manager-user-feedback-modal .modal-content p a {
1748
- font-weight: 500;
1749
- color: #9660C6;
1750
- border-bottom: 1px solid #9660C6;
1751
- }
1752
-
1753
- #style-manager-user-feedback-modal .modal-content > form {
1754
- margin-bottom: 20px;
1755
- }
1756
-
1757
- #style-manager-user-feedback-modal .modal-backdrop {
1758
- position: fixed;
1759
- top: 0;
1760
- right: 0;
1761
- bottom: 0;
1762
- left: 0;
1763
- z-index: 1040;
1764
- background-color: #000;
1765
- opacity: 0;
1766
- visibility: hidden;
1767
- -webkit-transition: all 0.3s ease;
1768
- transition: all 0.3s ease;
1769
- }
1770
-
1771
- .modal-open #style-manager-user-feedback-modal .modal-backdrop {
1772
- opacity: 0.8;
1773
- visibility: visible;
1774
- }
1775
-
1776
- #style-manager-user-feedback-modal .modal-header {
1777
- display: -webkit-box;
1778
- display: -ms-flexbox;
1779
- display: flex;
1780
- -webkit-box-align: start;
1781
- -ms-flex-align: start;
1782
- align-items: flex-start;
1783
- -webkit-box-pack: justify;
1784
- -ms-flex-pack: justify;
1785
- justify-content: space-between;
1786
- padding: 30px 48px 10px 48px;
1787
- }
1788
-
1789
- #style-manager-user-feedback-modal .modal-header .close.button {
1790
- top: -10px;
1791
- }
1792
-
1793
- #style-manager-user-feedback-modal .modal-header .close.icon {
1794
- opacity: 0.5;
1795
- }
1796
-
1797
- #style-manager-user-feedback-modal .modal-header .close:hover {
1798
- opacity: 1;
1799
- }
1800
-
1801
- #style-manager-user-feedback-modal .modal-title {
1802
- margin-bottom: 10px;
1803
- line-height: 1.5;
1804
- }
1805
-
1806
- #style-manager-user-feedback-modal .modal-title.modal-title--small {
1807
- font-weight: 500;
1808
- }
1809
-
1810
- #style-manager-user-feedback-modal .modal-body {
1811
- position: relative;
1812
- -webkit-box-flex: 1;
1813
- -ms-flex: 1 1 auto;
1814
- flex: 1 1 auto;
1815
- padding: 30px 30px 0 30px;
1816
- }
1817
-
1818
- #style-manager-user-feedback-modal .modal-body.full {
1819
- padding: 0;
1820
- }
1821
-
1822
- #style-manager-user-feedback-modal .modal-body.full .box {
1823
- padding-top: 0;
1824
- padding-bottom: 0;
1825
- margin-top: 0;
1826
- }
1827
-
1828
- #style-manager-user-feedback-modal .modal-body.full + .modal-footer.full .box {
1829
- padding-top: 18px;
1830
- }
1831
-
1832
- #style-manager-user-feedback-modal .modal-footer {
1833
- padding: 30px;
1834
- text-align: center;
1835
- }
1836
-
1837
- #style-manager-user-feedback-modal .modal-footer .box .button:last-child {
1838
- margin-bottom: 0;
1839
- }
1840
-
1841
- #style-manager-user-feedback-modal .modal-footer.full {
1842
- padding: 0;
1843
- }
1844
-
1845
- #style-manager-user-feedback-modal .modal-scrollbar-measure {
1846
- position: absolute;
1847
- top: -9999px;
1848
- width: 50px;
1849
- height: 50px;
1850
- overflow: scroll;
1851
- }
1852
-
1853
- #style-manager-user-feedback-modal .modal-state {
1854
- display: none;
1855
- }
1856
-
1857
- #style-manager-user-feedback-modal .modal-state:checked + .modal {
1858
- opacity: 1;
1859
- visibility: visible;
1860
- }
1861
-
1862
- #style-manager-user-feedback-modal .modal-state:checked + .modal .modal__inner {
1863
- top: 0;
1864
- }
1865
-
1866
- @media (min-width: 576px) {
1867
- #style-manager-user-feedback-modal .modal-dialog {
1868
- max-width: 655px;
1869
- margin: 30px auto;
1870
- }
1871
- #style-manager-user-feedback-modal .modal-sm {
1872
- max-width: 300px;
1873
- }
1874
- }
1875
-
1876
- @media (min-width: 576px) {
1877
- #style-manager-user-feedback-modal .modal-lg {
1878
- max-width: 800px;
1879
- }
1880
- }
1881
-
1882
- #style-manager-user-feedback .modal-body .box {
1883
- position: relative;
1884
- -webkit-box-orient: vertical;
1885
- -webkit-box-direction: normal;
1886
- -ms-flex-direction: column;
1887
- flex-direction: column;
1888
- display: -webkit-box;
1889
- display: -ms-flexbox;
1890
- display: flex;
1891
- -ms-flex-wrap: nowrap;
1892
- flex-wrap: nowrap;
1893
- -webkit-box-align: center;
1894
- -ms-flex-align: center;
1895
- align-items: center;
1896
- margin: 20px 0;
1897
- padding: 16px 52px;
1898
- border-radius: 4px;
1899
- }
1900
-
1901
- #style-manager-user-feedback .modal-body .box > * {
1902
- width: 100%;
1903
- }
1904
-
1905
- #style-manager-user-feedback .modal-body p {
1906
- font-size: 16px;
1907
- margin-bottom: 20px;
1908
- }
1909
-
1910
- #style-manager-user-feedback .modal-body textarea {
1911
- width: 100%;
1912
- margin: 0;
1913
- padding: 11px 18px;
1914
- border: 1px solid #dddddd;
1915
- border-radius: 4px;
1916
- -webkit-box-shadow: none;
1917
- box-shadow: none;
1918
- font-family: 'Galano Grotesque Alt', -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
1919
- font-size: 16px;
1920
- line-height: 26px;
1921
- color: #473850;
1922
- }
1923
-
1924
- #style-manager-user-feedback .modal-title {
1925
- margin-top: 0;
1926
- margin-bottom: 34px;
1927
- font-family: 'Galano Classic', -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
1928
- font-weight: 600;
1929
- font-size: 28px;
1930
- line-height: 1.4;
1931
- text-align: center;
1932
- }
1933
-
1934
- #style-manager-user-feedback .button {
1935
- text-decoration: none;
1936
- cursor: pointer;
1937
- -webkit-font-smoothing: antialiased;
1938
- position: relative;
1939
- -webkit-transition-duration: .2s;
1940
- transition-duration: .2s;
1941
- -webkit-transition-timing-function: cubic-bezier(0, 0, 0.58, 1);
1942
- transition-timing-function: cubic-bezier(0, 0, 0.58, 1);
1943
- -webkit-transition-property: background,background-color,color,-webkit-transform,-webkit-box-shadow;
1944
- transition-property: background,background-color,color,-webkit-transform,-webkit-box-shadow;
1945
- transition-property: transform,background,background-color,color,box-shadow;
1946
- transition-property: transform,background,background-color,color,box-shadow,-webkit-transform,-webkit-box-shadow;
1947
- display: inline-block;
1948
- padding: 15px 50px;
1949
- border-radius: 2px;
1950
- font-family: "Galano Classic", -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
1951
- font-size: 16px;
1952
- line-height: 23px;
1953
- font-weight: 600;
1954
- text-align: center;
1955
- background-color: #9660c6;
1956
- color: #ffffff;
1957
- border-radius: 4px;
1958
- -webkit-box-shadow: none;
1959
- box-shadow: none;
1960
- height: auto;
1961
- width: 100%;
1962
- margin-top: 20px;
1963
- }
1964
-
1965
- #style-manager-user-feedback .button:hover {
1966
- background-color: #9660c6;
1967
- color: #ffffff;
1968
- -webkit-transform: scale(1.05) translateY(-3px);
1969
- transform: scale(1.05) translateY(-3px);
1970
- -webkit-box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.7);
1971
- box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.7);
1972
- }
1973
-
1974
- #style-manager-user-feedback .second-step {
1975
- margin-top: 18px;
1976
- }
1977
-
1978
- #style-manager-user-feedback .thanks-step,
1979
- #style-manager-user-feedback .error-step {
1980
- text-align: center;
1981
- }
1982
-
1983
- #style-manager-user-feedback .thanks-step .modal-title,
1984
- #style-manager-user-feedback .error-step .modal-title {
1985
- margin-bottom: 0;
1986
- }
1987
-
1988
- #style-manager-user-feedback .thanks-step p:last-child,
1989
- #style-manager-user-feedback .error-step p:last-child {
1990
- margin-bottom: 10px;
1991
- }
1992
-
1993
- .scorecard {
1994
- display: -webkit-box;
1995
- display: -ms-flexbox;
1996
- display: flex;
1997
- -webkit-box-align: baseline;
1998
- -ms-flex-align: baseline;
1999
- align-items: baseline;
2000
- -webkit-box-pack: space-evenly;
2001
- -ms-flex-pack: space-evenly;
2002
- justify-content: space-evenly;
2003
- color: #9660C6;
2004
- font-family: "Galano Classic", -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
2005
- font-size: 18px;
2006
- font-weight: 600;
2007
- text-align: center;
2008
- }
2009
-
2010
- .scorecard > label {
2011
- font-size: 20px;
2012
- }
2013
-
2014
- .scorecard > label span {
2015
- display: block;
2016
- width: 46px;
2017
- border: 2px solid #9660C6;
2018
- line-height: 46px;
2019
- border-radius: 100%;
2020
- background: #FFF;
2021
- -webkit-transition: all 0.25s ease;
2022
- transition: all 0.25s ease;
2023
- }
2024
-
2025
- .scorecard > label input[type="radio"] {
2026
- display: none;
2027
- }
2028
-
2029
- .scorecard > label span:hover,
2030
- .scorecard > label input[type="radio"]:checked ~ span {
2031
- background: #9660C6;
2032
- color: #FFF;
2033
- }
2034
-
2035
- .font-options__wrapper .font-options__options-list {
2036
- border-color: #B8DAEB;
2037
- -webkit-box-shadow: 0 10px 20px 0 rgba(0, 0, 0, 0.15);
2038
- box-shadow: 0 10px 20px 0 rgba(0, 0, 0, 0.15);
2039
- }
2040
-
2041
- .font-options__wrapper .font-options__option {
2042
- margin-bottom: 12px;
2043
- }
2044
-
2045
- .font-options__wrapper .font-options__option label {
2046
- display: block;
2047
- margin-bottom: 6px;
2048
- }
2049
-
2050
- .font-options__wrapper [type=checkbox]:checked ~ .font-options__options-list {
2051
- opacity: 1;
2052
- display: block;
2053
- }
2054
-
2055
- input.customify_font_tooltip {
2056
- display: none;
2057
- }
2058
-
2059
- ul.font-options__options-list .select2-container {
2060
- width: 100% !important;
2061
- }
2062
-
2063
- ul.font-options__options-list .select2-container .select2-selection--single {
2064
- -webkit-appearance: initial;
2065
- }
2066
-
2067
- ul.font-options__options-list .select2-container .select2-selection--single .select2-selection__arrow {
2068
- display: none;
2069
- }
2070
-
2071
- ul.font-options__options-list .select2-container--default .select2-selection--single .select2-selection__rendered {
2072
- color: inherit;
2073
- line-height: initial;
2074
- }
2075
-
2076
- .select2-container.select2-container--open {
2077
- z-index: 99999999;
2078
- }
2079
-
2080
- #customize-theme-controls .select2-container {
2081
- width: 100% !important;
2082
- }
2083
-
2084
- #customize-theme-controls .select2-container .select2-selection--multiple {
2085
- -webkit-appearance: initial;
2086
- padding: 4px 8px 4px;
2087
- height: auto;
2088
- background: none;
2089
- }
2090
-
2091
- #customize-theme-controls .select2-container .select2-selection--multiple .select2-selection__arrow {
2092
- display: none;
2093
- }
2094
-
2095
- #customize-theme-controls .select2-container .select2-selection--multiple .select2-selection__rendered {
2096
- padding: 0;
2097
- display: -webkit-box;
2098
- display: -ms-flexbox;
2099
- display: flex;
2100
- }
2101
-
2102
- #customize-theme-controls .select2-container .select2-selection--multiple .select2-selection__rendered .select2-search--inline {
2103
- -webkit-box-flex: 1;
2104
- -ms-flex: 1;
2105
- flex: 1;
2106
- }
2107
-
2108
- #customize-theme-controls .select2-container .select2-selection--multiple .select2-selection__rendered .select2-search--inline .select2-search__field[class] {
2109
- min-width: 100%;
2110
- border-width: 0;
2111
- margin-top: 3px !important;
2112
- }
2113
-
2114
- #customize-theme-controls .select2-container .select2-selection--multiple .select2-selection__rendered .select2-selection__choice {
2115
- padding: 3px 7px;
2116
- margin-right: 6px;
2117
- margin-top: 0px;
2118
- border-color: #e0e8ef;
2119
- background-color: #f6fbff;
2120
- }
2121
-
2122
- #customize-theme-controls .select2-container .select2-search--inline .select2-search__field {
2123
- height: 29px;
2124
- min-width: 9em;
2125
- margin-top: 0;
2126
- }
2127
-
2128
- .select2-container--default .select2-results__option[aria-selected=true][class] {
2129
- background: transparent;
2130
- opacity: 0.3;
2131
- pointer-events: none;
2132
- }
2133
-
2134
- .select2-container .select2-dropdown {
2135
- border-color: #e0e8ef;
2136
- }
2137
-
2138
- #customize-theme-controls .widget-content .accordion-container {
2139
- margin-left: -10px;
2140
- margin-right: -10px;
2141
- margin-top: 20px;
2142
- margin-bottom: 10px;
2143
- }
2144
-
2145
- #customize-theme-controls .widget-content .accordion-container .accordion-section .accordion-section-content {
2146
- position: relative;
2147
- left: 0;
2148
- max-height: 0;
2149
- padding-top: 0;
2150
- padding-bottom: 0;
2151
- overflow: hidden;
2152
- -webkit-transition: all .4s ease;
2153
- transition: all .4s ease;
2154
- color: #416B7E;
2155
- }
2156
-
2157
- #customize-theme-controls .widget-content .accordion-container .accordion-section .accordion-section-content p:first-child {
2158
- margin-top: 0;
2159
- }
2160
-
2161
- #customize-theme-controls .widget-content .accordion-container .accordion-section .accordion-section-content p:last-child {
2162
- margin-bottom: 0;
2163
- }
2164
-
2165
- #customize-theme-controls .widget-content .accordion-container .accordion-section .accordion-section-title {
2166
- color: #39474D;
2167
- }
2168
-
2169
- #customize-theme-controls .widget-content .accordion-container .accordion-section .accordion-section-title:after {
2170
- content: "\f142";
2171
- -webkit-transform: rotate(180deg);
2172
- transform: rotate(180deg);
2173
- }
2174
-
2175
- #customize-theme-controls .widget-content .accordion-container .accordion-section.open {
2176
- border-bottom: none;
2177
- }
2178
-
2179
- #customize-theme-controls .widget-content .accordion-container .accordion-section.open .accordion-section-content {
2180
- max-height: 100%;
2181
- padding-top: 17px;
2182
- padding-bottom: 17px;
2183
- }
2184
-
2185
- #customize-theme-controls .widget-content .accordion-container .accordion-section.open .accordion-section-title {
2186
- border-bottom: 1px solid;
2187
- }
2188
-
2189
- #customize-theme-controls .widget-content .accordion-container .accordion-section.open .accordion-section-title:after {
2190
- -webkit-transform: rotate(0deg);
2191
- transform: rotate(0deg);
2192
- }
2193
-
2194
- #customize-theme-controls .widget-content .accordion-container label.customize-control-title, #customize-theme-controls .widget-content .accordion-container label.separator.label {
2195
- cursor: default;
2196
- }
2197
-
2198
- .widget .widget-content > p input[type=checkbox],
2199
- .widget .widget-content > p input[type=radio] {
2200
- margin-bottom: 3px;
2201
- margin-top: 3px;
2202
- }
2203
-
2204
- .widget .widget-content small {
2205
- margin-top: 5px;
2206
- display: block;
2207
- }
2208
-
2209
- #available-widgets [class*=pixelgrade] .widget .widget-title:before,
2210
- #available-widgets [class*=featured-posts] .widget .widget-title:before,
2211
- #available-widgets [class*=categories-image-grid] .widget .widget-title:before {
2212
- content: "\f538";
2213
- color: #9660c6;
2214
- }
2215
-
2216
- #available-widgets [class*=pixelgrade-featured-posts-slideshow] .widget .widget-title:before {
2217
- content: "\f233";
2218
- }
2219
-
2220
- #available-widgets [class*=pixelgrade-featured-posts-carousel] .widget .widget-title:before {
2221
- content: "\f169";
2222
- }
2223
-
2224
- #available-widgets [class*=featured-posts-grid] .widget .widget-title:before {
2225
- content: "\f180";
2226
- }
2227
-
2228
- #available-widgets [class*=featured-posts-list] .widget .widget-title:before {
2229
- content: "\f164";
2230
- }
2231
-
2232
- #available-widgets [class*=categories-image-grid] .widget .widget-title:before {
2233
- content: "\f163";
2234
- }
2235
-
2236
- #available-widgets [class*=pixelgrade-promo-box] .widget .widget-title:before {
2237
- content: "\f488";
2238
- }
2239
-
2240
- .ui-tooltip {
2241
- z-index: 999999;
2242
- }
2243
-
2244
- .wp-customizer .widget-conditional .condition-control:after {
2245
- content: " ";
2246
- display: table;
2247
- clear: both;
2248
- }
2249
-
2250
- .wp-customizer .widget-conditional .selection {
2251
- padding-right: 50px;
2252
- padding-left: 28px;
2253
- padding-bottom: 19px;
2254
- margin-left: 0;
2255
- margin-right: 0;
2256
- margin-bottom: 10px;
2257
- border-bottom: 1px solid #cbcfd4;
2258
- }
2259
-
2260
- .wp-customizer .widget-conditional .condition:last-child .selection {
2261
- border: 0;
2262
- }
2263
-
2264
- .wp-customizer .widget-conditional select {
2265
- max-width: 100%;
2266
- width: 170px;
2267
- }
2268
-
2269
- .wp-customizer .widget-conditional .condition-top select {
2270
- width: 130px;
2271
- }
2272
-
2273
- .pix_customizer_setting .customize-inside-control-row {
2274
- position: relative;
2275
- width: 100% !important;
2276
- margin-left: 0 !important;
2277
- text-indent: 0 !important;
2278
- background-size: cover;
2279
- background-position: 50% 50%;
2280
- height: 64px;
2281
- border-radius: 5px;
2282
- overflow: hidden;
2283
- }
2284
-
2285
- .pix_customizer_setting .customize-inside-control-row:before {
2286
- content: '';
2287
- position: absolute;
2288
- top: 0;
2289
- bottom: 0;
2290
- left: 0;
2291
- right: 0;
2292
- z-index: 10;
2293
- pointer-events: none;
2294
- -webkit-box-shadow: inset 0 0 3px 0 rgba(0, 0, 0, 0.2);
2295
- box-shadow: inset 0 0 3px 0 rgba(0, 0, 0, 0.2);
2296
- }
2297
-
2298
- .pix_customizer_setting .customize-inside-control-row:hover:before {
2299
- -webkit-box-shadow: inset 0 0 3px 0 rgba(0, 0, 0, 0.4);
2300
- box-shadow: inset 0 0 3px 0 rgba(0, 0, 0, 0.4);
2301
- }
2302
-
2303
- .pix_customizer_setting .customize-inside-control-row:hover .palette__item {
2304
- -webkit-transform: translateY(0%);
2305
- transform: translateY(0%);
2306
- }
2307
-
2308
- .pix_customizer_setting .customize-inside-control-row:hover label {
2309
- left: 10px;
2310
- }
2311
-
2312
- .pix_customizer_setting .customize-inside-control-row input {
2313
- opacity: 0;
2314
- }
2315
-
2316
- .pix_customizer_setting .customize-inside-control-row input:checked + label .preview__letter--checked {
2317
- display: inline-block;
2318
- vertical-align: middle;
2319
- }
2320
-
2321
- .pix_customizer_setting .customize-inside-control-row input:checked + label .preview__letter {
2322
- display: none;
2323
- }
2324
-
2325
- .pix_customizer_setting .customize-inside-control-row label {
2326
- position: absolute;
2327
- display: -webkit-box;
2328
- display: -ms-flexbox;
2329
- display: flex;
2330
- z-index: 2;
2331
- width: 100%;
2332
- height: 100%;
2333
- top: 0;
2334
- left: 0;
2335
- padding: 0 10px;
2336
- margin-top: 0 !important;
2337
- -webkit-box-align: center;
2338
- -ms-flex-align: center;
2339
- align-items: center;
2340
- -webkit-transition: all .3s ease;
2341
- transition: all .3s ease;
2342
- }
2343
-
2344
- .pix_customizer_setting .customize-inside-control-row .palette {
2345
- position: absolute;
2346
- display: -webkit-box;
2347
- display: -ms-flexbox;
2348
- display: flex;
2349
- top: 0;
2350
- left: 0;
2351
- z-index: 1;
2352
- width: 100%;
2353
- height: 100%;
2354
- -webkit-transition: all .2s ease;
2355
- transition: all .2s ease;
2356
- }
2357
-
2358
- .pix_customizer_setting .customize-inside-control-row .palette__item {
2359
- -webkit-box-flex: 1;
2360
- -ms-flex: 1;
2361
- flex: 1;
2362
- -webkit-transform: translateY(100%);
2363
- transform: translateY(100%);
2364
- -webkit-transition: all .3s ease;
2365
- transition: all .3s ease;
2366
- }
2367
-
2368
- .pix_customizer_setting .customize-inside-control-row .palette__item:nth-child(1) {
2369
- -webkit-transition-delay: 0s;
2370
- transition-delay: 0s;
2371
- }
2372
-
2373
- .pix_customizer_setting .customize-inside-control-row .palette__item:nth-child(2) {
2374
- -webkit-transition-delay: 0.05s;
2375
- transition-delay: 0.05s;
2376
- }
2377
-
2378
- .pix_customizer_setting .customize-inside-control-row .palette__item:nth-child(3) {
2379
- -webkit-transition-delay: 0.1s;
2380
- transition-delay: 0.1s;
2381
- }
2382
-
2383
- .pix_customizer_setting .customize-inside-control-row .palette__item:nth-child(4) {
2384
- -webkit-transition-delay: 0.15s;
2385
- transition-delay: 0.15s;
2386
- }
2387
-
2388
- .pix_customizer_setting .customize-inside-control-row .palette__item:nth-child(5) {
2389
- -webkit-transition-delay: 0.2s;
2390
- transition-delay: 0.2s;
2391
- }
2392
-
2393
- .pix_customizer_setting .customize-inside-control-row .palette__item:nth-child(6) {
2394
- -webkit-transition-delay: 0.25s;
2395
- transition-delay: 0.25s;
2396
- }
2397
-
2398
- .pix_customizer_setting .customize-inside-control-row .palette__item:nth-child(7) {
2399
- -webkit-transition-delay: 0.3s;
2400
- transition-delay: 0.3s;
2401
- }
2402
-
2403
- .pix_customizer_setting .customize-inside-control-row .palette__item:nth-child(8) {
2404
- -webkit-transition-delay: 0.35s;
2405
- transition-delay: 0.35s;
2406
- }
2407
-
2408
- .pix_customizer_setting .customize-inside-control-row .palette__item:nth-child(9) {
2409
- -webkit-transition-delay: 0.4s;
2410
- transition-delay: 0.4s;
2411
- }
2412
-
2413
- .pix_customizer_setting .customize-inside-control-row .palette__item:nth-child(10) {
2414
- -webkit-transition-delay: 0.45s;
2415
- transition-delay: 0.45s;
2416
- }
2417
-
2418
- .pix_customizer_setting .customize-inside-control-row .preview__letter,
2419
- .pix_customizer_setting .customize-inside-control-row .preview__letter--checked {
2420
- display: inline-block;
2421
- padding: 3px;
2422
- border-radius: 2px;
2423
- color: white;
2424
- margin-right: 5px;
2425
- min-height: 26px;
2426
- min-width: 26px;
2427
- text-align: center;
2428
- background-position: center center;
2429
- background-repeat: no-repeat;
2430
- background-size: 15px 15px;
2431
- font-style: normal;
2432
- vertical-align: baseline;
2433
- }
2434
-
2435
- .pix_customizer_setting .customize-inside-control-row .preview__letter--checked {
2436
- display: none;
2437
- }
2438
-
2439
- [id*="sm_current_color_palette_control"] .customize-inside-control-row .palette__item[class] {
2440
- -webkit-transform: none;
2441
- transform: none;
2442
- }
2443
-
2444
- [id*="sm_current_color_palette_control"] .variation-control {
2445
- display: -webkit-box;
2446
- display: -ms-flexbox;
2447
- display: flex;
2448
- }
2449
-
2450
- .label__inner {
2451
- color: #000000;
2452
- background: #F5F6F1;
2453
- padding: 7px 12px 7px 7px;
2454
- z-index: 2;
2455
- border-radius: 3px;
2456
- -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
2457
- box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
2458
- }
2459
-
2460
- .picker {
2461
- position: relative;
2462
- top: 0;
2463
- left: 50%;
2464
- width: 80%;
2465
- max-width: 3em;
2466
- margin-top: auto;
2467
- margin-bottom: auto;
2468
- border-radius: 50%;
2469
- overflow: hidden;
2470
- -webkit-transform: translate3d(-50%, 0, 0);
2471
- transform: translate3d(-50%, 0, 0);
2472
- }
2473
-
2474
- .colors .picker > i {
2475
- display: block;
2476
- position: absolute;
2477
- top: 0;
2478
- right: 0;
2479
- bottom: 0;
2480
- left: 0;
2481
- -webkit-box-shadow: inset 0 0 3px 0 rgba(0, 0, 0, 0.2);
2482
- box-shadow: inset 0 0 3px 0 rgba(0, 0, 0, 0.2);
2483
- border-radius: 50%;
2484
- pointer-events: none;
2485
- z-index: 20;
2486
- }
2487
-
2488
- .picker:before,
2489
- .picker:after {
2490
- content: "";
2491
- display: block;
2492
- background: currentColor;
2493
- border-radius: 50%;
2494
- }
2495
-
2496
- .picker:before {
2497
- padding-top: 100%;
2498
- }
2499
-
2500
- .picker:after {
2501
- position: absolute;
2502
- top: 0;
2503
- left: 0;
2504
- width: 100%;
2505
- height: 100%;
2506
- }
2507
-
2508
- .fill {
2509
- overflow: hidden;
2510
- }
2511
-
2512
- .color:first-child .fill {
2513
- border-top-left-radius: 5px;
2514
- border-bottom-left-radius: 5px;
2515
- }
2516
-
2517
- .color:last-child .fill {
2518
- border-top-right-radius: 5px;
2519
- border-bottom-right-radius: 5px;
2520
- }
2521
-
2522
- .label {
2523
- margin-right: auto;
2524
- }
2525
-
2526
- #customize-theme-controls [id*="sm_current_color_palette_control"] {
2527
- display: block;
2528
- width: auto;
2529
- }
2530
-
2531
- #customize-theme-controls [id*="sm_current_color_palette_control"] .color-palette-container {
2532
- background: white;
2533
- }
2534
-
2535
- #customize-theme-controls [id*="sm_current_color_palette_control"] .color-palette-container .description {
2536
- margin-bottom: 15px;
2537
- }
2538
-
2539
- #customize-theme-controls [id*="sm_current_color_palette_control"] .description.c-color-palette__notification {
2540
- padding-top: 19px;
2541
- margin-bottom: 0;
2542
- font-size: inherit;
2543
- font-weight: bold;
2544
- }
2545
-
2546
- .c-color-palette__fields {
2547
- position: relative;
2548
- }
2549
-
2550
- .c-color-palette .iris-picker {
2551
- position: absolute;
2552
- top: 100%;
2553
- left: 0;
2554
- z-index: 100;
2555
- margin-top: 1em;
2556
- border: 0;
2557
- -webkit-box-shadow: black 0 3px 12px -4px;
2558
- box-shadow: black 0 3px 12px -4px;
2559
- }
2560
-
2561
- .c-color-palette .iris-picker .iris-square-handle {
2562
- border-color: transparent;
2563
- left: -6px;
2564
- top: -6px;
2565
- }
2566
-
2567
- .c-color-palette .iris-picker .iris-square-handle:after {
2568
- position: absolute;
2569
- bottom: 0;
2570
- right: 0;
2571
- left: 0;
2572
- top: 0;
2573
- border: 2px solid white;
2574
- }
2575
-
2576
- .c-color-palette .iris-picker .iris-square-value {
2577
- -webkit-box-shadow: none !important;
2578
- box-shadow: none !important;
2579
- }
2580
-
2581
- .colors {
2582
- position: relative;
2583
- display: -webkit-box;
2584
- display: -ms-flexbox;
2585
- display: flex;
2586
- -ms-flex-wrap: wrap;
2587
- flex-wrap: wrap;
2588
- -webkit-box-align: center;
2589
- -ms-flex-align: center;
2590
- align-items: center;
2591
- width: 100%;
2592
- height: 3em;
2593
- }
2594
-
2595
- .color {
2596
- display: -webkit-box;
2597
- display: -ms-flexbox;
2598
- display: flex;
2599
- -webkit-box-orient: vertical;
2600
- -webkit-box-direction: normal;
2601
- -ms-flex-direction: column;
2602
- flex-direction: column;
2603
- -webkit-box-flex: 1;
2604
- -ms-flex: 1 1 0px;
2605
- flex: 1 1 0;
2606
- overflow: hidden;
2607
- -webkit-transition: flex-grow 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28), -webkit-box-flex 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
2608
- transition: flex-grow 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28), -webkit-box-flex 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
2609
- transition: flex-grow 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
2610
- transition: flex-grow 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28), -webkit-box-flex 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28), -ms-flex-positive 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
2611
- }
2612
-
2613
- .color.hidden {
2614
- display: -webkit-box;
2615
- display: -ms-flexbox;
2616
- display: flex;
2617
- -webkit-box-flex: 0;
2618
- -ms-flex-positive: 0;
2619
- flex-grow: 0;
2620
- -webkit-transition: flex-grow 0.3s cubic-bezier(0.6, -1, 0.74, 0.05), -webkit-box-flex 0.3s cubic-bezier(0.6, -1, 0.74, 0.05);
2621
- transition: flex-grow 0.3s cubic-bezier(0.6, -1, 0.74, 0.05), -webkit-box-flex 0.3s cubic-bezier(0.6, -1, 0.74, 0.05);
2622
- transition: flex-grow 0.3s cubic-bezier(0.6, -1, 0.74, 0.05);
2623
- transition: flex-grow 0.3s cubic-bezier(0.6, -1, 0.74, 0.05), -webkit-box-flex 0.3s cubic-bezier(0.6, -1, 0.74, 0.05), -ms-flex-positive 0.3s cubic-bezier(0.6, -1, 0.74, 0.05);
2624
- }
2625
-
2626
- .color.hidden .picker {
2627
- opacity: 0;
2628
- -webkit-transition: opacity .2s ease-out;
2629
- transition: opacity .2s ease-out;
2630
- }
2631
-
2632
- .color .picker {
2633
- -webkit-transition: opacity .3s ease-in-out, border-color .3s ease-in-out;
2634
- transition: opacity .3s ease-in-out, border-color .3s ease-in-out;
2635
- cursor: pointer;
2636
- }
2637
-
2638
- .color.inactive .picker {
2639
- opacity: 0.2;
2640
- }
2641
-
2642
- .color.inactive .picker:hover {
2643
- opacity: 1;
2644
- }
2645
-
2646
- input.c-color-palette__input[class] {
2647
- margin-top: 1em;
2648
- }
2649
-
2650
- #customize-control-sm_toggle_advanced_settings_control {
2651
- margin-bottom: 0;
2652
- opacity: 0;
2653
- }
2654
-
2655
- #customize-control-sm_toggle_advanced_settings_control button {
2656
- width: 100%;
2657
- }
2658
-
2659
- @-webkit-keyframes bounceIn {
2660
- 0%, 20%, 40%, 60%, 80%, 100% {
2661
- -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
2662
- animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
2663
- }
2664
- 0% {
2665
- opacity: 0;
2666
- -webkit-transform: scale3d(0.3, 0.3, 0.3);
2667
- transform: scale3d(0.3, 0.3, 0.3);
2668
- }
2669
- 20% {
2670
- -webkit-transform: scale3d(1.1, 1.1, 1.1);
2671
- transform: scale3d(1.1, 1.1, 1.1);
2672
- }
2673
- 40% {
2674
- -webkit-transform: scale3d(0.9, 0.9, 0.9);
2675
- transform: scale3d(0.9, 0.9, 0.9);
2676
- }
2677
- 60% {
2678
- opacity: 1;
2679
- -webkit-transform: scale3d(1.03, 1.03, 1.03);
2680
- transform: scale3d(1.03, 1.03, 1.03);
2681
- }
2682
- 80% {
2683
- -webkit-transform: scale3d(0.97, 0.97, 0.97);
2684
- transform: scale3d(0.97, 0.97, 0.97);
2685
- }
2686
- 100% {
2687
- opacity: 1;
2688
- -webkit-transform: scale3d(1, 1, 1);
2689
- transform: scale3d(1, 1, 1);
2690
- }
2691
- }
2692
-
2693
- @keyframes bounceIn {
2694
- 0%, 20%, 40%, 60%, 80%, 100% {
2695
- -webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
2696
- animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
2697
- }
2698
- 0% {
2699
- opacity: 0;
2700
- -webkit-transform: scale3d(0.3, 0.3, 0.3);
2701
- transform: scale3d(0.3, 0.3, 0.3);
2702
- }
2703
- 20% {
2704
- -webkit-transform: scale3d(1.1, 1.1, 1.1);
2705
- transform: scale3d(1.1, 1.1, 1.1);
2706
- }
2707
- 40% {
2708
- -webkit-transform: scale3d(0.9, 0.9, 0.9);
2709
- transform: scale3d(0.9, 0.9, 0.9);
2710
- }
2711
- 60% {
2712
- opacity: 1;
2713
- -webkit-transform: scale3d(1.03, 1.03, 1.03);
2714
- transform: scale3d(1.03, 1.03, 1.03);
2715
- }
2716
- 80% {
2717
- -webkit-transform: scale3d(0.97, 0.97, 0.97);
2718
- transform: scale3d(0.97, 0.97, 0.97);
2719
- }
2720
- 100% {
2721
- opacity: 1;
2722
- -webkit-transform: scale3d(1, 1, 1);
2723
- transform: scale3d(1, 1, 1);
2724
- }
2725
- }
2726
-
2727
- #customize-theme-controls #sub-accordion-panel-style_manager_panel .customize-panel-description,
2728
- #customize-theme-controls #sub-accordion-panel-theme_options_panel .customize-panel-description {
2729
- display: block;
2730
- }
2731
-
2732
- #customize-theme-controls li#accordion-panel-style_manager_panel h3.accordion-section-title:before {
2733
- position: relative;
2734
- float: right;
2735
- content: "";
2736
- color: #aed2e5;
2737
- font-family: dashicons;
2738
- padding: 1px;
2739
- margin-right: 28px;
2740
- font-size: 17px;
2741
- -webkit-font-smoothing: antialiased;
2742
- }
2743
-
2744
- #customize-theme-controls li#accordion-panel-style_manager_panel h3.accordion-section-title:before {
2745
- font-size: 18px;
2746
- color: #f8bc30;
2747
- }
2748
-
2749
- #customize-theme-controls li#accordion-section-sm_color_palettes_section h3.accordion-section-title:before {
2750
- position: relative;
2751
- float: right;
2752
- content: "";
2753
- color: #aed2e5;
2754
- font-family: dashicons;
2755
- padding: 1px;
2756
- margin-right: 28px;
2757
- font-size: 17px;
2758
- -webkit-font-smoothing: antialiased;
2759
- }
2760
-
2761
- #customize-theme-controls li#accordion-section-sm_color_palettes_section h3.accordion-section-title {
2762
- border-top: none;
2763
- }
2764
-
2765
- #customize-theme-controls li#accordion-section-sm_font_palettes_section h3.accordion-section-title:before {
2766
- position: relative;
2767
- float: right;
2768
- content: "";
2769
- color: #aed2e5;
2770
- font-family: dashicons;
2771
- padding: 1px;
2772
- margin-right: 28px;
2773
- font-size: 17px;
2774
- -webkit-font-smoothing: antialiased;
2775
- }
2776
-
2777
- #customize-theme-controls li#accordion-section-sm_color_palettes_section h3.accordion-section-title:before,
2778
- #customize-theme-controls li#accordion-section-sm_font_palettes_section h3.accordion-section-title:before {
2779
- padding: 3px;
2780
- margin-right: 5px;
2781
- margin-top: -2px;
2782
- }
2783
-
2784
- #customize-theme-controls li#accordion-panel-theme_options_panel h3.accordion-section-title:before {
2785
- position: relative;
2786
- float: right;
2787
- content: "";
2788
- color: #aed2e5;
2789
- font-family: dashicons;
2790
- padding: 1px;
2791
- margin-right: 28px;
2792
- font-size: 17px;
2793
- -webkit-font-smoothing: antialiased;
2794
- }
2795
-
2796
- #customize-theme-controls li#accordion-panel-theme_options_panel h3.accordion-section-title {
2797
- border-bottom: 1px solid #ddd;
2798
- border-left: none;
2799
- border-right: none;
2800
- margin: 0 0 15px 0;
2801
- }
2802
-
2803
- .color .disc {
2804
- display: block;
2805
- overflow: hidden;
2806
- position: absolute;
2807
- top: 0;
2808
- right: 0;
2809
- bottom: 0;
2810
- left: 0;
2811
- z-index: 15;
2812
- pointer-events: none;
2813
- opacity: 0;
2814
- -webkit-transition: opacity .3s ease-in-out;
2815
- transition: opacity .3s ease-in-out;
2816
- }
2817
-
2818
- .color .disc:after {
2819
- content: "";
2820
- -webkit-filter: blur(6px) saturate(0.7) brightness(1.1);
2821
- filter: blur(6px) saturate(0.7) brightness(1.1);
2822
- display: block;
2823
- width: 200%;
2824
- height: 200%;
2825
- padding-top: 100%;
2826
- position: absolute;
2827
- top: -50%;
2828
- left: -50%;
2829
- -webkit-transform: scale(1);
2830
- transform: scale(1);
2831
- background-image: linear-gradient(330deg, transparent 50%, #ff8100 0), linear-gradient(300deg, transparent 50%, #ff5800 0), linear-gradient(270deg, transparent 50%, #c92323 0), linear-gradient(240deg, transparent 50%, #cc42a2 0), linear-gradient(210deg, transparent 50%, #9f49ac 0), linear-gradient(180deg, transparent 50%, #306cd3 0), linear-gradient(150deg, transparent 50%, #179067 0), linear-gradient(120deg, transparent 50%, #0eb5d6 0), linear-gradient(90deg, transparent 50%, #50b517 0), linear-gradient(60deg, transparent 50%, #ede604 0), linear-gradient(30deg, transparent 50%, #fc0 0), linear-gradient(0deg, transparent 50%, #feac00 0);
2832
- background-clip: content-box,content-box,content-box,content-box,content-box,content-box,padding-box,padding-box,padding-box,padding-box,padding-box,padding-box;
2833
- }
2834
-
2835
- .color.altered .disc {
2836
- opacity: 1;
2837
- }
2838
-
2839
- .customize-control-color .wp-picker-container .iris-picker .iris-palette-container {
2840
- display: -webkit-box;
2841
- display: -ms-flexbox;
2842
- display: flex;
2843
- width: 215px;
2844
- }
2845
-
2846
- .customize-control-color .wp-picker-container .iris-picker .iris-palette {
2847
- width: auto !important;
2848
- height: auto !important;
2849
- -webkit-box-flex: 1;
2850
- -ms-flex: 1 1 0px;
2851
- flex: 1 1 0;
2852
- float: none;
2853
- }
2854
-
2855
- .customize-control-color .wp-picker-container .iris-picker .iris-palette:after {
2856
- content: "";
2857
- display: block;
2858
- padding-top: 100%;
2859
- }
2860
-
2861
- .c-color-palette {
2862
- padding: 30px 20px 18px;
2863
- }
2864
-
2865
- [id="customize-control-sm_current_color_palette_control"][id] {
2866
- margin-bottom: 0;
2867
- }
2868
-
2869
- [id="customize-control-sm_current_color_palette_control"][id] ~ .customize-control {
2870
- background-color: #FFFFFF;
2871
- margin-bottom: 0;
2872
- padding: 24px 20px 0;
2873
- }
2874
-
2875
- #customize-control-sm_dark_color_primary_slider_control,
2876
- #customize-control-sm_dark_color_secondary_slider_control,
2877
- #customize-control-sm_dark_color_tertiary_slider_control {
2878
- display: none !important;
2879
- }
2880
-
2881
- .sm_color_matrix {
2882
- display: -webkit-box;
2883
- display: -ms-flexbox;
2884
- display: flex;
2885
- -ms-flex-wrap: wrap;
2886
- flex-wrap: wrap;
2887
- margin-left: -15px;
2888
- }
2889
-
2890
- .sm_color_matrix > * {
2891
- display: grid;
2892
- grid-auto-rows: 2px;
2893
- grid-auto-columns: 2px;
2894
- -webkit-box-flex: 0;
2895
- -ms-flex: 0 0 33.33333%;
2896
- flex: 0 0 33.33333%;
2897
- padding-top: 15px;
2898
- padding-left: 15px;
2899
- }
2900
-
2901
- .sm_color_matrix > * > * {
2902
- background-color: currentColor;
2903
- border-radius: 50%;
2904
- border: 1px solid #ccc;
2905
- -webkit-animation-duration: 0.75s;
2906
- animation-duration: 0.75s;
2907
- -webkit-animation-name: bounceIn;
2908
- animation-name: bounceIn;
2909
- }
2910
-
2911
- .sm_color_matrix > * > :nth-child(1) {
2912
- grid-area: 16 / 12 / span 12 / span 12;
2913
- }
2914
-
2915
- .sm_color_matrix > * > :nth-child(2) {
2916
- grid-area: 26 / 24 / span 4 / span 4;
2917
- }
2918
-
2919
- .sm_color_matrix > * > :nth-child(3) {
2920
- grid-area: 13 / 24 / span 4 / span 4;
2921
- }
2922
-
2923
- .sm_color_matrix > * > :nth-child(4) {
2924
- grid-area: 8 / 8 / span 8 / span 8;
2925
- }
2926
-
2927
- .sm_color_matrix > * > :nth-child(5) {
2928
- grid-area: 32 / 8 / span 4 / span 4;
2929
- }
2930
-
2931
- .sm_color_matrix > * > :nth-child(6) {
2932
- grid-area: 30 / 16 / span 8 / span 8;
2933
- }
2934
-
2935
- .sm_color_matrix > * > :nth-child(7) {
2936
- grid-area: 4 / 20 / span 8 / span 8;
2937
- }
2938
-
2939
- .sm_color_matrix > * > :nth-child(8) {
2940
- grid-area: 17 / 26 / span 8 / span 8;
2941
- }
2942
-
2943
- .sm_color_matrix > * > :nth-child(9) {
2944
- grid-area: 22 / 2 / span 8 / span 8;
2945
- }
2946
-
2947
- .sm_color_matrix > * > :nth-child(10) {
2948
- grid-area: 28 / 11 / span 2 / span 2;
2949
- }
2950
-
2951
- .sm_color_matrix > * > :nth-child(11) {
2952
- grid-area: 9 / 31 / span 6 / span 6;
2953
- }
2954
-
2955
- .sm_color_matrix > * > :nth-child(11) {
2956
- grid-area: 26 / 30 / span 9 / span 9;
2957
- }
2958
-
2959
- .sm_color_matrix > * > :nth-child(12) {
2960
- grid-area: 17 / 7 / span 4 / span 4;
2961
- }
2962
-
2963
- .sm_color_matrix > * > :nth-child(13) {
2964
- grid-area: 19 / 36 / span 6 / span 6;
2965
- }
2966
-
2967
- .sm_color_matrix > * > :nth-child(14) {
2968
- grid-area: 12 / 18 / span 2 / span 2;
2969
- }
2970
-
2971
- .sm_color_matrix > * > :nth-child(n+15) {
2972
- display: none;
2973
- }
2974
-
2975
- .sm-tabs {
2976
- display: -webkit-box;
2977
- display: -ms-flexbox;
2978
- display: flex;
2979
- -webkit-box-pack: justify;
2980
- -ms-flex-pack: justify;
2981
- justify-content: space-between;
2982
- padding: 0 16px;
2983
- text-align: center;
2984
- border-bottom: 1px solid #DFE8EF;
2985
- }
2986
-
2987
- .sm-tabs__item {
2988
- padding: 12px 0;
2989
- margin-bottom: -1px;
2990
- -ms-flex-preferred-size: 31%;
2991
- flex-basis: 31%;
2992
- font-size: 14px;
2993
- color: #416B7E;
2994
- opacity: 0.7;
2995
- border-bottom: 3px solid transparent;
2996
- cursor: pointer;
2997
- -webkit-transition: all 0.2s ease;
2998
- transition: all 0.2s ease;
2999
- }
3000
-
3001
- .sm-tabs__item:not(.sm-tabs__item--active):hover {
3002
- color: #2A3B44;
3003
- border-bottom-color: #E2E4E7;
3004
- opacity: 1;
3005
- }
3006
-
3007
- .sm-tabs__item--active {
3008
- color: #2A3B44;
3009
- border-bottom-color: #57ABD5;
3010
- opacity: 1;
3011
- }
3012
-
3013
- [id="sub-accordion-section-sm_color_palettes_section"] {
3014
- display: -webkit-box !important;
3015
- display: -ms-flexbox !important;
3016
- display: flex !important;
3017
- -webkit-box-orient: vertical;
3018
- -webkit-box-direction: normal;
3019
- -ms-flex-direction: column;
3020
- flex-direction: column;
3021
- padding: 12px 0 0 !important;
3022
- overflow: hidden;
3023
- }
3024
-
3025
- [id="sub-accordion-section-sm_color_palettes_section"] #customize-control-sm_color_palette_control {
3026
- -ms-flex-negative: 0;
3027
- flex-shrink: 0;
3028
- -webkit-box-flex: 1;
3029
- -ms-flex-positive: 1;
3030
- flex-grow: 1;
3031
- overflow-y: scroll;
3032
- margin-bottom: 0;
3033
- padding-top: 12px;
3034
- }
3035
-
3036
- [id="sub-accordion-section-sm_color_palettes_section"] > * {
3037
- -webkit-box-flex: 0;
3038
- -ms-flex-positive: 0;
3039
- flex-grow: 0;
3040
- padding: 0 12px;
3041
- }
3042
-
3043
- [id="sub-accordion-section-sm_color_palettes_section"] [id="customize-control-sm_current_color_palette_control"] ~ * {
3044
- display: none !important;
3045
- }
3046
-
3047
- [id="sub-accordion-section-sm_color_palettes_section"] [id="customize-control-sm_palettes_description_control"] span,
3048
- [id="sub-accordion-section-sm_color_palettes_section"] [id="customize-control-sm_filters_description_control"] span,
3049
- [id="sub-accordion-section-sm_color_palettes_section"] [id="customize-control-sm_customize_description_control"] span {
3050
- margin: 0;
3051
- }
3052
-
3053
- [id="sub-accordion-section-sm_color_palettes_section"].sm-view-palettes [id="customize-control-sm_palettes_description_control"],
3054
- [id="sub-accordion-section-sm_color_palettes_section"].sm-view-palettes [id="customize-control-sm_color_palette_control"] {
3055
- display: block !important;
3056
- }
3057
-
3058
- [id="sub-accordion-section-sm_color_palettes_section"].sm-view-filters [id="customize-control-sm_filters_description_control"],
3059
- [id="sub-accordion-section-sm_color_palettes_section"].sm-view-filters [id="customize-control-sm_palette_filter_control"] {
3060
- display: block !important;
3061
- }
3062
-
3063
- [id="sub-accordion-section-sm_color_palettes_section"].sm-view-customize [id="customize-control-sm_customize_description_control"],
3064
- [id="sub-accordion-section-sm_color_palettes_section"].sm-view-customize [id="customize-control-sm_coloration_level_control"],
3065
- [id="sub-accordion-section-sm_color_palettes_section"].sm-view-customize [id="customize-control-sm_color_diversity_control"],
3066
- [id="sub-accordion-section-sm_color_palettes_section"].sm-view-customize [id="customize-control-sm_shuffle_colors_control"],
3067
- [id="sub-accordion-section-sm_color_palettes_section"].sm-view-customize [id="customize-control-sm_dark_mode_control"] {
3068
- display: block !important;
3069
- }
3070
-
3071
- [id="sub-accordion-section-sm_color_palettes_section"] [id="customize-control-sm_spacing_bottom_control"][id] {
3072
- display: block !important;
3073
- min-height: 24px;
3074
- -webkit-box-flex: 1;
3075
- -ms-flex-positive: 1;
3076
- flex-grow: 1;
3077
- }
3078
-
3079
- [id="customize-control-sm_color_palette_control"] .customize-control-title, [id="customize-control-sm_color_palette_control"] .separator.label,
3080
- [id="customize-control-sm_color_palette_control"] .customize-control-description {
3081
- display: none;
3082
- }
3083
-
3084
- .customize-control-radio[class][id="customize-control-sm_palette_filter_control"] > .customize-inside-control-row:not(:only-of-type) {
3085
- display: block;
3086
- width: auto;
3087
- }
3088
-
3089
- .color[class*="sm_color"][class*="_connected"], .color[class*="sm_dark"][class*="_connected"], .color[class*="sm_light"][class*="_connected"] {
3090
- display: none;
3091
- }
3092
-
3093
- .c-color-palette__colors {
3094
- position: relative;
3095
- }
3096
-
3097
- .c-color-palette canvas, .c-color-palette svg {
3098
- max-width: 100%;
3099
- height: auto;
3100
- }
3101
-
3102
- .c-color-palette__fields {
3103
- position: absolute;
3104
- top: 100%;
3105
- left: 0;
3106
- right: 0;
3107
- z-index: 100;
3108
- }
3109
-
3110
- [id="sub-accordion-section-sm_color_palettes_section"] > .customize-section-description-container {
3111
- margin-bottom: 0;
3112
- border-bottom: 1px solid #DFE8EF;
3113
- }
3114
-
3115
- .sm-palette-filter .colors {
3116
- width: auto;
3117
- height: auto;
3118
- padding: 10px 10px;
3119
- border-radius: 999em;
3120
- }
3121
-
3122
- .sm-palette-filter .picker:after {
3123
- -webkit-box-shadow: inset 0 0 3px 0 rgba(0, 0, 0, 0.2);
3124
- box-shadow: inset 0 0 3px 0 rgba(0, 0, 0, 0.2);
3125
- }
3126
-
3127
- .sm-palette-filter > label {
3128
- position: relative;
3129
- display: block;
3130
- margin: 0 0 10px;
3131
- }
3132
-
3133
- .sm-palette-filter > label:hover .filter-label {
3134
- opacity: 1;
3135
- }
3136
-
3137
- .sm-palette-filter > input {
3138
- display: none;
3139
- }
3140
-
3141
- .sm-palette-filter .filter-label {
3142
- position: absolute;
3143
- top: 0;
3144
- left: 0;
3145
- z-index: 10;
3146
- width: 100%;
3147
- height: 100%;
3148
- display: -webkit-box;
3149
- display: -ms-flexbox;
3150
- display: flex;
3151
- -webkit-box-align: center;
3152
- -ms-flex-align: center;
3153
- align-items: center;
3154
- -webkit-box-pack: center;
3155
- -ms-flex-pack: center;
3156
- justify-content: center;
3157
- opacity: 0;
3158
- -webkit-transition: opacity .2s ease-out;
3159
- transition: opacity .2s ease-out;
3160
- }
3161
-
3162
- .sm-palette-filter .filter-label span {
3163
- position: relative;
3164
- z-index: 20;
3165
- }
3166
-
3167
- .sm-palette-filter .filter-label:after {
3168
- content: "";
3169
- display: block;
3170
- position: absolute;
3171
- top: 0;
3172
- left: 0;
3173
- z-index: 10;
3174
- width: 100%;
3175
- height: 100%;
3176
- background-color: #ffffff;
3177
- -webkit-box-shadow: #d6e0e5 0 0 0 1px;
3178
- box-shadow: #d6e0e5 0 0 0 1px;
3179
- border-radius: 999em;
3180
- }
3181
-
3182
- .sm-palette-filter > input:checked + label .filter-label:after {
3183
- background-color: #f7f9fa;
3184
- -webkit-box-shadow: none;
3185
- box-shadow: none;
3186
- }
3187
-
3188
- .sm-palette-filter > input:checked + label .colors {
3189
- background-color: #f7f9fa;
3190
- -webkit-box-shadow: #57ABD5 0 0 0 2px;
3191
- box-shadow: #57ABD5 0 0 0 2px;
3192
- }
3193
-
3194
- .customize-control-sm_palette_filter .customize-control-title, .customize-control-sm_palette_filter .separator.label {
3195
- display: none;
3196
- }
3197
-
3198
- #customize-control-sm_font_palette_control ~ .customize-control {
3199
- display: none !important;
3200
- }
3201
-
3202
- .pix_customizer_setting .font_palette[class][class] .customize-inside-control-row {
3203
- height: auto;
3204
- padding-top: 52%;
3205
- background-color: white;
3206
- border-radius: 6px;
3207
- overflow: hidden;
3208
- }
3209
-
3210
- .pix_customizer_setting .font_palette[class][class] .customize-inside-control-row:before {
3211
- border: 1px solid #DFE8EF;
3212
- border-radius: 6px;
3213
- }
3214
-
3215
- .pix_customizer_setting .font_palette[class][class] .customize-inside-control-row:before, .pix_customizer_setting .font_palette[class][class] .customize-inside-control-row:hover:before {
3216
- -webkit-box-shadow: 0 1px 0 0 #B8DAEB;
3217
- box-shadow: 0 1px 0 0 #B8DAEB;
3218
- }
3219
-
3220
- .pix_customizer_setting .font_palette[class][class] .customize-inside-control-row input {
3221
- display: none;
3222
- }
3223
-
3224
- .pix_customizer_setting .font_palette[class][class] .customize-inside-control-row label {
3225
- border-radius: 6px;
3226
- left: 0;
3227
- }
3228
-
3229
- .pix_customizer_setting .font_palette[class][class] .customize-inside-control-row input + label {
3230
- border: 2px solid transparent;
3231
- }
3232
-
3233
- .pix_customizer_setting .font_palette[class][class] .customize-inside-control-row input:checked + label {
3234
- border-color: #57ABD5;
3235
- }
3236
-
3237
- .pix_customizer_setting .font_palette[class][class] .customize-inside-control-row .label__inner {
3238
- display: none;
3239
- }
3240
-
3241
- #customize-theme-controls .control-panel-content:not(.control-panel-nav_menus) .control-section:nth-child(2),
3242
- #customize-theme-controls .control-panel-nav_menus .control-section-nav_menu,
3243
- #customize-theme-controls .control-section-nav_menu_locations .accordion-section-title {
3244
- border-top: 0;
3245
- }
1
+ .sm-radio-group{position:relative;border-radius:999em;overflow:hidden;height:2.428em;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;color:rgba(65,107,126,0.7);font-size:14px;-webkit-font-smoothing:antialiased;font-weight:600;line-height:1.142em}.sm-radio-group>*{-webkit-box-flex:1;-ms-flex:1 1 0px;flex:1 1 0}.sm-radio-group:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border:0.142em solid #57abd5;border-radius:999em;pointer-events:none}.sm-radio-group input[type="radio"]{display:none}.sm-radio-group input[type="radio"]:checked+label{background-color:#57abd5;color:#fff}.sm-radio-group input[type="radio"]:checked+label:before{content:"";display:inline-block;color:inherit;position:relative;top:.285em;margin-right:.45em;height:.8em;width:.55em;border-right:2px solid;border-bottom:2px solid;-webkit-transform:translateY(-50%) rotate(45deg);transform:translateY(-50%) rotate(45deg)}.sm-radio-group label{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:relative;cursor:pointer;-webkit-transition:all .25s ease;transition:all .25s ease;color:inherit}.sm-radio-group label:hover{color:#416b7e}.sm-radio-group label:nth-of-type(2){border-left:2px solid #57abd5;border-right:2px solid #57abd5}[id="customize-control-sm_coloration_level_control"] .sm-radio-group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}[id="customize-control-sm_coloration_level_control"] .sm-radio-group>*{-webkit-box-flex:0;-ms-flex:0 0 33.33%;flex:0 0 33.33%}[id="customize-control-sm_coloration_level_control"] .sm-radio-group input[type="radio"]:last-of-type:checked+label{background:-webkit-gradient(linear, left top, right top, from(#3DAAE0), to(#D557BE));background:linear-gradient(90deg, #3DAAE0 0%, #D557BE 100%)}[id="customize-control-sm_coloration_level_control"] .sm-radio-group input[type="radio"]:nth-of-type(1):checked ~ label:last-of-type,[id="customize-control-sm_coloration_level_control"] .sm-radio-group input[type="radio"]:nth-of-type(2):checked ~ label:last-of-type{margin-right:-33.33%}[id="customize-control-sm_coloration_level_control"] .sm-radio-group label:nth-of-type(1){-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}[id="customize-control-sm_coloration_level_control"] .sm-radio-group label:nth-of-type(2){-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3;border-left:2px solid #57abd5;border-right:2px solid #57abd5}[id="customize-control-sm_coloration_level_control"] .sm-radio-group label:nth-of-type(3){-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}[id="customize-control-sm_coloration_level_control"] .sm-radio-group label:nth-of-type(4){-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;border-left:2px solid #57abd5}[id="sub-accordion-section-sm_color_palettes_section"].sm-view-customize li.customize-control-sm_switch{display:-webkit-box !important;display:-ms-flexbox !important;display:flex !important;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding-top:42px;padding-bottom:42px}[id="sub-accordion-section-sm_color_palettes_section"].sm-view-customize li.customize-control-sm_switch .customize-control-title,[id="sub-accordion-section-sm_color_palettes_section"].sm-view-customize li.customize-control-sm_switch .separator.label{display:inline-block}.sm-switch{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;overflow:hidden;position:relative;height:2.428em;max-width:5.5em;border-radius:999em;color:#fff;font-size:14px;-webkit-font-smoothing:antialiased;font-weight:600;line-height:1.142em;z-index:10}.sm-switch input[type="radio"]{display:none}.sm-switch input[type="radio"]+label{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%}.sm-switch input[type="radio"]+label,.sm-switch input[type="radio"]+label:after{-webkit-transition:all 0.2s ease-out;transition:all 0.2s ease-out}.sm-switch input[type="radio"]:checked+label{pointer-events:none}.sm-switch input[type="radio"]:nth-of-type(1)+label{padding-left:1.214em}.sm-switch input[type="radio"]:nth-of-type(1)+label:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background-color:#57abd5;z-index:-1}.sm-switch input[type="radio"]:nth-of-type(1):not(:checked)+label{-webkit-transform:translateX(-100%) translateX(2.125em);transform:translateX(-100%) translateX(2.125em)}.sm-switch input[type="radio"]:nth-of-type(1):not(:checked)+label:after{background:#ccc;-webkit-transform:translateX(100%) translateX(-2.125em);transform:translateX(100%) translateX(-2.125em)}.sm-switch input[type="radio"]:nth-of-type(1):not(:checked)+label ~ label{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.sm-switch input[type="radio"]:nth-of-type(1):checked+label ~ label{-webkit-transform:translateX(-2.4em);transform:translateX(-2.4em)}.sm-switch input[type="radio"]:nth-of-type(1):checked+label ~ label:before{-webkit-transform:translateX(-100%) translateX(2.125em);transform:translateX(-100%) translateX(2.125em)}.sm-switch input[type="radio"]:nth-of-type(2)+label{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;padding-right:1em}.sm-switch input[type="radio"]:nth-of-type(2)+label:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0}.sm-switch input[type="radio"]:nth-of-type(2)+label:after{content:"";display:block;height:2.142em;width:2.142em;margin-right:auto;margin-left:0.125em;border-radius:50%;background-color:#fff;-webkit-box-shadow:1px 2px 2px 0 rgba(23,21,21,0.15);box-shadow:1px 2px 2px 0 rgba(23,21,21,0.15);pointer-events:none}.wp-full-overlay-sidebar *,.wp-full-overlay-sidebar *:before,.wp-full-overlay-sidebar *:after{-webkit-box-sizing:border-box;box-sizing:border-box}.iris-picker,.iris-picker *{-webkit-box-sizing:content-box;box-sizing:content-box}.wp-full-overlay-sidebar-content .accordion-section-content{overflow:visible}.control-section:not(.control-section-themes) .customize-control{padding:0;width:100%;min-height:initial}#customize-header-actions #customize-save-button-wrapper{margin-top:7px}.wp-full-overlay-footer .devices button{float:left;border-radius:0}.customize-controls-close{width:48px;height:44px;color:#7da9c3;background:#ffffff;border-top:none;border-right-color:#e0e8ef}.customize-controls-close:focus,.customize-controls-close:hover{background:#f5fcff}.customize-controls-close:before{top:0px}#customize-controls .customize-info{border-bottom-color:#e0e8ef}.customize-panel-back,.customize-section-back{height:74px;color:#7da9c3;border-right-color:#e0e8ef}.customize-panel-back:hover,.customize-panel-back:focus,.customize-section-back:hover,.customize-section-back:focus{border-left-color:#f5fcff;background:#f5fcff}#customize-theme-controls .theme *{-webkit-box-sizing:content-box;box-sizing:content-box}#customize-theme-controls .accordion-section-content{padding:17px}#customize-theme-controls .customize-section-title{margin-top:-17px;margin-right:-17px}#customize-theme-controls #accordion-section-add_menu{border-bottom:none}#customize-theme-controls #accordion-section-add_menu .add-menu-toggle{float:none}#customize-theme-controls .customize-pane-child.open{height:100%}#customize-controls .description{font-size:12px;font-weight:300;font-style:normal;line-height:1.6;color:#4d7b90;text-indent:0}.customize-control-description{margin-top:6px}.customize-control{margin-bottom:24px}#accordion-section-themes+.control-section{border-top:none}#customize-controls .panel-meta.customize-info .accordion-section-title{border-top:none;height:74px}.button-controls:after{content:" ";display:table;clear:both}.wp-core-ui .button:not(.theme-details):not(.collapse-sidebar):not(.wp-color-result),.wp-core-ui .button-primary,.wp-core-ui .button-secondary{width:auto;padding-left:15px;padding-right:15px;font-weight:400;color:#F5FCFF;text-shadow:none;border:none;background:#AED2E5;-webkit-box-shadow:0px 2px 0px 0px #8DBED7;box-shadow:0px 2px 0px 0px #8DBED7;border-radius:4px}.wp-core-ui .button:not(.theme-details):not(.collapse-sidebar):not(.wp-color-result):hover,.wp-core-ui .button-primary:hover,.wp-core-ui .button-secondary:hover{color:white;text-shadow:none;background:#98C6DD;-webkit-box-shadow:0px 2px 0px 0px #74A7C2;box-shadow:0px 2px 0px 0px #74A7C2}.wp-core-ui #customize-header-actions .button-primary{background:#73C5EE;-webkit-box-shadow:0px 2px 0px 0px #57ABD5;box-shadow:0px 2px 0px 0px #57ABD5}.wp-core-ui #customize-header-actions .button-primary:hover{background:#58B0DD;-webkit-box-shadow:0px 2px 0px 0px #3F8AAF;box-shadow:0px 2px 0px 0px #3F8AAF}.wp-core-ui #customize-header-actions .button-primary.has-next-sibling{border-right:1px solid #57ABD5}.wp-core-ui #customize-header-actions .button-primary:disabled{color:white !important;background:#AED2E5 !important;opacity:0.7;-webkit-box-shadow:0px 2px 0px 0px #8db5ca !important;box-shadow:0px 2px 0px 0px #8db5ca !important}.wp-core-ui #customize-header-actions .button-primary:disabled.has-next-sibling{border-right:none}.wp-core-ui .reset_section,.wp-core-ui .reset_panel{width:100%;height:4em;display:block;margin:0px 0 25px}.wp-core-ui .reset_panel{margin-top:10px}.separator.label{display:block;font-size:14px;line-height:24px;font-weight:500}.customize-control-title,.separator.label{color:#2A3B44}.separator.section:before,.separator.sub-section:before{content:"";position:absolute;top:0;bottom:0;left:-18px;right:-18px;z-index:-1}.separator.label{font-weight:500}.separator.large{margin-top:12px;font-size:16px;color:#39474D}.separator.section{position:relative;padding:14px 0;margin-bottom:0;background:none;border:none}.separator.section[id*="layout"]{margin-top:0}.separator.section[id*="layout"]:before{border:none}.separator.section:before{border:1px solid #e0e8ef;background-color:#ffffff;-webkit-box-shadow:0px 1px 0px 0px #DFE8EF;box-shadow:0px 1px 0px 0px #DFE8EF}.separator.sub-section{position:relative;padding:12px 0}.separator.sub-section:before{border-top:1px solid #e0e8ef;border-bottom:1px solid #e0e8ef;background-color:#f6fbff}.separator.sub-section+span{margin-top:20px;font-style:normal}.section-navigation-wrapper{position:relative;height:43px;margin:-15px -12px 0 -12px;margin-right:-17px;margin-left:-17px}.section-navigation{display:-webkit-box;display:-ms-flexbox;display:flex;margin-top:-1px;clear:both;border-top:1px solid #e0e8ef}.section-navigation a{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;display:block;padding:12px 0;color:#3b484e;background-color:#ffffff;border-bottom:1px solid #e0e8ef;border-right:1px solid #e0e8ef;text-align:center;text-decoration:none;-webkit-transition:background-color .15s ease-in-out;transition:background-color .15s ease-in-out}.section-navigation a:last-child{border-right:0}#customize-controls .customize-info.is-sticky.is-sticky,#customize-controls .customize-section-title.is-sticky.is-sticky{top:40px}#customize-controls .customize-info.is-in-view.is-in-view,#customize-controls .customize-section-title.is-in-view.is-in-view{-webkit-box-shadow:none;box-shadow:none}#customize-controls .has-nav .customize-info,#customize-controls .has-nav .customize-section-title{margin-right:-12px}#customize-controls .customize-section-title.customize-section-title{border-bottom:0}.customize-section-description-container.section-meta.has-nav{margin-bottom:0}.font-options__wrapper{position:relative}.font-options__wrapper:after{content:"";position:absolute;top:90%;left:0;right:0;z-index:0;display:block;height:30px}.font-options__head{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.font-options__head.font-options__head{-webkit-appearance:none;text-overflow:ellipsis;white-space:nowrap}.font-options__font-title{margin-right:26px;margin-left:10px;font-size:12px;line-height:20px;font-weight:300;color:#98c6dd;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.font-options__options-list{position:absolute;top:calc(100% + 6px);left:-6px;right:-6px;z-index:2;display:block;padding:10px;border:1px solid #dfe8ef;border-radius:5px;background-color:#ffffff;opacity:0;display:none;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.font-options__options-list:last-child{margin-bottom:0}.font-options__options-list:before,.font-options__options-list:after{content:"";position:absolute;top:-20px;right:25px;height:0;width:0;border:solid transparent;z-index:10}.font-options__options-list:before{border-bottom-color:white;border-width:10px;z-index:11}.font-options__options-list:after{border-bottom-color:rgba(0,0,0,0.075);border-width:12px;top:-24px;right:23px}.customize-control-color .wp-picker-container .wp-picker-open+.wp-picker-input-wrap:after{content:"";position:absolute;bottom:100%;right:12px;border-collapse:separate;width:0;height:0;border-width:0 9px 9px 9px;border-style:solid;border-color:transparent transparent #fff transparent}.font-options__head,.wp-full-overlay-sidebar-content .customize-control input[type=text]:not(#_customize-input-wpcom_custom_css_content_width_control):not(.wp-color-picker),.wp-full-overlay-sidebar-content .customize-control input[type=checkbox],.wp-full-overlay-sidebar-content .customize-control input[type=password],.wp-full-overlay-sidebar-content .customize-control input[type=color],.wp-full-overlay-sidebar-content .customize-control input[type=date],.wp-full-overlay-sidebar-content .customize-control input[type=datetime],.wp-full-overlay-sidebar-content .customize-control input[type=datetime-local],.wp-full-overlay-sidebar-content .customize-control input[type=email],.wp-full-overlay-sidebar-content .customize-control input[type=month],.wp-full-overlay-sidebar-content .customize-control input[type=number],.wp-full-overlay-sidebar-content .customize-control input[type=radio],.wp-full-overlay-sidebar-content .customize-control input[type=tel],.wp-full-overlay-sidebar-content .customize-control input[type=time],.wp-full-overlay-sidebar-content .customize-control input[type=url],.wp-full-overlay-sidebar-content .customize-control input[type=week],.wp-full-overlay-sidebar-content .customize-control input[type=search],.wp-full-overlay-sidebar-content .customize-control select,.wp-full-overlay-sidebar-content .customize-control textarea,.wp-full-overlay-sidebar-content .customize-control input.range-value[type="number"],ul.font-options__options-list .select2-container .select2-selection--single,#customize-theme-controls .select2-container .select2-selection--multiple{width:100%;height:44px;padding:10px 14px;background:#FFFFFF;border:2px solid #B8DAEB;border-radius:4px;font-size:14px;line-height:1.5;color:#416B7E;outline:0}.font-options__head:focus,.wp-full-overlay-sidebar-content .customize-control input:focus[type=text]:not(#_customize-input-wpcom_custom_css_content_width_control):not(.wp-color-picker),.wp-full-overlay-sidebar-content .customize-control input:focus[type=checkbox],.wp-full-overlay-sidebar-content .customize-control input:focus[type=password],.wp-full-overlay-sidebar-content .customize-control input:focus[type=color],.wp-full-overlay-sidebar-content .customize-control input:focus[type=date],.wp-full-overlay-sidebar-content .customize-control input:focus[type=datetime],.wp-full-overlay-sidebar-content .customize-control input:focus[type=datetime-local],.wp-full-overlay-sidebar-content .customize-control input:focus[type=email],.wp-full-overlay-sidebar-content .customize-control input:focus[type=month],.wp-full-overlay-sidebar-content .customize-control input:focus[type=number],.wp-full-overlay-sidebar-content .customize-control input:focus[type=radio],.wp-full-overlay-sidebar-content .customize-control input:focus[type=tel],.wp-full-overlay-sidebar-content .customize-control input:focus[type=time],.wp-full-overlay-sidebar-content .customize-control input:focus[type=url],.wp-full-overlay-sidebar-content .customize-control input:focus[type=week],.wp-full-overlay-sidebar-content .customize-control input:focus[type=search],.wp-full-overlay-sidebar-content .customize-control select:focus,.wp-full-overlay-sidebar-content .customize-control textarea:focus,.wp-full-overlay-sidebar-content .customize-control input.range-value:focus[type="number"],ul.font-options__options-list .select2-container .select2-selection--single:focus,#customize-theme-controls .select2-container .select2-selection--multiple:focus{border-color:#73C5EE;-webkit-box-shadow:none;box-shadow:none}.font-options__head,.wp-full-overlay-sidebar-content .customize-control select,ul.font-options__options-list .select2-container .select2-selection--single,#customize-theme-controls .select2-container .select2-selection--multiple{width:100%;-webkit-appearance:button;-moz-appearance:none;font-weight:600;background:white url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjE1cHgiIGhlaWdodD0iOXB4IiB2aWV3Qm94PSIwIDAgMTUgOSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJDdXN0b21pZnktQ29weS0yIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMjU2LjAwMDAwMCwgLTM4Ni4wMDAwMDApIiBmaWxsPSIjOThDNkRFIj4KICAgICAgICAgICAgPGcgaWQ9IkhlYWRlciIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIxLjAwMDAwMCwgNDcuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0iQ29udGVudCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAuMDAwMDAwLCA3NS4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iVGl0bGUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI2LjAwMDAwMCwgMjE5LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iRmllbGQtLS1TZWxlY3QtQ29weSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iU2VsZWN0IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwMDAwMCwgMjcuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTI1NC40ODEyLDE4IEwyNTYsMTkuNTE0IEwyNDguNSwyNyBMMjQxLDE5LjUxNCBMMjQyLjUxODgsMTggTDI0OC41LDIzLjk2NzIgTDI1NC40ODEyLDE4IFoiIGlkPSJQYWdlLTEiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+) no-repeat;background-position:right 16px top 16px}.font-options__head[multiple],.wp-full-overlay-sidebar-content .customize-control select[multiple],ul.font-options__options-list .select2-container .select2-selection--single[multiple],#customize-theme-controls .select2-container .select2-selection--multiple[multiple]{background:white}.wp-full-overlay-sidebar-content .customize-control input[type=text],.wp-full-overlay-sidebar-content .customize-control textarea{font-size:13px}.wp-full-overlay-sidebar-content .customize-control textarea{height:auto}.wp-full-overlay-sidebar-content .customize-control input[type=checkbox],.wp-full-overlay-sidebar-content .customize-control input[type=radio]{width:22px;height:22px}.wp-full-overlay-sidebar-content .customize-control input[type=checkbox]:checked,.wp-full-overlay-sidebar-content .customize-control input[type=radio]:checked{background:#73C5EE;border-color:#5AB9E8}.wp-full-overlay-sidebar-content .customize-control input[type=checkbox]:checked:before,.wp-full-overlay-sidebar-content .customize-control input[type=radio]:checked:before{color:white;margin:-1px 0 0 -2px}.wp-full-overlay-sidebar-content .customize-control .awesome_preset input[type=radio]:checked{background:transparent}.wp-full-overlay-sidebar-content .customize-control.customize-control-checkbox:not(#customize-control-jetpack_css_mode_control) label:not(:only-of-type),.wp-full-overlay-sidebar-content .customize-control.customize-control-checkbox:not(#customize-control-jetpack_css_mode_control)>.customize-inside-control-row:not(:only-of-type),.wp-full-overlay-sidebar-content .customize-control.customize-control-radio label:not(:only-of-type),.wp-full-overlay-sidebar-content .customize-control.customize-control-radio>.customize-inside-control-row:not(:only-of-type){margin-left:30px;padding-top:0;padding-bottom:0;display:inline-block;width:calc(49% - 30px);text-indent:-6px}.wp-full-overlay-sidebar-content .customize-control.customize-control-checkbox:not(#customize-control-jetpack_css_mode_control) label,.wp-full-overlay-sidebar-content .customize-control.customize-control-radio label{color:#416B7E}[id*="divider"]+.wp-full-overlay-sidebar-content .customize-control.customize-control-checkbox:not(#customize-control-jetpack_css_mode_control),[id*="divider"]+.wp-full-overlay-sidebar-content .customize-control.customize-control-radio{margin-top:0}.wp-full-overlay-sidebar-content .customize-control input[type=radio]{border-radius:50%}.wp-full-overlay-sidebar-content .customize-control input[type=radio]:checked:before{content:none}.customize-control-html+.wp-full-overlay-sidebar-content .customize-control.customize-control-checkbox{margin-top:-24px}.wp-full-overlay-sidebar-content .customize-control.customize-control-radio label,.wp-full-overlay-sidebar-content .customize-control.customize-control-radio .customize-inside-control-row{margin-top:12px}.wp-full-overlay-sidebar-content .customize-control.customize-control-radio#customize-control-changeset_status .customize-inside-control-row{margin-top:0;text-indent:0}.wp-full-overlay-sidebar-content .customize-control input[type="range"]{width:65%}.wp-full-overlay-sidebar-content .customize-control input[type="range"]{position:relative;-webkit-appearance:none;width:calc(100% - 55px);height:22px;overflow:hidden;outline:none;background:none}.wp-full-overlay-sidebar-content .customize-control input[type="range"]:before{content:" ";position:absolute;top:8px;left:0;height:6px;width:100%;background:#DFE8EF;-webkit-box-shadow:inset 0px 1px 3px 0px rgba(0,0,0,0.3);box-shadow:inset 0px 1px 3px 0px rgba(0,0,0,0.3);border-radius:10px}.wp-full-overlay-sidebar-content .customize-control input[type="range"]::-webkit-slider-thumb{-webkit-appearance:none;width:22px;height:22px;background:#27ae60;position:relative;z-index:3;background:#FFFFFF;border:2px solid #B8DAEB;border-radius:4px}.wp-full-overlay-sidebar-content .customize-control input[type="range"]::-webkit-slider-thumb:before{content:"..";position:absolute;left:5px;top:-5px;color:#B8DAEB;font-size:1em;letter-spacing:1px}.wp-full-overlay-sidebar-content .customize-control input[type="range"]::-webkit-slider-thumb:after{content:" ";width:calc(100% - 55px);height:6px;position:absolute;z-index:1;right:20px;top:6px;background:#73C5EE}.wp-full-overlay-sidebar-content .customize-control input[type="number"].range-value{min-width:40px;max-width:80px;width:auto;height:30px;top:-5px;float:right;padding:4px 0px 5px 0px;margin-left:10px;font-size:13px;line-height:1;text-align:center}.wp-full-overlay-sidebar-content .customize-control input[type=number]::-webkit-inner-spin-button,.wp-full-overlay-sidebar-content .customize-control input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.customize-control-color{display:block}.customize-control-color .customize-control-title,.customize-control-color .separator.label{float:left}.customize-control-color .wp-picker-container{position:relative;float:right;top:-3px}.customize-control-color .wp-picker-container .wp-picker-holder{position:relative}.customize-control-color .wp-picker-container .wp-color-result,.customize-control-color .wp-picker-container .wp-color-result.button{top:0;height:30px;width:40px;margin:0;padding:0;border-radius:4px;background:#2ECC71;border:2px solid #B8DAEB;-webkit-box-shadow:none;box-shadow:none}.customize-control-color .wp-picker-container .wp-color-result:after,.customize-control-color .wp-picker-container .wp-color-result .wp-color-result-text,.customize-control-color .wp-picker-container .wp-color-result.button:after,.customize-control-color .wp-picker-container .wp-color-result.button .wp-color-result-text{display:none}.customize-control-color .wp-picker-container .iris-picker{position:absolute;top:40px;right:0;z-index:1000;width:275px !important;border-top:none;border-color:#DFDFDE;border-radius:0 0 3px 3px;border:none;background:white}.customize-control-color .wp-picker-container .iris-picker,.customize-control-color .wp-picker-container .iris-picker *{-webkit-box-sizing:content-box;box-sizing:content-box}.customize-control-color .wp-picker-container .iris-picker .iris-square{width:215px !important;height:173px !important;margin-right:0}.customize-control-color .wp-picker-container .iris-picker .iris-strip{float:right;-webkit-box-shadow:rgba(0,0,0,0.4) 0 1px 1px inset;box-shadow:rgba(0,0,0,0.4) 0 1px 1px inset}.customize-control-color .wp-picker-container .iris-picker .iris-strip .ui-slider-handle{border-color:#aaa !important;opacity:1;-webkit-box-shadow:none;box-shadow:none}.customize-control-color .wp-picker-container .iris-picker .iris-palette{width:24px !important;height:24px !important;border-radius:50px;-webkit-box-shadow:rgba(0,0,0,0.4) 0 1px 1px inset;box-shadow:rgba(0,0,0,0.4) 0 1px 1px inset}.customize-control-color .wp-picker-container .wp-picker-open+.wp-picker-input-wrap{position:absolute;z-index:1000;top:35px;right:0;width:275px;padding:9px 12px;background:white;border:none;border-radius:3px 3px 0 0}.customize-control-color .wp-picker-container .wp-picker-open+.wp-picker-input-wrap input.wp-color-picker{float:left;width:100px;font-size:13px;text-align:left;margin:0;padding:6px 12px;height:auto}.customize-control-color .wp-picker-container .wp-picker-open+.wp-picker-input-wrap input.button{float:right;padding:4px 12px;height:30px}.customize-control-font:last-child{margin-bottom:150px}#accordion-section-live_css_edit_section .customize-section-title{margin-top:-13px;border-bottom:1px solid #ddd}#accordion-section-live_css_edit_section #css_editor{top:70px;border-top:10px solid white;overflow:visible}#accordion-section-live_css_edit_section #css_editor:before{content:"";width:48px;height:10px;display:block;background:#e8e8e8;top:-10px;position:absolute;z-index:10000000;left:0}#accordion-section-live_css_edit_section .ace_scroller{padding-left:10px}.wp-full-overlay.editor_opened{margin-left:500px}.wp-full-overlay.editor_opened #customize-controls{width:500px}.wp-full-overlay.editor_opened.collapsed #customize-controls{width:300px}.customize-control-media .current,.customize-control-site_icon .current,li#customize-control-site_logo .current{margin-bottom:10px;min-height:44px;background:#F5FCFF;border:2px solid #B8DAEB;border-radius:4px}.customize-control-media .current .container,.customize-control-media .current span,.customize-control-site_icon .current .container,.customize-control-site_icon .current span,li#customize-control-site_logo .current .container,li#customize-control-site_logo .current span{border:none}.customize-control-media .inner,.customize-control-media .current span,.customize-control-site_icon .inner,.customize-control-site_icon .current span,li#customize-control-site_logo .inner,li#customize-control-site_logo .current span{font-size:13px;color:#98C6DD}.customize-control-media .inner,.customize-control-site_icon .inner,li#customize-control-site_logo .inner{line-height:1.4}.customize-control-media .thumbnail-image,.customize-control-site_icon .thumbnail-image,li#customize-control-site_logo .thumbnail-image{padding:14px;text-align:center}.customize-control-media .thumbnail-image img,.customize-control-site_icon .thumbnail-image img,li#customize-control-site_logo .thumbnail-image img{width:auto}.customize-control-media .actions,.customize-control-site_icon .actions,li#customize-control-site_logo .actions{margin-bottom:0}.customize-control-typography select,.customize-control-typography select{margin-bottom:10px}.customize-control-typography .description,.customize-control-typography .description{margin-top:-3px}.customize-control-typography ul li,.customize-control-typography ul li{width:100%;margin:0}.default-preset-button{background-color:#F5F6F6;float:right;padding:1px 8px;border-radius:3px;border:1px solid #CBCBCB;margin-right:4px;font-family:"Open Sans",sans-serif;font-size:13px}.customize-control-preset .description{margin-right:5px;font-style:normal}.customify_preset.radio_buttons .customify_radio_button{border:none;display:inline-block;padding:2px;margin:3px;position:relative;overflow:hidden;height:auto}.customify_preset.radio_buttons .customify_radio_button input[type="radio"]{opacity:0;width:100%;height:100%;position:absolute;z-index:9999}.customify_preset.radio_buttons .customify_radio_button input[type="radio"]:checked+label{background-color:#ebebeb}.customify_preset.radio_buttons .customify_radio_button input[type="radio"]:checked+label:before{content:'>';color:inherit}.customify_preset.radio_buttons .customify_radio_button input[type="radio"]:checked+label:after{content:'<';color:inherit}.customify_preset.radio_buttons .customify_radio_button input[type="radio"]:checked:before{opacity:0}.customify_preset.radio_buttons .customify_radio_button label{position:relative;z-index:999;border-left:4px solid}.customify_preset .awesome_preset{width:45%;position:relative;display:inline-block;text-align:center;color:white;margin-top:5px;margin-bottom:25px;-webkit-transition:all 0.2s;transition:all 0.2s}.customify_preset .awesome_preset:hover{opacity:0.9}.customify_preset .awesome_preset:before{content:'';position:absolute;top:1px;left:1px;right:1px;bottom:1px;border:1px solid #FFF;background:transparent;opacity:.5;border-radius:4px;z-index:5}.customify_preset .awesome_preset .preset-wrap .preset-color{height:128px;border-radius:4px 4px 0 0;padding:17px 0 27px}.customify_preset .awesome_preset .preset-wrap .preset-color .first-font{display:inline-block;width:100%;font-size:55px;line-height:1}.customify_preset .awesome_preset .preset-wrap .preset-color .secondary-font{display:inline-block;width:100%;font-size:20px;line-height:1;margin-top:8px}.customify_preset .awesome_preset .preset-wrap .preset-name{position:relative;font-size:11px;text-transform:UPPERCASE;border-radius:0 0 4px 4px;padding:1px}.customify_preset .awesome_preset .preset-wrap .preset-name:before{content:'';position:absolute;border-color:inherit;border:10px solid;border-left-color:transparent;border-right-color:transparent;border-top:transparent;top:-10px;border-bottom-color:inherit;left:40%}.customify_preset .awesome_preset:nth-child(odd){margin-right:7%}.customify_preset .awesome_preset input[type=radio]{height:100%;width:100%;position:absolute;border:0;-webkit-box-shadow:none;box-shadow:none;color:#006505;background-color:transparent;border-radius:0;margin:0;display:inline-block;top:0;left:0;z-index:10}.customify_preset .awesome_preset input[type=radio]:checked:before{position:absolute;height:25px;width:25px;top:-13px;right:-14px;background:#FFF;z-index:1}.customify_preset .awesome_preset input[type=radio]:checked:after{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0);content:'';position:absolute;width:26px;height:26px;border-radius:50%;top:-5px;right:-5px;z-index:10;background:#73C5EE url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjEzcHgiIGhlaWdodD0iOXB4IiB2aWV3Qm94PSIwIDAgMTMgOSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJDdXN0b21pZnktQ29weSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIxLjAwMDAwMCwgLTQwOC4wMDAwMDApIiBmaWxsPSIjRkZGRkZGIj4KICAgICAgICAgICAgPGcgaWQ9IkhlYWRlciIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIxLjAwMDAwMCwgNDcuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0iQ29udGVudCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAuMDAwMDAwLCA3NS4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iRmllbGQtLS1DaGVja2JveC1Db3B5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyNy4wMDAwMDAsIDI0OS4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICAgICAgPGcgaWQ9IkNoZWNrYm94IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwMDAwMCwgMzAuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTAuMDM4NDk1LDE2IEwxNy4xMTYxMzc1LDguOTIxNDg3NiBMMTUuMTk0NjQ5OCw3IEwxMC4wMzg0OTUsMTIuMTU1MDY3NCBMNi45MjE0ODc2LDkuMDM4OTI5OTcgTDUsMTAuOTYwNDE3NiBMMTAuMDM4NDk1LDE2IFoiIGlkPSJQYWdlLTEiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+) no-repeat;background-position:center center}.customify_radio_image{display:inline-block}.customify_radio_image label{display:block;float:left;margin-right:10px;position:relative}.customify_radio_image label input[type=radio]{position:absolute;top:0;bottom:0;left:0;right:0;width:100%;height:100%;visibility:hidden}.customify_radio_image label input[type=radio] img{cursor:pointer;border:2px solid transparent}.customify_radio_image label input[type=radio]:checked+img{border:3px solid #73C5EE}.customify_ace_editor{display:block;min-height:200px;border:1px solid #ddd}.customize-control-custom_background .hide{display:none}.customize-control-custom_background .upload_button_div{margin:10px 0}.customize-control-custom_background .upload_button_div>*{margin-right:10px}.customize-control-custom_background .preview_screenshot{text-align:center;margin:10px 0}.customize-control-custom_background .preview_screenshot img{border:2px solid #ccc}#customify_import_demo_data_button{width:70%;text-align:center;padding:10px;display:inline-block;height:auto;margin:0 15% 10% 15%}.import_step_note{margin:5px;width:100%;display:inline-block}.import_step_note:before{content:"\1F449"}.import_step_note.success:before{content:"\1F44D"}.import_step_note.failed:before{content:"\274C"}#customize-header-actions{background:#ffffff;border-color:#e0e8ef}.wp-full-overlay-sidebar,.customize-themes-panel,#customize-sidebar-outer-content{background:#F7F9FA;border-right:1px solid #e0e8ef}.outer-section-open #customize-controls .wp-full-overlay-sidebar-content,.attachment-media-view,.media-widget-preview.media_audio,.media-widget-preview.media_image{background:#F7F9FA}#customize-theme-controls #accordion-section-menu_locations{border-bottom:1px solid #e0e8ef}#customize-controls #accordion-section-themes>.accordion-section-title{font-weight:600;border-bottom:1px solid #e0e8ef}#customize-controls #accordion-section-themes>.accordion-section-title:hover{background:#fff}#customize-controls .panel-meta.customize-info{border-bottom-color:#e0e8ef}#customize-theme-controls .control-section .accordion-section-title{font-weight:400;border-top:1px solid #e0e8ef;border-bottom:none}#customize-theme-controls .control-section:last-of-type>.accordion-section-title{border-bottom:1px solid #e0e8ef}#customize-theme-controls .customize-section-title{border-top:1px solid #e0e8ef;border-bottom:1px solid #e0e8ef}#customize-controls .control-section .accordion-section-title:focus,#customize-controls .control-section .accordion-section-title:hover,#customize-controls .control-section.open .accordion-section-title,#customize-controls .control-section:hover>.accordion-section-title{color:#056184;background:#f5fcff;border-left-color:#f5fcff}.wp-customizer .menu-item-edit-active .menu-item-handle,.wp-customizer .section-open .menu-item-settings,.wp-customizer .menu-item-bar .menu-item-handle:hover{border-color:#e0e8ef}.wp-customizer .section-open .menu-item-settings{background:#f5fcff}.wp-customizer .control-section-nav_menu .menu-location-settings{border-top-color:#e0e8ef !important}[data-balloon]{position:relative}[data-balloon]::before{opacity:0;pointer-events:none;-webkit-transition:all .18s ease-out;transition:all .18s ease-out;background:rgba(17,17,17,0.9);border-radius:4px;color:#fff;content:attr(data-balloon);font-size:12px;padding:.5em 1em;position:absolute;white-space:nowrap;z-index:10}[data-balloon]::after{background:no-repeat url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="36px" height="12px"><path fill="rgba(17, 17, 17, 0.9)" transform="rotate(0)" d="M2.658,0.000 C-13.615,0.000 50.938,0.000 34.662,0.000 C28.662,0.000 23.035,12.002 18.660,12.002 C14.285,12.002 8.594,0.000 2.658,0.000 Z"/></svg>');background-size:100% auto;width:18px;height:6px;opacity:0;pointer-events:none;-webkit-transition:all .18s ease-out;transition:all .18s ease-out;content:'';position:absolute;z-index:10}[data-balloon]:hover::before,[data-balloon]:hover::after{opacity:1;pointer-events:auto}[data-balloon][data-balloon-pos="up"]::before{bottom:100%;left:50%;margin-bottom:11px;-webkit-transform:translate3d(-50%, 10px, 0);transform:translate3d(-50%, 10px, 0);-webkit-transform-origin:top;transform-origin:top}[data-balloon][data-balloon-pos="up"]::after{bottom:100%;left:50%;margin-bottom:5px;-webkit-transform:translate3d(-50%, 10px, 0);transform:translate3d(-50%, 10px, 0);-webkit-transform-origin:top;transform-origin:top}[data-balloon][data-balloon-pos="up"]:hover::before{-webkit-transform:translate3d(-50%, 0, 0);transform:translate3d(-50%, 0, 0)}[data-balloon][data-balloon-pos="up"]:hover::after{-webkit-transform:translate3d(-50%, 0, 0);transform:translate3d(-50%, 0, 0)}[data-balloon][data-balloon-pos='down']::before{left:50%;margin-top:11px;top:100%;-webkit-transform:translate3d(-50%, -10px, 0);transform:translate3d(-50%, -10px, 0)}[data-balloon][data-balloon-pos='down']::after{background:no-repeat url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="36px" height="12px"><path fill="rgba(17, 17, 17, 0.9)" transform="rotate(180 18 6)" d="M2.658,0.000 C-13.615,0.000 50.938,0.000 34.662,0.000 C28.662,0.000 23.035,12.002 18.660,12.002 C14.285,12.002 8.594,0.000 2.658,0.000 Z"/></svg>');background-size:100% auto;width:18px;height:6px;left:50%;margin-top:5px;top:100%;-webkit-transform:translate3d(-50%, -10px, 0);transform:translate3d(-50%, -10px, 0)}[data-balloon][data-balloon-pos='down']:hover::before{-webkit-transform:translate3d(-50%, 0, 0);transform:translate3d(-50%, 0, 0)}[data-balloon][data-balloon-pos='down']:hover::after{-webkit-transform:translate3d(-50%, 0, 0);transform:translate3d(-50%, 0, 0)}[data-balloon][data-balloon-pos='left']::before{margin-right:11px;right:100%;top:50%;-webkit-transform:translate3d(10px, -50%, 0);transform:translate3d(10px, -50%, 0)}[data-balloon][data-balloon-pos='left']::after{background:no-repeat url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12px" height="36px"><path fill="rgba(17, 17, 17, 0.9)" transform="rotate(-90 18 18)" d="M2.658,0.000 C-13.615,0.000 50.938,0.000 34.662,0.000 C28.662,0.000 23.035,12.002 18.660,12.002 C14.285,12.002 8.594,0.000 2.658,0.000 Z"/></svg>');background-size:100% auto;width:6px;height:18px;margin-right:5px;right:100%;top:50%;-webkit-transform:translate3d(10px, -50%, 0);transform:translate3d(10px, -50%, 0)}[data-balloon][data-balloon-pos='left']:hover::before{-webkit-transform:translate3d(0, -50%, 0);transform:translate3d(0, -50%, 0)}[data-balloon][data-balloon-pos='left']:hover::after{-webkit-transform:translate3d(0, -50%, 0);transform:translate3d(0, -50%, 0)}[data-balloon][data-balloon-pos='right']::before{left:100%;margin-left:11px;top:50%;-webkit-transform:translate3d(-10px, -50%, 0);transform:translate3d(-10px, -50%, 0)}[data-balloon][data-balloon-pos='right']::after{background:no-repeat url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12px" height="36px"><path fill="rgba(17, 17, 17, 0.9)" transform="rotate(90 6 6)" d="M2.658,0.000 C-13.615,0.000 50.938,0.000 34.662,0.000 C28.662,0.000 23.035,12.002 18.660,12.002 C14.285,12.002 8.594,0.000 2.658,0.000 Z"/></svg>');background-size:100% auto;width:6px;height:18px;left:100%;margin-left:5px;top:50%;-webkit-transform:translate3d(-10px, -50%, 0);transform:translate3d(-10px, -50%, 0)}[data-balloon][data-balloon-pos='right']:hover::before{-webkit-transform:translate3d(0, -50%, 0);transform:translate3d(0, -50%, 0)}[data-balloon][data-balloon-pos='right']:hover::after{-webkit-transform:translate3d(0, -50%, 0);transform:translate3d(0, -50%, 0)}[data-balloon][data-balloon-length='small']::before{white-space:normal;width:80px}[data-balloon][data-balloon-length='medium']::before{white-space:normal;width:150px}[data-balloon][data-balloon-length='large']::before{white-space:normal;width:260px}[data-balloon][data-balloon-length='xlarge']::before{white-space:normal;width:380px}@media screen and (max-width: 768px){[data-balloon][data-balloon-length='xlarge']::before{white-space:normal;width:90vw}}[data-balloon][data-balloon-length='fit']::before{white-space:normal;width:100%}body.modal-open{overflow:hidden}body.modal-open #style-manager-user-feedback-modal .modal{overflow-x:hidden;overflow-y:auto;visibility:visible;opacity:1;-webkit-transform:translate(0, 0);transform:translate(0, 0)}#style-manager-user-feedback-modal{height:100%}#style-manager-user-feedback-modal .modal{position:relative;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;top:0;right:0;bottom:0;left:0;z-index:1050;opacity:0;visibility:hidden;overflow:hidden;outline:0;-webkit-transition:all .3s ease;transition:all .3s ease;-webkit-transform:translate(0, -10%);transform:translate(0, -10%);font-family:'Galano Grotesque Alt', -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-weight:400;font-size:16px;line-height:1.7}#style-manager-user-feedback-modal .modal-dialog{position:relative;width:auto;margin:10px;text-align:left}#style-manager-user-feedback-modal .modal-content{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;background-color:#fff;background-clip:padding-box;border:none;border-radius:4px;-webkit-box-shadow:0 4px 4px 0 rgba(42,54,52,0.1),0 8px 8px 0 rgba(42,54,52,0.1),0 16px 16px 0 rgba(42,54,52,0.1),0 16px 32px 0 rgba(42,54,52,0.1),0 32px 64px 0 rgba(42,54,52,0.1),0 64px 128px 0 rgba(42,54,52,0.1);box-shadow:0 4px 4px 0 rgba(42,54,52,0.1),0 8px 8px 0 rgba(42,54,52,0.1),0 16px 16px 0 rgba(42,54,52,0.1),0 16px 32px 0 rgba(42,54,52,0.1),0 32px 64px 0 rgba(42,54,52,0.1),0 64px 128px 0 rgba(42,54,52,0.1);outline:0}#style-manager-user-feedback-modal .modal-content p{color:#000}#style-manager-user-feedback-modal .modal-content p a{font-weight:500;color:#9660C6;border-bottom:1px solid #9660C6}#style-manager-user-feedback-modal .modal-content>form{margin-bottom:20px}#style-manager-user-feedback-modal .modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000;opacity:0;visibility:hidden;-webkit-transition:all 0.3s ease;transition:all 0.3s ease}.modal-open #style-manager-user-feedback-modal .modal-backdrop{opacity:.8;visibility:visible}#style-manager-user-feedback-modal .modal-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:30px 48px 10px 48px}#style-manager-user-feedback-modal .modal-header .close.button{top:-10px}#style-manager-user-feedback-modal .modal-header .close.icon{opacity:0.5}#style-manager-user-feedback-modal .modal-header .close:hover{opacity:1}#style-manager-user-feedback-modal .modal-title{margin-bottom:10px;line-height:1.5}#style-manager-user-feedback-modal .modal-title.modal-title--small{font-weight:500}#style-manager-user-feedback-modal .modal-body{position:relative;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;padding:30px 30px 0 30px}#style-manager-user-feedback-modal .modal-body.full{padding:0}#style-manager-user-feedback-modal .modal-body.full .box{padding-top:0;padding-bottom:0;margin-top:0}#style-manager-user-feedback-modal .modal-body.full+.modal-footer.full .box{padding-top:18px}#style-manager-user-feedback-modal .modal-footer{padding:30px;text-align:center}#style-manager-user-feedback-modal .modal-footer .box .button:last-child{margin-bottom:0}#style-manager-user-feedback-modal .modal-footer.full{padding:0}#style-manager-user-feedback-modal .modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}#style-manager-user-feedback-modal .modal-state{display:none}#style-manager-user-feedback-modal .modal-state:checked+.modal{opacity:1;visibility:visible}#style-manager-user-feedback-modal .modal-state:checked+.modal .modal__inner{top:0}@media (min-width: 576px){#style-manager-user-feedback-modal .modal-dialog{max-width:655px;margin:30px auto}#style-manager-user-feedback-modal .modal-sm{max-width:300px}}@media (min-width: 576px){#style-manager-user-feedback-modal .modal-lg{max-width:800px}}#style-manager-user-feedback .modal-body .box{position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:20px 0;padding:16px 52px;border-radius:4px}#style-manager-user-feedback .modal-body .box>*{width:100%}#style-manager-user-feedback .modal-body p{font-size:16px;margin-bottom:20px}#style-manager-user-feedback .modal-body textarea{width:100%;margin:0;padding:11px 18px;border:1px solid #dddddd;border-radius:4px;-webkit-box-shadow:none;box-shadow:none;font-family:'Galano Grotesque Alt', -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:26px;color:#473850}#style-manager-user-feedback .modal-title{margin-top:0;margin-bottom:34px;font-family:'Galano Classic', -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-weight:600;font-size:28px;line-height:1.4;text-align:center}#style-manager-user-feedback .button{text-decoration:none;cursor:pointer;-webkit-font-smoothing:antialiased;position:relative;-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-timing-function:cubic-bezier(0, 0, 0.58, 1);transition-timing-function:cubic-bezier(0, 0, 0.58, 1);-webkit-transition-property:background,background-color,color,-webkit-transform,-webkit-box-shadow;transition-property:background,background-color,color,-webkit-transform,-webkit-box-shadow;transition-property:transform,background,background-color,color,box-shadow;transition-property:transform,background,background-color,color,box-shadow,-webkit-transform,-webkit-box-shadow;display:inline-block;padding:15px 50px;border-radius:2px;font-family:"Galano Classic", -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:23px;font-weight:600;text-align:center;background-color:#9660c6;color:#ffffff;border-radius:4px;-webkit-box-shadow:none;box-shadow:none;height:auto;width:100%;margin-top:20px}#style-manager-user-feedback .button:hover{background-color:#9660c6;color:#ffffff;-webkit-transform:scale(1.05) translateY(-3px);transform:scale(1.05) translateY(-3px);-webkit-box-shadow:0 10px 20px -10px rgba(0,0,0,0.7);box-shadow:0 10px 20px -10px rgba(0,0,0,0.7)}#style-manager-user-feedback .second-step{margin-top:18px}#style-manager-user-feedback .thanks-step,#style-manager-user-feedback .error-step{text-align:center}#style-manager-user-feedback .thanks-step .modal-title,#style-manager-user-feedback .error-step .modal-title{margin-bottom:0}#style-manager-user-feedback .thanks-step p:last-child,#style-manager-user-feedback .error-step p:last-child{margin-bottom:10px}.scorecard{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline;-webkit-box-pack:space-evenly;-ms-flex-pack:space-evenly;justify-content:space-evenly;color:#9660C6;font-family:"Galano Classic", -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:18px;font-weight:600;text-align:center}.scorecard>label{font-size:20px}.scorecard>label span{display:block;width:46px;border:2px solid #9660C6;line-height:46px;border-radius:100%;background:#FFF;-webkit-transition:all 0.25s ease;transition:all 0.25s ease}.scorecard>label input[type="radio"]{display:none}.scorecard>label span:hover,.scorecard>label input[type="radio"]:checked ~ span{background:#9660C6;color:#FFF}.font-options__wrapper .font-options__options-list{border-color:#B8DAEB;-webkit-box-shadow:0 10px 20px 0 rgba(0,0,0,0.15);box-shadow:0 10px 20px 0 rgba(0,0,0,0.15)}.font-options__wrapper .font-options__option{margin-bottom:12px}.font-options__wrapper .font-options__option label{display:block;margin-bottom:6px}.font-options__wrapper [type=checkbox]:checked ~ .font-options__options-list{opacity:1;display:block}input.customify_font_tooltip{display:none}ul.font-options__options-list .select2-container{width:100% !important}ul.font-options__options-list .select2-container .select2-selection--single{-webkit-appearance:initial}ul.font-options__options-list .select2-container .select2-selection--single .select2-selection__arrow{display:none}ul.font-options__options-list .select2-container--default .select2-selection--single .select2-selection__rendered{color:inherit;line-height:initial}.select2-container.select2-container--open{z-index:99999999}#customize-theme-controls .select2-container{width:100% !important}#customize-theme-controls .select2-container .select2-selection--multiple{-webkit-appearance:initial;padding:4px 8px 4px;height:auto;background:none}#customize-theme-controls .select2-container .select2-selection--multiple .select2-selection__arrow{display:none}#customize-theme-controls .select2-container .select2-selection--multiple .select2-selection__rendered{padding:0;display:-webkit-box;display:-ms-flexbox;display:flex}#customize-theme-controls .select2-container .select2-selection--multiple .select2-selection__rendered .select2-search--inline{-webkit-box-flex:1;-ms-flex:1;flex:1}#customize-theme-controls .select2-container .select2-selection--multiple .select2-selection__rendered .select2-search--inline .select2-search__field[class]{min-width:100%;border-width:0;margin-top:3px !important}#customize-theme-controls .select2-container .select2-selection--multiple .select2-selection__rendered .select2-selection__choice{padding:3px 7px;margin-right:6px;margin-top:0px;border-color:#e0e8ef;background-color:#f6fbff}#customize-theme-controls .select2-container .select2-search--inline .select2-search__field{height:29px;min-width:9em;margin-top:0}.select2-container--default .select2-results__option[aria-selected=true][class]{background:transparent;opacity:0.3;pointer-events:none}.select2-container .select2-dropdown{border-color:#e0e8ef}#customize-theme-controls .widget-content .accordion-container{margin-left:-10px;margin-right:-10px;margin-top:20px;margin-bottom:10px}#customize-theme-controls .widget-content .accordion-container .accordion-section .accordion-section-content{position:relative;left:0;max-height:0;padding-top:0;padding-bottom:0;overflow:hidden;-webkit-transition:all .4s ease;transition:all .4s ease;color:#416B7E}#customize-theme-controls .widget-content .accordion-container .accordion-section .accordion-section-content p:first-child{margin-top:0}#customize-theme-controls .widget-content .accordion-container .accordion-section .accordion-section-content p:last-child{margin-bottom:0}#customize-theme-controls .widget-content .accordion-container .accordion-section .accordion-section-title{color:#39474D}#customize-theme-controls .widget-content .accordion-container .accordion-section .accordion-section-title:after{content:"\f142";-webkit-transform:rotate(180deg);transform:rotate(180deg)}#customize-theme-controls .widget-content .accordion-container .accordion-section.open{border-bottom:none}#customize-theme-controls .widget-content .accordion-container .accordion-section.open .accordion-section-content{max-height:100%;padding-top:17px;padding-bottom:17px}#customize-theme-controls .widget-content .accordion-container .accordion-section.open .accordion-section-title{border-bottom:1px solid}#customize-theme-controls .widget-content .accordion-container .accordion-section.open .accordion-section-title:after{-webkit-transform:rotate(0deg);transform:rotate(0deg)}#customize-theme-controls .widget-content .accordion-container label.customize-control-title,#customize-theme-controls .widget-content .accordion-container label.separator.label{cursor:default}.widget .widget-content>p input[type=checkbox],.widget .widget-content>p input[type=radio]{margin-bottom:3px;margin-top:3px}.widget .widget-content small{margin-top:5px;display:block}#available-widgets [class*=pixelgrade] .widget .widget-title:before,#available-widgets [class*=featured-posts] .widget .widget-title:before,#available-widgets [class*=categories-image-grid] .widget .widget-title:before{content:"\f538";color:#9660c6}#available-widgets [class*=pixelgrade-featured-posts-slideshow] .widget .widget-title:before{content:"\f233"}#available-widgets [class*=pixelgrade-featured-posts-carousel] .widget .widget-title:before{content:"\f169"}#available-widgets [class*=featured-posts-grid] .widget .widget-title:before{content:"\f180"}#available-widgets [class*=featured-posts-list] .widget .widget-title:before{content:"\f164"}#available-widgets [class*=categories-image-grid] .widget .widget-title:before{content:"\f163"}#available-widgets [class*=pixelgrade-promo-box] .widget .widget-title:before{content:"\f488"}.ui-tooltip{z-index:999999}.wp-customizer .widget-conditional .condition-control:after{content:" ";display:table;clear:both}.wp-customizer .widget-conditional .selection{padding-right:50px;padding-left:28px;padding-bottom:19px;margin-left:0;margin-right:0;margin-bottom:10px;border-bottom:1px solid #cbcfd4}.wp-customizer .widget-conditional .condition:last-child .selection{border:0}.wp-customizer .widget-conditional select{max-width:100%;width:170px}.wp-customizer .widget-conditional .condition-top select{width:130px}.pix_customizer_setting .customize-inside-control-row{position:relative;width:100% !important;margin-left:0 !important;text-indent:0 !important;background-size:cover;background-position:50% 50%;height:64px;border-radius:5px;overflow:hidden}.pix_customizer_setting .customize-inside-control-row:before{content:'';position:absolute;top:0;bottom:0;left:0;right:0;z-index:10;pointer-events:none;-webkit-box-shadow:inset 0 0 3px 0 rgba(0,0,0,0.2);box-shadow:inset 0 0 3px 0 rgba(0,0,0,0.2)}.pix_customizer_setting .customize-inside-control-row:hover:before{-webkit-box-shadow:inset 0 0 3px 0 rgba(0,0,0,0.4);box-shadow:inset 0 0 3px 0 rgba(0,0,0,0.4)}.pix_customizer_setting .customize-inside-control-row:hover .palette__item{-webkit-transform:translateY(0%);transform:translateY(0%)}.pix_customizer_setting .customize-inside-control-row:hover label{left:10px}.pix_customizer_setting .customize-inside-control-row input{opacity:0}.pix_customizer_setting .customize-inside-control-row input:checked+label .preview__letter--checked{display:inline-block;vertical-align:middle}.pix_customizer_setting .customize-inside-control-row input:checked+label .preview__letter{display:none}.pix_customizer_setting .customize-inside-control-row label{position:absolute;display:-webkit-box;display:-ms-flexbox;display:flex;z-index:2;width:100%;height:100%;top:0;left:0;padding:0 10px;margin-top:0 !important;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-transition:all .3s ease;transition:all .3s ease}.pix_customizer_setting .customize-inside-control-row .palette{position:absolute;display:-webkit-box;display:-ms-flexbox;display:flex;top:0;left:0;z-index:1;width:100%;height:100%;-webkit-transition:all .2s ease;transition:all .2s ease}.pix_customizer_setting .customize-inside-control-row .palette__item{-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-transform:translateY(100%);transform:translateY(100%);-webkit-transition:all .3s ease;transition:all .3s ease}.pix_customizer_setting .customize-inside-control-row .palette__item:nth-child(1){-webkit-transition-delay:0s;transition-delay:0s}.pix_customizer_setting .customize-inside-control-row .palette__item:nth-child(2){-webkit-transition-delay:.05s;transition-delay:.05s}.pix_customizer_setting .customize-inside-control-row .palette__item:nth-child(3){-webkit-transition-delay:.1s;transition-delay:.1s}.pix_customizer_setting .customize-inside-control-row .palette__item:nth-child(4){-webkit-transition-delay:.15s;transition-delay:.15s}.pix_customizer_setting .customize-inside-control-row .palette__item:nth-child(5){-webkit-transition-delay:.2s;transition-delay:.2s}.pix_customizer_setting .customize-inside-control-row .palette__item:nth-child(6){-webkit-transition-delay:.25s;transition-delay:.25s}.pix_customizer_setting .customize-inside-control-row .palette__item:nth-child(7){-webkit-transition-delay:.3s;transition-delay:.3s}.pix_customizer_setting .customize-inside-control-row .palette__item:nth-child(8){-webkit-transition-delay:.35s;transition-delay:.35s}.pix_customizer_setting .customize-inside-control-row .palette__item:nth-child(9){-webkit-transition-delay:.4s;transition-delay:.4s}.pix_customizer_setting .customize-inside-control-row .palette__item:nth-child(10){-webkit-transition-delay:.45s;transition-delay:.45s}.pix_customizer_setting .customize-inside-control-row .preview__letter,.pix_customizer_setting .customize-inside-control-row .preview__letter--checked{display:inline-block;padding:3px;border-radius:2px;color:white;margin-right:5px;min-height:26px;min-width:26px;text-align:center;background-position:center center;background-repeat:no-repeat;background-size:15px 15px;font-style:normal;vertical-align:baseline}.pix_customizer_setting .customize-inside-control-row .preview__letter--checked{display:none}[id*="sm_current_color_palette_control"] .customize-inside-control-row .palette__item[class]{-webkit-transform:none;transform:none}[id*="sm_current_color_palette_control"] .variation-control{display:-webkit-box;display:-ms-flexbox;display:flex}.label__inner{color:#000000;background:#F5F6F1;padding:7px 12px 7px 7px;z-index:2;border-radius:3px;-webkit-box-shadow:0 2px 5px rgba(0,0,0,0.15);box-shadow:0 2px 5px rgba(0,0,0,0.15)}.picker{position:relative;top:0;left:50%;width:80%;max-width:3em;margin-top:auto;margin-bottom:auto;border-radius:50%;overflow:hidden;-webkit-transform:translate3d(-50%, 0, 0);transform:translate3d(-50%, 0, 0)}.colors .picker>i{display:block;position:absolute;top:0;right:0;bottom:0;left:0;-webkit-box-shadow:inset 0 0 3px 0 rgba(0,0,0,0.2);box-shadow:inset 0 0 3px 0 rgba(0,0,0,0.2);border-radius:50%;pointer-events:none;z-index:20}.picker:before,.picker:after{content:"";display:block;background:currentColor;border-radius:50%}.picker:before{padding-top:100%}.picker:after{position:absolute;top:0;left:0;width:100%;height:100%}.fill{overflow:hidden}.color:first-child .fill{border-top-left-radius:5px;border-bottom-left-radius:5px}.color:last-child .fill{border-top-right-radius:5px;border-bottom-right-radius:5px}.label{margin-right:auto}#customize-theme-controls [id*="sm_current_color_palette_control"]{display:block;width:auto}#customize-theme-controls [id*="sm_current_color_palette_control"] .color-palette-container{background:white}#customize-theme-controls [id*="sm_current_color_palette_control"] .color-palette-container .description{margin-bottom:15px}#customize-theme-controls [id*="sm_current_color_palette_control"] .description.c-color-palette__notification{padding-top:19px;margin-bottom:0;font-size:inherit;font-weight:bold}.c-color-palette__fields{position:relative}.c-color-palette .iris-picker{position:absolute;top:100%;left:0;z-index:100;margin-top:1em;border:0;-webkit-box-shadow:black 0 3px 12px -4px;box-shadow:black 0 3px 12px -4px}.c-color-palette .iris-picker .iris-square-handle{border-color:transparent;left:-6px;top:-6px}.c-color-palette .iris-picker .iris-square-handle:after{position:absolute;bottom:0;right:0;left:0;top:0;border:2px solid white}.c-color-palette .iris-picker .iris-square-value{-webkit-box-shadow:none !important;box-shadow:none !important}.colors{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;height:3em}.color{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-ms-flex:1 1 0px;flex:1 1 0;overflow:hidden;-webkit-transition:flex-grow 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28), -webkit-box-flex 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);transition:flex-grow 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28), -webkit-box-flex 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);transition:flex-grow 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);transition:flex-grow 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28), -webkit-box-flex 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28), -ms-flex-positive 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28)}.color.hidden{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-webkit-transition:flex-grow 0.3s cubic-bezier(0.6, -1, 0.74, 0.05), -webkit-box-flex 0.3s cubic-bezier(0.6, -1, 0.74, 0.05);transition:flex-grow 0.3s cubic-bezier(0.6, -1, 0.74, 0.05), -webkit-box-flex 0.3s cubic-bezier(0.6, -1, 0.74, 0.05);transition:flex-grow 0.3s cubic-bezier(0.6, -1, 0.74, 0.05);transition:flex-grow 0.3s cubic-bezier(0.6, -1, 0.74, 0.05), -webkit-box-flex 0.3s cubic-bezier(0.6, -1, 0.74, 0.05), -ms-flex-positive 0.3s cubic-bezier(0.6, -1, 0.74, 0.05)}.color.hidden .picker{opacity:0;-webkit-transition:opacity .2s ease-out;transition:opacity .2s ease-out}.color .picker{-webkit-transition:opacity .3s ease-in-out, border-color .3s ease-in-out;transition:opacity .3s ease-in-out, border-color .3s ease-in-out;cursor:pointer}.color.inactive .picker{opacity:0.2}.color.inactive .picker:hover{opacity:1}.color.js-no-picker .picker{cursor:not-allowed}input.c-color-palette__input[class]{margin-top:1em}#customize-control-sm_toggle_advanced_settings_control{margin-bottom:0;opacity:0}#customize-control-sm_toggle_advanced_settings_control button{width:100%}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,100%{-webkit-animation-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1);animation-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1)}0%{opacity:0;-webkit-transform:scale3d(0.3, 0.3, 0.3);transform:scale3d(0.3, 0.3, 0.3)}20%{-webkit-transform:scale3d(1.1, 1.1, 1.1);transform:scale3d(1.1, 1.1, 1.1)}40%{-webkit-transform:scale3d(0.9, 0.9, 0.9);transform:scale3d(0.9, 0.9, 0.9)}60%{opacity:1;-webkit-transform:scale3d(1.03, 1.03, 1.03);transform:scale3d(1.03, 1.03, 1.03)}80%{-webkit-transform:scale3d(0.97, 0.97, 0.97);transform:scale3d(0.97, 0.97, 0.97)}100%{opacity:1;-webkit-transform:scale3d(1, 1, 1);transform:scale3d(1, 1, 1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,100%{-webkit-animation-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1);animation-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1)}0%{opacity:0;-webkit-transform:scale3d(0.3, 0.3, 0.3);transform:scale3d(0.3, 0.3, 0.3)}20%{-webkit-transform:scale3d(1.1, 1.1, 1.1);transform:scale3d(1.1, 1.1, 1.1)}40%{-webkit-transform:scale3d(0.9, 0.9, 0.9);transform:scale3d(0.9, 0.9, 0.9)}60%{opacity:1;-webkit-transform:scale3d(1.03, 1.03, 1.03);transform:scale3d(1.03, 1.03, 1.03)}80%{-webkit-transform:scale3d(0.97, 0.97, 0.97);transform:scale3d(0.97, 0.97, 0.97)}100%{opacity:1;-webkit-transform:scale3d(1, 1, 1);transform:scale3d(1, 1, 1)}}#customize-theme-controls #sub-accordion-panel-style_manager_panel .customize-panel-description,#customize-theme-controls #sub-accordion-panel-theme_options_panel .customize-panel-description{display:block}#customize-theme-controls li#accordion-panel-style_manager_panel h3.accordion-section-title:before{position:absolute;content:"";color:#aed2e5;font-family:dashicons;margin-right:28px;font-size:17px;top:8px;right:10px;z-index:1;-webkit-font-smoothing:antialiased}#customize-theme-controls li#accordion-panel-style_manager_panel h3.accordion-section-title:before{font-size:18px;color:#f8bc30}#customize-theme-controls li#accordion-section-sm_color_palettes_section h3.accordion-section-title:before{position:absolute;content:"";color:#aed2e5;font-family:dashicons;margin-right:28px;font-size:17px;top:8px;right:10px;z-index:1;-webkit-font-smoothing:antialiased}#customize-theme-controls li#accordion-section-sm_color_palettes_section h3.accordion-section-title{border-top:none}#customize-theme-controls li#accordion-section-sm_font_palettes_section h3.accordion-section-title:before{position:absolute;content:"";color:#aed2e5;font-family:dashicons;margin-right:28px;font-size:17px;top:8px;right:10px;z-index:1;-webkit-font-smoothing:antialiased}#customize-theme-controls li#accordion-section-sm_color_palettes_section h3.accordion-section-title:before,#customize-theme-controls li#accordion-section-sm_font_palettes_section h3.accordion-section-title:before{padding:3px;margin-right:5px;margin-top:-2px}#customize-theme-controls li#accordion-panel-theme_options_panel h3.accordion-section-title:before{position:absolute;content:"";color:#aed2e5;font-family:dashicons;margin-right:28px;font-size:17px;top:8px;right:10px;z-index:1;-webkit-font-smoothing:antialiased}#customize-theme-controls li#accordion-panel-theme_options_panel h3.accordion-section-title{border-bottom:1px solid #ddd;border-left:none;border-right:none;margin:0 0 15px 0}.color .disc{display:block;overflow:hidden;position:absolute;top:0;right:0;bottom:0;left:0;z-index:15;pointer-events:none;opacity:0;-webkit-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.color .disc:after{content:"";-webkit-filter:blur(6px) saturate(0.7) brightness(1.1);filter:blur(6px) saturate(0.7) brightness(1.1);display:block;width:200%;height:200%;padding-top:100%;position:absolute;top:-50%;left:-50%;-webkit-transform:scale(1);transform:scale(1);background-image:linear-gradient(330deg, transparent 50%, #ff8100 0),linear-gradient(300deg, transparent 50%, #ff5800 0),linear-gradient(270deg, transparent 50%, #c92323 0),linear-gradient(240deg, transparent 50%, #cc42a2 0),linear-gradient(210deg, transparent 50%, #9f49ac 0),linear-gradient(180deg, transparent 50%, #306cd3 0),linear-gradient(150deg, transparent 50%, #179067 0),linear-gradient(120deg, transparent 50%, #0eb5d6 0),linear-gradient(90deg, transparent 50%, #50b517 0),linear-gradient(60deg, transparent 50%, #ede604 0),linear-gradient(30deg, transparent 50%, #fc0 0),linear-gradient(0deg, transparent 50%, #feac00 0);background-clip:content-box,content-box,content-box,content-box,content-box,content-box,padding-box,padding-box,padding-box,padding-box,padding-box,padding-box}.color.altered .disc{opacity:1}.customize-control-color .wp-picker-container .iris-picker .iris-palette-container{display:-webkit-box;display:-ms-flexbox;display:flex;width:215px}.customize-control-color .wp-picker-container .iris-picker .iris-palette{width:auto !important;height:auto !important;-webkit-box-flex:1;-ms-flex:1 1 0px;flex:1 1 0;float:none}.customize-control-color .wp-picker-container .iris-picker .iris-palette:after{content:"";display:block;padding-top:100%}.c-color-palette{padding:30px 20px 18px}[id="customize-control-sm_current_color_palette_control"][id]{margin-bottom:0}[id="customize-control-sm_current_color_palette_control"][id] ~ .customize-control{background-color:#FFFFFF;margin-bottom:0;padding:24px 20px 0}#customize-control-sm_dark_color_primary_slider_control,#customize-control-sm_dark_color_secondary_slider_control,#customize-control-sm_dark_color_tertiary_slider_control{display:none !important}.sm_color_matrix{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-left:-15px}.sm_color_matrix>*{display:grid;grid-auto-rows:2px;grid-auto-columns:2px;-webkit-box-flex:0;-ms-flex:0 0 33.33333%;flex:0 0 33.33333%;padding-top:15px;padding-left:15px}.sm_color_matrix>*>*{background-color:currentColor;border-radius:50%;border:1px solid #ccc;-webkit-animation-duration:0.75s;animation-duration:0.75s;-webkit-animation-name:bounceIn;animation-name:bounceIn}.sm_color_matrix>*>:nth-child(1){grid-area:16 / 12 / span 12 / span 12}.sm_color_matrix>*>:nth-child(2){grid-area:26 / 24 / span 4 / span 4}.sm_color_matrix>*>:nth-child(3){grid-area:13 / 24 / span 4 / span 4}.sm_color_matrix>*>:nth-child(4){grid-area:8 / 8 / span 8 / span 8}.sm_color_matrix>*>:nth-child(5){grid-area:32 / 8 / span 4 / span 4}.sm_color_matrix>*>:nth-child(6){grid-area:30 / 16 / span 8 / span 8}.sm_color_matrix>*>:nth-child(7){grid-area:4 / 20 / span 8 / span 8}.sm_color_matrix>*>:nth-child(8){grid-area:17 / 26 / span 8 / span 8}.sm_color_matrix>*>:nth-child(9){grid-area:22 / 2 / span 8 / span 8}.sm_color_matrix>*>:nth-child(10){grid-area:28 / 11 / span 2 / span 2}.sm_color_matrix>*>:nth-child(11){grid-area:9 / 31 / span 6 / span 6}.sm_color_matrix>*>:nth-child(11){grid-area:26 / 30 / span 9 / span 9}.sm_color_matrix>*>:nth-child(12){grid-area:17 / 7 / span 4 / span 4}.sm_color_matrix>*>:nth-child(13){grid-area:19 / 36 / span 6 / span 6}.sm_color_matrix>*>:nth-child(14){grid-area:12 / 18 / span 2 / span 2}.sm_color_matrix>*>:nth-child(n+15){display:none}.sm-tabs{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0 16px;text-align:center;border-bottom:1px solid #DFE8EF}.sm-tabs__item{padding:12px 0;margin-bottom:-1px;-ms-flex-preferred-size:31%;flex-basis:31%;font-size:14px;color:#416B7E;opacity:0.7;border-bottom:3px solid transparent;cursor:pointer;-webkit-transition:all 0.2s ease;transition:all 0.2s ease}.sm-tabs__item:not(.sm-tabs__item--active):hover{color:#2A3B44;border-bottom-color:#E2E4E7;opacity:1}.sm-tabs__item--active{color:#2A3B44;border-bottom-color:#57ABD5;opacity:1}[id="sub-accordion-section-sm_color_palettes_section"]{display:-webkit-box !important;display:-ms-flexbox !important;display:flex !important;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding:12px 0 0 !important;overflow:hidden}[id="sub-accordion-section-sm_color_palettes_section"] #customize-control-sm_color_palette_control{-ms-flex-negative:0;flex-shrink:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;overflow-y:scroll;margin-bottom:0;padding-top:12px}[id="sub-accordion-section-sm_color_palettes_section"]>*{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;padding:0 12px}[id="sub-accordion-section-sm_color_palettes_section"] [id="customize-control-sm_current_color_palette_control"] ~ *{display:none !important}[id="sub-accordion-section-sm_color_palettes_section"] [id="customize-control-sm_palettes_description_control"] span,[id="sub-accordion-section-sm_color_palettes_section"] [id="customize-control-sm_filters_description_control"] span,[id="sub-accordion-section-sm_color_palettes_section"] [id="customize-control-sm_customize_description_control"] span{margin:0}[id="sub-accordion-section-sm_color_palettes_section"].sm-view-palettes [id="customize-control-sm_palettes_description_control"],[id="sub-accordion-section-sm_color_palettes_section"].sm-view-palettes [id="customize-control-sm_color_palette_control"]{display:block !important}[id="sub-accordion-section-sm_color_palettes_section"].sm-view-filters [id="customize-control-sm_filters_description_control"],[id="sub-accordion-section-sm_color_palettes_section"].sm-view-filters [id="customize-control-sm_palette_filter_control"]{display:block !important}[id="sub-accordion-section-sm_color_palettes_section"].sm-view-customize [id="customize-control-sm_customize_description_control"],[id="sub-accordion-section-sm_color_palettes_section"].sm-view-customize [id="customize-control-sm_coloration_level_control"],[id="sub-accordion-section-sm_color_palettes_section"].sm-view-customize [id="customize-control-sm_color_diversity_control"],[id="sub-accordion-section-sm_color_palettes_section"].sm-view-customize [id="customize-control-sm_shuffle_colors_control"],[id="sub-accordion-section-sm_color_palettes_section"].sm-view-customize [id="customize-control-sm_dark_mode_control"]{display:block !important}[id="sub-accordion-section-sm_color_palettes_section"] [id="customize-control-sm_spacing_bottom_control"][id]{display:block !important;min-height:24px;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}[id="customize-control-sm_color_palette_control"] .customize-control-title,[id="customize-control-sm_color_palette_control"] .separator.label,[id="customize-control-sm_color_palette_control"] .customize-control-description{display:none}.customize-control-radio[class][id="customize-control-sm_palette_filter_control"]>.customize-inside-control-row:not(:only-of-type){display:block;width:auto}.color[class*="sm_color"][class*="_connected"],.color[class*="sm_dark"][class*="_connected"],.color[class*="sm_light"][class*="_connected"]{display:none}.c-color-palette__colors{position:relative}.c-color-palette canvas,.c-color-palette svg{max-width:100%;height:auto}.c-color-palette__fields{position:absolute;top:100%;left:0;right:0;z-index:100}[id="sub-accordion-section-sm_color_palettes_section"]>.customize-section-description-container{margin-bottom:0;border-bottom:1px solid #DFE8EF}.sm-palette-filter .colors{width:auto;height:auto;padding:10px 10px;border-radius:999em}.sm-palette-filter .picker:after{-webkit-box-shadow:inset 0 0 3px 0 rgba(0,0,0,0.2);box-shadow:inset 0 0 3px 0 rgba(0,0,0,0.2)}.sm-palette-filter>label{position:relative;display:block;margin:0 0 10px}.sm-palette-filter>label:hover .filter-label{opacity:1}.sm-palette-filter>input{display:none}.sm-palette-filter .filter-label{position:absolute;top:0;left:0;z-index:10;width:100%;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;opacity:0;-webkit-transition:opacity .2s ease-out;transition:opacity .2s ease-out}.sm-palette-filter .filter-label span{position:relative;z-index:20}.sm-palette-filter .filter-label:after{content:"";display:block;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%;background-color:#ffffff;-webkit-box-shadow:#d6e0e5 0 0 0 1px;box-shadow:#d6e0e5 0 0 0 1px;border-radius:999em}.sm-palette-filter>input:checked+label .filter-label:after{background-color:#f7f9fa;-webkit-box-shadow:none;box-shadow:none}.sm-palette-filter>input:checked+label .colors{background-color:#f7f9fa;-webkit-box-shadow:#57ABD5 0 0 0 2px;box-shadow:#57ABD5 0 0 0 2px}.customize-control-sm_palette_filter .customize-control-title,.customize-control-sm_palette_filter .separator.label{display:none}#customize-control-sm_font_palette_control ~ .customize-control{display:none !important}.pix_customizer_setting .font_palette[class][class] .customize-inside-control-row{height:auto;padding-top:52%;background-color:white;border-radius:6px;overflow:hidden}.pix_customizer_setting .font_palette[class][class] .customize-inside-control-row:before{border:1px solid #DFE8EF;border-radius:6px}.pix_customizer_setting .font_palette[class][class] .customize-inside-control-row:before,.pix_customizer_setting .font_palette[class][class] .customize-inside-control-row:hover:before{-webkit-box-shadow:0 1px 0 0 #B8DAEB;box-shadow:0 1px 0 0 #B8DAEB}.pix_customizer_setting .font_palette[class][class] .customize-inside-control-row input{display:none}.pix_customizer_setting .font_palette[class][class] .customize-inside-control-row label{border-radius:6px;left:0}.pix_customizer_setting .font_palette[class][class] .customize-inside-control-row input+label{border:2px solid transparent}.pix_customizer_setting .font_palette[class][class] .customize-inside-control-row input:checked+label{border-color:#57ABD5}.pix_customizer_setting .font_palette[class][class] .customize-inside-control-row .label__inner{display:none}#customize-theme-controls .control-panel-content:not(.control-panel-nav_menus) .control-section:nth-child(2),#customize-theme-controls .control-panel-nav_menus .control-section-nav_menu,#customize-theme-controls .control-section-nav_menu_locations .accordion-section-title{border-top:0}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
customify.php CHANGED
@@ -1,19 +1,19 @@
1
  <?php
2
- /*
3
- Plugin Name: Customify
4
- Plugin URI: https://wordpress.org/plugins/customify/
5
- Description: A Theme Customizer Booster to easily customize Fonts, Colors, and other options for your site.
6
- Version: 2.4.0
7
- Author: Pixelgrade
8
- Author URI: https://pixelgrade.com
9
- Author Email: contact@pixelgrade.com
10
- Text Domain: customify
11
- License: GPL-2.0+
12
- License URI: http://www.gnu.org/licenses/gpl-2.0.txt
13
- Domain Path: /languages/
14
- Requires at least: 4.9.9
15
- Tested up to: 5.2.2
16
- */
17
 
18
  // If this file is called directly, abort.
19
  if ( ! defined( 'ABSPATH' ) ) {
@@ -32,7 +32,7 @@ require_once 'includes/extras.php';
32
  function PixCustomifyPlugin() {
33
  require_once plugin_dir_path( __FILE__ ) . 'includes/class-pixcustomify.php';
34
 
35
- return PixCustomifyPlugin::instance( __FILE__, '2.4.0' );
36
  }
37
 
38
  // Now get the party started
1
  <?php
2
+ /**
3
+ * Plugin Name: Customify
4
+ * Plugin URI: https://wordpress.org/plugins/customify/
5
+ * Description: A Theme Customizer Booster to easily and consistently customize Fonts, Colors, and other options for your site.
6
+ * Version: 2.5.0
7
+ * Author: Pixelgrade
8
+ * Author URI: https://pixelgrade.com
9
+ * Author Email: contact@pixelgrade.com
10
+ * Text Domain: customify
11
+ * License: GPL-2.0+
12
+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
13
+ * Domain Path: /languages/
14
+ * Requires at least: 4.9.9
15
+ * Tested up to: 5.2.2
16
+ */
17
 
18
  // If this file is called directly, abort.
19
  if ( ! defined( 'ABSPATH' ) ) {
32
  function PixCustomifyPlugin() {
33
  require_once plugin_dir_path( __FILE__ ) . 'includes/class-pixcustomify.php';
34
 
35
+ return PixCustomifyPlugin::instance( __FILE__, '2.5.0' );
36
  }
37
 
38
  // Now get the party started
features/class-Font_Selector.php CHANGED
@@ -176,6 +176,10 @@ class Customify_Font_Selector {
176
  $value['type'] = 'google';
177
  }
178
 
 
 
 
 
179
  if ( isset( $this->theme_fonts[ $value['font_family'] ] ) ) {
180
 
181
  // $value['type'] = 'theme_font';
@@ -258,7 +262,7 @@ class Customify_Font_Selector {
258
  continue;
259
  }
260
 
261
- $output .= $font_output . PHP_EOL;
262
 
263
  // If we are in a Customizer context we will output CSS rules grouped so we can target them.
264
  // In the frontend we want a whole bulk.
@@ -298,7 +302,7 @@ class Customify_Font_Selector {
298
  continue;
299
  }
300
 
301
- $output .= $font_output . PHP_EOL;
302
  }
303
 
304
  return $output;
@@ -356,7 +360,7 @@ class Customify_Font_Selector {
356
  $output = call_user_func( $font['callback'], $value, $font );
357
  echo $output;
358
  } elseif ( isset( $font['selector'] ) ) {
359
- echo $font['selector'] . " {" . PHP_EOL;
360
 
361
  // First handle the case where we have the font-family in the selected variant (usually this means a custom font from our Fonto plugin)
362
  if ( ! empty( $selected_variant ) && is_array( $selected_variant ) && ! empty( $selected_variant['font-family'] ) ) {
@@ -644,8 +648,8 @@ if (typeof WebFont !== 'undefined') {
644
  */
645
  public function __clone() {
646
 
647
- _doing_it_wrong( __FUNCTION__,esc_html( __( 'Cheatin&#8217; huh?' ) ), '' );
648
- } // End __clone ()
649
 
650
  /**
651
  * Unserializing instances of this class is forbidden.
@@ -654,6 +658,6 @@ if (typeof WebFont !== 'undefined') {
654
  */
655
  public function __wakeup() {
656
 
657
- _doing_it_wrong( __FUNCTION__, esc_html( __( 'Cheatin&#8217; huh?' ) ), '' );
658
- } // End __wakeup ()
659
  }
176
  $value['type'] = 'google';
177
  }
178
 
179
+ if ( ! isset( $value['font_family'] ) ) {
180
+ continue;
181
+ }
182
+
183
  if ( isset( $this->theme_fonts[ $value['font_family'] ] ) ) {
184
 
185
  // $value['type'] = 'theme_font';
262
  continue;
263
  }
264
 
265
+ $output .= $font_output . "\n";
266
 
267
  // If we are in a Customizer context we will output CSS rules grouped so we can target them.
268
  // In the frontend we want a whole bulk.
302
  continue;
303
  }
304
 
305
+ $output .= $font_output . "\n";
306
  }
307
 
308
  return $output;
360
  $output = call_user_func( $font['callback'], $value, $font );
361
  echo $output;
362
  } elseif ( isset( $font['selector'] ) ) {
363
+ echo $font['selector'] . " {" . "\n";
364
 
365
  // First handle the case where we have the font-family in the selected variant (usually this means a custom font from our Fonto plugin)
366
  if ( ! empty( $selected_variant ) && is_array( $selected_variant ) && ! empty( $selected_variant['font-family'] ) ) {
648
  */
649
  public function __clone() {
650
 
651
+ _doing_it_wrong( __FUNCTION__,esc_html__( 'You should not do that!', 'customify' ), '' );
652
+ }
653
 
654
  /**
655
  * Unserializing instances of this class is forbidden.
658
  */
659
  public function __wakeup() {
660
 
661
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'You should not do that!', 'customify' ), '' );
662
+ }
663
  }
features/customizer/controls/class-Pix_Customize_Preset_Control.php CHANGED
@@ -205,7 +205,7 @@ class Pix_Customize_Preset_Control extends Pix_Customize_Control {
205
  <div class="palette">
206
  <?php foreach ( $choice_config['options'] as $color_setting_id => $color_value ) {
207
  $field_config = PixCustomifyPlugin()->get_option_details( $color_setting_id );
208
- echo '<div class="palette__item ' . esc_attr( $color_setting_id ) . '" style="background: ' . esc_attr( $color_value ) . '"></div>' . PHP_EOL;
209
  } ?>
210
  </div>
211
  </span>
@@ -273,7 +273,7 @@ class Pix_Customize_Preset_Control extends Pix_Customize_Control {
273
  <div class="palette">
274
  <?php foreach ( $choice_config['fonts_logic'] as $font_name => $font_value ) {
275
  if ( ! empty( $customizer_config['sections']['style_manager_section']['options'][$font_name]['connected_fields'] ) ) {
276
- echo '<div class="palette__item ' . esc_attr( $font_name ) . '" style=""></div>' . PHP_EOL;
277
  }
278
  } ?>
279
  </div>
205
  <div class="palette">
206
  <?php foreach ( $choice_config['options'] as $color_setting_id => $color_value ) {
207
  $field_config = PixCustomifyPlugin()->get_option_details( $color_setting_id );
208
+ echo '<div class="palette__item ' . esc_attr( $color_setting_id ) . '" style="background: ' . esc_attr( $color_value ) . '"></div>' . "\n";
209
  } ?>
210
  </div>
211
  </span>
273
  <div class="palette">
274
  <?php foreach ( $choice_config['fonts_logic'] as $font_name => $font_value ) {
275
  if ( ! empty( $customizer_config['sections']['style_manager_section']['options'][$font_name]['connected_fields'] ) ) {
276
+ echo '<div class="palette__item ' . esc_attr( $font_name ) . '" style=""></div>' . "\n";
277
  }
278
  } ?>
279
  </div>
features/customizer/controls/class-Pix_Customize_SM_palette_filter_control.php CHANGED
@@ -49,9 +49,9 @@ class Pix_Customize_SM_palette_filter_Control extends Pix_Customize_Control {
49
  $current_palette = '<div class="colors">';
50
  foreach ( $master_color_controls_ids as $setting_id ) {
51
  $current_palette .=
52
- '<div class="color ' . $setting_id . '" data-setting="' . $setting_id . '">' . PHP_EOL .
53
- '<div class="picker"></div>' . PHP_EOL .
54
- '</div>' . PHP_EOL;
55
  }
56
  $current_palette .= '</div>';
57
 
49
  $current_palette = '<div class="colors">';
50
  foreach ( $master_color_controls_ids as $setting_id ) {
51
  $current_palette .=
52
+ '<div class="color ' . $setting_id . '" data-setting="' . $setting_id . '">' . "\n" .
53
+ '<div class="picker"></div>' . "\n" .
54
+ '</div>' . "\n";
55
  }
56
  $current_palette .= '</div>';
57
 
includes/class-customify-color-palettes.php CHANGED
@@ -152,7 +152,7 @@ class Customify_Color_Palettes {
152
  }
153
 
154
  // The section might be already defined, thus we merge, not replace the entire section config.
155
- $config['sections']['style_manager_section'] = array_replace_recursive( $config['sections']['style_manager_section'], array(
156
  'options' => array(
157
  'sm_color_palette' => array(
158
  'type' => 'preset',
@@ -496,23 +496,21 @@ class Customify_Color_Palettes {
496
  $master_color_controls_ids = $this->get_all_master_color_controls_ids( $config['sections']['style_manager_section']['options'] );
497
 
498
  $current_palette .= '<div class="colors">';
 
499
  foreach ( $master_color_controls_ids as $setting_id ) {
500
  $current_palette .=
501
- '<div class="color ' . $setting_id . '" data-setting="' . $setting_id . '">' . PHP_EOL .
502
- '<div class="picker">' .
503
- '<div class="disc"></div>'.
504
- '<i></i>'.
505
- '</div>' . PHP_EOL .
506
- '</div>' . PHP_EOL;
507
  }
508
- $current_palette .= '</div>';
509
 
510
  $current_palette .= '<div class="c-color-palette__fields">';
511
- $current_palette .= '<div class="c-color-palette__notification description hidden js-altered-notification">' . PHP_EOL .
512
- wp_kses( __( 'One or more colors connected to your color palette have been modified. By changing or altering the current palette you will lose changes made prior to this action.', 'customify' ), array( 'em' => array(), 'b' => array(), 'strong' => array(), 'i' => array() ) ) . PHP_EOL .
513
- '</div>' . PHP_EOL;
514
  foreach ( $master_color_controls_ids as $setting_id ) {
515
- $current_palette .= '<input id="current-palette-' . $setting_id . '" class="c-color-palette__input ' . $setting_id . '" type="text" value="' . get_option( $setting_id ) . '">';
516
  }
517
  $current_palette .= '</div>';
518
 
@@ -522,44 +520,48 @@ class Customify_Color_Palettes {
522
  'type' => 'html',
523
  'setting_id' => 'sm_current_color_palette',
524
  'html' =>
525
- '<div class="c-color-palette">' . PHP_EOL .
526
- '<div class="c-color-palette__colors">' . $current_palette . '</div>' . PHP_EOL .
527
- '<div class="sm_color_matrix"></div>' . PHP_EOL .
528
- '</div>' . PHP_EOL .
529
- '<div class="sm-tabs">' . PHP_EOL .
530
- '<div class="sm-tabs__item" data-target="palettes">' . esc_html__( 'Palettes', 'customify' ) . '</div>' . PHP_EOL .
531
- '<div class="sm-tabs__item" data-target="filters">' . esc_html__( 'Filters', 'customify' ) . '</div>' . PHP_EOL .
532
- '<div class="sm-tabs__item" data-target="customize">' . esc_html__( 'Customize', 'customify' ) . '</div>' . PHP_EOL .
533
  '</div>',
534
  ),
535
  'sm_palettes_description' => array(
536
  'type' => 'html',
537
  'setting_id' => 'sm_palettes_description',
538
- 'html' => '<span class="description customize-control-description">' . wp_kses( __( 'Choose your <em>base color palette</em> and go deeper with the <em>Filters</em> and <em>Customize</em> tabs. Make it shine, mate!', 'customify' ), array(
 
539
  'em' => array(),
540
  'b' => array(),
541
  'strong' => array(),
542
  'i' => array(),
543
- ) ) . '</span>' . PHP_EOL,
544
  ),
545
  'sm_filters_description' => array(
546
  'type' => 'html',
547
  'setting_id' => 'sm_filters_description',
548
- 'html' => '<span class="description customize-control-description">' . wp_kses( __( 'Adjust the <i>colors properties</i> by using the filters. Keep the look fresh and engaging!', 'customify' ), array(
 
549
  'em' => array(),
550
  'b' => array(),
551
  'strong' => array(),
552
  'i' => array(),
553
- ) ) . '</span>' . PHP_EOL,
554
  ),
555
  'sm_customize_description' => array(
556
  'type' => 'html',
557
  'setting_id' => 'sm_customize_description',
558
- 'html' => '<span class="description customize-control-description">' . wp_kses( __( 'Adjust how the colors are used on your site with ease. Modify their usage level to craft a playful design!', 'customify' ), array( 'em' => array(),
559
- 'b' => array(),
560
- 'strong' => array(),
561
- 'i' => array(),
562
- ) ) . '</span>' . PHP_EOL,
 
 
563
  ),
564
  'sm_coloration_level' => array(
565
  'type' => 'sm_radio',
@@ -1097,7 +1099,7 @@ class Customify_Color_Palettes {
1097
  if ( ! empty( $option_details['type'] )
1098
  && 'hidden' === $option_details['type']
1099
  && 0 === strpos( $option_id, 'sm_' )
1100
- && '__final' === substr( $option_id, - strlen( '__final' ) ) ) {
1101
  $control_ids[] = $option_id;
1102
  }
1103
  }
@@ -1154,8 +1156,8 @@ class Customify_Color_Palettes {
1154
  */
1155
  public function __clone() {
1156
 
1157
- _doing_it_wrong( __FUNCTION__,esc_html( __( 'Cheatin&#8217; huh?' ) ), null );
1158
- } // End __clone ()
1159
 
1160
  /**
1161
  * Unserializing instances of this class is forbidden.
@@ -1164,8 +1166,8 @@ class Customify_Color_Palettes {
1164
  */
1165
  public function __wakeup() {
1166
 
1167
- _doing_it_wrong( __FUNCTION__, esc_html( __( 'Cheatin&#8217; huh?' ) ), null );
1168
- } // End __wakeup ()
1169
  }
1170
 
1171
  endif;
152
  }
153
 
154
  // The section might be already defined, thus we merge, not replace the entire section config.
155
+ $config['sections']['style_manager_section'] = Customify_Array::array_merge_recursive_distinct( $config['sections']['style_manager_section'], array(
156
  'options' => array(
157
  'sm_color_palette' => array(
158
  'type' => 'preset',
496
  $master_color_controls_ids = $this->get_all_master_color_controls_ids( $config['sections']['style_manager_section']['options'] );
497
 
498
  $current_palette .= '<div class="colors">';
499
+ $color_classes = apply_filters( 'customify_style_manager_color_palettes_colors_classes', array( 'color' ) );
500
  foreach ( $master_color_controls_ids as $setting_id ) {
501
  $current_palette .=
502
+ '<div class="' . esc_attr( join( ' ', $color_classes ) ) . ' ' . esc_attr( $setting_id ) . '" data-setting="' . esc_attr( $setting_id ) . '">' . "\n" .
503
+ '<div class="picker"><div class="disc"></div><i></i></div>' . "\n" .
504
+ '</div>' . "\n";
 
 
 
505
  }
506
+ $current_palette .= '</div><!-- .colors -->' . "\n";
507
 
508
  $current_palette .= '<div class="c-color-palette__fields">';
509
+ $current_palette .= '<div class="c-color-palette__notification description hidden js-altered-notification">' . "\n" .
510
+ wp_kses( __( 'One or more colors connected to your color palette have been modified. By changing or altering the current palette you will lose changes made prior to this action.', 'customify' ), array( 'em' => array(), 'b' => array(), 'strong' => array(), 'i' => array() ) ) . "\n" .
511
+ '</div>' . "\n";
512
  foreach ( $master_color_controls_ids as $setting_id ) {
513
+ $current_palette .= '<input id="current-palette-' . esc_attr( $setting_id ) . '" class="c-color-palette__input ' . esc_attr( $setting_id ) . '" type="text" value="' . get_option( $setting_id ) . '">';
514
  }
515
  $current_palette .= '</div>';
516
 
520
  'type' => 'html',
521
  'setting_id' => 'sm_current_color_palette',
522
  'html' =>
523
+ '<div class="c-color-palette">' . "\n" .
524
+ '<div class="c-color-palette__colors">' . $current_palette . '</div>' . "\n" .
525
+ '<div class="sm_color_matrix"></div>' . "\n" .
526
+ '</div>' . "\n" .
527
+ '<div class="sm-tabs">' . "\n" .
528
+ '<div class="sm-tabs__item" data-target="palettes">' . esc_html__( 'Palettes', 'customify' ) . '</div>' . "\n" .
529
+ '<div class="sm-tabs__item" data-target="filters">' . esc_html__( 'Filters', 'customify' ) . '</div>' . "\n" .
530
+ '<div class="sm-tabs__item" data-target="customize">' . esc_html__( 'Customize', 'customify' ) . '</div>' . "\n" .
531
  '</div>',
532
  ),
533
  'sm_palettes_description' => array(
534
  'type' => 'html',
535
  'setting_id' => 'sm_palettes_description',
536
+ 'html' => '<span class="description customize-control-description">' .
537
+ apply_filters( 'customify_style_manager_sm_palettes_description_html', wp_kses( __( 'Choose your <em>base color palette</em> and go deeper with the <em>Filters</em> and <em>Customize</em> tabs. Make it shine, mate!', 'customify' ), array(
538
  'em' => array(),
539
  'b' => array(),
540
  'strong' => array(),
541
  'i' => array(),
542
+ ) ) ) . '</span>' . "\n",
543
  ),
544
  'sm_filters_description' => array(
545
  'type' => 'html',
546
  'setting_id' => 'sm_filters_description',
547
+ 'html' => '<span class="description customize-control-description">' .
548
+ apply_filters( 'customify_style_manager_sm_filters_description_html', wp_kses( __( 'Adjust the <i>colors properties</i> by using the filters. Keep the look fresh and engaging!', 'customify' ), array(
549
  'em' => array(),
550
  'b' => array(),
551
  'strong' => array(),
552
  'i' => array(),
553
+ ) ) ) . '</span>' . "\n",
554
  ),
555
  'sm_customize_description' => array(
556
  'type' => 'html',
557
  'setting_id' => 'sm_customize_description',
558
+ 'html' => '<span class="description customize-control-description">' .
559
+ apply_filters( 'customify_style_manager_sm_customize_description_html', wp_kses( __( 'Adjust how the colors are used on your site with ease. Modify their usage level to craft a playful design!', 'customify' ), array(
560
+ 'em' => array(),
561
+ 'b' => array(),
562
+ 'strong' => array(),
563
+ 'i' => array(),
564
+ ) ) ) . '</span>' . "\n",
565
  ),
566
  'sm_coloration_level' => array(
567
  'type' => 'sm_radio',
1099
  if ( ! empty( $option_details['type'] )
1100
  && 'hidden' === $option_details['type']
1101
  && 0 === strpos( $option_id, 'sm_' )
1102
+ && '_final' === substr( $option_id, - strlen( '_final' ) ) ) {
1103
  $control_ids[] = $option_id;
1104
  }
1105
  }
1156
  */
1157
  public function __clone() {
1158
 
1159
+ _doing_it_wrong( __FUNCTION__,esc_html__( 'You should not do that!', 'customify' ), null );
1160
+ }
1161
 
1162
  /**
1163
  * Unserializing instances of this class is forbidden.
1166
  */
1167
  public function __wakeup() {
1168
 
1169
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'You should not do that!', 'customify' ), null );
1170
+ }
1171
  }
1172
 
1173
  endif;
includes/class-customify-customizer.php CHANGED
@@ -155,7 +155,7 @@ if ( ! class_exists( 'Customify_Customizer' ) ) :
155
  */
156
  function register_admin_customizer_styles() {
157
  wp_register_style( 'customify_select2', plugins_url( 'js/select2/css/select2.css', PixCustomifyPlugin()->get_file() ), array(), PixCustomifyPlugin()->get_version() );
158
- wp_register_style( 'customify_style', plugins_url( 'css/customizer.css', PixCustomifyPlugin()->get_file() ), array( 'customify_select2' ), PixCustomifyPlugin()->get_version() );
159
  }
160
 
161
  /**
@@ -251,7 +251,7 @@ if ( ! class_exists( 'Customify_Customizer' ) ) :
251
  'customify_force_defaults',
252
  {
253
  type: 'warning',
254
- message: '<strong style="margin-bottom: ">Customify: Development Mode</strong><p>All the options are switched to default. While they are changing in the live preview, they will not be kept when you hit publish.</p>'
255
  }
256
  ) );
257
  });
@@ -259,8 +259,6 @@ if ( ! class_exists( 'Customify_Customizer' ) ) :
259
  </script>
260
  <?php }
261
 
262
-
263
-
264
  /**
265
  * Output CSS style generated by customizer
266
  */
@@ -336,7 +334,7 @@ if ( ! class_exists( 'Customify_Customizer' ) ) :
336
  }
337
 
338
  if ( isset( $option_details['type'] ) && $option_details['type'] === 'custom_background' ) {
339
- $custom_css .= $this->process_custom_background_field_output( $option_details ) . PHP_EOL;
340
  }
341
  }
342
 
@@ -355,12 +353,12 @@ if ( ! class_exists( 'Customify_Customizer' ) ) :
355
  $property_value = $property['value'];
356
  $css_output = $this->process_css_property( $property_settings, $property_value );
357
  if ( ! empty( $css_output ) ) {
358
- $media_query_custom_css .= "\t" . $css_output . PHP_EOL;
359
  }
360
  }
361
 
362
  if ( ! empty( $media_query_custom_css ) ) {
363
- $media_query_custom_css = PHP_EOL . '@media ' . $media_query . " { " . PHP_EOL . PHP_EOL . $media_query_custom_css . "}" . PHP_EOL;
364
  }
365
 
366
  if ( ! empty( $media_query_custom_css ) ) {
@@ -767,7 +765,7 @@ if ( ! class_exists( 'Customify_Customizer' ) ) :
767
  if ( empty( $css_property['selector'] ) ) {
768
  return '';
769
  }
770
- $property_output = $css_property['selector'] . ' { ' . $css_property['property'] . ': ' . $value . $unit . "; }" . PHP_EOL;
771
 
772
  // Handle the value filter callback.
773
  if ( isset( $css_property['filter_value_cb'] ) ) {
@@ -1275,7 +1273,10 @@ if ( ! class_exists( 'Customify_Customizer' ) ) :
1275
  'description_hidden' => false,
1276
  ) );
1277
 
1278
- $wp_customize->add_section( $section_id, $section_args );
 
 
 
1279
  }
1280
 
1281
  // Now go through each section option and add the fields
@@ -1884,8 +1885,8 @@ if ( ! class_exists( 'Customify_Customizer' ) ) :
1884
  */
1885
  public function __clone() {
1886
 
1887
- _doing_it_wrong( __FUNCTION__,esc_html( __( 'Cheatin&#8217; huh?' ) ), null );
1888
- } // End __clone ()
1889
 
1890
  /**
1891
  * Unserializing instances of this class is forbidden.
@@ -1894,8 +1895,8 @@ if ( ! class_exists( 'Customify_Customizer' ) ) :
1894
  */
1895
  public function __wakeup() {
1896
 
1897
- _doing_it_wrong( __FUNCTION__, esc_html( __( 'Cheatin&#8217; huh?' ) ), null );
1898
- } // End __wakeup ()
1899
  }
1900
 
1901
  endif;
155
  */
156
  function register_admin_customizer_styles() {
157
  wp_register_style( 'customify_select2', plugins_url( 'js/select2/css/select2.css', PixCustomifyPlugin()->get_file() ), array(), PixCustomifyPlugin()->get_version() );
158
+ wp_register_style( 'customify_style', plugins_url( 'css/customizer.css', PixCustomifyPlugin()->get_file() ), array( 'customify_select2', 'dashicons' ), PixCustomifyPlugin()->get_version() );
159
  }
160
 
161
  /**
251
  'customify_force_defaults',
252
  {
253
  type: 'warning',
254
+ message: '<?php echo wp_kses_post( __( '<strong>Customify: Development Mode</strong><p>All options are switched to default. While they are changing in the live preview, they will not be kept when you hit publish.</p>', 'customify' ) ); ?>'
255
  }
256
  ) );
257
  });
259
  </script>
260
  <?php }
261
 
 
 
262
  /**
263
  * Output CSS style generated by customizer
264
  */
334
  }
335
 
336
  if ( isset( $option_details['type'] ) && $option_details['type'] === 'custom_background' ) {
337
+ $custom_css .= $this->process_custom_background_field_output( $option_details ) . "\n";
338
  }
339
  }
340
 
353
  $property_value = $property['value'];
354
  $css_output = $this->process_css_property( $property_settings, $property_value );
355
  if ( ! empty( $css_output ) ) {
356
+ $media_query_custom_css .= "\t" . $css_output . "\n";
357
  }
358
  }
359
 
360
  if ( ! empty( $media_query_custom_css ) ) {
361
+ $media_query_custom_css = "\n" . '@media ' . $media_query . " { " . "\n" . "\n" . $media_query_custom_css . "}" . "\n";
362
  }
363
 
364
  if ( ! empty( $media_query_custom_css ) ) {
765
  if ( empty( $css_property['selector'] ) ) {
766
  return '';
767
  }
768
+ $property_output = $css_property['selector'] . ' { ' . $css_property['property'] . ': ' . $value . $unit . "; }" . "\n";
769
 
770
  // Handle the value filter callback.
771
  if ( isset( $css_property['filter_value_cb'] ) ) {
1273
  'description_hidden' => false,
1274
  ) );
1275
 
1276
+ // Only add the section if it is not of type `hidden`
1277
+ if ( 'hidden' !== $section_args['type'] ) {
1278
+ $wp_customize->add_section( $section_id, $section_args );
1279
+ }
1280
  }
1281
 
1282
  // Now go through each section option and add the fields
1885
  */
1886
  public function __clone() {
1887
 
1888
+ _doing_it_wrong( __FUNCTION__,esc_html__( 'You should not do that!', 'customify' ), null );
1889
+ }
1890
 
1891
  /**
1892
  * Unserializing instances of this class is forbidden.
1895
  */
1896
  public function __wakeup() {
1897
 
1898
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'You should not do that!', 'customify' ), null );
1899
+ }
1900
  }
1901
 
1902
  endif;
includes/class-customify-font-palettes.php CHANGED
@@ -347,7 +347,7 @@ class Customify_Font_Palettes {
347
  }
348
 
349
  // The section might be already defined, thus we merge, not replace the entire section config.
350
- $config['sections']['style_manager_section'] = array_replace_recursive( $config['sections']['style_manager_section'], array(
351
  'options' => array(
352
  'sm_font_palette' => array(
353
  'type' => 'preset',
@@ -486,10 +486,10 @@ class Customify_Font_Palettes {
486
  foreach ( $master_font_controls_ids as $setting_id ) {
487
  if ( ! empty( $config['sections']['style_manager_section']['options'][ $setting_id ]['connected_fields'] ) ) {
488
  $current_palette .=
489
- '<div class="font ' . $setting_id . '" data-setting="' . $setting_id . '">' . PHP_EOL .
490
- '<div class="fill"></div>' . PHP_EOL .
491
- '<div class="picker"><i></i></div>' . PHP_EOL .
492
- '</div>' . PHP_EOL;
493
  }
494
  }
495
  $current_palette .= '</div>';
@@ -500,12 +500,12 @@ class Customify_Font_Palettes {
500
  'sm_current_font_palette' => array(
501
  'type' => 'html',
502
  'html' =>
503
- '<div class="font-palette-container">' . PHP_EOL .
504
- '<span class="customize-control-title">Current Font Palette:</span>' . PHP_EOL .
505
- '<span class="description customize-control-description">Choose a font palette to start with. Adjust its style using the variation buttons below.</span>' . PHP_EOL .
506
- '<div class="c-font-palette">' . PHP_EOL .
507
  $current_palette .
508
- '<div class="c-font-palette__overlay">' . PHP_EOL .
509
  '<div class="c-font-palette__label">' .
510
  '<div class="c-font-palette__name">' . 'Original Style' . '</div>' .
511
  '<div class="c-font-palette__control variation-light active" data-target="#_customize-input-sm_font_palette_variation_control-radio-light">' .
@@ -520,18 +520,18 @@ class Customify_Font_Palettes {
520
  '<span class="dashicons dashicons-admin-appearance"></span>' .
521
  '<div class="c-font-palette__tooltip">Fontful</div>' .
522
  '</div>' .
523
- '</div>' . PHP_EOL .
524
- '</div>' . PHP_EOL .
525
- '</div>' . PHP_EOL .
526
- '</div>' . PHP_EOL .
527
- '<svg class="c-font-palette__blur" width="15em" height="15em" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg" version="1.1">' . PHP_EOL .
528
- '<defs>' . PHP_EOL .
529
- '<filter id="goo">' . PHP_EOL .
530
- '<feGaussianBlur in="SourceGraphic" stdDeviation="10" result="blur" />' . PHP_EOL .
531
- '<feFontMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 50 -20" result="goo" />' . PHP_EOL .
532
- '<feBlend in="SourceGraphic" in2="goo" />' . PHP_EOL .
533
- '</filter>' . PHP_EOL .
534
- '</defs>' . PHP_EOL .
535
  '</svg>',
536
  ),
537
  ) + $config['sections']['style_manager_section']['options'];
@@ -1292,8 +1292,8 @@ class Customify_Font_Palettes {
1292
  */
1293
  public function __clone() {
1294
 
1295
- _doing_it_wrong( __FUNCTION__,esc_html( __( 'Cheatin&#8217; huh?' ) ), null );
1296
- } // End __clone ()
1297
 
1298
  /**
1299
  * Unserializing instances of this class is forbidden.
@@ -1302,8 +1302,8 @@ class Customify_Font_Palettes {
1302
  */
1303
  public function __wakeup() {
1304
 
1305
- _doing_it_wrong( __FUNCTION__, esc_html( __( 'Cheatin&#8217; huh?' ) ), null );
1306
- } // End __wakeup ()
1307
  }
1308
 
1309
  endif;
347
  }
348
 
349
  // The section might be already defined, thus we merge, not replace the entire section config.
350
+ $config['sections']['style_manager_section'] = Customify_Array::array_merge_recursive_distinct( $config['sections']['style_manager_section'], array(
351
  'options' => array(
352
  'sm_font_palette' => array(
353
  'type' => 'preset',
486
  foreach ( $master_font_controls_ids as $setting_id ) {
487
  if ( ! empty( $config['sections']['style_manager_section']['options'][ $setting_id ]['connected_fields'] ) ) {
488
  $current_palette .=
489
+ '<div class="font ' . $setting_id . '" data-setting="' . $setting_id . '">' . "\n" .
490
+ '<div class="fill"></div>' . "\n" .
491
+ '<div class="picker"><i></i></div>' . "\n" .
492
+ '</div>' . "\n";
493
  }
494
  }
495
  $current_palette .= '</div>';
500
  'sm_current_font_palette' => array(
501
  'type' => 'html',
502
  'html' =>
503
+ '<div class="font-palette-container">' . "\n" .
504
+ '<span class="customize-control-title">Current Font Palette:</span>' . "\n" .
505
+ '<span class="description customize-control-description">Choose a font palette to start with. Adjust its style using the variation buttons below.</span>' . "\n" .
506
+ '<div class="c-font-palette">' . "\n" .
507
  $current_palette .
508
+ '<div class="c-font-palette__overlay">' . "\n" .
509
  '<div class="c-font-palette__label">' .
510
  '<div class="c-font-palette__name">' . 'Original Style' . '</div>' .
511
  '<div class="c-font-palette__control variation-light active" data-target="#_customize-input-sm_font_palette_variation_control-radio-light">' .
520
  '<span class="dashicons dashicons-admin-appearance"></span>' .
521
  '<div class="c-font-palette__tooltip">Fontful</div>' .
522
  '</div>' .
523
+ '</div>' . "\n" .
524
+ '</div>' . "\n" .
525
+ '</div>' . "\n" .
526
+ '</div>' . "\n" .
527
+ '<svg class="c-font-palette__blur" width="15em" height="15em" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg" version="1.1">' . "\n" .
528
+ '<defs>' . "\n" .
529
+ '<filter id="goo">' . "\n" .
530
+ '<feGaussianBlur in="SourceGraphic" stdDeviation="10" result="blur" />' . "\n" .
531
+ '<feFontMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 50 -20" result="goo" />' . "\n" .
532
+ '<feBlend in="SourceGraphic" in2="goo" />' . "\n" .
533
+ '</filter>' . "\n" .
534
+ '</defs>' . "\n" .
535
  '</svg>',
536
  ),
537
  ) + $config['sections']['style_manager_section']['options'];
1292
  */
1293
  public function __clone() {
1294
 
1295
+ _doing_it_wrong( __FUNCTION__,esc_html__( 'You should not do that!', 'customify' ), null );
1296
+ }
1297
 
1298
  /**
1299
  * Unserializing instances of this class is forbidden.
1302
  */
1303
  public function __wakeup() {
1304
 
1305
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'You should not do that!', 'customify' ), null );
1306
+ }
1307
  }
1308
 
1309
  endif;
includes/class-customify-gutenberg.php CHANGED
@@ -11,513 +11,520 @@ if ( ! defined( 'ABSPATH' ) ) {
11
  exit; // Exit if accessed directly
12
  }
13
 
14
- if ( ! class_exists( 'Customify_Gutenberg' ) ) :
15
-
16
- class Customify_Gutenberg {
17
-
18
- /**
19
- * Holds the only instance of this class.
20
- * @var null|Customify_Gutenberg
21
- * @access protected
22
- * @since 2.2.0
23
- */
24
- protected static $_instance = null;
25
-
26
- /*
27
- * Selectors that we will use to constrain CSS rules to certain scopes.
28
- */
29
- public static $editor_namespace_selector = '.edit-post-visual-editor.editor-styles-wrapper';
30
- public static $title_namespace_selector = '.editor-styles-wrapper .editor-post-title__block';
31
- public static $title_input_namespace_selector = '.editor-styles-wrapper .editor-post-title__block .editor-post-title__input';
32
- public static $block_namespace_selector = '.edit-post-visual-editor.editor-styles-wrapper .editor-block-list__block';
33
-
34
- /**
35
- * Regexes
36
- */
37
- public static $gutenbergy_selector_regex = '/^(\.edit-post-visual-editor|\.editor-block-list__block).*$/';
38
- public static $root_regex = '/^(body|html).*$/';
39
- public static $title_regex = '/^(h1|h1\s+.*|\.single\s*\.entry-title.*|\.entry-title.*|\.page-title.*|\.article__?title.*)$/';
40
- /* Regexes based on which we will ignore selectors = do not include them in the selector list for a certain rule. */
41
- public static $excluded_selectors_regex = array(
42
- // We don't want to mess with buttons as we have a high likelihood of messing with the Gutenberg toolbar.
43
- '/^\s*button/',
44
- '/^\s*\.button/',
45
- '/^\s*input/',
46
- '/^\s*select/',
47
- '/^\s*#/', // ignore all ids
48
- '/^\s*div#/', // ignore all ids
49
-
50
- '/\.u-/',
51
- '/\.c-/',
52
- '/\.o-/',
53
- '/\.site-/',
54
- '/\.card/',
55
-
56
- '/^\s*\.archive/',
57
- '/^\s*\.search/',
58
- '/^\s*\.no-results/',
59
- '/^\s*\.home/',
60
- '/^\s*\.blog/',
61
- '/^\s*\.site-/',
62
- '/\.search/',
63
- '/\.page/',
64
- '/\.mce-content-body/',
65
- '/\.attachment/',
66
- '/\.mobile/',
67
-
68
- '/\.sticky/',
69
- '/\.custom-logo-link/',
70
-
71
- '/\.entry-meta/',
72
- '/\.entry-footer/',
73
- '/\.header-meta/',
74
- '/\.nav/',
75
- '/\.main-navigation/',
76
- '/navbar/',
77
- '/comment/',
78
- '/\.dummy/',
79
- '/\.back-to-top/',
80
- '/\.page-numbers/',
81
- '/\.featured/',
82
- '/\.widget/',
83
- '/\.edit-link/',
84
- '/\.posted-on/',
85
- '/\.cat-links/',
86
- '/\.posted-by/',
87
- '/\.more-link/',
88
-
89
- '/jetpack/',
90
- '/wpforms/',
91
- '/contact-form/',
92
- '/sharedaddy/',
93
- );
94
-
95
- /**
96
- * Constructor.
97
- *
98
- * @since 2.2.0
99
- */
100
- protected function __construct() {
101
- $this->init();
102
- }
103
-
104
- /**
105
- * Initialize this module.
106
- *
107
- * @since 2.2.0
108
- */
109
- public function init() {
110
 
111
- // Hook up.
112
- $this->add_hooks();
113
- }
 
 
 
114
 
115
- /**
116
- * Initiate our hooks
117
- *
118
- * @since 2.2.0
119
- */
120
- public function add_hooks() {
121
 
122
- add_action( 'enqueue_block_editor_assets', array( $this, 'dynamic_styles' ), 999 );
 
 
 
 
 
123
 
124
- // Styles on the front end.
125
- add_action( 'wp_enqueue_scripts', array( $this, 'frontend_styles' ), 999 );
126
 
127
- add_action( 'admin_init', array( $this, 'editor_color_palettes' ), 20 );
128
- }
129
 
130
- /**
131
- * Determine if Gutenberg is supported.
132
- *
133
- * @since 2.2.0
134
- *
135
- * @return bool
136
- */
137
- public function is_supported() {
138
- $gutenberg = false;
139
- if ( has_filter( 'replace_editor', 'gutenberg_init' ) ) {
140
- // Gutenberg is installed and activated.
141
- $gutenberg = true;
142
  }
143
 
144
- return apply_filters( 'customify_gutenberg_is_supported', $gutenberg );
145
- }
 
 
 
 
 
 
 
 
 
 
 
146
 
147
- public function get_editor_style_handle() {
148
- global $wp_styles;
149
- if ( ! ( $wp_styles instanceof WP_Styles ) ) {
150
- return '';
151
  }
152
 
153
- // We need to look into the registered theme stylesheets and get the one most likely to be used for Gutenberg.
154
- // Thus we can attach inline styles to it.
155
- $theme_dir_uri = get_stylesheet_directory_uri();
156
- $theme_slug = get_stylesheet();
157
-
158
- $handle = 'wp-edit-post'; // this is better than nothing as it is the main editor style.
159
- $reversed = array_reverse( $wp_styles->registered );
160
- /** @var _WP_Dependency $style */
161
- foreach ( $reversed as $style ) {
162
- // This is the most precise.
163
- if ( 0 === strpos( $style->src, $theme_dir_uri ) ) {
164
- $handle = $style->handle;
165
- break;
166
  }
167
 
168
- // If it is prefixed with the theme slug, it is good also.
169
- if ( 0 === strpos( $style->handle, $theme_slug . '-' ) || 0 === strpos( $style->handle, $theme_slug . '_' ) ) {
170
- $handle = $style->handle;
171
- break;
172
- }
173
- }
 
 
 
 
 
 
 
 
174
 
175
- return $handle;
176
- }
 
 
 
 
177
 
178
- public function get_frontend_style_handle() {
179
- global $wp_styles;
180
- if ( ! ( $wp_styles instanceof WP_Styles ) ) {
181
- return '';
182
  }
183
 
184
- // We need to look into the registered theme stylesheets and get the one most likely to be used for Gutenberg.
185
- // Thus we can attach inline styles to it.
186
- $style_css_uri = get_stylesheet_uri();
187
- $theme_slug = get_stylesheet();
188
-
189
- $handle = 'wp-edit-post'; // this is better than nothing as it is the main editor style.
190
- $reversed = array_reverse( $wp_styles->registered );
191
- /** @var _WP_Dependency $style */
192
- foreach ( $reversed as $style ) {
193
- // This is the most precise.
194
- if ( 0 === strpos( $style->src, $style_css_uri ) ) {
195
- $handle = $style->handle;
196
- break;
197
  }
198
 
199
- // If it is prefixed with the theme slug, it is good also.
200
- if ( ( 0 === strpos( $style->handle, $theme_slug . '-' ) || 0 === strpos( $style->handle, $theme_slug . '_' ) )
201
- && false !== strpos( $style->src, '.css') ) {
202
- $handle = $style->handle;
203
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
204
  }
 
 
205
  }
206
 
207
- return $handle;
208
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
 
210
- /**
211
- * Output Customify's dynamic styles in the Gutenberg context.
212
- *
213
- * @since 2.2.0
214
- */
215
- public function dynamic_styles() {
216
- $enqueue_parent_handle = $this->get_editor_style_handle();
217
-
218
- if ( PixCustomifyPlugin()->settings->get_plugin_setting( 'enable_editor_style', true ) ) {
219
- add_filter( 'customify_typography_css_selector', array( $this, 'gutenbergify_font_css_selectors' ), 10, 2 );
220
- wp_add_inline_script( 'wp-editor', PixCustomifyPlugin()->customizer->get_typography_dynamic_script() );
221
- wp_add_inline_style( $enqueue_parent_handle, PixCustomifyPlugin()->customizer->get_typography_dynamic_style() );
222
- remove_filter( 'customify_typography_css_selector', array( $this, 'gutenbergify_font_css_selectors' ), 10 );
223
-
224
- add_filter( 'customify_font_css_selector', array( $this, 'gutenbergify_font_css_selectors' ), 10, 2 );
225
- require_once( PixCustomifyPlugin()->get_base_path() . 'features/class-Font_Selector.php' );
226
- wp_add_inline_script( 'wp-editor', Customify_Font_Selector::instance()->get_fonts_dynamic_script() );
227
- wp_add_inline_style( $enqueue_parent_handle, Customify_Font_Selector::instance()->get_fonts_dynamic_style() );
228
- remove_filter( 'customify_font_css_selector', array( $this, 'gutenbergify_font_css_selectors' ), 10 );
229
-
230
- add_filter( 'customify_css_selector', array( $this, 'gutenbergify_css_selectors' ), 10, 2 );
231
- wp_add_inline_style( $enqueue_parent_handle, PixCustomifyPlugin()->customizer->get_dynamic_style() );
232
- remove_filter( 'customify_css_selector', array( $this, 'gutenbergify_css_selectors' ), 10 );
233
 
234
  // Add color palettes classes.
235
  wp_add_inline_style( $enqueue_parent_handle, $this->editor_color_palettes_css_classes() );
236
  }
237
- }
238
-
239
- public function frontend_styles() {
240
- $enqueue_parent_handle = $this->get_editor_style_handle();
241
 
242
- // Add color palettes classes.
243
- wp_add_inline_style( $enqueue_parent_handle, $this->editor_color_palettes_css_classes() );
244
- }
245
 
246
- public function gutenbergify_css_selectors( $selectors, $css_property ) {
 
247
 
248
- // Treat the selector(s) as an array.
249
- $selectors = $this->maybeExplodeSelectors( $selectors );
 
 
250
 
251
- $new_selectors = array();
252
- foreach ( $selectors as $selector ) {
253
- // Clean up
254
- $selector = trim( $selector );
255
-
256
- // If the selector matches the excluded, skip it.
257
- if ( $this->preg_match_any( self::$excluded_selectors_regex, $selector ) ) {
258
- continue;
259
- }
260
 
261
- // If the selector is already Gutenbergy, we will not do anything to it
262
- if ( preg_match( self::$gutenbergy_selector_regex, $selector ) ) {
263
- $new_selectors[] = $selector;
264
- continue;
265
- }
266
 
267
- // We will let :root selectors be
268
- if ( ':root' === $selector ) {
269
- $new_selectors[] = $selector;
270
- continue;
271
- }
272
 
273
- // For root html elements, we will not prefix them, but replace them with the block and title namespace.
274
- if ( preg_match( self::$root_regex, $selector ) ) {
275
- // We will ignore pseudo-selectors
276
- if ( preg_match( '/^(body|html)[\:\+]+.*$/', $selector ) ) {
 
 
 
 
 
 
 
 
 
 
277
  continue;
278
  }
279
 
280
- // When it comes to background properties applied at the body level, we need to scope to the editor namespace
281
- if ( isset( $css_property['property'] ) && 0 === strpos( $css_property['property'], 'background' ) ) {
282
- $new_selectors[] = preg_replace( '/^(html body|body|html)/', self::$editor_namespace_selector, $selector );
283
- } else {
284
- $new_selectors[] = preg_replace( '/^(html body|body|html)/', self::$block_namespace_selector, $selector );
285
- $new_selectors[] = preg_replace( '/^(html body|body|html)/', self::$title_namespace_selector, $selector );
286
  }
287
- continue;
288
- }
289
 
290
- // If we encounter selectors that seem that they could target the post title,
291
- // we will add selectors for the Gutenberg title also.
292
- if ( preg_match( self::$title_regex, $selector ) ) {
293
- $new_selectors[] = preg_replace( self::$title_regex, self::$title_input_namespace_selector, $selector );
294
  }
295
 
296
- $new_selectors[] = self::$block_namespace_selector . ' ' . $selector;
297
  }
298
 
299
- return implode( ', ', $new_selectors );
300
- }
301
 
302
- public function gutenbergify_font_css_selectors( $selectors ) {
 
303
 
304
- // Treat the selector(s) as an array.
305
- $selectors = $this->maybeExplodeSelectors( $selectors );
 
 
306
 
307
- $new_selectors = array();
308
- foreach ( $selectors as $selector ) {
309
- // Clean up
310
- $selector = trim( $selector );
311
 
312
- // If the selector matches the excluded, skip it.
313
- if ( $this->preg_match_any( self::$excluded_selectors_regex, $selector ) ) {
314
- continue;
315
- }
 
316
 
317
- // If the selector is already Gutenbergy, we will not do anything to it
318
- if ( preg_match( self::$gutenbergy_selector_regex, $selector ) ) {
319
- $new_selectors[] = $selector;
320
- continue;
321
- }
322
 
323
- // We will let :root selectors be
324
- if ( ':root' === $selector ) {
325
- $new_selectors[] = $selector;
326
- continue;
327
- }
 
328
 
329
- // For root html elements, we will not prefix them, but replace them with the block and title namespace.
330
- if ( preg_match( self::$root_regex, $selector ) ) {
331
- $new_selectors[] = preg_replace( '/^(html body|body|html|)/', self::$block_namespace_selector, $selector );
332
- $new_selectors[] = preg_replace( '/^(html body|body|html)/', self::$title_namespace_selector, $selector );
333
- continue;
334
- }
335
 
336
- // If we encounter selectors that seem that they could target the post title,
337
- // we will add selectors for the Gutenberg title also.
338
- if ( preg_match( self::$title_regex, $selector ) ) {
339
- $new_selectors[] = preg_replace( self::$title_regex, self::$title_input_namespace_selector, $selector );
340
  }
341
 
342
- $new_selectors[] = self::$block_namespace_selector . ' ' . $selector;
343
  }
344
 
345
- return implode( ', ', $new_selectors );
346
- }
 
 
 
 
 
 
 
 
 
 
347
 
348
- /**
349
- * Preg_match a series of regex against a subject.
350
- *
351
- * @param string|array $regexes
352
- * @param string $subject
353
- *
354
- * @return bool Returns true if at least one of the regex matches, false otherwise.
355
- */
356
- public function preg_match_any( $regexes, $subject ) {
357
- if ( is_string( $regexes ) ) {
358
- $regexes = array( $regexes );
359
- }
360
 
361
- if ( ! is_array( $regexes ) ) {
362
  return false;
363
  }
364
 
365
- foreach ( $regexes as $regex ) {
366
- if ( preg_match( $regex, $subject ) ) {
367
- return true;
 
 
 
 
 
 
 
 
368
  }
 
 
369
  }
370
 
371
- return false;
372
- }
 
 
 
 
 
 
373
 
374
- /**
375
- * Attempt to split a string with selectors and return the parts as an array.
376
- * If not a string or no comma present, just returns the value.
377
- *
378
- * @param mixed $value
379
- *
380
- * @return array|false|string[]
381
- */
382
- public function maybeExplodeSelectors( $value ) {
383
- if ( ! is_string( $value ) ) {
384
- return $value;
385
- }
386
 
387
- return preg_split( '#[\s]*,[\s]*#', $value, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE );
388
- }
 
 
389
 
390
- /**
391
- * Add the SM Color Palettes to the editor sidebar.
392
- */
393
- public function editor_color_palettes() {
394
- // Bail if Color Palettes are not supported
395
- if ( ! Customify_Color_Palettes::instance()->is_supported() ) {
396
- return;
397
- }
398
 
399
- $options_details = PixCustomifyPlugin()->get_options_configs();
 
 
 
400
 
401
- $master_color_control_ids = Customify_Color_Palettes::instance()->get_all_master_color_controls_ids();
402
- if ( empty( $master_color_control_ids ) ) {
403
- return;
404
- }
 
 
405
 
406
- $editor_color_palettes = array();
407
- foreach ( $master_color_control_ids as $control_id ) {
408
- if ( empty( $options_details[ $control_id ] ) ) {
409
- continue;
 
 
 
 
 
 
410
  }
 
411
 
412
- $value = get_option( $control_id . '_final' );
413
- if ( empty( $value ) ) {
414
- continue;
 
 
 
 
415
  }
416
 
417
- $editor_color_palettes[] = array(
418
- 'name' => $options_details[ $control_id ]['label'],
419
- 'slug' => $control_id,
420
- 'color' => esc_html( $value ),
421
- );
422
- }
423
 
424
- if ( ! empty( $editor_color_palettes ) ) {
425
- /**
426
- * Custom colors for use in the editor.
427
- *
428
- * @link https://wordpress.org/gutenberg/handbook/reference/theme-support/
429
- */
430
- add_theme_support(
431
- 'editor-color-palette',
432
- $editor_color_palettes
433
- );
434
- }
435
- }
436
 
437
- /**
438
- * Generate the special classes for our colors.
439
- */
440
- public function editor_color_palettes_css_classes() {
441
- // Bail if Color Palettes are not supported
442
- if ( ! Customify_Color_Palettes::instance()->is_supported() ) {
443
- return '';
444
- }
445
 
446
- $options_details = PixCustomifyPlugin()->get_options_configs();
 
 
 
447
 
448
- $master_color_control_ids = Customify_Color_Palettes::instance()->get_all_master_color_controls_ids();
449
- if ( empty( $master_color_control_ids ) ) {
450
- return '';
451
- }
 
452
 
453
- // Build styles.
454
- $css = '';
455
- foreach ( $master_color_control_ids as $control_id ) {
456
- if ( empty( $options_details[ $control_id ] ) ) {
457
- continue;
458
- }
459
 
460
- $value = get_option( $control_id . '_final' );
461
- if ( empty( $value ) ) {
462
- continue;
463
  }
464
 
465
- $editor_color_palettes[] = array(
466
- 'name' => $options_details[ $control_id ]['label'],
467
- 'slug' => $control_id,
468
- 'color' => esc_html( $value ),
469
- );
470
-
471
- $color_in_kebab_case = self::to_kebab_case($control_id);
472
 
473
- $css .= '.has-' . $color_in_kebab_case . '-color { color: ' . esc_attr( $value ) . ' !important; }';
474
- $css .= '.has-' . $color_in_kebab_case . '-background-color { background-color: ' . esc_attr( $value ) . '; }';
475
  }
476
- return wp_strip_all_tags( $css );
477
- }
478
 
479
- public static function to_kebab_case( $string ) {
480
- return implode('-', array_map('\strtolower', preg_split( "/[\n\r\t -_]+/", preg_replace("/['\x{2019}]/u", '', $string), -1, PREG_SPLIT_NO_EMPTY )));
481
- }
 
 
 
 
 
 
 
 
 
 
 
 
482
 
483
- /**
484
- * Main Customify_Gutenberg Instance
485
- *
486
- * Ensures only one instance of Customify_Gutenberg is loaded or can be loaded.
487
- *
488
- * @since 2.2.0
489
- * @static
490
- *
491
- * @return Customify_Gutenberg Main Customify_Gutenberg instance
492
- */
493
- public static function instance() {
494
-
495
- if ( is_null( self::$_instance ) ) {
496
- self::$_instance = new self();
497
- }
498
 
499
- return self::$_instance;
500
- } // End instance ()
 
 
 
 
501
 
502
- /**
503
- * Cloning is forbidden.
504
- *
505
- * @since 2.2.0
506
- */
507
- public function __clone() {
508
 
509
- _doing_it_wrong( __FUNCTION__,esc_html( __( 'Cheatin&#8217; huh?' ) ), null );
510
- } // End __clone ()
 
 
 
 
511
 
512
- /**
513
- * Unserializing instances of this class is forbidden.
514
- *
515
- * @since 2.2.0
516
- */
517
- public function __wakeup() {
518
 
519
- _doing_it_wrong( __FUNCTION__, esc_html( __( 'Cheatin&#8217; huh?' ) ), null );
520
- } // End __wakeup ()
521
  }
522
-
523
- endif;
11
  exit; // Exit if accessed directly
12
  }
13
 
14
+ if ( ! class_exists( 'Customify_Gutenberg' ) ) {
15
+
16
+ class Customify_Gutenberg {
17
+
18
+ /**
19
+ * Holds the only instance of this class.
20
+ * @var null|Customify_Gutenberg
21
+ * @access protected
22
+ * @since 2.2.0
23
+ */
24
+ protected static $_instance = null;
25
+
26
+ /*
27
+ * Selectors that we will use to constrain CSS rules to certain scopes.
28
+ */
29
+ public static $editor_namespace_selector = '.edit-post-visual-editor.editor-styles-wrapper';
30
+ public static $title_namespace_selector = '.editor-styles-wrapper .editor-post-title__block';
31
+ public static $title_input_namespace_selector = '.editor-styles-wrapper .editor-post-title__block .editor-post-title__input';
32
+ public static $block_namespace_selector = '.edit-post-visual-editor.editor-styles-wrapper .editor-block-list__block';
33
+
34
+ /**
35
+ * Regexes
36
+ */
37
+ public static $gutenbergy_selector_regex = '/^(\.edit-post-visual-editor|\.editor-block-list__block).*$/';
38
+ public static $root_regex = '/^(body|html).*$/';
39
+ public static $title_regex = '/^(h1|h1\s+.*|\.single\s*\.entry-title.*|\.entry-title.*|\.page-title.*|\.article__?title.*)$/';
40
+ /* Regexes based on which we will ignore selectors = do not include them in the selector list for a certain rule. */
41
+ public static $excluded_selectors_regex = array(
42
+ // We don't want to mess with buttons as we have a high likelihood of messing with the Gutenberg toolbar.
43
+ '/^\s*button/',
44
+ '/^\s*\.button/',
45
+ '/^\s*input/',
46
+ '/^\s*select/',
47
+ '/^\s*#/', // ignore all ids
48
+ '/^\s*div#/', // ignore all ids
49
+
50
+ '/\.u-/',
51
+ '/\.c-/',
52
+ '/\.o-/',
53
+ '/\.site-/',
54
+ '/\.card/',
55
+
56
+ '/^\s*\.archive/',
57
+ '/^\s*\.search/',
58
+ '/^\s*\.no-results/',
59
+ '/^\s*\.home/',
60
+ '/^\s*\.blog/',
61
+ '/^\s*\.site-/',
62
+ '/\.search/',
63
+ '/\.page/',
64
+ '/\.mce-content-body/',
65
+ '/\.attachment/',
66
+ '/\.mobile/',
67
+
68
+ '/\.sticky/',
69
+ '/\.custom-logo-link/',
70
+
71
+ '/\.entry-meta/',
72
+ '/\.entry-footer/',
73
+ '/\.header-meta/',
74
+ '/\.nav/',
75
+ '/\.main-navigation/',
76
+ '/navbar/',
77
+ '/comment/',
78
+ '/\.dummy/',
79
+ '/\.back-to-top/',
80
+ '/\.page-numbers/',
81
+ '/\.featured/',
82
+ '/\.widget/',
83
+ '/\.edit-link/',
84
+ '/\.posted-on/',
85
+ '/\.cat-links/',
86
+ '/\.posted-by/',
87
+ '/\.more-link/',
88
+
89
+ '/jetpack/',
90
+ '/wpforms/',
91
+ '/contact-form/',
92
+ '/sharedaddy/',
93
+ );
94
+
95
+ /**
96
+ * Constructor.
97
+ *
98
+ * @since 2.2.0
99
+ */
100
+ protected function __construct() {
101
+ $this->init();
102
+ }
 
 
 
 
 
 
 
103
 
104
+ /**
105
+ * Initialize this module.
106
+ *
107
+ * @since 2.2.0
108
+ */
109
+ public function init() {
110
 
111
+ // Hook up.
112
+ $this->add_hooks();
113
+ }
 
 
 
114
 
115
+ /**
116
+ * Initiate our hooks
117
+ *
118
+ * @since 2.2.0
119
+ */
120
+ public function add_hooks() {
121
 
122
+ add_action( 'enqueue_block_editor_assets', array( $this, 'dynamic_styles' ), 999 );
 
123
 
124
+ // Styles on the front end.
125
+ add_action( 'wp_enqueue_scripts', array( $this, 'frontend_styles' ), 999 );
126
 
127
+ add_action( 'admin_init', array( $this, 'editor_color_palettes' ), 20 );
 
 
 
 
 
 
 
 
 
 
 
128
  }
129
 
130
+ /**
131
+ * Determine if Gutenberg is supported.
132
+ *
133
+ * @return bool
134
+ * @since 2.2.0
135
+ *
136
+ */
137
+ public function is_supported() {
138
+ $gutenberg = false;
139
+ if ( has_filter( 'replace_editor', 'gutenberg_init' ) ) {
140
+ // Gutenberg is installed and activated.
141
+ $gutenberg = true;
142
+ }
143
 
144
+ return apply_filters( 'customify_gutenberg_is_supported', $gutenberg );
 
 
 
145
  }
146
 
147
+ public function get_editor_style_handle() {
148
+ global $wp_styles;
149
+ if ( ! ( $wp_styles instanceof WP_Styles ) ) {
150
+ return '';
 
 
 
 
 
 
 
 
 
151
  }
152
 
153
+ // We need to look into the registered theme stylesheets and get the one most likely to be used for Gutenberg.
154
+ // Thus we can attach inline styles to it.
155
+ $theme_dir_uri = get_stylesheet_directory_uri();
156
+ $theme_slug = get_stylesheet();
157
+
158
+ $handle = 'wp-edit-post'; // this is better than nothing as it is the main editor style.
159
+ $reversed = array_reverse( $wp_styles->registered );
160
+ /** @var _WP_Dependency $style */
161
+ foreach ( $reversed as $style ) {
162
+ // This is the most precise.
163
+ if ( 0 === strpos( $style->src, $theme_dir_uri ) ) {
164
+ $handle = $style->handle;
165
+ break;
166
+ }
167
 
168
+ // If it is prefixed with the theme slug, it is good also.
169
+ if ( 0 === strpos( $style->handle, $theme_slug . '-' ) || 0 === strpos( $style->handle, $theme_slug . '_' ) ) {
170
+ $handle = $style->handle;
171
+ break;
172
+ }
173
+ }
174
 
175
+ return $handle;
 
 
 
176
  }
177
 
178
+ public function get_frontend_style_handle() {
179
+ global $wp_styles;
180
+ if ( ! ( $wp_styles instanceof WP_Styles ) ) {
181
+ return '';
 
 
 
 
 
 
 
 
 
182
  }
183
 
184
+ // We need to look into the registered theme stylesheets and get the one most likely to be used for Gutenberg.
185
+ // Thus we can attach inline styles to it.
186
+ $style_css_uri = get_stylesheet_uri();
187
+ $theme_slug = get_stylesheet();
188
+
189
+ $handle = 'wp-edit-post'; // this is better than nothing as it is the main editor style.
190
+ $reversed = array_reverse( $wp_styles->registered );
191
+ /** @var _WP_Dependency $style */
192
+ foreach ( $reversed as $style ) {
193
+ // This is the most precise.
194
+ if ( 0 === strpos( $style->src, $style_css_uri ) ) {
195
+ $handle = $style->handle;
196
+ break;
197
+ }
198
+
199
+ // If it is prefixed with the theme slug, it is good also.
200
+ if ( ( 0 === strpos( $style->handle, $theme_slug . '-' ) || 0 === strpos( $style->handle, $theme_slug . '_' ) )
201
+ && false !== strpos( $style->src, '.css' ) ) {
202
+ $handle = $style->handle;
203
+ break;
204
+ }
205
  }
206
+
207
+ return $handle;
208
  }
209
 
210
+ /**
211
+ * Output Customify's dynamic styles in the Gutenberg context.
212
+ *
213
+ * @since 2.2.0
214
+ */
215
+ public function dynamic_styles() {
216
+ $enqueue_parent_handle = $this->get_editor_style_handle();
217
+
218
+ if ( PixCustomifyPlugin()->settings->get_plugin_setting( 'enable_editor_style', true ) ) {
219
+ add_filter( 'customify_typography_css_selector', array(
220
+ $this,
221
+ 'gutenbergify_font_css_selectors'
222
+ ), 10, 2 );
223
+ wp_add_inline_script( 'wp-editor', PixCustomifyPlugin()->customizer->get_typography_dynamic_script() );
224
+ wp_add_inline_style( $enqueue_parent_handle, PixCustomifyPlugin()->customizer->get_typography_dynamic_style() );
225
+ remove_filter( 'customify_typography_css_selector', array(
226
+ $this,
227
+ 'gutenbergify_font_css_selectors'
228
+ ), 10 );
229
+
230
+ add_filter( 'customify_font_css_selector', array( $this, 'gutenbergify_font_css_selectors' ), 10, 2 );
231
+ require_once( PixCustomifyPlugin()->get_base_path() . 'features/class-Font_Selector.php' );
232
+ wp_add_inline_script( 'wp-editor', Customify_Font_Selector::instance()->get_fonts_dynamic_script() );
233
+ wp_add_inline_style( $enqueue_parent_handle, Customify_Font_Selector::instance()->get_fonts_dynamic_style() );
234
+ remove_filter( 'customify_font_css_selector', array( $this, 'gutenbergify_font_css_selectors' ), 10 );
235
+
236
+ add_filter( 'customify_css_selector', array( $this, 'gutenbergify_css_selectors' ), 10, 2 );
237
+ wp_add_inline_style( $enqueue_parent_handle, PixCustomifyPlugin()->customizer->get_dynamic_style() );
238
+ remove_filter( 'customify_css_selector', array( $this, 'gutenbergify_css_selectors' ), 10 );
239
+
240
+ // Add color palettes classes.
241
+ wp_add_inline_style( $enqueue_parent_handle, $this->editor_color_palettes_css_classes() );
242
+ }
243
+ }
244
 
245
+ public function frontend_styles() {
246
+ $enqueue_parent_handle = $this->get_editor_style_handle();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
247
 
248
  // Add color palettes classes.
249
  wp_add_inline_style( $enqueue_parent_handle, $this->editor_color_palettes_css_classes() );
250
  }
 
 
 
 
251
 
252
+ public function gutenbergify_css_selectors( $selectors, $css_property ) {
 
 
253
 
254
+ // Treat the selector(s) as an array.
255
+ $selectors = $this->maybeExplodeSelectors( $selectors );
256
 
257
+ $new_selectors = array();
258
+ foreach ( $selectors as $selector ) {
259
+ // Clean up
260
+ $selector = trim( $selector );
261
 
262
+ // If the selector matches the excluded, skip it.
263
+ if ( $this->preg_match_any( self::$excluded_selectors_regex, $selector ) ) {
264
+ continue;
265
+ }
 
 
 
 
 
266
 
267
+ // If the selector is already Gutenbergy, we will not do anything to it
268
+ if ( preg_match( self::$gutenbergy_selector_regex, $selector ) ) {
269
+ $new_selectors[] = $selector;
270
+ continue;
271
+ }
272
 
273
+ // We will let :root selectors be
274
+ if ( ':root' === $selector ) {
275
+ $new_selectors[] = $selector;
276
+ continue;
277
+ }
278
 
279
+ // For root html elements, we will not prefix them, but replace them with the block and title namespace.
280
+ if ( preg_match( self::$root_regex, $selector ) ) {
281
+ // We will ignore pseudo-selectors
282
+ if ( preg_match( '/^(body|html)[\:\+]+.*$/', $selector ) ) {
283
+ continue;
284
+ }
285
+
286
+ // When it comes to background properties applied at the body level, we need to scope to the editor namespace
287
+ if ( isset( $css_property['property'] ) && 0 === strpos( $css_property['property'], 'background' ) ) {
288
+ $new_selectors[] = preg_replace( '/^(html body|body|html)/', self::$editor_namespace_selector, $selector );
289
+ } else {
290
+ $new_selectors[] = preg_replace( '/^(html body|body|html)/', self::$block_namespace_selector, $selector );
291
+ $new_selectors[] = preg_replace( '/^(html body|body|html)/', self::$title_namespace_selector, $selector );
292
+ }
293
  continue;
294
  }
295
 
296
+ // If we encounter selectors that seem that they could target the post title,
297
+ // we will add selectors for the Gutenberg title also.
298
+ if ( preg_match( self::$title_regex, $selector ) ) {
299
+ $new_selectors[] = preg_replace( self::$title_regex, self::$title_input_namespace_selector, $selector );
 
 
300
  }
 
 
301
 
302
+ $new_selectors[] = self::$block_namespace_selector . ' ' . $selector;
 
 
 
303
  }
304
 
305
+ return implode( ', ', $new_selectors );
306
  }
307
 
308
+ public function gutenbergify_font_css_selectors( $selectors ) {
 
309
 
310
+ // Treat the selector(s) as an array.
311
+ $selectors = $this->maybeExplodeSelectors( $selectors );
312
 
313
+ $new_selectors = array();
314
+ foreach ( $selectors as $selector ) {
315
+ // Clean up
316
+ $selector = trim( $selector );
317
 
318
+ // If the selector matches the excluded, skip it.
319
+ if ( $this->preg_match_any( self::$excluded_selectors_regex, $selector ) ) {
320
+ continue;
321
+ }
322
 
323
+ // If the selector is already Gutenbergy, we will not do anything to it
324
+ if ( preg_match( self::$gutenbergy_selector_regex, $selector ) ) {
325
+ $new_selectors[] = $selector;
326
+ continue;
327
+ }
328
 
329
+ // We will let :root selectors be
330
+ if ( ':root' === $selector ) {
331
+ $new_selectors[] = $selector;
332
+ continue;
333
+ }
334
 
335
+ // For root html elements, we will not prefix them, but replace them with the block and title namespace.
336
+ if ( preg_match( self::$root_regex, $selector ) ) {
337
+ $new_selectors[] = preg_replace( '/^(html body|body|html|)/', self::$block_namespace_selector, $selector );
338
+ $new_selectors[] = preg_replace( '/^(html body|body|html)/', self::$title_namespace_selector, $selector );
339
+ continue;
340
+ }
341
 
342
+ // If we encounter selectors that seem that they could target the post title,
343
+ // we will add selectors for the Gutenberg title also.
344
+ if ( preg_match( self::$title_regex, $selector ) ) {
345
+ $new_selectors[] = preg_replace( self::$title_regex, self::$title_input_namespace_selector, $selector );
346
+ }
 
347
 
348
+ $new_selectors[] = self::$block_namespace_selector . ' ' . $selector;
 
 
 
349
  }
350
 
351
+ return implode( ', ', $new_selectors );
352
  }
353
 
354
+ /**
355
+ * Preg_match a series of regex against a subject.
356
+ *
357
+ * @param string|array $regexes
358
+ * @param string $subject
359
+ *
360
+ * @return bool Returns true if at least one of the regex matches, false otherwise.
361
+ */
362
+ public function preg_match_any( $regexes, $subject ) {
363
+ if ( is_string( $regexes ) ) {
364
+ $regexes = array( $regexes );
365
+ }
366
 
367
+ if ( ! is_array( $regexes ) ) {
368
+ return false;
369
+ }
370
+
371
+ foreach ( $regexes as $regex ) {
372
+ if ( preg_match( $regex, $subject ) ) {
373
+ return true;
374
+ }
375
+ }
 
 
 
376
 
 
377
  return false;
378
  }
379
 
380
+ /**
381
+ * Attempt to split a string with selectors and return the parts as an array.
382
+ * If not a string or no comma present, just returns the value.
383
+ *
384
+ * @param mixed $value
385
+ *
386
+ * @return array|false|string[]
387
+ */
388
+ public function maybeExplodeSelectors( $value ) {
389
+ if ( ! is_string( $value ) ) {
390
+ return $value;
391
  }
392
+
393
+ return preg_split( '#[\s]*,[\s]*#', $value, - 1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE );
394
  }
395
 
396
+ /**
397
+ * Add the SM Color Palettes to the editor sidebar.
398
+ */
399
+ public function editor_color_palettes() {
400
+ // Bail if Color Palettes are not supported
401
+ if ( ! Customify_Color_Palettes::instance()->is_supported() ) {
402
+ return;
403
+ }
404
 
405
+ $options_details = PixCustomifyPlugin()->get_options_configs();
 
 
 
 
 
 
 
 
 
 
 
406
 
407
+ $master_color_control_ids = Customify_Color_Palettes::instance()->get_all_master_color_controls_ids();
408
+ if ( empty( $master_color_control_ids ) ) {
409
+ return;
410
+ }
411
 
412
+ $editor_color_palettes = array();
413
+ foreach ( $master_color_control_ids as $control_id ) {
414
+ if ( empty( $options_details[ $control_id ] ) ) {
415
+ continue;
416
+ }
 
 
 
417
 
418
+ $value = get_option( $control_id . '_final' );
419
+ if ( empty( $value ) ) {
420
+ continue;
421
+ }
422
 
423
+ $editor_color_palettes[] = array(
424
+ 'name' => $options_details[ $control_id ]['label'],
425
+ 'slug' => $control_id,
426
+ 'color' => esc_html( $value ),
427
+ );
428
+ }
429
 
430
+ if ( ! empty( $editor_color_palettes ) ) {
431
+ /**
432
+ * Custom colors for use in the editor.
433
+ *
434
+ * @link https://wordpress.org/gutenberg/handbook/reference/theme-support/
435
+ */
436
+ add_theme_support(
437
+ 'editor-color-palette',
438
+ $editor_color_palettes
439
+ );
440
  }
441
+ }
442
 
443
+ /**
444
+ * Generate the special classes for our colors.
445
+ */
446
+ public function editor_color_palettes_css_classes() {
447
+ // Bail if Color Palettes are not supported
448
+ if ( ! Customify_Color_Palettes::instance()->is_supported() ) {
449
+ return '';
450
  }
451
 
452
+ $options_details = PixCustomifyPlugin()->get_options_configs();
 
 
 
 
 
453
 
454
+ $master_color_control_ids = Customify_Color_Palettes::instance()->get_all_master_color_controls_ids();
455
+ if ( empty( $master_color_control_ids ) ) {
456
+ return '';
457
+ }
 
 
 
 
 
 
 
 
458
 
459
+ // Build styles.
460
+ $css = '';
461
+ foreach ( $master_color_control_ids as $control_id ) {
462
+ if ( empty( $options_details[ $control_id ] ) ) {
463
+ continue;
464
+ }
 
 
465
 
466
+ $value = get_option( $control_id . '_final' );
467
+ if ( empty( $value ) ) {
468
+ continue;
469
+ }
470
 
471
+ $editor_color_palettes[] = array(
472
+ 'name' => $options_details[ $control_id ]['label'],
473
+ 'slug' => $control_id,
474
+ 'color' => esc_html( $value ),
475
+ );
476
 
477
+ $color_in_kebab_case = self::to_kebab_case( $control_id );
 
 
 
 
 
478
 
479
+ $css .= '.has-' . $color_in_kebab_case . '-color { color: ' . esc_attr( $value ) . ' !important; }';
480
+ $css .= '.has-' . $color_in_kebab_case . '-background-color { background-color: ' . esc_attr( $value ) . '; }';
 
481
  }
482
 
483
+ return wp_strip_all_tags( $css );
484
+ }
 
 
 
 
 
485
 
486
+ public static function to_kebab_case( $string ) {
487
+ return implode( '-', array_map( '\strtolower', preg_split( "/[\n\r\t -_]+/", preg_replace( "/['\x{2019}]/u", '', $string ), - 1, PREG_SPLIT_NO_EMPTY ) ) );
488
  }
 
 
489
 
490
+ /**
491
+ * Main Customify_Gutenberg Instance
492
+ *
493
+ * Ensures only one instance of Customify_Gutenberg is loaded or can be loaded.
494
+ *
495
+ * @return Customify_Gutenberg Main Customify_Gutenberg instance
496
+ * @since 2.2.0
497
+ * @static
498
+ *
499
+ */
500
+ public static function instance() {
501
+
502
+ if ( is_null( self::$_instance ) ) {
503
+ self::$_instance = new self();
504
+ }
505
 
506
+ return self::$_instance;
507
+ } // End instance ()
 
 
 
 
 
 
 
 
 
 
 
 
 
508
 
509
+ /**
510
+ * Cloning is forbidden.
511
+ *
512
+ * @since 2.2.0
513
+ */
514
+ public function __clone() {
515
 
516
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'You should not do that!', 'customify' ), null );
517
+ }
 
 
 
 
518
 
519
+ /**
520
+ * Unserializing instances of this class is forbidden.
521
+ *
522
+ * @since 2.2.0
523
+ */
524
+ public function __wakeup() {
525
 
526
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'You should not do that!', 'customify' ), null );
527
+ }
528
+ }
 
 
 
529
 
 
 
530
  }
 
 
includes/class-customify-settings.php CHANGED
@@ -418,8 +418,8 @@ class Customify_Settings {
418
  */
419
  public function __clone() {
420
 
421
- _doing_it_wrong( __FUNCTION__, esc_html( __( 'Cheatin&#8217; huh?' ) ), null );
422
- } // End __clone ()
423
 
424
  /**
425
  * Unserializing instances of this class is forbidden.
@@ -428,6 +428,6 @@ class Customify_Settings {
428
  */
429
  public function __wakeup() {
430
 
431
- _doing_it_wrong( __FUNCTION__, esc_html( __( 'Cheatin&#8217; huh?' ) ), null );
432
- } // End __wakeup ()
433
  }
418
  */
419
  public function __clone() {
420
 
421
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'You should not do that!', 'customify' ), null );
422
+ }
423
 
424
  /**
425
  * Unserializing instances of this class is forbidden.
428
  */
429
  public function __wakeup() {
430
 
431
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'You should not do that!', 'customify' ), null );
432
+ }
433
  }
includes/class-customify-style-manager.php CHANGED
@@ -11,706 +11,851 @@ if ( ! defined( 'ABSPATH' ) ) {
11
  exit; // Exit if accessed directly
12
  }
13
 
14
- if ( ! class_exists( 'Customify_Style_Manager' ) ) :
15
-
16
- class Customify_Style_Manager {
17
-
18
- /**
19
- * Holds the only instance of this class.
20
- * @var null|Customify_Style_Manager
21
- * @access protected
22
- * @since 1.7.0
23
- */
24
- protected static $_instance = null;
25
-
26
- /**
27
- * The main plugin object (the parent).
28
- * @var null|PixCustomifyPlugin
29
- * @access public
30
- * @since 1.7.0
31
- */
32
- public $parent = null;
33
-
34
- /**
35
- * The external theme configs object.
36
- * @var null|Customify_Theme_Configs
37
- * @access public
38
- * @since 1.7.4
39
- */
40
- protected $theme_configs = null;
41
-
42
- /**
43
- * The color palettes object.
44
- * @var null|Customify_Color_Palettes
45
- * @access public
46
- * @since 1.7.4
47
- */
48
- protected $color_palettes = null;
49
-
50
- /**
51
- * The font palettes object.
52
- * @var null|Customify_Font_Palettes
53
- * @access public
54
- * @since 1.7.4
55
- */
56
- protected $font_palettes = null;
57
-
58
- /**
59
- * The Cloud API object.
60
- * @var null|Customify_Cloud_Api
61
- * @access public
62
- * @since 1.7.4
63
- */
64
- protected $cloud_api = null;
65
-
66
- /**
67
- * Constructor.
68
- *
69
- * @since 1.7.0
70
- */
71
- protected function __construct() {
72
- $this->init();
73
- }
74
 
75
- /**
76
- * Initialize this module.
77
- *
78
- * @since 1.7.4
79
- */
80
- public function init() {
81
  /**
82
- * Initialize the Themes Config logic.
 
 
 
83
  */
84
- require_once 'class-customify-theme-configs.php';
85
- $this->theme_configs = Customify_Theme_Configs::instance();
86
 
87
  /**
88
- * Initialize the Color Palettes logic.
 
 
 
89
  */
90
- require_once 'class-customify-color-palettes.php';
91
- $this->color_palettes = Customify_Color_Palettes::instance();
92
 
93
  /**
94
- * Initialize the Font Palettes logic.
 
 
 
95
  */
96
- require_once 'class-customify-font-palettes.php';
97
- $this->font_palettes = Customify_Font_Palettes::instance();
98
 
99
  /**
100
- * Initialize the Cloud API logic.
 
 
 
101
  */
102
- require_once 'lib/class-customify-cloud-api.php';
103
- $this->cloud_api = new Customify_Cloud_Api();
104
-
105
- // Hook up.
106
- $this->add_hooks();
107
- }
108
 
109
- /**
110
- * Initiate our hooks
111
- *
112
- * @since 1.7.0
113
- */
114
- public function add_hooks() {
115
- /*
116
- * Handle the Customizer Style Manager base config.
117
  */
118
- add_filter( 'customify_filter_fields', array( $this, 'style_manager_section_base_config' ), 12, 1 );
119
 
120
- /*
121
- * Handle the grouping and reorganization of the Customizer theme sections when the Style Manager is active.
 
 
 
122
  */
123
- add_filter( 'customify_final_config', array( $this, 'reorganize_sections' ), 10, 1 );
124
 
125
- /*
126
- * Handle the logic for user feedback.
 
 
127
  */
128
- add_action( 'customize_controls_print_footer_scripts', array( $this, 'output_user_feedback_modal' ) );
129
- add_action( 'wp_ajax_customify_style_manager_user_feedback', array( $this, 'user_feedback_callback' ) );
130
 
131
- /*
132
- * Scripts enqueued in the Customizer.
 
 
133
  */
134
- add_action( 'customize_controls_init', array( $this, 'register_admin_customizer_scripts' ), 10 );
135
- add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_admin_customizer_scripts' ), 10 );
136
- }
137
 
138
- /**
139
- * Register Customizer admin scripts.
140
- */
141
- function register_admin_customizer_scripts() {
142
- wp_register_script( PixCustomifyPlugin()->get_slug() . '-style-manager', plugins_url( 'js/customizer/style-manager.js', PixCustomifyPlugin()->get_file() ), array( 'jquery' ), PixCustomifyPlugin()->get_version() );
143
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
 
145
- /**
146
- * Enqueue Customizer admin scripts
147
- */
148
- function enqueue_admin_customizer_scripts() {
149
- // If there is no style manager support, bail early.
150
- if ( ! $this->is_supported() ) {
151
- return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
  }
153
 
154
- // Enqueue the needed scripts, already registered.
155
- wp_enqueue_script( PixCustomifyPlugin()->get_slug() . '-style-manager' );
156
- }
 
 
 
157
 
158
- /**
159
- * Determine if Style Manager is supported.
160
- *
161
- * @since 1.7.0
162
- *
163
- * @return bool
164
- */
165
- public function is_supported() {
166
- $has_support = (bool) current_theme_supports( 'customizer_style_manager' );
167
-
168
- return apply_filters( 'customify_style_manager_is_supported', $has_support );
169
- }
170
 
171
- /**
172
- * Setup the Style Manager Customizer section base config.
173
- *
174
- * This handles the base configuration for the controls in the Style Manager section. We expect other parties (e.g. the theme),
175
- * to come and fill up the missing details (e.g. connected fields).
176
- *
177
- * @since 1.7.0
178
- *
179
- * @param array $config This holds required keys for the plugin config like 'opt-name', 'panels', 'settings'
180
- * @return array
181
- */
182
- public function style_manager_section_base_config( $config ) {
183
- // If there is no style manager support, bail early.
184
- if ( ! $this->is_supported() ) {
185
- return $config;
186
  }
187
 
188
- if ( ! isset( $config['sections']['style_manager_section'] ) ) {
189
- $config['sections']['style_manager_section'] = array();
 
 
 
 
 
 
 
 
 
190
  }
191
 
192
- // The section might be already defined, thus we merge, not replace the entire section config.
193
- $config['sections']['style_manager_section'] = array_replace_recursive( $config['sections']['style_manager_section'], array(
194
- 'title' => esc_html__( 'Style Manager', 'customify' ),
195
- 'section_id' => 'style_manager_section', // We will force this section id preventing prefixing and other regular processing.
196
- 'priority' => 1,
197
- 'options' => array(),
198
- ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
 
200
- return $config;
201
- }
 
 
 
 
 
 
202
 
203
- /**
204
- * Reorganize the Customizer sections.
205
- *
206
- * @since 1.7.4
207
- *
208
- * @param array $config This holds required keys for the plugin config like 'opt-name', 'panels', 'settings'.
209
- * @return array
210
- */
211
- public function reorganize_sections( $config ) {
212
- // If there is no style manager support, bail early.
213
- if ( ! $this->is_supported() ) {
214
  return $config;
215
  }
216
 
217
- // If there is no Style Manager section or panel, bail.
218
- if ( ! isset( $config['sections']['style_manager_section'] ) &&
219
- ! isset( $config['panels']['style_manager_panel'] ) ) {
 
 
 
 
 
 
 
 
 
 
 
220
 
221
- return $config;
222
- }
 
223
 
224
- $style_manager_section_config = false;
225
- if ( isset( $config['sections']['style_manager_section'] ) ) {
226
- $style_manager_section_config = $config['sections']['style_manager_section'];
227
- unset( $config['sections']['style_manager_section'] );
228
- }
229
 
230
- // All the other sections.
231
- $other_theme_sections_config = $config['sections'];
232
- unset( $config['sections'] );
233
-
234
- // The Style Manager panel.
235
- if ( empty( $config['panels']['style_manager_panel'] ) ) {
236
- $style_manager_panel_config = array(
237
- 'priority' => 22,
238
- 'capability' => 'edit_theme_options',
239
- 'panel_id' => 'style_manager_panel',
240
- 'title' => esc_html__( 'Style Manager', 'customify' ),
241
- 'description' => __( '<strong>Style Manager</strong> is an intuitive system to help you change the look of your website and make an excellent impression.', 'customify' ),
242
- 'sections' => array(),
243
- 'auto_expand_sole_section' => true, // If there is only one section in the panel, auto-expand it.
244
- );
245
- } else {
246
- $style_manager_panel_config = $config['panels']['style_manager_panel'];
247
- unset( $config['panels']['style_manager_panel'] );
248
- }
249
 
250
- $other_panels_config = false;
251
- if ( ! empty( $config['panels'] ) ) {
252
- $other_panels_config = $config['panels'];
253
- unset( $config['panels'] );
254
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
 
256
- // Maybe handle the color palettes.
257
- if ( is_array( $style_manager_section_config ) && class_exists( 'Customify_Color_Palettes' ) && Customify_Color_Palettes::instance()->is_supported() ) {
258
-
259
- // We need to split the fields in the Style Manager section into two: color palettes and fonts.
260
- $color_palettes_fields = array(
261
- 'sm_current_color_palette',
262
- 'sm_palettes_description',
263
- 'sm_filters_description',
264
- 'sm_customize_description',
265
- 'sm_color_matrix',
266
- 'sm_palette_filter',
267
- 'sm_coloration_level',
268
- 'sm_color_diversity',
269
- 'sm_shuffle_colors',
270
- 'sm_dark_mode',
271
- 'sm_dark_color_master_slider',
272
- 'sm_dark_color_primary_slider',
273
- 'sm_dark_color_secondary_slider',
274
- 'sm_dark_color_tertiary_slider',
275
- 'sm_colors_dispersion',
276
- 'sm_colors_focus_point',
277
- 'sm_color_palette',
278
- 'sm_color_palette_variation',
279
- 'sm_color_primary',
280
- 'sm_color_primary_final',
281
- 'sm_color_secondary',
282
- 'sm_color_secondary_final',
283
- 'sm_color_tertiary',
284
- 'sm_color_tertiary_final',
285
- 'sm_dark_primary',
286
- 'sm_dark_primary_final',
287
- 'sm_dark_secondary',
288
- 'sm_dark_secondary_final',
289
- 'sm_dark_tertiary',
290
- 'sm_dark_tertiary_final',
291
- 'sm_light_primary',
292
- 'sm_light_primary_final',
293
- 'sm_light_secondary',
294
- 'sm_light_secondary_final',
295
- 'sm_light_tertiary',
296
- 'sm_light_tertiary_final',
297
- 'sm_swap_colors',
298
- 'sm_swap_dark_light',
299
- 'sm_swap_colors_dark',
300
- 'sm_swap_secondary_colors_dark',
301
- 'sm_advanced_toggle',
302
- 'sm_spacing_bottom',
303
- );
304
 
305
- $color_palettes_section_config = array(
306
- 'title' => esc_html__( 'Colors', 'customify' ),
307
- 'section_id' => 'sm_color_palettes_section',
308
- 'priority' => 10,
309
- 'options' => array(),
310
- );
311
- foreach ( $color_palettes_fields as $field_id ) {
312
- if ( ! isset( $style_manager_section_config['options'][ $field_id ] ) ) {
313
- continue;
314
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
315
 
316
- if ( empty( $color_palettes_section_config['options'] ) ) {
317
- $color_palettes_section_config['options'] = array( $field_id => $style_manager_section_config['options'][ $field_id ] );
318
- } else {
319
- $color_palettes_section_config['options'] = array_merge( $color_palettes_section_config['options'], array( $field_id => $style_manager_section_config['options'][ $field_id ] ) );
 
320
  }
 
 
321
  }
322
 
323
- $style_manager_panel_config['sections']['sm_color_palettes_section'] = $color_palettes_section_config;
324
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
325
 
326
- // Maybe handle the font palettes.
327
- if ( is_array( $style_manager_section_config ) && class_exists( 'Customify_Font_Palettes' ) && Customify_Font_Palettes::instance()->is_supported() ) {
328
-
329
- $font_palettes_fields = array(
330
- 'sm_font_palette',
331
- 'sm_font_palette_variation',
332
- 'sm_font_primary',
333
- 'sm_font_secondary',
334
- 'sm_font_body',
335
- 'sm_swap_fonts',
336
- 'sm_swap_primary_secondary_fonts',
337
- );
338
 
339
- $font_palettes_section_config = array(
340
- 'title' => esc_html__( 'Fonts', 'customify' ),
341
- 'section_id' => 'sm_font_palettes_section',
342
- 'priority' => 20,
343
- 'options' => array(),
 
 
 
 
 
 
 
 
 
 
 
 
344
  );
345
- foreach ( $font_palettes_fields as $field_id ) {
346
- if ( ! isset( $style_manager_section_config['options'][ $field_id ] ) ) {
347
- continue;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
348
  }
349
 
350
- if ( empty( $font_palettes_section_config['options'] ) ) {
351
- $font_palettes_section_config['options'] = array( $field_id => $style_manager_section_config['options'][ $field_id ] );
352
- } else {
353
- $font_palettes_section_config['options'] = array_merge( $font_palettes_section_config['options'], array( $field_id => $style_manager_section_config['options'][ $field_id ] ) );
 
 
 
 
 
 
 
354
  }
 
355
  }
356
 
357
- $style_manager_panel_config['sections']['sm_font_palettes_section'] = $font_palettes_section_config;
358
- }
 
 
359
 
360
- // Start fresh and add the Style Manager panel config
361
- if ( empty( $config['panels'] ) ) {
362
- $config['panels'] = array();
 
 
 
 
 
 
 
 
 
 
363
  }
364
- $config['panels']['style_manager_panel'] = $style_manager_panel_config;
365
-
366
- // The Theme Options panel.
367
- $theme_options_panel_config = array(
368
- 'priority' => 23,
369
- 'capability' => 'edit_theme_options',
370
- 'panel_id' => 'theme_options_panel',
371
- 'title' => esc_html__( 'Theme Options', 'customify' ),
372
- 'description' => esc_html__( 'Advanced options to change your site look-and-feel on a detailed level.', 'customify' ),
373
- 'sections' => array(),
374
- );
375
-
376
- // If we have other panels we will make their sections parts of the Theme Options panel.
377
- if ( ! empty( $other_panels_config ) ) {
378
- // If we have another panel that is called Theme Options we will extract it's sections and put them directly in the Theme Options panel.
379
- $second_theme_options_sections = array();
380
- foreach ( $other_panels_config as $panel_id => $panel_config ) {
381
- $found = false;
382
- // First try the panel ID.
383
- if ( false !== strpos( strtolower( str_replace( '-', '_', $panel_id ) ), 'theme_options' ) ) {
384
- $found = true;
385
- }
386
 
387
- // Second, try the panel title.
388
- if ( ! $found && ! empty( $panel_config['title'] ) && false !== strpos( strtolower( str_replace( array( '-', '_'), ' ', $panel_config['title'] ) ), ' theme options' ) ) {
389
- $found = true;
390
- }
 
 
 
 
 
391
 
392
- if ( $found && ! empty( $panel_config['sections'] ) ) {
393
- $second_theme_options_sections = array_merge( $second_theme_options_sections, $panel_config['sections'] );
394
- unset( $other_panels_config[ $panel_id ] );
395
- }
396
- }
397
- if ( ! empty( $second_theme_options_sections ) ) {
398
- $theme_options_panel_config['sections'] = array_merge( $theme_options_panel_config['sections'], $second_theme_options_sections );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
399
  }
400
 
401
- // For the remaining panels, we will put their section into the Theme Options panel, but prefix their title with their respective panel title.
402
- $prefixed_sections = array();
403
- foreach ( $other_panels_config as $panel_id => $panel_config ) {
404
- if ( ! empty( $panel_config['sections'] ) ) {
405
- foreach ( $panel_config['sections'] as $section_id => $section_config ) {
406
- if ( ! empty( $section_config['title'] ) && ! empty( $panel_config['title'] ) ) {
407
- $section_config['title'] = $panel_config['title'] . ' - ' . $section_config['title'];
408
- }
409
- $prefixed_sections[ $panel_id . '_' . $section_id ] = $section_config;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
410
  }
411
  }
 
 
 
 
 
 
 
 
412
  }
413
- $theme_options_panel_config['sections'] = array_merge( $theme_options_panel_config['sections'], $prefixed_sections );
 
414
  }
415
 
416
- // If we have other sections we will add them to the Theme Options panel.
417
- if ( ! empty( $other_theme_sections_config ) ) {
418
- $theme_options_panel_config['sections'] = array_merge( $theme_options_panel_config['sections'], $other_theme_sections_config );
 
 
 
 
 
 
 
 
 
 
 
419
  }
420
 
421
- if ( empty( $config['panels']['theme_options_panel'] ) ) {
422
- $config['panels']['theme_options_panel'] = $theme_options_panel_config;
423
- } else {
424
- $config['panels']['theme_options_panel'] = array_merge( $config['panels']['theme_options_panel'], $theme_options_panel_config );
 
 
 
 
 
 
 
 
 
425
  }
426
 
427
- // Add the logic that handles sections and controls added directly to WP_Customizer, not through the config.
428
- add_action( 'customize_register', array( $this, 'reorganize_direct_sections_and_controls' ), 100 );
 
 
429
 
430
- // Remove the switch theme panel from the Customizer.
431
- add_action( 'customize_register', array( $this, 'remove_switch_theme_panel' ), 12 );
432
 
433
- return $config;
434
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
435
 
436
- /**
437
- * Reorganizes sections and controls added directly to WP_Customizer, not through the config.
438
- *
439
- * @todo Please note that this is house cleaning and it is only necessary due to the lack of complete standardization on the theme side. We should not need this forever!
440
- *
441
- * @since 1.9.0
442
- *
443
- * @param WP_Customize_Manager $wp_customize
444
- */
445
- public function reorganize_direct_sections_and_controls( $wp_customize ) {
446
- // We will do out best to identify direct sections and move their controls to the appropriate place.
447
- /** @var WP_Customize_Section $section */
448
- foreach ( $wp_customize->sections() as $section ) {
449
- // These are general theme options sections that need to have their controls moved to the Theme Options > General section.
450
- if ( false !== strpos( $section->id, 'theme_options') ) {
451
- $theme_options_panel = $wp_customize->get_panel( 'theme_options_panel' );
452
- $general_section = false;
453
- foreach ( $theme_options_panel->sections as $theme_options_section ) {
454
- if ( false !== strpos( $theme_options_section->id, 'general' ) ) {
455
- $general_section = $section;
456
  }
457
- }
458
 
459
- if ( false === $general_section ) {
460
- // We need to add a general section in the Theme Options panel.
461
- $general_section = $wp_customize->add_section( 'theme_options[general]', array(
462
- 'title' => esc_html__( 'General', 'customify' ),
463
- 'panel' => $theme_options_panel->id,
464
- 'priority' => 2,
465
- ) );
466
- }
467
 
468
- // Move all the controls in the identified theme options section to the general one.
469
- /** @var WP_Customize_Control $control */
470
- foreach ( $wp_customize->controls() as $control ) {
471
- if ( $control->section !== $section->id ) {
472
- continue;
473
  }
474
 
475
- $control->section = $general_section->id;
476
- }
477
-
478
- // Finally remove the now empty section.
479
- $wp_customize->remove_section( $section->id );
480
 
481
- break;
 
482
  }
483
  }
484
- }
485
-
486
- /**
487
- * Remove the switch/preview theme panel.
488
- *
489
- * @since 1.7.4
490
- *
491
- * @param WP_Customize_Manager $wp_customize
492
- */
493
- public function remove_switch_theme_panel( $wp_customize ) {
494
- $wp_customize->remove_panel( 'themes' );
495
- }
496
 
497
- /**
498
- * Output the user feedback modal markup, if we need to.
499
- *
500
- * @since 1.7.0
501
- */
502
- public function output_user_feedback_modal() {
503
- // If there is no style manager support, bail early.
504
- if ( ! $this->is_supported() ) {
505
- return;
 
506
  }
507
 
508
- // We want to ask for feedback once a month.
509
- $a_month_back = time() - MONTH_IN_SECONDS;
510
-
511
- // Only output if we should ask for feedback.
512
- if ( $this->should_ask_for_feedback( $a_month_back ) ) { ?>
513
- <div id="style-manager-user-feedback-modal">
514
- <div class="modal">
515
- <div class="modal-dialog" role="document">
516
- <div class="modal-content">
517
- <form id="style-manager-user-feedback" action="#" method="post">
518
- <input type="hidden" name="type" value="1_to_5" />
519
- <div class="modal-header">
520
- <button type="button" class="close icon media-modal-close" data-dismiss="modal" aria-label="Close"><span class="media-modal-icon"><span class="screen-reader-text">Close media panel</span></span></button>
521
- <!-- <a href="#" class="close button button--naked gray" data-dismiss="modal" aria-label="Close">Close</a> -->
522
- </div>
523
- <div class="modal-body full">
524
- <div class="box box--large">
525
- <div class="first-step">
526
- <h2 class="modal-title">How would you rate your experience in finding the right colors for your site?</h2>
527
- <div class="scorecard">
528
- <span>Poor</span>
529
- <label>
530
- <input type="radio" name="rating" value="1" required />
531
- <span>1</span>
532
- </label>
533
- <label>
534
- <input type="radio" name="rating" value="2" required />
535
- <span>2</span>
536
- </label>
537
- <label>
538
- <input type="radio" name="rating" value="3" required />
539
- <span>3</span>
540
- </label>
541
- <label>
542
- <input type="radio" name="rating" value="4" required />
543
- <span>4</span>
544
- </label>
545
- <label>
546
- <input type="radio" name="rating" value="5" required />
547
- <span>5</span>
548
- </label>
549
- <span>Great</span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
550
  </div>
551
- </div>
552
- <div class="second-step hidden">
553
- <p><strong>What points along the way made this a <span class="rating-placeholder">5</span>* experience for you?</strong><br>We are counting on your insights to guide us in doing better 🙏</p>
554
- <div class="not-floating-labels">
555
- <div class="form-row field">
556
- <textarea name="message" placeholder="Describe your experience in customizing your site colors.."
557
- id="style-manager-user-feedback-message" rows="6" oninvalid="this.setCustomValidity('May we have a little more info about your experience?')" oninput="setCustomValidity('')" required></textarea>
 
 
 
 
 
 
558
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
559
  </div>
560
- <button id="style-manager-user-feedback_btn" class="button" type="submit"><?php _e( 'Send us your insights', 'customify' ); ?></button>
561
- </div>
562
- <div class="thanks-step hidden">
563
- <h3 class="modal-title">Thank you so much for your feedback!</h3>
564
- <p>It means the world to us as we strive to constantly push the limits and aim higher. Stay awesome! 🤗</p>
565
- <p><em>The Pixelgrade Team</em></p>
566
- </div>
567
- <div class="error-step hidden">
568
- <h3 class="modal-title">We've hit a snag!</h3>
569
- <p>We couldn't record your feedback and we would truly appreciate it if you would try it again at a latter time. Stay awesome! 🤗</p>
570
  </div>
571
  </div>
572
- </div>
573
- <div class="modal-footer full">
574
 
575
- </div>
576
- </form>
 
577
  </div>
578
  </div>
 
 
 
579
  </div>
580
- <!-- End Modal -->
581
- <!-- Modal Backdrop (Shadow) -->
582
- <div class="modal-backdrop"></div>
583
- </div>
584
 
585
- <?php }
586
- }
587
-
588
- /**
589
- * Return whether user provided feedback, and if so, return the timestamp.
590
- *
591
- * @return bool|int
592
- */
593
- public function user_provided_feedback() {
594
- $user_provided_feedback = get_option( 'style_manager_user_feedback_provided' );
595
- if ( empty( $user_provided_feedback ) ) {
596
- return false;
597
  }
598
 
599
- return $user_provided_feedback;
600
- }
 
 
 
 
 
 
 
 
601
 
602
- /**
603
- * Determine if we should ask for user feedback.
604
- *
605
- * @param bool|int $timestamp_limit Optional. Timestamp to compare the time the user provided feedback.
606
- * If the provided timestamp is earlier than the time the user provided feedback, should ask again.
607
- *
608
- * @return bool
609
- */
610
- public function should_ask_for_feedback( $timestamp_limit = false ) {
611
- if ( defined( 'CUSTOMIFY_SM_ALWAYS_ASK_FOR_FEEDBACK' ) && true === CUSTOMIFY_SM_ALWAYS_ASK_FOR_FEEDBACK ) {
612
- return true;
613
  }
614
 
615
- $feedback_timestamp = $this->user_provided_feedback();
616
- if ( empty( $feedback_timestamp ) ) {
617
- return true;
618
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
619
 
620
- if ( ! empty( $timestamp_limit ) && intval( $timestamp_limit ) > intval( $feedback_timestamp ) ) {
621
- return true;
622
  }
623
 
624
- return false;
625
- }
 
 
 
 
 
 
 
 
 
626
 
627
- /**
628
- * Callback for the user feedback AJAX call.
629
- *
630
- * @since 1.7.0
631
- */
632
- public function user_feedback_callback() {
633
- check_ajax_referer( 'customify_style_manager_user_feedback', 'nonce' );
634
 
635
- if ( empty( $_POST['type'] ) ) {
636
- wp_send_json_error( esc_html__( 'No type provided', 'customify' ) );
637
- }
 
 
 
638
 
639
- if ( empty( $_POST['rating'] ) ) {
640
- wp_send_json_error( esc_html__( 'No rating provided', 'customify' ) );
641
- }
 
 
 
 
 
642
 
643
- $type = sanitize_text_field( $_POST['type'] );
644
- $rating = intval( $_POST['rating'] );
645
- $message = '';
646
- if ( ! empty( $_POST['message'] ) ) {
647
- $message = wp_kses_post( $_POST['message'] );
648
- }
 
 
 
 
649
 
650
- $request_data = array(
651
- 'site_url' => home_url( '/' ),
652
- 'satisfaction_data' => array(
653
- 'type' => $type,
654
- 'rating' => $rating,
655
- 'message' => $message,
656
- ),
657
- );
658
-
659
- // Send the feedback.
660
- $response = $this->cloud_api->send_stats( $request_data, true );
661
- if ( is_wp_error( $response ) ) {
662
- wp_send_json_error( esc_html__( 'Sorry, something went wrong and we couldn\'t save your feedback.', 'customify' ) );
663
- }
664
- $response_data = json_decode( wp_remote_retrieve_body( $response ), true );
665
- // Bail in case of decode error or failure to retrieve data
666
- if ( null === $response_data || empty( $response_data['code'] ) || 'success' !== $response_data['code'] ) {
667
- wp_send_json_error( esc_html__( 'Sorry, something went wrong and we couldn\'t save your feedback.', 'customify' ) );
668
  }
669
 
670
- // We need to remember that the user provided feedback (and at what timestamp).
671
- update_option( 'style_manager_user_feedback_provided', time(), true );
 
 
 
 
 
 
 
 
 
672
 
673
- wp_send_json_success( esc_html__( 'Thank you for your feedback.', 'customify' ) );
674
- }
 
675
 
676
- /**
677
- * Main Customify_Style_Manager Instance
678
- *
679
- * Ensures only one instance of Customify_Style_Manager is loaded or can be loaded.
680
- *
681
- * @since 1.7.0
682
- * @static
683
- *
684
- * @return Customify_Style_Manager Main Customify_Style_Manager instance
685
- */
686
- public static function instance() {
687
-
688
- if ( is_null( self::$_instance ) ) {
689
- self::$_instance = new self();
690
  }
691
 
692
- return self::$_instance;
693
- } // End instance ()
 
 
 
 
694
 
695
- /**
696
- * Cloning is forbidden.
697
- *
698
- * @since 1.7.0
699
- */
700
- public function __clone() {
701
 
702
- _doing_it_wrong( __FUNCTION__,esc_html( __( 'Cheatin&#8217; huh?' ) ), null );
703
- } // End __clone ()
 
 
 
 
704
 
705
- /**
706
- * Unserializing instances of this class is forbidden.
707
- *
708
- * @since 1.7.0
709
- */
710
- public function __wakeup() {
711
 
712
- _doing_it_wrong( __FUNCTION__, esc_html( __( 'Cheatin&#8217; huh?' ) ), null );
713
- } // End __wakeup ()
714
  }
715
-
716
- endif;
11
  exit; // Exit if accessed directly
12
  }
13
 
14
+ if ( ! class_exists( 'Customify_Style_Manager' ) ) {
15
+
16
+ class Customify_Style_Manager {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
 
 
 
 
 
 
18
  /**
19
+ * Holds the only instance of this class.
20
+ * @var null|Customify_Style_Manager
21
+ * @access protected
22
+ * @since 1.7.0
23
  */
24
+ protected static $_instance = null;
 
25
 
26
  /**
27
+ * The main plugin object (the parent).
28
+ * @var null|PixCustomifyPlugin
29
+ * @access public
30
+ * @since 1.7.0
31
  */
32
+ public $parent = null;
 
33
 
34
  /**
35
+ * The external theme configs object.
36
+ * @var null|Customify_Theme_Configs
37
+ * @access public
38
+ * @since 1.7.4
39
  */
40
+ protected $theme_configs = null;
 
41
 
42
  /**
43
+ * The color palettes object.
44
+ * @var null|Customify_Color_Palettes
45
+ * @access public
46
+ * @since 1.7.4
47
  */
48
+ protected $color_palettes = null;
 
 
 
 
 
49
 
50
+ /**
51
+ * The font palettes object.
52
+ * @var null|Customify_Font_Palettes
53
+ * @access public
54
+ * @since 1.7.4
 
 
 
55
  */
56
+ protected $font_palettes = null;
57
 
58
+ /**
59
+ * The Cloud API object.
60
+ * @var null|Customify_Cloud_Api
61
+ * @access public
62
+ * @since 1.7.4
63
  */
64
+ protected $cloud_api = null;
65
 
66
+ /**
67
+ * Cache for the wupdates identification data to avoid firing the filter multiple times.
68
+ * @var array
69
+ * @access protected
70
  */
71
+ protected static $wupdates_ids = array();
 
72
 
73
+ /**
74
+ * Constructor.
75
+ *
76
+ * @since 1.7.0
77
  */
78
+ protected function __construct() {
79
+ $this->init();
80
+ }
81
 
82
+ /**
83
+ * Initialize this module.
84
+ *
85
+ * @since 1.7.4
86
+ */
87
+ public function init() {
88
+ /**
89
+ * Initialize the Themes Config logic.
90
+ */
91
+ require_once 'class-customify-theme-configs.php';
92
+ $this->theme_configs = Customify_Theme_Configs::instance();
93
+
94
+ /**
95
+ * Initialize the Color Palettes logic.
96
+ */
97
+ require_once 'class-customify-color-palettes.php';
98
+ $this->color_palettes = Customify_Color_Palettes::instance();
99
+
100
+ /**
101
+ * Initialize the Font Palettes logic.
102
+ */
103
+ require_once 'class-customify-font-palettes.php';
104
+ $this->font_palettes = Customify_Font_Palettes::instance();
105
+
106
+ /**
107
+ * Initialize the Cloud API logic.
108
+ */
109
+ require_once 'lib/class-customify-cloud-api.php';
110
+ $this->cloud_api = new Customify_Cloud_Api();
111
+
112
+ // Hook up.
113
+ $this->add_hooks();
114
+ }
115
 
116
+ /**
117
+ * Initiate our hooks
118
+ *
119
+ * @since 1.7.0
120
+ */
121
+ public function add_hooks() {
122
+ /*
123
+ * Handle the Customizer Style Manager base config.
124
+ */
125
+ add_filter( 'customify_filter_fields', array( $this, 'style_manager_section_base_config' ), 12, 1 );
126
+
127
+ /*
128
+ * Handle the grouping and reorganization of the Customizer theme sections when the Style Manager is active.
129
+ */
130
+ add_filter( 'customify_final_config', array( $this, 'reorganize_sections' ), 10, 1 );
131
+
132
+ /*
133
+ * Handle the filtering based on theme type.
134
+ */
135
+ add_filter( 'customify_filter_fields', array( $this, 'pre_filter_based_on_theme_type' ), 20, 1 );
136
+ add_filter( 'customify_final_config', array( $this, 'filter_based_on_theme_type' ), 20, 1 );
137
+
138
+ /*
139
+ * Handle the logic for user feedback.
140
+ */
141
+ add_action( 'customize_controls_print_footer_scripts', array( $this, 'output_user_feedback_modal' ) );
142
+ add_action( 'wp_ajax_customify_style_manager_user_feedback', array( $this, 'user_feedback_callback' ) );
143
+
144
+ /*
145
+ * Scripts enqueued in the Customizer.
146
+ */
147
+ add_action( 'customize_controls_init', array( $this, 'register_admin_customizer_scripts' ), 10 );
148
+ add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_admin_customizer_scripts' ), 10 );
149
  }
150
 
151
+ /**
152
+ * Register Customizer admin scripts.
153
+ */
154
+ function register_admin_customizer_scripts() {
155
+ wp_register_script( PixCustomifyPlugin()->get_slug() . '-style-manager', plugins_url( 'js/customizer/style-manager.js', PixCustomifyPlugin()->get_file() ), array( 'jquery' ), PixCustomifyPlugin()->get_version() );
156
+ }
157
 
158
+ /**
159
+ * Enqueue Customizer admin scripts
160
+ */
161
+ function enqueue_admin_customizer_scripts() {
162
+ // If there is no style manager support, bail early.
163
+ if ( ! $this->is_supported() ) {
164
+ return;
165
+ }
 
 
 
 
166
 
167
+ // Enqueue the needed scripts, already registered.
168
+ wp_enqueue_script( PixCustomifyPlugin()->get_slug() . '-style-manager' );
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  }
170
 
171
+ /**
172
+ * Determine if Style Manager is supported.
173
+ *
174
+ * @return bool
175
+ * @since 1.7.0
176
+ *
177
+ */
178
+ public function is_supported() {
179
+ $has_support = (bool) current_theme_supports( 'customizer_style_manager' );
180
+
181
+ return apply_filters( 'customify_style_manager_is_supported', $has_support );
182
  }
183
 
184
+ /**
185
+ * Setup the Style Manager Customizer section base config.
186
+ *
187
+ * This handles the base configuration for the controls in the Style Manager section. We expect other parties (e.g. the theme),
188
+ * to come and fill up the missing details (e.g. connected fields).
189
+ *
190
+ * @param array $config This holds required keys for the plugin config like 'opt-name', 'panels', 'settings'
191
+ *
192
+ * @return array
193
+ * @since 1.7.0
194
+ *
195
+ */
196
+ public function style_manager_section_base_config( $config ) {
197
+ // If there is no style manager support, bail early.
198
+ if ( ! $this->is_supported() ) {
199
+ return $config;
200
+ }
201
+
202
+ if ( ! isset( $config['sections']['style_manager_section'] ) ) {
203
+ $config['sections']['style_manager_section'] = array();
204
+ }
205
 
206
+ // The section might be already defined, thus we merge, not replace the entire section config.
207
+ $config['sections']['style_manager_section'] = Customify_Array::array_merge_recursive_distinct( $config['sections']['style_manager_section'], array(
208
+ 'title' => esc_html__( 'Style Manager', 'customify' ),
209
+ 'section_id' => 'style_manager_section',
210
+ // We will force this section id preventing prefixing and other regular processing.
211
+ 'priority' => 1,
212
+ 'options' => array(),
213
+ ) );
214
 
 
 
 
 
 
 
 
 
 
 
 
215
  return $config;
216
  }
217
 
218
+ /**
219
+ * Reorganize the Customizer sections.
220
+ *
221
+ * @param array $config This holds required keys for the plugin config like 'opt-name', 'panels', 'settings'.
222
+ *
223
+ * @return array
224
+ * @since 1.7.4
225
+ *
226
+ */
227
+ public function reorganize_sections( $config ) {
228
+ // If there is no style manager support, bail early.
229
+ if ( ! $this->is_supported() ) {
230
+ return $config;
231
+ }
232
 
233
+ // If there is no Style Manager section or panel, bail.
234
+ if ( ! isset( $config['sections']['style_manager_section'] ) &&
235
+ ! isset( $config['panels']['style_manager_panel'] ) ) {
236
 
237
+ return $config;
238
+ }
 
 
 
239
 
240
+ $style_manager_section_config = false;
241
+ if ( isset( $config['sections']['style_manager_section'] ) ) {
242
+ $style_manager_section_config = $config['sections']['style_manager_section'];
243
+ unset( $config['sections']['style_manager_section'] );
244
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
245
 
246
+ // All the other sections.
247
+ $other_theme_sections_config = $config['sections'];
248
+ unset( $config['sections'] );
249
+
250
+ // The Style Manager panel.
251
+ if ( empty( $config['panels']['style_manager_panel'] ) ) {
252
+ $style_manager_panel_config = array(
253
+ 'priority' => 22,
254
+ 'capability' => 'edit_theme_options',
255
+ 'panel_id' => 'style_manager_panel',
256
+ 'title' => esc_html__( 'Style Manager', 'customify' ),
257
+ 'description' => wp_kses_post( __( '<strong>Style Manager</strong> is an intuitive system to help you change the look of your website and make an excellent impression.', 'customify' ) ),
258
+ 'sections' => array(),
259
+ 'auto_expand_sole_section' => true, // If there is only one section in the panel, auto-expand it.
260
+ );
261
+ } else {
262
+ $style_manager_panel_config = $config['panels']['style_manager_panel'];
263
+ unset( $config['panels']['style_manager_panel'] );
264
+ }
265
 
266
+ $other_panels_config = false;
267
+ if ( ! empty( $config['panels'] ) ) {
268
+ $other_panels_config = $config['panels'];
269
+ unset( $config['panels'] );
270
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
271
 
272
+ // Maybe handle the color palettes.
273
+ if ( is_array( $style_manager_section_config ) && class_exists( 'Customify_Color_Palettes' ) && Customify_Color_Palettes::instance()->is_supported() ) {
274
+
275
+ // We need to split the fields in the Style Manager section into two: color palettes and fonts.
276
+ $color_palettes_fields = array(
277
+ 'sm_current_color_palette',
278
+ 'sm_palettes_description',
279
+ 'sm_filters_description',
280
+ 'sm_customize_description',
281
+ 'sm_color_matrix',
282
+ 'sm_palette_filter',
283
+ 'sm_coloration_level',
284
+ 'sm_color_diversity',
285
+ 'sm_shuffle_colors',
286
+ 'sm_dark_mode',
287
+ 'sm_dark_color_master_slider',
288
+ 'sm_dark_color_primary_slider',
289
+ 'sm_dark_color_secondary_slider',
290
+ 'sm_dark_color_tertiary_slider',
291
+ 'sm_colors_dispersion',
292
+ 'sm_colors_focus_point',
293
+ 'sm_color_palette',
294
+ 'sm_color_palette_variation',
295
+ 'sm_color_primary',
296
+ 'sm_color_primary_final',
297
+ 'sm_color_secondary',
298
+ 'sm_color_secondary_final',
299
+ 'sm_color_tertiary',
300
+ 'sm_color_tertiary_final',
301
+ 'sm_dark_primary',
302
+ 'sm_dark_primary_final',
303
+ 'sm_dark_secondary',
304
+ 'sm_dark_secondary_final',
305
+ 'sm_dark_tertiary',
306
+ 'sm_dark_tertiary_final',
307
+ 'sm_light_primary',
308
+ 'sm_light_primary_final',
309
+ 'sm_light_secondary',
310
+ 'sm_light_secondary_final',
311
+ 'sm_light_tertiary',
312
+ 'sm_light_tertiary_final',
313
+ 'sm_swap_colors',
314
+ 'sm_swap_dark_light',
315
+ 'sm_swap_colors_dark',
316
+ 'sm_swap_secondary_colors_dark',
317
+ 'sm_advanced_toggle',
318
+ 'sm_spacing_bottom',
319
+ );
320
+
321
+ $color_palettes_section_config = array(
322
+ 'title' => esc_html__( 'Colors', 'customify' ),
323
+ 'section_id' => 'sm_color_palettes_section',
324
+ 'priority' => 10,
325
+ 'options' => array(),
326
+ );
327
+ foreach ( $color_palettes_fields as $field_id ) {
328
+ if ( ! isset( $style_manager_section_config['options'][ $field_id ] ) ) {
329
+ continue;
330
+ }
331
 
332
+ if ( empty( $color_palettes_section_config['options'] ) ) {
333
+ $color_palettes_section_config['options'] = array( $field_id => $style_manager_section_config['options'][ $field_id ] );
334
+ } else {
335
+ $color_palettes_section_config['options'] = array_merge( $color_palettes_section_config['options'], array( $field_id => $style_manager_section_config['options'][ $field_id ] ) );
336
+ }
337
  }
338
+
339
+ $style_manager_panel_config['sections']['sm_color_palettes_section'] = $color_palettes_section_config;
340
  }
341
 
342
+ // Maybe handle the font palettes.
343
+ if ( is_array( $style_manager_section_config ) && class_exists( 'Customify_Font_Palettes' ) && Customify_Font_Palettes::instance()->is_supported() ) {
344
+
345
+ $font_palettes_fields = array(
346
+ 'sm_font_palette',
347
+ 'sm_font_palette_variation',
348
+ 'sm_font_primary',
349
+ 'sm_font_secondary',
350
+ 'sm_font_body',
351
+ 'sm_swap_fonts',
352
+ 'sm_swap_primary_secondary_fonts',
353
+ );
354
+
355
+ $font_palettes_section_config = array(
356
+ 'title' => esc_html__( 'Fonts', 'customify' ),
357
+ 'section_id' => 'sm_font_palettes_section',
358
+ 'priority' => 20,
359
+ 'options' => array(),
360
+ );
361
+ foreach ( $font_palettes_fields as $field_id ) {
362
+ if ( ! isset( $style_manager_section_config['options'][ $field_id ] ) ) {
363
+ continue;
364
+ }
365
 
366
+ if ( empty( $font_palettes_section_config['options'] ) ) {
367
+ $font_palettes_section_config['options'] = array( $field_id => $style_manager_section_config['options'][ $field_id ] );
368
+ } else {
369
+ $font_palettes_section_config['options'] = array_merge( $font_palettes_section_config['options'], array( $field_id => $style_manager_section_config['options'][ $field_id ] ) );
370
+ }
371
+ }
 
 
 
 
 
 
372
 
373
+ $style_manager_panel_config['sections']['sm_font_palettes_section'] = $font_palettes_section_config;
374
+ }
375
+
376
+ // Start fresh and add the Style Manager panel config
377
+ if ( empty( $config['panels'] ) ) {
378
+ $config['panels'] = array();
379
+ }
380
+ $config['panels']['style_manager_panel'] = $style_manager_panel_config;
381
+
382
+ // The Theme Options panel.
383
+ $theme_options_panel_config = array(
384
+ 'priority' => 23,
385
+ 'capability' => 'edit_theme_options',
386
+ 'panel_id' => 'theme_options_panel',
387
+ 'title' => esc_html__( 'Theme Options', 'customify' ),
388
+ 'description' => esc_html__( 'Advanced options to change your site look-and-feel on a detailed level.', 'customify' ),
389
+ 'sections' => array(),
390
  );
391
+
392
+ // If we have other panels we will make their sections parts of the Theme Options panel.
393
+ if ( ! empty( $other_panels_config ) ) {
394
+ // If we have another panel that is called Theme Options we will extract it's sections and put them directly in the Theme Options panel.
395
+ $second_theme_options_sections = array();
396
+ foreach ( $other_panels_config as $panel_id => $panel_config ) {
397
+ $found = false;
398
+ // First try the panel ID.
399
+ if ( false !== strpos( strtolower( str_replace( '-', '_', $panel_id ) ), 'theme_options' ) ) {
400
+ $found = true;
401
+ }
402
+
403
+ // Second, try the panel title.
404
+ if ( ! $found && ! empty( $panel_config['title'] ) && false !== strpos( strtolower( str_replace( array(
405
+ '-',
406
+ '_'
407
+ ), ' ', $panel_config['title'] ) ), ' theme options' ) ) {
408
+ $found = true;
409
+ }
410
+
411
+ if ( $found && ! empty( $panel_config['sections'] ) ) {
412
+ $second_theme_options_sections = array_merge( $second_theme_options_sections, $panel_config['sections'] );
413
+ unset( $other_panels_config[ $panel_id ] );
414
+ }
415
+ }
416
+ if ( ! empty( $second_theme_options_sections ) ) {
417
+ $theme_options_panel_config['sections'] = array_merge( $theme_options_panel_config['sections'], $second_theme_options_sections );
418
  }
419
 
420
+ // For the remaining panels, we will put their section into the Theme Options panel, but prefix their title with their respective panel title.
421
+ $prefixed_sections = array();
422
+ foreach ( $other_panels_config as $panel_id => $panel_config ) {
423
+ if ( ! empty( $panel_config['sections'] ) ) {
424
+ foreach ( $panel_config['sections'] as $section_id => $section_config ) {
425
+ if ( ! empty( $section_config['title'] ) && ! empty( $panel_config['title'] ) ) {
426
+ $section_config['title'] = $panel_config['title'] . ' - ' . $section_config['title'];
427
+ }
428
+ $prefixed_sections[ $panel_id . '_' . $section_id ] = $section_config;
429
+ }
430
+ }
431
  }
432
+ $theme_options_panel_config['sections'] = array_merge( $theme_options_panel_config['sections'], $prefixed_sections );
433
  }
434
 
435
+ // If we have other sections we will add them to the Theme Options panel.
436
+ if ( ! empty( $other_theme_sections_config ) ) {
437
+ $theme_options_panel_config['sections'] = array_merge( $theme_options_panel_config['sections'], $other_theme_sections_config );
438
+ }
439
 
440
+ if ( empty( $config['panels']['theme_options_panel'] ) ) {
441
+ $config['panels']['theme_options_panel'] = $theme_options_panel_config;
442
+ } else {
443
+ $config['panels']['theme_options_panel'] = array_merge( $config['panels']['theme_options_panel'], $theme_options_panel_config );
444
+ }
445
+
446
+ // Add the logic that handles sections and controls added directly to WP_Customizer, not through the config.
447
+ add_action( 'customize_register', array( $this, 'reorganize_direct_sections_and_controls' ), 100 );
448
+
449
+ // Remove the switch theme panel from the Customizer.
450
+ add_action( 'customize_register', array( $this, 'remove_switch_theme_panel' ), 12 );
451
+
452
+ return $config;
453
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
454
 
455
+ /**
456
+ * Filter the config during the build up.
457
+ *
458
+ * @param array $config
459
+ *
460
+ * @return array
461
+ */
462
+ public function pre_filter_based_on_theme_type( $config ) {
463
+ if ( in_array( self::get_theme_type(), array( 'theme_wporg', 'theme_modular_wporg' ) ) ) {
464
 
465
+ add_filter( 'customify_style_manager_color_palettes_colors_classes', function ( $classes ) {
466
+ $classes[] = 'js-no-picker';
467
+
468
+ return $classes;
469
+ } );
470
+
471
+ add_filter( 'customify_style_manager_sm_palettes_description_html', function ( $html ) {
472
+ $html .= '<br /><strong>More color palettes</strong> are available with the PRO version of your theme.';
473
+
474
+ return $html;
475
+ } );
476
+ add_filter( 'customify_style_manager_sm_filters_description_html', function ( $html ) {
477
+ $html .= '<br /><strong>More filters</strong> are available with the PRO version of your theme.';
478
+
479
+ return $html;
480
+ } );
481
+ add_filter( 'customify_style_manager_sm_customize_description_html', function ( $html ) {
482
+ $html .= '<br /><strong>More options</strong> are available with the PRO version of your theme.';
483
+
484
+ return $html;
485
+ } );
486
  }
487
 
488
+ return $config;
489
+ }
490
+
491
+ /**
492
+ * Filter the final config.
493
+ *
494
+ * @param array $config
495
+ *
496
+ * @return array
497
+ */
498
+ public function filter_based_on_theme_type( $config ) {
499
+ if ( ! empty( $config['panels']['style_manager_panel']['sections']['sm_color_palettes_section']['options'] ) && in_array( self::get_theme_type(), array(
500
+ 'theme_wporg',
501
+ 'theme_modular_wporg'
502
+ ) ) ) {
503
+ $color_palettes_options = $config['panels']['style_manager_panel']['sections']['sm_color_palettes_section']['options'];
504
+
505
+ $options_to_remove = array(
506
+ 'sm_color_diversity',
507
+ 'sm_shuffle_colors',
508
+ 'sm_dark_mode',
509
+ );
510
+ foreach ( $options_to_remove as $option_key ) {
511
+ if ( isset( $color_palettes_options[ $option_key ] ) ) {
512
+ unset( $color_palettes_options[ $option_key ] );
513
  }
514
  }
515
+
516
+ if ( ! empty( $color_palettes_options['sm_palette_filter']['choices'] ) ) {
517
+ unset( $color_palettes_options['sm_palette_filter']['choices']['clarendon'] );
518
+ unset( $color_palettes_options['sm_palette_filter']['choices']['pastel'] );
519
+ unset( $color_palettes_options['sm_palette_filter']['choices']['greyish'] );
520
+ }
521
+
522
+ $config['panels']['style_manager_panel']['sections']['sm_color_palettes_section']['options'] = $color_palettes_options;
523
  }
524
+
525
+ return $config;
526
  }
527
 
528
+ /**
529
+ * Get the current theme type from the WUpdates code.
530
+ *
531
+ * Generally, this is a 'theme', but it could also be 'plugin', 'theme_modular', 'theme_wporg' or other markers we wish to use.
532
+ *
533
+ * @return string
534
+ */
535
+ public static function get_theme_type() {
536
+ $wupdates_identification = self::get_wupdates_identification_data();
537
+ if ( empty( $wupdates_identification['type'] ) ) {
538
+ return 'theme_wporg';
539
+ }
540
+
541
+ return sanitize_title( $wupdates_identification['type'] );
542
  }
543
 
544
+ public static function get_wupdates_identification_data( $slug = '' ) {
545
+ if ( empty( $slug ) ) {
546
+ $slug = basename( get_template_directory() );
547
+ }
548
+
549
+ $wupdates_ids = self::get_all_wupdates_identification_data();
550
+
551
+ // We really want an id (hash_id) and a type.
552
+ if ( empty( $slug ) || empty( $wupdates_ids[ $slug ] ) || ! isset( $wupdates_ids[ $slug ]['id'] ) || ! isset( $wupdates_ids[ $slug ]['type'] ) ) {
553
+ return false;
554
+ }
555
+
556
+ return $wupdates_ids[ $slug ];
557
  }
558
 
559
+ public static function get_all_wupdates_identification_data() {
560
+ if ( empty( self::$wupdates_ids ) ) {
561
+ self::$wupdates_ids = apply_filters( 'wupdates_gather_ids', array() );
562
+ }
563
 
564
+ return self::$wupdates_ids;
565
+ }
566
 
567
+ /**
568
+ * Reorganizes sections and controls added directly to WP_Customizer, not through the config.
569
+ *
570
+ * @param WP_Customize_Manager $wp_customize
571
+ *
572
+ * @since 1.9.0
573
+ *
574
+ * @todo Please note that this is house cleaning and it is only necessary due to the lack of complete standardization on the theme side. We should not need this forever!
575
+ *
576
+ */
577
+ public function reorganize_direct_sections_and_controls( $wp_customize ) {
578
+ // We will do out best to identify direct sections and move their controls to the appropriate place.
579
+ /** @var WP_Customize_Section $section */
580
+ foreach ( $wp_customize->sections() as $section ) {
581
+ // These are general theme options sections that need to have their controls moved to the Theme Options > General section.
582
+ if ( false !== strpos( $section->id, 'theme_options' ) ) {
583
+ $theme_options_panel = $wp_customize->get_panel( 'theme_options_panel' );
584
+ $general_section = false;
585
+ foreach ( $theme_options_panel->sections as $theme_options_section ) {
586
+ if ( false !== strpos( $theme_options_section->id, 'general' ) ) {
587
+ $general_section = $section;
588
+ }
589
+ }
590
 
591
+ if ( false === $general_section ) {
592
+ // We need to add a general section in the Theme Options panel.
593
+ $general_section = $wp_customize->add_section( 'theme_options[general]', array(
594
+ 'title' => esc_html__( 'General', 'customify' ),
595
+ 'panel' => $theme_options_panel->id,
596
+ 'priority' => 2,
597
+ ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
598
  }
 
599
 
600
+ // Move all the controls in the identified theme options section to the general one.
601
+ /** @var WP_Customize_Control $control */
602
+ foreach ( $wp_customize->controls() as $control ) {
603
+ if ( $control->section !== $section->id ) {
604
+ continue;
605
+ }
 
 
606
 
607
+ $control->section = $general_section->id;
 
 
 
 
608
  }
609
 
610
+ // Finally remove the now empty section.
611
+ $wp_customize->remove_section( $section->id );
 
 
 
612
 
613
+ break;
614
+ }
615
  }
616
  }
 
 
 
 
 
 
 
 
 
 
 
 
617
 
618
+ /**
619
+ * Remove the switch/preview theme panel.
620
+ *
621
+ * @param WP_Customize_Manager $wp_customize
622
+ *
623
+ * @since 1.7.4
624
+ *
625
+ */
626
+ public function remove_switch_theme_panel( $wp_customize ) {
627
+ $wp_customize->remove_panel( 'themes' );
628
  }
629
 
630
+ /**
631
+ * Output the user feedback modal markup, if we need to.
632
+ *
633
+ * @since 1.7.0
634
+ */
635
+ public function output_user_feedback_modal() {
636
+ // If there is no style manager support, bail early.
637
+ if ( ! $this->is_supported() ) {
638
+ return;
639
+ }
640
+
641
+ // We want to ask for feedback once a month.
642
+ $a_month_back = time() - MONTH_IN_SECONDS;
643
+
644
+ // Only output if we should ask for feedback.
645
+ if ( $this->should_ask_for_feedback( $a_month_back ) ) { ?>
646
+ <div id="style-manager-user-feedback-modal">
647
+ <div class="modal">
648
+ <div class="modal-dialog" role="document">
649
+ <div class="modal-content">
650
+ <form id="style-manager-user-feedback" action="#" method="post">
651
+ <input type="hidden" name="type" value="1_to_5"/>
652
+ <div class="modal-header">
653
+ <button type="button" class="close icon media-modal-close" data-dismiss="modal"
654
+ aria-label="Close"><span class="media-modal-icon"><span
655
+ class="screen-reader-text">Close media panel</span></span></button>
656
+ <!-- <a href="#" class="close button button--naked gray" data-dismiss="modal" aria-label="Close">Close</a> -->
657
+ </div>
658
+ <div class="modal-body full">
659
+ <div class="box box--large">
660
+ <div class="first-step">
661
+ <h2 class="modal-title">How would you rate your experience in finding
662
+ the right colors for your site?</h2>
663
+ <div class="scorecard">
664
+ <span>Poor</span>
665
+ <label>
666
+ <input type="radio" name="rating" value="1" required/>
667
+ <span>1</span>
668
+ </label>
669
+ <label>
670
+ <input type="radio" name="rating" value="2" required/>
671
+ <span>2</span>
672
+ </label>
673
+ <label>
674
+ <input type="radio" name="rating" value="3" required/>
675
+ <span>3</span>
676
+ </label>
677
+ <label>
678
+ <input type="radio" name="rating" value="4" required/>
679
+ <span>4</span>
680
+ </label>
681
+ <label>
682
+ <input type="radio" name="rating" value="5" required/>
683
+ <span>5</span>
684
+ </label>
685
+ <span>Great</span>
686
+ </div>
687
  </div>
688
+ <div class="second-step hidden">
689
+ <p><strong>What points along the way made this a <span
690
+ class="rating-placeholder">5</span>* experience for
691
+ you?</strong><br>We are counting on your insights to guide us in
692
+ doing better 🙏</p>
693
+ <div class="not-floating-labels">
694
+ <div class="form-row field">
695
+ <textarea name="message"
696
+ placeholder="Describe your experience in customizing your site colors.."
697
+ id="style-manager-user-feedback-message" rows="6"
698
+ oninvalid="this.setCustomValidity('May we have a little more info about your experience?')"
699
+ oninput="setCustomValidity('')" required></textarea>
700
+ </div>
701
  </div>
702
+ <button id="style-manager-user-feedback_btn" class="button"
703
+ type="submit"><?php _e( 'Send us your insights', 'customify' ); ?></button>
704
+ </div>
705
+ <div class="thanks-step hidden">
706
+ <h3 class="modal-title">Thank you so much for your feedback!</h3>
707
+ <p>It means the world to us as we strive to constantly push the limits
708
+ and aim higher. Stay awesome! 🤗</p>
709
+ <p><em>The Pixelgrade Team</em></p>
710
+ </div>
711
+ <div class="error-step hidden">
712
+ <h3 class="modal-title">We've hit a snag!</h3>
713
+ <p>We couldn't record your feedback and we would truly appreciate it if
714
+ you would try it again at a latter time. Stay awesome! 🤗</p>
715
  </div>
 
 
 
 
 
 
 
 
 
 
716
  </div>
717
  </div>
718
+ <div class="modal-footer full">
 
719
 
720
+ </div>
721
+ </form>
722
+ </div>
723
  </div>
724
  </div>
725
+ <!-- End Modal -->
726
+ <!-- Modal Backdrop (Shadow) -->
727
+ <div class="modal-backdrop"></div>
728
  </div>
 
 
 
 
729
 
730
+ <?php }
 
 
 
 
 
 
 
 
 
 
 
731
  }
732
 
733
+ /**
734
+ * Return whether user provided feedback, and if so, return the timestamp.
735
+ *
736
+ * @return bool|int
737
+ */
738
+ public function user_provided_feedback() {
739
+ $user_provided_feedback = get_option( 'style_manager_user_feedback_provided' );
740
+ if ( empty( $user_provided_feedback ) ) {
741
+ return false;
742
+ }
743
 
744
+ return $user_provided_feedback;
 
 
 
 
 
 
 
 
 
 
745
  }
746
 
747
+ /**
748
+ * Determine if we should ask for user feedback.
749
+ *
750
+ * @param bool|int $timestamp_limit Optional. Timestamp to compare the time the user provided feedback.
751
+ * If the provided timestamp is earlier than the time the user provided feedback, should ask again.
752
+ *
753
+ * @return bool
754
+ */
755
+ public function should_ask_for_feedback( $timestamp_limit = false ) {
756
+ if ( defined( 'CUSTOMIFY_SM_ALWAYS_ASK_FOR_FEEDBACK' ) && true === CUSTOMIFY_SM_ALWAYS_ASK_FOR_FEEDBACK ) {
757
+ return true;
758
+ }
759
+
760
+ $feedback_timestamp = $this->user_provided_feedback();
761
+ if ( empty( $feedback_timestamp ) ) {
762
+ return true;
763
+ }
764
+
765
+ if ( ! empty( $timestamp_limit ) && intval( $timestamp_limit ) > intval( $feedback_timestamp ) ) {
766
+ return true;
767
+ }
768
 
769
+ return false;
 
770
  }
771
 
772
+ /**
773
+ * Callback for the user feedback AJAX call.
774
+ *
775
+ * @since 1.7.0
776
+ */
777
+ public function user_feedback_callback() {
778
+ check_ajax_referer( 'customify_style_manager_user_feedback', 'nonce' );
779
+
780
+ if ( empty( $_POST['type'] ) ) {
781
+ wp_send_json_error( esc_html__( 'No type provided', 'customify' ) );
782
+ }
783
 
784
+ if ( empty( $_POST['rating'] ) ) {
785
+ wp_send_json_error( esc_html__( 'No rating provided', 'customify' ) );
786
+ }
 
 
 
 
787
 
788
+ $type = sanitize_text_field( $_POST['type'] );
789
+ $rating = intval( $_POST['rating'] );
790
+ $message = '';
791
+ if ( ! empty( $_POST['message'] ) ) {
792
+ $message = wp_kses_post( $_POST['message'] );
793
+ }
794
 
795
+ $request_data = array(
796
+ 'site_url' => home_url( '/' ),
797
+ 'satisfaction_data' => array(
798
+ 'type' => $type,
799
+ 'rating' => $rating,
800
+ 'message' => $message,
801
+ ),
802
+ );
803
 
804
+ // Send the feedback.
805
+ $response = $this->cloud_api->send_stats( $request_data, true );
806
+ if ( is_wp_error( $response ) ) {
807
+ wp_send_json_error( esc_html__( 'Sorry, something went wrong and we couldn\'t save your feedback.', 'customify' ) );
808
+ }
809
+ $response_data = json_decode( wp_remote_retrieve_body( $response ), true );
810
+ // Bail in case of decode error or failure to retrieve data
811
+ if ( null === $response_data || empty( $response_data['code'] ) || 'success' !== $response_data['code'] ) {
812
+ wp_send_json_error( esc_html__( 'Sorry, something went wrong and we couldn\'t save your feedback.', 'customify' ) );
813
+ }
814
 
815
+ // We need to remember that the user provided feedback (and at what timestamp).
816
+ update_option( 'style_manager_user_feedback_provided', time(), true );
817
+
818
+ wp_send_json_success( esc_html__( 'Thank you for your feedback.', 'customify' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
819
  }
820
 
821
+ /**
822
+ * Main Customify_Style_Manager Instance
823
+ *
824
+ * Ensures only one instance of Customify_Style_Manager is loaded or can be loaded.
825
+ *
826
+ * @return Customify_Style_Manager Main Customify_Style_Manager instance
827
+ * @since 1.7.0
828
+ * @static
829
+ *
830
+ */
831
+ public static function instance() {
832
 
833
+ if ( is_null( self::$_instance ) ) {
834
+ self::$_instance = new self();
835
+ }
836
 
837
+ return self::$_instance;
 
 
 
 
 
 
 
 
 
 
 
 
 
838
  }
839
 
840
+ /**
841
+ * Cloning is forbidden.
842
+ *
843
+ * @since 1.7.0
844
+ */
845
+ public function __clone() {
846
 
847
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'You should not do that!', 'customify' ), null );
848
+ }
 
 
 
 
849
 
850
+ /**
851
+ * Unserializing instances of this class is forbidden.
852
+ *
853
+ * @since 1.7.0
854
+ */
855
+ public function __wakeup() {
856
 
857
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'You should not do that!', 'customify' ), null );
858
+ }
859
+ }
 
 
 
860
 
 
 
861
  }
 
 
includes/class-customify-theme-configs.php CHANGED
@@ -11,368 +11,371 @@ if ( ! defined( 'ABSPATH' ) ) {
11
  exit; // Exit if accessed directly
12
  }
13
 
14
- if ( ! class_exists( 'Customify_Theme_Configs' ) ) :
15
-
16
- class Customify_Theme_Configs {
17
-
18
- /**
19
- * Holds the only instance of this class.
20
- * @var null|Customify_Theme_Configs
21
- * @access protected
22
- * @since 1.7.4
23
- */
24
- protected static $_instance = null;
25
-
26
- /**
27
- * The external theme config for the current active theme.
28
- * @var array
29
- * @access public
30
- * @since 1.7.4
31
- */
32
- public $external_theme_config = null;
33
-
34
- /**
35
- * Constructor.
36
- *
37
- * @since 1.7.4
38
- */
39
- protected function __construct() {
40
- $this->init();
41
- }
42
 
43
- /**
44
- * Initialize this module.
45
- *
46
- * @since 1.7.4
47
- */
48
- public function init() {
49
- // Hook up.
50
- $this->add_hooks();
51
- }
52
 
53
- /**
54
- * Initiate our hooks
55
- *
56
- * @since 1.7.4
57
- */
58
- public function add_hooks() {
59
- /*
60
- * Handle the external theme configuration logic. We use a late priority to be able to overwrite if we have to.
61
  */
62
- add_filter( 'customify_filter_fields', array( $this, 'maybe_activate_external_theme_config' ), 10, 1 );
63
- add_filter( 'customify_filter_fields', array( $this, 'maybe_apply_external_theme_config' ), 100, 1 );
64
- // Maybe the theme has instructed us to do things like removing sections or controls.
65
- add_action( 'customize_register', array( $this, 'maybe_process_external_theme_config_extras' ), 11 );
66
 
67
- /*
68
- * Scripts enqueued in the Customizer.
 
 
 
69
  */
70
- add_action( 'customize_controls_init', array( $this, 'register_admin_customizer_scripts' ), 10 );
71
- add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_admin_customizer_scripts' ), 10 );
72
 
73
  /**
74
- * Determine if we should output the theme root JSON in the Customizer for easier copy&paste to cloud.
 
 
75
  */
76
- if ( defined('CUSTOMIFY_SM_LOAD_THEME_ROOT_CONFIG') && true === CUSTOMIFY_SM_LOAD_THEME_ROOT_CONFIG ) {
77
- add_filter( 'customize_controls_print_styles', array( $this, 'maybe_output_json_external_config' ), 0 );
78
  }
79
- }
80
-
81
- /**
82
- * Register Customizer admin scripts.
83
- */
84
- function register_admin_customizer_scripts() {
85
 
86
- }
87
-
88
- /**
89
- * Enqueue Customizer admin scripts
90
- */
91
- function enqueue_admin_customizer_scripts() {
92
- // If there is no style manager support, bail early.
93
- if ( ! $this->is_supported() ) {
94
- return;
95
  }
96
 
97
- // Enqueue the needed scripts, already registered.
98
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
 
100
- /**
101
- * Determine if Style Manager is supported.
102
- *
103
- * @since 1.7.4
104
- *
105
- * @return bool
106
- */
107
- public function is_supported() {
108
- // For now we will only use the fact that Style Manager is supported.
109
- return apply_filters( 'customify_theme_configs_are_supported', Customify_Style_Manager::instance()->is_supported() );
110
- }
111
 
112
- /**
113
- * Get the themes configuration.
114
- *
115
- * @since 1.7.4
116
- *
117
- * @param bool $skip_cache Optional. Whether to use the cached config or fetch a new one.
118
- *
119
- * @return array
120
- */
121
- public function get_theme_configs( $skip_cache = false ) {
122
- $theme_configs = array();
123
-
124
- // Make sure that the Design Assets class is loaded.
125
- require_once 'lib/class-customify-design-assets.php';
126
-
127
- // Get the design assets data.
128
- $design_assets = Customify_Design_Assets::instance()->get( $skip_cache );
129
- if ( false !== $design_assets && ! empty( $design_assets['theme_configs'] ) ) {
130
- $theme_configs = $design_assets['theme_configs'];
131
  }
132
 
133
- return apply_filters( 'customify_get_theme_configs', $theme_configs );
134
- }
 
 
 
 
 
 
135
 
136
- /**
137
- * Maybe activate an external theme config.
138
- *
139
- * If the conditions are met, activate an external theme config by declaring support for the style manager and saving the config.
140
- *
141
- * @since 1.7.4
142
- *
143
- * @param array $config This holds required keys for the plugin config like 'opt-name', 'panels', 'settings'
144
- * @return array
145
- */
146
- public function maybe_activate_external_theme_config( $config ) {
147
- // If somebody else already declared support for the Style Manager, we stop and let them have it.
148
- if ( $this->is_supported() ) {
149
- return $config;
150
  }
151
 
152
- // First gather details about the current (parent) theme.
153
- $theme = wp_get_theme( get_template() );
154
- // Bail if for some strange reason we couldn't find the theme.
155
- if ( ! $theme->exists() ) {
156
- return $config;
 
 
 
 
 
157
  }
158
 
159
- // Now determine if we have a theme config for the current theme.
160
- $theme_configs = $this->get_theme_configs();
 
 
 
 
 
 
 
 
 
 
 
 
161
 
162
- // We will go through every theme config and determine it's match score
163
- foreach ( $theme_configs as $hashid => $theme_config ) {
164
- // Loose matching means that the theme doesn't have to match all the conditions.
165
- $loose_match = false;
166
- if ( ! empty( $theme_config['loose_match'] ) ) {
167
- $loose_match = true;
168
  }
169
 
170
- $matches = 0;
171
- $total = 0;
172
- if ( ! empty( $theme_config['name'] ) && $theme_config['name'] == $theme->get('Name') ) {
173
- $matches++;
174
- $total++;
175
- }
176
- if ( ! empty( $theme_config['slug'] ) && $theme_config['slug'] == $theme->get_stylesheet() ) {
177
- $matches++;
178
- $total++;
179
- }
180
- if ( ! empty( $theme_config['txtd'] ) && $theme_config['txtd'] == $theme->get('TextDomain') ) {
181
- $matches++;
182
- $total++;
 
 
 
 
 
183
  }
184
 
185
- $theme_configs[ $hashid ]['match_score'] = 0;
186
- if ( true === $loose_match ) {
187
- $theme_configs[ $hashid ]['match_score'] = $matches;
188
- } elseif( $matches === $total ) {
189
- $theme_configs[ $hashid ]['match_score'] = $matches;
190
  }
191
- }
192
 
193
- // Now we will order the theme configs by match scores, descending and get the highest matching candidate, if any.
194
- $theme_configs = Customify_Array::array_orderby( $theme_configs, 'match_score', SORT_DESC );
195
- $external_theme_config = array_shift( $theme_configs );
196
- // If we've ended up with a theme config with a zero match score, bail.
197
- if ( empty( $external_theme_config['match_score'] ) || empty( $external_theme_config['config']['sections'] ) ) {
198
- return $config;
199
- }
200
 
201
- // Now we have a theme config to work with. Save it for later use.
202
- $this->external_theme_config = $external_theme_config;
 
 
 
 
 
203
 
204
- // Declare support for the Style Manager if there is such a section in the config
205
- if ( isset( $external_theme_config['config']['sections']['style_manager_section'] ) ) {
206
- add_theme_support( 'customizer_style_manager' );
207
- }
 
 
 
 
 
 
 
 
 
 
208
 
209
- return $config;
210
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
 
212
- /**
213
- * Maybe apply an external theme config.
214
- *
215
- * If the conditions are met, apply an external theme config. Right now we are only handling sections and their controls.
216
- *
217
- * @since 1.7.4
218
- *
219
- * @param array $config This holds required keys for the plugin config like 'opt-name', 'panels', 'settings'
220
- * @return array
221
- */
222
- public function maybe_apply_external_theme_config( $config ) {
223
- // Bail if we have no external theme config data.
224
- if ( empty( $this->external_theme_config ) ) {
225
  return $config;
226
  }
227
 
228
- // Apply the theme config.
229
- // If we are dealing with the Customify default config, we need a clean slate, sort of.
230
- if ( 'customify_defaults' === $config['opt-name'] ) {
231
- // We will save the Style Manager config so we can merge with it. But the rest goes away.
232
- $style_manager_section = array();
233
- if ( isset( $config['sections']['style_manager_section'] ) ) {
234
- $style_manager_section = $config['sections']['style_manager_section'];
 
 
 
 
 
 
 
 
235
  }
236
 
237
- $config['opt-name'] = get_template() . '_options';
238
- if ( ! empty( $this->external_theme_config['config']['opt-name'] ) ) {
239
- $config['opt-name'] = $this->external_theme_config['config']['opt-name'];
240
- }
 
 
 
 
241
 
242
- $config['sections'] = array(
243
- 'style_manager_section' => $style_manager_section,
244
- );
245
- }
246
 
247
- // Now merge things.
248
- $config['sections'] = Customify_Array::array_merge_recursive_distinct( $config['sections'],$this->external_theme_config['config']['sections'] );
 
 
249
 
250
- return $config;
251
- }
252
 
253
- /**
254
- * Maybe process certain "commands" from the external theme config.
255
- *
256
- * Mainly things like removing sections, controls, etc.
257
- *
258
- * @since 1.7.4
259
- *
260
- * @param WP_Customize_Manager $wp_customize
261
- */
262
- public function maybe_process_external_theme_config_extras( $wp_customize ) {
263
- // Bail if we have no external theme config data.
264
- if ( empty( $this->external_theme_config ) ) {
265
- return;
266
  }
267
 
268
- // Maybe remove panels
269
- if ( ! empty( $this->external_theme_config['config']['remove_panels'] ) ) {
270
- // Standardize it.
271
- if ( is_string( $this->external_theme_config['config']['remove_panels'] ) ) {
272
- $this->external_theme_config['config']['remove_panels'] = array( $this->external_theme_config['config']['remove_panels'] );
 
 
 
 
 
 
 
 
 
273
  }
274
 
275
- foreach ( $this->external_theme_config['config']['remove_panels'] as $panel_id ) {
276
- $wp_customize->remove_panel( $panel_id );
277
- }
278
- }
 
 
279
 
280
- // Maybe remove sections
281
- if ( ! empty( $this->external_theme_config['config']['remove_sections'] ) ) {
282
- // Standardize it.
283
- if ( is_string( $this->external_theme_config['config']['remove_sections'] ) ) {
284
- $this->external_theme_config['config']['remove_sections'] = array( $this->external_theme_config['config']['remove_sections'] );
285
  }
286
 
287
- foreach ( $this->external_theme_config['config']['remove_sections'] as $section_id ) {
 
 
 
 
 
 
 
288
 
289
- if ( 'widgets' === $section_id ) {
290
- global $wp_registered_sidebars;
291
 
292
- foreach ( $wp_registered_sidebars as $widget => $settings ) {
293
- $wp_customize->remove_section( 'sidebar-widgets-' . $widget );
 
 
294
  }
295
- continue;
296
- }
297
 
298
- $wp_customize->remove_section( $section_id );
 
299
  }
300
- }
301
 
302
- // Maybe remove settings
303
- if ( ! empty( $this->external_theme_config['config']['remove_settings'] ) ) {
304
- // Standardize it.
305
- if ( is_string( $this->external_theme_config['config']['remove_settings'] ) ) {
306
- $this->external_theme_config['config']['remove_settings'] = array( $this->external_theme_config['config']['remove_settings'] );
307
- }
308
 
309
- foreach ( $this->external_theme_config['config']['remove_settings'] as $setting_id ) {
310
- $wp_customize->remove_setting( $setting_id );
 
311
  }
312
- }
313
 
314
- // Maybe remove controls
315
- if ( ! empty( $this->external_theme_config['config']['remove_controls'] ) ) {
316
- // Standardize it.
317
- if ( is_string( $this->external_theme_config['config']['remove_controls'] ) ) {
318
- $this->external_theme_config['config']['remove_controls'] = array( $this->external_theme_config['config']['remove_controls'] );
319
- }
320
 
321
- foreach ( $this->external_theme_config['config']['remove_controls'] as $control_id ) {
322
- $wp_customize->remove_control( $control_id );
 
323
  }
324
  }
325
- }
326
 
327
- /**
328
- * Output the JSON in the Customizer page source.
329
- */
330
- public function maybe_output_json_external_config() {
331
- if ( ! empty( $this->external_theme_config['config'] ) ) {
332
- // Also output the JSON in a special hidden div for easy copy pasting.
333
- // Also remove any multiple tabs.
334
- echo PHP_EOL . '<!--' . PHP_EOL . 'Just copy&paste this:' . PHP_EOL . PHP_EOL . trim( str_replace( '\t\t', '', json_encode( $this->external_theme_config['config'] ) ) ) . PHP_EOL . PHP_EOL . '-->' . PHP_EOL;
 
335
  }
336
- }
337
 
338
- /**
339
- * Main Customify_Theme_Configs Instance
340
- *
341
- * Ensures only one instance of Customify_Theme_Configs is loaded or can be loaded.
342
- *
343
- * @since 1.7.4
344
- * @static
345
- *
346
- * @return Customify_Theme_Configs Main Customify_Theme_Configs instance
347
- */
348
- public static function instance() {
349
-
350
- if ( is_null( self::$_instance ) ) {
351
- self::$_instance = new self();
352
- }
353
 
354
- return self::$_instance;
355
- } // End instance ()
 
356
 
357
- /**
358
- * Cloning is forbidden.
359
- *
360
- * @since 1.7.4
361
- */
362
- public function __clone() {
363
 
364
- _doing_it_wrong( __FUNCTION__,esc_html( __( 'Cheatin&#8217; huh?' ) ), null );
365
- } // End __clone ()
 
 
 
 
366
 
367
- /**
368
- * Unserializing instances of this class is forbidden.
369
- *
370
- * @since 1.7.4
371
- */
372
- public function __wakeup() {
373
 
374
- _doing_it_wrong( __FUNCTION__, esc_html( __( 'Cheatin&#8217; huh?' ) ), null );
375
- } // End __wakeup ()
376
- }
 
 
 
 
 
 
 
377
 
378
- endif;
11
  exit; // Exit if accessed directly
12
  }
13
 
14
+ if ( ! class_exists( 'Customify_Theme_Configs' ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
+ class Customify_Theme_Configs {
 
 
 
 
 
 
 
 
17
 
18
+ /**
19
+ * Holds the only instance of this class.
20
+ * @var null|Customify_Theme_Configs
21
+ * @access protected
22
+ * @since 1.7.4
 
 
 
23
  */
24
+ protected static $_instance = null;
 
 
 
25
 
26
+ /**
27
+ * The external theme config for the current active theme.
28
+ * @var array
29
+ * @access public
30
+ * @since 1.7.4
31
  */
32
+ public $external_theme_config = null;
 
33
 
34
  /**
35
+ * Constructor.
36
+ *
37
+ * @since 1.7.4
38
  */
39
+ protected function __construct() {
40
+ $this->init();
41
  }
 
 
 
 
 
 
42
 
43
+ /**
44
+ * Initialize this module.
45
+ *
46
+ * @since 1.7.4
47
+ */
48
+ public function init() {
49
+ // Hook up.
50
+ $this->add_hooks();
 
51
  }
52
 
53
+ /**
54
+ * Initiate our hooks
55
+ *
56
+ * @since 1.7.4
57
+ */
58
+ public function add_hooks() {
59
+ /*
60
+ * Handle the external theme configuration logic. We use a late priority to be able to overwrite if we have to.
61
+ */
62
+ add_filter( 'customify_filter_fields', array( $this, 'maybe_activate_external_theme_config' ), 10, 1 );
63
+ add_filter( 'customify_filter_fields', array( $this, 'maybe_apply_external_theme_config' ), 100, 1 );
64
+ // Maybe the theme has instructed us to do things like removing sections or controls.
65
+ add_action( 'customize_register', array( $this, 'maybe_process_external_theme_config_extras' ), 11 );
66
+
67
+ /*
68
+ * Scripts enqueued in the Customizer.
69
+ */
70
+ add_action( 'customize_controls_init', array( $this, 'register_admin_customizer_scripts' ), 10 );
71
+ add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_admin_customizer_scripts' ), 10 );
72
+
73
+ /**
74
+ * Determine if we should output the theme root JSON in the Customizer for easier copy&paste to cloud.
75
+ */
76
+ if ( defined( 'CUSTOMIFY_SM_LOAD_THEME_ROOT_CONFIG' ) && true === CUSTOMIFY_SM_LOAD_THEME_ROOT_CONFIG ) {
77
+ add_filter( 'customize_controls_print_styles', array( $this, 'maybe_output_json_external_config' ), 0 );
78
+ }
79
+ }
80
 
81
+ /**
82
+ * Register Customizer admin scripts.
83
+ */
84
+ function register_admin_customizer_scripts() {
 
 
 
 
 
 
 
85
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  }
87
 
88
+ /**
89
+ * Enqueue Customizer admin scripts
90
+ */
91
+ function enqueue_admin_customizer_scripts() {
92
+ // If there is no style manager support, bail early.
93
+ if ( ! $this->is_supported() ) {
94
+ return;
95
+ }
96
 
97
+ // Enqueue the needed scripts, already registered.
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  }
99
 
100
+ /**
101
+ * Determine if Style Manager is supported.
102
+ *
103
+ * @return bool
104
+ * @since 1.7.4
105
+ *
106
+ */
107
+ public function is_supported() {
108
+ // For now we will only use the fact that Style Manager is supported.
109
+ return apply_filters( 'customify_theme_configs_are_supported', Customify_Style_Manager::instance()->is_supported() );
110
  }
111
 
112
+ /**
113
+ * Get the themes configuration.
114
+ *
115
+ * @param bool $skip_cache Optional. Whether to use the cached config or fetch a new one.
116
+ *
117
+ * @return array
118
+ * @since 1.7.4
119
+ *
120
+ */
121
+ public function get_theme_configs( $skip_cache = false ) {
122
+ $theme_configs = array();
123
+
124
+ // Make sure that the Design Assets class is loaded.
125
+ require_once 'lib/class-customify-design-assets.php';
126
 
127
+ // Get the design assets data.
128
+ $design_assets = Customify_Design_Assets::instance()->get( $skip_cache );
129
+ if ( false !== $design_assets && ! empty( $design_assets['theme_configs'] ) ) {
130
+ $theme_configs = $design_assets['theme_configs'];
 
 
131
  }
132
 
133
+ return apply_filters( 'customify_get_theme_configs', $theme_configs );
134
+ }
135
+
136
+ /**
137
+ * Maybe activate an external theme config.
138
+ *
139
+ * If the conditions are met, activate an external theme config by declaring support for the style manager and saving the config.
140
+ *
141
+ * @param array $config This holds required keys for the plugin config like 'opt-name', 'panels', 'settings'
142
+ *
143
+ * @return array
144
+ * @since 1.7.4
145
+ *
146
+ */
147
+ public function maybe_activate_external_theme_config( $config ) {
148
+ // If somebody else already declared support for the Style Manager, we stop and let them have it.
149
+ if ( $this->is_supported() ) {
150
+ return $config;
151
  }
152
 
153
+ // First gather details about the current (parent) theme.
154
+ $theme = wp_get_theme( get_template() );
155
+ // Bail if for some strange reason we couldn't find the theme.
156
+ if ( ! $theme->exists() ) {
157
+ return $config;
158
  }
 
159
 
160
+ // Now determine if we have a theme config for the current theme.
161
+ $theme_configs = $this->get_theme_configs();
 
 
 
 
 
162
 
163
+ // We will go through every theme config and determine it's match score
164
+ foreach ( $theme_configs as $hashid => $theme_config ) {
165
+ // Loose matching means that the theme doesn't have to match all the conditions.
166
+ $loose_match = false;
167
+ if ( ! empty( $theme_config['loose_match'] ) ) {
168
+ $loose_match = true;
169
+ }
170
 
171
+ $matches = 0;
172
+ $total = 0;
173
+ if ( ! empty( $theme_config['name'] ) && $theme_config['name'] == $theme->get( 'Name' ) ) {
174
+ $matches ++;
175
+ $total ++;
176
+ }
177
+ if ( ! empty( $theme_config['slug'] ) && $theme_config['slug'] == $theme->get_stylesheet() ) {
178
+ $matches ++;
179
+ $total ++;
180
+ }
181
+ if ( ! empty( $theme_config['txtd'] ) && $theme_config['txtd'] == $theme->get( 'TextDomain' ) ) {
182
+ $matches ++;
183
+ $total ++;
184
+ }
185
 
186
+ $theme_configs[ $hashid ]['match_score'] = 0;
187
+ if ( true === $loose_match ) {
188
+ $theme_configs[ $hashid ]['match_score'] = $matches;
189
+ } elseif ( $matches === $total ) {
190
+ $theme_configs[ $hashid ]['match_score'] = $matches;
191
+ }
192
+ }
193
+
194
+ // Now we will order the theme configs by match scores, descending and get the highest matching candidate, if any.
195
+ $theme_configs = Customify_Array::array_orderby( $theme_configs, 'match_score', SORT_DESC );
196
+ $external_theme_config = array_shift( $theme_configs );
197
+ // If we've ended up with a theme config with a zero match score, bail.
198
+ if ( empty( $external_theme_config['match_score'] ) || empty( $external_theme_config['config']['sections'] ) ) {
199
+ return $config;
200
+ }
201
+
202
+ // Now we have a theme config to work with. Save it for later use.
203
+ $this->external_theme_config = $external_theme_config;
204
+
205
+ // Declare support for the Style Manager if there is such a section in the config
206
+ if ( isset( $external_theme_config['config']['sections']['style_manager_section'] ) ) {
207
+ add_theme_support( 'customizer_style_manager' );
208
+ }
209
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
  return $config;
211
  }
212
 
213
+ /**
214
+ * Maybe apply an external theme config.
215
+ *
216
+ * If the conditions are met, apply an external theme config. Right now we are only handling sections and their controls.
217
+ *
218
+ * @param array $config This holds required keys for the plugin config like 'opt-name', 'panels', 'settings'
219
+ *
220
+ * @return array
221
+ * @since 1.7.4
222
+ *
223
+ */
224
+ public function maybe_apply_external_theme_config( $config ) {
225
+ // Bail if we have no external theme config data.
226
+ if ( empty( $this->external_theme_config ) ) {
227
+ return $config;
228
  }
229
 
230
+ // Apply the theme config.
231
+ // If we are dealing with the Customify default config, we need a clean slate, sort of.
232
+ if ( 'customify_defaults' === $config['opt-name'] ) {
233
+ // We will save the Style Manager config so we can merge with it. But the rest goes away.
234
+ $style_manager_section = array();
235
+ if ( isset( $config['sections']['style_manager_section'] ) ) {
236
+ $style_manager_section = $config['sections']['style_manager_section'];
237
+ }
238
 
239
+ $config['opt-name'] = get_template() . '_options';
240
+ if ( ! empty( $this->external_theme_config['config']['opt-name'] ) ) {
241
+ $config['opt-name'] = $this->external_theme_config['config']['opt-name'];
242
+ }
243
 
244
+ $config['sections'] = array(
245
+ 'style_manager_section' => $style_manager_section,
246
+ );
247
+ }
248
 
249
+ // Now merge things.
250
+ $config['sections'] = Customify_Array::array_merge_recursive_distinct( $config['sections'], $this->external_theme_config['config']['sections'] );
251
 
252
+ return $config;
 
 
 
 
 
 
 
 
 
 
 
 
253
  }
254
 
255
+ /**
256
+ * Maybe process certain "commands" from the external theme config.
257
+ *
258
+ * Mainly things like removing sections, controls, etc.
259
+ *
260
+ * @param WP_Customize_Manager $wp_customize
261
+ *
262
+ * @since 1.7.4
263
+ *
264
+ */
265
+ public function maybe_process_external_theme_config_extras( $wp_customize ) {
266
+ // Bail if we have no external theme config data.
267
+ if ( empty( $this->external_theme_config ) ) {
268
+ return;
269
  }
270
 
271
+ // Maybe remove panels
272
+ if ( ! empty( $this->external_theme_config['config']['remove_panels'] ) ) {
273
+ // Standardize it.
274
+ if ( is_string( $this->external_theme_config['config']['remove_panels'] ) ) {
275
+ $this->external_theme_config['config']['remove_panels'] = array( $this->external_theme_config['config']['remove_panels'] );
276
+ }
277
 
278
+ foreach ( $this->external_theme_config['config']['remove_panels'] as $panel_id ) {
279
+ $wp_customize->remove_panel( $panel_id );
280
+ }
 
 
281
  }
282
 
283
+ // Maybe remove sections
284
+ if ( ! empty( $this->external_theme_config['config']['remove_sections'] ) ) {
285
+ // Standardize it.
286
+ if ( is_string( $this->external_theme_config['config']['remove_sections'] ) ) {
287
+ $this->external_theme_config['config']['remove_sections'] = array( $this->external_theme_config['config']['remove_sections'] );
288
+ }
289
+
290
+ foreach ( $this->external_theme_config['config']['remove_sections'] as $section_id ) {
291
 
292
+ if ( 'widgets' === $section_id ) {
293
+ global $wp_registered_sidebars;
294
 
295
+ foreach ( $wp_registered_sidebars as $widget => $settings ) {
296
+ $wp_customize->remove_section( 'sidebar-widgets-' . $widget );
297
+ }
298
+ continue;
299
  }
 
 
300
 
301
+ $wp_customize->remove_section( $section_id );
302
+ }
303
  }
 
304
 
305
+ // Maybe remove settings
306
+ if ( ! empty( $this->external_theme_config['config']['remove_settings'] ) ) {
307
+ // Standardize it.
308
+ if ( is_string( $this->external_theme_config['config']['remove_settings'] ) ) {
309
+ $this->external_theme_config['config']['remove_settings'] = array( $this->external_theme_config['config']['remove_settings'] );
310
+ }
311
 
312
+ foreach ( $this->external_theme_config['config']['remove_settings'] as $setting_id ) {
313
+ $wp_customize->remove_setting( $setting_id );
314
+ }
315
  }
 
316
 
317
+ // Maybe remove controls
318
+ if ( ! empty( $this->external_theme_config['config']['remove_controls'] ) ) {
319
+ // Standardize it.
320
+ if ( is_string( $this->external_theme_config['config']['remove_controls'] ) ) {
321
+ $this->external_theme_config['config']['remove_controls'] = array( $this->external_theme_config['config']['remove_controls'] );
322
+ }
323
 
324
+ foreach ( $this->external_theme_config['config']['remove_controls'] as $control_id ) {
325
+ $wp_customize->remove_control( $control_id );
326
+ }
327
  }
328
  }
 
329
 
330
+ /**
331
+ * Output the JSON in the Customizer page source.
332
+ */
333
+ public function maybe_output_json_external_config() {
334
+ if ( ! empty( $this->external_theme_config['config'] ) ) {
335
+ // Also output the JSON in a special hidden div for easy copy pasting.
336
+ // Also remove any multiple tabs.
337
+ echo "\n" . '<!--' . "\n" . 'Just copy&paste this:' . "\n" . "\n" . trim( str_replace( '\t\t', '', json_encode( $this->external_theme_config['config'] ) ) ) . "\n" . "\n" . '-->' . "\n";
338
+ }
339
  }
 
340
 
341
+ /**
342
+ * Main Customify_Theme_Configs Instance
343
+ *
344
+ * Ensures only one instance of Customify_Theme_Configs is loaded or can be loaded.
345
+ *
346
+ * @return Customify_Theme_Configs Main Customify_Theme_Configs instance
347
+ * @since 1.7.4
348
+ * @static
349
+ *
350
+ */
351
+ public static function instance() {
 
 
 
 
352
 
353
+ if ( is_null( self::$_instance ) ) {
354
+ self::$_instance = new self();
355
+ }
356
 
357
+ return self::$_instance;
358
+ } // End instance ()
 
 
 
 
359
 
360
+ /**
361
+ * Cloning is forbidden.
362
+ *
363
+ * @since 1.7.4
364
+ */
365
+ public function __clone() {
366
 
367
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'You should not do that!', 'customify' ), null );
368
+ }
 
 
 
 
369
 
370
+ /**
371
+ * Unserializing instances of this class is forbidden.
372
+ *
373
+ * @since 1.7.4
374
+ */
375
+ public function __wakeup() {
376
+
377
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'You should not do that!', 'customify' ), null );
378
+ }
379
+ }
380
 
381
+ }
includes/class-pixcustomify.php CHANGED
@@ -82,10 +82,6 @@ class PixCustomifyPlugin {
82
 
83
  protected $opt_name;
84
 
85
- protected $jetpack_default_modules = array();
86
- protected $jetpack_blocked_modules = array();
87
- protected $jetpack_sharing_default_options = array();
88
-
89
  private $customizer_config = array();
90
 
91
  /**
@@ -94,7 +90,7 @@ class PixCustomifyPlugin {
94
  * @access private
95
  * @since 1.5.0
96
  */
97
- private $minimalRequiredPhpVersion = '5.2';
98
 
99
  protected function __construct( $file, $version = '1.0.0' ) {
100
  //the main plugin file (the one that loads all this)
@@ -946,8 +942,8 @@ class PixCustomifyPlugin {
946
  */
947
  public function __clone() {
948
 
949
- _doing_it_wrong( __FUNCTION__, esc_html( __( 'Cheatin&#8217; huh?' ) ), null );
950
- } // End __clone ()
951
 
952
  /**
953
  * Unserializing instances of this class is forbidden.
@@ -956,6 +952,6 @@ class PixCustomifyPlugin {
956
  */
957
  public function __wakeup() {
958
 
959
- _doing_it_wrong( __FUNCTION__, esc_html( __( 'Cheatin&#8217; huh?' ) ), null );
960
- } // End __wakeup ()
961
  }
82
 
83
  protected $opt_name;
84
 
 
 
 
 
85
  private $customizer_config = array();
86
 
87
  /**
90
  * @access private
91
  * @since 1.5.0
92
  */
93
+ private $minimalRequiredPhpVersion = '5.3';
94
 
95
  protected function __construct( $file, $version = '1.0.0' ) {
96
  //the main plugin file (the one that loads all this)
942
  */
943
  public function __clone() {
944
 
945
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'You should not do that!', 'customify' ), null );
946
+ }
947
 
948
  /**
949
  * Unserializing instances of this class is forbidden.
952
  */
953
  public function __wakeup() {
954
 
955
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'You should not do that!', 'customify' ), null );
956
+ }
957
  }
includes/customify_theme_root.php CHANGED
@@ -76,7 +76,7 @@ $config['sections'] = [
76
  * Fonts - This section will handle all elements fonts (eg. links, headings)
77
  */
78
  'fonts_section' => [
79
- 'title' => __( 'Fonts', 'customify' ),
80
  'priority' => 3, // This will put this section right after Colors section that has a priority of 2.
81
  'options' => [
82
  /**
@@ -515,7 +515,7 @@ $config['sections'] = [
515
  * COLORS - This section will handle all elements colors (eg. links, headings)
516
  */
517
  'colors_section' => [
518
- 'title' => __( 'Colors', 'customify' ),
519
  'priority' => 3, // This will put this section right after Style Manager that has a priority of 1.
520
  'options' => [
521
  /**
@@ -527,7 +527,7 @@ $config['sections'] = [
527
  ],
528
  'header_navigation_text_color' => [
529
  'type' => 'color',
530
- 'label' => __( 'Header Text Color', 'customify' ),
531
  'live' => true,
532
  'default' => '#404040',
533
  'css' => [
@@ -559,7 +559,7 @@ $config['sections'] = [
559
  ],
560
  'header_navigation_links_color' => [
561
  'type' => 'color',
562
- 'label' => __( 'Navigation Links Color', 'customify' ),
563
  'live' => true,
564
  'default' => '#333333',
565
  'css' => [
@@ -593,7 +593,7 @@ $config['sections'] = [
593
  ],
594
  'header_navigation_links_active_color' => [
595
  'type' => 'color',
596
- 'label' => __( 'Links Active Color', 'customify' ),
597
  'live' => true,
598
  'default' => '#282828',
599
  'css' => [
@@ -611,7 +611,7 @@ $config['sections'] = [
611
  ],
612
  'header_background_color' => [
613
  'type' => 'color',
614
- 'label' => __( 'Header Background', 'customify' ),
615
  'live' => true,
616
  'default' => '#ffffff',
617
  'css' => [
@@ -684,7 +684,7 @@ $config['sections'] = [
684
  ],
685
  'page_title_color' => [
686
  'type' => 'color',
687
- 'label' => __( 'Page Title Color', 'customify' ),
688
  'live' => true,
689
  'default' => '#282828',
690
  'css' => [
@@ -697,7 +697,7 @@ $config['sections'] = [
697
  ],
698
  'body_text_color' => [
699
  'type' => 'color',
700
- 'label' => __( 'Body Text Color', 'customify' ),
701
  'live' => true,
702
  'default' => '#6d6d6d',
703
  'css' => [
@@ -764,7 +764,7 @@ $config['sections'] = [
764
  ],
765
  'body_link_color' => [
766
  'type' => 'color',
767
- 'label' => __( 'Body Link Color', 'customify' ),
768
  'live' => true,
769
  'default' => '#96588A',
770
  'css' => [
@@ -804,7 +804,7 @@ $config['sections'] = [
804
  ],
805
  'body_link_active_color' => [
806
  'type' => 'color',
807
- 'label' => __( 'Body Link Active Color', 'customify' ),
808
  'live' => true,
809
  'default' => '#282828',
810
  'css' => [
@@ -1030,7 +1030,7 @@ $config['sections'] = [
1030
  ],
1031
  'buttons_text_color' => [
1032
  'type' => 'color',
1033
- 'label' => __( 'Text Color', 'customify' ),
1034
  'live' => true,
1035
  'default' => '#333333',
1036
  'css' => [
@@ -1050,7 +1050,7 @@ $config['sections'] = [
1050
  ],
1051
  'buttons_background_color' => [
1052
  'type' => 'color',
1053
- 'label' => __( 'Background Color', 'customify' ),
1054
  'live' => true,
1055
  'default' => '#eeeeee',
1056
  'css' => [
@@ -1093,7 +1093,7 @@ $config['sections'] = [
1093
  ],
1094
  'buttons_alt_text_color' => [
1095
  'type' => 'color',
1096
- 'label' => __( 'Alternate Text Color', 'customify' ),
1097
  'live' => true,
1098
  'default' => '#ffffff',
1099
  'css' => [
@@ -1105,7 +1105,7 @@ $config['sections'] = [
1105
  ],
1106
  'buttons_alt_background_color' => [
1107
  'type' => 'color',
1108
- 'label' => __( 'Alternate Background Color', 'customify' ),
1109
  'live' => true,
1110
  'default' => '#333333',
1111
  'css' => [
@@ -1151,7 +1151,7 @@ $config['sections'] = [
1151
  ],
1152
  'footer_text_color' => [
1153
  'type' => 'color',
1154
- 'label' => __( 'Footer Text Color', 'customify' ),
1155
  'live' => true,
1156
  'default' => '#6d6d6d',
1157
  'css' => [
@@ -1163,7 +1163,7 @@ $config['sections'] = [
1163
  ],
1164
  'footer_links_color' => [
1165
  'type' => 'color',
1166
- 'label' => __( 'Footer Links Color', 'customify' ),
1167
  'live' => true,
1168
  'default' => '#333333',
1169
  'css' => [
@@ -1175,7 +1175,7 @@ $config['sections'] = [
1175
  ],
1176
  'footer_heading_color' => [
1177
  'type' => 'color',
1178
- 'label' => __( 'Footer Headings Color', 'customify' ),
1179
  'live' => true,
1180
  'default' => '#333333',
1181
  'css' => [
@@ -1187,7 +1187,7 @@ $config['sections'] = [
1187
  ],
1188
  'footer_background_color' => [
1189
  'type' => 'color',
1190
- 'label' => __( 'Footer Background', 'customify' ),
1191
  'live' => true,
1192
  'default' => '#f0f0f0',
1193
  'css' => [
@@ -1208,7 +1208,7 @@ $config['sections'] = [
1208
 
1209
  'woocommerce_info_background_color' => [
1210
  'type' => 'background-color',
1211
- 'label' => __( 'WooCommerce Info', 'customify' ),
1212
  'live' => true,
1213
  'default' => '#3d9cd2',
1214
  'css' => [
@@ -1328,4 +1328,4 @@ $config['remove_controls'] = [
1328
  'background_color',
1329
  ];
1330
 
1331
- // You don't need to return anything.
76
  * Fonts - This section will handle all elements fonts (eg. links, headings)
77
  */
78
  'fonts_section' => [
79
+ 'title' => esc_html__( 'Fonts', 'customify' ),
80
  'priority' => 3, // This will put this section right after Colors section that has a priority of 2.
81
  'options' => [
82
  /**
515
  * COLORS - This section will handle all elements colors (eg. links, headings)
516
  */
517
  'colors_section' => [
518
+ 'title' => esc_html__( 'Colors', 'customify' ),
519
  'priority' => 3, // This will put this section right after Style Manager that has a priority of 1.
520
  'options' => [
521
  /**
527
  ],
528
  'header_navigation_text_color' => [
529
  'type' => 'color',
530
+ 'label' => esc_html__( 'Header Text Color', 'customify' ),
531
  'live' => true,
532
  'default' => '#404040',
533
  'css' => [
559
  ],
560
  'header_navigation_links_color' => [
561
  'type' => 'color',
562
+ 'label' => esc_html__( 'Navigation Links Color', 'customify' ),
563
  'live' => true,
564
  'default' => '#333333',
565
  'css' => [
593
  ],
594
  'header_navigation_links_active_color' => [
595
  'type' => 'color',
596
+ 'label' => esc_html__( 'Links Active Color', 'customify' ),
597
  'live' => true,
598
  'default' => '#282828',
599
  'css' => [
611
  ],
612
  'header_background_color' => [
613
  'type' => 'color',
614
+ 'label' => esc_html__( 'Header Background', 'customify' ),
615
  'live' => true,
616
  'default' => '#ffffff',
617
  'css' => [
684
  ],
685
  'page_title_color' => [
686
  'type' => 'color',
687
+ 'label' => esc_html__( 'Page Title Color', 'customify' ),
688
  'live' => true,
689
  'default' => '#282828',
690
  'css' => [
697
  ],
698
  'body_text_color' => [
699
  'type' => 'color',
700
+ 'label' => esc_html__( 'Body Text Color', 'customify' ),
701
  'live' => true,
702
  'default' => '#6d6d6d',
703
  'css' => [
764
  ],
765
  'body_link_color' => [
766
  'type' => 'color',
767
+ 'label' => esc_html__( 'Body Link Color', 'customify' ),
768
  'live' => true,
769
  'default' => '#96588A',
770
  'css' => [
804
  ],
805
  'body_link_active_color' => [
806
  'type' => 'color',
807
+ 'label' => esc_html__( 'Body Link Active Color', 'customify' ),
808
  'live' => true,
809
  'default' => '#282828',
810
  'css' => [
1030
  ],
1031
  'buttons_text_color' => [
1032
  'type' => 'color',
1033
+ 'label' => esc_html__( 'Text Color', 'customify' ),
1034
  'live' => true,
1035
  'default' => '#333333',
1036
  'css' => [
1050
  ],
1051
  'buttons_background_color' => [
1052
  'type' => 'color',
1053
+ 'label' => esc_html__( 'Background Color', 'customify' ),
1054
  'live' => true,
1055
  'default' => '#eeeeee',
1056
  'css' => [
1093
  ],
1094
  'buttons_alt_text_color' => [
1095
  'type' => 'color',
1096
+ 'label' => esc_html__( 'Alternate Text Color', 'customify' ),
1097
  'live' => true,
1098
  'default' => '#ffffff',
1099
  'css' => [
1105
  ],
1106
  'buttons_alt_background_color' => [
1107
  'type' => 'color',
1108
+ 'label' => esc_html__( 'Alternate Background Color', 'customify' ),
1109
  'live' => true,
1110
  'default' => '#333333',
1111
  'css' => [
1151
  ],
1152
  'footer_text_color' => [
1153
  'type' => 'color',
1154
+ 'label' => esc_html__( 'Footer Text Color', 'customify' ),
1155
  'live' => true,
1156
  'default' => '#6d6d6d',
1157
  'css' => [
1163
  ],
1164
  'footer_links_color' => [
1165
  'type' => 'color',
1166
+ 'label' => esc_html__( 'Footer Links Color', 'customify' ),
1167
  'live' => true,
1168
  'default' => '#333333',
1169
  'css' => [
1175
  ],
1176
  'footer_heading_color' => [
1177
  'type' => 'color',
1178
+ 'label' => esc_html__( 'Footer Headings Color', 'customify' ),
1179
  'live' => true,
1180
  'default' => '#333333',
1181
  'css' => [
1187
  ],
1188
  'footer_background_color' => [
1189
  'type' => 'color',
1190
+ 'label' => esc_html__( 'Footer Background', 'customify' ),
1191
  'live' => true,
1192
  'default' => '#f0f0f0',
1193
  'css' => [
1208
 
1209
  'woocommerce_info_background_color' => [
1210
  'type' => 'background-color',
1211
+ 'label' => esc_html__( 'WooCommerce Info', 'customify' ),
1212
  'live' => true,
1213
  'default' => '#3d9cd2',
1214
  'css' => [
1328
  'background_color',
1329
  ];
1330
 
1331
+ // You don't need to return anything.
includes/extras.php CHANGED
@@ -279,7 +279,7 @@ if ( ! function_exists('add_customify_base_options') ) {
279
  'options' => array(
280
  'site_title_size' => array(
281
  'type' => 'range',
282
- 'label' => 'Site Title Size',
283
  'live' => true,
284
  'input_attrs' => array(
285
  'min' => 24,
@@ -320,34 +320,6 @@ if ( ! function_exists('add_customify_base_options') ) {
320
  )
321
  );
322
 
323
- /**
324
- * A self explanatory example of panels **
325
- **/
326
- // $config['panels'] = array(
327
- // 'panel_id' => array(
328
- // 'title' => esc_html__( 'Panel Title', 'customify' ),
329
- // 'sections' => array(
330
- // 'panel_section' => array(
331
- // 'title' => esc_html__( 'Section Title', 'customify' ),
332
- // 'options' => array(
333
- // 'setting_id' => array(
334
- // 'type' => 'color',
335
- // 'label' => esc_html__( 'Label', 'customify' ),
336
- // 'live' => true, // or false
337
- // 'default' => '#6c6e70',
338
- // 'css' => array(
339
- // array(
340
- // 'property' => 'color',
341
- // 'selector' => 'a, .entry-meta a',
342
- // ),
343
- // )
344
- // ),
345
- // )
346
- // )
347
- // )
348
- // )
349
- // );
350
-
351
  return $config;
352
  }
353
  }
279
  'options' => array(
280
  'site_title_size' => array(
281
  'type' => 'range',
282
+ 'label' => esc_html__( 'Site Title Size', 'customify' ),
283
  'live' => true,
284
  'input_attrs' => array(
285
  'min' => 24,
320
  )
321
  );
322
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
323
  return $config;
324
  }
325
  }
includes/filter-functions.php CHANGED
@@ -5,191 +5,221 @@
5
  * Think modifying colors, etc.
6
  */
7
 
8
- /**
9
- * Adjust a hex color brightness
10
- * Allows us to create hover styles for custom link colors
11
- *
12
- * Taken from the Storefront theme by Automattic: https://github.com/woocommerce/storefront
13
- *
14
- * @param string $hex hex color e.g. #111111.
15
- * @param integer $steps factor by which to brighten/darken ranging from -255 (darken) to 255 (brighten).
16
- * @return string brightened/darkened hex color
17
- */
18
- function pixcloud_adjust_color_brightness( $hex, $steps ) {
19
- // Steps should be between -255 and 255. Negative = darker, positive = lighter.
20
- $steps = max( -255, min( 255, $steps ) );
21
-
22
- // Format the hex color string.
23
- $hex = str_replace( '#', '', $hex );
24
-
25
- if ( 3 == strlen( $hex ) ) {
26
- $hex = str_repeat( substr( $hex, 0, 1 ), 2 ) . str_repeat( substr( $hex, 1, 1 ), 2 ) . str_repeat( substr( $hex, 2, 1 ), 2 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  }
28
-
29
- // Get decimal values.
30
- $r = hexdec( substr( $hex, 0, 2 ) );
31
- $g = hexdec( substr( $hex, 2, 2 ) );
32
- $b = hexdec( substr( $hex, 4, 2 ) );
33
-
34
- // Adjust number of steps and keep it inside 0 to 255.
35
- $r = max( 0, min( 255, $r + $steps ) );
36
- $g = max( 0, min( 255, $g + $steps ) );
37
- $b = max( 0, min( 255, $b + $steps ) );
38
-
39
- $r_hex = str_pad( dechex( $r ), 2, '0', STR_PAD_LEFT );
40
- $g_hex = str_pad( dechex( $g ), 2, '0', STR_PAD_LEFT );
41
- $b_hex = str_pad( dechex( $b ), 2, '0', STR_PAD_LEFT );
42
-
43
- return '#' . $r_hex . $g_hex . $b_hex;
44
  }
45
 
46
- /**
47
- * Negate the value.
48
- *
49
- * @param int|float $value
50
- * @return int|float
51
- */
52
- function pixcloud_negate( $value ) {
53
- if ( ! is_numeric( $value ) ) {
54
- return $value;
 
 
 
 
 
55
  }
56
-
57
- return - $value;
58
  }
59
 
60
- /**
61
- * Ensure that value is at least the $min value.
62
- *
63
- * @param int|float $value
64
- * @param int|float $min
65
- * @return int|float
66
- */
67
- function pixcloud_min( $value, $min ) {
68
- if ( ! is_numeric( $value ) || ! is_numeric( $min ) ) {
69
- return $value;
70
- }
71
-
72
- if ( $value < $min ) {
73
- return $min;
74
- }
75
-
76
- return $value;
77
- }
78
 
79
- /**
80
- * Ensure that value is at most the $max value.
81
- *
82
- * @param int|float $value
83
- * @param int|float $max
84
- * @return int|float
85
- */
86
- function pixcloud_max( $value, $max ) {
87
- if ( ! is_numeric( $value ) || ! is_numeric( $max ) ) {
88
  return $value;
89
  }
90
-
91
- if ( $value > $max ) {
92
- return $max;
93
- }
94
-
95
- return $value;
96
  }
97
 
98
- /**
99
- * Ensure that value is between $min and $max.
100
- *
101
- * @param int|float $value
102
- * @param int|float $min
103
- * @param int|float $max
104
- * @return int|float
105
- */
106
- function pixcloud_min_max( $value, $min, $max ) {
107
- if ( ! is_numeric( $value ) || ! is_numeric( $min ) || ! is_numeric( $max ) ) {
 
 
 
 
 
 
 
 
108
  return $value;
109
  }
 
110
 
111
- if ( $value < $min ) {
112
- $value = $min;
113
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
 
115
- if ( $value > $max ) {
116
- $value = $max;
117
  }
118
-
119
- return $value;
120
  }
121
 
122
- /**
123
- * Add something to the value.
124
- *
125
- * @param int|float $value
126
- * @param int|float $add
127
- * @return int|float
128
- */
129
- function pixcloud_add( $value, $add ) {
130
- if ( ! is_numeric( $value ) || ! is_numeric( $add ) ) {
131
- return $value;
 
 
 
 
 
132
  }
133
-
134
- return $value + $add;
135
  }
136
 
137
- /**
138
- * Substract something from the value.
139
- *
140
- * @param int|float $value
141
- * @param int|float $substract
142
- * @return int|float
143
- */
144
- function pixcloud_substract( $value, $substract ) {
145
- if ( ! is_numeric( $value ) || ! is_numeric( $substract ) ) {
146
- return $value;
 
 
 
 
 
147
  }
148
-
149
- return $value - $substract;
150
  }
151
 
152
- /**
153
- * Multiply the value.
154
- *
155
- * @param int|float $value
156
- * @param int|float $multiply
157
- * @return int|float
158
- */
159
- function pixcloud_multiply( $value, $multiply ) {
160
- if ( ! is_numeric( $value ) || ! is_numeric( $multiply ) ) {
161
- return $value;
 
 
 
 
 
162
  }
163
-
164
- return $value * $multiply;
165
  }
166
 
167
- /**
168
- * Divide the value.
169
- *
170
- * @param int|float $value
171
- * @param int|float $divide
172
- * @return int|float
173
- */
174
- function pixcloud_divide( $value, $divide ) {
175
- if ( ! is_numeric( $value ) || ! is_numeric( $divide ) || empty( $divide ) ) {
176
- return $value;
 
 
 
 
 
177
  }
178
-
179
- return $value / $divide;
180
  }
181
 
182
- /**
183
- * Divide the value and get the remainder.
184
- *
185
- * @param int|float $value
186
- * @param int|float $divide
187
- * @return int|float
188
- */
189
- function pixcloud_modulo( $value, $divide ) {
190
- if ( ! is_numeric( $value ) || ! is_numeric( $divide ) || empty( $divide ) ) {
191
- return $value;
 
 
 
 
 
192
  }
193
-
194
- return $value % $divide;
195
- }
5
  * Think modifying colors, etc.
6
  */
7
 
8
+ if ( ! function_exists( 'pixcloud_adjust_color_brightness' ) ) {
9
+ /**
10
+ * Adjust a hex color brightness
11
+ * Allows us to create hover styles for custom link colors
12
+ *
13
+ * Taken from the Storefront theme by Automattic: https://github.com/woocommerce/storefront
14
+ *
15
+ * @param string $hex hex color e.g. #111111.
16
+ * @param integer $steps factor by which to brighten/darken ranging from -255 (darken) to 255 (brighten).
17
+ *
18
+ * @return string brightened/darkened hex color
19
+ */
20
+ function pixcloud_adjust_color_brightness( $hex, $steps ) {
21
+ // Steps should be between -255 and 255. Negative = darker, positive = lighter.
22
+ $steps = max( - 255, min( 255, $steps ) );
23
+
24
+ // Format the hex color string.
25
+ $hex = str_replace( '#', '', $hex );
26
+
27
+ if ( 3 == strlen( $hex ) ) {
28
+ $hex = str_repeat( substr( $hex, 0, 1 ), 2 ) . str_repeat( substr( $hex, 1, 1 ), 2 ) . str_repeat( substr( $hex, 2, 1 ), 2 );
29
+ }
30
+
31
+ // Get decimal values.
32
+ $r = hexdec( substr( $hex, 0, 2 ) );
33
+ $g = hexdec( substr( $hex, 2, 2 ) );
34
+ $b = hexdec( substr( $hex, 4, 2 ) );
35
+
36
+ // Adjust number of steps and keep it inside 0 to 255.
37
+ $r = max( 0, min( 255, $r + $steps ) );
38
+ $g = max( 0, min( 255, $g + $steps ) );
39
+ $b = max( 0, min( 255, $b + $steps ) );
40
+
41
+ $r_hex = str_pad( dechex( $r ), 2, '0', STR_PAD_LEFT );
42
+ $g_hex = str_pad( dechex( $g ), 2, '0', STR_PAD_LEFT );
43
+ $b_hex = str_pad( dechex( $b ), 2, '0', STR_PAD_LEFT );
44
+
45
+ return '#' . $r_hex . $g_hex . $b_hex;
46
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  }
48
 
49
+ if ( ! function_exists( 'pixcloud_negate' ) ) {
50
+ /**
51
+ * Negate the value.
52
+ *
53
+ * @param int|float $value
54
+ *
55
+ * @return int|float
56
+ */
57
+ function pixcloud_negate( $value ) {
58
+ if ( ! is_numeric( $value ) ) {
59
+ return $value;
60
+ }
61
+
62
+ return - $value;
63
  }
 
 
64
  }
65
 
66
+ if ( ! function_exists( 'pixcloud_min' ) ) {
67
+ /**
68
+ * Ensure that value is at least the $min value.
69
+ *
70
+ * @param int|float $value
71
+ * @param int|float $min
72
+ *
73
+ * @return int|float
74
+ */
75
+ function pixcloud_min( $value, $min ) {
76
+ if ( ! is_numeric( $value ) || ! is_numeric( $min ) ) {
77
+ return $value;
78
+ }
79
+
80
+ if ( $value < $min ) {
81
+ return $min;
82
+ }
 
83
 
 
 
 
 
 
 
 
 
 
84
  return $value;
85
  }
 
 
 
 
 
 
86
  }
87
 
88
+ if ( ! function_exists( 'pixcloud_max' ) ) {
89
+ /**
90
+ * Ensure that value is at most the $max value.
91
+ *
92
+ * @param int|float $value
93
+ * @param int|float $max
94
+ *
95
+ * @return int|float
96
+ */
97
+ function pixcloud_max( $value, $max ) {
98
+ if ( ! is_numeric( $value ) || ! is_numeric( $max ) ) {
99
+ return $value;
100
+ }
101
+
102
+ if ( $value > $max ) {
103
+ return $max;
104
+ }
105
+
106
  return $value;
107
  }
108
+ }
109
 
110
+ if ( ! function_exists( 'pixcloud_min_max' ) ) {
111
+ /**
112
+ * Ensure that value is between $min and $max.
113
+ *
114
+ * @param int|float $value
115
+ * @param int|float $min
116
+ * @param int|float $max
117
+ *
118
+ * @return int|float
119
+ */
120
+ function pixcloud_min_max( $value, $min, $max ) {
121
+ if ( ! is_numeric( $value ) || ! is_numeric( $min ) || ! is_numeric( $max ) ) {
122
+ return $value;
123
+ }
124
+
125
+ if ( $value < $min ) {
126
+ $value = $min;
127
+ }
128
+
129
+ if ( $value > $max ) {
130
+ $value = $max;
131
+ }
132
 
133
+ return $value;
 
134
  }
 
 
135
  }
136
 
137
+ if ( ! function_exists( 'pixcloud_add' ) ) {
138
+ /**
139
+ * Add something to the value.
140
+ *
141
+ * @param int|float $value
142
+ * @param int|float $add
143
+ *
144
+ * @return int|float
145
+ */
146
+ function pixcloud_add( $value, $add ) {
147
+ if ( ! is_numeric( $value ) || ! is_numeric( $add ) ) {
148
+ return $value;
149
+ }
150
+
151
+ return $value + $add;
152
  }
 
 
153
  }
154
 
155
+ if ( ! function_exists( 'pixcloud_substract' ) ) {
156
+ /**
157
+ * Substract something from the value.
158
+ *
159
+ * @param int|float $value
160
+ * @param int|float $substract
161
+ *
162
+ * @return int|float
163
+ */
164
+ function pixcloud_substract( $value, $substract ) {
165
+ if ( ! is_numeric( $value ) || ! is_numeric( $substract ) ) {
166
+ return $value;
167
+ }
168
+
169
+ return $value - $substract;
170
  }
 
 
171
  }
172
 
173
+ if ( ! function_exists( 'pixcloud_multiply' ) ) {
174
+ /**
175
+ * Multiply the value.
176
+ *
177
+ * @param int|float $value
178
+ * @param int|float $multiply
179
+ *
180
+ * @return int|float
181
+ */
182
+ function pixcloud_multiply( $value, $multiply ) {
183
+ if ( ! is_numeric( $value ) || ! is_numeric( $multiply ) ) {
184
+ return $value;
185
+ }
186
+
187
+ return $value * $multiply;
188
  }
 
 
189
  }
190
 
191
+ if ( ! function_exists( 'pixcloud_divide' ) ) {
192
+ /**
193
+ * Divide the value.
194
+ *
195
+ * @param int|float $value
196
+ * @param int|float $divide
197
+ *
198
+ * @return int|float
199
+ */
200
+ function pixcloud_divide( $value, $divide ) {
201
+ if ( ! is_numeric( $value ) || ! is_numeric( $divide ) || empty( $divide ) ) {
202
+ return $value;
203
+ }
204
+
205
+ return $value / $divide;
206
  }
 
 
207
  }
208
 
209
+ if ( ! function_exists( 'pixcloud_modulo' ) ) {
210
+ /**
211
+ * Divide the value and get the remainder.
212
+ *
213
+ * @param int|float $value
214
+ * @param int|float $divide
215
+ *
216
+ * @return int|float
217
+ */
218
+ function pixcloud_modulo( $value, $divide ) {
219
+ if ( ! is_numeric( $value ) || ! is_numeric( $divide ) || empty( $divide ) ) {
220
+ return $value;
221
+ }
222
+
223
+ return $value % $divide;
224
  }
225
+ }
 
 
includes/lib/class-customify-array.php CHANGED
@@ -11,7 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) {
11
  exit; // Exit if accessed directly
12
  }
13
 
14
- if ( ! class_exists( 'Customify_Array' ) ) :
15
 
16
  class Customify_Array {
17
  /**
@@ -31,6 +31,7 @@ if ( ! class_exists( 'Customify_Array' ) ) :
31
  if ( ! is_array( $insert ) ) {
32
  $insert = array( $insert );
33
  }
 
34
  return array_merge( array_slice( $array, 0, $pos ), $insert, array_slice( $array, $pos ) );
35
  }
36
 
@@ -51,6 +52,7 @@ if ( ! class_exists( 'Customify_Array' ) ) :
51
  if ( ! is_array( $insert ) ) {
52
  $insert = array( $insert );
53
  }
 
54
  return array_merge( array_slice( $array, 0, $pos ), $insert, array_slice( $array, $pos ) );
55
  }
56
 
@@ -62,7 +64,7 @@ if ( ! class_exists( 'Customify_Array' ) ) :
62
  * you can search for the key of the subarray containing the 'two' key with the 'value2', that is 1
63
  *
64
  * @param array $array The array in which to search
65
- * @param string $key The key to search for
66
  * @param mixed $value The value to search for
67
  *
68
  * @return mixed|false
@@ -97,6 +99,7 @@ if ( ! class_exists( 'Customify_Array' ) ) :
97
  return $key;
98
  }
99
  }
 
100
  return false;
101
  }
102
 
@@ -207,6 +210,7 @@ if ( ! class_exists( 'Customify_Array' ) ) :
207
  }
208
  $value = $array[ $key ];
209
  unset( $array[ $key ] );
 
210
  return $value;
211
  }
212
 
@@ -223,6 +227,7 @@ if ( ! class_exists( 'Customify_Array' ) ) :
223
  if ( ! $key ) {
224
  return false;
225
  }
 
226
  return self::detach( $array, $key );
227
  }
228
 
@@ -245,48 +250,56 @@ if ( ! class_exists( 'Customify_Array' ) ) :
245
  array_slice( $array, $new_index, count( $array ) )
246
  )
247
  );
 
248
  return $array;
249
  }
250
 
251
  /**
252
- * Great answer from here: http://be2.php.net/manual/en/function.array-merge-recursive.php#92195
253
- *
254
- * array_merge_recursive does indeed merge arrays, but it converts values with duplicate
255
- * keys to arrays rather than overwriting the value in the first array with the duplicate
256
- * value in the second array, as array_merge does. I.e., with array_merge_recursive,
257
- * this happens (documented behavior):
258
- *
259
- * array_merge_recursive(array('key' => 'org value'), array('key' => 'new value'));
260
- * => array('key' => array('org value', 'new value'));
261
  *
262
- * array_merge_recursive_distinct does not change the datatypes of the values in the arrays.
263
- * Matching keys' values in the second array overwrite those in the first array, as is the
264
- * case with array_merge, i.e.:
 
 
 
265
  *
266
- * array_merge_recursive_distinct(array('key' => 'org value'), array('key' => 'new value'));
267
- * => array('key' => array('new value'));
268
  *
269
- * Parameters are passed by reference, though only for performance reasons. They're not
270
- * altered by this function.
271
- *
272
- * @param array $array1
273
- * @param array $array2
274
  * @return array
275
- * @author Daniel <daniel (at) danielsmedegaardbuus (dot) dk>
276
- * @author Gabriel Sobrinho <gabriel (dot) sobrinho (at) gmail (dot) com>
 
277
  */
278
- public static function array_merge_recursive_distinct( array &$array1, array &$array2 ) {
279
- $merged = $array1;
280
-
281
- foreach ( $array2 as $key => &$value ) {
282
- if ( is_array( $value ) && isset( $merged [ $key ] ) && is_array( $merged [ $key ] ) ) {
283
- $merged [ $key ] = self::array_merge_recursive_distinct( $merged [ $key ], $value );
284
- } else {
285
- $merged [ $key ] = $value;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
286
  }
287
  }
288
 
289
- return $merged;
290
  }
291
 
292
  /**
@@ -317,4 +330,4 @@ if ( ! class_exists( 'Customify_Array' ) ) :
317
  }
318
  }
319
 
320
- endif;
11
  exit; // Exit if accessed directly
12
  }
13
 
14
+ if ( ! class_exists( 'Customify_Array' ) ) {
15
 
16
  class Customify_Array {
17
  /**
31
  if ( ! is_array( $insert ) ) {
32
  $insert = array( $insert );
33
  }
34
+
35
  return array_merge( array_slice( $array, 0, $pos ), $insert, array_slice( $array, $pos ) );
36
  }
37
 
52
  if ( ! is_array( $insert ) ) {
53
  $insert = array( $insert );
54
  }
55
+
56
  return array_merge( array_slice( $array, 0, $pos ), $insert, array_slice( $array, $pos ) );
57
  }
58
 
64
  * you can search for the key of the subarray containing the 'two' key with the 'value2', that is 1
65
  *
66
  * @param array $array The array in which to search
67
+ * @param string $key The key to search for
68
  * @param mixed $value The value to search for
69
  *
70
  * @return mixed|false
99
  return $key;
100
  }
101
  }
102
+
103
  return false;
104
  }
105
 
210
  }
211
  $value = $array[ $key ];
212
  unset( $array[ $key ] );
213
+
214
  return $value;
215
  }
216
 
227
  if ( ! $key ) {
228
  return false;
229
  }
230
+
231
  return self::detach( $array, $key );
232
  }
233
 
250
  array_slice( $array, $new_index, count( $array ) )
251
  )
252
  );
253
+
254
  return $array;
255
  }
256
 
257
  /**
258
+ * Marge arrays recursively and distinct
 
 
 
 
 
 
 
 
259
  *
260
+ * Merges any number of arrays / parameters recursively, replacing
261
+ * entries with string keys with values from latter arrays.
262
+ * If the entry or the next value to be assigned is an array, then it
263
+ * automagically treats both arguments as an array.
264
+ * Numeric entries are appended, not replaced, but only if they are
265
+ * unique
266
  *
267
+ * @param array $base Initial array to merge.
268
+ * @param array ... Variable list of arrays to recursively merge.
269
  *
 
 
 
 
 
270
  * @return array
271
+ *
272
+ * @link http://www.php.net/manual/en/function.array-merge-recursive.php#96201
273
+ * @author Mark Roduner <mark.roduner@gmail.com>
274
  */
275
+ public static function array_merge_recursive_distinct() {
276
+ $arrays = func_get_args();
277
+ $base = array_shift( $arrays );
278
+ if ( ! is_array( $base ) ) {
279
+ $base = empty( $base ) ? array() : array( $base );
280
+ }
281
+ foreach ( $arrays as $append ) {
282
+ if ( ! is_array( $append ) ) {
283
+ $append = array( $append );
284
+ }
285
+ foreach ( $append as $key => $value ) {
286
+ if ( ! array_key_exists( $key, $base ) and ! is_numeric( $key ) ) {
287
+ $base[ $key ] = $append[ $key ];
288
+ continue;
289
+ }
290
+ if ( is_array( $value ) or ( array_key_exists( $key, $base ) and is_array( $base[ $key ] ) ) ) {
291
+ $base[ $key ] = self::array_merge_recursive_distinct( $base[ $key ], $append[ $key ] );
292
+ } else if ( is_numeric( $key ) ) {
293
+ if ( ! in_array( $value, $base ) ) {
294
+ $base[] = $value;
295
+ }
296
+ } else {
297
+ $base[ $key ] = $value;
298
+ }
299
  }
300
  }
301
 
302
+ return $base;
303
  }
304
 
305
  /**
330
  }
331
  }
332
 
333
+ }
includes/lib/class-customify-cloud-api.php CHANGED
@@ -11,7 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) {
11
  exit; // Exit if accessed directly
12
  }
13
 
14
- if ( ! class_exists( 'Customify_Cloud_Api' ) ) :
15
 
16
  class Customify_Cloud_Api {
17
 
@@ -212,4 +212,4 @@ class Customify_Cloud_Api {
212
  }
213
  }
214
 
215
- endif;
11
  exit; // Exit if accessed directly
12
  }
13
 
14
+ if ( ! class_exists( 'Customify_Cloud_Api' ) ) {
15
 
16
  class Customify_Cloud_Api {
17
 
212
  }
213
  }
214
 
215
+ }
includes/lib/class-customify-design-assets.php CHANGED
@@ -11,7 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) {
11
  exit; // Exit if accessed directly
12
  }
13
 
14
- if ( ! class_exists( 'Customify_Design_Assets' ) ) :
15
 
16
  class Customify_Design_Assets {
17
 
@@ -223,8 +223,8 @@ class Customify_Design_Assets {
223
  */
224
  public function __clone() {
225
 
226
- _doing_it_wrong( __FUNCTION__,esc_html( __( 'Cheatin&#8217; huh?' ) ), null );
227
- } // End __clone ()
228
 
229
  /**
230
  * Unserializing instances of this class is forbidden.
@@ -233,8 +233,8 @@ class Customify_Design_Assets {
233
  */
234
  public function __wakeup() {
235
 
236
- _doing_it_wrong( __FUNCTION__, esc_html( __( 'Cheatin&#8217; huh?' ) ), null );
237
- } // End __wakeup ()
238
  }
239
 
240
- endif;
11
  exit; // Exit if accessed directly
12
  }
13
 
14
+ if ( ! class_exists( 'Customify_Design_Assets' ) ) {
15
 
16
  class Customify_Design_Assets {
17
 
223
  */
224
  public function __clone() {
225
 
226
+ _doing_it_wrong( __FUNCTION__,esc_html__( 'You should not do that!', 'customify' ), null );
227
+ }
228
 
229
  /**
230
  * Unserializing instances of this class is forbidden.
233
  */
234
  public function __wakeup() {
235
 
236
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'You should not do that!', 'customify' ), null );
237
+ }
238
  }
239
 
240
+ }
js/customizer.js CHANGED
@@ -15,16 +15,16 @@
15
 
16
  // add ace editors
17
  $('.customify_ace_editor').each(function (key, el) {
18
- var id = $(this).attr('id'),
19
  css_editor = ace.edit(id)
20
 
21
- var editor_type = $(this).data('editor_type')
22
  // init the ace editor
23
  css_editor.setTheme('ace/theme/github')
24
  css_editor.getSession().setMode('ace/mode/' + editor_type)
25
 
26
  // hide the textarea and enable the ace editor
27
- var textarea = $('#' + id + '_textarea').hide()
28
  css_editor.getSession().setValue(textarea.val())
29
 
30
  // each time a change is triggered start a timeout of 1,5s and when is finished refresh the previewer
@@ -86,8 +86,8 @@
86
  }
87
 
88
  $.each(api.settings.controls, function (key, ctrl) {
89
- var setting_id = key.replace('_control', '')
90
- var setting = customify_settings.settings[setting_id]
91
 
92
  if (!_.isUndefined(setting) && !_.isUndefined(setting.default)) {
93
  api_set_setting_value(setting_id, setting.default)
@@ -99,11 +99,11 @@
99
 
100
  // add a reset button for each panel
101
  $('.panel-meta').each(function (el, key) {
102
- var container = $(this).parents('.control-panel'),
103
  id = container.attr('id')
104
 
105
  if (typeof id !== 'undefined') {
106
- var panel_id = id.replace('accordion-panel-', '')
107
  $(this).parent().append('<button class="reset_panel button" data-panel="' + panel_id + '">Panel\'s defaults</button>')
108
  }
109
  })
@@ -112,7 +112,7 @@
112
  $(document).on('click', '.reset_panel', function (e) {
113
  e.preventDefault()
114
 
115
- var panel_id = $(this).data('panel'),
116
  panel = api.panel(panel_id),
117
  sections = panel.sections(),
118
  iAgree = confirm('Do you really want to reset ' + panel.params.title + '?')
@@ -123,11 +123,11 @@
123
  if (sections.length > 0) {
124
  $.each(sections, function () {
125
  //var settings = this.settings();
126
- var controls = this.controls()
127
 
128
  if (controls.length > 0) {
129
  $.each(controls, function (key, ctrl) {
130
- var setting_id = ctrl.id.replace('_control', ''),
131
  setting = customify_settings.settings[setting_id]
132
 
133
  if (!_.isUndefined(setting) && !_.isUndefined(setting.default)) {
@@ -141,7 +141,7 @@
141
 
142
  //add reset section
143
  $('.accordion-section-content').each(function (el, key) {
144
- var section_id = $(this).attr('id')
145
 
146
  if ((
147
  (
@@ -152,7 +152,7 @@
152
  }
153
 
154
  if (!_.isUndefined(section_id) && section_id.indexOf('sub-accordion-section-') > -1) {
155
- var id = section_id.replace('sub-accordion-section-', '')
156
  $(this).append('<button class="reset_section button" data-section="' + id + '">Reset All Options for This Section</button>')
157
  }
158
  })
@@ -161,11 +161,11 @@
161
  $(document).on('click', '.reset_section', function (e) {
162
  e.preventDefault()
163
 
164
- var section_id = $(this).data('section'),
165
  section = api.section(section_id),
166
  controls = section.controls()
167
 
168
- var iAgree = confirm('Do you really want to reset ' + section.params.title + '?')
169
 
170
  if (!iAgree) {
171
  return
@@ -173,7 +173,7 @@
173
 
174
  if (controls.length > 0) {
175
  $.each(controls, function (key, ctrl) {
176
- var setting_id = ctrl.id.replace('_control', ''),
177
  setting = customify_settings.settings[setting_id]
178
 
179
  if (!_.isUndefined(setting) && !_.isUndefined(setting.default)) {
@@ -185,15 +185,15 @@
185
  }
186
 
187
  $(document).on('change keyup', '.customize-control-range input.range-value', function () {
188
- var range = $(this).siblings('input[type="range"]')
189
  range.val($(this).val())
190
  range.trigger('change')
191
  })
192
 
193
  $(document).on('change', '.customify_typography_font_subsets', function (ev) {
194
 
195
- var $input = $(this).parents('.options').siblings('.customify_typography').children('.customify_typography_values'),
196
- current_val = $input.val()
197
 
198
  current_val = JSON.parse(decodeURIComponent(current_val))
199
 
@@ -207,8 +207,8 @@
207
 
208
  $(document).on('change', '.customify_typography_font_weight', function (ev) {
209
 
210
- var $input = $(this).parents('.options').siblings('.customify_typography').children('.customify_typography_values'),
211
- current_val = $input.val()
212
 
213
  current_val = maybeJsonParse(current_val)
214
  // @todo currently the font weight selector works for one value only
@@ -255,11 +255,11 @@
255
  // Handle the section tabs (ex: Layout | Fonts | Colors)
256
  (
257
  function () {
258
- var $navs = $('.js-section-navigation')
259
 
260
  $navs.each(function () {
261
- var $nav = $(this)
262
- var $title = $nav.parents('.accordion-section-content').find('.customize-section-title')
263
 
264
  $nav.closest('.customize-control').addClass('screen-reader-text')
265
  $title.append($nav).parent().addClass('has-nav')
@@ -268,9 +268,9 @@
268
  $('.js-section-navigation a').on('click', function (e) {
269
  e.preventDefault()
270
 
271
- var $sidebar = $(this).parents('.customize-pane-child')
272
- var $parent = $(this).parents('.accordion-section-content')
273
- var href = $.attr(this, 'href')
274
 
275
  if (href != '#') {
276
  $sidebar.animate({
@@ -363,7 +363,7 @@
363
  // For each range input add a number field (for preview mainly - but it can also be used for input)
364
  $(el).find('input[type="range"]').each(function () {
365
  if (!$(this).siblings('.range-value').length) {
366
- var $clone = $(this).clone()
367
 
368
  $clone
369
  .attr('type', 'number')
@@ -371,17 +371,17 @@
371
  .removeAttr('data-field')
372
 
373
  $(this).after($clone)
 
 
 
 
 
374
  }
375
 
376
  // Update the number field when changing the range
377
  $(this).on('change', function () {
378
  $(this).siblings('.range-value').val($(this).val())
379
  })
380
-
381
- // And the other way around, update the range field when changing the number
382
- $($clone).on('change', function () {
383
- $(this).siblings('input[type="range"]').val($(this).val())
384
- })
385
  })
386
  }
387
 
@@ -390,7 +390,7 @@
390
  * So whenever a target is changed, it will take actions to the dependent fields.
391
  * @TODO this is still written in a barbaric way, refactor when needed
392
  */
393
- var customifyFoldingFields = function () {
394
 
395
  if (_.isUndefined(customify_settings) || _.isUndefined(customify_settings.settings)) {
396
  return // bail
@@ -417,11 +417,11 @@
417
  $(this).find(':enabled').attr({disabled: true})
418
  }
419
 
420
- var IS = $.extend({}, $.fn.reactor.helpers)
421
 
422
- var bind_folding_events = function (parent_id, field, relation) {
423
 
424
- var key = null
425
 
426
  if (_.isString(field)) {
427
  key = field
@@ -433,14 +433,13 @@
433
  return // no key, no fun
434
  }
435
 
436
- var value = 1, // by default we use 1 the most used value for checkboxes or inputs
437
  compare = '==', // ... ye
438
  action = 'show',
439
  between = [0, 1] // can only be `show` or `hide`
440
 
441
- var target_key = customify_settings.options_name + '[' + key + ']'
442
-
443
- var target_type = customify_settings.settings[target_key].type
444
 
445
  // we support the usual syntax like a config array like `array( 'id' => $id, 'value' => $value, 'compare' => $compare )`
446
  // but we also support a non-associative array like `array( $id, $value, $compare )`
@@ -476,7 +475,7 @@
476
  /**
477
  * Now for each target we have, we will bind a change event to hide or show the dependent fields
478
  */
479
- var target_selector = '[data-customize-setting-link="' + customify_settings.options_name + '[' + key + ']"]'
480
 
481
  switch (target_type) {
482
  case 'checkbox':
@@ -505,7 +504,7 @@
505
  break
506
 
507
  case 'range':
508
- var x = IS.Between(between[0], between[1])
509
 
510
  $(parent_id).reactIf(target_selector, x)
511
  break
@@ -535,13 +534,13 @@
535
  * Here we have the id of the fields. but we know for sure that we just need his parent selector
536
  * So we just create it
537
  */
538
- var parent_id = id.replace('[', '-')
539
  parent_id = parent_id.replace(']', '')
540
  parent_id = '#customize-control-' + parent_id + '_control'
541
 
542
  // get only the fields that have a 'show_if' property
543
  if (field.hasOwnProperty('show_if')) {
544
- var relation = 'AND'
545
 
546
  if (!_.isUndefined(field.show_if.relation)) {
547
  relation = field.show_if.relation
@@ -565,9 +564,9 @@
565
  })
566
  }
567
 
568
- var get_typography_font_family = function ($el) {
569
 
570
- var font_family_value = $el.val()
571
  // first time this will not be a json so catch that error
572
  try {
573
  font_family_value = JSON.parse(font_family_value)
@@ -584,9 +583,9 @@
584
 
585
  // get each typography field and bind events
586
  // @todo Are we still using the typography field since we have the font field?
587
- var prepare_typography_field = function () {
588
 
589
- var $typos = $('.customify_typography_font_family')
590
 
591
  $typos.each(function () {
592
  var font_family_select = this,
@@ -600,7 +599,7 @@
600
  })
601
  }
602
 
603
- var api_set_setting_value = function (setting_id, value) {
604
  let setting = api(setting_id),
605
  field = $('[data-customize-setting-link="' + setting_id + '"]'),
606
  field_class = $(field).parent().attr('class')
@@ -685,8 +684,8 @@
685
  }
686
  }
687
 
688
- var update_siblings_selects = function (font_select) {
689
- var selected_font = $(font_select).val(),
690
  $input = $(font_select).siblings('.customify_typography_values'),
691
  current_val = $input.attr('value')
692
 
@@ -695,7 +694,7 @@
695
  } else if (_.isString(current_val) && !isJsonString(current_val) && current_val.substr(0, 1) == '[') {
696
  // a rare case when the value isn't a json but is a representative string like [family,weight]
697
  current_val = current_val.split(',')
698
- var new_current_value = {}
699
  if (!_.isUndefined(current_val[0])) {
700
  new_current_value['font_family'] = current_val[0]
701
  }
@@ -707,7 +706,7 @@
707
  current_val = JSON.stringify(new_current_value)
708
  }
709
 
710
- var $font_weight = $(font_select).parent().siblings('ul.options').find('.customify_typography_font_weight'),
711
  $font_subsets = $(font_select).parent().siblings('ul.options').find('.customify_typography_font_subsets')
712
 
713
  try {
@@ -726,7 +725,7 @@
726
  }
727
 
728
  // first try to get the font from sure sources, not from the recommended list.
729
- var option_data = $(font_select).find(':not(optgroup[label=Recommended]) option[value="' + selected_font + '"]')
730
  // however, if there isn't an option found, get what you can
731
  if (option_data.length < 1) {
732
  option_data = $(font_select).find('option[value="' + selected_font + '"]')
@@ -734,7 +733,7 @@
734
 
735
  if (option_data.length > 0) {
736
 
737
- var font_type = option_data.data('type'),
738
  value_to_add = {'type': font_type, 'font_family': selected_font},
739
  variants = null,
740
  subsets = null
@@ -770,13 +769,13 @@
770
  // when a font is selected force the first weight to load
771
  value_to_add['selected_variants'] = {0: variants[0]}
772
 
773
- var variants_options = '',
774
  count_weights = 0
775
 
776
  if (_.isArray(variants) || _.isObject(variants)) {
777
  // Take each variant and produce the option markup
778
  $.each(variants, function (key, el) {
779
- var is_selected = ''
780
  if (_.isObject(current_val.selected_variants) && inObject(el, current_val.selected_variants)) {
781
  is_selected = ' selected="selected"'
782
  } else if (_.isString(current_val.selected_variants) && el === current_val.selected_variants) {
@@ -784,7 +783,7 @@
784
  }
785
 
786
  // initialize
787
- var variant_option_value = el,
788
  variant_option_display = el
789
 
790
  // If we are dealing with a object variant then it means things get tricky (probably it's our fault but bear with us)
@@ -831,10 +830,10 @@
831
  value_to_add['subsets'] = subsets
832
  // when a font is selected force the first subset to load
833
  value_to_add['selected_subsets'] = {0: subsets[0]}
834
- var subsets_options = '',
835
  count_subsets = 0
836
  $.each(subsets, function (key, el) {
837
- var is_selected = ''
838
  if (_.isObject(current_val.selected_subsets) && inObject(el, current_val.selected_subsets)) {
839
  is_selected = ' selected="selected"'
840
  }
@@ -863,7 +862,7 @@
863
 
864
  /** Modules **/
865
 
866
- var customifyBackgroundJsControl = (
867
  function () {
868
  'use strict'
869
 
@@ -920,7 +919,7 @@
920
  // When an image is selected, run a callback.
921
  frame.on('select', function () {
922
  // Grab the selected attachment.
923
- var attachment = frame.state().get('selection').first()
924
  frame.close()
925
 
926
  if (attachment.attributes.type !== 'image') {
@@ -932,13 +931,13 @@
932
  selector.find('.upload-height').attr('value', attachment.attributes.height)
933
  selector.find('.upload-width').attr('value', attachment.attributes.width)
934
 
935
- var thumbSrc = attachment.attributes.url
936
  if (!_.isUndefined(attachment.attributes.sizes) && !_.isUndefined(attachment.attributes.sizes.thumbnail)) {
937
  thumbSrc = attachment.attributes.sizes.thumbnail.url
938
  } else if (!_.isUndefined(attachment.attributes.sizes)) {
939
- var height = attachment.attributes.height
940
- for (var key in attachment.attributes.sizes) {
941
- var object = attachment.attributes.sizes[key]
942
  if (object.height < height) {
943
  height = object.height
944
  thumbSrc = object.url
@@ -967,7 +966,7 @@
967
  // Update the background preview
968
  function preview (selector) {
969
 
970
- var $parent = selector.parents('.customize-control-custom_background:first')
971
 
972
  if (selector.hasClass('customize-control-custom_background')) {
973
  $parent = selector
@@ -979,16 +978,16 @@
979
  return
980
  }
981
 
982
- var image_holder = $parent.find('.background-preview')
983
 
984
  if (!image_holder) { // No preview present
985
  return
986
  }
987
 
988
- var the_id = $parent.find('.button.background_upload_button').data('setting_id'),
989
  this_setting = api.instance(the_id)
990
 
991
- var background_data = {}
992
 
993
  $parent.find('.customify_background_select, .customify_background_input').each(function () {
994
  var data = $(this).serializeArray()
@@ -1017,7 +1016,7 @@
1017
 
1018
  // Update the background preview
1019
  function removeImage (parent) {
1020
- var selector = parent.find('.upload_button_div')
1021
  // This shouldn't have been run...
1022
  if (!selector.find('.remove-image').addClass('hide')) {
1023
  return
@@ -1032,7 +1031,7 @@
1032
  selector.find('.upload-width').val('')
1033
  parent.find('.customify_background_input.background-image').val('')
1034
 
1035
- var customizer_id = selector.find('.background_upload_button').data('setting_id'),
1036
  this_setting = api.control(customizer_id + '_control'),
1037
  current_vals = this_setting.setting(),
1038
  screenshot = parent.find('.preview_screenshot'),
@@ -1061,8 +1060,8 @@
1061
  * @param obj
1062
  * @returns {boolean}
1063
  */
1064
- var inObject = function (value, obj) {
1065
- for (var k in obj) {
1066
  if (!obj.hasOwnProperty(k)) {
1067
  continue
1068
  }
@@ -1073,8 +1072,8 @@
1073
  return false
1074
  }
1075
 
1076
- var maybeJsonParse = function (value) {
1077
- var parsed
1078
 
1079
  //try and parse it, with decodeURIComponent
1080
  try {
@@ -1088,10 +1087,10 @@
1088
  return parsed
1089
  }
1090
 
1091
- var getUrlVars = function (name) {
1092
- var vars = [], hash
1093
- var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&')
1094
- for (var i = 0; i < hashes.length; i++) {
1095
  hash = hashes[i].split('=')
1096
 
1097
  vars.push(hash[0])
@@ -1104,7 +1103,7 @@
1104
  return false
1105
  }
1106
 
1107
- var isJsonString = function (str) {
1108
  try {
1109
  JSON.parse(str)
1110
  } catch (e) {
15
 
16
  // add ace editors
17
  $('.customify_ace_editor').each(function (key, el) {
18
+ const id = $(this).attr('id'),
19
  css_editor = ace.edit(id)
20
 
21
+ const editor_type = $(this).data('editor_type')
22
  // init the ace editor
23
  css_editor.setTheme('ace/theme/github')
24
  css_editor.getSession().setMode('ace/mode/' + editor_type)
25
 
26
  // hide the textarea and enable the ace editor
27
+ const textarea = $('#' + id + '_textarea').hide()
28
  css_editor.getSession().setValue(textarea.val())
29
 
30
  // each time a change is triggered start a timeout of 1,5s and when is finished refresh the previewer
86
  }
87
 
88
  $.each(api.settings.controls, function (key, ctrl) {
89
+ const setting_id = key.replace('_control', '')
90
+ const setting = customify_settings.settings[setting_id]
91
 
92
  if (!_.isUndefined(setting) && !_.isUndefined(setting.default)) {
93
  api_set_setting_value(setting_id, setting.default)
99
 
100
  // add a reset button for each panel
101
  $('.panel-meta').each(function (el, key) {
102
+ const container = $(this).parents('.control-panel'),
103
  id = container.attr('id')
104
 
105
  if (typeof id !== 'undefined') {
106
+ const panel_id = id.replace('accordion-panel-', '')
107
  $(this).parent().append('<button class="reset_panel button" data-panel="' + panel_id + '">Panel\'s defaults</button>')
108
  }
109
  })
112
  $(document).on('click', '.reset_panel', function (e) {
113
  e.preventDefault()
114
 
115
+ const panel_id = $(this).data('panel'),
116
  panel = api.panel(panel_id),
117
  sections = panel.sections(),
118
  iAgree = confirm('Do you really want to reset ' + panel.params.title + '?')
123
  if (sections.length > 0) {
124
  $.each(sections, function () {
125
  //var settings = this.settings();
126
+ const controls = this.controls()
127
 
128
  if (controls.length > 0) {
129
  $.each(controls, function (key, ctrl) {
130
+ const setting_id = ctrl.id.replace('_control', ''),
131
  setting = customify_settings.settings[setting_id]
132
 
133
  if (!_.isUndefined(setting) && !_.isUndefined(setting.default)) {
141
 
142
  //add reset section
143
  $('.accordion-section-content').each(function (el, key) {
144
+ const section_id = $(this).attr('id')
145
 
146
  if ((
147
  (
152
  }
153
 
154
  if (!_.isUndefined(section_id) && section_id.indexOf('sub-accordion-section-') > -1) {
155
+ const id = section_id.replace('sub-accordion-section-', '')
156
  $(this).append('<button class="reset_section button" data-section="' + id + '">Reset All Options for This Section</button>')
157
  }
158
  })
161
  $(document).on('click', '.reset_section', function (e) {
162
  e.preventDefault()
163
 
164
+ const section_id = $(this).data('section'),
165
  section = api.section(section_id),
166
  controls = section.controls()
167
 
168
+ const iAgree = confirm('Do you really want to reset ' + section.params.title + '?')
169
 
170
  if (!iAgree) {
171
  return
173
 
174
  if (controls.length > 0) {
175
  $.each(controls, function (key, ctrl) {
176
+ const setting_id = ctrl.id.replace('_control', ''),
177
  setting = customify_settings.settings[setting_id]
178
 
179
  if (!_.isUndefined(setting) && !_.isUndefined(setting.default)) {
185
  }
186
 
187
  $(document).on('change keyup', '.customize-control-range input.range-value', function () {
188
+ const range = $(this).siblings('input[type="range"]')
189
  range.val($(this).val())
190
  range.trigger('change')
191
  })
192
 
193
  $(document).on('change', '.customify_typography_font_subsets', function (ev) {
194
 
195
+ const $input = $(this).parents('.options').siblings('.customify_typography').children('.customify_typography_values');
196
+ let current_val = $input.val()
197
 
198
  current_val = JSON.parse(decodeURIComponent(current_val))
199
 
207
 
208
  $(document).on('change', '.customify_typography_font_weight', function (ev) {
209
 
210
+ const $input = $(this).parents('.options').siblings('.customify_typography').children('.customify_typography_values');
211
+ let current_val = $input.val();
212
 
213
  current_val = maybeJsonParse(current_val)
214
  // @todo currently the font weight selector works for one value only
255
  // Handle the section tabs (ex: Layout | Fonts | Colors)
256
  (
257
  function () {
258
+ const $navs = $('.js-section-navigation')
259
 
260
  $navs.each(function () {
261
+ const $nav = $(this)
262
+ const $title = $nav.parents('.accordion-section-content').find('.customize-section-title')
263
 
264
  $nav.closest('.customize-control').addClass('screen-reader-text')
265
  $title.append($nav).parent().addClass('has-nav')
268
  $('.js-section-navigation a').on('click', function (e) {
269
  e.preventDefault()
270
 
271
+ const $sidebar = $(this).parents('.customize-pane-child'),
272
+ $parent = $(this).parents('.accordion-section-content'),
273
+ href = $.attr(this, 'href')
274
 
275
  if (href != '#') {
276
  $sidebar.animate({
363
  // For each range input add a number field (for preview mainly - but it can also be used for input)
364
  $(el).find('input[type="range"]').each(function () {
365
  if (!$(this).siblings('.range-value').length) {
366
+ const $clone = $(this).clone()
367
 
368
  $clone
369
  .attr('type', 'number')
371
  .removeAttr('data-field')
372
 
373
  $(this).after($clone)
374
+
375
+ // Update the range field when changing the number
376
+ $($clone).on('change', function () {
377
+ $(this).siblings('input[type="range"]').val($(this).val())
378
+ })
379
  }
380
 
381
  // Update the number field when changing the range
382
  $(this).on('change', function () {
383
  $(this).siblings('.range-value').val($(this).val())
384
  })
 
 
 
 
 
385
  })
386
  }
387
 
390
  * So whenever a target is changed, it will take actions to the dependent fields.
391
  * @TODO this is still written in a barbaric way, refactor when needed
392
  */
393
+ const customifyFoldingFields = function () {
394
 
395
  if (_.isUndefined(customify_settings) || _.isUndefined(customify_settings.settings)) {
396
  return // bail
417
  $(this).find(':enabled').attr({disabled: true})
418
  }
419
 
420
+ let IS = $.extend({}, $.fn.reactor.helpers)
421
 
422
+ let bind_folding_events = function (parent_id, field, relation) {
423
 
424
+ let key = null
425
 
426
  if (_.isString(field)) {
427
  key = field
433
  return // no key, no fun
434
  }
435
 
436
+ let value = 1, // by default we use 1 the most used value for checkboxes or inputs
437
  compare = '==', // ... ye
438
  action = 'show',
439
  between = [0, 1] // can only be `show` or `hide`
440
 
441
+ const target_key = customify_settings.options_name + '[' + key + ']'
442
+ const target_type = customify_settings.settings[target_key].type
 
443
 
444
  // we support the usual syntax like a config array like `array( 'id' => $id, 'value' => $value, 'compare' => $compare )`
445
  // but we also support a non-associative array like `array( $id, $value, $compare )`
475
  /**
476
  * Now for each target we have, we will bind a change event to hide or show the dependent fields
477
  */
478
+ const target_selector = '[data-customize-setting-link="' + customify_settings.options_name + '[' + key + ']"]'
479
 
480
  switch (target_type) {
481
  case 'checkbox':
504
  break
505
 
506
  case 'range':
507
+ const x = IS.Between(between[0], between[1])
508
 
509
  $(parent_id).reactIf(target_selector, x)
510
  break
534
  * Here we have the id of the fields. but we know for sure that we just need his parent selector
535
  * So we just create it
536
  */
537
+ let parent_id = id.replace('[', '-')
538
  parent_id = parent_id.replace(']', '')
539
  parent_id = '#customize-control-' + parent_id + '_control'
540
 
541
  // get only the fields that have a 'show_if' property
542
  if (field.hasOwnProperty('show_if')) {
543
+ let relation = 'AND'
544
 
545
  if (!_.isUndefined(field.show_if.relation)) {
546
  relation = field.show_if.relation
564
  })
565
  }
566
 
567
+ const get_typography_font_family = function ($el) {
568
 
569
+ let font_family_value = $el.val()
570
  // first time this will not be a json so catch that error
571
  try {
572
  font_family_value = JSON.parse(font_family_value)
583
 
584
  // get each typography field and bind events
585
  // @todo Are we still using the typography field since we have the font field?
586
+ const prepare_typography_field = function () {
587
 
588
+ const $typos = $('.customify_typography_font_family')
589
 
590
  $typos.each(function () {
591
  var font_family_select = this,
599
  })
600
  }
601
 
602
+ const api_set_setting_value = function (setting_id, value) {
603
  let setting = api(setting_id),
604
  field = $('[data-customize-setting-link="' + setting_id + '"]'),
605
  field_class = $(field).parent().attr('class')
684
  }
685
  }
686
 
687
+ const update_siblings_selects = function (font_select) {
688
+ let selected_font = $(font_select).val(),
689
  $input = $(font_select).siblings('.customify_typography_values'),
690
  current_val = $input.attr('value')
691
 
694
  } else if (_.isString(current_val) && !isJsonString(current_val) && current_val.substr(0, 1) == '[') {
695
  // a rare case when the value isn't a json but is a representative string like [family,weight]
696
  current_val = current_val.split(',')
697
+ let new_current_value = {}
698
  if (!_.isUndefined(current_val[0])) {
699
  new_current_value['font_family'] = current_val[0]
700
  }
706
  current_val = JSON.stringify(new_current_value)
707
  }
708
 
709
+ let $font_weight = $(font_select).parent().siblings('ul.options').find('.customify_typography_font_weight'),
710
  $font_subsets = $(font_select).parent().siblings('ul.options').find('.customify_typography_font_subsets')
711
 
712
  try {
725
  }
726
 
727
  // first try to get the font from sure sources, not from the recommended list.
728
+ let option_data = $(font_select).find(':not(optgroup[label=Recommended]) option[value="' + selected_font + '"]')
729
  // however, if there isn't an option found, get what you can
730
  if (option_data.length < 1) {
731
  option_data = $(font_select).find('option[value="' + selected_font + '"]')
733
 
734
  if (option_data.length > 0) {
735
 
736
+ let font_type = option_data.data('type'),
737
  value_to_add = {'type': font_type, 'font_family': selected_font},
738
  variants = null,
739
  subsets = null
769
  // when a font is selected force the first weight to load
770
  value_to_add['selected_variants'] = {0: variants[0]}
771
 
772
+ let variants_options = '',
773
  count_weights = 0
774
 
775
  if (_.isArray(variants) || _.isObject(variants)) {
776
  // Take each variant and produce the option markup
777
  $.each(variants, function (key, el) {
778
+ let is_selected = ''
779
  if (_.isObject(current_val.selected_variants) && inObject(el, current_val.selected_variants)) {
780
  is_selected = ' selected="selected"'
781
  } else if (_.isString(current_val.selected_variants) && el === current_val.selected_variants) {
783
  }
784
 
785
  // initialize
786
+ let variant_option_value = el,
787
  variant_option_display = el
788
 
789
  // If we are dealing with a object variant then it means things get tricky (probably it's our fault but bear with us)
830
  value_to_add['subsets'] = subsets
831
  // when a font is selected force the first subset to load
832
  value_to_add['selected_subsets'] = {0: subsets[0]}
833
+ let subsets_options = '',
834
  count_subsets = 0
835
  $.each(subsets, function (key, el) {
836
+ let is_selected = ''
837
  if (_.isObject(current_val.selected_subsets) && inObject(el, current_val.selected_subsets)) {
838
  is_selected = ' selected="selected"'
839
  }
862
 
863
  /** Modules **/
864
 
865
+ const customifyBackgroundJsControl = (
866
  function () {
867
  'use strict'
868
 
919
  // When an image is selected, run a callback.
920
  frame.on('select', function () {
921
  // Grab the selected attachment.
922
+ const attachment = frame.state().get('selection').first()
923
  frame.close()
924
 
925
  if (attachment.attributes.type !== 'image') {
931
  selector.find('.upload-height').attr('value', attachment.attributes.height)
932
  selector.find('.upload-width').attr('value', attachment.attributes.width)
933
 
934
+ let thumbSrc = attachment.attributes.url
935
  if (!_.isUndefined(attachment.attributes.sizes) && !_.isUndefined(attachment.attributes.sizes.thumbnail)) {
936
  thumbSrc = attachment.attributes.sizes.thumbnail.url
937
  } else if (!_.isUndefined(attachment.attributes.sizes)) {
938
+ let height = attachment.attributes.height
939
+ for (let key in attachment.attributes.sizes) {
940
+ const object = attachment.attributes.sizes[key]
941
  if (object.height < height) {
942
  height = object.height
943
  thumbSrc = object.url
966
  // Update the background preview
967
  function preview (selector) {
968
 
969
+ let $parent = selector.parents('.customize-control-custom_background:first')
970
 
971
  if (selector.hasClass('customize-control-custom_background')) {
972
  $parent = selector
978
  return
979
  }
980
 
981
+ const image_holder = $parent.find('.background-preview')
982
 
983
  if (!image_holder) { // No preview present
984
  return
985
  }
986
 
987
+ const the_id = $parent.find('.button.background_upload_button').data('setting_id'),
988
  this_setting = api.instance(the_id)
989
 
990
+ let background_data = {}
991
 
992
  $parent.find('.customify_background_select, .customify_background_input').each(function () {
993
  var data = $(this).serializeArray()
1016
 
1017
  // Update the background preview
1018
  function removeImage (parent) {
1019
+ const selector = parent.find('.upload_button_div')
1020
  // This shouldn't have been run...
1021
  if (!selector.find('.remove-image').addClass('hide')) {
1022
  return
1031
  selector.find('.upload-width').val('')
1032
  parent.find('.customify_background_input.background-image').val('')
1033
 
1034
+ let customizer_id = selector.find('.background_upload_button').data('setting_id'),
1035
  this_setting = api.control(customizer_id + '_control'),
1036
  current_vals = this_setting.setting(),
1037
  screenshot = parent.find('.preview_screenshot'),
1060
  * @param obj
1061
  * @returns {boolean}
1062
  */
1063
+ const inObject = function (value, obj) {
1064
+ for (let k in obj) {
1065
  if (!obj.hasOwnProperty(k)) {
1066
  continue
1067
  }
1072
  return false
1073
  }
1074
 
1075
+ const maybeJsonParse = function (value) {
1076
+ let parsed
1077
 
1078
  //try and parse it, with decodeURIComponent
1079
  try {
1087
  return parsed
1088
  }
1089
 
1090
+ const getUrlVars = function (name) {
1091
+ let vars = [], hash
1092
+ const hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&')
1093
+ for (let i = 0; i < hashes.length; i++) {
1094
  hash = hashes[i].split('=')
1095
 
1096
  vars.push(hash[0])
1103
  return false
1104
  }
1105
 
1106
+ const isJsonString = function (str) {
1107
  try {
1108
  JSON.parse(str)
1109
  } catch (e) {
js/customizer/color-convert.js DELETED
File without changes
js/customizer/color-palettes.js CHANGED
@@ -68,8 +68,8 @@ let ColorPalettes = (function ($, exports, wp) {
68
  }
69
 
70
  function hex2rgba (hex) {
71
- var matches = /^#([A-Fa-f0-9]{3,4}){1,2}$/.test(hex)
72
- var r = 0, g = 0, b = 0, a = 0
73
  if (matches) {
74
  hex = hex.substring(1).split('')
75
  if (hex.length === 3) {
@@ -83,8 +83,8 @@ let ColorPalettes = (function ($, exports, wp) {
83
  b = parseInt([hex[4], hex[5]].join(''), 16)
84
  a = parseInt([hex[6], hex[7]].join(''), 16)
85
  }
86
- var hsl = rgbToHsl(r, g, b)
87
- var rgba = {
88
  red: r,
89
  green: g,
90
  blue: b,
@@ -94,13 +94,14 @@ let ColorPalettes = (function ($, exports, wp) {
94
  lightness: hsl[2],
95
  luma: 0.2126 * r + 0.7152 * g + 0.0722 * b
96
  }
97
- return rgba
98
  }
99
 
100
  function rgbToHsl (r, g, b) {
101
- r /= 255, g /= 255, b /= 255
102
- var max = Math.max(r, g, b), min = Math.min(r, g, b)
103
- var h, s, l = (max + min) / 2
 
 
104
 
105
  if (max == min) {
106
  h = s = 0 // achromatic
@@ -271,12 +272,12 @@ let ColorPalettes = (function ($, exports, wp) {
271
  }
272
 
273
  function hsl2Rgb (h, s, l) {
274
- var r, g, b
275
 
276
  if (s == 0) {
277
  r = g = b = l // achromatic
278
  } else {
279
- var hue2rgb = function hue2rgb (p, q, t) {
280
  if (t < 0) t += 1
281
  if (t > 1) t -= 1
282
  if (t < 1 / 6) return p + (q - p) * 6 * t
@@ -285,8 +286,8 @@ let ColorPalettes = (function ($, exports, wp) {
285
  return p
286
  }
287
 
288
- var q = l < 0.5 ? l * (1 + s) : l + s - l * s
289
- var p = 2 * l - q
290
  r = hue2rgb(p, q, h + 1 / 3)
291
  g = hue2rgb(p, q, h)
292
  b = hue2rgb(p, q, h - 1 / 3)
@@ -315,12 +316,12 @@ let ColorPalettes = (function ($, exports, wp) {
315
  filter = typeof filter === 'undefined' ? $('[name*="sm_palette_filter"]:checked').val() : filter
316
 
317
  let newColor = hex2rgba(color)
318
- var palette = getCurrentPaletteColors()
319
- var paletteColors = palette.slice(0, 3)
320
- var paletteDark = palette.slice(3, 6)
321
- var average = getAveragePixel(getPixelsFromColors(palette))
322
- var averageColor = getAveragePixel(getPixelsFromColors(paletteColors))
323
- var averageDark = getAveragePixel(getPixelsFromColors(paletteDark))
324
 
325
  // Intensity Filters
326
  if (filter === 'vivid') {
@@ -329,7 +330,7 @@ let ColorPalettes = (function ($, exports, wp) {
329
  }
330
 
331
  if (filter === 'warm' && color !== palette[0]) {
332
- var sepia = hex2rgba('#704214')
333
  sepia.saturation = mix('saturation', sepia, newColor, 1)
334
  sepia.lightness = mix('lightness', sepia, newColor, 1)
335
  sepia = hex2rgba(hsl2hex(sepia))
@@ -389,14 +390,14 @@ let ColorPalettes = (function ($, exports, wp) {
389
 
390
  // Inactive Below
391
  if (filter === 'cold' && color !== palette[0]) {
392
- var targetHue = 0.55
393
 
394
  newColor.saturation = mix('saturation', newColor, hex2rgba('#FFF'), 0.4)
395
  newColor.hue = (newColor.hue - targetHue) / 18 + targetHue
396
  newColor = hex2rgba(hsl2hex(newColor))
397
 
398
  // increase contrast ( saturation +10%, lightness +/- 20% );
399
- var newColorHSL = rgbToHsl(newColor.red, newColor.green, newColor.blue)
400
  newColor.hue = newColorHSL[0]
401
  newColor.saturation = mixValues(newColorHSL[1], 1, 0.1)
402
  newColor.lightness = mix('lightness', newColor, hex2rgba(newColor.lightness > 0.5 ? '#FFF' : '#000'), 0.2)
@@ -470,6 +471,8 @@ let ColorPalettes = (function ($, exports, wp) {
470
 
471
  $obj.data('target', $input)
472
 
 
 
473
  $input.iris({
474
  change: (event, ui) => {
475
  const currentColor = ui.color.toString()
@@ -552,7 +555,9 @@ let ColorPalettes = (function ($, exports, wp) {
552
  $colors.each(function (i, obj) {
553
  const $input = $(obj).data('target')
554
 
555
- $input.iris('hide')
 
 
556
  $input.hide()
557
  })
558
  })
@@ -818,7 +823,7 @@ let ColorPalettes = (function ($, exports, wp) {
818
  }
819
 
820
  const getPixelsFromColors = function (colors) {
821
- var pixels = []
822
  _.each(colors, function (color) {
823
  pixels.push(hex2rgba(color))
824
  })
@@ -826,7 +831,7 @@ let ColorPalettes = (function ($, exports, wp) {
826
  }
827
 
828
  const getAveragePixel = function (pixels) {
829
- var averagePixel = {
830
  red: 0,
831
  green: 0,
832
  blue: 0,
@@ -837,15 +842,15 @@ let ColorPalettes = (function ($, exports, wp) {
837
  luma: 0
838
  }
839
 
840
- for (var i = 0; i < pixels.length; i++) {
841
- var pixel = pixels[i]
842
 
843
- for (var k in averagePixel) {
844
  averagePixel[k] += pixel[k]
845
  }
846
  }
847
 
848
- for (var k in averagePixel) {
849
  averagePixel[k] /= pixels.length
850
  }
851
 
@@ -853,20 +858,20 @@ let ColorPalettes = (function ($, exports, wp) {
853
  }
854
 
855
  const applyColorationValueToFields = () => {
856
- var setting_id = 'sm_coloration_level'
857
- var setting = wp.customize(setting_id)
858
- var coloration = $('[name*="sm_coloration_level"]:checked').val()
859
 
860
  if (typeof $('[name*="sm_coloration_level"]:checked').data('default') !== 'undefined') {
861
 
862
- var sliders = ['sm_dark_color_primary_slider', 'sm_dark_color_secondary_slider', 'sm_dark_color_tertiary_slider']
863
  _.each(sliders, function (slider_id) {
864
- var slider_setting = customify_settings.settings[slider_id]
865
  wp.customize(slider_id).set(slider_setting.default)
866
  $('#_customize-input-' + slider_id + '_control ').val(slider_setting.default)
867
  })
868
  } else {
869
- var ratio = parseFloat(coloration)
870
  $(color_sliders_selector).val(ratio)
871
  }
872
  reinitializeConnectedFields()
68
  }
69
 
70
  function hex2rgba (hex) {
71
+ const matches = /^#([A-Fa-f0-9]{3,4}){1,2}$/.test(hex)
72
+ let r = 0, g = 0, b = 0, a = 0
73
  if (matches) {
74
  hex = hex.substring(1).split('')
75
  if (hex.length === 3) {
83
  b = parseInt([hex[4], hex[5]].join(''), 16)
84
  a = parseInt([hex[6], hex[7]].join(''), 16)
85
  }
86
+ const hsl = rgbToHsl(r, g, b)
87
+ return {
88
  red: r,
89
  green: g,
90
  blue: b,
94
  lightness: hsl[2],
95
  luma: 0.2126 * r + 0.7152 * g + 0.0722 * b
96
  }
 
97
  }
98
 
99
  function rgbToHsl (r, g, b) {
100
+ r /= 255;
101
+ g /= 255;
102
+ b /= 255;
103
+ const max = Math.max(r, g, b), min = Math.min(r, g, b)
104
+ let h, s, l = (max + min) / 2
105
 
106
  if (max == min) {
107
  h = s = 0 // achromatic
272
  }
273
 
274
  function hsl2Rgb (h, s, l) {
275
+ let r, g, b
276
 
277
  if (s == 0) {
278
  r = g = b = l // achromatic
279
  } else {
280
+ const hue2rgb = function hue2rgb (p, q, t) {
281
  if (t < 0) t += 1
282
  if (t > 1) t -= 1
283
  if (t < 1 / 6) return p + (q - p) * 6 * t
286
  return p
287
  }
288
 
289
+ const q = l < 0.5 ? l * (1 + s) : l + s - l * s
290
+ const p = 2 * l - q
291
  r = hue2rgb(p, q, h + 1 / 3)
292
  g = hue2rgb(p, q, h)
293
  b = hue2rgb(p, q, h - 1 / 3)
316
  filter = typeof filter === 'undefined' ? $('[name*="sm_palette_filter"]:checked').val() : filter
317
 
318
  let newColor = hex2rgba(color)
319
+ const palette = getCurrentPaletteColors()
320
+ const paletteColors = palette.slice(0, 3)
321
+ const paletteDark = palette.slice(3, 6)
322
+ const average = getAveragePixel(getPixelsFromColors(palette))
323
+ const averageColor = getAveragePixel(getPixelsFromColors(paletteColors))
324
+ const averageDark = getAveragePixel(getPixelsFromColors(paletteDark))
325
 
326
  // Intensity Filters
327
  if (filter === 'vivid') {
330
  }
331
 
332
  if (filter === 'warm' && color !== palette[0]) {
333
+ let sepia = hex2rgba('#704214')
334
  sepia.saturation = mix('saturation', sepia, newColor, 1)
335
  sepia.lightness = mix('lightness', sepia, newColor, 1)
336
  sepia = hex2rgba(hsl2hex(sepia))
390
 
391
  // Inactive Below
392
  if (filter === 'cold' && color !== palette[0]) {
393
+ const targetHue = 0.55
394
 
395
  newColor.saturation = mix('saturation', newColor, hex2rgba('#FFF'), 0.4)
396
  newColor.hue = (newColor.hue - targetHue) / 18 + targetHue
397
  newColor = hex2rgba(hsl2hex(newColor))
398
 
399
  // increase contrast ( saturation +10%, lightness +/- 20% );
400
+ const newColorHSL = rgbToHsl(newColor.red, newColor.green, newColor.blue)
401
  newColor.hue = newColorHSL[0]
402
  newColor.saturation = mixValues(newColorHSL[1], 1, 0.1)
403
  newColor.lightness = mix('lightness', newColor, hex2rgba(newColor.lightness > 0.5 ? '#FFF' : '#000'), 0.2)
471
 
472
  $obj.data('target', $input)
473
 
474
+ if( $obj.hasClass('js-no-picker') ) { return }
475
+
476
  $input.iris({
477
  change: (event, ui) => {
478
  const currentColor = ui.color.toString()
555
  $colors.each(function (i, obj) {
556
  const $input = $(obj).data('target')
557
 
558
+ if( !$(obj).hasClass('js-no-picker') ) {
559
+ $input.iris('hide')
560
+ }
561
  $input.hide()
562
  })
563
  })
823
  }
824
 
825
  const getPixelsFromColors = function (colors) {
826
+ let pixels = []
827
  _.each(colors, function (color) {
828
  pixels.push(hex2rgba(color))
829
  })
831
  }
832
 
833
  const getAveragePixel = function (pixels) {
834
+ let averagePixel = {
835
  red: 0,
836
  green: 0,
837
  blue: 0,
842
  luma: 0
843
  }
844
 
845
+ for (let i = 0; i < pixels.length; i++) {
846
+ const pixel = pixels[i]
847
 
848
+ for (let k in averagePixel) {
849
  averagePixel[k] += pixel[k]
850
  }
851
  }
852
 
853
+ for (let k in averagePixel) {
854
  averagePixel[k] /= pixels.length
855
  }
856
 
858
  }
859
 
860
  const applyColorationValueToFields = () => {
861
+ const setting_id = 'sm_coloration_level'
862
+ const setting = wp.customize(setting_id)
863
+ const coloration = $('[name*="sm_coloration_level"]:checked').val()
864
 
865
  if (typeof $('[name*="sm_coloration_level"]:checked').data('default') !== 'undefined') {
866
 
867
+ const sliders = ['sm_dark_color_primary_slider', 'sm_dark_color_secondary_slider', 'sm_dark_color_tertiary_slider']
868
  _.each(sliders, function (slider_id) {
869
+ const slider_setting = customify_settings.settings[slider_id]
870
  wp.customize(slider_id).set(slider_setting.default)
871
  $('#_customize-input-' + slider_id + '_control ').val(slider_setting.default)
872
  })
873
  } else {
874
+ const ratio = parseFloat(coloration)
875
  $(color_sliders_selector).val(ratio)
876
  }
877
  reinitializeConnectedFields()
js/customizer/style-manager.js CHANGED
@@ -6,9 +6,9 @@
6
  wp.customize.bind('ready', function () {
7
 
8
  // Handle the Style Manager user feedback logic.
9
- var $styleManagerUserFeedbackModal = $('#style-manager-user-feedback-modal')
10
  if ($styleManagerUserFeedbackModal.length) {
11
- var $styleManagerUserFeedbackForm = $styleManagerUserFeedbackModal.find('form'),
12
  $styleManagerUserFeedbackCloseBtn = $styleManagerUserFeedbackModal.find('.close'),
13
  $styleManagerUserFeedbackFirstStep = $styleManagerUserFeedbackModal.find('.first-step'),
14
  $styleManagerUserFeedbackSecondStep = $styleManagerUserFeedbackModal.find('.second-step'),
@@ -123,7 +123,7 @@ function customifyInverseHexColor (hex, bw) {
123
  if (hex.length !== 6) {
124
  throw new Error('Invalid HEX color.')
125
  }
126
- var r = parseInt(hex.slice(0, 2), 16),
127
  g = parseInt(hex.slice(2, 4), 16),
128
  b = parseInt(hex.slice(4, 6), 16)
129
  if (bw) {
@@ -150,7 +150,7 @@ function customifyInverseHexColor (hex, bw) {
150
 
151
  function customifyPadZero (str, len) {
152
  len = len || 2
153
- var zeros = new Array(len).join('0')
154
  return (
155
  zeros + str
156
  ).slice(-len)
6
  wp.customize.bind('ready', function () {
7
 
8
  // Handle the Style Manager user feedback logic.
9
+ const $styleManagerUserFeedbackModal = $('#style-manager-user-feedback-modal')
10
  if ($styleManagerUserFeedbackModal.length) {
11
+ let $styleManagerUserFeedbackForm = $styleManagerUserFeedbackModal.find('form'),
12
  $styleManagerUserFeedbackCloseBtn = $styleManagerUserFeedbackModal.find('.close'),
13
  $styleManagerUserFeedbackFirstStep = $styleManagerUserFeedbackModal.find('.first-step'),
14
  $styleManagerUserFeedbackSecondStep = $styleManagerUserFeedbackModal.find('.second-step'),
123
  if (hex.length !== 6) {
124
  throw new Error('Invalid HEX color.')
125
  }
126
+ let r = parseInt(hex.slice(0, 2), 16),
127
  g = parseInt(hex.slice(2, 4), 16),
128
  b = parseInt(hex.slice(4, 6), 16)
129
  if (bw) {
150
 
151
  function customifyPadZero (str, len) {
152
  len = len || 2
153
+ const zeros = new Array(len).join('0')
154
  return (
155
  zeros + str
156
  ).slice(-len)
js/customizer/swap-values.js CHANGED
@@ -1,8 +1,8 @@
1
  ( function( $, exports, wp ) {
2
 
3
  function swap_values( setting_one, setting_two ) {
4
- var color_primary = wp.customize( setting_one )();
5
- var color_secondary = wp.customize( setting_two )();
6
 
7
  wp.customize( setting_one ).set( color_secondary );
8
  wp.customize( setting_two ).set( color_primary );
@@ -37,4 +37,4 @@
37
 
38
  } );
39
 
40
- } )( jQuery, window, wp );
1
  ( function( $, exports, wp ) {
2
 
3
  function swap_values( setting_one, setting_two ) {
4
+ const color_primary = wp.customize( setting_one )();
5
+ const color_secondary = wp.customize( setting_two )();
6
 
7
  wp.customize( setting_one ).set( color_secondary );
8
  wp.customize( setting_two ).set( color_primary );
37
 
38
  } );
39
 
40
+ } )( jQuery, window, wp );
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Customify - A Theme Customizer Booster ===
2
- Contributors: pixelgrade, euthelup, babbardel, vlad.olaru, raduconstantin, razvanonofrei
3
  Tags: customizer, css, editor, gutenberg, live, preview, customizer
4
  Requires at least: 4.9.9
5
  Tested up to: 5.2.2
6
- Stable tag: 2.3.5.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -45,6 +45,11 @@ With [Customify](https://github.com/pixelgrade/customify), developers can easily
45
 
46
  == Changelog ==
47
 
 
 
 
 
 
48
  = 2.4.0 =
49
  * Big performance enhancements related to how customization settings and configurations get loaded.
50
  * Fixed a nasty regression that caused customization settings saved in a option to not be loaded, causing styles to be missing.
1
  === Customify - A Theme Customizer Booster ===
2
+ Contributors: pixelgrade, vlad.olaru, babbardel, razvanonofrei
3
  Tags: customizer, css, editor, gutenberg, live, preview, customizer
4
  Requires at least: 4.9.9
5
  Tested up to: 5.2.2
6
+ Stable tag: 2.4.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
45
 
46
  == Changelog ==
47
 
48
+ = 2.5.0 =
49
+ * JavaScript cleanup and performance enhancements
50
+ * Fixed some bugs with the Style Manager.
51
+ * Fixed some rare bugs with the plugin config merge.
52
+
53
  = 2.4.0 =
54
  * Big performance enhancements related to how customization settings and configurations get loaded.
55
  * Fixed a nasty regression that caused customization settings saved in a option to not be loaded, causing styles to be missing.
scss/customizer.scss CHANGED
@@ -2132,6 +2132,12 @@ $palette_border-radius: 5px;
2132
  &.inactive .picker:hover {
2133
  opacity: 1;
2134
  }
 
 
 
 
 
 
2135
  }
2136
 
2137
  input.c-color-palette__input[class] {
@@ -2185,15 +2191,16 @@ input.c-color-palette__input[class] {
2185
 
2186
  @mixin section_icon($icon) {
2187
  h3.accordion-section-title:before {
2188
- position: relative;
2189
- float: right;
2190
- content: $icon;
2191
- color: #aed2e5;
2192
- font-family: dashicons;
2193
- padding: 1px;
2194
- margin-right: 28px;
2195
- font-size: 17px;
2196
- -webkit-font-smoothing: antialiased;
 
2197
  }
2198
  }
2199
 
2132
  &.inactive .picker:hover {
2133
  opacity: 1;
2134
  }
2135
+
2136
+ &.js-no-picker {
2137
+ .picker {
2138
+ cursor: not-allowed;
2139
+ }
2140
+ }
2141
  }
2142
 
2143
  input.c-color-palette__input[class] {
2191
 
2192
  @mixin section_icon($icon) {
2193
  h3.accordion-section-title:before {
2194
+ position: absolute;
2195
+ content: $icon;
2196
+ color: #aed2e5;
2197
+ font-family: dashicons;
2198
+ margin-right: 28px;
2199
+ font-size: 17px;
2200
+ top: 8px;
2201
+ right: 10px;
2202
+ z-index: 1;
2203
+ -webkit-font-smoothing: antialiased;
2204
  }
2205
  }
2206