Carousel, Slider, Gallery by WP Carousel – Image Carousel & Photo Gallery, Post Carousel & Post Grid, Product Carousel & Product Grid for WooCommerce - Version 2.1.15

Version Description

Dec 29, 2020 = * Fix: Dynamic CSS issue. * Tested: WordPress 5.6 version. * Tested: WooCommerce 4.8.0 version.

Download this release

Release Info

Developer shapedplugin
Plugin Icon 128x128 Carousel, Slider, Gallery by WP Carousel – Image Carousel & Photo Gallery, Post Carousel & Post Grid, Product Carousel & Product Grid for WooCommerce
Version 2.1.15
Comparing to
See all releases

Code changes from version 2.1.14 to 2.1.15

admin/img/Left.svg ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 100 100" style="enable-background:new 0 0 100 100;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{display:none;fill:#DDDDDD;}
7
+ .st1{fill:#D2D2D2;}
8
+ .st2{fill:#BCC5CB;}
9
+ </style>
10
+ <path class="st0" d="M98,74.6H2c-1.1,0-2-0.9-2-2v-70c0-1.1,0.9-2,2-2h96c1.1,0,2,0.9,2,2v70C100,73.7,99.1,74.6,98,74.6z"/>
11
+ <g>
12
+ <path class="st1" d="M97.8,100h-95c-1.4,0-2.5-1.1-2.5-2.5v-95C0.3,1.1,1.5,0,2.8,0h95c1.4,0,2.5,1.1,2.5,2.5v95
13
+ C100.3,98.9,99.2,100,97.8,100z M2.8,1C2,1,1.3,1.7,1.3,2.5v95C1.3,98.3,2,99,2.8,99h95c0.8,0,1.5-0.7,1.5-1.5v-95
14
+ c0-0.8-0.7-1.5-1.5-1.5H2.8z"/>
15
+ </g>
16
+ <g>
17
+ <g>
18
+ <path class="st2" d="M85.5,36H54c-1.3,0-2.3,1-2.3,2.3v23.4c0,1.3,1,2.3,2.3,2.3h31.4c1.3,0,2.3-1,2.3-2.3V38.3
19
+ C87.7,37.1,86.7,36,85.5,36z M85.5,38.3v16.6L81,50.8c-0.7-0.6-1.7-0.6-2.4,0.1L74,55.4l-8.9-10.7c-0.7-0.8-1.9-0.8-2.6,0L54,54.4
20
+ V38.3H85.5z M75.8,44.3c0-1.7,1.4-3.2,3.2-3.2c1.7,0,3.2,1.4,3.2,3.2c0,1.8-1.4,3.2-3.2,3.2C77.2,47.4,75.8,46.1,75.8,44.3z"/>
21
+ </g>
22
+ <path class="st2" d="M47.5,41H19.8c-0.3,0-0.5-0.3-0.5-0.8v-1.5c0-0.5,0.2-0.8,0.5-0.8h27.6c0.3,0,0.5,0.3,0.5,0.8v1.5
23
+ C48,40.6,47.8,41,47.5,41z"/>
24
+ <path class="st2" d="M47.2,46.4H13.6c-0.3,0-0.6-0.3-0.6-0.8v-0.4c0-0.5,0.2-0.8,0.6-0.8h33.8c0.3,0,0.6,0.3,0.6,0.8v0.5
25
+ C47.9,46,47.7,46.4,47.2,46.4z"/>
26
+ <path class="st2" d="M47.2,50.3H13.6c-0.3,0-0.6-0.3-0.6-0.8v-0.4c0-0.5,0.2-0.8,0.6-0.8h33.8c0.3,0,0.6,0.3,0.6,0.8v0.4
27
+ C47.9,49.9,47.7,50.3,47.2,50.3z"/>
28
+ <path class="st2" d="M47.7,54.6H28.3c-0.2,0-0.3-0.3-0.3-0.8v-0.4c0-0.5,0.1-0.8,0.3-0.8h19.4c0.2,0,0.3,0.3,0.3,0.8v0.4
29
+ C48,54.2,47.9,54.6,47.7,54.6z"/>
30
+ </g>
31
+ </svg>
admin/img/Right.svg ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 100 100" style="enable-background:new 0 0 100 100;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{display:none;fill:#DDDDDD;}
7
+ .st1{fill:#D2D2D2;}
8
+ .st2{fill:#BCC5CB;}
9
+ </style>
10
+ <path class="st0" d="M98,74.6H2c-1.1,0-2-0.9-2-2v-70c0-1.1,0.9-2,2-2h96c1.1,0,2,0.9,2,2v70C100,73.7,99.1,74.6,98,74.6z"/>
11
+ <g>
12
+ <path class="st1" d="M97.8,100h-95c-1.4,0-2.5-1.1-2.5-2.5v-95C0.3,1.1,1.5,0,2.8,0h95c1.4,0,2.5,1.1,2.5,2.5v95
13
+ C100.3,98.9,99.2,100,97.8,100z M2.8,1C2,1,1.3,1.7,1.3,2.5v95C1.3,98.3,2,99,2.8,99h95c0.8,0,1.5-0.7,1.5-1.5v-95
14
+ c0-0.8-0.7-1.5-1.5-1.5H2.8z"/>
15
+ </g>
16
+ <g>
17
+ <path class="st2" d="M81.1,41H53.4c-0.3,0-0.5-0.3-0.5-0.8v-1.5c0-0.5,0.2-0.8,0.5-0.8h27.6c0.3,0,0.5,0.3,0.5,0.8v1.5
18
+ C81.6,40.6,81.4,41,81.1,41z"/>
19
+ <path class="st2" d="M87.2,46.4H53.5c-0.3,0-0.6-0.3-0.6-0.8v-0.4c0-0.5,0.2-0.8,0.6-0.8h33.8c0.3,0,0.6,0.3,0.6,0.8v0.5
20
+ C87.8,46,87.6,46.4,87.2,46.4z"/>
21
+ <path class="st2" d="M87.2,50.3H53.5c-0.3,0-0.6-0.3-0.6-0.8v-0.4c0-0.5,0.2-0.8,0.6-0.8h33.8c0.3,0,0.6,0.3,0.6,0.8v0.4
22
+ C87.8,49.9,87.6,50.3,87.2,50.3z"/>
23
+ <g>
24
+ <path class="st2" d="M46.5,36H15c-1.3,0-2.3,1-2.3,2.3v23.4c0,1.3,1,2.3,2.3,2.3h31.4c1.3,0,2.3-1,2.3-2.3V38.3
25
+ C48.7,37.1,47.7,36,46.5,36z M46.5,38.3v16.6L42,50.8c-0.7-0.6-1.7-0.6-2.4,0.1L35,55.4l-8.9-10.7c-0.7-0.8-1.9-0.8-2.6,0L15,54.4
26
+ V38.3H46.5z M36.8,44.3c0-1.7,1.4-3.2,3.2-3.2c1.7,0,3.2,1.4,3.2,3.2s-1.4,3.2-3.2,3.2C38.2,47.4,36.8,46.1,36.8,44.3z"/>
27
+ </g>
28
+ <path class="st2" d="M72.6,54.6H53.2c-0.2,0-0.3-0.3-0.3-0.8v-0.4c0-0.5,0.1-0.8,0.3-0.8h19.4c0.2,0,0.3,0.3,0.3,0.8v0.4
29
+ C72.9,54.2,72.8,54.6,72.6,54.6z"/>
30
+ </g>
31
+ </svg>
admin/img/Top.svg ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 100 100" style="enable-background:new 0 0 100 100;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{display:none;fill:#DDDDDD;}
7
+ .st1{fill:#BCC5CB;}
8
+ .st2{fill:#D2D2D2;}
9
+ </style>
10
+ <path class="st0" d="M98,74.6H2c-1.1,0-2-0.9-2-2v-70c0-1.1,0.9-2,2-2h96c1.1,0,2,0.9,2,2v70C100,73.7,99.1,74.6,98,74.6z"/>
11
+ <path class="st1" d="M81.1,19.7H19.5c-0.7,0-1.2-0.4-1.2-1v-2c0-0.6,0.5-1,1.2-1h61.7c0.7,0,1.2,0.4,1.2,1v2
12
+ C82.3,19.2,81.8,19.7,81.1,19.7z"/>
13
+ <path class="st1" d="M81.3,24.9h-62c-0.6,0-1-0.4-1-1v-0.5c0-0.6,0.4-1,1-1h62c0.6,0,1,0.4,1,1V24C82.3,24.4,81.9,24.9,81.3,24.9z"
14
+ />
15
+ <path class="st1" d="M81.3,28.8h-62c-0.6,0-1-0.4-1-1v-0.5c0-0.6,0.4-1,1-1h62c0.6,0,1,0.4,1,1v0.5C82.3,28.3,81.9,28.8,81.3,28.8z"
16
+ />
17
+ <g>
18
+ <path class="st1" d="M78.6,33.9H22c-2.3,0-4.1,1.8-4.1,4.1v42.2c0,2.3,1.8,4.1,4.1,4.1h56.6c2.3,0,4.1-1.8,4.1-4.1V38
19
+ C82.7,35.8,80.9,33.9,78.6,33.9z M78.6,38v29.9l-8.1-7.4c-1.2-1.1-3.1-1.1-4.3,0.1L58,68.9L41.9,49.6c-1.2-1.5-3.5-1.5-4.7,0
20
+ L22,67.1V38H78.6z M61.1,48.8c0-3.1,2.5-5.7,5.7-5.7c3.1,0,5.7,2.5,5.7,5.7s-2.5,5.7-5.7,5.7C63.7,54.5,61.1,52,61.1,48.8z"/>
21
+ </g>
22
+ <g>
23
+ <path class="st2" d="M97.8,100h-95c-1.4,0-2.5-1.1-2.5-2.5v-95C0.3,1.1,1.5,0,2.8,0h95c1.4,0,2.5,1.1,2.5,2.5v95
24
+ C100.3,98.9,99.2,100,97.8,100z M2.8,1C2,1,1.3,1.7,1.3,2.5v95C1.3,98.3,2,99,2.8,99h95c0.8,0,1.5-0.7,1.5-1.5v-95
25
+ c0-0.8-0.7-1.5-1.5-1.5H2.8z"/>
26
+ </g>
27
+ </svg>
admin/img/bottom.svg ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 100 100" style="enable-background:new 0 0 100 100;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{display:none;fill:#DDDDDD;}
7
+ .st1{fill:#BCC5CB;}
8
+ .st2{fill:#D2D2D2;}
9
+ </style>
10
+ <path class="st0" d="M98,74.6H2c-1.1,0-2-0.9-2-2v-70c0-1.1,0.9-2,2-2h96c1.1,0,2,0.9,2,2v70C100,73.7,99.1,74.6,98,74.6z"/>
11
+ <path class="st1" d="M81.3,75.3h-62c-0.6,0-1-0.4-1-1v-2c0-0.6,0.4-1,1-1h62c0.6,0,1,0.4,1,1v2C82.3,74.8,81.9,75.3,81.3,75.3z"/>
12
+ <path class="st1" d="M81.3,80.5h-62c-0.6,0-1-0.4-1-1V79c0-0.6,0.4-1,1-1h62c0.6,0,1,0.4,1,1v0.5C82.3,80,81.9,80.5,81.3,80.5z"/>
13
+ <path class="st1" d="M81.3,84.5h-62c-0.6,0-1-0.4-1-1V83c0-0.6,0.4-1,1-1h62c0.6,0,1,0.4,1,1v0.5C82.3,84,81.9,84.5,81.3,84.5z"/>
14
+ <g>
15
+ <path class="st1" d="M78.6,15.5H22c-2.3,0-4.1,1.8-4.1,4.1v42.2c0,2.3,1.8,4.1,4.1,4.1h56.6c2.3,0,4.1-1.8,4.1-4.1V19.6
16
+ C82.7,17.4,80.9,15.5,78.6,15.5z M78.6,19.6v29.9l-8.1-7.4c-1.2-1.1-3.1-1.1-4.3,0.1L58,50.5L41.9,31.2c-1.2-1.5-3.5-1.5-4.7,0
17
+ L22,48.7V19.6H78.6z M61.1,30.4c0-3.1,2.5-5.7,5.7-5.7c3.1,0,5.7,2.5,5.7,5.7s-2.5,5.7-5.7,5.7C63.7,36.1,61.1,33.6,61.1,30.4z"/>
18
+ </g>
19
+ <g>
20
+ <path class="st2" d="M97.8,100h-95c-1.4,0-2.5-1.1-2.5-2.5v-95C0.3,1.1,1.5,0,2.8,0h95c1.4,0,2.5,1.1,2.5,2.5v95
21
+ C100.3,98.9,99.2,100,97.8,100z M2.8,1C2,1,1.3,1.7,1.3,2.5v95C1.3,98.3,2,99,2.8,99h95c0.8,0,1.5-0.7,1.5-1.5v-95
22
+ c0-0.8-0.7-1.5-1.5-1.5H2.8z"/>
23
+ </g>
24
+ </svg>
admin/img/image_select/image_select.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: image_select
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SP_WPCP_Field_image_select' ) ) {
11
+ class SP_WPCP_Field_image_select extends SP_WPCP_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $args = wp_parse_args(
20
+ $this->field,
21
+ array(
22
+ 'multiple' => false,
23
+ 'options' => array(),
24
+ )
25
+ );
26
+
27
+ $value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
28
+
29
+ echo $this->field_before();
30
+
31
+ if ( ! empty( $args['options'] ) ) {
32
+
33
+ echo '<div class="spf-siblings spf--image-group" data-multiple="' . $args['multiple'] . '">';
34
+
35
+ $num = 1;
36
+
37
+ foreach ( $args['options'] as $key => $option ) {
38
+
39
+ $type = ( $args['multiple'] ) ? 'checkbox' : 'radio';
40
+ $extra = ( $args['multiple'] ) ? '[]' : '';
41
+ $active = ( in_array( $key, $value ) ) ? ' spf--active' : '';
42
+ $checked = ( in_array( $key, $value ) ) ? ' checked' : '';
43
+
44
+ echo '<div class="spf--sibling spf--image' . $active . '">';
45
+ echo '<img src="' . $option['image'] . '" alt="img-' . $num++ . '" />';
46
+ echo '<input type="' . $type . '" name="' . $this->field_name( $extra ) . '" value="' . $key . '"' . $this->field_attributes() . $checked . '/>';
47
+ echo '<span>' . $option['text'] . '</p>';
48
+ echo '</div>';
49
+
50
+ }
51
+ echo '</div>';
52
+
53
+ }
54
+
55
+ echo '<div class="clear"></div>';
56
+
57
+ echo $this->field_after();
58
+
59
+ }
60
+
61
+ public function output() {
62
+
63
+ $output = '';
64
+ $bg_image = array();
65
+ $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
66
+ $elements = ( is_array( $this->field['output'] ) ) ? join( ',', $this->field['output'] ) : $this->field['output'];
67
+
68
+ if ( ! empty( $elements ) && isset( $this->value ) && $this->value !== '' ) {
69
+ $output = $elements . '{background-image:url(' . $this->value . ')' . $important . ';}';
70
+ }
71
+
72
+ $this->parent->output_css .= $output;
73
+
74
+ return $output;
75
+
76
+ }
77
+
78
+ }
79
+ }
admin/img/overlay.svg ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 100 100" style="enable-background:new 0 0 100 100;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{display:none;fill:#DDDDDD;}
7
+ .st1{fill:#666666;}
8
+ .st2{fill:#D2D2D2;}
9
+ .st3{opacity:0.7;fill:#444444;}
10
+ .st4{fill:#F8F8F8;}
11
+ </style>
12
+ <path class="st0" d="M98,74.6H2c-1.1,0-2-0.9-2-2v-70c0-1.1,0.9-2,2-2h96c1.1,0,2,0.9,2,2v70C100,73.7,99.1,74.6,98,74.6z"/>
13
+ <g>
14
+ <path class="st1" d="M84.4,19.4H15.6c-2.8,0-5,2.2-5,5v51.3c0,2.8,2.2,5,5,5h68.8c2.8,0,5-2.2,5-5V24.4
15
+ C89.4,21.7,87.2,19.4,84.4,19.4z M84.4,24.4v36.3l-9.8-9c-1.5-1.3-3.8-1.3-5.2,0.1l-10,10.1L39.8,38.5c-1.5-1.8-4.3-1.8-5.7,0
16
+ L15.6,59.7V24.4H84.4z M63.1,37.5c0-3.8,3-6.9,6.9-6.9c3.8,0,6.9,3,6.9,6.9s-3,6.9-6.9,6.9C66.3,44.4,63.1,41.4,63.1,37.5z"/>
17
+ </g>
18
+ <g>
19
+ <path class="st2" d="M97.8,100h-95c-1.4,0-2.5-1.1-2.5-2.5v-95C0.3,1.1,1.5,0,2.8,0h95c1.4,0,2.5,1.1,2.5,2.5v95
20
+ C100.3,98.9,99.2,100,97.8,100z M2.8,1C2,1,1.3,1.7,1.3,2.5v95C1.3,98.3,2,99,2.8,99h95c0.8,0,1.5-0.7,1.5-1.5v-95
21
+ c0-0.8-0.7-1.5-1.5-1.5H2.8z"/>
22
+ </g>
23
+ <path class="st3" d="M98,100H2c-1.1,0-2-0.9-2-2V2c0-1.1,0.9-2,2-2h96c1.1,0,2,0.9,2,2v96C100,99.1,99.1,100,98,100z"/>
24
+ <g>
25
+ <path class="st4" d="M76.5,45.5h-53c-0.6,0-1-0.4-1-1v-2c0-0.6,0.4-1,1-1h53c0.6,0,1,0.4,1,1v2C77.5,45.1,77.1,45.5,76.5,45.5z"/>
26
+ <path class="st4" d="M81.5,51.8h-63c-0.6,0-1-0.4-1-1v-0.5c0-0.6,0.4-1,1-1h63c0.6,0,1,0.4,1,1v0.5C82.5,51.3,82.1,51.8,81.5,51.8z
27
+ "/>
28
+ <path class="st4" d="M81.5,56.1h-63c-0.6,0-1-0.4-1-1v-0.5c0-0.6,0.4-1,1-1h63c0.6,0,1,0.4,1,1v0.5C82.5,55.7,82.1,56.1,81.5,56.1z
29
+ "/>
30
+ <path class="st4" d="M73.3,60.2H26.7c-0.6,0-1-0.4-1-1v0c0-0.6,0.4-1,1-1h46.5c0.6,0,1,0.4,1,1v0C74.3,59.8,73.8,60.2,73.3,60.2z"
31
+ />
32
+ </g>
33
+ </svg>
admin/img/wpcp-logo.svg ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 195.9 32.3" style="enable-background:new 0 0 195.9 32.3;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#FFFFFF;}
7
+ </style>
8
+ <g>
9
+ <polygon class="st0" points="28.4,18 24.6,13.3 26.9,11.4 30.7,16.1 "/>
10
+ <polygon class="st0" points="26.9,20.9 24.6,19 28.4,14.3 30.7,16.2 "/>
11
+ </g>
12
+ <g>
13
+ <polygon class="st0" points="12.6,18 10.3,16.1 14.1,11.4 16.4,13.3 "/>
14
+ <polygon class="st0" points="14.1,20.9 10.3,16.2 12.6,14.3 16.4,19 "/>
15
+ </g>
16
+ <g>
17
+ <path class="st0" d="M37.6,29.5H3.4V2.8h34.2V29.5z M7.3,25.6h26.5V6.7H7.3V25.6z"/>
18
+ </g>
19
+ <g>
20
+ <path class="st0" d="M62.4,7.7l-3,17.5c-0.5,0-0.9,0.1-1.2,0.1s-0.8,0-1.2,0c-0.4,0-0.7-0.1-1-0.4s-0.4-0.7-0.5-1.2L55,21
21
+ c-0.2-1.2-0.5-3.4-0.8-6.4c-0.3,3.1-0.6,5.2-0.8,6.4l-0.7,4.2c-0.8,0.1-1.7,0.1-2.6,0.1c-0.4,0-0.6-0.1-0.9-0.4s-0.4-0.7-0.5-1.1
22
+ c-0.3-1.7-0.8-4.4-1.4-8c-0.6-3.7-1-6.1-1.2-7.3c0-0.1,0-0.2,0-0.3c0-0.1,0-0.3,0.1-0.3c0.1-0.1,0.3-0.1,0.5-0.1H49l1.2,8.2
23
+ c0.4,2.2,0.6,4.4,0.7,6.5h0.2c0.1-2,0.3-4.2,0.6-6.5l1.1-6.7c0-0.3,0.1-0.5,0.2-0.6s0.2-0.2,0.5-0.2h2l1.3,7.5
24
+ c0.3,1.6,0.5,3.8,0.7,6.5h0.2c0.1-2.1,0.3-4.3,0.6-6.5l1.1-7.5c0-0.3,0.1-0.5,0.2-0.6s0.2-0.2,0.5-0.2H62.4z"/>
25
+ <path class="st0" d="M63.7,25c-0.5-0.3-1-1-1.2-1.9s-0.4-2.3-0.4-4.2c0-4.3,1.4-6.5,4.1-6.5c0.9,0,1.7,0.2,2.2,0.6
26
+ c0.6,0.4,1,1,1.2,1.9c0.3,0.9,0.4,2.2,0.4,3.9c0,2.4-0.3,4-1,5.1c-0.7,1-1.7,1.5-3.1,1.5C65,25.5,64.3,25.3,63.7,25z M66.6,22.9
27
+ c0.1-0.2,0.2-0.6,0.3-1.2s0.1-1.5,0.1-2.7c0-1.2,0-2.1-0.1-2.7c0-0.6-0.1-1-0.3-1.2c-0.1-0.2-0.3-0.3-0.6-0.3
28
+ c-0.3,0-0.6,0.3-0.7,0.9c-0.2,0.6-0.3,1.7-0.3,3.3c0,1.3,0,2.2,0.1,2.8c0.1,0.6,0.2,1,0.3,1.2c0.1,0.2,0.3,0.3,0.5,0.3
29
+ C66.3,23.2,66.4,23.1,66.6,22.9z"/>
30
+ <path class="st0" d="M71.7,13.6c1.1-0.8,2.3-1.1,3.5-1.1c0.7,0,1.1,0.1,1.3,0.3c0.2,0.2,0.4,0.5,0.4,1c0,0.5-0.1,1.1-0.3,1.6
31
+ c-0.3-0.1-0.6-0.2-0.9-0.2c-0.2,0-0.4,0-0.5,0.1c-0.2,0.1-0.4,0.2-0.6,0.3l0,9.2c0,0.2,0,0.3-0.1,0.4s-0.4,0.1-0.8,0.1
32
+ s-1.1,0-1.9,0V13.6z"/>
33
+ <path class="st0" d="M79.3,25c-0.6-0.3-1-0.8-1.4-1.7c-0.4-0.9-0.5-2.1-0.5-3.8c0-2.4,0.3-4.2,0.9-5.4c0.6-1.1,1.5-1.7,2.5-1.7
34
+ c0.6,0,1.1,0.1,1.5,0.5V8.1c0-0.4,0.1-0.7,0.2-0.9c0.1-0.2,0.4-0.3,0.7-0.3c0.3,0,1-0.1,1.8-0.1v17.9c-1.1,0.5-2.4,0.8-3.7,0.8
35
+ C80.5,25.5,79.8,25.3,79.3,25z M82.3,22.8V15c-0.1-0.1-0.3-0.1-0.5-0.1c-0.2,0-0.4,0.1-0.6,0.3c-0.2,0.2-0.3,0.6-0.5,1.2
36
+ c-0.1,0.6-0.2,1.6-0.2,2.9c0,1.5,0.1,2.5,0.2,3s0.4,0.8,0.7,0.8C81.8,23,82,22.9,82.3,22.8z"/>
37
+ <path class="st0" d="M92.4,8.2C93.1,8.5,93.6,9,94,9.7c0.4,0.8,0.6,1.8,0.6,3.1c0,2.1-0.4,3.5-1.3,4.4c-0.9,0.8-2,1.2-3.4,1.2h-0.2
38
+ v6.3c0,0.2,0,0.3-0.1,0.4s-0.4,0.1-0.8,0.1s-1.1,0-1.8,0v-17c0-0.2,0-0.3,0.1-0.4c0.1-0.1,0.2-0.1,0.4-0.1h2.4
39
+ C90.8,7.7,91.7,7.9,92.4,8.2z M91.1,15.2c0.2-0.5,0.3-1.4,0.3-2.7c0-0.8-0.1-1.4-0.3-1.8c-0.2-0.4-0.5-0.6-0.9-0.6h-0.7v5.8h0.5
40
+ C90.5,15.9,90.9,15.7,91.1,15.2z"/>
41
+ <path class="st0" d="M95.9,13.6c1.1-0.8,2.3-1.1,3.5-1.1c0.7,0,1.1,0.1,1.3,0.3c0.2,0.2,0.3,0.5,0.3,1c0,0.5-0.1,1.1-0.3,1.6
42
+ c-0.3-0.1-0.6-0.2-0.9-0.2c-0.2,0-0.4,0-0.6,0.1c-0.2,0.1-0.4,0.2-0.5,0.3l0,9.2c0,0.2,0,0.3-0.1,0.4c-0.1,0.1-0.4,0.1-0.8,0.1
43
+ c-0.5,0-1.1,0-1.9,0V13.6z"/>
44
+ <path class="st0" d="M108.7,22.1c0.1,0.5,0.2,1.1,0.2,1.9c0,0.5-0.3,0.9-1,1.1c-0.7,0.3-1.5,0.4-2.5,0.4c-1.2,0-2.2-0.4-2.9-1.3
45
+ c-0.7-0.9-1-2.4-1-4.6c0-1.9,0.2-3.4,0.6-4.4c0.4-1,0.9-1.8,1.5-2.1c0.6-0.4,1.4-0.5,2.3-0.5c2.1,0,3.2,1.4,3.2,4.1
46
+ c0,1.4-0.1,2.6-0.3,3.6c-1,0.2-2.4,0.3-4.3,0.3c0,0.9,0.2,1.5,0.4,1.8c0.2,0.4,0.6,0.5,1.2,0.5C106.9,22.8,107.7,22.5,108.7,22.1z
47
+ M104.7,15.7c-0.2,0.5-0.3,1.4-0.3,2.6c0.9,0,1.6-0.1,1.9-0.2c0.1-0.2,0.1-0.7,0.1-1.3c0-0.8-0.1-1.3-0.2-1.5
48
+ c-0.1-0.2-0.3-0.4-0.7-0.4C105.2,14.9,104.9,15.1,104.7,15.7z"/>
49
+ <path class="st0" d="M110.4,24c0-0.5,0.2-1,0.5-1.5c0.7,0.4,1.4,0.5,2.2,0.5c0.4,0,0.8-0.1,1-0.3s0.3-0.5,0.3-0.8
50
+ c0-0.5-0.2-1-0.6-1.4l-2.2-2.3c-0.4-0.4-0.7-0.9-0.9-1.4c-0.2-0.5-0.3-0.9-0.3-1.3c0-1,0.3-1.7,1-2.3c0.7-0.6,1.7-0.8,3.2-0.8
51
+ c1.2,0,2.1,0.2,2.5,0.5c0.4,0.3,0.6,0.7,0.6,1.1c0,0.2,0,0.4-0.1,0.7c-0.1,0.2-0.2,0.5-0.4,0.6c-0.7-0.4-1.4-0.5-2.2-0.5
52
+ s-1.2,0.3-1.2,0.8c0,0.2,0,0.3,0.2,0.5c0.1,0.2,0.3,0.4,0.6,0.7l1.8,1.9c0.5,0.6,0.8,1.1,1,1.5c0.2,0.4,0.3,1,0.3,1.6
53
+ c0,1.1-0.4,2-1.1,2.6s-1.8,1-3,1C111.3,25.5,110.4,25,110.4,24z"/>
54
+ <path class="st0" d="M118.6,24c0-0.5,0.2-1,0.5-1.5c0.7,0.4,1.4,0.5,2.2,0.5c0.4,0,0.8-0.1,1-0.3s0.3-0.5,0.3-0.8
55
+ c0-0.5-0.2-1-0.6-1.4l-2.2-2.3c-0.4-0.4-0.7-0.9-0.9-1.4c-0.2-0.5-0.3-0.9-0.3-1.3c0-1,0.3-1.7,1-2.3c0.7-0.6,1.7-0.8,3.2-0.8
56
+ c1.2,0,2.1,0.2,2.5,0.5c0.4,0.3,0.6,0.7,0.6,1.1c0,0.2,0,0.4-0.1,0.7c-0.1,0.2-0.2,0.5-0.4,0.6c-0.7-0.4-1.4-0.5-2.2-0.5
57
+ s-1.2,0.3-1.2,0.8c0,0.2,0,0.3,0.2,0.5c0.1,0.2,0.3,0.4,0.6,0.7l1.8,1.9c0.5,0.6,0.8,1.1,1,1.5c0.2,0.4,0.3,1,0.3,1.6
58
+ c0,1.1-0.4,2-1.1,2.6s-1.8,1-3,1C119.6,25.5,118.6,25,118.6,24z"/>
59
+ <path class="st0" d="M132.4,24.8c-0.6-0.5-1-1.3-1.3-2.5c-0.3-1.2-0.5-3-0.5-5.3c0-6.4,1.7-9.6,5-9.6c1,0,1.6,0.1,1.9,0.4
60
+ s0.5,0.6,0.5,1.1c0,0.5-0.1,1.1-0.4,1.7c-0.4-0.3-0.8-0.4-1.3-0.4c-0.8,0-1.5,0.5-2,1.4s-0.8,2.7-0.8,5.2c0,1.4,0.1,2.6,0.2,3.4
61
+ c0.1,0.8,0.3,1.4,0.6,1.7s0.7,0.5,1.2,0.5c0.8,0,1.5-0.1,1.9-0.4c0.2,0.5,0.4,1,0.4,1.6c0,0.6-0.3,1-0.8,1.4
62
+ c-0.5,0.3-1.3,0.5-2.2,0.5C133.8,25.5,133,25.2,132.4,24.8z"/>
63
+ <path class="st0" d="M140.7,25.2c-0.5-0.2-0.9-0.6-1.2-1.1c-0.3-0.6-0.5-1.4-0.5-2.5c0-1.6,0.3-2.6,0.8-3.2
64
+ c0.5-0.6,1.2-0.9,2.1-0.9c0.2,0,0.5,0,0.8,0.1c0.3,0.1,0.6,0.2,0.8,0.3v-1.7c0-0.3-0.1-0.6-0.2-0.7c-0.2-0.1-0.4-0.2-0.8-0.2
65
+ c-0.5,0-1,0.1-1.5,0.2c-0.6,0.1-1.1,0.2-1.5,0.4c-0.2-0.5-0.4-1-0.4-1.6c0-0.2,0-0.3,0.1-0.5c0.1-0.2,0.1-0.3,0.2-0.4
66
+ c0.2-0.2,0.7-0.3,1.3-0.5c0.7-0.2,1.5-0.2,2.4-0.2c1.2,0,2,0.2,2.4,0.7c0.5,0.5,0.7,1.2,0.7,2.4v1.2c0,4.1,0,6.7-0.1,8
67
+ c-0.9,0.5-2.1,0.8-3.6,0.8C141.8,25.5,141.2,25.4,140.7,25.2z M143.4,22.9c0-0.4,0-1.5,0-3.2c-0.2-0.1-0.4-0.2-0.7-0.2
68
+ c-0.3,0-0.5,0.1-0.7,0.4c-0.2,0.3-0.2,0.8-0.2,1.6c0,0.6,0.1,1.1,0.2,1.3c0.1,0.3,0.3,0.4,0.7,0.4S143.3,23.1,143.4,22.9z"/>
69
+ <path class="st0" d="M148,13.6c1.1-0.8,2.3-1.1,3.5-1.1c0.7,0,1.1,0.1,1.3,0.3c0.2,0.2,0.3,0.5,0.3,1c0,0.5-0.1,1.1-0.3,1.6
70
+ c-0.3-0.1-0.6-0.2-0.9-0.2c-0.2,0-0.4,0-0.6,0.1c-0.2,0.1-0.4,0.2-0.5,0.3l0,9.2c0,0.2,0,0.3-0.1,0.4c-0.1,0.1-0.4,0.1-0.8,0.1
71
+ c-0.5,0-1.1,0-1.9,0V13.6z"/>
72
+ <path class="st0" d="M155.3,25c-0.6-0.3-1-1-1.2-1.9c-0.3-0.9-0.4-2.3-0.4-4.2c0-4.3,1.4-6.5,4.2-6.5c0.9,0,1.7,0.2,2.2,0.6
73
+ c0.6,0.4,1,1,1.2,1.9c0.3,0.9,0.4,2.2,0.4,3.9c0,2.4-0.3,4-1,5.1c-0.7,1-1.7,1.5-3.1,1.5C156.6,25.5,155.9,25.3,155.3,25z
74
+ M158.2,22.9c0.1-0.2,0.2-0.6,0.3-1.2s0.1-1.5,0.1-2.7c0-1.2,0-2.1-0.1-2.7c0-0.6-0.1-1-0.3-1.2c-0.1-0.2-0.3-0.3-0.6-0.3
75
+ c-0.3,0-0.6,0.3-0.7,0.9c-0.2,0.6-0.3,1.7-0.3,3.3c0,1.3,0,2.2,0.1,2.8c0.1,0.6,0.2,1,0.3,1.2c0.1,0.2,0.3,0.3,0.6,0.3
76
+ C157.9,23.2,158.1,23.1,158.2,22.9z"/>
77
+ <path class="st0" d="M164,24.5c-0.5-0.6-0.8-1.6-0.8-2.8v-8.5c0-0.2,0-0.3,0.1-0.4c0.1-0.1,0.4-0.1,0.8-0.1c0.5,0,1.1,0,1.9,0v9.1
78
+ c0,0.4,0.1,0.7,0.2,0.9c0.1,0.2,0.3,0.3,0.7,0.3c0.4,0,0.7-0.1,1-0.3v-9.6c0-0.2,0-0.3,0.1-0.4c0.1-0.1,0.3-0.1,0.8-0.1
79
+ c0.5,0,1.1,0,1.9,0v11.8c-0.5,0.3-1,0.5-1.7,0.7c-0.7,0.2-1.3,0.3-2,0.3C165.6,25.5,164.6,25.1,164,24.5z"/>
80
+ <path class="st0" d="M172.2,24c0-0.5,0.2-1,0.5-1.5c0.7,0.4,1.4,0.5,2.2,0.5c0.4,0,0.8-0.1,1-0.3s0.3-0.5,0.3-0.8
81
+ c0-0.5-0.2-1-0.6-1.4l-2.2-2.3c-0.4-0.4-0.7-0.9-0.9-1.4c-0.2-0.5-0.3-0.9-0.3-1.3c0-1,0.3-1.7,1-2.3c0.7-0.6,1.7-0.8,3.2-0.8
82
+ c1.2,0,2.1,0.2,2.5,0.5c0.4,0.3,0.6,0.7,0.6,1.1c0,0.2,0,0.4-0.1,0.7c-0.1,0.2-0.2,0.5-0.4,0.6c-0.7-0.4-1.4-0.5-2.2-0.5
83
+ s-1.2,0.3-1.2,0.8c0,0.2,0,0.3,0.2,0.5c0.1,0.2,0.3,0.4,0.6,0.7l1.8,1.9c0.5,0.6,0.8,1.1,1,1.5c0.2,0.4,0.3,1,0.3,1.6
84
+ c0,1.1-0.4,2-1.1,2.6s-1.8,1-3,1C173.2,25.5,172.2,25,172.2,24z"/>
85
+ <path class="st0" d="M187.6,22.1c0.1,0.5,0.2,1.1,0.2,1.9c0,0.5-0.3,0.9-1,1.1c-0.7,0.3-1.5,0.4-2.5,0.4c-1.2,0-2.2-0.4-2.9-1.3
86
+ c-0.7-0.9-1-2.4-1-4.6c0-1.9,0.2-3.4,0.6-4.4c0.4-1,0.9-1.8,1.5-2.1c0.6-0.4,1.4-0.5,2.3-0.5c2.1,0,3.2,1.4,3.2,4.1
87
+ c0,1.4-0.1,2.6-0.3,3.6c-1,0.2-2.4,0.3-4.3,0.3c0,0.9,0.2,1.5,0.4,1.8c0.2,0.4,0.6,0.5,1.2,0.5C185.8,22.8,186.7,22.5,187.6,22.1z
88
+ M183.6,15.7c-0.2,0.5-0.3,1.4-0.3,2.6c0.9,0,1.6-0.1,1.9-0.2c0.1-0.2,0.1-0.7,0.1-1.3c0-0.8-0.1-1.3-0.2-1.5
89
+ c-0.1-0.2-0.3-0.4-0.7-0.4C184.1,14.9,183.8,15.1,183.6,15.7z"/>
90
+ <path class="st0" d="M189.6,8.1c0-0.4,0.1-0.7,0.2-0.9c0.2-0.2,0.4-0.3,0.7-0.3c0.3,0,0.9-0.1,1.8-0.1v17.9c0,0.2,0,0.3-0.1,0.4
91
+ c-0.1,0.1-0.3,0.1-0.8,0.1s-1.1,0-1.8,0V8.1z"/>
92
+ </g>
93
+ </svg>
admin/views/metabox-config.php CHANGED
@@ -29,7 +29,7 @@ SP_WPCF::createSection(
29
  'fields' => array(
30
  array(
31
  'type' => 'heading',
32
- 'image' => plugin_dir_url( __DIR__ ) . 'img/wpcp-logo.png',
33
  'after' => '<i class="fa fa-life-ring"></i> Support',
34
  'link' => 'https://shapedplugin.com/support-forum/',
35
  'class' => 'wpcp-admin-header',
@@ -184,6 +184,24 @@ SP_WPCF::createSection(
184
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
185
  'text_width' => 75,
186
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187
  array(
188
  'id' => 'section_title_margin_bottom',
189
  'type' => 'spacing',
@@ -219,6 +237,25 @@ SP_WPCF::createSection(
219
  ),
220
  'min' => '0',
221
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
  array(
223
  'id' => 'wpcp_image_order_by',
224
  'type' => 'select',
@@ -279,6 +316,21 @@ SP_WPCF::createSection(
279
  'title' => __( 'Carousel Settings', 'wp-carousel-free' ),
280
  'icon' => 'fa fa-sliders',
281
  'fields' => array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
282
  array(
283
  'id' => 'wpcp_carousel_auto_play',
284
  'type' => 'switcher',
@@ -448,7 +500,7 @@ SP_WPCF::createSection(
448
  'id' => 'carousel_swipetoslide',
449
  'type' => 'switcher',
450
  'title' => __( 'Swipe to Slide', 'wp-carousel-free' ),
451
- 'subtitle' => __( 'Allow users to drag or swipe directly to a slide irrespective of slidesToScroll.', 'wp-carousel-free' ),
452
  'default' => false,
453
  'dependency' => array(
454
  'slider_swipe',
@@ -469,37 +521,42 @@ SP_WPCF::createSection(
469
  'title' => __( 'Style Settings', 'wp-carousel-free' ),
470
  'icon' => 'fa fa-paint-brush',
471
  'fields' => array(
472
-
473
  array(
474
  'id' => 'wpcp_post_detail_position',
475
- 'type' => 'selectf',
476
- 'title' => __( 'Content Position', 'wp-carousel-free' ),
477
- 'subtitle' => __( 'Select a position for the title, content, meta etc.', 'wp-carousel-free' ),
 
 
478
  'options' => array(
479
  'bottom' => array(
480
- 'text' => __( 'Bottom', 'wp-carousel-free' ),
 
481
  ),
482
- 'on_right' => array(
483
- 'text' => __( 'Right (Pro)', 'wp-carousel-free' ),
 
484
  'pro_only' => true,
485
  ),
486
- 'on_left' => array(
487
- 'text' => __( 'Left (Pro)', 'wp-carousel-free' ),
 
488
  'pro_only' => true,
489
  ),
490
- 'top' => array(
491
- 'text' => __( 'Top (Pro)', 'wp-carousel-free' ),
 
492
  'pro_only' => true,
493
  ),
494
  'with_overlay' => array(
495
- 'text' => __( 'Overlay (Pro)', 'wp-carousel-free' ),
 
496
  'pro_only' => true,
497
  ),
498
  ),
499
  'default' => 'bottom',
500
  'dependency' => array( 'wpcp_carousel_type', 'any', 'image-carousel,post-carousel,product-carousel', true ),
501
  ),
502
-
503
  array(
504
  'id' => 'wpcp_slide_border',
505
  'type' => 'border',
29
  'fields' => array(
30
  array(
31
  'type' => 'heading',
32
+ 'image' => plugin_dir_url( __DIR__ ) . 'img/wpcp-logo.svg',
33
  'after' => '<i class="fa fa-life-ring"></i> Support',
34
  'link' => 'https://shapedplugin.com/support-forum/',
35
  'class' => 'wpcp-admin-header',
184
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
185
  'text_width' => 75,
186
  ),
187
+ array(
188
+ 'id' => 'wpcp_carousel_mode',
189
+ 'type' => 'button_set',
190
+ 'title' => __( 'Carousel Mode', 'wp-carousel-free' ),
191
+ 'subtitle' => __( 'Set carousel mode. Carousel controls are disabled in the ticker mode.', 'wp-carousel-free' ),
192
+ 'options' => array(
193
+ 'standard' => __( 'Standard', 'wp-carousel-free' ),
194
+ 'ticker' => array(
195
+ 'option_name' => __( 'Ticker', 'wp-carousel-free' ),
196
+ 'pro_only' => true,
197
+ ),
198
+ 'center' => array(
199
+ 'option_name' => __( 'Center', 'wp-carousel-free' ),
200
+ 'pro_only' => true,
201
+ ),
202
+ ),
203
+ 'default' => 'standard',
204
+ ),
205
  array(
206
  'id' => 'section_title_margin_bottom',
207
  'type' => 'spacing',
237
  ),
238
  'min' => '0',
239
  ),
240
+ array(
241
+ 'id' => 'wpcp_logo_link_show',
242
+ 'type' => 'button_set',
243
+ 'title' => __( 'Image Link type', 'wp-carousel-pro' ),
244
+ 'options' => array(
245
+ 'link' => array(
246
+ 'option_name' => __( 'Link', 'wp-carousel-pro' ),
247
+ 'pro_only' => true,
248
+ ),
249
+ 'l_box' => array(
250
+ 'option_name' => __( 'Lightbox', 'wp-carousel-pro' ),
251
+ 'pro_only' => true,
252
+ ),
253
+ 'none' => __( 'None', 'wp-carousel-pro' ),
254
+ ),
255
+ 'subtitle' => __( 'Select image link type.', 'wp-carousel-pro' ),
256
+ 'default' => 'none',
257
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'image-carousel', true ),
258
+ ),
259
  array(
260
  'id' => 'wpcp_image_order_by',
261
  'type' => 'select',
316
  'title' => __( 'Carousel Settings', 'wp-carousel-free' ),
317
  'icon' => 'fa fa-sliders',
318
  'fields' => array(
319
+ array(
320
+ 'id' => 'wpcp_carousel_orientation',
321
+ 'type' => 'button_set',
322
+ 'title' => __( 'Carousel Orientation', 'wp-carousel-pro' ),
323
+ 'subtitle' => __( 'Choose a carousel orientation.', 'wp-carousel-pro' ),
324
+ 'options' => array(
325
+ 'horizontal' => __( 'Horizontal', 'wp-carousel-pro' ),
326
+ 'vertical' => array(
327
+ 'option_name' => __( 'Vertical', 'wp-carousel-pro' ),
328
+ 'pro_only' => true,
329
+ ),
330
+ ),
331
+ 'radio' => true,
332
+ 'default' => 'horizontal',
333
+ ),
334
  array(
335
  'id' => 'wpcp_carousel_auto_play',
336
  'type' => 'switcher',
500
  'id' => 'carousel_swipetoslide',
501
  'type' => 'switcher',
502
  'title' => __( 'Swipe to Slide', 'wp-carousel-free' ),
503
+ 'subtitle' => __( 'Allow users to drag or swipe directly to a slide irrespective of slides to scroll.', 'wp-carousel-free' ),
504
  'default' => false,
505
  'dependency' => array(
506
  'slider_swipe',
521
  'title' => __( 'Style Settings', 'wp-carousel-free' ),
522
  'icon' => 'fa fa-paint-brush',
523
  'fields' => array(
 
524
  array(
525
  'id' => 'wpcp_post_detail_position',
526
+ 'class' => 'wpcp_post_detail_position',
527
+ 'type' => 'image_select',
528
+ 'title' => __( 'Content Position', 'wp-carousel-pro' ),
529
+ 'subtitle' => __( 'Select a position for the title, content, meta etc.', 'wp-carousel-pro' ),
530
+ 'desc' => __( 'More amazing settings for Content Position are available in Pro. <a href="https://shapedplugin.com/plugin/wordpress-carousel-pro/" target="_blank"><b>Get Pro</b></a>!', 'wp-carousel-pro' ),
531
  'options' => array(
532
  'bottom' => array(
533
+ 'image' => plugin_dir_url( __DIR__ ) . 'img/bottom.svg',
534
+ 'text' => __( 'bottom', 'wp-carousel-pro' ),
535
  ),
536
+ 'top' => array(
537
+ 'image' => plugin_dir_url( __DIR__ ) . 'img/top.svg',
538
+ 'text' => __( 'top', 'wp-carousel-pro' ),
539
  'pro_only' => true,
540
  ),
541
+ 'on_right' => array(
542
+ 'image' => plugin_dir_url( __DIR__ ) . 'img/right.svg',
543
+ 'text' => __( 'Right', 'wp-carousel-pro' ),
544
  'pro_only' => true,
545
  ),
546
+ 'on_left' => array(
547
+ 'image' => plugin_dir_url( __DIR__ ) . 'img/left.svg',
548
+ 'text' => __( 'left', 'wp-carousel-pro' ),
549
  'pro_only' => true,
550
  ),
551
  'with_overlay' => array(
552
+ 'image' => plugin_dir_url( __DIR__ ) . 'img/overlay.svg',
553
+ 'text' => __( 'Overlay', 'wp-carousel-pro' ),
554
  'pro_only' => true,
555
  ),
556
  ),
557
  'default' => 'bottom',
558
  'dependency' => array( 'wpcp_carousel_type', 'any', 'image-carousel,post-carousel,product-carousel', true ),
559
  ),
 
560
  array(
561
  'id' => 'wpcp_slide_border',
562
  'type' => 'border',
admin/views/option-config.php CHANGED
@@ -19,7 +19,7 @@ SP_WPCF::createOptions(
19
  'ajax_save' => true,
20
  'save_defaults' => true,
21
  'show_reset_all' => true,
22
- 'framework_title' => __( 'WordPress Carousel', 'wp-carousel-free' ),
23
  'framework_class' => 'sp-wpcp-options',
24
  'theme' => 'light',
25
  // menu extras.
@@ -115,5 +115,3 @@ SP_WPCF::createSection(
115
  ),
116
  )
117
  );
118
-
119
-
19
  'ajax_save' => true,
20
  'save_defaults' => true,
21
  'show_reset_all' => true,
22
+ 'framework_title' => __( 'Settings', 'wp-carousel-free' ),
23
  'framework_class' => 'sp-wpcp-options',
24
  'theme' => 'light',
25
  // menu extras.
115
  ),
116
  )
117
  );
 
 
admin/views/premium.php CHANGED
@@ -255,9 +255,9 @@ class WP_Carousel_Free_Upgrade {
255
  </div>
256
  <hr>
257
  <div class="sp-wpcp-join-community text-center">
258
- <h2>Join the <b>35000+</b> Happy Users Worldwide!</h2>
259
  <a class="wpcf-upgrade-btn" target="_blank" href="https://shapedplugin.com/plugin/wordpress-carousel-pro/">Get a license instantly</a>
260
- <p>Every purchase comes with <b>7-day</b> money back guarantee and access to our incredibly Top-notch Support with lightening-fast response time and 100% satisfaction rate. One-Time payment, lifetime automatic update.</p>
261
  </div>
262
  <br>
263
  <br>
255
  </div>
256
  <hr>
257
  <div class="sp-wpcp-join-community text-center">
258
+ <h2>Join the <b>45000+</b> Happy Users Worldwide!</h2>
259
  <a class="wpcf-upgrade-btn" target="_blank" href="https://shapedplugin.com/plugin/wordpress-carousel-pro/">Get a license instantly</a>
260
+ <p>Every purchase comes with <b>14-days</b> money back guarantee and access to our incredibly Top-notch Support with lightening-fast response time and 100% satisfaction rate.</p>
261
  </div>
262
  <br>
263
  <br>
admin/views/wpcfree-metabox/assets/css/spf.css CHANGED
@@ -115,12 +115,20 @@
115
  padding: 25px;
116
  }
117
 
 
 
 
 
 
 
 
118
  .spf-header-inner h1 {
119
  float: left;
120
- font-size: 1.5em;
121
- line-height: 26px;
122
- font-weight: 400;
123
  margin: 0;
 
124
  }
125
 
126
  .spf-header-inner h1 small {
@@ -145,7 +153,12 @@
145
  * 01. 03. Header Buttons
146
  */
147
 
148
- .spf-buttons {
 
 
 
 
 
149
  float: right;
150
  -moz-transition: opacity 0.2s;
151
  -o-transition: opacity 0.2s;
@@ -153,55 +166,60 @@
153
  transition: opacity 0.2s;
154
  }
155
 
 
156
  .spf-buttons .button {
157
- margin: 0 2px;
158
- line-height: 26px;
 
 
 
 
 
 
159
  }
160
 
161
- .spf-buttons .button.spf-save,
162
- .spf-buttons .button.spf-reset-section,
163
- .spf-buttons .button.spf-reset-all {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
  text-shadow: none;
165
- border: 0;
166
- border-radius: 0;
167
- padding: 3px 15px;
168
- height: auto;
169
- color: #fff;
170
  }
171
-
172
- .spf-buttons .button.spf-save {
173
- box-shadow: 0 3px 0 #169ca5;
174
- background-color: #18AFB9;
175
  }
176
 
177
- .spf-buttons .button.spf-save:hover {
178
- box-shadow: 0 3px 0 #08696f;
179
- background-color: #108e96;
180
- }
181
  .spf-buttons .button.spf-reset-section {
182
- color: #fff;
183
- -webkit-box-shadow: 0 3px 0 #666;
184
- box-shadow: 0 3px 0 #666;
185
- background-color: #888;
186
  }
187
-
188
  .spf-buttons .button.spf-reset-section:hover {
189
- -webkit-box-shadow: 0 3px 0 #383737;
190
- box-shadow: 0 3px 0 #383737;
191
- background-color: #6b6969;
192
  }
193
-
194
- .spf-buttons .button.spf-reset-all {
195
- color: #fff;
196
- -webkit-box-shadow: 0 3px 0 #c61004;
197
- box-shadow: 0 3px 0 #c61004;
198
- background-color: #e14d43;
199
  }
200
-
201
- .spf-buttons .button.spf-reset-all:hover {
202
- -webkit-box-shadow: 0 3px 0 #a0150c;
203
- box-shadow: 0 3px 0 #a0150c;
204
- background-color: #d43328;
205
  }
206
 
207
  .spf-header-left {
@@ -212,6 +230,7 @@
212
  float: right;
213
  }
214
 
 
215
  /**
216
  * 01. 04. Navigation
217
  */
@@ -1699,17 +1718,16 @@ WP Carousel Pro Custom CSS.
1699
  * 03. 16. Field: image_select
1700
  */
1701
 
1702
- /* Carousel Type */
1703
 
1704
- .spf-field-image_select .spf--image,
1705
- .spf-field-carousel_type .spf--image {
1706
  cursor: pointer;
1707
  position: relative;
1708
  display: inline-block;
1709
  max-width: 100%;
1710
- margin: 0 5px 5px 0;
1711
  vertical-align: bottom;
1712
- border: 2px solid transparent;
1713
  background-color: #fff;
1714
  user-select: none;
1715
  -webkit-user-select: none;
@@ -1717,8 +1735,10 @@ WP Carousel Pro Custom CSS.
1717
  -o-transition: all 0.2s;
1718
  -webkit-transition: all 0.2s;
1719
  transition: all 0.2s;
 
1720
  }
1721
 
 
1722
  .spf-field-image_select .spf--image:before {
1723
  position: absolute;
1724
  top: 0;
@@ -1732,20 +1752,71 @@ WP Carousel Pro Custom CSS.
1732
  line-height: 15px;
1733
  opacity: 0;
1734
  color: #fff;
1735
- background-color: #222;
1736
  transition: opacity .2s;
1737
  }
1738
 
1739
- .spf-field-image_select .spf--active {
1740
- border-color: #1EA4B0;
1741
- box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
1742
  }
1743
 
1744
- .spf-field-image_select img {
1745
- vertical-align: top;
 
1746
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1747
 
1748
- .spf-field-image_select input,
1749
  .spf-field-carousel_type input {
1750
  display: none;
1751
  }
@@ -4725,7 +4796,7 @@ WP Carousel Pro Custom CSS.
4725
  }
4726
 
4727
  /**
4728
- *
4729
  *Custom Style for the WPCP
4730
  *
4731
  **/
@@ -4867,4 +4938,34 @@ WP Carousel Pro Custom CSS.
4867
  .spf-field-shortcode.wpcp-admin-footer .wpcp-scode-wrap {
4868
  width: 100%;
4869
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4870
  }
115
  padding: 25px;
116
  }
117
 
118
+ .spf-header-inner h1 svg {
119
+ float: left;
120
+ height: 26px;
121
+ width: 28px;
122
+ margin-right: 8px;
123
+ padding-top: 6px;
124
+ }
125
  .spf-header-inner h1 {
126
  float: left;
127
+ font-size: 18px;
128
+ line-height: 38px;
129
+ font-weight: 600;
130
  margin: 0;
131
+ vertical-align: middle;
132
  }
133
 
134
  .spf-header-inner h1 small {
153
  * 01. 03. Header Buttons
154
  */
155
 
156
+
157
+ /**
158
+ * 01. 03. Header Buttons
159
+ */
160
+
161
+ .spf-buttons {
162
  float: right;
163
  -moz-transition: opacity 0.2s;
164
  -o-transition: opacity 0.2s;
166
  transition: opacity 0.2s;
167
  }
168
 
169
+
170
  .spf-buttons .button {
171
+ margin: 0 4px;
172
+ padding: 0px 16px;
173
+ border-radius: 0;
174
+ height: 38px;
175
+ font-size: 13px;
176
+ font-weight: 500;
177
+ text-transform: uppercase;
178
+ color: #ffffff;
179
  }
180
 
181
+ .spf-buttons .button.spf-reset-all,
182
+ .spf-buttons .button.spf-reset-section {
183
+ background-color: #cd3c3c !important;
184
+ border-color: transparent !important;
185
+ -webkit-box-shadow: none !important;
186
+ box-shadow: none !important;
187
+ text-shadow: none !important;
188
+ border-radius: 4px;
189
+ height: 38px;
190
+ -webkit-transition: background-color .2s;
191
+ transition: background-color .2s;
192
+ color: #fff !important;
193
+ }
194
+ .spf-buttons .button.spf-save-ajax {
195
+ background-color: #02cc7b;
196
+ border-color: transparent;
197
+ color: #fff !important;
198
+ -webkit-box-shadow: none;
199
+ box-shadow: none;
200
  text-shadow: none;
201
+ border-radius: 4px;
202
+ height: 38px;
203
+ width: 75px;
204
+ -webkit-transition: background-color .2s;
205
+ transition: background-color .2s;
206
  }
207
+ .spf-buttons .button.spf-save-ajax:hover {
208
+ background-color: #02bb71;
 
 
209
  }
210
 
 
 
 
 
211
  .spf-buttons .button.spf-reset-section {
212
+ background-color: #77777c !important;
 
 
 
213
  }
 
214
  .spf-buttons .button.spf-reset-section:hover {
215
+ background-color: #616169 !important;
 
 
216
  }
217
+ .spf-buttons .button.spf-reset-all:hover{
218
+ background-color: #b82f2f !important;
 
 
 
 
219
  }
220
+ .spf-buttons .button:focus {
221
+ outline: none !important;
222
+ box-shadow: none !important;
 
 
223
  }
224
 
225
  .spf-header-left {
230
  float: right;
231
  }
232
 
233
+
234
  /**
235
  * 01. 04. Navigation
236
  */
1718
  * 03. 16. Field: image_select
1719
  */
1720
 
 
1721
 
1722
+
1723
+ .spf-field-image_select .spf--image{
1724
  cursor: pointer;
1725
  position: relative;
1726
  display: inline-block;
1727
  max-width: 100%;
1728
+ margin: 0 15px 5px 0;
1729
  vertical-align: bottom;
1730
+ outline: 2px solid transparent;
1731
  background-color: #fff;
1732
  user-select: none;
1733
  -webkit-user-select: none;
1735
  -o-transition: all 0.2s;
1736
  -webkit-transition: all 0.2s;
1737
  transition: all 0.2s;
1738
+ outline-offset: -2px;
1739
  }
1740
 
1741
+
1742
  .spf-field-image_select .spf--image:before {
1743
  position: absolute;
1744
  top: 0;
1752
  line-height: 15px;
1753
  opacity: 0;
1754
  color: #fff;
1755
+ background-color:#1EA4B0;
1756
  transition: opacity .2s;
1757
  }
1758
 
1759
+ .spf-field-image_select .spf--image.spf--active:before {
1760
+ opacity: 1;
 
1761
  }
1762
 
1763
+ .spf-field-image_select .spf--active img {
1764
+ outline-color: #1EA4B0;
1765
+
1766
  }
1767
+ .spf-field-image_select input {
1768
+ display: none;
1769
+ }
1770
+
1771
+ .spf-field-image_select .spf--image img {
1772
+ color: #7b8898;
1773
+ outline: solid 3px transparent;
1774
+ border-radius: 2px;
1775
+ cursor: pointer;
1776
+ text-align: center;
1777
+ width: 80px;
1778
+ outline-offset: -3px;
1779
+ }
1780
+
1781
+ .spf-field-image_select .spf--image img {
1782
+ max-width: 100%;
1783
+ }
1784
+
1785
+ .spf-field-image_select span {
1786
+ margin-top: 5px;
1787
+ font-weight: 500;
1788
+ text-align: center;
1789
+ margin-right: 10px;
1790
+ display: block;
1791
+ font-size: 12px;
1792
+ text-transform: capitalize;
1793
+
1794
+ }
1795
+
1796
+ .spf-field-image_select .spf--image.spf--active img {
1797
+ outline-color: #1EA4B0;
1798
+ }
1799
+
1800
+ /* Carousel Type */
1801
+
1802
+ .spf-field-carousel_type .spf--image {
1803
+ cursor: pointer;
1804
+ position: relative;
1805
+ display: inline-block;
1806
+ max-width: 100%;
1807
+ margin: 0 5px 5px 0;
1808
+ vertical-align: bottom;
1809
+ border: 2px solid transparent;
1810
+ background-color: #fff;
1811
+ user-select: none;
1812
+ -webkit-user-select: none;
1813
+ -moz-transition: all 0.2s;
1814
+ -o-transition: all 0.2s;
1815
+ -webkit-transition: all 0.2s;
1816
+ transition: all 0.2s;
1817
+ }
1818
+
1819
 
 
1820
  .spf-field-carousel_type input {
1821
  display: none;
1822
  }
4796
  }
4797
 
4798
  /**
4799
+ *
4800
  *Custom Style for the WPCP
4801
  *
4802
  **/
4938
  .spf-field-shortcode.wpcp-admin-footer .wpcp-scode-wrap {
4939
  width: 100%;
4940
  }
4941
+ }
4942
+
4943
+ /* Pro only field css */
4944
+ .spf-field-image_select .spf--image.spf-pro-only,
4945
+ .spf-field-button_set .spf--button.spf-pro-only {
4946
+ color: rgba(85, 85, 85, 0.6) !important;
4947
+ background-color: rgba(247, 247, 247, 0.4) !important;
4948
+ pointer-events: none;
4949
+ }
4950
+ .spf-field-button_set .spf--button.spf-pro-only:after,
4951
+ .spf-field-image_select .spf--image.spf-pro-only:after {
4952
+ position: absolute;
4953
+ top: 0;
4954
+ right: 0;
4955
+ color: #a5a5a5;
4956
+ background-color: #e0e0e0;
4957
+ font-weight: 500;
4958
+ padding: 0 4px;
4959
+ content: "PRO";
4960
+ text-align: center;
4961
+ font-size: 8px;
4962
+ line-height: 11px;
4963
+ opacity: 1;
4964
+ }
4965
+ #spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header img {
4966
+ max-width: 200px;
4967
+ }
4968
+ /* hide setting page wraper title */
4969
+ .sp_wp_carousel_page_wpcp_settings .wrap h1 {
4970
+ display: none;
4971
  }
admin/views/wpcfree-metabox/assets/css/spf.min.css CHANGED
@@ -1 +1 @@
1
- .spf{position:relative}.spf label{padding:0;margin:0;display:inline-block}.spf-ab-icon{top:2px}#screen-meta-links+.spf-options{margin-top:40px}.spf-options{margin-top:20px;margin-right:20px}.spf-header{position:relative}.spf-header-inner{padding:25px}.spf-header-inner h1{float:left;font-size:1.5em;line-height:26px;font-weight:400;margin:0}.spf-header-inner h1 small{font-size:11px;font-weight:500}.spf-sticky .spf-header-inner{position:fixed;z-index:20;top:32px;-moz-box-shadow:0 5px 25px rgba(0,0,0,.125);-webkit-box-shadow:0 5px 25px rgba(0,0,0,.125);box-shadow:0 5px 25px rgba(0,0,0,.125)}.spf-buttons{float:right;-moz-transition:opacity .2s;-o-transition:opacity .2s;-webkit-transition:opacity .2s;transition:opacity .2s}.spf-buttons .button{margin:0 2px;line-height:26px}.spf-buttons .button.spf-reset-all,.spf-buttons .button.spf-reset-section,.spf-buttons .button.spf-save{text-shadow:none;border:0;border-radius:0;padding:3px 15px;height:auto;color:#fff}.spf-buttons .button.spf-save{box-shadow:0 3px 0 #169ca5;background-color:#18afb9}.spf-buttons .button.spf-save:hover{box-shadow:0 3px 0 #08696f;background-color:#108e96}.spf-buttons .button.spf-reset-section{color:#fff;-webkit-box-shadow:0 3px 0 #666;box-shadow:0 3px 0 #666;background-color:#888}.spf-buttons .button.spf-reset-section:hover{-webkit-box-shadow:0 3px 0 #383737;box-shadow:0 3px 0 #383737;background-color:#6b6969}.spf-buttons .button.spf-reset-all{color:#fff;-webkit-box-shadow:0 3px 0 #c61004;box-shadow:0 3px 0 #c61004;background-color:#e14d43}.spf-buttons .button.spf-reset-all:hover{-webkit-box-shadow:0 3px 0 #a0150c;box-shadow:0 3px 0 #a0150c;background-color:#d43328}.spf-header-left{float:left}.spf-header-right{float:right}.spf-nav{display:block;width:auto}.spf-nav ul{clear:left;margin:0;list-style-type:none}.spf-nav ul li{margin-bottom:0}.spf-nav ul li a{font-size:13px;position:relative;display:block;padding:14px 12px;text-decoration:none;-moz-transition:none;-o-transition:none;-webkit-transition:none;transition:none}#spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header .support a,.spf-nav ul li a:focus{outline:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.spf-nav ul li .spf-section-active:after{content:" ";position:absolute;right:0;top:50%;height:0;width:0;pointer-events:none;border:solid transparent;border-right-color:#fff;border-width:4px;margin-top:-4px}.spf-nav ul li .spf-arrow:after{content:"\f054";display:inline-block;font-family:FontAwesome;font-size:9px;line-height:1;position:absolute;right:10px;top:50%;margin-top:-4px;-moz-transform:rotate(0);-ms-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}.spf-nav ul li.spf-tab-active .spf-arrow:after{-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-webkit-transform:rotate(90deg);transform:rotate(90deg)}.spf-nav ul li.spf-tab-active ul{display:block}.spf-nav ul ul{display:none;position:relative}.spf-nav ul ul li a{font-size:12px;padding:12px 14px 12px 24px}.spf-nav .fa{width:20px;margin-right:5px;font-size:14px;text-align:center}.spf-nav .spf-label-error{margin-left:4px;vertical-align:top}.spf-wrapper{position:relative}.spf-content{background-color:#fff;-moz-transition:opacity .2s;-o-transition:opacity .2s;-webkit-transition:opacity .2s;transition:opacity .2s}.spf-sections{float:left;width:100%}.spf-section{display:none}.spf-section-title{display:none;padding:20px 30px;background-color:#18afb9;border-top:1px solid #eee;border-bottom:1px solid #eee}.spf-section-title h3{margin:0;padding:0;font-size:13px;font-weight:700;text-transform:uppercase;color:#fff}.spf-section-title .fa{margin-right:5px}.sp-wpcp-options .spf-nav{width:225px}.sp-wpcp-options .spf-nav{display:block;position:relative;z-index:10;float:left;width:225px}#sp_wpcp_shortcode_options .spf-nav ul li{display:inline-block}.sp-wpcp-options .spf-nav-background{position:absolute;top:0;left:0;bottom:0;z-index:9;width:225px}.sp-wpcp-options .spf-content{position:relative;margin-left:225px;background-color:#fff;-moz-transition:opacity .2s;-o-transition:opacity .2s;-webkit-transition:opacity .2s;transition:opacity .2s}.spf-footer{padding:20px;font-size:11px}.spf-copyright{float:left;margin-top:5px}.spf-search-all .spf-nav,.spf-search-all .spf-nav-background,.spf-show-all .spf-nav,.spf-show-all .spf-nav-background{display:none}.spf-search-all .spf-content,.spf-show-all .spf-content{margin-left:0}.spf-search-all .spf-section,.spf-search-all .spf-section-title,.spf-show-all .spf-section,.spf-show-all .spf-section-title{display:block!important}.spf-search-all .spf-section-title{display:none!important}.spf-expand-all{float:left;padding:0 8px;margin-right:4px;z-index:1;font-size:14px;line-height:29px;cursor:pointer;-webkit-user-select:none;user-select:none;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-transition:all .2s;-o-transition:all .2s;-webkit-transition:all .2s;transition:all .2s}.spf-expand-all span{font-size:11px;vertical-align:middle}.spf-search{float:left}.spf-search input{margin:0 2px 0 0;border:none;font-size:12px;line-height:29px;text-align:inherit;padding:0 10px;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.spf-search input:focus{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.spf-saving .spf-buttons,.spf-saving .spf-content{cursor:default;pointer-events:none;opacity:.75}.spf-metabox{margin:-6px -12px -12px -12px}.spf-metabox .spf-section-title{padding:20px}.block-editor-page .spf-metabox{margin:-6px -14px -12px -14px}.spf-metabox-restore{text-align:right;padding:10px;border-top:1px solid #eee}.spf-metabox-restore .spf-button-cancel,.spf-metabox-restore input{display:none}.spf-metabox-restore span{-webkit-user-select:none;user-select:none}.spf-metabox-restore input:checked~.spf-button-restore{display:none}.spf-metabox-restore input:checked~.spf-button-cancel{display:inline-block}#side-sortables .spf-section-title{padding:12px}#side-sortables .spf-field{padding:12px}#side-sortables .spf-field .spf-title{float:none;width:100%;margin-bottom:10px}#side-sortables .spf-field .spf-fieldset{margin-left:0}#side-sortables .spf-notice{padding:12px}.spf-tooltip{position:absolute;z-index:5000001;font-size:12px;line-height:1.4;text-align:center;text-decoration:none;padding:6px 12px;max-width:200px;color:#fff;background-color:#000;background-color:rgba(0,0,0,.85);-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}.spf-theme-dark .spf-header-inner{background-color:#050505}.spf-theme-dark .spf-header-inner h1{color:#fff}.spf-theme-dark .spf-header-inner h1 small{color:#555}.spf-theme-dark .spf-expand-all{color:#999;background-color:#222}.spf-theme-dark .spf-expand-all:hover{color:#fff;background-color:#333}.spf-theme-dark .spf-search input{color:#fff;background-color:#222}.spf-theme-dark .spf-search:focus{background-color:#444}.spf-theme-dark .spf-search::-webkit-input-placeholder{color:#666}.spf-theme-dark .spf-nav ul li a{color:#999;background-color:#222;border-bottom:1px solid #2f2f2f}.spf-theme-dark .spf-nav ul li a:hover{color:#fff}.spf-theme-dark .spf-nav ul li .spf-section-active{color:#fff;background-color:#111}.spf-theme-dark .spf-nav ul ul li a{background-color:#191919;border-bottom:1px solid #2f2f2f}.spf-theme-dark .spf-nav ul ul li .spf-section-active{background-color:#101010}.spf-theme-dark .spf-nav ul ul:before{background-color:rgba(34,34,34,.75)}.spf-theme-dark .spf-nav>ul>li:last-child>a{border-bottom:none}.spf-theme-dark .spf-nav-background{background-color:#222}.spf-theme-dark .spf-footer{color:#555;background-color:#050505}.spf-theme-light .spf-container{border:1px solid #e5e5e5;-moz-box-shadow:0 0 15px rgba(0,0,0,.04);-webkit-box-shadow:0 0 15px rgba(0,0,0,.04);box-shadow:0 0 15px rgba(0,0,0,.04)}.spf-theme-light .spf-header-inner{border-bottom:1px solid #cecece;background-color:#f5f5f5;background:linear-gradient(#fefefe,#f5f5f5)}.spf-theme-light .spf-header-inner h1 small{color:#999}.spf-theme-light .spf-expand-all{color:#999;background-color:#fff;-moz-box-shadow:0 1px 1px rgba(0,0,0,.05);-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.spf-theme-light .spf-expand-all:hover{color:#555}.spf-theme-light .spf-search input{color:#555;background-color:#fff;-moz-box-shadow:0 1px 1px rgba(0,0,0,.05);-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.spf-theme-light .spf-search input::-webkit-input-placeholder{color:#bbb}.spf-theme-light .spf-nav{background:#f1f1f1}.spf-theme-light .spf-nav ul li a{background-color:#18afb9;border-top:1px solid #18afb9;border-right:0 solid #e2e2e1;border-bottom:1px solid #ddd;color:#fff;font-size:12px;font-weight:600;line-height:1.4;padding:14px 15px;text-transform:uppercase}.sp_wpcp_shortcode_generator .spf-nav ul li a{border-right:1px solid #e2e2e1}.spf-theme-light .spf-nav ul li .spf-section-active{background-color:#fff;color:#000}#sp_wpcp_shortcode_options .spf-theme-light .spf-nav ul li .spf-section-active{border-bottom:1px solid #fff;border-top:1px solid #18afb9;box-shadow:0 3px 0 0 #18afb9 inset}.sp-wpcp-options.spf-theme-light .spf-nav ul li a{background:#efefef;color:#000;border-bottom:1px solid #cecece;border-top:1px solid #cecece}.sp-wpcp-options.spf-theme-light .spf-nav ul li a:first-child{border-top:0 solid transparent}#sp_wpcp_shortcode_options .spf-theme-light .spf-nav ul li .spf-section-active i,.sp-wpcp-options.spf-theme-light .spf-nav ul li .spf-section-active i{color:#18afb9}.sp-wpcp-options.spf-theme-light .spf-nav ul li .spf-section-active{background-color:#fff;border-right:0 solid #fff;border-bottom:1px solid #cecece;border-top:1px solid #fff;box-shadow:4px 0 0 0 #18afb9 inset}.spf-theme-light .spf-nav ul li .spf-section-active:after{display:none}.spf-theme-light .spf-nav ul ul li a{background-color:#eee;border-bottom:1px solid #e5e5e5}.spf-theme-light .spf-nav-background{background-color:#ddd;border-right:1px solid #cecece}.spf-theme-light .spf-footer{color:#555;border-top:1px solid #e5e5e5;background-color:#f5f5f5;background:linear-gradient(#fafafa,#f5f5f5)}.spf-field{position:relative;padding:22px 30px}.spf-field.spf-field-carousel_type{padding-bottom:0}.spf-field p:first-child{margin-top:0}.spf-field p:last-child{margin-bottom:0}.spf-field:after,.spf-field:before{content:" ";display:table}.spf-field:after{clear:both}.spf-field h4{margin-top:0}.spf-field .spf-title{position:relative;width:20%;float:left}.spf-field .spf-title h4{margin:0;color:#23282d}.spf-field .spf-fieldset{margin-left:25%}.spf-pseudo-field{padding:0 5px 0 0!important;display:inline-block}.spf-pseudo-field+.spf-pseudo-field{border:0}.spf-pseudo-field pre{display:none}.spf-field-accordion .spf-field{padding:20px}.spf-field-accordion .spf-accordion-item{position:relative;margin-bottom:5px}.spf-field-accordion .spf-accordion-item h4{font-size:1em}.spf-field-accordion .spf-accordion-title{display:block;cursor:pointer;position:relative;margin:0;padding:15px;min-height:0;font-size:100%;-webkit-user-select:none;user-select:none;border:1px solid #e5e5e5;background-color:#fafafa;-moz-transition:border-color .15s;-o-transition:border-color .15s;-webkit-transition:border-color .15s;transition:border-color .15s}.spf-field-accordion .spf-accordion-title:active,.spf-field-accordion .spf-accordion-title:focus,.spf-field-accordion .spf-accordion-title:hover{border:1px solid #bbb;background-color:#fafafa;outline:0}.spf-field-accordion .spf-accordion-icon{color:#aaa;width:14px;text-align:center}.spf-field-accordion .spf--icon{width:18px;text-shadow:center}.spf-field-accordion .spf-accordion-content{display:none;padding:0;border:1px solid #e5e5e5;border-top:none;background-color:#fff}.spf-field-accordion .spf-accordion-open{display:block}.spf-field-background select,.spf-field-background_adv select{width:100%}.spf-field-background .spf-field,.spf-field-background_adv .spf-field,.spf-field-group .spf-field-background_adv .spf-field{float:left;padding:0;border:0}.spf-field-background .spf--block,.spf-field-background_adv .spf--block{float:left;margin-bottom:15px;box-sizing:border-box}.spf-field-background .spf--title,.spf-field-background_adv .spf--title{float:left;color:#999;margin-top:3px;margin-right:5px}.spf-field-background .spf--select,.spf-field-background_adv .spf--select{width:25%;padding-right:10px;box-sizing:border-box}.spf-field-background .spf--select .spf-field,.spf-field-background_adv .spf--select .spf-field{width:100%}.spf-field-background .spf--media,.spf-field-background_adv .spf--media{width:100%;padding-right:10px}.spf-field-background .spf--media .spf-field,.spf-field-background_adv .spf--media .spf-field{width:100%}.spf-field.spf-field-background_adv.wpcp_carousel_content_bg .spf-fieldset,.spf-field.spf-field-wp_editor.wpcp_carousel_content_source .spf-fieldset{margin-left:0;margin-top:35px}.spf-field.spf-field-background_adv.wpcp_carousel_content_bg .spf-title,.spf-field.spf-field-wp_editor.wpcp_carousel_content_source .spf-title{width:100%}.spf-field.spf-field-background_adv .spf--preview{font-size:16px;line-height:20px;padding:20px;color:#222;border:1px solid #eee;background-color:#fff;height:150px;border-radius:2.5px;user-select:none;-webkit-user-select:none;transition:background-color .2s,border-color .2s}.spf-field.spf-field-background_adv .spf--block-preview{cursor:pointer;position:relative;overflow:hidden;margin-top:10px;width:100%}.spf-field.spf-field-background_adv .spf--black-background{border-color:#000;background-color:#000}.spf-field.spf-field-background_adv .spf--toggle{position:absolute;top:5px;right:10px;color:#999}.spf-field-backup textarea{width:100%;min-height:200px;margin-bottom:5px}.spf-field-backup small{display:inline-block;margin:5px}.spf-field-backup hr{margin:20px 0;border:none;border-bottom:1px solid #e5e5e5}.spf-field-border .spf--left,.spf-field-column .spf--left,.spf-field-dimensions .spf--left,.spf-field-dimensions_advanced .spf--left,.spf-field-spacing .spf--left{float:left}.spf-field-border .spf--input,.spf-field-column .spf--input,.spf-field-dimensions .spf--input,.spf-field-dimensions_advanced .spf--input,.spf-field-spacing .spf--input{float:left;margin-right:10px;margin-bottom:7px}.spf-field-border .spf--input select,.spf-field-column .spf--input select,.spf-field-dimensions .spf--input select,.spf-field-dimensions_advanced .spf--input select,.spf-field-spacing .spf--input select{margin:0;line-height:22px}.spf-field-border .spf--input input,.spf-field-column .spf--input input,.spf-field-dimensions .spf--input input,.spf-field-dimensions_advanced .spf--input input,.spf-field-spacing .spf--input input{line-height:26px;float:left;margin:0;padding:0;width:65px;max-width:100%;text-align:center}.spf-field-column .spf--input input{border-radius:0 4px 4px 0}.spf-field-spacing .spf--input input{border-radius:4px 0 0 4px}.spf-field-border .spf--input input{border-radius:0}.spf-field-border .spf--label,.spf-field-column .spf--label,.spf-field-dimensions .spf--label,.spf-field-dimensions_advanced .spf--label,.spf-field-spacing .spf--label{float:left;max-width:100%;font-size:12px;line-height:26px;vertical-align:top;text-align:center;color:#555;border:1px solid #ddd;background-color:#eee;padding:0 6px}.spf-field-border .spf--label-icon,.spf-field-column .spf--label-icon,.spf-field-dimensions .spf--label-icon,.spf-field-dimensions_advanced .spf--label-icon,.spf-field-spacing .spf--label-icon{min-width:20px;border-right:0;border-radius:4px 0 0 4px;min-height:28px;line-height:28px}.spf-field-border .spf--label-unit,.spf-field-column .spf--label-unit,.spf-field-dimensions .spf--label-unit,.spf-field-dimensions_advanced .spf--label-unit,.spf-field-spacing .spf--label-unit{color:#999;border-left:0;border-radius:0 4px 4px 0;min-height:28px}.spf-field-button_set .spf--buttons{display:inline-block}.spf-field-button_set .spf--button{position:relative;z-index:1;float:left;cursor:pointer;padding:7px 14px;min-width:40px;text-align:center;color:#555;border:1px solid #ccc;background-color:#f7f7f7;user-select:none;-webkit-user-select:none;box-shadow:0 1px 0 rgba(0,0,0,.1)}.spf-field-button_set .spf--button:first-child{border-radius:4px 0 0 4px}.spf-field-button_set .spf--button:last-child{border-radius:0 4px 4px 0}.spf-field-button_set .spf--button:not(:first-child){margin-left:-1px}.spf-field-button_set .spf--button:hover{background-color:#eee}.spf-field-button_set .spf--active,.spf-field-button_set .spf--active:hover{z-index:2;color:#fff;border-color:#006799;background-color:#0085ba}.spf-field-button_set input{display:none}.spf-field-checkbox ul,.spf-field-radio ul{margin:0;padding:0;list-style-type:none;overflow-y:auto;max-height:305px}.spf-field-checkbox .spf--inline-list li,.spf-field-radio .spf--inline-list li{display:inline-block;margin-right:15px}.spf-field-checkbox input[type=radio]:checked:before,.spf-field-radio input[type=radio]:checked:before{line-height:10px}.spf-field-checkbox .spf-checker,.spf-field-radio .spf-checker{cursor:pointer}.spf-field-code_editor .CodeMirror{width:100%;height:400px;border:1px solid #eee}.spf-field-code_editor textarea{width:100%;height:400px}.spf-field-color>input{opacity:.75;width:115px;max-width:100%}.spf-field-color_group .spf--left{float:left;margin-right:10px;margin-bottom:5px}.spf-field-color_group .spf--title{color:#999;margin-bottom:5px}.spf-field-fieldset .spf-fieldset-content{border:1px solid #eee;background-color:#fff}.spf-field-fieldset .spf-field{padding:20px}.spf-field-date .spf--to{margin-left:7px}.spf-datepicker-wrapper{margin-top:5px;width:auto;background-color:#fff;z-index:9999999!important;-moz-box-shadow:0 0 30px rgba(0,0,0,.15);-webkit-box-shadow:0 0 30px rgba(0,0,0,.15);box-shadow:0 0 30px rgba(0,0,0,.15)}.spf-datepicker-wrapper *{float:none;margin:0;padding:0;font-family:inherit;font-weight:400;font-style:normal;text-decoration:none;border:none;background:0 0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;-moz-border-radius:none;-webkit-border-radius:none;border-radius:none}.spf-datepicker-wrapper .ui-datepicker-header,.spf-datepicker-wrapper .ui-widget-header{color:#fff;background:#00a0d2}.spf-datepicker-wrapper .ui-datepicker-header .ui-state-hover{cursor:pointer}.spf-datepicker-wrapper .ui-datepicker-title{font-size:14px;line-height:40px;text-align:center}.spf-datepicker-wrapper .ui-datepicker-next,.spf-datepicker-wrapper .ui-datepicker-prev{position:static;top:auto;left:auto;right:auto;font-family:FontAwesome;font-size:12px;text-align:center;width:41px;height:40px;line-height:40px;color:#fff;background-color:rgba(255,255,255,.1);text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.spf-datepicker-wrapper .ui-datepicker-next span,.spf-datepicker-wrapper .ui-datepicker-prev span{display:none}.spf-datepicker-wrapper .ui-datepicker-prev{float:left}.spf-datepicker-wrapper .ui-datepicker-next{float:right}.spf-datepicker-wrapper .ui-datepicker-prev:before{content:'\f053'}.spf-datepicker-wrapper .ui-datepicker-next:before{content:'\f054'}.spf-datepicker-wrapper .ui-datepicker-next-hover,.spf-datepicker-wrapper .ui-datepicker-prev-hover{opacity:.75}.spf-datepicker-wrapper tbody .ui-datepicker-week-col{background-color:#f7f7f7}.spf-datepicker-wrapper .ui-datepicker-buttonpane{padding:10px;text-align:center;background-color:#f7f7f7}.spf-datepicker-wrapper .ui-datepicker-buttonpane button{cursor:pointer;margin:0 5px;padding:7px 14px;border:1px solid #eee;background-color:#fff}.spf-datepicker-wrapper select{margin:0 4px;color:#fff;border:1px solid rgba(255,255,255,.5)}.spf-datepicker-wrapper select option{color:#555}.spf-datepicker-wrapper table{font-size:13px;border-collapse:collapse;width:100%}.spf-datepicker-wrapper thead{color:#fff;background:#32373c}.spf-datepicker-wrapper th{text-align:center;padding:7px;border:1px solid #444}.spf-datepicker-wrapper td{text-align:center;border:1px solid #f4f4f4}.spf-datepicker-wrapper td.ui-datepicker-other-month{border:transparent}.spf-datepicker-wrapper td .ui-state-default{color:#555;width:auto;display:block;padding:6px 12px}.spf-datepicker-wrapper td .ui-state-active,.spf-datepicker-wrapper td .ui-state-hover{color:#fff;background-color:#0073aa}.spf-datepicker-wrapper td.ui-state-disabled .ui-state-default{opacity:.5}.spf-field-gallery input{display:none}.spf-field-gallery ul{margin:0;padding:0;list-style-type:none}.spf-field-gallery ul.sp-gallery-images li{display:inline-block;position:relative;padding:4px;margin:0 5px 10px 0;border:1px solid #ccc;background-color:#f9f9f9;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:0 1px 0 rgba(0,0,0,.08);-webkit-box-shadow:0 1px 0 rgba(0,0,0,.08);box-shadow:0 1px 0 rgba(0,0,0,.08)}.spf-field-gallery ul.sp-gallery-images li img{max-height:100px;display:inline-block;vertical-align:middle}.spf-field-gallery .button,.spf-field-gallery .button:focus,.spf-field-gallery .button:hover{margin-right:5px;margin-bottom:5px;width:110px;height:110px;text-align:center;line-height:15px;color:#fff;border:none;border-radius:2px;display:flex;justify-content:center;flex-direction:column;font-weight:600}.spf-field-gallery .button-primary.spf-button{background:#4eb631;box-shadow:none;text-shadow:none}.spf-field-gallery .button.spf-edit-gallery{background:#6a7885}.spf-field-gallery .button i{font-size:24px;margin-bottom:10px}.spf-field-gallery a,.spf-field-gallery li{float:left}.spf-field-group .spf-field{padding:20px}.spf-field-group .spf-cloneable-hidden{display:none!important}.spf-field-group .spf-cloneable-wrapper{position:relative}.spf-field-group .spf-cloneable-item{display:none;position:relative;margin-bottom:5px}.spf-field-group .spf-cloneable-item h4{font-size:1em}.spf-field-group .ui-accordion .spf-cloneable-item{display:block}.spf-field-group .spf-cloneable-content{border:1px solid #e5e5e5;background:#fff}.spf-field-group .spf-cloneable-title{display:block;cursor:pointer;position:relative;margin:0;padding:15px 65px 15px 10px;min-height:0;font-size:100%;border:1px solid #e5e5e5;background:#fafafa;-webkit-user-select:none;user-select:none;-moz-transition:border-color .15s;-o-transition:border-color .15s;-webkit-transition:border-color .15s;transition:border-color .15s}.spf-field-group .spf-cloneable-title:active,.spf-field-group .spf-cloneable-title:focus,.spf-field-group .spf-cloneable-title:hover{border:1px solid #bbb;background:#fafafa;outline:0}.spf-field-group .spf-cloneable-helper{position:absolute;top:12px;right:10px;z-index:1;font-size:14px;line-height:1em}.spf-field-group .spf-cloneable-helper i{display:inline-block;cursor:pointer;padding:5px;color:#999}.spf-field-group .spf-cloneable-helper i:hover{color:#555}.spf-field-group .spf-cloneable-content{padding:0;border-top:0}.spf-field-group .spf-cloneable-title-number,.spf-field-group .spf-cloneable-title-prefix{margin-right:5px}.spf-field-group .spf-cloneable-alert{display:none;margin-bottom:5px;padding:10px 20px;color:#a94442;border:1px solid #ebccd1;background-color:#f2dede}.spf-field-group .widget-placeholder{margin-bottom:10px;border:1px dashed #f1c40f;background-color:#fffae4}.spf-field-group .spf-cloneable-header-icon{display:inline-block;text-align:center;font-size:14px;width:17px;color:#aaa;text-indent:0;vertical-align:text-top}.spf-field-group .spf-cloneable-placeholder{background-color:#ddd;margin-top:4px;width:100px;height:10px;font-size:10px;line-height:10px;display:inline-block;vertical-align:top;border-radius:2px}.spf-field-icon input{display:none}.spf-field-icon .button{margin-right:5px}.spf-field-icon .spf-icon-preview i{display:inline-block;font-size:14px;width:30px;height:26px;line-height:26px;margin-right:5px;text-align:center;vertical-align:top;color:#555;border:1px solid #ccc;background-color:#f7f7f7;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(0,0,0,.08);-webkit-box-shadow:0 1px 0 rgba(0,0,0,.08);box-shadow:0 1px 0 rgba(0,0,0,.08);-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.spf-field-carousel_type .spf--image,.spf-field-image_select .spf--image{cursor:pointer;position:relative;display:inline-block;max-width:100%;margin:0 5px 5px 0;vertical-align:bottom;border:2px solid transparent;background-color:#fff;user-select:none;-webkit-user-select:none;-moz-transition:all .2s;-o-transition:all .2s;-webkit-transition:all .2s;transition:all .2s}.spf-field-image_select .spf--image:before{position:absolute;top:0;left:0;text-align:center;font-size:11px;font-family:FontAwesome;content:"\f00c";width:15px;height:15px;line-height:15px;opacity:0;color:#fff;background-color:#222;transition:opacity .2s}.spf-field-image_select .spf--active{border-color:#1ea4b0;box-shadow:0 0 20px rgba(0,0,0,.2)}.spf-field-image_select img{vertical-align:top}.spf-field-carousel_type input,.spf-field-image_select input{display:none}.spf-field-carousel_type .spf--image{background:#e8ecef;color:#7b8898;margin-right:10px;border:solid 3px #e8ecef;border-radius:2px;cursor:pointer;text-align:center;width:120px;height:80px;box-shadow:inset 0 0 0 3px #fff}.spf-field-carousel_type i{font-size:30px;width:32px;height:30px;margin-top:15px}.spf-field-carousel_type p{margin-top:5px;font-weight:500}.spf-field-carousel_type .spf--image.spf--active{border-color:#1ea4b0}.spf-field-link_color .spf--left{float:left;margin-right:10px;margin-bottom:5px}.spf-field-link_color .spf--title{color:#999;margin-bottom:5px}.spf-field-media .spf--placeholder{margin-bottom:10px;display:flex}.spf-field-media .spf--placeholder input{width:100%}.spf-field-media .button{margin-left:7px}.spf-field-media .hidden+.button{margin-left:0}.spf-field-media .spf--preview{position:relative}.spf-field-media .spf--preview .fa-times{position:absolute;z-index:1;right:4px;top:4px;font-size:14px;width:22px;height:22px;line-height:22px;text-align:center;text-decoration:none;color:#fff;background-color:#d33;opacity:.8;transition:all .2s}.spf-field-media .spf--preview .fa-times:hover{opacity:1}.spf-field-media .spf--preview .fa-times:focus{box-shadow:none}.spf-field-palette .spf--palette{position:relative;display:inline-block;cursor:pointer;border:2px solid #ddd;margin-right:10px;margin-bottom:10px;user-select:none;-webkit-user-select:none;transition:all .2s}.spf-field-palette .spf--palette span{vertical-align:middle;display:inline-block;width:22px;height:60px;line-height:60px;overflow:hidden;text-indent:-999px}.spf-field-palette .spf--palette:before{position:absolute;top:0;left:0;text-align:center;font-size:11px;font-family:FontAwesome;content:"\f00c";width:15px;height:15px;line-height:15px;opacity:0;color:#fff;background-color:#222;transition:opacity .2s}.spf-field-palette .spf--active{border-color:#222;box-shadow:0 0 20px rgba(0,0,0,.2)}.spf-field-palette .spf--active:before{opacity:1}.spf-field-palette input{display:none}.spf-field-repeater .spf-field{padding:10px}.spf-field-repeater .spf-field-text input{width:100%}.spf-field-repeater .spf-repeater-hidden{display:none!important}.spf-field-repeater .spf-repeater-wrapper .spf-repeater-item{display:table;width:100%;margin-bottom:5px;border:1px solid #eee}.spf-field-repeater .spf-repeater-wrapper .spf-repeater-item h4{font-size:1em}.spf-field-repeater .spf-repeater-content{width:100%;display:table-cell;vertical-align:middle;background-color:#fff}.spf-field-repeater .spf-repeater-helper{width:100%;display:table-cell;vertical-align:middle;text-align:center;font-size:14px;line-height:1em;border-left:1px solid #eee;background-color:#f7f7f7}.spf-field-repeater .spf-repeater-helper i{display:inline-block;cursor:pointer;color:#999;padding:5px}.spf-field-repeater .spf-repeater-helper i:hover{color:#555}.spf-field-repeater .spf-repeater-helper-inner{width:75px}.spf-field-repeater .spf-repeater-alert{display:none;margin-bottom:5px;padding:10px 20px;color:#a94442;border:1px solid #ebccd1;background-color:#f2dede}.spf-field-repeater .widget-placeholder{height:50px;margin-bottom:3px;border:1px dashed #f1c40f;background-color:#fffae4}.spf-field-repeater .ui-sortable-helper{height:50px!important;overflow:hidden!important;border-color:#ccc!important;background-color:#eee!important;opacity:.5}.spf-field-repeater .ui-sortable-helper .spf-repeater-content,.spf-field-repeater .ui-sortable-helper .spf-repeater-helper{display:none}.spf-field-select select{max-width:100%}.spf-field-slider em{padding-left:5px;color:#aaa}.spf-field-slider input[type=text]{width:45px;margin-left:15px;text-align:center}.spf-field-slider .ui-slider{position:relative;width:100%;height:4px;border:none;background:#ddd;border-radius:2px}.spf-field-slider .ui-slider-range{height:4px;border:none;background:#222;border-radius:2px}.spf-field-slider .ui-slider-handle{position:absolute;width:18px;height:18px;top:-7px;margin-left:-8px;border:none;background:#222;border-radius:2px}.spf-field-slider .ui-slider-handle:hover,.spf-field-slider .ui-state-active{cursor:pointer;background:#444}.spf-field-sortable .spf-field{padding:10px}.spf-field-sortable .spf-field-text input{width:100%;max-width:100%}.spf-field-sortable .spf--sortable .spf--sortable-item{display:table;width:100%;margin-bottom:5px;border:1px solid #eee}.spf-field-sortable .spf--sortable .spf--sortable-item h4{font-size:1em}.spf-field-sortable .spf--sortable-content{width:100%;display:table-cell;vertical-align:middle;background-color:#fff}.spf-field-sortable .spf--sortable-helper{width:100%;display:table-cell;vertical-align:middle;text-align:center;font-size:14px;line-height:1em;border-left:1px solid #eee;background-color:#f7f7f7}.spf-field-sortable .spf--sortable-helper .fa{display:inline-block;cursor:pointer;width:50px;color:#555}.spf-field-sortable .spf--sortable-helper .fa:hover{opacity:.5}.spf-field-sortable .widget-placeholder{height:50px;margin-bottom:3px;border:1px dashed #f1c40f;background-color:#fffae4}.spf-field-sortable .ui-sortable-helper{height:50px!important;overflow:hidden!important;border-color:#ccc!important;background-color:#eee!important;opacity:.5}.spf-field-sortable .ui-sortable-helper .spf--sortable-content,.spf-field-sortable .ui-sortable-helper .spf--sortable-helper{display:none}.spf-field-sorter .ui-sortable-placeholder{height:20px;border:1px dashed #f1c40f;background-color:#fffae4}.spf-field-sorter .spf-modules{float:left;width:50%;box-sizing:border-box}.spf-field-sorter .spf-modules:first-child{padding-right:15px}.spf-field-sorter .spf-modules:last-child{padding-left:15px}.spf-field-sorter .spf-disabled,.spf-field-sorter .spf-enabled{padding:5px 15px;border:1px dashed #ddd;background-color:#fff}.spf-field-sorter .spf-disabled li{-moz-transition:opacity .15s;-o-transition:opacity .15s;-webkit-transition:opacity .15s;transition:opacity .15s;opacity:.5}.spf-field-sorter .spf-disabled .ui-sortable-helper{opacity:1}.spf-field-sorter .spf-sorter-title{font-size:13px;font-weight:600;padding:10px;text-align:center;border:1px dashed #ddd;border-bottom:none;background-color:#f8f8f8;text-transform:uppercase}.spf-field-sorter ul{list-style-type:none;margin:0;padding:0;min-height:62px}.spf-field-sorter ul li{margin:10px 0;padding:10px 15px;cursor:move;font-weight:700;text-align:center;border:1px solid #e5e5e5;background-color:#fafafa;-moz-transition:border-color .15s;-o-transition:border-color .15s;-webkit-transition:border-color .15s;transition:border-color .15s}.spf-field-sorter ul li:hover{border-color:#bbb}.spf-field-spinner .spf--spin{float:left}.spf-field-spinner .spf--unit{float:right;height:30px;line-height:26px;text-align:center;border-left:none;color:#999;border:1px solid #ddd;border-left:0;background-color:#eee;padding:0 6px;margin:0;box-sizing:border-box}.spf-field-spinner .ui-spinner-button{cursor:pointer;position:relative;overflow:hidden;margin:0;padding:0;width:30px;height:30px;line-height:30px;text-align:center;border:1px solid #ddd;color:#555;background-color:#eee;box-sizing:border-box}.spf-field-spinner .ui-spinner-button:hover{background-color:#e7e7e7}.spf-field-spinner .ui-spinner-button:active{background-color:#ddd}.spf-field-spinner .ui-spinner-button:before{font-family:FontAwesome;font-size:16px;line-height:16px}.spf-field-spinner .ui-spinner-down{float:left;border-right:0;border-radius:2px 0 0 2px}.spf-field-spinner .ui-spinner-down:before{content:"\f0d9"}.spf-field-spinner .ui-spinner-up{float:right;border-left:0;border-radius:0 2px 2px 0}.spf-field-spinner .ui-spinner-up:before{content:"\f0da"}.spf-field-spinner input{width:50px;text-align:center;margin:0;padding:0 8px;height:30px;line-height:30px;border:1px solid #ddd}.spf-field-spinner input:focus{outline:0}.spf-field-spinner .ui-button-text{display:none}.spf-field-switcher .spf--switcher,.spf-field-switcherf .spf--switcher{float:left;cursor:pointer;position:relative;width:60px;height:26px;padding:0;margin:0;overflow:hidden;border-radius:4px;background-color:#ed6f6f;user-select:none;-webkit-user-select:none}.spf-field-switcher .spf--ball,.spf-field-switcherf .spf--ball{position:absolute;top:4px;left:4px;width:24px;height:18px;background-color:#fff;border-radius:4px;transition:all .1s;box-shadow:1px 1px 1px rgba(0,0,0,.15)}.spf-field-switcher .spf--off,.spf-field-switcher .spf--on,.spf-field-switcherf .spf--off,.spf-field-switcherf .spf--on{position:absolute;top:0;left:0;right:0;font-size:11px;line-height:26px;font-weight:500;font-style:normal;text-align:center;text-transform:uppercase;color:#fff;padding-right:28px;opacity:0;transition:all .1s}.spf-field-switcher .spf--off,.spf-field-switcherf .spf--off{padding-right:0;padding-left:28px;opacity:1}.spf-field-switcher .spf--active{background:#4fb845}.spf-field-switcher .spf--active .spf--on,.spf-field-switcherf .spf--active .spf--on{opacity:1}.spf-field-switcher .spf--active .spf--off,.spf-field-switcherf .spf--active .spf--off{opacity:0}.spf-field-switcher .spf--active .spf--ball,.spf-field-switcherf .spf--active .spf--ball{left:100%;margin-left:-28px}.spf-field-switcher .spf--label,.spf-field-switcherf .spf--label{float:left;margin-top:4px;margin-left:8px;font-weight:400;color:#999}.spf-field-switcher input,.spf-field-switcherf input{display:none}.spf-field-tabbed .spf-tabbed-section{border:1px solid #eee;background:#fff}.spf-field-tabbed .spf-tabbed-nav .spf--icon{padding-right:5px}.spf-field-tabbed .spf-tabbed-nav a{display:inline-block;padding:12px 15px;margin-top:1px;margin-right:5px;margin-bottom:-1px;position:relative;text-decoration:none;color:#444;font-weight:600;background-color:#f3f3f3;border:1px solid #eee;-moz-transition:all .2s;-o-transition:all .2s;-webkit-transition:all .2s;transition:all .2s}.spf-field-tabbed .spf-tabbed-nav a:hover{background-color:#f9f9f9}.spf-field-tabbed .spf-tabbed-nav a.spf-tabbed-active{background-color:#fff;border-bottom-color:#fff}.spf-field-tabbed .spf-tabbed-nav a:focus{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.spf-field-text input{width:340px;max-width:100%}.spf-field-textarea textarea{width:100%;max-width:100%;min-height:125px}.spf-field-textarea .spf-shortcode-button{margin-bottom:10px;margin-right:5px}.spf-field-typography select,.spf-field-typography textarea{margin:0;width:100%}.spf-field-typography .spf--title{color:#999;margin:0 0 2px 0}.spf-field-typography .spf--title small{vertical-align:top}.spf-field-typography .spf--blocks{display:flex;flex-wrap:wrap}.spf-field-typography .spf--block{padding-right:5px;padding-bottom:10px;box-sizing:border-box}.spf-field-typography .spf--block .spf--block{padding-right:0;padding-bottom:0}.spf-field-typography .spf--blocks-selects .spf--block{flex:1 33.3%}.spf-field-typography .spf--blocks-inputs .spf--block{flex:1 25%}.spf-field-typography .spf--blocks-inputs .spf--block .spf--block{flex:1}.spf-field-typography .spf--input{margin:0;width:100%;border-radius:4px 0 0 4px}.spf-field-typography .spf--unit{min-width:40px;max-width:40px;padding:4px 0;font-size:12px;font-weight:400;text-align:center;color:#777;border:1px solid #ddd;background-color:#eee;border-radius:0 2px 2px 0;border-left:0}.spf-field-typography .spf--preview{font-size:16px;line-height:20px;padding:20px;color:#222;border:1px solid #eee;background-color:#fff;border-radius:2.5px;user-select:none;-webkit-user-select:none;transition:background-color .2s,border-color .2s}.spf-field-typography .spf--block-preview{cursor:pointer;position:relative;overflow:hidden;margin-top:10px;max-width:100%}.spf-field-typography .spf--black-background{border-color:#000;background-color:#000}.spf-field-typography .spf--toggle{position:absolute;top:5px;right:10px;color:#999}.spf-field-typography .spf--block-extra-styles{margin-top:5px}.spf-field-upload input{width:100%}.spf-field-upload .spf--wrap{display:flex}.spf-field-upload .spf--buttons{display:flex;margin-left:5px}.spf-field-upload .spf--remove{margin-left:5px}.spf-field-wp_editor .spf-wp-editor{float:left;width:100%}.spf-field-wp_editor .mce-toolbar-grp{border:none}.spf-field-wp_editor .mce-btn.mce-active button,.spf-field-wp_editor .mce-btn.mce-active i,.spf-field-wp_editor .mce-btn.mce-active:hover button,.spf-field-wp_editor .mce-btn.mce-active:hover i{color:#23282d}.spf-field-wp_editor .wp-media-buttons{position:relative;z-index:2}.spf-field-wp_editor .wp-editor-tabs{position:relative;z-index:1}.spf-field-wp_editor .spf-no-tinymce{border:1px solid #e5e5e5}.spf-field-wp_editor .spf-no-quicktags .wp-media-buttons{float:none;display:block}.spf-field-wp_editor .spf-no-quicktags .mce-tinymce{box-shadow:none;border:1px solid #e5e5e5}.spf-field-wp_editor textarea{width:100%;max-width:100%;margin:0;box-shadow:none}.spf-field-heading{font-size:1.5em;font-weight:700;color:#23282d;background-color:#f5f5f5}.spf-field-subheading{font-size:14px;font-weight:700;padding-top:17px;padding-bottom:17px;color:#23282d;background-color:#f7f7f7}.spf-field-submessage{padding:0!important;border:0!important}.spf-field-submessage+.spf-field{border-top:0!important}.spf-submessage{font-size:12px;padding:17px 30px;border-top:1px solid transparent;border-bottom:1px solid transparent}.spf-submessage-success{color:#3c763d;border-color:#d6e9c6;background-color:#dff0d8}.spf-submessage-info{color:#31708f;border-color:#bce8f1;background-color:#d9edf7}.spf-submessage-warning{color:#8a6d3b;border-color:#faebcc;background-color:#fcf8e3}.spf-submessage-danger{color:#a94442;border-color:#ebccd1;background-color:#f2dede}.spf-submessage-normal{color:#23282d;border-color:#eee;background-color:#f7f7f7}.spf-field-notice{background-color:#f7f7f7}.spf-notice{padding:12px;background-color:#fff;border-left-style:solid;border-left-width:4px;box-shadow:0 1px 1px rgba(0,0,0,.1)}.spf-notice-success{border-color:#46b450}.spf-notice-info{border-color:#339fd4}.spf-notice-warning{border-color:#ffbc00}.spf-notice-danger{border-color:#dc3232}.spf-notice-normal{border-color:#222}.spf-help{cursor:help;position:absolute;top:0;right:0;padding:5px;font-size:14px;color:#aaa}.spf-help .spf-help-text{display:none}.spf-image-preview{display:inline-block;position:relative;padding:4px;min-width:44px;min-height:22px;margin-bottom:10px;border:1px solid #ccc;background-color:#f9f9f9;-moz-box-shadow:0 1px 0 rgba(0,0,0,.08);-webkit-box-shadow:0 1px 0 rgba(0,0,0,.08);box-shadow:0 1px 0 rgba(0,0,0,.08)}.spf-image-preview img{max-height:90px;display:inline-block;vertical-align:middle}.spf-field-custom .spf-field{padding:0}.spf-field .chosen-container-single .chosen-single{height:28px;line-height:26px}.spf-field .chosen-container-single .chosen-single abbr{top:0;right:20px;font-family:FontAwesome;font-size:12px;height:100%;width:18px;color:#aaa;text-align:center;background:0 0}.spf-field .chosen-container-single .chosen-single abbr:before{content:"\f00d"}.spf-field .chosen-container-single .chosen-single abbr:hover{color:#555}.spf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close{font-family:FontAwesome;font-size:12px;height:100%;width:18px;color:#aaa;text-align:center;background:0 0}.spf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:before{content:"\f00d"}.spf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{color:#555}.spf-field .chosen-container-single .chosen-single div b{font-family:FontAwesome;font-size:14px;color:#aaa;background:0 0}.spf-field .chosen-container-single .chosen-single div b:before{content:"\f107"}.spf-field .chosen-container-single .chosen-single div b:hover{color:#555}.spf-field .chosen-container-active.chosen-with-drop .chosen-single div b:before{content:"\f106"}.spf-field .chosen-container-single .chosen-single-with-deselect span{margin-right:40px}.spf-field .chosen-container-single .chosen-search input[type=text]{background:0 0}.spf-field .chosen-container-single .chosen-search:before{font-family:FontAwesome;position:absolute;content:"\f002";font-size:11px;right:10px;top:7px;color:#aaa}.spf-field .wp-picker-container{display:inline-block}.spf-field .spf--transparent-wrap{display:none;position:relative;top:-1px;width:235px;padding:9px 10px;border:1px solid #dfdfdf;border-top:none;background-color:#fff}.spf-field .spf--transparent-slider{position:absolute;width:190px;margin-left:2px;height:18px}.spf-field .spf--transparent-slider .ui-slider-handle{position:absolute;top:-3px;bottom:-3px;z-index:5;border-color:#aaa;border-style:solid;border-width:4px 3px;width:10px;height:16px;margin:0 -5px;background:0 0;cursor:ew-resize;opacity:.9;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.2);-webkit-box-shadow:0 1px 2px rgba(0,0,0,.2);box-shadow:0 1px 2px rgba(0,0,0,.2)}.spf-field .spf--transparent-slider .ui-slider-handle:before{content:" ";position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px solid #fff;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.spf-field .spf--transparent-offset{height:18px;width:200px;background:url(../images/checkerboard.png) repeat-y center left scroll #fff;-moz-box-shadow:0 0 5px rgba(0,0,0,.4) inset;-webkit-box-shadow:0 0 5px rgba(0,0,0,.4) inset;box-shadow:0 0 5px rgba(0,0,0,.4) inset;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}.spf-field .spf--transparent-text{position:absolute;top:12px;right:10px;width:30px;font-size:12px;line-height:12px;text-align:center;color:#999}.spf-field .spf--transparent-button{display:inline-block;text-align:center;cursor:pointer;margin-top:10px;user-select:none;-webkit-user-select:none;color:#999;transition:background-color .2s,border-color .2s,color .2s}.spf-field .spf--transparent-active .wp-color-result{background-image:url(../images/checkerboard.png);background-size:130%;background-position:center left;background-color:transparent!important}.spf-field .spf--transparent-active .spf--transparent-button{color:#fff;border-color:#4fb845;background-color:#4fb845}.spf-widgets>.spf-field{position:relative;top:-1px;margin-right:-15px;margin-left:-15px;padding:12px 15px}.spf-widgets>.spf-field .spf-field{margin-left:0;margin-right:0}.spf-widgets>.spf-field .spf-title{float:none;width:100%;margin-bottom:5px}.spf-widgets>.spf-field .spf-fieldset{margin-left:0}.spf-widgets .spf-field-text input{width:100%}.spf-widgets .spf-field-notice .spf-notice{padding:15px}.control-section .spf-widgets>.spf-field{margin-right:-10px;margin-left:-10px;padding:10px 12px}.control-section .spf-field{padding:0}.control-section .spf-field .spf-title{float:none;width:100%;margin-bottom:10px}.control-section .spf-field .spf-title h4{font-size:14px;font-weight:600;color:inherit}.control-section .spf-field .spf-fieldset{margin-left:0}.control-section .spf-field-select select{width:100%}.control-section .spf-field-heading{color:inherit;font-size:14px;line-height:1em;margin-right:-15px;margin-left:-15px;padding:15px}.control-section .spf-field-subheading{color:inherit;font-size:11px;margin-right:-15px;margin-left:-15px;padding:10px 15px}.control-section .spf-text-subtitle{margin-top:4px;font-size:12px}.control-section .spf-field-content,.control-section .spf-field-submessage .spf-submessage{margin-right:-15px;margin-left:-15px;padding:15px}.control-section .spf-fieldset .spf-field-heading,.control-section .spf-fieldset .spf-field-subheading,.control-section .spf-fieldset .spf-field-submessage .spf-submessage{margin-left:0;margin-right:0}.control-section .spf-field-date .spf--to{margin-left:0}.control-section .spf-field-sorter ul li{padding:5px}.control-section .spf-field-sorter .spf-modules{float:none;width:100%}.control-section .spf-field-sorter .spf-modules:first-child{padding-right:0;padding-bottom:15px}.control-section .spf-field-background .spf--select,.control-section .spf-field-background_adv .spf--select{width:100%}.control-section .spf-field-border select,.control-section .spf-field-column select,.control-section .spf-field-dimensions select,.control-section .spf-field-dimensions_advanced select,.control-section .spf-field-spacing select{width:auto}.control-section .spf-field-spinner input{width:50px}.control-section .spf-field-backup .spf-export-data{display:none}.control-section .spf-field-fieldset .spf-fieldset-content{border-color:#e5e5e5}.control-section .spf-field-fieldset .spf-field{padding:10px}.control-section .spf-field-fieldset .spf-field .spf-title{margin-bottom:5px}.control-section .spf-field-fieldset .spf-field h4{font-size:12px}.control-section .spf-field-accordion .spf-field,.control-section .spf-field-group .spf-field,.control-section .spf-field-repeater .spf-field,.control-section .spf-field-sortable .spf-field,.control-section .spf-field-tabbed .spf-field{padding:10px}.control-section .spf-field-accordion .spf-field .spf-title,.control-section .spf-field-group .spf-field .spf-title,.control-section .spf-field-repeater .spf-field .spf-title,.control-section .spf-field-sortable .spf-field .spf-title,.control-section .spf-field-tabbed .spf-field .spf-title{margin-bottom:5px}.control-section .spf-field-accordion .spf-field h4,.control-section .spf-field-group .spf-field h4,.control-section .spf-field-repeater .spf-field h4,.control-section .spf-field-sortable .spf-field h4,.control-section .spf-field-tabbed .spf-field h4{font-size:12px}.control-section .spf-dependency-control.hidden{display:none!important}.spf-taxonomy>.spf-field{border-top:none!important}.spf-taxonomy>.spf-field-heading{font-size:1.1em;padding:20px!important;border:1px solid #ddd}.spf-taxonomy>.spf-field-subheading{font-size:12px;padding:15px!important;border:1px solid #ddd}.spf-taxonomy>.spf-field-submessage .spf-submessage{padding:15px;border-left-width:1px;border-left-style:solid;border-right-width:1px;border-right-style:solid}.spf-taxonomy>.spf-field-notice{background-color:transparent}.spf-taxonomy .spf-section-title{display:block;padding:15px;background-color:#f9f9f9;border:1px solid #e5e5e5;-moz-box-shadow:0 1px 1px rgba(0,0,0,.04);-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04)}.spf-taxonomy-add-fields>.spf-field{padding:8px 0}.spf-taxonomy-add-fields>.spf-field>.spf-title{float:none;width:100%;padding:2px 2px 4px 0}.spf-taxonomy-add-fields>.spf-field>.spf-title h4{font-size:12px;font-weight:400}.spf-taxonomy-add-fields>.spf-field>.spf-fieldset{margin-left:0}.spf-taxonomy-add-fields>.spf-field>.spf-fieldset>.spf-help{right:-5px}.spf-taxonomy-add-fields+p.submit{margin-top:0}.spf-taxonomy-edit-fields>.spf-field{padding:20px 0}.spf-taxonomy-edit-fields>.spf-field>.spf-title{width:225px}.spf-taxonomy-edit-fields>.spf-field>.spf-title h4{font-size:14px;font-weight:600;line-height:1.3;display:inline-block;vertical-align:middle}.spf-taxonomy-edit-fields>.spf-field>.spf-fieldset{margin-left:225px}.spf-taxonomy-edit-fields>.spf-field>.spf-fieldset>.spf-help{top:-5px;right:-5px}.spf-taxonomy-edit-fields>.spf-field-submessage{margin:20px 0}.spf-taxonomy-edit-fields>.spf-field-heading,.spf-taxonomy-edit-fields>.spf-field-subheading{margin:20px 0;border:1px solid #ddd}.spf-profile>h2>.fa{padding-right:7px}.spf-profile>.spf-field{padding:15px 0;border-top:none!important}.spf-profile>.spf-field>.spf-title{width:220px}.spf-profile>.spf-field>.spf-title h4{font-size:14px;font-weight:600;line-height:1.3;display:inline-block;vertical-align:middle}.spf-profile>.spf-field>.spf-fieldset{margin-left:220px}.spf-profile>.spf-field>.spf-fieldset>.spf-help{top:-15px;right:-5px}.spf-profile>.spf-field-heading{font-size:1.1em}.spf-profile>.spf-field-subheading{font-size:12px}.spf-profile>.spf-field-heading,.spf-profile>.spf-field-subheading{margin:10px 0;padding:15px!important;border:1px solid #ddd}.spf-profile>.spf-field-submessage{margin:20px 0}.spf-profile>.spf-field-submessage .spf-submessage{padding:10px;border-left-width:1px;border-left-style:solid;border-right-width:1px;border-right-style:solid}.spf-profile>.spf-field-notice{background-color:transparent}.spf-modal{display:none;position:fixed;z-index:100101;top:0;left:0;width:100%;height:100%}.spf-modal-icon{z-index:100102}.spf-modal-table{display:table;width:100%;height:100%}.spf-modal-table-cell{display:table-cell;vertical-align:middle;margin:100px 0}.spf-modal-inner{position:relative;z-index:10;width:760px;height:750px;margin:0 auto;background-color:#fff}.spf-modal-content{position:relative;overflow:hidden;overflow-y:auto;height:592px}.spf-modal-content .spf-shortcode-button{display:none}.spf-modal-content .spf-fieldset{margin-left:25%}.spf-modal-content .spf-title{width:20%}.spf-modal-content .spf-field{padding:15px 30px 15px 15px}.spf-modal-content a:active,.spf-modal-content a:focus{outline:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.spf-modal-content h4{font-size:13px}.spf-modal-content h4 small{font-style:italic;font-weight:400;color:#aaa}.spf-modal-title{position:relative;background-color:#fcfcfc;border-bottom:1px solid #ddd;height:36px;font-size:16px;font-weight:600;line-height:36px;margin:0;padding:0 36px 0 16px}.spf-modal-header{width:100%;padding:16px 0;background-color:#f5f5f5;border-bottom:1px solid #eee}.spf-modal-header select{display:block;width:250px;margin:0 auto;background-color:#fff}.spf-modal-close{color:#666;padding:0;position:absolute;top:0;right:0;width:36px;height:36px;text-align:center;background:0 0;border:none;cursor:pointer}.spf-modal-close:before{font:normal 20px/36px dashicons;content:"\f158";vertical-align:top;width:36px;height:36px}.spf-modal-close:hover{opacity:.5}.spf-modal-insert-wrapper{text-align:center;width:100%;padding:16px 0;background-color:#f5f5f5;border-top:1px solid #eee}.spf-modal-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#000;opacity:.5}.spf--repeatable{padding:15px 15px 0 15px}.spf--repeat-button-block{text-align:center;padding-bottom:15px}.spf--repeat-shortcode{position:relative;margin-bottom:15px;border:1px dashed #ddd}.spf--repeat-shortcode:first-child .spf-repeat-remove{display:none}.spf--repeat-shortcode .spf-repeat-remove{position:absolute;right:10px;top:10px;z-index:10;cursor:pointer;display:inline-block;font-size:11px;width:18px;height:18px;line-height:18px;text-align:center;border-radius:2px;color:#fff;background-color:#e14d43;opacity:.5}.spf--repeat-shortcode .spf-repeat-remove:hover{opacity:1}.spf-shortcode-single .spf-modal-inner{height:750px}.spf-shortcode-single .spf-modal-content{height:652px}.elementor-editor-active .spf-shortcode-button{margin-left:5px}.elementor-editor-active .spf-modal .hidden{display:none!important}.spf-modal-icon .spf-icon-title{padding:15px 0;margin:4px;font-size:14px;font-weight:700;text-align:center;border:1px solid #eee;background-color:#f7f7f7}.spf-modal-icon .spf-icon-search{width:250px;height:40px;line-height:40px}.spf-modal-icon a{display:inline-block;padding:4px;cursor:pointer}.spf-modal-icon a .spf-icon{position:relative;padding:4px;display:inline-block;font-size:14px;width:30px;height:26px;line-height:26px;text-align:center;vertical-align:top;color:#555;border:1px solid #ccc;background-color:#f7f7f7;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(0,0,0,.08);-webkit-box-shadow:0 1px 0 rgba(0,0,0,.08);box-shadow:0 1px 0 rgba(0,0,0,.08);-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.spf-modal-icon a:hover .spf-icon{color:#fff;border-color:#222;background-color:#222}.spf-modal-icon .spf-modal-content{padding:10px;height:618px}.spf-modal-icon .spf-text-error{padding:10px}.spf-modal-loading{display:none;position:absolute;left:15px;top:15px}.spf-loading{position:relative;width:20px;height:20px;background:#ccc;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;-moz-box-shadow:0 2px 5px rgba(0,0,0,.07);-webkit-box-shadow:0 2px 5px rgba(0,0,0,.07);box-shadow:0 2px 5px rgba(0,0,0,.07)}.spf-loading:after{position:absolute;top:50%;left:50%;width:4px;height:4px;content:"";margin-top:-2px;margin-left:-2px;background-color:#fff;-moz-animation-duration:.5s;-webkit-animation-duration:.5s;animation-duration:.5s;-moz-animation-iteration-count:infinite;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-moz-animation-timing-function:linear;-webkit-animation-timing-function:linear;animation-timing-function:linear;-moz-animation-name:csfLoader;-webkit-animation-name:csfLoader;animation-name:csfLoader;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}@-moz-keyframes csfLoader{0%{-moz-transform:rotate(0) translateX(-6px) rotate(0);transform:rotate(0) translateX(-6px) rotate(0)}100%{-moz-transform:rotate(360deg) translateX(-6px) rotate(-360deg);transform:rotate(360deg) translateX(-6px) rotate(-360deg)}}@-webkit-keyframes csfLoader{0%{-webkit-transform:rotate(0) translateX(-6px) rotate(0);transform:rotate(0) translateX(-6px) rotate(0)}100%{-webkit-transform:rotate(360deg) translateX(-6px) rotate(-360deg);transform:rotate(360deg) translateX(-6px) rotate(-360deg)}}@keyframes csfLoader{0%{-moz-transform:rotate(0) translateX(-6px) rotate(0);-ms-transform:rotate(0) translateX(-6px) rotate(0);-webkit-transform:rotate(0) translateX(-6px) rotate(0);transform:rotate(0) translateX(-6px) rotate(0)}100%{-moz-transform:rotate(360deg) translateX(-6px) rotate(-360deg);-ms-transform:rotate(360deg) translateX(-6px) rotate(-360deg);-webkit-transform:rotate(360deg) translateX(-6px) rotate(-360deg);transform:rotate(360deg) translateX(-6px) rotate(-360deg)}}.spf-text-desc,.spf-text-subtitle{font-weight:400;font-style:italic;margin-top:4px;color:#999}.spf-text-success{color:#2b542c}.spf-text-error{color:#d02c21}.spf-text-info{color:#31708f}.spf-text-warning{color:#ffb900}.spf-text-muted{color:#aaa}.spf-text-left{text-align:left}.spf-text-center{text-align:center}.spf-text-right{text-align:right}.spf-block-left{float:left}.spf-block-right{float:right}.spf-full-width{width:100%}.spf-full-half{width:50%}.spf-table{width:100%;display:table}.spf-table-cell{display:table-cell;vertical-align:middle}.spf-table-expanded{width:100%}.spf-nowrap{white-space:nowrap}.spf-text-highlight{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}.spf-text-highlight-gray{padding:2px 4px;font-size:90%;background-color:#f0f0f0;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}.spf-hidden{display:none}.spf-hide{display:none!important}.spf-show{display:block!important}.spf-opacity{opacity:.5}.spf-warning-primary{color:#fff!important;border-color:#d02c21 #ba281e #ba281e!important;background:#e14d43!important;-moz-box-shadow:0 1px 0 #ba281e!important;-webkit-box-shadow:0 1px 0 #ba281e!important;box-shadow:0 1px 0 #ba281e!important;text-shadow:0 -1px 1px #ba281e,1px 0 1px #ba281e,0 1px 1px #ba281e,-1px 0 1px!important;text-shadow:0 -1px 1px #ba281e,1px 0 1px #ba281e,0 1px 1px #ba281e,-1px 0 1px #ba281e!important}.spf-warning-primary:focus,.spf-warning-primary:hover{border-color:#ba281e!important;background:#e35950!important;-moz-box-shadow:0 1px 0 #ba281e!important;-webkit-box-shadow:0 1px 0 #ba281e!important;box-shadow:0 1px 0 #ba281e!important}.spf-warning-primary:active{border-color:#ba281e!important;background:#d02c21!important;-moz-box-shadow:inset 0 2px 0 #ba281e!important;-webkit-box-shadow:inset 0 2px 0 #ba281e!important;box-shadow:inset 0 2px 0 #ba281e!important}.spf-form-result{display:none;padding:12px;margin:0 0 15px 0;background-color:#fff;border-left:4px solid #555;-moz-box-shadow:0 1px 1px rgba(0,0,0,.1);-webkit-box-shadow:0 1px 1px rgba(0,0,0,.1);box-shadow:0 1px 1px rgba(0,0,0,.1)}.spf-form-show{display:block}.spf-form-error{border-left-color:#dc3232}.spf-form-success{border-left-color:#46b450}.spf-form-warning{border-left-color:#ffb900}.spf-form-info{border-left-color:#00a0d2}.spf-label-error{position:relative;top:-2px;display:inline-block;font-size:10px;line-height:10px;height:10px;width:10px;padding:1px;font-style:normal;text-align:center;color:#fff;vertical-align:middle;background-color:#e10000;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}.spf-no-option{padding:30px}.spf-welcome-wrap{position:relative;margin:25px 40px 0 20px;font-size:15px;max-width:1200px}.spf-welcome-wrap p{font-size:14px;line-height:1.5}.spf-welcome-wrap h1{margin:.2em 200px 0 0;padding:0;color:#32373c;line-height:1.2em;font-size:2.8em;font-weight:400}.spf-welcome-wrap .spf-logo{position:absolute;overflow:hidden;top:0;right:0;height:160px;width:140px;background-image:linear-gradient(45deg,#2d67cb,#ad19f3);box-shadow:0 1px 4px rgba(0,0,0,.25),inset 0 0 0 4px rgba(0,0,0,.25)}.spf-welcome-wrap .spf-logo .spf--effects i{position:absolute;width:200px;height:100px;background-color:rgba(0,0,0,.15);transform:rotate(-45deg)}.spf-welcome-wrap .spf-logo .spf--effects i:nth-child(1){bottom:-20px;right:-70px}.spf-welcome-wrap .spf-logo .spf--effects i:nth-child(2){bottom:-35px;right:-80px}.spf-welcome-wrap .spf-logo .spf--effects i:nth-child(3){bottom:-50px;right:-90px}.spf-welcome-wrap .spf-logo .spf--effects i:nth-child(4){bottom:-65px;right:-100px}.spf-welcome-wrap .spf-logo .spf--wp-logos{position:relative;padding-top:25px;text-align:center}.spf-welcome-wrap .spf-logo .spf--wp-logo{position:absolute;left:20px;width:20px;height:20px;background-repeat:no-repeat;background-position:center center;background-image:url(../images/wp-logo.svg)}.spf-welcome-wrap .spf-logo .spf--wp-plugin-logo{display:inline-block;width:50px;height:50px;border:3px solid #fff;background-size:40px;background-repeat:no-repeat;background-position:center center;background-image:url(../images/wp-plugin-logo.svg);border-radius:100%;vertical-align:middle}.spf-welcome-wrap .spf-logo .spf--text{position:absolute;left:0;right:0;top:90px;color:#fff;font-size:13px;line-height:1.2em;font-weight:600;text-align:center;text-transform:uppercase;text-shadow:1px 1px 0 rgba(0,0,0,.25)}.spf-welcome-wrap .spf-logo .spf--version{top:auto;left:auto;right:8px;bottom:4px;font-size:11px;text-transform:lowercase}.spf-welcome-wrap .spf-about-text{font-weight:400;line-height:1.6em;font-size:19px;margin:1em 200px 1em 0;color:#555d66}.spf-welcome-wrap .spf-demo-button{margin:1em 200px 2em 0}.spf-welcome-wrap .nav-tab-wrapper{margin-bottom:20px}.spf-welcome-wrap ul{list-style-type:disc;padding-left:15px}.spf-welcome-wrap .spf--col{float:left;padding-right:20px;box-sizing:border-box}.spf-welcome-wrap .spf--col-2{width:50%}.spf-welcome-wrap .spf--col-3{width:33.333%}.spf-welcome-wrap .spf--col-4{width:25%}.spf-welcome-wrap .spf--col-5{width:20%}.spf-welcome-wrap .spf--col-last{padding-right:0}.spf-welcome-wrap .spf--col-upgrade{padding-top:30px;text-align:center}.spf--table-compare tfoot td,.spf--table-compare thead td{text-align:center}.spf--table-compare td{font-size:14px;text-align:center;vertical-align:middle;padding:10px}.spf--table-compare td:first-child{text-align:left}.spf--table-compare tfoot td{padding:15px 0}.spf--table-compare .fa{font-size:12px;width:18px;height:18px;line-height:18px;padding:2px;text-align:center;color:#fff;background-color:#46b450;border-radius:100%}.spf--table-compare .fa-check{background-color:#46b450}.spf--table-compare .fa-times{background-color:#dc3232}.spf-welcome-cols{clear:both;margin:20px 0;background-color:#fff;padding:30px 0;border-radius:2px;box-shadow:0 1px 1px rgba(0,0,0,.15)}.spf-welcome-cols .spf--col{width:20%;float:left;padding:0 30px;box-sizing:border-box;text-align:center;border-right:1px solid #e5e5e5}.spf-welcome-cols .spf--block,.spf-welcome-cols .spf--left{float:left;width:20%;padding:0 30px;text-align:center;box-sizing:border-box}.spf-welcome-cols .spf--block{width:80%}.spf-welcome-cols .spf--last{border-right:none}.spf-welcome-cols .spf--space{height:20px}.spf-welcome-cols .spf--icon{display:inline-block;font-size:25px;width:50px;height:50px;line-height:50px;text-align:center;margin-bottom:10px;color:#fff;background-color:#555;border-radius:50px}.spf-welcome-cols .spf--active{background-color:#5cb85c}.spf-welcome-cols .spf--deactive{background-color:#e14d43}.spf-welcome-cols .spf--title{font-weight:700;display:block}.spf-welcome-cols p:last-child{margin-bottom:0}.spf-code-block{margin:20px 0;padding:5px 20px;background-color:#fff;border-radius:2px;box-shadow:0 1px 1px rgba(0,0,0,.15)}.spf-code-block pre{font-size:13px;color:#0073aa}.spf-code-block pre span{color:#999}.spf--table-fields td{font-size:14px}.spf--upgrade a{color:#5cb85c;font-weight:700}.spf--upgrade a:focus,.spf--upgrade a:hover{color:#4aa14a;outline:0;box-shadow:none}@media only screen and (max-width:1200px){.spf-metabox .spf-field .spf-title{float:none;width:100%;margin-bottom:10px}.spf-metabox .spf-field .spf-fieldset{margin-left:0}}@media only screen and (max-width:782px){.spf-header-inner{text-align:center}.spf-header-inner h1{width:100%;margin-bottom:10px}.spf-header-left,.spf-header-right,.spf-search{width:100%}.spf-search{text-align:center;margin-bottom:15px}.spf-footer{text-align:center}.spf-buttons{float:none}.spf-copyright{float:none;margin-top:10px}.sp-wpcp-options .spf-nav,.spf-expand-all,.spf-nav,.spf-nav-background,.spf-reset-section{display:none!important}.sp-wpcp-options .spf-content,.spf-content{margin-left:0}.sp-wpcp-options .spf-section,.spf-section,.spf-section-title{display:block!important}.spf-field .spf-title{float:none;width:100%;margin-bottom:10px}.spf-field .spf-fieldset{margin-left:0}.spf-field-radio ul li{margin-top:4px}.spf-modal-inner{width:350px;height:380px}.spf-modal-content{height:282px}.spf-icon-dialog .spf-modal-inner{width:305px;height:380px}.spf-icon-dialog .spf-modal-content{height:267px}.spf-modal-icon .spf-modal-inner{width:330px;height:385px}.spf-modal-icon .spf-modal-content{height:252px}.spf-profile>.spf-field>.spf-title{float:none;width:100%;margin-bottom:10px}.spf-profile>.spf-field>.spf-fieldset{margin-left:0}}.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;user-select:none}.chosen-container *{box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;z-index:1010;max-width:390px;width:100%;border:1px solid #aaa;border-top:0;background:#fff;box-shadow:0 4px 5px rgba(0,0,0,.15);clip:rect(0,0,0,0);clip-path:inset(100% 100%)}.chosen-container.chosen-with-drop .chosen-drop{clip:auto;clip-path:none}.chosen-container a{cursor:pointer}.chosen-container .chosen-single .group-name,.chosen-container .search-choice .group-name{margin-right:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:400;color:#999}.chosen-container .chosen-single .group-name:after,.chosen-container .search-choice .group-name:after{content:":";padding-left:2px;vertical-align:top}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:25px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:linear-gradient(#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;font-size:1px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;clip:rect(0,0,0,0);clip-path:inset(100% 100%)}.chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer;max-width:390px}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;max-width:390px;height:auto;border:1px solid #aaa;background-color:#fff;background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:0;height:25px;outline:0;border:0!important;background:0 0!important;box-shadow:none;color:#999;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0;width:25px}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 5px 3px 0;padding:3px 20px 3px 5px;border:1px solid #aaa;max-width:100%;border-radius:3px;background-color:#eee;background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-size:100% 19px;background-repeat:repeat-x;background-clip:padding-box;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice span{word-wrap:break-word}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:none;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;border-bottom-right-radius:0;border-bottom-left-radius:0;background-image:linear-gradient(#eee 20%,#fff 80%);box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:none;background:0 0}.chosen-container-active .chosen-choices{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#222!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-single{cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;direction:rtl}#sp_wpcp_shortcode_options{border-top-color:#f1f1f1}#sp_wpcp_shortcode_options .spf-nav ul li{margin-bottom:-1px}#sp_wpcp_shortcode_options .spf-nav.spf-nav-metabox{border-right-color:#f1f1f1;border-right-color:#f1f1f1;background:#f1f1f1;margin-right:-2px}#sp_wpcp_shortcode_options .spf-content{border-top:1px solid #e5e5e5;box-shadow:0 -1px 1px rgba(0,0,0,.04)}#spf-section-sp_wpcp_upload_options_1 .spf-field-carousel_type .spf-title,#spf-section-sp_wpcp_upload_options_1 .spf-field-gallery .spf-title,.wpcp-video-description .spf-title,.wpcp-video-field-wrapper>.spf-title,.wpcp_carousel_content_wrapper .spf-title{width:100%}#spf-section-sp_wpcp_upload_options_1 .spf-field-carousel_type .spf-fieldset,#spf-section-sp_wpcp_upload_options_1 .spf-field-gallery .spf-fieldset,.wpcp-video-description .spf-fieldset,.wpcp-video-field-wrapper>.spf-fieldset,.wpcp_carousel_content_wrapper .spf-fieldset{margin-top:30px;margin-left:0}#sp_wpcp_display_shortcode .handlediv,#sp_wpcp_display_shortcode .hndle,#sp_wpcp_display_shortcode .postbox-header,#sp_wpcp_shortcode_options .handlediv,#sp_wpcp_shortcode_options .hndle,#sp_wpcp_shortcode_options .postbox-header,#sp_wpcp_upload_options .handlediv,#sp_wpcp_upload_options .hndle,#sp_wpcp_upload_options .postbox-header{display:none}#spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header{background-color:#157592;background:linear-gradient(-45deg,#22afba,#157592);padding:20px 26px;overflow:hidden;height:33px}#spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header .support{margin-left:16px;float:right}#spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header .support a{color:#fff;text-decoration:none;line-height:35px;font-size:15px;font-weight:500}.spf-field-carousel_type .spf--image:nth-child(4),.spf-field-carousel_type .spf--image:nth-child(5){pointer-events:none}.spf-field-carousel_type .spf--image{position:relative}.spf-field-carousel_type .spf--image label strong{position:absolute;top:3px;right:3px;background:#cbd6df;padding:0 5px;font-size:10px}#sp_wpcp_shortcode_options .hidden{display:none}.spf-field-shortcode.wpcp-admin-footer .wpcp-shortcode-selectable{background-color:rgba(82,179,217,.11);padding:10px 15px;display:inline-block;-webkit-touch-callout:all;-webkit-user-select:all;-khtml-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all}#spf-section-sp_wpcp_display_shortcode_1 .spf-field{display:flex;padding:0;flex-wrap:wrap}.spf-field-shortcode.wpcp-admin-footer .wpcp-scode-wrap:first-of-type{border-right:1px solid #ddd}.spf-field-shortcode.wpcp-admin-footer .wpcp-scode-wrap{padding-top:22px;padding-bottom:22px;text-align:center;width:49%}.spf-field-shortcode.wpcp-admin-footer .wpcp-sc-title{font-weight:500;font-size:14px!important;padding-top:0!important;color:#4c5158;margin-right:5px}@media only screen and (max-width:990px){.spf-field-shortcode.wpcp-admin-footer .wpcp-scode-wrap:first-of-type{border-right:none;border-bottom:1px solid #ddd}.spf-field-shortcode.wpcp-admin-footer .wpcp-scode-wrap{width:100%}}
1
+ .spf{position:relative}.spf label{padding:0;margin:0;display:inline-block}.spf-ab-icon{top:2px}#screen-meta-links+.spf-options{margin-top:40px}.spf-options{margin-top:20px;margin-right:20px}.spf-header{position:relative}.spf-header-inner{padding:25px}.spf-header-inner h1 svg{float:left;height:26px;width:28px;margin-right:8px;padding-top:6px}.spf-header-inner h1{float:left;font-size:18px;line-height:38px;font-weight:600;margin:0;vertical-align:middle}.spf-header-inner h1 small{font-size:11px;font-weight:500}.spf-sticky .spf-header-inner{position:fixed;z-index:20;top:32px;box-shadow:0 5px 25px rgba(0,0,0,.125)}.spf-buttons{float:right;transition:opacity .2s}.spf-buttons .button{margin:0 4px;padding:0 16px;border-radius:0;height:38px;font-size:13px;font-weight:500;text-transform:uppercase;color:#fff}.spf-buttons .button.spf-reset-all,.spf-buttons .button.spf-reset-section{background-color:#cd3c3c!important;border-color:transparent!important;box-shadow:none!important;text-shadow:none!important;border-radius:4px;height:38px;transition:background-color .2s;color:#fff!important}.spf-buttons .button.spf-save-ajax{background-color:#02cc7b;border-color:transparent;color:#fff!important;box-shadow:none;text-shadow:none;border-radius:4px;height:38px;width:75px;transition:background-color .2s}.spf-buttons .button.spf-save-ajax:hover{background-color:#02bb71}.spf-buttons .button.spf-reset-section{background-color:#77777c!important}.spf-buttons .button.spf-reset-section:hover{background-color:#616169!important}.spf-buttons .button.spf-reset-all:hover{background-color:#b82f2f!important}.spf-buttons .button:focus{outline:0!important;box-shadow:none!important}.spf-header-left{float:left}.spf-header-right{float:right}.spf-nav{display:block;width:auto}.spf-nav ul{clear:left;margin:0;list-style-type:none}.spf-nav ul li{margin-bottom:0}.spf-nav ul li a{font-size:13px;position:relative;display:block;padding:14px 12px;text-decoration:none;transition:none}#spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header .support a,.spf-nav ul li a:focus{outline:0;box-shadow:none}.spf-nav ul li .spf-section-active:after{content:" ";position:absolute;right:0;top:50%;height:0;width:0;pointer-events:none;border:solid transparent;border-right-color:#fff;border-width:4px;margin-top:-4px}.spf-nav ul li .spf-arrow:after{content:"\f054";display:inline-block;font-family:FontAwesome;font-size:9px;line-height:1;position:absolute;right:10px;top:50%;margin-top:-4px;transform:rotate(0)}.spf-nav ul li.spf-tab-active .spf-arrow:after{transform:rotate(90deg)}.spf-nav ul li.spf-tab-active ul{display:block}.spf-nav ul ul{display:none;position:relative}.spf-nav ul ul li a{font-size:12px;padding:12px 14px 12px 24px}.spf-nav .fa{width:20px;margin-right:5px;font-size:14px;text-align:center}.spf-nav .spf-label-error{margin-left:4px;vertical-align:top}.spf-wrapper{position:relative}.spf-content{background-color:#fff;transition:opacity .2s}.spf-sections{float:left;width:100%}.spf-section{display:none}.spf-section-title{display:none;padding:20px 30px;background-color:#18afb9;border-top:1px solid #eee;border-bottom:1px solid #eee}.spf-section-title h3{margin:0;padding:0;font-size:13px;font-weight:700;text-transform:uppercase;color:#fff}.spf-section-title .fa{margin-right:5px}.sp-wpcp-options .spf-nav{width:225px}.sp-wpcp-options .spf-nav{display:block;position:relative;z-index:10;float:left;width:225px}#sp_wpcp_shortcode_options .spf-nav ul li{display:inline-block}.sp-wpcp-options .spf-nav-background{position:absolute;top:0;left:0;bottom:0;z-index:9;width:225px}.sp-wpcp-options .spf-content{position:relative;margin-left:225px;background-color:#fff;transition:opacity .2s}.spf-footer{padding:20px;font-size:11px}.spf-copyright{float:left;margin-top:5px}.spf-search-all .spf-nav,.spf-search-all .spf-nav-background,.spf-show-all .spf-nav,.spf-show-all .spf-nav-background{display:none}.spf-search-all .spf-content,.spf-show-all .spf-content{margin-left:0}.spf-search-all .spf-section,.spf-search-all .spf-section-title,.spf-show-all .spf-section,.spf-show-all .spf-section-title{display:block!important}.spf-search-all .spf-section-title{display:none!important}.spf-expand-all{float:left;padding:0 8px;margin-right:4px;z-index:1;font-size:14px;line-height:29px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:2px;transition:all .2s}.spf-expand-all span{font-size:11px;vertical-align:middle}.spf-search{float:left}.spf-search input{margin:0 2px 0 0;border:none;font-size:12px;line-height:29px;text-align:inherit;padding:0 10px;border-radius:2px;box-shadow:none}.spf-search input:focus{box-shadow:none}.spf-saving .spf-buttons,.spf-saving .spf-content{cursor:default;pointer-events:none;opacity:.75}.spf-metabox{margin:-6px -12px -12px -12px}.spf-metabox .spf-section-title{padding:20px}.block-editor-page .spf-metabox{margin:-6px -14px -12px -14px}.spf-metabox-restore{text-align:right;padding:10px;border-top:1px solid #eee}.spf-metabox-restore .spf-button-cancel,.spf-metabox-restore input{display:none}.spf-metabox-restore span{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.spf-metabox-restore input:checked~.spf-button-restore{display:none}.spf-metabox-restore input:checked~.spf-button-cancel{display:inline-block}#side-sortables .spf-section-title{padding:12px}#side-sortables .spf-field{padding:12px}#side-sortables .spf-field .spf-title{float:none;width:100%;margin-bottom:10px}#side-sortables .spf-field .spf-fieldset{margin-left:0}#side-sortables .spf-notice{padding:12px}.spf-tooltip{position:absolute;z-index:5000001;font-size:12px;line-height:1.4;text-align:center;text-decoration:none;padding:6px 12px;max-width:200px;color:#fff;background-color:#000;background-color:rgba(0,0,0,.85);border-radius:4px}.spf-theme-dark .spf-header-inner{background-color:#050505}.spf-theme-dark .spf-header-inner h1{color:#fff}.spf-theme-dark .spf-header-inner h1 small{color:#555}.spf-theme-dark .spf-expand-all{color:#999;background-color:#222}.spf-theme-dark .spf-expand-all:hover{color:#fff;background-color:#333}.spf-theme-dark .spf-search input{color:#fff;background-color:#222}.spf-theme-dark .spf-search:focus{background-color:#444}.spf-theme-dark .spf-search::-webkit-input-placeholder{color:#666}.spf-theme-dark .spf-nav ul li a{color:#999;background-color:#222;border-bottom:1px solid #2f2f2f}.spf-theme-dark .spf-nav ul li a:hover{color:#fff}.spf-theme-dark .spf-nav ul li .spf-section-active{color:#fff;background-color:#111}.spf-theme-dark .spf-nav ul ul li a{background-color:#191919;border-bottom:1px solid #2f2f2f}.spf-theme-dark .spf-nav ul ul li .spf-section-active{background-color:#101010}.spf-theme-dark .spf-nav ul ul:before{background-color:rgba(34,34,34,.75)}.spf-theme-dark .spf-nav>ul>li:last-child>a{border-bottom:none}.spf-theme-dark .spf-nav-background{background-color:#222}.spf-theme-dark .spf-footer{color:#555;background-color:#050505}.spf-theme-light .spf-container{border:1px solid #e5e5e5;box-shadow:0 0 15px rgba(0,0,0,.04)}.spf-theme-light .spf-header-inner{border-bottom:1px solid #cecece;background-color:#f5f5f5;background:linear-gradient(#fefefe,#f5f5f5)}.spf-theme-light .spf-header-inner h1 small{color:#999}.spf-theme-light .spf-expand-all{color:#999;background-color:#fff;box-shadow:0 1px 1px rgba(0,0,0,.05)}.spf-theme-light .spf-expand-all:hover{color:#555}.spf-theme-light .spf-search input{color:#555;background-color:#fff;box-shadow:0 1px 1px rgba(0,0,0,.05)}.spf-theme-light .spf-search input::-webkit-input-placeholder{color:#bbb}.spf-theme-light .spf-nav{background:#f1f1f1}.spf-theme-light .spf-nav ul li a{background-color:#18afb9;border-top:1px solid #18afb9;border-right:0 solid #e2e2e1;border-bottom:1px solid #ddd;color:#fff;font-size:12px;font-weight:600;line-height:1.4;padding:14px 15px;text-transform:uppercase}.sp_wpcp_shortcode_generator .spf-nav ul li a{border-right:1px solid #e2e2e1}.spf-theme-light .spf-nav ul li .spf-section-active{background-color:#fff;color:#000}#sp_wpcp_shortcode_options .spf-theme-light .spf-nav ul li .spf-section-active{border-bottom:1px solid #fff;border-top:1px solid #18afb9;box-shadow:0 3px 0 0 #18afb9 inset}.sp-wpcp-options.spf-theme-light .spf-nav ul li a{background:#efefef;color:#000;border-bottom:1px solid #cecece;border-top:1px solid #cecece}.sp-wpcp-options.spf-theme-light .spf-nav ul li a:first-child{border-top:0 solid transparent}#sp_wpcp_shortcode_options .spf-theme-light .spf-nav ul li .spf-section-active i,.sp-wpcp-options.spf-theme-light .spf-nav ul li .spf-section-active i{color:#18afb9}.sp-wpcp-options.spf-theme-light .spf-nav ul li .spf-section-active{background-color:#fff;border-right:0 solid #fff;border-bottom:1px solid #cecece;border-top:1px solid #fff;box-shadow:4px 0 0 0 #18afb9 inset}.spf-theme-light .spf-nav ul li .spf-section-active:after{display:none}.spf-theme-light .spf-nav ul ul li a{background-color:#eee;border-bottom:1px solid #e5e5e5}.spf-theme-light .spf-nav-background{background-color:#ddd;border-right:1px solid #cecece}.spf-theme-light .spf-footer{color:#555;border-top:1px solid #e5e5e5;background-color:#f5f5f5;background:linear-gradient(#fafafa,#f5f5f5)}.spf-field{position:relative;padding:22px 30px}.spf-field.spf-field-carousel_type{padding-bottom:0}.spf-field p:first-child{margin-top:0}.spf-field p:last-child{margin-bottom:0}.spf-field:after,.spf-field:before{content:" ";display:table}.spf-field:after{clear:both}.spf-field h4{margin-top:0}.spf-field .spf-title{position:relative;width:20%;float:left}.spf-field .spf-title h4{margin:0;color:#23282d}.spf-field .spf-fieldset{margin-left:25%}.spf-pseudo-field{padding:0 5px 0 0!important;display:inline-block}.spf-pseudo-field+.spf-pseudo-field{border:0}.spf-pseudo-field pre{display:none}.spf-field-accordion .spf-field{padding:20px}.spf-field-accordion .spf-accordion-item{position:relative;margin-bottom:5px}.spf-field-accordion .spf-accordion-item h4{font-size:1em}.spf-field-accordion .spf-accordion-title{display:block;cursor:pointer;position:relative;margin:0;padding:15px;min-height:0;font-size:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid #e5e5e5;background-color:#fafafa;transition:border-color .15s}.spf-field-accordion .spf-accordion-title:active,.spf-field-accordion .spf-accordion-title:focus,.spf-field-accordion .spf-accordion-title:hover{border:1px solid #bbb;background-color:#fafafa;outline:0}.spf-field-accordion .spf-accordion-icon{color:#aaa;width:14px;text-align:center}.spf-field-accordion .spf--icon{width:18px;text-shadow:center}.spf-field-accordion .spf-accordion-content{display:none;padding:0;border:1px solid #e5e5e5;border-top:none;background-color:#fff}.spf-field-accordion .spf-accordion-open{display:block}.spf-field-background select,.spf-field-background_adv select{width:100%}.spf-field-background .spf-field,.spf-field-background_adv .spf-field,.spf-field-group .spf-field-background_adv .spf-field{float:left;padding:0;border:0}.spf-field-background .spf--block,.spf-field-background_adv .spf--block{float:left;margin-bottom:15px;box-sizing:border-box}.spf-field-background .spf--title,.spf-field-background_adv .spf--title{float:left;color:#999;margin-top:3px;margin-right:5px}.spf-field-background .spf--select,.spf-field-background_adv .spf--select{width:25%;padding-right:10px;box-sizing:border-box}.spf-field-background .spf--select .spf-field,.spf-field-background_adv .spf--select .spf-field{width:100%}.spf-field-background .spf--media,.spf-field-background_adv .spf--media{width:100%;padding-right:10px}.spf-field-background .spf--media .spf-field,.spf-field-background_adv .spf--media .spf-field{width:100%}.spf-field.spf-field-background_adv.wpcp_carousel_content_bg .spf-fieldset,.spf-field.spf-field-wp_editor.wpcp_carousel_content_source .spf-fieldset{margin-left:0;margin-top:35px}.spf-field.spf-field-background_adv.wpcp_carousel_content_bg .spf-title,.spf-field.spf-field-wp_editor.wpcp_carousel_content_source .spf-title{width:100%}.spf-field.spf-field-background_adv .spf--preview{font-size:16px;line-height:20px;padding:20px;color:#222;border:1px solid #eee;background-color:#fff;height:150px;border-radius:2.5px;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none;transition:background-color .2s,border-color .2s}.spf-field.spf-field-background_adv .spf--block-preview{cursor:pointer;position:relative;overflow:hidden;margin-top:10px;width:100%}.spf-field.spf-field-background_adv .spf--black-background{border-color:#000;background-color:#000}.spf-field.spf-field-background_adv .spf--toggle{position:absolute;top:5px;right:10px;color:#999}.spf-field-backup textarea{width:100%;min-height:200px;margin-bottom:5px}.spf-field-backup small{display:inline-block;margin:5px}.spf-field-backup hr{margin:20px 0;border:none;border-bottom:1px solid #e5e5e5}.spf-field-border .spf--left,.spf-field-column .spf--left,.spf-field-dimensions .spf--left,.spf-field-dimensions_advanced .spf--left,.spf-field-spacing .spf--left{float:left}.spf-field-border .spf--input,.spf-field-column .spf--input,.spf-field-dimensions .spf--input,.spf-field-dimensions_advanced .spf--input,.spf-field-spacing .spf--input{float:left;margin-right:10px;margin-bottom:7px}.spf-field-border .spf--input select,.spf-field-column .spf--input select,.spf-field-dimensions .spf--input select,.spf-field-dimensions_advanced .spf--input select,.spf-field-spacing .spf--input select{margin:0;line-height:22px}.spf-field-border .spf--input input,.spf-field-column .spf--input input,.spf-field-dimensions .spf--input input,.spf-field-dimensions_advanced .spf--input input,.spf-field-spacing .spf--input input{line-height:26px;float:left;margin:0;padding:0;width:65px;max-width:100%;text-align:center}.spf-field-column .spf--input input{border-radius:0 4px 4px 0}.spf-field-spacing .spf--input input{border-radius:4px 0 0 4px}.spf-field-border .spf--input input{border-radius:0}.spf-field-border .spf--label,.spf-field-column .spf--label,.spf-field-dimensions .spf--label,.spf-field-dimensions_advanced .spf--label,.spf-field-spacing .spf--label{float:left;max-width:100%;font-size:12px;line-height:26px;vertical-align:top;text-align:center;color:#555;border:1px solid #ddd;background-color:#eee;padding:0 6px}.spf-field-border .spf--label-icon,.spf-field-column .spf--label-icon,.spf-field-dimensions .spf--label-icon,.spf-field-dimensions_advanced .spf--label-icon,.spf-field-spacing .spf--label-icon{min-width:20px;border-right:0;border-radius:4px 0 0 4px;min-height:28px;line-height:28px}.spf-field-border .spf--label-unit,.spf-field-column .spf--label-unit,.spf-field-dimensions .spf--label-unit,.spf-field-dimensions_advanced .spf--label-unit,.spf-field-spacing .spf--label-unit{color:#999;border-left:0;border-radius:0 4px 4px 0;min-height:28px}.spf-field-button_set .spf--buttons{display:inline-block}.spf-field-button_set .spf--button{position:relative;z-index:1;float:left;cursor:pointer;padding:7px 14px;min-width:40px;text-align:center;color:#555;border:1px solid #ccc;background-color:#f7f7f7;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none;box-shadow:0 1px 0 rgba(0,0,0,.1)}.spf-field-button_set .spf--button:first-child{border-radius:4px 0 0 4px}.spf-field-button_set .spf--button:last-child{border-radius:0 4px 4px 0}.spf-field-button_set .spf--button:not(:first-child){margin-left:-1px}.spf-field-button_set .spf--button:hover{background-color:#eee}.spf-field-button_set .spf--active,.spf-field-button_set .spf--active:hover{z-index:2;color:#fff;border-color:#006799;background-color:#0085ba}.spf-field-button_set input{display:none}.spf-field-checkbox ul,.spf-field-radio ul{margin:0;padding:0;list-style-type:none;overflow-y:auto;max-height:305px}.spf-field-checkbox .spf--inline-list li,.spf-field-radio .spf--inline-list li{display:inline-block;margin-right:15px}.spf-field-checkbox input[type=radio]:checked:before,.spf-field-radio input[type=radio]:checked:before{line-height:10px}.spf-field-checkbox .spf-checker,.spf-field-radio .spf-checker{cursor:pointer}.spf-field-code_editor .CodeMirror{width:100%;height:400px;border:1px solid #eee}.spf-field-code_editor textarea{width:100%;height:400px}.spf-field-color>input{opacity:.75;width:115px;max-width:100%}.spf-field-color_group .spf--left{float:left;margin-right:10px;margin-bottom:5px}.spf-field-color_group .spf--title{color:#999;margin-bottom:5px}.spf-field-fieldset .spf-fieldset-content{border:1px solid #eee;background-color:#fff}.spf-field-fieldset .spf-field{padding:20px}.spf-field-date .spf--to{margin-left:7px}.spf-datepicker-wrapper{margin-top:5px;width:auto;background-color:#fff;z-index:9999999!important;box-shadow:0 0 30px rgba(0,0,0,.15)}.spf-datepicker-wrapper *{float:none;margin:0;padding:0;font-family:inherit;font-weight:400;font-style:normal;text-decoration:none;border:none;background:0 0;box-shadow:none;border-radius:none}.spf-datepicker-wrapper .ui-datepicker-header,.spf-datepicker-wrapper .ui-widget-header{color:#fff;background:#00a0d2}.spf-datepicker-wrapper .ui-datepicker-header .ui-state-hover{cursor:pointer}.spf-datepicker-wrapper .ui-datepicker-title{font-size:14px;line-height:40px;text-align:center}.spf-datepicker-wrapper .ui-datepicker-next,.spf-datepicker-wrapper .ui-datepicker-prev{position:static;top:auto;left:auto;right:auto;font-family:FontAwesome;font-size:12px;text-align:center;width:41px;height:40px;line-height:40px;color:#fff;background-color:rgba(255,255,255,.1);text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.spf-datepicker-wrapper .ui-datepicker-next span,.spf-datepicker-wrapper .ui-datepicker-prev span{display:none}.spf-datepicker-wrapper .ui-datepicker-prev{float:left}.spf-datepicker-wrapper .ui-datepicker-next{float:right}.spf-datepicker-wrapper .ui-datepicker-prev:before{content:'\f053'}.spf-datepicker-wrapper .ui-datepicker-next:before{content:'\f054'}.spf-datepicker-wrapper .ui-datepicker-next-hover,.spf-datepicker-wrapper .ui-datepicker-prev-hover{opacity:.75}.spf-datepicker-wrapper tbody .ui-datepicker-week-col{background-color:#f7f7f7}.spf-datepicker-wrapper .ui-datepicker-buttonpane{padding:10px;text-align:center;background-color:#f7f7f7}.spf-datepicker-wrapper .ui-datepicker-buttonpane button{cursor:pointer;margin:0 5px;padding:7px 14px;border:1px solid #eee;background-color:#fff}.spf-datepicker-wrapper select{margin:0 4px;color:#fff;border:1px solid rgba(255,255,255,.5)}.spf-datepicker-wrapper select option{color:#555}.spf-datepicker-wrapper table{font-size:13px;border-collapse:collapse;width:100%}.spf-datepicker-wrapper thead{color:#fff;background:#32373c}.spf-datepicker-wrapper th{text-align:center;padding:7px;border:1px solid #444}.spf-datepicker-wrapper td{text-align:center;border:1px solid #f4f4f4}.spf-datepicker-wrapper td.ui-datepicker-other-month{border:transparent}.spf-datepicker-wrapper td .ui-state-default{color:#555;width:auto;display:block;padding:6px 12px}.spf-datepicker-wrapper td .ui-state-active,.spf-datepicker-wrapper td .ui-state-hover{color:#fff;background-color:#0073aa}.spf-datepicker-wrapper td.ui-state-disabled .ui-state-default{opacity:.5}.spf-field-gallery input{display:none}.spf-field-gallery ul{margin:0;padding:0;list-style-type:none}.spf-field-gallery ul.sp-gallery-images li{display:inline-block;position:relative;padding:4px;margin:0 5px 10px 0;border:1px solid #ccc;background-color:#f9f9f9;border-radius:2px;box-shadow:0 1px 0 rgba(0,0,0,.08)}.spf-field-gallery ul.sp-gallery-images li img{max-height:100px;display:inline-block;vertical-align:middle}.spf-field-gallery .button,.spf-field-gallery .button:focus,.spf-field-gallery .button:hover{margin-right:5px;margin-bottom:5px;width:110px;height:110px;text-align:center;line-height:15px;color:#fff;border:none;border-radius:2px;display:flex;justify-content:center;flex-direction:column;font-weight:600}.spf-field-gallery .button-primary.spf-button{background:#4eb631;box-shadow:none;text-shadow:none}.spf-field-gallery .button.spf-edit-gallery{background:#6a7885}.spf-field-gallery .button i{font-size:24px;margin-bottom:10px}.spf-field-gallery a,.spf-field-gallery li{float:left}.spf-field-group .spf-field{padding:20px}.spf-field-group .spf-cloneable-hidden{display:none!important}.spf-field-group .spf-cloneable-wrapper{position:relative}.spf-field-group .spf-cloneable-item{display:none;position:relative;margin-bottom:5px}.spf-field-group .spf-cloneable-item h4{font-size:1em}.spf-field-group .ui-accordion .spf-cloneable-item{display:block}.spf-field-group .spf-cloneable-content{border:1px solid #e5e5e5;background:#fff}.spf-field-group .spf-cloneable-title{display:block;cursor:pointer;position:relative;margin:0;padding:15px 65px 15px 10px;min-height:0;font-size:100%;border:1px solid #e5e5e5;background:#fafafa;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:border-color .15s}.spf-field-group .spf-cloneable-title:active,.spf-field-group .spf-cloneable-title:focus,.spf-field-group .spf-cloneable-title:hover{border:1px solid #bbb;background:#fafafa;outline:0}.spf-field-group .spf-cloneable-helper{position:absolute;top:12px;right:10px;z-index:1;font-size:14px;line-height:1em}.spf-field-group .spf-cloneable-helper i{display:inline-block;cursor:pointer;padding:5px;color:#999}.spf-field-group .spf-cloneable-helper i:hover{color:#555}.spf-field-group .spf-cloneable-content{padding:0;border-top:0}.spf-field-group .spf-cloneable-title-number,.spf-field-group .spf-cloneable-title-prefix{margin-right:5px}.spf-field-group .spf-cloneable-alert{display:none;margin-bottom:5px;padding:10px 20px;color:#a94442;border:1px solid #ebccd1;background-color:#f2dede}.spf-field-group .widget-placeholder{margin-bottom:10px;border:1px dashed #f1c40f;background-color:#fffae4}.spf-field-group .spf-cloneable-header-icon{display:inline-block;text-align:center;font-size:14px;width:17px;color:#aaa;text-indent:0;vertical-align:text-top}.spf-field-group .spf-cloneable-placeholder{background-color:#ddd;margin-top:4px;width:100px;height:10px;font-size:10px;line-height:10px;display:inline-block;vertical-align:top;border-radius:2px}.spf-field-icon input{display:none}.spf-field-icon .button{margin-right:5px}.spf-field-icon .spf-icon-preview i{display:inline-block;font-size:14px;width:30px;height:26px;line-height:26px;margin-right:5px;text-align:center;vertical-align:top;color:#555;border:1px solid #ccc;background-color:#f7f7f7;border-radius:3px;box-shadow:0 1px 0 rgba(0,0,0,.08);box-sizing:content-box}.spf-field-image_select .spf--image{cursor:pointer;position:relative;display:inline-block;max-width:100%;margin:0 15px 5px 0;vertical-align:bottom;outline:2px solid transparent;background-color:#fff;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none;transition:all .2s;outline-offset:-2px}.spf-field-image_select .spf--image:before{position:absolute;top:0;left:0;text-align:center;font-size:11px;font-family:FontAwesome;content:"\f00c";width:15px;height:15px;line-height:15px;opacity:0;color:#fff;background-color:#1ea4b0;transition:opacity .2s}.spf-field-image_select .spf--image.spf--active:before{opacity:1}.spf-field-image_select .spf--active img{outline-color:#1ea4b0}.spf-field-image_select input{display:none}.spf-field-image_select .spf--image img{color:#7b8898;outline:solid 3px transparent;border-radius:2px;cursor:pointer;text-align:center;width:80px;outline-offset:-3px}.spf-field-image_select .spf--image img{max-width:100%}.spf-field-image_select span{margin-top:5px;font-weight:500;text-align:center;margin-right:10px;display:block;font-size:12px;text-transform:capitalize}.spf-field-image_select .spf--image.spf--active img{outline-color:#1ea4b0}.spf-field-carousel_type .spf--image{cursor:pointer;position:relative;display:inline-block;max-width:100%;margin:0 5px 5px 0;vertical-align:bottom;border:2px solid transparent;background-color:#fff;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none;transition:all .2s}.spf-field-carousel_type input{display:none}.spf-field-carousel_type .spf--image{background:#e8ecef;color:#7b8898;margin-right:10px;border:solid 3px #e8ecef;border-radius:2px;cursor:pointer;text-align:center;width:120px;height:80px;box-shadow:inset 0 0 0 3px #fff}.spf-field-carousel_type i{font-size:30px;width:32px;height:30px;margin-top:15px}.spf-field-carousel_type p{margin-top:5px;font-weight:500}.spf-field-carousel_type .spf--image.spf--active{border-color:#1ea4b0}.spf-field-link_color .spf--left{float:left;margin-right:10px;margin-bottom:5px}.spf-field-link_color .spf--title{color:#999;margin-bottom:5px}.spf-field-media .spf--placeholder{margin-bottom:10px;display:flex}.spf-field-media .spf--placeholder input{width:100%}.spf-field-media .button{margin-left:7px}.spf-field-media .hidden+.button{margin-left:0}.spf-field-media .spf--preview{position:relative}.spf-field-media .spf--preview .fa-times{position:absolute;z-index:1;right:4px;top:4px;font-size:14px;width:22px;height:22px;line-height:22px;text-align:center;text-decoration:none;color:#fff;background-color:#d33;opacity:.8;transition:all .2s}.spf-field-media .spf--preview .fa-times:hover{opacity:1}.spf-field-media .spf--preview .fa-times:focus{box-shadow:none}.spf-field-palette .spf--palette{position:relative;display:inline-block;cursor:pointer;border:2px solid #ddd;margin-right:10px;margin-bottom:10px;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none;transition:all .2s}.spf-field-palette .spf--palette span{vertical-align:middle;display:inline-block;width:22px;height:60px;line-height:60px;overflow:hidden;text-indent:-999px}.spf-field-palette .spf--palette:before{position:absolute;top:0;left:0;text-align:center;font-size:11px;font-family:FontAwesome;content:"\f00c";width:15px;height:15px;line-height:15px;opacity:0;color:#fff;background-color:#222;transition:opacity .2s}.spf-field-palette .spf--active{border-color:#222;box-shadow:0 0 20px rgba(0,0,0,.2)}.spf-field-palette .spf--active:before{opacity:1}.spf-field-palette input{display:none}.spf-field-repeater .spf-field{padding:10px}.spf-field-repeater .spf-field-text input{width:100%}.spf-field-repeater .spf-repeater-hidden{display:none!important}.spf-field-repeater .spf-repeater-wrapper .spf-repeater-item{display:table;width:100%;margin-bottom:5px;border:1px solid #eee}.spf-field-repeater .spf-repeater-wrapper .spf-repeater-item h4{font-size:1em}.spf-field-repeater .spf-repeater-content{width:100%;display:table-cell;vertical-align:middle;background-color:#fff}.spf-field-repeater .spf-repeater-helper{width:100%;display:table-cell;vertical-align:middle;text-align:center;font-size:14px;line-height:1em;border-left:1px solid #eee;background-color:#f7f7f7}.spf-field-repeater .spf-repeater-helper i{display:inline-block;cursor:pointer;color:#999;padding:5px}.spf-field-repeater .spf-repeater-helper i:hover{color:#555}.spf-field-repeater .spf-repeater-helper-inner{width:75px}.spf-field-repeater .spf-repeater-alert{display:none;margin-bottom:5px;padding:10px 20px;color:#a94442;border:1px solid #ebccd1;background-color:#f2dede}.spf-field-repeater .widget-placeholder{height:50px;margin-bottom:3px;border:1px dashed #f1c40f;background-color:#fffae4}.spf-field-repeater .ui-sortable-helper{height:50px!important;overflow:hidden!important;border-color:#ccc!important;background-color:#eee!important;opacity:.5}.spf-field-repeater .ui-sortable-helper .spf-repeater-content,.spf-field-repeater .ui-sortable-helper .spf-repeater-helper{display:none}.spf-field-select select{max-width:100%}.spf-field-slider em{padding-left:5px;color:#aaa}.spf-field-slider input[type=text]{width:45px;margin-left:15px;text-align:center}.spf-field-slider .ui-slider{position:relative;width:100%;height:4px;border:none;background:#ddd;border-radius:2px}.spf-field-slider .ui-slider-range{height:4px;border:none;background:#222;border-radius:2px}.spf-field-slider .ui-slider-handle{position:absolute;width:18px;height:18px;top:-7px;margin-left:-8px;border:none;background:#222;border-radius:2px}.spf-field-slider .ui-slider-handle:hover,.spf-field-slider .ui-state-active{cursor:pointer;background:#444}.spf-field-sortable .spf-field{padding:10px}.spf-field-sortable .spf-field-text input{width:100%;max-width:100%}.spf-field-sortable .spf--sortable .spf--sortable-item{display:table;width:100%;margin-bottom:5px;border:1px solid #eee}.spf-field-sortable .spf--sortable .spf--sortable-item h4{font-size:1em}.spf-field-sortable .spf--sortable-content{width:100%;display:table-cell;vertical-align:middle;background-color:#fff}.spf-field-sortable .spf--sortable-helper{width:100%;display:table-cell;vertical-align:middle;text-align:center;font-size:14px;line-height:1em;border-left:1px solid #eee;background-color:#f7f7f7}.spf-field-sortable .spf--sortable-helper .fa{display:inline-block;cursor:pointer;width:50px;color:#555}.spf-field-sortable .spf--sortable-helper .fa:hover{opacity:.5}.spf-field-sortable .widget-placeholder{height:50px;margin-bottom:3px;border:1px dashed #f1c40f;background-color:#fffae4}.spf-field-sortable .ui-sortable-helper{height:50px!important;overflow:hidden!important;border-color:#ccc!important;background-color:#eee!important;opacity:.5}.spf-field-sortable .ui-sortable-helper .spf--sortable-content,.spf-field-sortable .ui-sortable-helper .spf--sortable-helper{display:none}.spf-field-sorter .ui-sortable-placeholder{height:20px;border:1px dashed #f1c40f;background-color:#fffae4}.spf-field-sorter .spf-modules{float:left;width:50%;box-sizing:border-box}.spf-field-sorter .spf-modules:first-child{padding-right:15px}.spf-field-sorter .spf-modules:last-child{padding-left:15px}.spf-field-sorter .spf-disabled,.spf-field-sorter .spf-enabled{padding:5px 15px;border:1px dashed #ddd;background-color:#fff}.spf-field-sorter .spf-disabled li{transition:opacity .15s;opacity:.5}.spf-field-sorter .spf-disabled .ui-sortable-helper{opacity:1}.spf-field-sorter .spf-sorter-title{font-size:13px;font-weight:600;padding:10px;text-align:center;border:1px dashed #ddd;border-bottom:none;background-color:#f8f8f8;text-transform:uppercase}.spf-field-sorter ul{list-style-type:none;margin:0;padding:0;min-height:62px}.spf-field-sorter ul li{margin:10px 0;padding:10px 15px;cursor:move;font-weight:700;text-align:center;border:1px solid #e5e5e5;background-color:#fafafa;transition:border-color .15s}.spf-field-sorter ul li:hover{border-color:#bbb}.spf-field-spinner .spf--spin{float:left}.spf-field-spinner .spf--unit{float:right;height:30px;line-height:26px;text-align:center;border-left:none;color:#999;border:1px solid #ddd;border-left:0;background-color:#eee;padding:0 6px;margin:0;box-sizing:border-box}.spf-field-spinner .ui-spinner-button{cursor:pointer;position:relative;overflow:hidden;margin:0;padding:0;width:30px;height:30px;line-height:30px;text-align:center;border:1px solid #ddd;color:#555;background-color:#eee;box-sizing:border-box}.spf-field-spinner .ui-spinner-button:hover{background-color:#e7e7e7}.spf-field-spinner .ui-spinner-button:active{background-color:#ddd}.spf-field-spinner .ui-spinner-button:before{font-family:FontAwesome;font-size:16px;line-height:16px}.spf-field-spinner .ui-spinner-down{float:left;border-right:0;border-radius:2px 0 0 2px}.spf-field-spinner .ui-spinner-down:before{content:"\f0d9"}.spf-field-spinner .ui-spinner-up{float:right;border-left:0;border-radius:0 2px 2px 0}.spf-field-spinner .ui-spinner-up:before{content:"\f0da"}.spf-field-spinner input{width:50px;text-align:center;margin:0;padding:0 8px;height:30px;line-height:30px;border:1px solid #ddd}.spf-field-spinner input:focus{outline:0}.spf-field-spinner .ui-button-text{display:none}.spf-field-switcher .spf--switcher,.spf-field-switcherf .spf--switcher{float:left;cursor:pointer;position:relative;width:60px;height:26px;padding:0;margin:0;overflow:hidden;border-radius:4px;background-color:#ed6f6f;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}.spf-field-switcher .spf--ball,.spf-field-switcherf .spf--ball{position:absolute;top:4px;left:4px;width:24px;height:18px;background-color:#fff;border-radius:4px;transition:all .1s;box-shadow:1px 1px 1px rgba(0,0,0,.15)}.spf-field-switcher .spf--off,.spf-field-switcher .spf--on,.spf-field-switcherf .spf--off,.spf-field-switcherf .spf--on{position:absolute;top:0;left:0;right:0;font-size:11px;line-height:26px;font-weight:500;font-style:normal;text-align:center;text-transform:uppercase;color:#fff;padding-right:28px;opacity:0;transition:all .1s}.spf-field-switcher .spf--off,.spf-field-switcherf .spf--off{padding-right:0;padding-left:28px;opacity:1}.spf-field-switcher .spf--active{background:#4fb845}.spf-field-switcher .spf--active .spf--on,.spf-field-switcherf .spf--active .spf--on{opacity:1}.spf-field-switcher .spf--active .spf--off,.spf-field-switcherf .spf--active .spf--off{opacity:0}.spf-field-switcher .spf--active .spf--ball,.spf-field-switcherf .spf--active .spf--ball{left:100%;margin-left:-28px}.spf-field-switcher .spf--label,.spf-field-switcherf .spf--label{float:left;margin-top:4px;margin-left:8px;font-weight:400;color:#999}.spf-field-switcher input,.spf-field-switcherf input{display:none}.spf-field-tabbed .spf-tabbed-section{border:1px solid #eee;background:#fff}.spf-field-tabbed .spf-tabbed-nav .spf--icon{padding-right:5px}.spf-field-tabbed .spf-tabbed-nav a{display:inline-block;padding:12px 15px;margin-top:1px;margin-right:5px;margin-bottom:-1px;position:relative;text-decoration:none;color:#444;font-weight:600;background-color:#f3f3f3;border:1px solid #eee;transition:all .2s}.spf-field-tabbed .spf-tabbed-nav a:hover{background-color:#f9f9f9}.spf-field-tabbed .spf-tabbed-nav a.spf-tabbed-active{background-color:#fff;border-bottom-color:#fff}.spf-field-tabbed .spf-tabbed-nav a:focus{box-shadow:none}.spf-field-text input{width:340px;max-width:100%}.spf-field-textarea textarea{width:100%;max-width:100%;min-height:125px}.spf-field-textarea .spf-shortcode-button{margin-bottom:10px;margin-right:5px}.spf-field-typography select,.spf-field-typography textarea{margin:0;width:100%}.spf-field-typography .spf--title{color:#999;margin:0 0 2px 0}.spf-field-typography .spf--title small{vertical-align:top}.spf-field-typography .spf--blocks{display:flex;flex-wrap:wrap}.spf-field-typography .spf--block{padding-right:5px;padding-bottom:10px;box-sizing:border-box}.spf-field-typography .spf--block .spf--block{padding-right:0;padding-bottom:0}.spf-field-typography .spf--blocks-selects .spf--block{flex:1 33.3%}.spf-field-typography .spf--blocks-inputs .spf--block{flex:1 25%}.spf-field-typography .spf--blocks-inputs .spf--block .spf--block{flex:1}.spf-field-typography .spf--input{margin:0;width:100%;border-radius:4px 0 0 4px}.spf-field-typography .spf--unit{min-width:40px;max-width:40px;padding:4px 0;font-size:12px;font-weight:400;text-align:center;color:#777;border:1px solid #ddd;background-color:#eee;border-radius:0 2px 2px 0;border-left:0}.spf-field-typography .spf--preview{font-size:16px;line-height:20px;padding:20px;color:#222;border:1px solid #eee;background-color:#fff;border-radius:2.5px;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none;transition:background-color .2s,border-color .2s}.spf-field-typography .spf--block-preview{cursor:pointer;position:relative;overflow:hidden;margin-top:10px;max-width:100%}.spf-field-typography .spf--black-background{border-color:#000;background-color:#000}.spf-field-typography .spf--toggle{position:absolute;top:5px;right:10px;color:#999}.spf-field-typography .spf--block-extra-styles{margin-top:5px}.spf-field-upload input{width:100%}.spf-field-upload .spf--wrap{display:flex}.spf-field-upload .spf--buttons{display:flex;margin-left:5px}.spf-field-upload .spf--remove{margin-left:5px}.spf-field-wp_editor .spf-wp-editor{float:left;width:100%}.spf-field-wp_editor .mce-toolbar-grp{border:none}.spf-field-wp_editor .mce-btn.mce-active button,.spf-field-wp_editor .mce-btn.mce-active i,.spf-field-wp_editor .mce-btn.mce-active:hover button,.spf-field-wp_editor .mce-btn.mce-active:hover i{color:#23282d}.spf-field-wp_editor .wp-media-buttons{position:relative;z-index:2}.spf-field-wp_editor .wp-editor-tabs{position:relative;z-index:1}.spf-field-wp_editor .spf-no-tinymce{border:1px solid #e5e5e5}.spf-field-wp_editor .spf-no-quicktags .wp-media-buttons{float:none;display:block}.spf-field-wp_editor .spf-no-quicktags .mce-tinymce{box-shadow:none;border:1px solid #e5e5e5}.spf-field-wp_editor textarea{width:100%;max-width:100%;margin:0;box-shadow:none}.spf-field-heading{font-size:1.5em;font-weight:700;color:#23282d;background-color:#f5f5f5}.spf-field-subheading{font-size:14px;font-weight:700;padding-top:17px;padding-bottom:17px;color:#23282d;background-color:#f7f7f7}.spf-field-submessage{padding:0!important;border:0!important}.spf-field-submessage+.spf-field{border-top:0!important}.spf-submessage{font-size:12px;padding:17px 30px;border-top:1px solid transparent;border-bottom:1px solid transparent}.spf-submessage-success{color:#3c763d;border-color:#d6e9c6;background-color:#dff0d8}.spf-submessage-info{color:#31708f;border-color:#bce8f1;background-color:#d9edf7}.spf-submessage-warning{color:#8a6d3b;border-color:#faebcc;background-color:#fcf8e3}.spf-submessage-danger{color:#a94442;border-color:#ebccd1;background-color:#f2dede}.spf-submessage-normal{color:#23282d;border-color:#eee;background-color:#f7f7f7}.spf-field-notice{background-color:#f7f7f7}.spf-notice{padding:12px;background-color:#fff;border-left-style:solid;border-left-width:4px;box-shadow:0 1px 1px rgba(0,0,0,.1)}.spf-notice-success{border-color:#46b450}.spf-notice-info{border-color:#339fd4}.spf-notice-warning{border-color:#ffbc00}.spf-notice-danger{border-color:#dc3232}.spf-notice-normal{border-color:#222}.spf-help{cursor:help;position:absolute;top:0;right:0;padding:5px;font-size:14px;color:#aaa}.spf-help .spf-help-text{display:none}.spf-image-preview{display:inline-block;position:relative;padding:4px;min-width:44px;min-height:22px;margin-bottom:10px;border:1px solid #ccc;background-color:#f9f9f9;box-shadow:0 1px 0 rgba(0,0,0,.08)}.spf-image-preview img{max-height:90px;display:inline-block;vertical-align:middle}.spf-field-custom .spf-field{padding:0}.spf-field .chosen-container-single .chosen-single{height:28px;line-height:26px}.spf-field .chosen-container-single .chosen-single abbr{top:0;right:20px;font-family:FontAwesome;font-size:12px;height:100%;width:18px;color:#aaa;text-align:center;background:0 0}.spf-field .chosen-container-single .chosen-single abbr:before{content:"\f00d"}.spf-field .chosen-container-single .chosen-single abbr:hover{color:#555}.spf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close{font-family:FontAwesome;font-size:12px;height:100%;width:18px;color:#aaa;text-align:center;background:0 0}.spf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:before{content:"\f00d"}.spf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{color:#555}.spf-field .chosen-container-single .chosen-single div b{font-family:FontAwesome;font-size:14px;color:#aaa;background:0 0}.spf-field .chosen-container-single .chosen-single div b:before{content:"\f107"}.spf-field .chosen-container-single .chosen-single div b:hover{color:#555}.spf-field .chosen-container-active.chosen-with-drop .chosen-single div b:before{content:"\f106"}.spf-field .chosen-container-single .chosen-single-with-deselect span{margin-right:40px}.spf-field .chosen-container-single .chosen-search input[type=text]{background:0 0}.spf-field .chosen-container-single .chosen-search:before{font-family:FontAwesome;position:absolute;content:"\f002";font-size:11px;right:10px;top:7px;color:#aaa}.spf-field .wp-picker-container{display:inline-block}.spf-field .spf--transparent-wrap{display:none;position:relative;top:-1px;width:235px;padding:9px 10px;border:1px solid #dfdfdf;border-top:none;background-color:#fff}.spf-field .spf--transparent-slider{position:absolute;width:190px;margin-left:2px;height:18px}.spf-field .spf--transparent-slider .ui-slider-handle{position:absolute;top:-3px;bottom:-3px;z-index:5;border-color:#aaa;border-style:solid;border-width:4px 3px;width:10px;height:16px;margin:0 -5px;background:0 0;cursor:ew-resize;opacity:.9;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.2)}.spf-field .spf--transparent-slider .ui-slider-handle:before{content:" ";position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px solid #fff;border-radius:3px}.spf-field .spf--transparent-offset{height:18px;width:200px;background:url(../images/checkerboard.png) repeat-y center left scroll #fff;box-shadow:0 0 5px rgba(0,0,0,.4) inset;border-radius:2px}.spf-field .spf--transparent-text{position:absolute;top:12px;right:10px;width:30px;font-size:12px;line-height:12px;text-align:center;color:#999}.spf-field .spf--transparent-button{display:inline-block;text-align:center;cursor:pointer;margin-top:10px;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none;color:#999;transition:background-color .2s,border-color .2s,color .2s}.spf-field .spf--transparent-active .wp-color-result{background-image:url(../images/checkerboard.png);background-size:130%;background-position:center left;background-color:transparent!important}.spf-field .spf--transparent-active .spf--transparent-button{color:#fff;border-color:#4fb845;background-color:#4fb845}.spf-widgets>.spf-field{position:relative;top:-1px;margin-right:-15px;margin-left:-15px;padding:12px 15px}.spf-widgets>.spf-field .spf-field{margin-left:0;margin-right:0}.spf-widgets>.spf-field .spf-title{float:none;width:100%;margin-bottom:5px}.spf-widgets>.spf-field .spf-fieldset{margin-left:0}.spf-widgets .spf-field-text input{width:100%}.spf-widgets .spf-field-notice .spf-notice{padding:15px}.control-section .spf-widgets>.spf-field{margin-right:-10px;margin-left:-10px;padding:10px 12px}.control-section .spf-field{padding:0}.control-section .spf-field .spf-title{float:none;width:100%;margin-bottom:10px}.control-section .spf-field .spf-title h4{font-size:14px;font-weight:600;color:inherit}.control-section .spf-field .spf-fieldset{margin-left:0}.control-section .spf-field-select select{width:100%}.control-section .spf-field-heading{color:inherit;font-size:14px;line-height:1em;margin-right:-15px;margin-left:-15px;padding:15px}.control-section .spf-field-subheading{color:inherit;font-size:11px;margin-right:-15px;margin-left:-15px;padding:10px 15px}.control-section .spf-text-subtitle{margin-top:4px;font-size:12px}.control-section .spf-field-content,.control-section .spf-field-submessage .spf-submessage{margin-right:-15px;margin-left:-15px;padding:15px}.control-section .spf-fieldset .spf-field-heading,.control-section .spf-fieldset .spf-field-subheading,.control-section .spf-fieldset .spf-field-submessage .spf-submessage{margin-left:0;margin-right:0}.control-section .spf-field-date .spf--to{margin-left:0}.control-section .spf-field-sorter ul li{padding:5px}.control-section .spf-field-sorter .spf-modules{float:none;width:100%}.control-section .spf-field-sorter .spf-modules:first-child{padding-right:0;padding-bottom:15px}.control-section .spf-field-background .spf--select,.control-section .spf-field-background_adv .spf--select{width:100%}.control-section .spf-field-border select,.control-section .spf-field-column select,.control-section .spf-field-dimensions select,.control-section .spf-field-dimensions_advanced select,.control-section .spf-field-spacing select{width:auto}.control-section .spf-field-spinner input{width:50px}.control-section .spf-field-backup .spf-export-data{display:none}.control-section .spf-field-fieldset .spf-fieldset-content{border-color:#e5e5e5}.control-section .spf-field-fieldset .spf-field{padding:10px}.control-section .spf-field-fieldset .spf-field .spf-title{margin-bottom:5px}.control-section .spf-field-fieldset .spf-field h4{font-size:12px}.control-section .spf-field-accordion .spf-field,.control-section .spf-field-group .spf-field,.control-section .spf-field-repeater .spf-field,.control-section .spf-field-sortable .spf-field,.control-section .spf-field-tabbed .spf-field{padding:10px}.control-section .spf-field-accordion .spf-field .spf-title,.control-section .spf-field-group .spf-field .spf-title,.control-section .spf-field-repeater .spf-field .spf-title,.control-section .spf-field-sortable .spf-field .spf-title,.control-section .spf-field-tabbed .spf-field .spf-title{margin-bottom:5px}.control-section .spf-field-accordion .spf-field h4,.control-section .spf-field-group .spf-field h4,.control-section .spf-field-repeater .spf-field h4,.control-section .spf-field-sortable .spf-field h4,.control-section .spf-field-tabbed .spf-field h4{font-size:12px}.control-section .spf-dependency-control.hidden{display:none!important}.spf-taxonomy>.spf-field{border-top:none!important}.spf-taxonomy>.spf-field-heading{font-size:1.1em;padding:20px!important;border:1px solid #ddd}.spf-taxonomy>.spf-field-subheading{font-size:12px;padding:15px!important;border:1px solid #ddd}.spf-taxonomy>.spf-field-submessage .spf-submessage{padding:15px;border-left-width:1px;border-left-style:solid;border-right-width:1px;border-right-style:solid}.spf-taxonomy>.spf-field-notice{background-color:transparent}.spf-taxonomy .spf-section-title{display:block;padding:15px;background-color:#f9f9f9;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04)}.spf-taxonomy-add-fields>.spf-field{padding:8px 0}.spf-taxonomy-add-fields>.spf-field>.spf-title{float:none;width:100%;padding:2px 2px 4px 0}.spf-taxonomy-add-fields>.spf-field>.spf-title h4{font-size:12px;font-weight:400}.spf-taxonomy-add-fields>.spf-field>.spf-fieldset{margin-left:0}.spf-taxonomy-add-fields>.spf-field>.spf-fieldset>.spf-help{right:-5px}.spf-taxonomy-add-fields+p.submit{margin-top:0}.spf-taxonomy-edit-fields>.spf-field{padding:20px 0}.spf-taxonomy-edit-fields>.spf-field>.spf-title{width:225px}.spf-taxonomy-edit-fields>.spf-field>.spf-title h4{font-size:14px;font-weight:600;line-height:1.3;display:inline-block;vertical-align:middle}.spf-taxonomy-edit-fields>.spf-field>.spf-fieldset{margin-left:225px}.spf-taxonomy-edit-fields>.spf-field>.spf-fieldset>.spf-help{top:-5px;right:-5px}.spf-taxonomy-edit-fields>.spf-field-submessage{margin:20px 0}.spf-taxonomy-edit-fields>.spf-field-heading,.spf-taxonomy-edit-fields>.spf-field-subheading{margin:20px 0;border:1px solid #ddd}.spf-profile>h2>.fa{padding-right:7px}.spf-profile>.spf-field{padding:15px 0;border-top:none!important}.spf-profile>.spf-field>.spf-title{width:220px}.spf-profile>.spf-field>.spf-title h4{font-size:14px;font-weight:600;line-height:1.3;display:inline-block;vertical-align:middle}.spf-profile>.spf-field>.spf-fieldset{margin-left:220px}.spf-profile>.spf-field>.spf-fieldset>.spf-help{top:-15px;right:-5px}.spf-profile>.spf-field-heading{font-size:1.1em}.spf-profile>.spf-field-subheading{font-size:12px}.spf-profile>.spf-field-heading,.spf-profile>.spf-field-subheading{margin:10px 0;padding:15px!important;border:1px solid #ddd}.spf-profile>.spf-field-submessage{margin:20px 0}.spf-profile>.spf-field-submessage .spf-submessage{padding:10px;border-left-width:1px;border-left-style:solid;border-right-width:1px;border-right-style:solid}.spf-profile>.spf-field-notice{background-color:transparent}.spf-modal{display:none;position:fixed;z-index:100101;top:0;left:0;width:100%;height:100%}.spf-modal-icon{z-index:100102}.spf-modal-table{display:table;width:100%;height:100%}.spf-modal-table-cell{display:table-cell;vertical-align:middle;margin:100px 0}.spf-modal-inner{position:relative;z-index:10;width:760px;height:750px;margin:0 auto;background-color:#fff}.spf-modal-content{position:relative;overflow:hidden;overflow-y:auto;height:592px}.spf-modal-content .spf-shortcode-button{display:none}.spf-modal-content .spf-fieldset{margin-left:25%}.spf-modal-content .spf-title{width:20%}.spf-modal-content .spf-field{padding:15px 30px 15px 15px}.spf-modal-content a:active,.spf-modal-content a:focus{outline:0;box-shadow:none}.spf-modal-content h4{font-size:13px}.spf-modal-content h4 small{font-style:italic;font-weight:400;color:#aaa}.spf-modal-title{position:relative;background-color:#fcfcfc;border-bottom:1px solid #ddd;height:36px;font-size:16px;font-weight:600;line-height:36px;margin:0;padding:0 36px 0 16px}.spf-modal-header{width:100%;padding:16px 0;background-color:#f5f5f5;border-bottom:1px solid #eee}.spf-modal-header select{display:block;width:250px;margin:0 auto;background-color:#fff}.spf-modal-close{color:#666;padding:0;position:absolute;top:0;right:0;width:36px;height:36px;text-align:center;background:0 0;border:none;cursor:pointer}.spf-modal-close:before{font:normal 20px/36px dashicons;content:"\f158";vertical-align:top;width:36px;height:36px}.spf-modal-close:hover{opacity:.5}.spf-modal-insert-wrapper{text-align:center;width:100%;padding:16px 0;background-color:#f5f5f5;border-top:1px solid #eee}.spf-modal-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#000;opacity:.5}.spf--repeatable{padding:15px 15px 0 15px}.spf--repeat-button-block{text-align:center;padding-bottom:15px}.spf--repeat-shortcode{position:relative;margin-bottom:15px;border:1px dashed #ddd}.spf--repeat-shortcode:first-child .spf-repeat-remove{display:none}.spf--repeat-shortcode .spf-repeat-remove{position:absolute;right:10px;top:10px;z-index:10;cursor:pointer;display:inline-block;font-size:11px;width:18px;height:18px;line-height:18px;text-align:center;border-radius:2px;color:#fff;background-color:#e14d43;opacity:.5}.spf--repeat-shortcode .spf-repeat-remove:hover{opacity:1}.spf-shortcode-single .spf-modal-inner{height:750px}.spf-shortcode-single .spf-modal-content{height:652px}.elementor-editor-active .spf-shortcode-button{margin-left:5px}.elementor-editor-active .spf-modal .hidden{display:none!important}.spf-modal-icon .spf-icon-title{padding:15px 0;margin:4px;font-size:14px;font-weight:700;text-align:center;border:1px solid #eee;background-color:#f7f7f7}.spf-modal-icon .spf-icon-search{width:250px;height:40px;line-height:40px}.spf-modal-icon a{display:inline-block;padding:4px;cursor:pointer}.spf-modal-icon a .spf-icon{position:relative;padding:4px;display:inline-block;font-size:14px;width:30px;height:26px;line-height:26px;text-align:center;vertical-align:top;color:#555;border:1px solid #ccc;background-color:#f7f7f7;border-radius:3px;box-shadow:0 1px 0 rgba(0,0,0,.08);box-sizing:content-box}.spf-modal-icon a:hover .spf-icon{color:#fff;border-color:#222;background-color:#222}.spf-modal-icon .spf-modal-content{padding:10px;height:618px}.spf-modal-icon .spf-text-error{padding:10px}.spf-modal-loading{display:none;position:absolute;left:15px;top:15px}.spf-loading{position:relative;width:20px;height:20px;background:#ccc;border-radius:20px;box-shadow:0 2px 5px rgba(0,0,0,.07)}.spf-loading:after{position:absolute;top:50%;left:50%;width:4px;height:4px;content:"";margin-top:-2px;margin-left:-2px;background-color:#fff;-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-name:csfLoader;animation-name:csfLoader;border-radius:4px}@-webkit-keyframes csfLoader{0%{transform:rotate(0) translateX(-6px) rotate(0)}100%{transform:rotate(360deg) translateX(-6px) rotate(-360deg)}}@keyframes csfLoader{0%{transform:rotate(0) translateX(-6px) rotate(0)}100%{transform:rotate(360deg) translateX(-6px) rotate(-360deg)}}.spf-text-desc,.spf-text-subtitle{font-weight:400;font-style:italic;margin-top:4px;color:#999}.spf-text-success{color:#2b542c}.spf-text-error{color:#d02c21}.spf-text-info{color:#31708f}.spf-text-warning{color:#ffb900}.spf-text-muted{color:#aaa}.spf-text-left{text-align:left}.spf-text-center{text-align:center}.spf-text-right{text-align:right}.spf-block-left{float:left}.spf-block-right{float:right}.spf-full-width{width:100%}.spf-full-half{width:50%}.spf-table{width:100%;display:table}.spf-table-cell{display:table-cell;vertical-align:middle}.spf-table-expanded{width:100%}.spf-nowrap{white-space:nowrap}.spf-text-highlight{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:2px}.spf-text-highlight-gray{padding:2px 4px;font-size:90%;background-color:#f0f0f0;border-radius:2px}.spf-hidden{display:none}.spf-hide{display:none!important}.spf-show{display:block!important}.spf-opacity{opacity:.5}.spf-warning-primary{color:#fff!important;border-color:#d02c21 #ba281e #ba281e!important;background:#e14d43!important;box-shadow:0 1px 0 #ba281e!important;text-shadow:0 -1px 1px #ba281e,1px 0 1px #ba281e,0 1px 1px #ba281e,-1px 0 1px!important;text-shadow:0 -1px 1px #ba281e,1px 0 1px #ba281e,0 1px 1px #ba281e,-1px 0 1px #ba281e!important}.spf-warning-primary:focus,.spf-warning-primary:hover{border-color:#ba281e!important;background:#e35950!important;box-shadow:0 1px 0 #ba281e!important}.spf-warning-primary:active{border-color:#ba281e!important;background:#d02c21!important;box-shadow:inset 0 2px 0 #ba281e!important}.spf-form-result{display:none;padding:12px;margin:0 0 15px 0;background-color:#fff;border-left:4px solid #555;box-shadow:0 1px 1px rgba(0,0,0,.1)}.spf-form-show{display:block}.spf-form-error{border-left-color:#dc3232}.spf-form-success{border-left-color:#46b450}.spf-form-warning{border-left-color:#ffb900}.spf-form-info{border-left-color:#00a0d2}.spf-label-error{position:relative;top:-2px;display:inline-block;font-size:10px;line-height:10px;height:10px;width:10px;padding:1px;font-style:normal;text-align:center;color:#fff;vertical-align:middle;background-color:#e10000;border-radius:2px}.spf-no-option{padding:30px}.spf-welcome-wrap{position:relative;margin:25px 40px 0 20px;font-size:15px;max-width:1200px}.spf-welcome-wrap p{font-size:14px;line-height:1.5}.spf-welcome-wrap h1{margin:.2em 200px 0 0;padding:0;color:#32373c;line-height:1.2em;font-size:2.8em;font-weight:400}.spf-welcome-wrap .spf-logo{position:absolute;overflow:hidden;top:0;right:0;height:160px;width:140px;background-image:linear-gradient(45deg,#2d67cb,#ad19f3);box-shadow:0 1px 4px rgba(0,0,0,.25),inset 0 0 0 4px rgba(0,0,0,.25)}.spf-welcome-wrap .spf-logo .spf--effects i{position:absolute;width:200px;height:100px;background-color:rgba(0,0,0,.15);transform:rotate(-45deg)}.spf-welcome-wrap .spf-logo .spf--effects i:nth-child(1){bottom:-20px;right:-70px}.spf-welcome-wrap .spf-logo .spf--effects i:nth-child(2){bottom:-35px;right:-80px}.spf-welcome-wrap .spf-logo .spf--effects i:nth-child(3){bottom:-50px;right:-90px}.spf-welcome-wrap .spf-logo .spf--effects i:nth-child(4){bottom:-65px;right:-100px}.spf-welcome-wrap .spf-logo .spf--wp-logos{position:relative;padding-top:25px;text-align:center}.spf-welcome-wrap .spf-logo .spf--wp-logo{position:absolute;left:20px;width:20px;height:20px;background-repeat:no-repeat;background-position:center center;background-image:url(../images/wp-logo.svg)}.spf-welcome-wrap .spf-logo .spf--wp-plugin-logo{display:inline-block;width:50px;height:50px;border:3px solid #fff;background-size:40px;background-repeat:no-repeat;background-position:center center;background-image:url(../images/wp-plugin-logo.svg);border-radius:100%;vertical-align:middle}.spf-welcome-wrap .spf-logo .spf--text{position:absolute;left:0;right:0;top:90px;color:#fff;font-size:13px;line-height:1.2em;font-weight:600;text-align:center;text-transform:uppercase;text-shadow:1px 1px 0 rgba(0,0,0,.25)}.spf-welcome-wrap .spf-logo .spf--version{top:auto;left:auto;right:8px;bottom:4px;font-size:11px;text-transform:lowercase}.spf-welcome-wrap .spf-about-text{font-weight:400;line-height:1.6em;font-size:19px;margin:1em 200px 1em 0;color:#555d66}.spf-welcome-wrap .spf-demo-button{margin:1em 200px 2em 0}.spf-welcome-wrap .nav-tab-wrapper{margin-bottom:20px}.spf-welcome-wrap ul{list-style-type:disc;padding-left:15px}.spf-welcome-wrap .spf--col{float:left;padding-right:20px;box-sizing:border-box}.spf-welcome-wrap .spf--col-2{width:50%}.spf-welcome-wrap .spf--col-3{width:33.333%}.spf-welcome-wrap .spf--col-4{width:25%}.spf-welcome-wrap .spf--col-5{width:20%}.spf-welcome-wrap .spf--col-last{padding-right:0}.spf-welcome-wrap .spf--col-upgrade{padding-top:30px;text-align:center}.spf--table-compare tfoot td,.spf--table-compare thead td{text-align:center}.spf--table-compare td{font-size:14px;text-align:center;vertical-align:middle;padding:10px}.spf--table-compare td:first-child{text-align:left}.spf--table-compare tfoot td{padding:15px 0}.spf--table-compare .fa{font-size:12px;width:18px;height:18px;line-height:18px;padding:2px;text-align:center;color:#fff;background-color:#46b450;border-radius:100%}.spf--table-compare .fa-check{background-color:#46b450}.spf--table-compare .fa-times{background-color:#dc3232}.spf-welcome-cols{clear:both;margin:20px 0;background-color:#fff;padding:30px 0;border-radius:2px;box-shadow:0 1px 1px rgba(0,0,0,.15)}.spf-welcome-cols .spf--col{width:20%;float:left;padding:0 30px;box-sizing:border-box;text-align:center;border-right:1px solid #e5e5e5}.spf-welcome-cols .spf--block,.spf-welcome-cols .spf--left{float:left;width:20%;padding:0 30px;text-align:center;box-sizing:border-box}.spf-welcome-cols .spf--block{width:80%}.spf-welcome-cols .spf--last{border-right:none}.spf-welcome-cols .spf--space{height:20px}.spf-welcome-cols .spf--icon{display:inline-block;font-size:25px;width:50px;height:50px;line-height:50px;text-align:center;margin-bottom:10px;color:#fff;background-color:#555;border-radius:50px}.spf-welcome-cols .spf--active{background-color:#5cb85c}.spf-welcome-cols .spf--deactive{background-color:#e14d43}.spf-welcome-cols .spf--title{font-weight:700;display:block}.spf-welcome-cols p:last-child{margin-bottom:0}.spf-code-block{margin:20px 0;padding:5px 20px;background-color:#fff;border-radius:2px;box-shadow:0 1px 1px rgba(0,0,0,.15)}.spf-code-block pre{font-size:13px;color:#0073aa}.spf-code-block pre span{color:#999}.spf--table-fields td{font-size:14px}.spf--upgrade a{color:#5cb85c;font-weight:700}.spf--upgrade a:focus,.spf--upgrade a:hover{color:#4aa14a;outline:0;box-shadow:none}@media only screen and (max-width:1200px){.spf-metabox .spf-field .spf-title{float:none;width:100%;margin-bottom:10px}.spf-metabox .spf-field .spf-fieldset{margin-left:0}}@media only screen and (max-width:782px){.spf-header-inner{text-align:center}.spf-header-inner h1{width:100%;margin-bottom:10px}.spf-header-left,.spf-header-right,.spf-search{width:100%}.spf-search{text-align:center;margin-bottom:15px}.spf-footer{text-align:center}.spf-buttons{float:none}.spf-copyright{float:none;margin-top:10px}.sp-wpcp-options .spf-nav,.spf-expand-all,.spf-nav,.spf-nav-background,.spf-reset-section{display:none!important}.sp-wpcp-options .spf-content,.spf-content{margin-left:0}.sp-wpcp-options .spf-section,.spf-section,.spf-section-title{display:block!important}.spf-field .spf-title{float:none;width:100%;margin-bottom:10px}.spf-field .spf-fieldset{margin-left:0}.spf-field-radio ul li{margin-top:4px}.spf-modal-inner{width:350px;height:380px}.spf-modal-content{height:282px}.spf-icon-dialog .spf-modal-inner{width:305px;height:380px}.spf-icon-dialog .spf-modal-content{height:267px}.spf-modal-icon .spf-modal-inner{width:330px;height:385px}.spf-modal-icon .spf-modal-content{height:252px}.spf-profile>.spf-field>.spf-title{float:none;width:100%;margin-bottom:10px}.spf-profile>.spf-field>.spf-fieldset{margin-left:0}}.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chosen-container *{box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;z-index:1010;max-width:390px;width:100%;border:1px solid #aaa;border-top:0;background:#fff;box-shadow:0 4px 5px rgba(0,0,0,.15);clip:rect(0,0,0,0);-webkit-clip-path:inset(100% 100%);clip-path:inset(100% 100%)}.chosen-container.chosen-with-drop .chosen-drop{clip:auto;-webkit-clip-path:none;clip-path:none}.chosen-container a{cursor:pointer}.chosen-container .chosen-single .group-name,.chosen-container .search-choice .group-name{margin-right:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:400;color:#999}.chosen-container .chosen-single .group-name:after,.chosen-container .search-choice .group-name:after{content:":";padding-left:2px;vertical-align:top}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:25px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:linear-gradient(#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;font-size:1px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;clip:rect(0,0,0,0);-webkit-clip-path:inset(100% 100%);clip-path:inset(100% 100%)}.chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer;max-width:390px}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;max-width:390px;height:auto;border:1px solid #aaa;background-color:#fff;background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:0;height:25px;outline:0;border:0!important;background:0 0!important;box-shadow:none;color:#999;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0;width:25px}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 5px 3px 0;padding:3px 20px 3px 5px;border:1px solid #aaa;max-width:100%;border-radius:3px;background-color:#eee;background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-size:100% 19px;background-repeat:repeat-x;background-clip:padding-box;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice span{word-wrap:break-word}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:none;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;border-bottom-right-radius:0;border-bottom-left-radius:0;background-image:linear-gradient(#eee 20%,#fff 80%);box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:none;background:0 0}.chosen-container-active .chosen-choices{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#222!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-single{cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;direction:rtl}#sp_wpcp_shortcode_options{border-top-color:#f1f1f1}#sp_wpcp_shortcode_options .spf-nav ul li{margin-bottom:-1px}#sp_wpcp_shortcode_options .spf-nav.spf-nav-metabox{border-right-color:#f1f1f1;border-right-color:#f1f1f1;background:#f1f1f1;margin-right:-2px}#sp_wpcp_shortcode_options .spf-content{border-top:1px solid #e5e5e5;box-shadow:0 -1px 1px rgba(0,0,0,.04)}#spf-section-sp_wpcp_upload_options_1 .spf-field-carousel_type .spf-title,#spf-section-sp_wpcp_upload_options_1 .spf-field-gallery .spf-title,.wpcp-video-description .spf-title,.wpcp-video-field-wrapper>.spf-title,.wpcp_carousel_content_wrapper .spf-title{width:100%}#spf-section-sp_wpcp_upload_options_1 .spf-field-carousel_type .spf-fieldset,#spf-section-sp_wpcp_upload_options_1 .spf-field-gallery .spf-fieldset,.wpcp-video-description .spf-fieldset,.wpcp-video-field-wrapper>.spf-fieldset,.wpcp_carousel_content_wrapper .spf-fieldset{margin-top:30px;margin-left:0}#sp_wpcp_display_shortcode .handlediv,#sp_wpcp_display_shortcode .hndle,#sp_wpcp_display_shortcode .postbox-header,#sp_wpcp_shortcode_options .handlediv,#sp_wpcp_shortcode_options .hndle,#sp_wpcp_shortcode_options .postbox-header,#sp_wpcp_upload_options .handlediv,#sp_wpcp_upload_options .hndle,#sp_wpcp_upload_options .postbox-header{display:none}#spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header{background-color:#157592;background:linear-gradient(-45deg,#22afba,#157592);padding:20px 26px;overflow:hidden;height:33px}#spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header .support{margin-left:16px;float:right}#spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header .support a{color:#fff;text-decoration:none;line-height:35px;font-size:15px;font-weight:500}.spf-field-carousel_type .spf--image:nth-child(4),.spf-field-carousel_type .spf--image:nth-child(5){pointer-events:none}.spf-field-carousel_type .spf--image{position:relative}.spf-field-carousel_type .spf--image label strong{position:absolute;top:3px;right:3px;background:#cbd6df;padding:0 5px;font-size:10px}#sp_wpcp_shortcode_options .hidden{display:none}.spf-field-shortcode.wpcp-admin-footer .wpcp-shortcode-selectable{background-color:rgba(82,179,217,.11);padding:10px 15px;display:inline-block;-webkit-touch-callout:all;-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all}#spf-section-sp_wpcp_display_shortcode_1 .spf-field{display:flex;padding:0;flex-wrap:wrap}.spf-field-shortcode.wpcp-admin-footer .wpcp-scode-wrap:first-of-type{border-right:1px solid #ddd}.spf-field-shortcode.wpcp-admin-footer .wpcp-scode-wrap{padding-top:22px;padding-bottom:22px;text-align:center;width:49%}.spf-field-shortcode.wpcp-admin-footer .wpcp-sc-title{font-weight:500;font-size:14px!important;padding-top:0!important;color:#4c5158;margin-right:5px}@media only screen and (max-width:990px){.spf-field-shortcode.wpcp-admin-footer .wpcp-scode-wrap:first-of-type{border-right:none;border-bottom:1px solid #ddd}.spf-field-shortcode.wpcp-admin-footer .wpcp-scode-wrap{width:100%}}.spf-field-button_set .spf--button.spf-pro-only,.spf-field-image_select .spf--image.spf-pro-only{color:rgba(85,85,85,.6)!important;background-color:rgba(247,247,247,.4)!important;pointer-events:none}.spf-field-button_set .spf--button.spf-pro-only:after,.spf-field-image_select .spf--image.spf-pro-only:after{position:absolute;top:0;right:0;color:#a5a5a5;background-color:#e0e0e0;font-weight:500;padding:0 4px;content:"PRO";text-align:center;font-size:8px;line-height:11px;opacity:1}#spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header img{max-width:200px}.sp_wp_carousel_page_wpcp_settings .wrap h1{display:none}
admin/views/wpcfree-metabox/assets/js/spf.js CHANGED
@@ -8,17 +8,17 @@
8
  * -----------------------------------------------------------
9
  *
10
  */
11
- ;(function( $, window, document, undefined ) {
12
  'use strict';
13
 
14
  //
15
  // Constants
16
  //
17
- var SP_WPCF = SP_WPCF || {};
18
 
19
  SP_WPCF.funcs = {};
20
 
21
- SP_WPCF.vars = {
22
  onloaded: false,
23
  $body: $('body'),
24
  $window: $(window),
@@ -35,34 +35,34 @@
35
  //
36
  // Generate UID
37
  //
38
- uid: function( prefix ) {
39
- return ( prefix || '' ) + Math.random().toString(36).substr(2, 9);
40
  },
41
 
42
  // Quote regular expression characters
43
  //
44
- preg_quote: function( str ) {
45
- return (str+'').replace(/(\[|\-|\])/g, "\\$1");
46
  },
47
 
48
  //
49
  // Reneme input names
50
  //
51
- name_nested_replace: function( $selector, field_id ) {
52
 
53
  var checks = [];
54
- var regex = new RegExp('('+ SP_WPCF.helper.preg_quote(field_id) +')\\[(\\d+)\\]', 'g');
55
 
56
- $selector.find(':radio').each(function() {
57
- if( this.checked || this.orginal_checked ) {
58
  this.orginal_checked = true;
59
  }
60
  });
61
 
62
- $selector.each( function( index ) {
63
- $(this).find(':input').each(function() {
64
- this.name = this.name.replace(regex, field_id +'['+ index +']');
65
- if( this.orginal_checked ) {
66
  this.checked = true;
67
  }
68
  });
@@ -73,20 +73,20 @@
73
  //
74
  // Debounce
75
  //
76
- debounce: function( callback, threshold, immediate ) {
77
  var timeout;
78
- return function() {
79
  var context = this, args = arguments;
80
- var later = function() {
81
  timeout = null;
82
- if( !immediate ) {
83
  callback.apply(context, args);
84
  }
85
  };
86
- var callNow = ( immediate && !timeout );
87
- clearTimeout( timeout );
88
- timeout = setTimeout( later, threshold );
89
- if( callNow ) {
90
  callback.apply(context, args);
91
  }
92
  };
@@ -95,65 +95,65 @@
95
  //
96
  // Get a cookie
97
  //
98
- get_cookie: function( name ) {
99
 
100
  var e, b, cookie = document.cookie, p = name + '=';
101
 
102
- if( ! cookie ) {
103
  return;
104
  }
105
 
106
- b = cookie.indexOf( '; ' + p );
107
 
108
- if( b === -1 ) {
109
  b = cookie.indexOf(p);
110
 
111
- if( b !== 0 ) {
112
  return null;
113
  }
114
  } else {
115
  b += 2;
116
  }
117
 
118
- e = cookie.indexOf( ';', b );
119
 
120
- if( e === -1 ) {
121
  e = cookie.length;
122
  }
123
 
124
- return decodeURIComponent( cookie.substring( b + p.length, e ) );
125
 
126
  },
127
 
128
  //
129
  // Set a cookie
130
  //
131
- set_cookie: function( name, value, expires, path, domain, secure ) {
132
 
133
  var d = new Date();
134
 
135
- if( typeof( expires ) === 'object' && expires.toGMTString ) {
136
  expires = expires.toGMTString();
137
- } else if( parseInt( expires, 10 ) ) {
138
- d.setTime( d.getTime() + ( parseInt( expires, 10 ) * 1000 ) );
139
  expires = d.toGMTString();
140
  } else {
141
  expires = '';
142
  }
143
 
144
- document.cookie = name + '=' + encodeURIComponent( value ) +
145
- ( expires ? '; expires=' + expires : '' ) +
146
- ( path ? '; path=' + path : '' ) +
147
- ( domain ? '; domain=' + domain : '' ) +
148
- ( secure ? '; secure' : '' );
149
 
150
  },
151
 
152
  //
153
  // Remove a cookie
154
  //
155
- remove_cookie: function( name, path, domain, secure ) {
156
- SP_WPCF.helper.set_cookie( name, '', -1000, path, domain, secure );
157
  },
158
 
159
  };
@@ -161,23 +161,23 @@
161
  //
162
  // Custom clone for textarea and select clone() bug
163
  //
164
- $.fn.spf_clone = function() {
165
 
166
- var base = $.fn.clone.apply(this, arguments),
167
- clone = this.find('select').add(this.filter('select')),
168
- cloned = base.find('select').add(base.filter('select'));
169
 
170
- for( var i = 0; i < clone.length; ++i ) {
171
- for( var j = 0; j < clone[i].options.length; ++j ) {
172
 
173
- if( clone[i].options[j].selected === true ) {
174
  cloned[i].options[j].selected = true;
175
  }
176
 
177
  }
178
  }
179
 
180
- this.find(':radio').each( function() {
181
  this.orginal_checked = this.checked;
182
  });
183
 
@@ -188,9 +188,9 @@
188
  //
189
  // Expand All Options
190
  //
191
- $.fn.spf_expand_all = function() {
192
- return this.each( function() {
193
- $(this).on('click', function( e ) {
194
 
195
  e.preventDefault();
196
  $('.spf-wrapper').toggleClass('spf-show-all');
@@ -204,32 +204,32 @@
204
  //
205
  // Options Navigation
206
  //
207
- $.fn.spf_nav_options = function() {
208
- return this.each( function() {
209
 
210
- var $nav = $(this),
211
- $links = $nav.find('a'),
212
- $hidden = $nav.closest('.spf').find('.spf-section-id'),
213
- $last_section;
214
 
215
- $(window).on('hashchange', function() {
216
 
217
- var hash = window.location.hash.match(new RegExp('tab=([^&]*)'));
218
- var slug = hash ? hash[1] : $links.first().attr('href').replace('#tab=', '');
219
- var $link = $('#spf-tab-link-'+ slug);
220
 
221
- if( $link.length > 0 ) {
222
 
223
  $link.closest('.spf-tab-depth-0').addClass('spf-tab-active').siblings().removeClass('spf-tab-active');
224
  $links.removeClass('spf-section-active');
225
  $link.addClass('spf-section-active');
226
 
227
- if( $last_section !== undefined ) {
228
  $last_section.hide();
229
  }
230
 
231
- var $section = $('#spf-section-'+slug);
232
- $section.css({display: 'block'});
233
  $section.spf_reload_script();
234
 
235
  $hidden.val(slug);
@@ -246,48 +246,48 @@
246
  //
247
  // Metabox Tabs
248
  //
249
- $.fn.spf_nav_metabox = function() {
250
- return this.each( function() {
251
 
252
- var $nav = $(this),
253
- $links = $nav.find('a'),
254
- unique_id = $nav.data('unique'),
255
- post_id = $('#post_ID').val() || 'global',
256
- $last_section,
257
- $last_link;
258
 
259
- $links.on('click', function( e ) {
260
 
261
  e.preventDefault();
262
 
263
- var $link = $(this),
264
- section_id = $link.data('section');
265
 
266
- if( $last_link !== undefined ) {
267
  $last_link.removeClass('spf-section-active');
268
  }
269
 
270
- if( $last_section !== undefined ) {
271
  $last_section.hide();
272
  }
273
 
274
  $link.addClass('spf-section-active');
275
 
276
- var $section = $('#spf-section-'+section_id);
277
- $section.css({display: 'block'});
278
  $section.spf_reload_script();
279
 
280
- SP_WPCF.helper.set_cookie('spf-last-metabox-tab-'+ post_id +'-'+ unique_id, section_id);
281
 
282
  $last_section = $section;
283
- $last_link = $link;
284
 
285
  });
286
 
287
- var get_cookie = SP_WPCF.helper.get_cookie('spf-last-metabox-tab-'+ post_id +'-'+ unique_id);
288
 
289
- if( get_cookie ) {
290
- $nav.find('a[data-section="'+ get_cookie +'"]').trigger('click');
291
  } else {
292
  $links.first('a').trigger('click');
293
  }
@@ -298,15 +298,15 @@
298
  //
299
  // Metabox Page Templates Listener
300
  //
301
- $.fn.spf_page_templates = function() {
302
- if( this.length ) {
303
 
304
- $(document).on('change', '.editor-page-attributes__template select, #page_template', function() {
305
 
306
  var maybe_value = $(this).val() || 'default';
307
 
308
  $('.spf-page-templates').removeClass('spf-show').addClass('spf-hide');
309
- $('.spf-page-'+maybe_value.toLowerCase().replace(/[^a-zA-Z0-9]+/g,'-')).removeClass('spf-hide').addClass('spf-show');
310
 
311
  });
312
 
@@ -316,18 +316,18 @@
316
  //
317
  // Metabox Post Formats Listener
318
  //
319
- $.fn.spf_post_formats = function() {
320
- if( this.length ) {
321
 
322
- $(document).on('change', '.editor-post-format select, #formatdiv input[name="post_format"]', function() {
323
 
324
  var maybe_value = $(this).val() || 'default';
325
 
326
  // Fallback for classic editor version
327
- maybe_value = ( maybe_value === '0' ) ? 'default' : maybe_value;
328
 
329
  $('.spf-post-formats').removeClass('spf-show').addClass('spf-hide');
330
- $('.spf-post-format-'+maybe_value).removeClass('spf-hide').addClass('spf-show');
331
 
332
  });
333
 
@@ -337,30 +337,30 @@
337
  //
338
  // Search
339
  //
340
- $.fn.spf_search = function() {
341
- return this.each( function() {
342
 
343
- var $this = $(this),
344
- $input = $this.find('input');
345
 
346
- $input.on('change keyup', function() {
347
 
348
- var value = $(this).val(),
349
- $wrapper = $('.spf-wrapper'),
350
- $section = $wrapper.find('.spf-section'),
351
- $fields = $section.find('> .spf-field:not(.hidden)'),
352
- $titles = $fields.find('> .spf-title, .spf-search-tags');
353
 
354
- if( value.length > 3 ) {
355
 
356
  $fields.addClass('spf-hidden');
357
  $wrapper.addClass('spf-search-all');
358
 
359
- $titles.each( function() {
360
 
361
  var $title = $(this);
362
 
363
- if( $title.text().match( new RegExp('.*?' + value + '.*?', 'i') ) ) {
364
 
365
  var $field = $title.closest('.spf-field');
366
 
@@ -386,52 +386,52 @@
386
  //
387
  // Sticky Header
388
  //
389
- $.fn.spf_sticky = function() {
390
- return this.each( function() {
391
-
392
- var $this = $(this),
393
- $window = $(window),
394
- $inner = $this.find('.spf-header-inner'),
395
- padding = parseInt( $inner.css('padding-left') ) + parseInt( $inner.css('padding-right') ),
396
- offset = 32,
397
- scrollTop = 0,
398
- lastTop = 0,
399
- ticking = false,
400
- stickyUpdate = function() {
401
-
402
- var offsetTop = $this.offset().top,
403
- stickyTop = Math.max(offset, offsetTop - scrollTop ),
404
- winWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
405
-
406
- if( stickyTop <= offset && winWidth > 782 ) {
407
- $inner.css({width: $this.outerWidth()-padding});
408
- $this.css({height: $this.outerHeight()}).addClass( 'spf-sticky' );
409
- } else {
410
- $inner.removeAttr('style');
411
- $this.removeAttr('style').removeClass( 'spf-sticky' );
412
- }
413
 
414
- },
415
- requestTick = function() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
416
 
417
- if( !ticking ) {
418
- requestAnimationFrame( function() {
419
- stickyUpdate();
420
- ticking = false;
421
- });
422
- }
423
 
424
- ticking = true;
 
 
 
 
 
425
 
426
- },
427
- onSticky = function() {
 
 
428
 
429
- scrollTop = $window.scrollTop();
430
- requestTick();
431
 
432
- };
433
 
434
- $window.on( 'scroll resize', onSticky);
435
 
436
  onSticky();
437
 
@@ -441,32 +441,32 @@
441
  //
442
  // Dependency System
443
  //
444
- $.fn.spf_dependency = function() {
445
- return this.each( function() {
446
 
447
- var $this = $(this),
448
- ruleset = $.spf_deps.createRuleset(),
449
- depends = [],
450
- is_global = false;
451
 
452
- $this.children('[data-controller]').each( function() {
453
 
454
- var $field = $(this),
455
- controllers = $field.data('controller').split('|'),
456
- conditions = $field.data('condition').split('|'),
457
- values = $field.data('value').toString().split('|'),
458
- rules = ruleset;
459
 
460
- if( $field.data('depend-global') ) {
461
  is_global = true;
462
  }
463
 
464
- $.each(controllers, function( index, depend_id ) {
465
 
466
- var value = values[index] || '',
467
- condition = conditions[index] || conditions[0];
468
 
469
- rules = rules.createRule('[data-depend-id="'+ depend_id +'"]', condition, value);
470
 
471
  rules.include($field);
472
 
@@ -476,9 +476,9 @@
476
 
477
  });
478
 
479
- if( depends.length ) {
480
 
481
- if( is_global ) {
482
  $.spf_deps.enable(SP_WPCF.vars.$body, ruleset, depends);
483
  } else {
484
  $.spf_deps.enable($this, ruleset, depends);
@@ -492,27 +492,27 @@
492
  //
493
  // Field: accordion
494
  //
495
- $.fn.spf_field_accordion = function() {
496
- return this.each( function() {
497
 
498
  var $titles = $(this).find('.spf-accordion-title');
499
 
500
- $titles.on('click', function() {
501
 
502
- var $title = $(this),
503
- $icon = $title.find('.spf-accordion-icon'),
504
- $content = $title.next();
505
 
506
- if( $icon.hasClass('fa-angle-right') ) {
507
  $icon.removeClass('fa-angle-right').addClass('fa-angle-down');
508
  } else {
509
  $icon.removeClass('fa-angle-down').addClass('fa-angle-right');
510
  }
511
 
512
- if( !$content.data( 'opened' ) ) {
513
 
514
  $content.spf_reload_script();
515
- $content.data( 'opened', true );
516
 
517
  }
518
 
@@ -526,36 +526,36 @@
526
  //
527
  // Field: code_editor
528
  //
529
- $.fn.spf_field_code_editor = function() {
530
- return this.each( function() {
531
 
532
- if( typeof CodeMirror !== 'function' ) { return; }
533
 
534
- var $this = $(this),
535
- $textarea = $this.find('textarea'),
536
- $inited = $this.find('.CodeMirror'),
537
- data_editor = $textarea.data('editor');
538
 
539
- if( $inited.length ) {
540
  $inited.remove();
541
  }
542
 
543
  var interval = setInterval(function () {
544
- if( $this.is(':visible') ) {
545
 
546
- var code_editor = CodeMirror.fromTextArea( $textarea[0], data_editor );
547
 
548
  // load code-mirror theme css.
549
- if( data_editor.theme !== 'default' && SP_WPCF.vars.code_themes.indexOf(data_editor.theme) === -1 ) {
550
 
551
  var $cssLink = $('<link>');
552
 
553
- $('#spf-codemirror-css').after( $cssLink );
554
 
555
  $cssLink.attr({
556
  rel: 'stylesheet',
557
- id: 'spf-codemirror-'+ data_editor.theme +'-css',
558
- href: data_editor.cdnURL +'/theme/'+ data_editor.theme +'.min.css',
559
  type: 'text/css',
560
  media: 'all'
561
  });
@@ -564,11 +564,11 @@
564
 
565
  }
566
 
567
- CodeMirror.modeURL = data_editor.cdnURL +'/mode/%N/%N.min.js';
568
  CodeMirror.autoLoadMode(code_editor, data_editor.mode);
569
 
570
- code_editor.on( 'change', function( editor, event ) {
571
- $textarea.val( code_editor.getValue() ).trigger('change');
572
  });
573
 
574
  clearInterval(interval);
@@ -582,49 +582,49 @@
582
  //
583
  // Field: date
584
  //
585
- $.fn.spf_field_date = function() {
586
- return this.each( function() {
587
 
588
- var $this = $(this),
589
- $inputs = $this.find('input'),
590
- settings = $this.find('.spf-date-settings').data('settings'),
591
- wrapper = '<div class="spf-datepicker-wrapper"></div>',
592
- $datepicker;
593
 
594
  var defaults = {
595
  showAnim: '',
596
- beforeShow: function(input, inst) {
597
  $(inst.dpDiv).addClass('spf-datepicker-wrapper');
598
  },
599
- onClose: function( input, inst ) {
600
  $(inst.dpDiv).removeClass('spf-datepicker-wrapper');
601
  },
602
  };
603
 
604
  settings = $.extend({}, settings, defaults);
605
 
606
- if( $inputs.length === 2 ) {
607
 
608
  settings = $.extend({}, settings, {
609
- onSelect: function( selectedDate ) {
610
 
611
- var $this = $(this),
612
- $from = $inputs.first(),
613
- option = ( $inputs.first().attr('id') === $(this).attr('id') ) ? 'minDate' : 'maxDate',
614
- date = $.datepicker.parseDate( settings.dateFormat, selectedDate );
615
 
616
- $inputs.not(this).datepicker('option', option, date );
617
 
618
  }
619
  });
620
 
621
  }
622
 
623
- $inputs.each( function(){
624
 
625
  var $input = $(this);
626
 
627
- if( $input.hasClass('hasDatepicker') ) {
628
  $input.removeAttr('id').removeClass('hasDatepicker');
629
  }
630
 
@@ -638,8 +638,8 @@
638
  //
639
  // Field: fieldset
640
  //
641
- $.fn.spf_field_fieldset = function() {
642
- return this.each( function() {
643
  $(this).find('.spf-fieldset-content').spf_reload_script();
644
  });
645
  };
@@ -647,30 +647,30 @@
647
  //
648
  // Field: gallery
649
  //
650
- $.fn.spf_field_gallery = function() {
651
- return this.each( function() {
652
 
653
- var $this = $(this),
654
- $edit = $this.find('.spf-edit-gallery'),
655
- $clear = $this.find('.spf-clear-gallery'),
656
- $list = $this.find('ul.sp-gallery-images'),
657
- $input = $this.find('input'),
658
- $img = $this.find('img'),
659
- wp_media_frame;
660
 
661
- $this.on('click', '.spf-button, .spf-edit-gallery', function( e ) {
662
 
663
- var $el = $(this),
664
- ids = $input.val(),
665
- what = ( $el.hasClass('spf-edit-gallery') ) ? 'edit' : 'add',
666
- state = ( what === 'add' && !ids.length ) ? 'gallery' : 'gallery-edit';
667
 
668
  e.preventDefault();
669
 
670
- if( typeof window.wp === 'undefined' || ! window.wp.media || ! window.wp.media.gallery ) { return; }
671
 
672
- // Open media with state
673
- if( state === 'gallery' ) {
674
 
675
  wp_media_frame = window.wp.media({
676
  library: {
@@ -685,31 +685,31 @@
685
 
686
  } else {
687
 
688
- wp_media_frame = window.wp.media.gallery.edit( '[gallery ids="'+ ids +'"]' );
689
 
690
- if( what === 'add' ) {
691
  wp_media_frame.setState('gallery-library');
692
  }
693
 
694
  }
695
 
696
  // Media Update
697
- wp_media_frame.on( 'update', function( selection ) {
698
 
699
  $list.empty();
700
 
701
- var selectedIds = selection.models.map( function( attachment ) {
702
 
703
- var item = attachment.toJSON();
704
- var thumb = ( typeof item.sizes.thumbnail !== 'undefined' ) ? item.sizes.thumbnail.url : item.url;
705
 
706
- $list.append('<li><img src="'+ thumb +'"></li>');
707
 
708
  return item.id;
709
 
710
  });
711
 
712
- $input.val( selectedIds.join( ',' ) ).trigger('change');
713
  $clear.removeClass('hidden');
714
  $edit.removeClass('hidden');
715
 
@@ -717,7 +717,7 @@
717
 
718
  });
719
 
720
- $clear.on('click', function( e ) {
721
  e.preventDefault();
722
  $list.empty();
723
  $input.val('').trigger('change');
@@ -732,36 +732,36 @@
732
  //
733
  // Field: group
734
  //
735
- $.fn.spf_field_group = function() {
736
- return this.each( function() {
737
-
738
- var $this = $(this),
739
- $fieldset = $this.children('.spf-fieldset'),
740
- $group = $fieldset.length ? $fieldset : $this,
741
- $wrapper = $group.children('.spf-cloneable-wrapper'),
742
- $hidden = $group.children('.spf-cloneable-hidden'),
743
- $max = $group.children('.spf-cloneable-max'),
744
- $min = $group.children('.spf-cloneable-min'),
745
- field_id = $wrapper.data('field-id'),
746
- unique_id = $wrapper.data('unique-id'),
747
- is_number = Boolean( Number( $wrapper.data('title-number') ) ),
748
- max = parseInt( $wrapper.data('max') ),
749
- min = parseInt( $wrapper.data('min') );
750
 
751
  // clear accordion arrows if multi-instance
752
- if( $wrapper.hasClass('ui-accordion') ) {
753
  $wrapper.find('.ui-accordion-header-icon').remove();
754
  }
755
 
756
- var update_title_numbers = function( $selector ) {
757
- $selector.find('.spf-cloneable-title-number').each( function( index ) {
758
- $(this).html( ( $(this).closest('.spf-cloneable-item').index()+1 ) + '.' );
759
  });
760
  };
761
 
762
  $wrapper.accordion({
763
  header: '> .spf-cloneable-item > .spf-cloneable-title',
764
- collapsible : true,
765
  active: false,
766
  animate: false,
767
  heightStyle: 'content',
@@ -769,29 +769,29 @@
769
  'header': 'spf-cloneable-header-icon fa fa-angle-right',
770
  'activeHeader': 'spf-cloneable-header-icon fa fa-angle-down'
771
  },
772
- activate: function( event, ui ) {
773
 
774
- var $panel = ui.newPanel;
775
  var $header = ui.newHeader;
776
 
777
- if( $panel.length && !$panel.data( 'opened' ) ) {
778
 
779
  var $fields = $panel.children();
780
- var $first = $fields.first().find(':input').first();
781
- var $title = $header.find('.spf-cloneable-value');
782
 
783
- $first.on('keyup', function( event ) {
784
  $title.text($first.val());
785
  });
786
 
787
  $panel.spf_reload_script();
788
- $panel.data( 'opened', true );
789
- $panel.data( 'retry', false );
790
 
791
- } else if( $panel.data( 'retry' ) ) {
792
 
793
  $panel.spf_reload_script_retry();
794
- $panel.data( 'retry', false );
795
 
796
  }
797
 
@@ -804,26 +804,26 @@
804
  helper: 'original',
805
  cursor: 'move',
806
  placeholder: 'widget-placeholder',
807
- start: function( event, ui ) {
808
 
809
- $wrapper.accordion({ active:false });
810
  $wrapper.sortable('refreshPositions');
811
  ui.item.children('.spf-cloneable-content').data('retry', true);
812
 
813
  },
814
- update: function( event, ui ) {
815
 
816
- SP_WPCF.helper.name_nested_replace( $wrapper.children('.spf-cloneable-item'), field_id );
817
  $wrapper.spf_customizer_refresh();
818
 
819
- if( is_number ) {
820
  update_title_numbers($wrapper);
821
  }
822
 
823
  },
824
  });
825
 
826
- $group.children('.spf-cloneable-add').on('click', function( e ) {
827
 
828
  e.preventDefault();
829
 
@@ -831,38 +831,38 @@
831
 
832
  $min.hide();
833
 
834
- if( max && (count+1) > max ) {
835
  $max.show();
836
  return;
837
  }
838
 
839
- var new_field_id = unique_id + field_id + '['+ count +']';
840
 
841
  var $cloned_item = $hidden.spf_clone(true);
842
 
843
  $cloned_item.removeClass('spf-cloneable-hidden');
844
 
845
- $cloned_item.find(':input').each( function() {
846
- this.name = new_field_id + this.name.replace( ( this.name.startsWith('_nonce') ? '_nonce' : unique_id ), '');
847
  });
848
 
849
- $cloned_item.find('.spf-data-wrapper').each( function(){
850
- $(this).attr('data-unique-id', new_field_id );
851
  });
852
 
853
  $wrapper.append($cloned_item);
854
  $wrapper.accordion('refresh');
855
- $wrapper.accordion({active: count});
856
  $wrapper.spf_customizer_refresh();
857
- $wrapper.spf_customizer_listen({closest: true});
858
 
859
- if( is_number ) {
860
  update_title_numbers($wrapper);
861
  }
862
 
863
  });
864
 
865
- var event_clone = function( e ) {
866
 
867
  e.preventDefault();
868
 
@@ -870,21 +870,21 @@
870
 
871
  $min.hide();
872
 
873
- if( max && (count+1) > max ) {
874
  $max.show();
875
  return;
876
  }
877
 
878
- var $this = $(this),
879
- $parent = $this.parent().parent(),
880
- $cloned_helper = $parent.children('.spf-cloneable-helper').spf_clone(true),
881
- $cloned_title = $parent.children('.spf-cloneable-title').spf_clone(),
882
- $cloned_content = $parent.children('.spf-cloneable-content').spf_clone(),
883
- cloned_regex = new RegExp('('+ SP_WPCF.helper.preg_quote(field_id) +')\\[(\\d+)\\]', 'g');
884
 
885
- $cloned_content.find('.spf-data-wrapper').each( function(){
886
  var $this = $(this);
887
- $this.attr('data-unique-id', $this.attr('data-unique-id').replace(cloned_regex, field_id +'['+ ($parent.index()+1) +']') );
888
  });
889
 
890
  var $cloned = $('<div class="spf-cloneable-item" />');
@@ -895,13 +895,13 @@
895
 
896
  $wrapper.children().eq($parent.index()).after($cloned);
897
 
898
- SP_WPCF.helper.name_nested_replace( $wrapper.children('.spf-cloneable-item'), field_id );
899
 
900
  $wrapper.accordion('refresh');
901
  $wrapper.spf_customizer_refresh();
902
- $wrapper.spf_customizer_listen({closest: true});
903
 
904
- if( is_number ) {
905
  update_title_numbers($wrapper);
906
  }
907
 
@@ -910,7 +910,7 @@
910
  $wrapper.children('.spf-cloneable-item').children('.spf-cloneable-helper').on('click', '.spf-cloneable-clone', event_clone);
911
  $group.children('.spf-cloneable-hidden').children('.spf-cloneable-helper').on('click', '.spf-cloneable-clone', event_clone);
912
 
913
- var event_remove = function( e ) {
914
 
915
  e.preventDefault();
916
 
@@ -919,18 +919,18 @@
919
  $max.hide();
920
  $min.hide();
921
 
922
- if( min && (count-1) < min ) {
923
  $min.show();
924
  return;
925
  }
926
 
927
  $(this).closest('.spf-cloneable-item').remove();
928
 
929
- SP_WPCF.helper.name_nested_replace( $wrapper.children('.spf-cloneable-item'), field_id );
930
 
931
  $wrapper.spf_customizer_refresh();
932
 
933
- if( is_number ) {
934
  update_title_numbers($wrapper);
935
  }
936
 
@@ -945,24 +945,24 @@
945
  //
946
  // Field: media
947
  //
948
- $.fn.spf_field_media = function() {
949
- return this.each( function() {
950
 
951
- var $this = $(this),
952
- $upload_button = $this.find('.spf--button'),
953
- $remove_button = $this.find('.spf--remove'),
954
- $library = $upload_button.data('library') && $upload_button.data('library').split(',') || '',
955
- wp_media_frame;
956
 
957
- $upload_button.on('click', function( e ) {
958
 
959
  e.preventDefault();
960
 
961
- if( typeof window.wp === 'undefined' || ! window.wp.media || ! window.wp.media.gallery ) {
962
  return;
963
  }
964
 
965
- if( wp_media_frame ) {
966
  wp_media_frame.open();
967
  return;
968
  }
@@ -973,23 +973,23 @@
973
  }
974
  });
975
 
976
- wp_media_frame.on( 'select', function() {
977
 
978
  var thumbnail;
979
- var attributes = wp_media_frame.state().get('selection').first().attributes;
980
  var preview_size = $upload_button.data('preview-size') || 'thumbnail';
981
 
982
- $this.find('.spf--url').val( attributes.url );
983
- $this.find('.spf--id').val( attributes.id );
984
- $this.find('.spf--width').val( attributes.width );
985
- $this.find('.spf--height').val( attributes.height );
986
- $this.find('.spf--alt').val( attributes.alt );
987
- $this.find('.spf--title').val( attributes.title );
988
- $this.find('.spf--description').val( attributes.description );
989
 
990
- if( typeof attributes.sizes !== 'undefined' && typeof attributes.sizes.thumbnail !== 'undefined' && preview_size === 'thumbnail' ) {
991
  thumbnail = attributes.sizes.thumbnail.url;
992
- } else if( typeof attributes.sizes !== 'undefined' && typeof attributes.sizes.full !== 'undefined' ) {
993
  thumbnail = attributes.sizes.full.url;
994
  } else {
995
  thumbnail = attributes.icon;
@@ -998,7 +998,7 @@
998
  $remove_button.removeClass('hidden');
999
  $this.find('.spf--preview').removeClass('hidden');
1000
  $this.find('.spf--src').attr('src', thumbnail);
1001
- $this.find('.spf--thumbnail').val( thumbnail ).trigger('change');
1002
 
1003
  });
1004
 
@@ -1006,7 +1006,7 @@
1006
 
1007
  });
1008
 
1009
- $remove_button.on('click', function( e ) {
1010
  e.preventDefault();
1011
  $remove_button.addClass('hidden');
1012
  $this.find('.spf--preview').addClass('hidden');
@@ -1021,14 +1021,14 @@
1021
  //
1022
  // Field: spinner
1023
  //
1024
- $.fn.spf_field_spinner = function() {
1025
- return this.each( function() {
1026
 
1027
- var $this = $(this),
1028
- $input = $this.find('input'),
1029
- $inited = $this.find('.ui-spinner-button');
1030
 
1031
- if( $inited.length ) {
1032
  $inited.remove();
1033
  }
1034
 
@@ -1036,7 +1036,7 @@
1036
  max: $input.data('max') || 100,
1037
  min: $input.data('min') || 0,
1038
  step: $input.data('step') || 1,
1039
- spin: function (event, ui ) {
1040
  $input.val(ui.value).trigger('change');
1041
  }
1042
  });
@@ -1048,17 +1048,17 @@
1048
  //
1049
  // Field: switcher
1050
  //
1051
- $.fn.spf_field_switcher = function() {
1052
- return this.each( function() {
1053
 
1054
  var $switcher = $(this).find('.spf--switcher');
1055
 
1056
- $switcher.on('click', function() {
1057
 
1058
- var value = 0;
1059
  var $input = $switcher.find('input');
1060
 
1061
- if( $switcher.hasClass('spf--active') ) {
1062
  $switcher.removeClass('spf--active');
1063
  } else {
1064
  value = 1;
@@ -1075,20 +1075,20 @@
1075
  //
1076
  // Field: typography
1077
  //
1078
- $.fn.spf_field_typography = function() {
1079
  return this.each(function () {
1080
 
1081
- var base = this;
1082
- var $this = $(this);
1083
- var loaded_fonts = [];
1084
- var webfonts = spf_typography_json.webfonts;
1085
- var googlestyles = spf_typography_json.googlestyles;
1086
  var defaultstyles = spf_typography_json.defaultstyles;
1087
 
1088
  //
1089
  //
1090
  // Sanitize google font subset
1091
- base.sanitize_subset = function( subset ) {
1092
  subset = subset.replace('-ext', ' Extended');
1093
  subset = subset.charAt(0).toUpperCase() + subset.slice(1);
1094
  return subset;
@@ -1097,29 +1097,29 @@
1097
  //
1098
  //
1099
  // Sanitize google font styles (weight and style)
1100
- base.sanitize_style = function( style ) {
1101
  return googlestyles[style] ? googlestyles[style] : style;
1102
  };
1103
 
1104
  //
1105
  //
1106
  // Load google font
1107
- base.load_google_font = function( font_family, weight, style ) {
1108
 
1109
- if( font_family && typeof WebFont === 'object' ) {
1110
 
1111
  weight = weight ? weight.replace('normal', '') : '';
1112
- style = style ? style.replace('normal', '') : '';
1113
 
1114
- if( weight || style ) {
1115
- font_family = font_family +':'+ weight + style;
1116
  }
1117
 
1118
- if( loaded_fonts.indexOf( font_family ) === -1 ) {
1119
  WebFont.load({ google: { families: [font_family] } });
1120
  }
1121
 
1122
- loaded_fonts.push( font_family );
1123
 
1124
  }
1125
 
@@ -1128,31 +1128,31 @@
1128
  //
1129
  //
1130
  // Append select options
1131
- base.append_select_options = function( $select, options, condition, type, is_multi ) {
1132
 
1133
  $select.find('option').not(':first').remove();
1134
 
1135
  var opts = '';
1136
 
1137
- $.each( options, function( key, value ) {
1138
 
1139
  var selected;
1140
  var name = value;
1141
 
1142
  // is_multi
1143
- if( is_multi ) {
1144
- selected = ( condition && condition.indexOf(value) !== -1 ) ? ' selected' : '';
1145
  } else {
1146
- selected = ( condition && condition === value ) ? ' selected' : '';
1147
  }
1148
 
1149
- if( type === 'subset' ) {
1150
- name = base.sanitize_subset( value );
1151
- } else if( type === 'style' ){
1152
- name = base.sanitize_style( value );
1153
  }
1154
 
1155
- opts += '<option value="'+ value +'"'+ selected +'>'+ name +'</option>';
1156
 
1157
  });
1158
 
@@ -1166,24 +1166,24 @@
1166
  //
1167
  // Constants
1168
  var selected_styles = [];
1169
- var $typography = $this.find('.spf--typography');
1170
- var $type = $this.find('.spf--type');
1171
- var unit = $typography.data('unit');
1172
- var exclude_fonts = $typography.data('exclude') ? $typography.data('exclude').split(',') : [];
1173
 
1174
  //
1175
  //
1176
  // Chosen init
1177
- if( $this.find('.spf--chosen').length ) {
1178
 
1179
  var $chosen_selects = $this.find('select');
1180
 
1181
- $chosen_selects.each( function(){
1182
 
1183
  var $chosen_select = $(this),
1184
- $chosen_inited = $chosen_select.parent().find('.chosen-container');
1185
 
1186
- if( $chosen_inited.length ) {
1187
  $chosen_inited.remove();
1188
  }
1189
 
@@ -1201,26 +1201,26 @@
1201
  //
1202
  // Font family select
1203
  var $font_family_select = $this.find('.spf--font-family');
1204
- var first_font_family = $font_family_select.val();
1205
 
1206
  // Clear default font family select options
1207
  $font_family_select.find('option').not(':first-child').remove();
1208
 
1209
  var opts = '';
1210
 
1211
- $.each(webfonts, function( type, group ) {
1212
 
1213
  // Check for exclude fonts
1214
- if( exclude_fonts && exclude_fonts.indexOf(type) !== -1 ) { return; }
1215
 
1216
  opts += '<optgroup label="' + group.label + '">';
1217
 
1218
- $.each(group.fonts, function( key, value ) {
1219
 
1220
  // use key if value is object
1221
- value = ( typeof value === 'object' ) ? key : value;
1222
- var selected = ( value === first_font_family ) ? ' selected' : '';
1223
- opts += '<option value="'+ value +'" data-type="'+ type +'"'+ selected +'>'+ value +'</option>';
1224
 
1225
  });
1226
 
@@ -1236,19 +1236,19 @@
1236
  // Font style select
1237
  var $font_style_block = $this.find('.spf--block-font-style');
1238
 
1239
- if( $font_style_block.length ) {
1240
 
1241
  var $font_style_select = $this.find('.spf--font-style-select');
1242
- var first_style_value = $font_style_select.val() ? $font_style_select.val().replace(/normal/g, '' ) : '';
1243
 
1244
  //
1245
  //
1246
  // Extra font style select
1247
  var $extra_font_style_block = $this.find('.spf--block-extra-styles');
1248
 
1249
- if( $extra_font_style_block.length ) {
1250
  var $extra_font_style_select = $this.find('.spf--extra-styles');
1251
- var first_extra_style_value = $extra_font_style_select.val();
1252
  }
1253
 
1254
  }
@@ -1257,7 +1257,7 @@
1257
  //
1258
  // Subsets select
1259
  var $subset_block = $this.find('.spf--block-subset');
1260
- if( $subset_block.length ) {
1261
  var $subset_select = $this.find('.spf--subset');
1262
  var first_subset_select_value = $subset_select.val();
1263
  var subset_multi_select = $subset_select.data('multiple') || false;
@@ -1271,44 +1271,44 @@
1271
  //
1272
  //
1273
  // Font Family on Change Listener
1274
- $font_family_select.on('change spf.change', function( event ) {
1275
 
1276
  // Hide subsets on change
1277
- if( $subset_block.length ) {
1278
  $subset_block.addClass('hidden');
1279
  }
1280
 
1281
  // Hide extra font style on change
1282
- if( $extra_font_style_block.length ) {
1283
  $extra_font_style_block.addClass('hidden');
1284
  }
1285
 
1286
  // Hide backup font family on change
1287
- if( $backup_font_family_block.length ) {
1288
  $backup_font_family_block.addClass('hidden');
1289
  }
1290
 
1291
  var $selected = $font_family_select.find(':selected');
1292
- var value = $selected.val();
1293
- var type = $selected.data('type');
1294
 
1295
- if( type && value ) {
1296
 
1297
  // Show backup fonts if font type google or custom
1298
- if( ( type === 'google' || type === 'custom' ) && $backup_font_family_block.length ) {
1299
  $backup_font_family_block.removeClass('hidden');
1300
  }
1301
 
1302
  } else {
1303
 
1304
  // Clear subsets options if type and value empty
1305
- if( $subset_block.length ) {
1306
  $subset_select.find('option').not(':first-child').remove();
1307
  $subset_select.trigger('chosen:updated');
1308
  }
1309
 
1310
  // Clear font styles options if type and value empty
1311
- if( $font_style_block.length ) {
1312
  $font_style_select.find('option').not(':first-child').remove();
1313
  $font_style_select.trigger('chosen:updated');
1314
  }
@@ -1330,33 +1330,33 @@
1330
  //
1331
  // Field: upload
1332
  //
1333
- $.fn.spf_field_upload = function() {
1334
- return this.each( function() {
1335
-
1336
- var $this = $(this),
1337
- $input = $this.find('input'),
1338
- $upload_button = $this.find('.spf--button'),
1339
- $remove_button = $this.find('.spf--remove'),
1340
- $library = $upload_button.data('library') && $upload_button.data('library').split(',') || '',
1341
- wp_media_frame;
1342
 
1343
- $input.on('change', function( e ) {
1344
- if( $input.val() ) {
 
 
 
 
 
 
 
1345
  $remove_button.removeClass('hidden');
1346
  } else {
1347
  $remove_button.addClass('hidden');
1348
  }
1349
  });
1350
 
1351
- $upload_button.on('click', function( e ) {
1352
 
1353
  e.preventDefault();
1354
 
1355
- if( typeof window.wp === 'undefined' || ! window.wp.media || ! window.wp.media.gallery ) {
1356
  return;
1357
  }
1358
 
1359
- if( wp_media_frame ) {
1360
  wp_media_frame.open();
1361
  return;
1362
  }
@@ -1367,15 +1367,15 @@
1367
  },
1368
  });
1369
 
1370
- wp_media_frame.on( 'select', function() {
1371
- $input.val( wp_media_frame.state().get('selection').first().attributes.url ).trigger('change');
1372
  });
1373
 
1374
  wp_media_frame.open();
1375
 
1376
  });
1377
 
1378
- $remove_button.on('click', function( e ) {
1379
  e.preventDefault();
1380
  $input.val('').trigger('change');
1381
  });
@@ -1384,18 +1384,18 @@
1384
 
1385
  };
1386
 
1387
- //
1388
  // Confirm
1389
  //
1390
- $.fn.spf_confirm = function() {
1391
- return this.each( function() {
1392
- $(this).on('click', function( e ) {
1393
 
1394
- var confirm_text = $(this).data('confirm') || window.spf_vars.i18n.confirm;
1395
- var confirm_answer = confirm( confirm_text );
1396
  SP_WPCF.vars.is_confirm = true;
1397
 
1398
- if( !confirm_answer ) {
1399
  e.preventDefault();
1400
  SP_WPCF.vars.is_confirm = false;
1401
  return false;
@@ -1405,17 +1405,17 @@
1405
  });
1406
  };
1407
 
1408
- $.fn.serializeObject = function(){
1409
 
1410
  var obj = {};
1411
 
1412
- $.each( this.serializeArray(), function(i,o){
1413
  var n = o.name,
1414
  v = o.value;
1415
 
1416
- obj[n] = obj[n] === undefined ? v
1417
- : $.isArray( obj[n] ) ? obj[n].concat( v )
1418
- : [ obj[n], v ];
1419
  });
1420
 
1421
  return obj;
@@ -1425,91 +1425,91 @@
1425
  //
1426
  // Options Save
1427
  //
1428
- $.fn.spf_save = function() {
1429
- return this.each( function() {
1430
 
1431
- var $this = $(this),
1432
- $buttons = $('.spf-save'),
1433
- $panel = $('.spf-options'),
1434
- flooding = false,
1435
- timeout;
1436
 
1437
- $this.on('click', function( e ) {
1438
 
1439
- if( !flooding ) {
1440
 
1441
- var $text = $this.data('save'),
1442
- $value = $this.val();
1443
 
1444
  $buttons.attr('value', $text);
1445
 
1446
- if( $this.hasClass('spf-save-ajax') ) {
1447
 
1448
  e.preventDefault();
1449
 
1450
  $panel.addClass('spf-saving');
1451
  $buttons.prop('disabled', true);
1452
 
1453
- window.wp.ajax.post( 'spf_'+ $panel.data('unique') +'_ajax_save', {
1454
  data: $('#spf-form').serializeJSONSP_WPCF()
1455
  })
1456
- .done( function( response ) {
1457
 
1458
- clearTimeout(timeout);
1459
 
1460
- var $result_success = $('.spf-form-success');
1461
 
1462
- $result_success.empty().append(response.notice).slideDown('fast', function() {
1463
- timeout = setTimeout( function() {
1464
- $result_success.slideUp('fast');
1465
- }, 2000);
1466
- });
1467
 
1468
- // clear errors
1469
- $('.spf-error').remove();
1470
 
1471
- var $append_errors = $('.spf-form-error');
1472
 
1473
- $append_errors.empty().hide();
1474
 
1475
- if( Object.keys( response.errors ).length ) {
1476
 
1477
- var error_icon = '<i class="spf-label-error spf-error">!</i>';
1478
 
1479
- $.each(response.errors, function( key, error_message ) {
1480
 
1481
- var $field = $('[data-depend-id="'+ key +'"]'),
1482
- $link = $('#spf-tab-link-'+ ($field.closest('.spf-section').index()+1)),
1483
- $tab = $link.closest('.spf-tab-depth-0');
1484
 
1485
- $field.closest('.spf-fieldset').append( '<p class="spf-text-error spf-error">'+ error_message +'</p>' );
1486
 
1487
- if( !$link.find('.spf-error').length ) {
1488
- $link.append( error_icon );
1489
- }
1490
 
1491
- if( !$tab.find('.spf-arrow .spf-error').length ) {
1492
- $tab.find('.spf-arrow').append( error_icon );
1493
- }
1494
 
1495
- console.log(error_message);
1496
 
1497
- $append_errors.append( '<div>'+ error_icon +' '+ error_message + '</div>' );
1498
 
1499
- });
1500
 
1501
- $append_errors.show();
1502
 
1503
- }
1504
 
1505
- $panel.removeClass('spf-saving');
1506
- $buttons.prop('disabled', false).attr('value', $value);
1507
- flooding = false;
1508
 
1509
- })
1510
- .fail( function( response ) {
1511
- alert( response.error );
1512
- });
1513
 
1514
  }
1515
 
@@ -1525,26 +1525,26 @@
1525
  //
1526
  // Taxonomy Framework
1527
  //
1528
- $.fn.spf_taxonomy = function() {
1529
- return this.each( function() {
1530
 
1531
  var $this = $(this),
1532
- $form = $this.parents('form');
1533
 
1534
- if( $form.attr('id') === 'addtag' ) {
1535
 
1536
  var $submit = $form.find('#submit'),
1537
- $cloned = $this.find('.spf-field').spf_clone();
1538
 
1539
- $submit.on( 'click', function() {
1540
 
1541
- if( !$form.find('.form-required').hasClass('form-invalid') ) {
1542
 
1543
  $this.data('inited', false);
1544
 
1545
  $this.empty();
1546
 
1547
- $this.html( $cloned );
1548
 
1549
  $cloned = $cloned.spf_clone();
1550
 
@@ -1562,31 +1562,31 @@
1562
  //
1563
  // Shortcode Framework
1564
  //
1565
- $.fn.spf_shortcode = function() {
1566
 
1567
  var base = this;
1568
 
1569
- base.shortcode_parse = function( serialize, key ) {
1570
 
1571
  var shortcode = '';
1572
 
1573
- $.each(serialize, function( shortcode_key, shortcode_values ) {
1574
 
1575
- key = ( key ) ? key : shortcode_key;
1576
 
1577
  shortcode += '[' + key;
1578
 
1579
- $.each(shortcode_values, function( shortcode_tag, shortcode_value ) {
1580
 
1581
- if( shortcode_tag === 'content' ) {
1582
 
1583
  shortcode += ']';
1584
  shortcode += shortcode_value;
1585
- shortcode += '[/'+ key +'';
1586
 
1587
  } else {
1588
 
1589
- shortcode += base.shortcode_tags( shortcode_tag, shortcode_value );
1590
 
1591
  }
1592
 
@@ -1600,26 +1600,26 @@
1600
 
1601
  };
1602
 
1603
- base.shortcode_tags = function( shortcode_tag, shortcode_value ) {
1604
 
1605
  var shortcode = '';
1606
 
1607
- if( shortcode_value !== '' ) {
1608
 
1609
- if( typeof shortcode_value === 'object' && !$.isArray( shortcode_value ) ) {
1610
 
1611
- $.each(shortcode_value, function( sub_shortcode_tag, sub_shortcode_value ) {
1612
 
1613
  // sanitize spesific key/value
1614
- switch( sub_shortcode_tag ) {
1615
 
1616
  case 'background-image':
1617
- sub_shortcode_value = ( sub_shortcode_value.url ) ? sub_shortcode_value.url : '';
1618
- break;
1619
 
1620
  }
1621
 
1622
- if( sub_shortcode_value !== '' ) {
1623
  shortcode += ' ' + sub_shortcode_tag.replace('-', '_') + '="' + sub_shortcode_value.toString() + '"';
1624
  }
1625
 
@@ -1637,13 +1637,13 @@
1637
 
1638
  };
1639
 
1640
- base.insertAtChars = function( _this, currentValue ) {
1641
 
1642
- var obj = ( typeof _this[0].name !== 'undefined' ) ? _this[0] : _this;
1643
 
1644
- if( obj.value.length && typeof obj.selectionStart !== 'undefined' ) {
1645
  obj.focus();
1646
- return obj.value.substring( 0, obj.selectionStart ) + currentValue + obj.value.substring( obj.selectionEnd, obj.value.length );
1647
  } else {
1648
  obj.focus();
1649
  return currentValue;
@@ -1651,95 +1651,95 @@
1651
 
1652
  };
1653
 
1654
- base.send_to_editor = function( html, editor_id ) {
1655
 
1656
  var tinymce_editor;
1657
 
1658
- if( typeof tinymce !== 'undefined' ) {
1659
- tinymce_editor = tinymce.get( editor_id );
1660
  }
1661
 
1662
- if( tinymce_editor && !tinymce_editor.isHidden() ) {
1663
- tinymce_editor.execCommand( 'mceInsertContent', false, html );
1664
  } else {
1665
- var $editor = $('#'+editor_id);
1666
- $editor.val( base.insertAtChars( $editor, html ) ).trigger('change');
1667
  }
1668
 
1669
  };
1670
 
1671
- return this.each( function() {
1672
-
1673
- var $modal = $(this),
1674
- $load = $modal.find('.spf-modal-load'),
1675
- $content = $modal.find('.spf-modal-content'),
1676
- $insert = $modal.find('.spf-modal-insert'),
1677
- $loading = $modal.find('.spf-modal-loading'),
1678
- $select = $modal.find('select'),
1679
- modal_id = $modal.data('modal-id'),
1680
- nonce = $modal.data('nonce'),
1681
- editor_id,
1682
- target_id,
1683
- gutenberg_id,
1684
- sc_key,
1685
- sc_name,
1686
- sc_view,
1687
- sc_group,
1688
- $cloned,
1689
- $button;
1690
-
1691
- $(document).on('click', '.spf-shortcode-button[data-modal-id="'+ modal_id +'"]', function( e ) {
1692
 
1693
  e.preventDefault();
1694
 
1695
- $button = $(this);
1696
- editor_id = $button.data('editor-id') || false;
1697
- target_id = $button.data('target-id') || false;
1698
  gutenberg_id = $button.data('gutenberg-id') || false;
1699
 
1700
  $modal.show();
1701
 
1702
  // single usage trigger first shortcode
1703
- if( $modal.hasClass('spf-shortcode-single') && sc_name === undefined ) {
1704
  $select.trigger('change');
1705
  }
1706
 
1707
  });
1708
 
1709
- $select.on( 'change', function() {
1710
 
1711
- var $option = $(this);
1712
  var $selected = $option.find(':selected');
1713
 
1714
- sc_key = $option.val();
1715
- sc_name = $selected.data('shortcode');
1716
- sc_view = $selected.data('view') || 'normal';
1717
  sc_group = $selected.data('group') || sc_name;
1718
 
1719
  $load.empty();
1720
 
1721
- if( sc_key ) {
1722
 
1723
  $loading.show();
1724
 
1725
- window.wp.ajax.post( 'spf-get-shortcode-'+ modal_id, {
1726
  shortcode_key: sc_key,
1727
  nonce: nonce
1728
  })
1729
- .done( function( response ) {
1730
 
1731
- $loading.hide();
1732
 
1733
- var $appended = $(response.content).appendTo($load);
1734
 
1735
- $insert.parent().removeClass('hidden');
1736
 
1737
- $cloned = $appended.find('.spf--repeat-shortcode').spf_clone();
1738
 
1739
- $appended.spf_reload_script();
1740
- $appended.find('.spf-fields').spf_reload_script();
1741
 
1742
- });
1743
 
1744
  } else {
1745
 
@@ -1749,58 +1749,58 @@
1749
 
1750
  });
1751
 
1752
- $insert.on('click', function( e ) {
1753
 
1754
  e.preventDefault();
1755
 
1756
  var shortcode = '';
1757
  var serialize = $modal.find('.spf-field:not(.hidden)').find(':input').serializeObjectSP_WPCF();
1758
 
1759
- switch ( sc_view ) {
1760
 
1761
  case 'contents':
1762
- var contentsObj = ( sc_name ) ? serialize[sc_name] : serialize;
1763
- $.each(contentsObj, function( sc_key, sc_value ) {
1764
- var sc_tag = ( sc_name ) ? sc_name : sc_key;
1765
- shortcode += '['+ sc_tag +']'+ sc_value +'[/'+ sc_tag +']';
1766
  });
1767
- break;
1768
 
1769
  case 'group':
1770
 
1771
  shortcode += '[' + sc_name;
1772
- $.each(serialize[sc_name], function( sc_key, sc_value ) {
1773
- shortcode += base.shortcode_tags( sc_key, sc_value );
1774
  });
1775
  shortcode += ']';
1776
- shortcode += base.shortcode_parse( serialize[sc_group], sc_group );
1777
  shortcode += '[/' + sc_name + ']';
1778
 
1779
- break;
1780
 
1781
  case 'repeater':
1782
- shortcode += base.shortcode_parse( serialize[sc_group], sc_group );
1783
- break;
1784
 
1785
  default:
1786
- shortcode += base.shortcode_parse( serialize );
1787
- break;
1788
 
1789
  }
1790
 
1791
- if( gutenberg_id ) {
1792
 
1793
  var content = window.spf_gutenberg_props.attributes.hasOwnProperty('shortcode') ? window.spf_gutenberg_props.attributes.shortcode : '';
1794
- window.spf_gutenberg_props.setAttributes({shortcode: content + shortcode});
1795
 
1796
- } else if( editor_id ) {
1797
 
1798
- base.send_to_editor( shortcode, editor_id );
1799
 
1800
  } else {
1801
 
1802
  var $textarea = (target_id) ? $(target_id) : $button.parent().find('textarea');
1803
- $textarea.val( base.insertAtChars( $textarea, shortcode ) ).trigger('change');
1804
 
1805
  }
1806
 
@@ -1808,31 +1808,31 @@
1808
 
1809
  });
1810
 
1811
- $modal.on('click', '.spf--repeat-button', function( e ) {
1812
 
1813
  e.preventDefault();
1814
 
1815
  var $repeatable = $modal.find('.spf--repeatable');
1816
- var $new_clone = $cloned.spf_clone();
1817
  var $remove_btn = $new_clone.find('.spf-repeat-remove');
1818
 
1819
- var $appended = $new_clone.appendTo( $repeatable );
1820
 
1821
  $new_clone.find('.spf-fields').spf_reload_script();
1822
 
1823
- SP_WPCF.helper.name_nested_replace( $modal.find('.spf--repeat-shortcode'), sc_group );
1824
 
1825
- $remove_btn.on('click', function() {
1826
 
1827
  $new_clone.remove();
1828
 
1829
- SP_WPCF.helper.name_nested_replace( $modal.find('.spf--repeat-shortcode'), sc_group );
1830
 
1831
  });
1832
 
1833
  });
1834
 
1835
- $modal.on('click', '.spf-modal-close, .spf-modal-overlay', function() {
1836
  $modal.hide();
1837
  });
1838
 
@@ -1842,15 +1842,15 @@
1842
  //
1843
  // Helper Checkbox Checker
1844
  //
1845
- $.fn.spf_checkbox = function() {
1846
- return this.each( function() {
1847
 
1848
- var $this = $(this),
1849
- $input = $this.find('.spf--input'),
1850
- $checkbox = $this.find('.spf--checkbox');
1851
 
1852
- $checkbox.on('click', function() {
1853
- $input.val( Number( $checkbox.prop('checked') ) ).trigger('change');
1854
  });
1855
 
1856
  });
@@ -1859,21 +1859,21 @@
1859
  //
1860
  // Field: wp_editor
1861
  //
1862
- $.fn.spf_field_wp_editor = function() {
1863
- return this.each( function() {
1864
 
1865
- if( typeof window.wp.editor === 'undefined' || typeof window.tinyMCEPreInit === 'undefined' || typeof window.tinyMCEPreInit.mceInit.spf_wp_editor === 'undefined' ) {
1866
  return;
1867
  }
1868
 
1869
- var $this = $(this),
1870
- $editor = $this.find('.spf-wp-editor'),
1871
- $textarea = $this.find('textarea');
1872
 
1873
  // If there is wp-editor remove it for avoid dupliated wp-editor conflicts.
1874
  var $has_wp_editor = $this.find('.wp-editor-wrap').length || $this.find('.mce-container').length;
1875
 
1876
- if( $has_wp_editor ) {
1877
  $editor.empty();
1878
  $editor.append($textarea);
1879
  $textarea.css('display', '');
@@ -1894,42 +1894,42 @@
1894
  var field_editor_settings = $editor.data('editor-settings');
1895
 
1896
  // Add on change event handle
1897
- var editor_on_change = function( editor ) {
1898
- editor.on('change', SP_WPCF.helper.debounce( function() {
1899
  editor.save();
1900
  $textarea.trigger('change');
1901
- }, 250 ) );
1902
  };
1903
 
1904
  // Extend editor selector and on change event handler
1905
- default_editor_settings.tinymce = $.extend( {}, default_editor_settings.tinymce, { selector: '#'+ uid, setup: editor_on_change } );
1906
 
1907
  // Override editor tinymce settings
1908
- if( field_editor_settings.tinymce === false ) {
1909
  default_editor_settings.tinymce = false;
1910
  $editor.addClass('spf-no-tinymce');
1911
  }
1912
 
1913
  // Override editor quicktags settings
1914
- if( field_editor_settings.quicktags === false ) {
1915
  default_editor_settings.quicktags = false;
1916
  $editor.addClass('spf-no-quicktags');
1917
  }
1918
 
1919
  // Wait until :visible
1920
  var interval = setInterval(function () {
1921
- if( $this.is(':visible') ) {
1922
  window.wp.editor.initialize(uid, default_editor_settings);
1923
  clearInterval(interval);
1924
  }
1925
  });
1926
 
1927
  // Add Media buttons
1928
- if( field_editor_settings.media_buttons && window.spf_media_buttons ) {
1929
 
1930
  var $editor_buttons = $editor.find('.wp-media-buttons');
1931
 
1932
- if( $editor_buttons.length ) {
1933
 
1934
  $editor_buttons.find('.spf-shortcode-button').data('editor-id', uid);
1935
 
@@ -1939,7 +1939,7 @@
1939
 
1940
  $media_buttons.find('.spf-shortcode-button').data('editor-id', uid);
1941
 
1942
- $editor.prepend( $media_buttons );
1943
 
1944
  }
1945
 
@@ -1952,20 +1952,20 @@
1952
  //
1953
  // Siblings
1954
  //
1955
- $.fn.spf_siblings = function() {
1956
- return this.each( function() {
1957
 
1958
- var $this = $(this),
1959
- $siblings = $this.find('.spf--sibling'),
1960
- multiple = $this.data('multiple') || false;
1961
 
1962
- $siblings.on('click', function() {
1963
 
1964
  var $sibling = $(this);
1965
 
1966
- if( multiple ) {
1967
 
1968
- if( $sibling.hasClass('spf--active') ) {
1969
  $sibling.removeClass('spf--active');
1970
  $sibling.find('input').prop('checked', false).trigger('change');
1971
  } else {
@@ -1989,19 +1989,19 @@
1989
  //
1990
  // WP Color Picker
1991
  //
1992
- if( typeof Color === 'function' ) {
1993
 
1994
- Color.fn.toString = function() {
1995
 
1996
- if( this._alpha < 1 ) {
1997
  return this.toCSS('rgba', this._alpha).replace(/\s+/g, '');
1998
  }
1999
 
2000
- var hex = parseInt( this._color, 10 ).toString( 16 );
2001
 
2002
- if( this.error ) { return ''; }
2003
 
2004
- if( hex.length < 6 ) {
2005
  for (var i = 6 - hex.length - 1; i >= 0; i--) {
2006
  hex = '0' + hex;
2007
  }
@@ -2013,32 +2013,32 @@
2013
 
2014
  }
2015
 
2016
- SP_WPCF.funcs.parse_color = function( color ) {
2017
 
2018
  var value = color.replace(/\s+/g, ''),
2019
- trans = ( value.indexOf('rgba') !== -1 ) ? parseFloat( value.replace(/^.*,(.+)\)/, '$1') * 100 ) : 100,
2020
- rgba = ( trans < 100 ) ? true : false;
2021
 
2022
  return { value: value, transparent: trans, rgba: rgba };
2023
 
2024
  };
2025
 
2026
- $.fn.spf_color = function() {
2027
- return this.each( function() {
2028
 
2029
- var $input = $(this),
2030
- picker_color = SP_WPCF.funcs.parse_color( $input.val() ),
2031
- palette_color = window.spf_vars.color_palette.length ? window.spf_vars.color_palette : true,
2032
- $container;
2033
 
2034
  // Destroy and Reinit
2035
- if( $input.hasClass('wp-color-picker') ) {
2036
  $input.closest('.wp-picker-container').after($input).remove();
2037
  }
2038
 
2039
  $input.wpColorPicker({
2040
  palettes: palette_color,
2041
- change: function( event, ui ) {
2042
 
2043
  var ui_color_value = ui.color.toString();
2044
 
@@ -2047,32 +2047,32 @@
2047
  $input.val(ui_color_value).trigger('change');
2048
 
2049
  },
2050
- create: function() {
2051
 
2052
  $container = $input.closest('.wp-picker-container');
2053
 
2054
  var a8cIris = $input.data('a8cIris'),
2055
- $transparent_wrap = $('<div class="spf--transparent-wrap">' +
2056
- '<div class="spf--transparent-slider"></div>' +
2057
- '<div class="spf--transparent-offset"></div>' +
2058
- '<div class="spf--transparent-text"></div>' +
2059
- '<div class="spf--transparent-button button button-small">transparent</div>' +
2060
- '</div>').appendTo( $container.find('.wp-picker-holder') ),
2061
- $transparent_slider = $transparent_wrap.find('.spf--transparent-slider'),
2062
- $transparent_text = $transparent_wrap.find('.spf--transparent-text'),
2063
- $transparent_offset = $transparent_wrap.find('.spf--transparent-offset'),
2064
- $transparent_button = $transparent_wrap.find('.spf--transparent-button');
2065
-
2066
- if( $input.val() === 'transparent' ) {
2067
  $container.addClass('spf--transparent-active');
2068
  }
2069
 
2070
- $transparent_button.on('click', function() {
2071
- if( $input.val() !== 'transparent' ) {
2072
  $input.val('transparent').trigger('change').removeClass('iris-error');
2073
  $container.addClass('spf--transparent-active');
2074
  } else {
2075
- $input.val( a8cIris._color.toString() ).trigger('change');
2076
  $container.removeClass('spf--transparent-active');
2077
  }
2078
  });
@@ -2082,23 +2082,23 @@
2082
  step: 1,
2083
  min: 0,
2084
  max: 100,
2085
- slide: function( event, ui ) {
2086
 
2087
- var slide_value = parseFloat( ui.value / 100 );
2088
  a8cIris._color._alpha = slide_value;
2089
- $input.wpColorPicker( 'color', a8cIris._color.toString() );
2090
- $transparent_text.text( ( slide_value === 1 || slide_value === 0 ? '' : slide_value ) );
2091
 
2092
  },
2093
- create: function() {
2094
 
2095
- var slide_value = parseFloat( picker_color.transparent / 100 ),
2096
- text_value = slide_value < 1 ? slide_value : '';
2097
 
2098
  $transparent_text.text(text_value);
2099
  $transparent_offset.css('background-color', picker_color.value);
2100
 
2101
- $container.on('click', '.wp-picker-clear', function() {
2102
 
2103
  a8cIris._color._alpha = 1;
2104
  $transparent_text.text('');
@@ -2108,11 +2108,11 @@
2108
 
2109
  });
2110
 
2111
- $container.on('click', '.wp-picker-default', function() {
2112
 
2113
- var default_color = SP_WPCF.funcs.parse_color( $input.data('default-color') ),
2114
- default_value = parseFloat( default_color.transparent / 100 ),
2115
- default_text = default_value < 1 ? default_value : '';
2116
 
2117
  a8cIris._color._alpha = default_value;
2118
  $transparent_text.text(default_text);
@@ -2120,11 +2120,11 @@
2120
 
2121
  });
2122
 
2123
- $container.on('click', '.wp-color-result', function() {
2124
  $transparent_wrap.toggle();
2125
  });
2126
 
2127
- $('body').on( 'click.wpcolorpicker', function() {
2128
  $transparent_wrap.hide();
2129
  });
2130
 
@@ -2139,20 +2139,20 @@
2139
  //
2140
  // ChosenJS
2141
  //
2142
- $.fn.spf_chosen = function() {
2143
- return this.each( function() {
2144
-
2145
- var $this = $(this),
2146
- $inited = $this.parent().find('.chosen-container'),
2147
- is_multi = $this.attr('multiple') || false,
2148
- set_width = is_multi ? '100%' : 'auto',
2149
- set_options = $.extend({
2150
- allow_single_deselect: true,
2151
- disable_search_threshold: 15,
2152
- width: set_width
2153
- }, $this.data());
2154
 
2155
- if( $inited.length ) {
 
 
 
 
 
 
 
 
 
 
2156
  $inited.remove();
2157
  }
2158
 
@@ -2164,12 +2164,12 @@
2164
  //
2165
  // Number (only allow numeric inputs)
2166
  //
2167
- $.fn.spf_number = function() {
2168
- return this.each( function() {
2169
 
2170
- $(this).on('keypress', function( e ) {
2171
 
2172
- if( e.keyCode !== 0 && e.keyCode !== 8 && e.keyCode !== 45 && e.keyCode !== 46 && ( e.keyCode < 48 || e.keyCode > 57 ) ) {
2173
  return false;
2174
  }
2175
 
@@ -2181,28 +2181,28 @@
2181
  //
2182
  // Help Tooltip
2183
  //
2184
- $.fn.spf_help = function() {
2185
- return this.each( function() {
2186
 
2187
  var $this = $(this),
2188
- $tooltip,
2189
- offset_left;
2190
 
2191
  $this.on({
2192
- mouseenter: function() {
2193
 
2194
- $tooltip = $( '<div class="spf-tooltip"></div>' ).html( $this.find('.spf-help-text').html() ).appendTo('body');
2195
- offset_left = ( SP_WPCF.vars.is_rtl ) ? ( $this.offset().left + 24 ) : ( $this.offset().left - $tooltip.outerWidth() );
2196
 
2197
  $tooltip.css({
2198
- top: $this.offset().top - ( ( $tooltip.outerHeight() / 2 ) - 14 ),
2199
  left: offset_left,
2200
  });
2201
 
2202
  },
2203
- mouseleave: function() {
2204
 
2205
- if( $tooltip !== undefined ) {
2206
  $tooltip.remove();
2207
  }
2208
 
@@ -2216,25 +2216,25 @@
2216
  //
2217
  // Customize Refresh
2218
  //
2219
- $.fn.spf_customizer_refresh = function() {
2220
- return this.each( function() {
2221
 
2222
- var $this = $(this),
2223
- $complex = $this.closest('.spf-customize-complex');
2224
 
2225
- if( $complex.length ) {
2226
 
2227
- var $input = $complex.find(':input'),
2228
- $unique = $complex.data('unique-id'),
2229
- $option = $complex.data('option-id'),
2230
- obj = $input.serializeObjectSP_WPCF(),
2231
- data = ( !$.isEmptyObject(obj) ) ? obj[$unique][$option] : '',
2232
- control = wp.customize.control($unique +'['+ $option +']');
2233
 
2234
  // clear the value to force refresh.
2235
  control.setting._value = null;
2236
 
2237
- control.setting.set( data );
2238
 
2239
  } else {
2240
 
@@ -2250,34 +2250,34 @@
2250
  //
2251
  // Customize Listen Form Elements
2252
  //
2253
- $.fn.spf_customizer_listen = function( options ) {
2254
 
2255
  var settings = $.extend({
2256
  closest: false,
2257
- }, options );
2258
 
2259
- return this.each( function() {
2260
 
2261
- if( window.wp.customize === undefined ) { return; }
2262
 
2263
- var $this = ( settings.closest ) ? $(this).closest('.spf-customize-complex') : $(this),
2264
- $input = $this.find(':input'),
2265
- unique_id = $this.data('unique-id'),
2266
- option_id = $this.data('option-id');
2267
 
2268
- if( unique_id === undefined ) { return; }
2269
 
2270
- $input.on('change keyup', SP_WPCF.helper.debounce( function() {
2271
 
2272
  var obj = $this.find(':input').serializeObjectSP_WPCF();
2273
 
2274
- if( !$.isEmptyObject(obj) && obj[unique_id] ) {
2275
 
2276
- window.wp.customize.control( unique_id +'['+ option_id +']' ).setting.set( obj[unique_id][option_id] );
2277
 
2278
  }
2279
 
2280
- }, 250 ) );
2281
 
2282
  });
2283
  };
@@ -2285,13 +2285,13 @@
2285
  //
2286
  // Customizer Listener for Reload JS
2287
  //
2288
- $(document).on('expanded', '.control-section-spf', function() {
2289
 
2290
  var $this = $(this);
2291
 
2292
- if( $this.hasClass('open') && !$this.data('inited') ) {
2293
  $this.spf_dependency();
2294
- $this.find('.spf-customize-field').spf_reload_script({dependency: false});
2295
  $this.find('.spf-customize-complex').spf_customizer_listen();
2296
  $this.data('inited', true);
2297
  }
@@ -2301,13 +2301,13 @@
2301
  //
2302
  // Window on resize
2303
  //
2304
- SP_WPCF.vars.$window.on('resize spf.resize', SP_WPCF.helper.debounce( function( event ) {
2305
 
2306
  var window_width = navigator.userAgent.indexOf('AppleWebKit/') > -1 ? SP_WPCF.vars.$window.width() : window.innerWidth;
2307
 
2308
- if( window_width <= 782 && !SP_WPCF.vars.onloaded ) {
2309
  $('.spf-section').spf_reload_script();
2310
- SP_WPCF.vars.onloaded = true;
2311
  }
2312
 
2313
  }, 200)).trigger('spf.resize');
@@ -2315,18 +2315,18 @@
2315
  //
2316
  // Widgets Framework
2317
  //
2318
- $.fn.spf_widgets = function() {
2319
- if( this.length ) {
2320
 
2321
- $(document).on('widget-added widget-updated', function( event, $widget ) {
2322
  $widget.find('.spf-fields').spf_reload_script();
2323
  });
2324
 
2325
- $('.widgets-sortables, .control-section-sidebar').on('sortstop', function( event, ui ) {
2326
  ui.item.find('.spf-fields').spf_reload_script_retry();
2327
  });
2328
 
2329
- $(document).on('click', '.widget-top', function( event ) {
2330
  $(this).parent().find('.spf-fields').spf_reload_script();
2331
  });
2332
 
@@ -2336,12 +2336,12 @@
2336
  //
2337
  // Retry Plugins
2338
  //
2339
- $.fn.spf_reload_script_retry = function() {
2340
- return this.each( function() {
2341
 
2342
  var $this = $(this);
2343
 
2344
- if( $this.data('inited') ) {
2345
  $this.children('.spf-field-wp_editor').spf_field_wp_editor();
2346
  }
2347
 
@@ -2351,38 +2351,38 @@
2351
  //
2352
  // Reload Plugins
2353
  //
2354
- $.fn.spf_reload_script = function( options ) {
2355
 
2356
  var settings = $.extend({
2357
  dependency: true,
2358
- }, options );
2359
 
2360
- return this.each( function() {
2361
 
2362
  var $this = $(this);
2363
 
2364
  // Avoid for conflicts
2365
- if( !$this.data('inited') ) {
2366
 
2367
  // Field plugins
2368
  $this.children('.spf-field-accordion').spf_field_accordion();
2369
- // $this.children('.spf-field-backup').spf_field_backup();
2370
  // $this.children('.spf-field-background_adv').spf_field_background();
2371
  // $this.children('.spf-field-background').spf_field_background();
2372
  $this.children('.spf-field-code_editor').spf_field_code_editor();
2373
- // $this.children('.spf-field-date').spf_field_date();
2374
  $this.children('.spf-field-fieldset').spf_field_fieldset();
2375
  $this.children('.spf-field-gallery').spf_field_gallery();
2376
  $this.children('.spf-field-group').spf_field_group();
2377
- // $this.children('.spf-field-icon').spf_field_icon();
2378
  $this.children('.spf-field-media').spf_field_media();
2379
- // $this.children('.spf-field-repeater').spf_field_repeater();
2380
- // $this.children('.spf-field-slider').spf_field_slider();
2381
  // $this.children('.spf-field-sortable').spf_field_sortable();
2382
  // $this.children('.spf-field-sorter').spf_field_sorter();
2383
  $this.children('.spf-field-spinner').spf_field_spinner();
2384
  $this.children('.spf-field-switcher').spf_field_switcher();
2385
- // $this.children('.spf-field-tabbed').spf_field_tabbed();
2386
  $this.children('.spf-field-typography').spf_field_typography();
2387
  $this.children('.spf-field-upload').spf_field_upload();
2388
  $this.children('.spf-field-wp_editor').spf_field_wp_editor();
@@ -2421,7 +2421,7 @@
2421
  // Help Tooptip
2422
  $this.children('.spf-field').find('.spf-help').spf_help();
2423
 
2424
- if( settings.dependency ) {
2425
  $this.spf_dependency();
2426
  }
2427
 
@@ -2437,7 +2437,7 @@
2437
  //
2438
  // Document ready and run scripts.
2439
  //
2440
- $(document).ready( function() {
2441
 
2442
  $('.spf-save').spf_save();
2443
  $('.spf-confirm').spf_confirm();
@@ -2457,7 +2457,7 @@
2457
 
2458
 
2459
  // ======================================================
2460
- // Post
2461
  // ------------------------------------------------------
2462
  // Trigger taxonomy list when post type is selected.
2463
  $('.sp_wpcp_post_type select').change(function (event) {
@@ -2477,7 +2477,7 @@
2477
  event.preventDefault();
2478
  var data = {
2479
  action: 'wpcp_get_terms', // Callback function.
2480
- wpcf_post_taxonomy: $(this).val(),
2481
  }
2482
  $.post(ajaxurl, data, function (resp) {
2483
  $('.sp_wpcp_taxonomy_terms select').html(resp);
@@ -2500,5 +2500,5 @@
2500
  });
2501
  });
2502
 
2503
-
2504
- })( jQuery, window, document );
8
  * -----------------------------------------------------------
9
  *
10
  */
11
+ ; (function ($, window, document, undefined) {
12
  'use strict';
13
 
14
  //
15
  // Constants
16
  //
17
+ var SP_WPCF = SP_WPCF || {};
18
 
19
  SP_WPCF.funcs = {};
20
 
21
+ SP_WPCF.vars = {
22
  onloaded: false,
23
  $body: $('body'),
24
  $window: $(window),
35
  //
36
  // Generate UID
37
  //
38
+ uid: function (prefix) {
39
+ return (prefix || '') + Math.random().toString(36).substr(2, 9);
40
  },
41
 
42
  // Quote regular expression characters
43
  //
44
+ preg_quote: function (str) {
45
+ return (str + '').replace(/(\[|\-|\])/g, "\\$1");
46
  },
47
 
48
  //
49
  // Reneme input names
50
  //
51
+ name_nested_replace: function ($selector, field_id) {
52
 
53
  var checks = [];
54
+ var regex = new RegExp('(' + SP_WPCF.helper.preg_quote(field_id) + ')\\[(\\d+)\\]', 'g');
55
 
56
+ $selector.find(':radio').each(function () {
57
+ if (this.checked || this.orginal_checked) {
58
  this.orginal_checked = true;
59
  }
60
  });
61
 
62
+ $selector.each(function (index) {
63
+ $(this).find(':input').each(function () {
64
+ this.name = this.name.replace(regex, field_id + '[' + index + ']');
65
+ if (this.orginal_checked) {
66
  this.checked = true;
67
  }
68
  });
73
  //
74
  // Debounce
75
  //
76
+ debounce: function (callback, threshold, immediate) {
77
  var timeout;
78
+ return function () {
79
  var context = this, args = arguments;
80
+ var later = function () {
81
  timeout = null;
82
+ if (!immediate) {
83
  callback.apply(context, args);
84
  }
85
  };
86
+ var callNow = (immediate && !timeout);
87
+ clearTimeout(timeout);
88
+ timeout = setTimeout(later, threshold);
89
+ if (callNow) {
90
  callback.apply(context, args);
91
  }
92
  };
95
  //
96
  // Get a cookie
97
  //
98
+ get_cookie: function (name) {
99
 
100
  var e, b, cookie = document.cookie, p = name + '=';
101
 
102
+ if (!cookie) {
103
  return;
104
  }
105
 
106
+ b = cookie.indexOf('; ' + p);
107
 
108
+ if (b === -1) {
109
  b = cookie.indexOf(p);
110
 
111
+ if (b !== 0) {
112
  return null;
113
  }
114
  } else {
115
  b += 2;
116
  }
117
 
118
+ e = cookie.indexOf(';', b);
119
 
120
+ if (e === -1) {
121
  e = cookie.length;
122
  }
123
 
124
+ return decodeURIComponent(cookie.substring(b + p.length, e));
125
 
126
  },
127
 
128
  //
129
  // Set a cookie
130
  //
131
+ set_cookie: function (name, value, expires, path, domain, secure) {
132
 
133
  var d = new Date();
134
 
135
+ if (typeof (expires) === 'object' && expires.toGMTString) {
136
  expires = expires.toGMTString();
137
+ } else if (parseInt(expires, 10)) {
138
+ d.setTime(d.getTime() + (parseInt(expires, 10) * 1000));
139
  expires = d.toGMTString();
140
  } else {
141
  expires = '';
142
  }
143
 
144
+ document.cookie = name + '=' + encodeURIComponent(value) +
145
+ (expires ? '; expires=' + expires : '') +
146
+ (path ? '; path=' + path : '') +
147
+ (domain ? '; domain=' + domain : '') +
148
+ (secure ? '; secure' : '');
149
 
150
  },
151
 
152
  //
153
  // Remove a cookie
154
  //
155
+ remove_cookie: function (name, path, domain, secure) {
156
+ SP_WPCF.helper.set_cookie(name, '', -1000, path, domain, secure);
157
  },
158
 
159
  };
161
  //
162
  // Custom clone for textarea and select clone() bug
163
  //
164
+ $.fn.spf_clone = function () {
165
 
166
+ var base = $.fn.clone.apply(this, arguments),
167
+ clone = this.find('select').add(this.filter('select')),
168
+ cloned = base.find('select').add(base.filter('select'));
169
 
170
+ for (var i = 0; i < clone.length; ++i) {
171
+ for (var j = 0; j < clone[i].options.length; ++j) {
172
 
173
+ if (clone[i].options[j].selected === true) {
174
  cloned[i].options[j].selected = true;
175
  }
176
 
177
  }
178
  }
179
 
180
+ this.find(':radio').each(function () {
181
  this.orginal_checked = this.checked;
182
  });
183
 
188
  //
189
  // Expand All Options
190
  //
191
+ $.fn.spf_expand_all = function () {
192
+ return this.each(function () {
193
+ $(this).on('click', function (e) {
194
 
195
  e.preventDefault();
196
  $('.spf-wrapper').toggleClass('spf-show-all');
204
  //
205
  // Options Navigation
206
  //
207
+ $.fn.spf_nav_options = function () {
208
+ return this.each(function () {
209
 
210
+ var $nav = $(this),
211
+ $links = $nav.find('a'),
212
+ $hidden = $nav.closest('.spf').find('.spf-section-id'),
213
+ $last_section;
214
 
215
+ $(window).on('hashchange', function () {
216
 
217
+ var hash = window.location.hash.match(new RegExp('tab=([^&]*)'));
218
+ var slug = hash ? hash[1] : $links.first().attr('href').replace('#tab=', '');
219
+ var $link = $('#spf-tab-link-' + slug);
220
 
221
+ if ($link.length > 0) {
222
 
223
  $link.closest('.spf-tab-depth-0').addClass('spf-tab-active').siblings().removeClass('spf-tab-active');
224
  $links.removeClass('spf-section-active');
225
  $link.addClass('spf-section-active');
226
 
227
+ if ($last_section !== undefined) {
228
  $last_section.hide();
229
  }
230
 
231
+ var $section = $('#spf-section-' + slug);
232
+ $section.css({ display: 'block' });
233
  $section.spf_reload_script();
234
 
235
  $hidden.val(slug);
246
  //
247
  // Metabox Tabs
248
  //
249
+ $.fn.spf_nav_metabox = function () {
250
+ return this.each(function () {
251
 
252
+ var $nav = $(this),
253
+ $links = $nav.find('a'),
254
+ unique_id = $nav.data('unique'),
255
+ post_id = $('#post_ID').val() || 'global',
256
+ $last_section,
257
+ $last_link;
258
 
259
+ $links.on('click', function (e) {
260
 
261
  e.preventDefault();
262
 
263
+ var $link = $(this),
264
+ section_id = $link.data('section');
265
 
266
+ if ($last_link !== undefined) {
267
  $last_link.removeClass('spf-section-active');
268
  }
269
 
270
+ if ($last_section !== undefined) {
271
  $last_section.hide();
272
  }
273
 
274
  $link.addClass('spf-section-active');
275
 
276
+ var $section = $('#spf-section-' + section_id);
277
+ $section.css({ display: 'block' });
278
  $section.spf_reload_script();
279
 
280
+ SP_WPCF.helper.set_cookie('spf-last-metabox-tab-' + post_id + '-' + unique_id, section_id);
281
 
282
  $last_section = $section;
283
+ $last_link = $link;
284
 
285
  });
286
 
287
+ var get_cookie = SP_WPCF.helper.get_cookie('spf-last-metabox-tab-' + post_id + '-' + unique_id);
288
 
289
+ if (get_cookie) {
290
+ $nav.find('a[data-section="' + get_cookie + '"]').trigger('click');
291
  } else {
292
  $links.first('a').trigger('click');
293
  }
298
  //
299
  // Metabox Page Templates Listener
300
  //
301
+ $.fn.spf_page_templates = function () {
302
+ if (this.length) {
303
 
304
+ $(document).on('change', '.editor-page-attributes__template select, #page_template', function () {
305
 
306
  var maybe_value = $(this).val() || 'default';
307
 
308
  $('.spf-page-templates').removeClass('spf-show').addClass('spf-hide');
309
+ $('.spf-page-' + maybe_value.toLowerCase().replace(/[^a-zA-Z0-9]+/g, '-')).removeClass('spf-hide').addClass('spf-show');
310
 
311
  });
312
 
316
  //
317
  // Metabox Post Formats Listener
318
  //
319
+ $.fn.spf_post_formats = function () {
320
+ if (this.length) {
321
 
322
+ $(document).on('change', '.editor-post-format select, #formatdiv input[name="post_format"]', function () {
323
 
324
  var maybe_value = $(this).val() || 'default';
325
 
326
  // Fallback for classic editor version
327
+ maybe_value = (maybe_value === '0') ? 'default' : maybe_value;
328
 
329
  $('.spf-post-formats').removeClass('spf-show').addClass('spf-hide');
330
+ $('.spf-post-format-' + maybe_value).removeClass('spf-hide').addClass('spf-show');
331
 
332
  });
333
 
337
  //
338
  // Search
339
  //
340
+ $.fn.spf_search = function () {
341
+ return this.each(function () {
342
 
343
+ var $this = $(this),
344
+ $input = $this.find('input');
345
 
346
+ $input.on('change keyup', function () {
347
 
348
+ var value = $(this).val(),
349
+ $wrapper = $('.spf-wrapper'),
350
+ $section = $wrapper.find('.spf-section'),
351
+ $fields = $section.find('> .spf-field:not(.hidden)'),
352
+ $titles = $fields.find('> .spf-title, .spf-search-tags');
353
 
354
+ if (value.length > 3) {
355
 
356
  $fields.addClass('spf-hidden');
357
  $wrapper.addClass('spf-search-all');
358
 
359
+ $titles.each(function () {
360
 
361
  var $title = $(this);
362
 
363
+ if ($title.text().match(new RegExp('.*?' + value + '.*?', 'i'))) {
364
 
365
  var $field = $title.closest('.spf-field');
366
 
386
  //
387
  // Sticky Header
388
  //
389
+ $.fn.spf_sticky = function () {
390
+ return this.each(function () {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
391
 
392
+ var $this = $(this),
393
+ $window = $(window),
394
+ $inner = $this.find('.spf-header-inner'),
395
+ padding = parseInt($inner.css('padding-left')) + parseInt($inner.css('padding-right')),
396
+ offset = 32,
397
+ scrollTop = 0,
398
+ lastTop = 0,
399
+ ticking = false,
400
+ stickyUpdate = function () {
401
+
402
+ var offsetTop = $this.offset().top,
403
+ stickyTop = Math.max(offset, offsetTop - scrollTop),
404
+ winWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
405
+
406
+ if (stickyTop <= offset && winWidth > 782) {
407
+ $inner.css({ width: $this.outerWidth() - padding });
408
+ $this.css({ height: $this.outerHeight() }).addClass('spf-sticky');
409
+ } else {
410
+ $inner.removeAttr('style');
411
+ $this.removeAttr('style').removeClass('spf-sticky');
412
+ }
413
 
414
+ },
415
+ requestTick = function () {
 
 
 
 
416
 
417
+ if (!ticking) {
418
+ requestAnimationFrame(function () {
419
+ stickyUpdate();
420
+ ticking = false;
421
+ });
422
+ }
423
 
424
+ ticking = true;
425
+
426
+ },
427
+ onSticky = function () {
428
 
429
+ scrollTop = $window.scrollTop();
430
+ requestTick();
431
 
432
+ };
433
 
434
+ $window.on('scroll resize', onSticky);
435
 
436
  onSticky();
437
 
441
  //
442
  // Dependency System
443
  //
444
+ $.fn.spf_dependency = function () {
445
+ return this.each(function () {
446
 
447
+ var $this = $(this),
448
+ ruleset = $.spf_deps.createRuleset(),
449
+ depends = [],
450
+ is_global = false;
451
 
452
+ $this.children('[data-controller]').each(function () {
453
 
454
+ var $field = $(this),
455
+ controllers = $field.data('controller').split('|'),
456
+ conditions = $field.data('condition').split('|'),
457
+ values = $field.data('value').toString().split('|'),
458
+ rules = ruleset;
459
 
460
+ if ($field.data('depend-global')) {
461
  is_global = true;
462
  }
463
 
464
+ $.each(controllers, function (index, depend_id) {
465
 
466
+ var value = values[index] || '',
467
+ condition = conditions[index] || conditions[0];
468
 
469
+ rules = rules.createRule('[data-depend-id="' + depend_id + '"]', condition, value);
470
 
471
  rules.include($field);
472
 
476
 
477
  });
478
 
479
+ if (depends.length) {
480
 
481
+ if (is_global) {
482
  $.spf_deps.enable(SP_WPCF.vars.$body, ruleset, depends);
483
  } else {
484
  $.spf_deps.enable($this, ruleset, depends);
492
  //
493
  // Field: accordion
494
  //
495
+ $.fn.spf_field_accordion = function () {
496
+ return this.each(function () {
497
 
498
  var $titles = $(this).find('.spf-accordion-title');
499
 
500
+ $titles.on('click', function () {
501
 
502
+ var $title = $(this),
503
+ $icon = $title.find('.spf-accordion-icon'),
504
+ $content = $title.next();
505
 
506
+ if ($icon.hasClass('fa-angle-right')) {
507
  $icon.removeClass('fa-angle-right').addClass('fa-angle-down');
508
  } else {
509
  $icon.removeClass('fa-angle-down').addClass('fa-angle-right');
510
  }
511
 
512
+ if (!$content.data('opened')) {
513
 
514
  $content.spf_reload_script();
515
+ $content.data('opened', true);
516
 
517
  }
518
 
526
  //
527
  // Field: code_editor
528
  //
529
+ $.fn.spf_field_code_editor = function () {
530
+ return this.each(function () {
531
 
532
+ if (typeof CodeMirror !== 'function') { return; }
533
 
534
+ var $this = $(this),
535
+ $textarea = $this.find('textarea'),
536
+ $inited = $this.find('.CodeMirror'),
537
+ data_editor = $textarea.data('editor');
538
 
539
+ if ($inited.length) {
540
  $inited.remove();
541
  }
542
 
543
  var interval = setInterval(function () {
544
+ if ($this.is(':visible')) {
545
 
546
+ var code_editor = CodeMirror.fromTextArea($textarea[0], data_editor);
547
 
548
  // load code-mirror theme css.
549
+ if (data_editor.theme !== 'default' && SP_WPCF.vars.code_themes.indexOf(data_editor.theme) === -1) {
550
 
551
  var $cssLink = $('<link>');
552
 
553
+ $('#spf-codemirror-css').after($cssLink);
554
 
555
  $cssLink.attr({
556
  rel: 'stylesheet',
557
+ id: 'spf-codemirror-' + data_editor.theme + '-css',
558
+ href: data_editor.cdnURL + '/theme/' + data_editor.theme + '.min.css',
559
  type: 'text/css',
560
  media: 'all'
561
  });
564
 
565
  }
566
 
567
+ CodeMirror.modeURL = data_editor.cdnURL + '/mode/%N/%N.min.js';
568
  CodeMirror.autoLoadMode(code_editor, data_editor.mode);
569
 
570
+ code_editor.on('change', function (editor, event) {
571
+ $textarea.val(code_editor.getValue()).trigger('change');
572
  });
573
 
574
  clearInterval(interval);
582
  //
583
  // Field: date
584
  //
585
+ $.fn.spf_field_date = function () {
586
+ return this.each(function () {
587
 
588
+ var $this = $(this),
589
+ $inputs = $this.find('input'),
590
+ settings = $this.find('.spf-date-settings').data('settings'),
591
+ wrapper = '<div class="spf-datepicker-wrapper"></div>',
592
+ $datepicker;
593
 
594
  var defaults = {
595
  showAnim: '',
596
+ beforeShow: function (input, inst) {
597
  $(inst.dpDiv).addClass('spf-datepicker-wrapper');
598
  },
599
+ onClose: function (input, inst) {
600
  $(inst.dpDiv).removeClass('spf-datepicker-wrapper');
601
  },
602
  };
603
 
604
  settings = $.extend({}, settings, defaults);
605
 
606
+ if ($inputs.length === 2) {
607
 
608
  settings = $.extend({}, settings, {
609
+ onSelect: function (selectedDate) {
610
 
611
+ var $this = $(this),
612
+ $from = $inputs.first(),
613
+ option = ($inputs.first().attr('id') === $(this).attr('id')) ? 'minDate' : 'maxDate',
614
+ date = $.datepicker.parseDate(settings.dateFormat, selectedDate);
615
 
616
+ $inputs.not(this).datepicker('option', option, date);
617
 
618
  }
619
  });
620
 
621
  }
622
 
623
+ $inputs.each(function () {
624
 
625
  var $input = $(this);
626
 
627
+ if ($input.hasClass('hasDatepicker')) {
628
  $input.removeAttr('id').removeClass('hasDatepicker');
629
  }
630
 
638
  //
639
  // Field: fieldset
640
  //
641
+ $.fn.spf_field_fieldset = function () {
642
+ return this.each(function () {
643
  $(this).find('.spf-fieldset-content').spf_reload_script();
644
  });
645
  };
647
  //
648
  // Field: gallery
649
  //
650
+ $.fn.spf_field_gallery = function () {
651
+ return this.each(function () {
652
 
653
+ var $this = $(this),
654
+ $edit = $this.find('.spf-edit-gallery'),
655
+ $clear = $this.find('.spf-clear-gallery'),
656
+ $list = $this.find('ul.sp-gallery-images'),
657
+ $input = $this.find('input'),
658
+ $img = $this.find('img'),
659
+ wp_media_frame;
660
 
661
+ $this.on('click', '.spf-button, .spf-edit-gallery', function (e) {
662
 
663
+ var $el = $(this),
664
+ ids = $input.val(),
665
+ what = ($el.hasClass('spf-edit-gallery')) ? 'edit' : 'add',
666
+ state = (what === 'add' && !ids.length) ? 'gallery' : 'gallery-edit';
667
 
668
  e.preventDefault();
669
 
670
+ if (typeof window.wp === 'undefined' || !window.wp.media || !window.wp.media.gallery) { return; }
671
 
672
+ // Open media with state
673
+ if (state === 'gallery') {
674
 
675
  wp_media_frame = window.wp.media({
676
  library: {
685
 
686
  } else {
687
 
688
+ wp_media_frame = window.wp.media.gallery.edit('[gallery ids="' + ids + '"]');
689
 
690
+ if (what === 'add') {
691
  wp_media_frame.setState('gallery-library');
692
  }
693
 
694
  }
695
 
696
  // Media Update
697
+ wp_media_frame.on('update', function (selection) {
698
 
699
  $list.empty();
700
 
701
+ var selectedIds = selection.models.map(function (attachment) {
702
 
703
+ var item = attachment.toJSON();
704
+ var thumb = (typeof item.sizes.thumbnail !== 'undefined') ? item.sizes.thumbnail.url : item.url;
705
 
706
+ $list.append('<li><img src="' + thumb + '"></li>');
707
 
708
  return item.id;
709
 
710
  });
711
 
712
+ $input.val(selectedIds.join(',')).trigger('change');
713
  $clear.removeClass('hidden');
714
  $edit.removeClass('hidden');
715
 
717
 
718
  });
719
 
720
+ $clear.on('click', function (e) {
721
  e.preventDefault();
722
  $list.empty();
723
  $input.val('').trigger('change');
732
  //
733
  // Field: group
734
  //
735
+ $.fn.spf_field_group = function () {
736
+ return this.each(function () {
737
+
738
+ var $this = $(this),
739
+ $fieldset = $this.children('.spf-fieldset'),
740
+ $group = $fieldset.length ? $fieldset : $this,
741
+ $wrapper = $group.children('.spf-cloneable-wrapper'),
742
+ $hidden = $group.children('.spf-cloneable-hidden'),
743
+ $max = $group.children('.spf-cloneable-max'),
744
+ $min = $group.children('.spf-cloneable-min'),
745
+ field_id = $wrapper.data('field-id'),
746
+ unique_id = $wrapper.data('unique-id'),
747
+ is_number = Boolean(Number($wrapper.data('title-number'))),
748
+ max = parseInt($wrapper.data('max')),
749
+ min = parseInt($wrapper.data('min'));
750
 
751
  // clear accordion arrows if multi-instance
752
+ if ($wrapper.hasClass('ui-accordion')) {
753
  $wrapper.find('.ui-accordion-header-icon').remove();
754
  }
755
 
756
+ var update_title_numbers = function ($selector) {
757
+ $selector.find('.spf-cloneable-title-number').each(function (index) {
758
+ $(this).html(($(this).closest('.spf-cloneable-item').index() + 1) + '.');
759
  });
760
  };
761
 
762
  $wrapper.accordion({
763
  header: '> .spf-cloneable-item > .spf-cloneable-title',
764
+ collapsible: true,
765
  active: false,
766
  animate: false,
767
  heightStyle: 'content',
769
  'header': 'spf-cloneable-header-icon fa fa-angle-right',
770
  'activeHeader': 'spf-cloneable-header-icon fa fa-angle-down'
771
  },
772
+ activate: function (event, ui) {
773
 
774
+ var $panel = ui.newPanel;
775
  var $header = ui.newHeader;
776
 
777
+ if ($panel.length && !$panel.data('opened')) {
778
 
779
  var $fields = $panel.children();
780
+ var $first = $fields.first().find(':input').first();
781
+ var $title = $header.find('.spf-cloneable-value');
782
 
783
+ $first.on('keyup', function (event) {
784
  $title.text($first.val());
785
  });
786
 
787
  $panel.spf_reload_script();
788
+ $panel.data('opened', true);
789
+ $panel.data('retry', false);
790
 
791
+ } else if ($panel.data('retry')) {
792
 
793
  $panel.spf_reload_script_retry();
794
+ $panel.data('retry', false);
795
 
796
  }
797
 
804
  helper: 'original',
805
  cursor: 'move',
806
  placeholder: 'widget-placeholder',
807
+ start: function (event, ui) {
808
 
809
+ $wrapper.accordion({ active: false });
810
  $wrapper.sortable('refreshPositions');
811
  ui.item.children('.spf-cloneable-content').data('retry', true);
812
 
813
  },
814
+ update: function (event, ui) {
815
 
816
+ SP_WPCF.helper.name_nested_replace($wrapper.children('.spf-cloneable-item'), field_id);
817
  $wrapper.spf_customizer_refresh();
818
 
819
+ if (is_number) {
820
  update_title_numbers($wrapper);
821
  }
822
 
823
  },
824
  });
825
 
826
+ $group.children('.spf-cloneable-add').on('click', function (e) {
827
 
828
  e.preventDefault();
829
 
831
 
832
  $min.hide();
833
 
834
+ if (max && (count + 1) > max) {
835
  $max.show();
836
  return;
837
  }
838
 
839
+ var new_field_id = unique_id + field_id + '[' + count + ']';
840
 
841
  var $cloned_item = $hidden.spf_clone(true);
842
 
843
  $cloned_item.removeClass('spf-cloneable-hidden');
844
 
845
+ $cloned_item.find(':input').each(function () {
846
+ this.name = new_field_id + this.name.replace((this.name.startsWith('_nonce') ? '_nonce' : unique_id), '');
847
  });
848
 
849
+ $cloned_item.find('.spf-data-wrapper').each(function () {
850
+ $(this).attr('data-unique-id', new_field_id);
851
  });
852
 
853
  $wrapper.append($cloned_item);
854
  $wrapper.accordion('refresh');
855
+ $wrapper.accordion({ active: count });
856
  $wrapper.spf_customizer_refresh();
857
+ $wrapper.spf_customizer_listen({ closest: true });
858
 
859
+ if (is_number) {
860
  update_title_numbers($wrapper);
861
  }
862
 
863
  });
864
 
865
+ var event_clone = function (e) {
866
 
867
  e.preventDefault();
868
 
870
 
871
  $min.hide();
872
 
873
+ if (max && (count + 1) > max) {
874
  $max.show();
875
  return;
876
  }
877
 
878
+ var $this = $(this),
879
+ $parent = $this.parent().parent(),
880
+ $cloned_helper = $parent.children('.spf-cloneable-helper').spf_clone(true),
881
+ $cloned_title = $parent.children('.spf-cloneable-title').spf_clone(),
882
+ $cloned_content = $parent.children('.spf-cloneable-content').spf_clone(),
883
+ cloned_regex = new RegExp('(' + SP_WPCF.helper.preg_quote(field_id) + ')\\[(\\d+)\\]', 'g');
884
 
885
+ $cloned_content.find('.spf-data-wrapper').each(function () {
886
  var $this = $(this);
887
+ $this.attr('data-unique-id', $this.attr('data-unique-id').replace(cloned_regex, field_id + '[' + ($parent.index() + 1) + ']'));
888
  });
889
 
890
  var $cloned = $('<div class="spf-cloneable-item" />');
895
 
896
  $wrapper.children().eq($parent.index()).after($cloned);
897
 
898
+ SP_WPCF.helper.name_nested_replace($wrapper.children('.spf-cloneable-item'), field_id);
899
 
900
  $wrapper.accordion('refresh');
901
  $wrapper.spf_customizer_refresh();
902
+ $wrapper.spf_customizer_listen({ closest: true });
903
 
904
+ if (is_number) {
905
  update_title_numbers($wrapper);
906
  }
907
 
910
  $wrapper.children('.spf-cloneable-item').children('.spf-cloneable-helper').on('click', '.spf-cloneable-clone', event_clone);
911
  $group.children('.spf-cloneable-hidden').children('.spf-cloneable-helper').on('click', '.spf-cloneable-clone', event_clone);
912
 
913
+ var event_remove = function (e) {
914
 
915
  e.preventDefault();
916
 
919
  $max.hide();
920
  $min.hide();
921
 
922
+ if (min && (count - 1) < min) {
923
  $min.show();
924
  return;
925
  }
926
 
927
  $(this).closest('.spf-cloneable-item').remove();
928
 
929
+ SP_WPCF.helper.name_nested_replace($wrapper.children('.spf-cloneable-item'), field_id);
930
 
931
  $wrapper.spf_customizer_refresh();
932
 
933
+ if (is_number) {
934
  update_title_numbers($wrapper);
935
  }
936
 
945
  //
946
  // Field: media
947
  //
948
+ $.fn.spf_field_media = function () {
949
+ return this.each(function () {
950
 
951
+ var $this = $(this),
952
+ $upload_button = $this.find('.spf--button'),
953
+ $remove_button = $this.find('.spf--remove'),
954
+ $library = $upload_button.data('library') && $upload_button.data('library').split(',') || '',
955
+ wp_media_frame;
956
 
957
+ $upload_button.on('click', function (e) {
958
 
959
  e.preventDefault();
960
 
961
+ if (typeof window.wp === 'undefined' || !window.wp.media || !window.wp.media.gallery) {
962
  return;
963
  }
964
 
965
+ if (wp_media_frame) {
966
  wp_media_frame.open();
967
  return;
968
  }
973
  }
974
  });
975
 
976
+ wp_media_frame.on('select', function () {
977
 
978
  var thumbnail;
979
+ var attributes = wp_media_frame.state().get('selection').first().attributes;
980
  var preview_size = $upload_button.data('preview-size') || 'thumbnail';
981
 
982
+ $this.find('.spf--url').val(attributes.url);
983
+ $this.find('.spf--id').val(attributes.id);
984
+ $this.find('.spf--width').val(attributes.width);
985
+ $this.find('.spf--height').val(attributes.height);
986
+ $this.find('.spf--alt').val(attributes.alt);
987
+ $this.find('.spf--title').val(attributes.title);
988
+ $this.find('.spf--description').val(attributes.description);
989
 
990
+ if (typeof attributes.sizes !== 'undefined' && typeof attributes.sizes.thumbnail !== 'undefined' && preview_size === 'thumbnail') {
991
  thumbnail = attributes.sizes.thumbnail.url;
992
+ } else if (typeof attributes.sizes !== 'undefined' && typeof attributes.sizes.full !== 'undefined') {
993
  thumbnail = attributes.sizes.full.url;
994
  } else {
995
  thumbnail = attributes.icon;
998
  $remove_button.removeClass('hidden');
999
  $this.find('.spf--preview').removeClass('hidden');
1000
  $this.find('.spf--src').attr('src', thumbnail);
1001
+ $this.find('.spf--thumbnail').val(thumbnail).trigger('change');
1002
 
1003
  });
1004
 
1006
 
1007
  });
1008
 
1009
+ $remove_button.on('click', function (e) {
1010
  e.preventDefault();
1011
  $remove_button.addClass('hidden');
1012
  $this.find('.spf--preview').addClass('hidden');
1021
  //
1022
  // Field: spinner
1023
  //
1024
+ $.fn.spf_field_spinner = function () {
1025
+ return this.each(function () {
1026
 
1027
+ var $this = $(this),
1028
+ $input = $this.find('input'),
1029
+ $inited = $this.find('.ui-spinner-button');
1030
 
1031
+ if ($inited.length) {
1032
  $inited.remove();
1033
  }
1034
 
1036
  max: $input.data('max') || 100,
1037
  min: $input.data('min') || 0,
1038
  step: $input.data('step') || 1,
1039
+ spin: function (event, ui) {
1040
  $input.val(ui.value).trigger('change');
1041
  }
1042
  });
1048
  //
1049
  // Field: switcher
1050
  //
1051
+ $.fn.spf_field_switcher = function () {
1052
+ return this.each(function () {
1053
 
1054
  var $switcher = $(this).find('.spf--switcher');
1055
 
1056
+ $switcher.on('click', function () {
1057
 
1058
+ var value = 0;
1059
  var $input = $switcher.find('input');
1060
 
1061
+ if ($switcher.hasClass('spf--active')) {
1062
  $switcher.removeClass('spf--active');
1063
  } else {
1064
  value = 1;
1075
  //
1076
  // Field: typography
1077
  //
1078
+ $.fn.spf_field_typography = function () {
1079
  return this.each(function () {
1080
 
1081
+ var base = this;
1082
+ var $this = $(this);
1083
+ var loaded_fonts = [];
1084
+ var webfonts = spf_typography_json.webfonts;
1085
+ var googlestyles = spf_typography_json.googlestyles;
1086
  var defaultstyles = spf_typography_json.defaultstyles;
1087
 
1088
  //
1089
  //
1090
  // Sanitize google font subset
1091
+ base.sanitize_subset = function (subset) {
1092
  subset = subset.replace('-ext', ' Extended');
1093
  subset = subset.charAt(0).toUpperCase() + subset.slice(1);
1094
  return subset;
1097
  //
1098
  //
1099
  // Sanitize google font styles (weight and style)
1100
+ base.sanitize_style = function (style) {
1101
  return googlestyles[style] ? googlestyles[style] : style;
1102
  };
1103
 
1104
  //
1105
  //
1106
  // Load google font
1107
+ base.load_google_font = function (font_family, weight, style) {
1108
 
1109
+ if (font_family && typeof WebFont === 'object') {
1110
 
1111
  weight = weight ? weight.replace('normal', '') : '';
1112
+ style = style ? style.replace('normal', '') : '';
1113
 
1114
+ if (weight || style) {
1115
+ font_family = font_family + ':' + weight + style;
1116
  }
1117
 
1118
+ if (loaded_fonts.indexOf(font_family) === -1) {
1119
  WebFont.load({ google: { families: [font_family] } });
1120
  }
1121
 
1122
+ loaded_fonts.push(font_family);
1123
 
1124
  }
1125
 
1128
  //
1129
  //
1130
  // Append select options
1131
+ base.append_select_options = function ($select, options, condition, type, is_multi) {
1132
 
1133
  $select.find('option').not(':first').remove();
1134
 
1135
  var opts = '';
1136
 
1137
+ $.each(options, function (key, value) {
1138
 
1139
  var selected;
1140
  var name = value;
1141
 
1142
  // is_multi
1143
+ if (is_multi) {
1144
+ selected = (condition && condition.indexOf(value) !== -1) ? ' selected' : '';
1145
  } else {
1146
+ selected = (condition && condition === value) ? ' selected' : '';
1147
  }
1148
 
1149
+ if (type === 'subset') {
1150
+ name = base.sanitize_subset(value);
1151
+ } else if (type === 'style') {
1152
+ name = base.sanitize_style(value);
1153
  }
1154
 
1155
+ opts += '<option value="' + value + '"' + selected + '>' + name + '</option>';
1156
 
1157
  });
1158
 
1166
  //
1167
  // Constants
1168
  var selected_styles = [];
1169
+ var $typography = $this.find('.spf--typography');
1170
+ var $type = $this.find('.spf--type');
1171
+ var unit = $typography.data('unit');
1172
+ var exclude_fonts = $typography.data('exclude') ? $typography.data('exclude').split(',') : [];
1173
 
1174
  //
1175
  //
1176
  // Chosen init
1177
+ if ($this.find('.spf--chosen').length) {
1178
 
1179
  var $chosen_selects = $this.find('select');
1180
 
1181
+ $chosen_selects.each(function () {
1182
 
1183
  var $chosen_select = $(this),
1184
+ $chosen_inited = $chosen_select.parent().find('.chosen-container');
1185
 
1186
+ if ($chosen_inited.length) {
1187
  $chosen_inited.remove();
1188
  }
1189
 
1201
  //
1202
  // Font family select
1203
  var $font_family_select = $this.find('.spf--font-family');
1204
+ var first_font_family = $font_family_select.val();
1205
 
1206
  // Clear default font family select options
1207
  $font_family_select.find('option').not(':first-child').remove();
1208
 
1209
  var opts = '';
1210
 
1211
+ $.each(webfonts, function (type, group) {
1212
 
1213
  // Check for exclude fonts
1214
+ if (exclude_fonts && exclude_fonts.indexOf(type) !== -1) { return; }
1215
 
1216
  opts += '<optgroup label="' + group.label + '">';
1217
 
1218
+ $.each(group.fonts, function (key, value) {
1219
 
1220
  // use key if value is object
1221
+ value = (typeof value === 'object') ? key : value;
1222
+ var selected = (value === first_font_family) ? ' selected' : '';
1223
+ opts += '<option value="' + value + '" data-type="' + type + '"' + selected + '>' + value + '</option>';
1224
 
1225
  });
1226
 
1236
  // Font style select
1237
  var $font_style_block = $this.find('.spf--block-font-style');
1238
 
1239
+ if ($font_style_block.length) {
1240
 
1241
  var $font_style_select = $this.find('.spf--font-style-select');
1242
+ var first_style_value = $font_style_select.val() ? $font_style_select.val().replace(/normal/g, '') : '';
1243
 
1244
  //
1245
  //
1246
  // Extra font style select
1247
  var $extra_font_style_block = $this.find('.spf--block-extra-styles');
1248
 
1249
+ if ($extra_font_style_block.length) {
1250
  var $extra_font_style_select = $this.find('.spf--extra-styles');
1251
+ var first_extra_style_value = $extra_font_style_select.val();
1252
  }
1253
 
1254
  }
1257
  //
1258
  // Subsets select
1259
  var $subset_block = $this.find('.spf--block-subset');
1260
+ if ($subset_block.length) {
1261
  var $subset_select = $this.find('.spf--subset');
1262
  var first_subset_select_value = $subset_select.val();
1263
  var subset_multi_select = $subset_select.data('multiple') || false;
1271
  //
1272
  //
1273
  // Font Family on Change Listener
1274
+ $font_family_select.on('change spf.change', function (event) {
1275
 
1276
  // Hide subsets on change
1277
+ if ($subset_block.length) {
1278
  $subset_block.addClass('hidden');
1279
  }
1280
 
1281
  // Hide extra font style on change
1282
+ if ($extra_font_style_block.length) {
1283
  $extra_font_style_block.addClass('hidden');
1284
  }
1285
 
1286
  // Hide backup font family on change
1287
+ if ($backup_font_family_block.length) {
1288
  $backup_font_family_block.addClass('hidden');
1289
  }
1290
 
1291
  var $selected = $font_family_select.find(':selected');
1292
+ var value = $selected.val();
1293
+ var type = $selected.data('type');
1294
 
1295
+ if (type && value) {
1296
 
1297
  // Show backup fonts if font type google or custom
1298
+ if ((type === 'google' || type === 'custom') && $backup_font_family_block.length) {
1299
  $backup_font_family_block.removeClass('hidden');
1300
  }
1301
 
1302
  } else {
1303
 
1304
  // Clear subsets options if type and value empty
1305
+ if ($subset_block.length) {
1306
  $subset_select.find('option').not(':first-child').remove();
1307
  $subset_select.trigger('chosen:updated');
1308
  }
1309
 
1310
  // Clear font styles options if type and value empty
1311
+ if ($font_style_block.length) {
1312
  $font_style_select.find('option').not(':first-child').remove();
1313
  $font_style_select.trigger('chosen:updated');
1314
  }
1330
  //
1331
  // Field: upload
1332
  //
1333
+ $.fn.spf_field_upload = function () {
1334
+ return this.each(function () {
 
 
 
 
 
 
 
1335
 
1336
+ var $this = $(this),
1337
+ $input = $this.find('input'),
1338
+ $upload_button = $this.find('.spf--button'),
1339
+ $remove_button = $this.find('.spf--remove'),
1340
+ $library = $upload_button.data('library') && $upload_button.data('library').split(',') || '',
1341
+ wp_media_frame;
1342
+
1343
+ $input.on('change', function (e) {
1344
+ if ($input.val()) {
1345
  $remove_button.removeClass('hidden');
1346
  } else {
1347
  $remove_button.addClass('hidden');
1348
  }
1349
  });
1350
 
1351
+ $upload_button.on('click', function (e) {
1352
 
1353
  e.preventDefault();
1354
 
1355
+ if (typeof window.wp === 'undefined' || !window.wp.media || !window.wp.media.gallery) {
1356
  return;
1357
  }
1358
 
1359
+ if (wp_media_frame) {
1360
  wp_media_frame.open();
1361
  return;
1362
  }
1367
  },
1368
  });
1369
 
1370
+ wp_media_frame.on('select', function () {
1371
+ $input.val(wp_media_frame.state().get('selection').first().attributes.url).trigger('change');
1372
  });
1373
 
1374
  wp_media_frame.open();
1375
 
1376
  });
1377
 
1378
+ $remove_button.on('click', function (e) {
1379
  e.preventDefault();
1380
  $input.val('').trigger('change');
1381
  });
1384
 
1385
  };
1386
 
1387
+ //
1388
  // Confirm
1389
  //
1390
+ $.fn.spf_confirm = function () {
1391
+ return this.each(function () {
1392
+ $(this).on('click', function (e) {
1393
 
1394
+ var confirm_text = $(this).data('confirm') || window.spf_vars.i18n.confirm;
1395
+ var confirm_answer = confirm(confirm_text);
1396
  SP_WPCF.vars.is_confirm = true;
1397
 
1398
+ if (!confirm_answer) {
1399
  e.preventDefault();
1400
  SP_WPCF.vars.is_confirm = false;
1401
  return false;
1405
  });
1406
  };
1407
 
1408
+ $.fn.serializeObject = function () {
1409
 
1410
  var obj = {};
1411
 
1412
+ $.each(this.serializeArray(), function (i, o) {
1413
  var n = o.name,
1414
  v = o.value;
1415
 
1416
+ obj[n] = obj[n] === undefined ? v
1417
+ : $.isArray(obj[n]) ? obj[n].concat(v)
1418
+ : [obj[n], v];
1419
  });
1420
 
1421
  return obj;
1425
  //
1426
  // Options Save
1427
  //
1428
+ $.fn.spf_save = function () {
1429
+ return this.each(function () {
1430
 
1431
+ var $this = $(this),
1432
+ $buttons = $('.spf-save'),
1433
+ $panel = $('.spf-options'),
1434
+ flooding = false,
1435
+ timeout;
1436
 
1437
+ $this.on('click', function (e) {
1438
 
1439
+ if (!flooding) {
1440
 
1441
+ var $text = $this.data('save'),
1442
+ $value = $this.val();
1443
 
1444
  $buttons.attr('value', $text);
1445
 
1446
+ if ($this.hasClass('spf-save-ajax')) {
1447
 
1448
  e.preventDefault();
1449
 
1450
  $panel.addClass('spf-saving');
1451
  $buttons.prop('disabled', true);
1452
 
1453
+ window.wp.ajax.post('spf_' + $panel.data('unique') + '_ajax_save', {
1454
  data: $('#spf-form').serializeJSONSP_WPCF()
1455
  })
1456
+ .done(function (response) {
1457
 
1458
+ clearTimeout(timeout);
1459
 
1460
+ var $result_success = $('.spf-form-success');
1461
 
1462
+ $result_success.empty().append(response.notice).slideDown('fast', function () {
1463
+ timeout = setTimeout(function () {
1464
+ $result_success.slideUp('fast');
1465
+ }, 2000);
1466
+ });
1467
 
1468
+ // clear errors
1469
+ $('.spf-error').remove();
1470
 
1471
+ var $append_errors = $('.spf-form-error');
1472
 
1473
+ $append_errors.empty().hide();
1474
 
1475
+ if (Object.keys(response.errors).length) {
1476
 
1477
+ var error_icon = '<i class="spf-label-error spf-error">!</i>';
1478
 
1479
+ $.each(response.errors, function (key, error_message) {
1480
 
1481
+ var $field = $('[data-depend-id="' + key + '"]'),
1482
+ $link = $('#spf-tab-link-' + ($field.closest('.spf-section').index() + 1)),
1483
+ $tab = $link.closest('.spf-tab-depth-0');
1484
 
1485
+ $field.closest('.spf-fieldset').append('<p class="spf-text-error spf-error">' + error_message + '</p>');
1486
 
1487
+ if (!$link.find('.spf-error').length) {
1488
+ $link.append(error_icon);
1489
+ }
1490
 
1491
+ if (!$tab.find('.spf-arrow .spf-error').length) {
1492
+ $tab.find('.spf-arrow').append(error_icon);
1493
+ }
1494
 
1495
+ console.log(error_message);
1496
 
1497
+ $append_errors.append('<div>' + error_icon + ' ' + error_message + '</div>');
1498
 
1499
+ });
1500
 
1501
+ $append_errors.show();
1502
 
1503
+ }
1504
 
1505
+ $panel.removeClass('spf-saving');
1506
+ $buttons.prop('disabled', false).attr('value', $value);
1507
+ flooding = false;
1508
 
1509
+ })
1510
+ .fail(function (response) {
1511
+ alert(response.error);
1512
+ });
1513
 
1514
  }
1515
 
1525
  //
1526
  // Taxonomy Framework
1527
  //
1528
+ $.fn.spf_taxonomy = function () {
1529
+ return this.each(function () {
1530
 
1531
  var $this = $(this),
1532
+ $form = $this.parents('form');
1533
 
1534
+ if ($form.attr('id') === 'addtag') {
1535
 
1536
  var $submit = $form.find('#submit'),
1537
+ $cloned = $this.find('.spf-field').spf_clone();
1538
 
1539
+ $submit.on('click', function () {
1540
 
1541
+ if (!$form.find('.form-required').hasClass('form-invalid')) {
1542
 
1543
  $this.data('inited', false);
1544
 
1545
  $this.empty();
1546
 
1547
+ $this.html($cloned);
1548
 
1549
  $cloned = $cloned.spf_clone();
1550
 
1562
  //
1563
  // Shortcode Framework
1564
  //
1565
+ $.fn.spf_shortcode = function () {
1566
 
1567
  var base = this;
1568
 
1569
+ base.shortcode_parse = function (serialize, key) {
1570
 
1571
  var shortcode = '';
1572
 
1573
+ $.each(serialize, function (shortcode_key, shortcode_values) {
1574
 
1575
+ key = (key) ? key : shortcode_key;
1576
 
1577
  shortcode += '[' + key;
1578
 
1579
+ $.each(shortcode_values, function (shortcode_tag, shortcode_value) {
1580
 
1581
+ if (shortcode_tag === 'content') {
1582
 
1583
  shortcode += ']';
1584
  shortcode += shortcode_value;
1585
+ shortcode += '[/' + key + '';
1586
 
1587
  } else {
1588
 
1589
+ shortcode += base.shortcode_tags(shortcode_tag, shortcode_value);
1590
 
1591
  }
1592
 
1600
 
1601
  };
1602
 
1603
+ base.shortcode_tags = function (shortcode_tag, shortcode_value) {
1604
 
1605
  var shortcode = '';
1606
 
1607
+ if (shortcode_value !== '') {
1608
 
1609
+ if (typeof shortcode_value === 'object' && !$.isArray(shortcode_value)) {
1610
 
1611
+ $.each(shortcode_value, function (sub_shortcode_tag, sub_shortcode_value) {
1612
 
1613
  // sanitize spesific key/value
1614
+ switch (sub_shortcode_tag) {
1615
 
1616
  case 'background-image':
1617
+ sub_shortcode_value = (sub_shortcode_value.url) ? sub_shortcode_value.url : '';
1618
+ break;
1619
 
1620
  }
1621
 
1622
+ if (sub_shortcode_value !== '') {
1623
  shortcode += ' ' + sub_shortcode_tag.replace('-', '_') + '="' + sub_shortcode_value.toString() + '"';
1624
  }
1625
 
1637
 
1638
  };
1639
 
1640
+ base.insertAtChars = function (_this, currentValue) {
1641
 
1642
+ var obj = (typeof _this[0].name !== 'undefined') ? _this[0] : _this;
1643
 
1644
+ if (obj.value.length && typeof obj.selectionStart !== 'undefined') {
1645
  obj.focus();
1646
+ return obj.value.substring(0, obj.selectionStart) + currentValue + obj.value.substring(obj.selectionEnd, obj.value.length);
1647
  } else {
1648
  obj.focus();
1649
  return currentValue;
1651
 
1652
  };
1653
 
1654
+ base.send_to_editor = function (html, editor_id) {
1655
 
1656
  var tinymce_editor;
1657
 
1658
+ if (typeof tinymce !== 'undefined') {
1659
+ tinymce_editor = tinymce.get(editor_id);
1660
  }
1661
 
1662
+ if (tinymce_editor && !tinymce_editor.isHidden()) {
1663
+ tinymce_editor.execCommand('mceInsertContent', false, html);
1664
  } else {
1665
+ var $editor = $('#' + editor_id);
1666
+ $editor.val(base.insertAtChars($editor, html)).trigger('change');
1667
  }
1668
 
1669
  };
1670
 
1671
+ return this.each(function () {
1672
+
1673
+ var $modal = $(this),
1674
+ $load = $modal.find('.spf-modal-load'),
1675
+ $content = $modal.find('.spf-modal-content'),
1676
+ $insert = $modal.find('.spf-modal-insert'),
1677
+ $loading = $modal.find('.spf-modal-loading'),
1678
+ $select = $modal.find('select'),
1679
+ modal_id = $modal.data('modal-id'),
1680
+ nonce = $modal.data('nonce'),
1681
+ editor_id,
1682
+ target_id,
1683
+ gutenberg_id,
1684
+ sc_key,
1685
+ sc_name,
1686
+ sc_view,
1687
+ sc_group,
1688
+ $cloned,
1689
+ $button;
1690
+
1691
+ $(document).on('click', '.spf-shortcode-button[data-modal-id="' + modal_id + '"]', function (e) {
1692
 
1693
  e.preventDefault();
1694
 
1695
+ $button = $(this);
1696
+ editor_id = $button.data('editor-id') || false;
1697
+ target_id = $button.data('target-id') || false;
1698
  gutenberg_id = $button.data('gutenberg-id') || false;
1699
 
1700
  $modal.show();
1701
 
1702
  // single usage trigger first shortcode
1703
+ if ($modal.hasClass('spf-shortcode-single') && sc_name === undefined) {
1704
  $select.trigger('change');
1705
  }
1706
 
1707
  });
1708
 
1709
+ $select.on('change', function () {
1710
 
1711
+ var $option = $(this);
1712
  var $selected = $option.find(':selected');
1713
 
1714
+ sc_key = $option.val();
1715
+ sc_name = $selected.data('shortcode');
1716
+ sc_view = $selected.data('view') || 'normal';
1717
  sc_group = $selected.data('group') || sc_name;
1718
 
1719
  $load.empty();
1720
 
1721
+ if (sc_key) {
1722
 
1723
  $loading.show();
1724
 
1725
+ window.wp.ajax.post('spf-get-shortcode-' + modal_id, {
1726
  shortcode_key: sc_key,
1727
  nonce: nonce
1728
  })
1729
+ .done(function (response) {
1730
 
1731
+ $loading.hide();
1732
 
1733
+ var $appended = $(response.content).appendTo($load);
1734
 
1735
+ $insert.parent().removeClass('hidden');
1736
 
1737
+ $cloned = $appended.find('.spf--repeat-shortcode').spf_clone();
1738
 
1739
+ $appended.spf_reload_script();
1740
+ $appended.find('.spf-fields').spf_reload_script();
1741
 
1742
+ });
1743
 
1744
  } else {
1745
 
1749
 
1750
  });
1751
 
1752
+ $insert.on('click', function (e) {
1753
 
1754
  e.preventDefault();
1755
 
1756
  var shortcode = '';
1757
  var serialize = $modal.find('.spf-field:not(.hidden)').find(':input').serializeObjectSP_WPCF();
1758
 
1759
+ switch (sc_view) {
1760
 
1761
  case 'contents':
1762
+ var contentsObj = (sc_name) ? serialize[sc_name] : serialize;
1763
+ $.each(contentsObj, function (sc_key, sc_value) {
1764
+ var sc_tag = (sc_name) ? sc_name : sc_key;
1765
+ shortcode += '[' + sc_tag + ']' + sc_value + '[/' + sc_tag + ']';
1766
  });
1767
+ break;
1768
 
1769
  case 'group':
1770
 
1771
  shortcode += '[' + sc_name;
1772
+ $.each(serialize[sc_name], function (sc_key, sc_value) {
1773
+ shortcode += base.shortcode_tags(sc_key, sc_value);
1774
  });
1775
  shortcode += ']';
1776
+ shortcode += base.shortcode_parse(serialize[sc_group], sc_group);
1777
  shortcode += '[/' + sc_name + ']';
1778
 
1779
+ break;
1780
 
1781
  case 'repeater':
1782
+ shortcode += base.shortcode_parse(serialize[sc_group], sc_group);
1783
+ break;
1784
 
1785
  default:
1786
+ shortcode += base.shortcode_parse(serialize);
1787
+ break;
1788
 
1789
  }
1790
 
1791
+ if (gutenberg_id) {
1792
 
1793
  var content = window.spf_gutenberg_props.attributes.hasOwnProperty('shortcode') ? window.spf_gutenberg_props.attributes.shortcode : '';
1794
+ window.spf_gutenberg_props.setAttributes({ shortcode: content + shortcode });
1795
 
1796
+ } else if (editor_id) {
1797
 
1798
+ base.send_to_editor(shortcode, editor_id);
1799
 
1800
  } else {
1801
 
1802
  var $textarea = (target_id) ? $(target_id) : $button.parent().find('textarea');
1803
+ $textarea.val(base.insertAtChars($textarea, shortcode)).trigger('change');
1804
 
1805
  }
1806
 
1808
 
1809
  });
1810
 
1811
+ $modal.on('click', '.spf--repeat-button', function (e) {
1812
 
1813
  e.preventDefault();
1814
 
1815
  var $repeatable = $modal.find('.spf--repeatable');
1816
+ var $new_clone = $cloned.spf_clone();
1817
  var $remove_btn = $new_clone.find('.spf-repeat-remove');
1818
 
1819
+ var $appended = $new_clone.appendTo($repeatable);
1820
 
1821
  $new_clone.find('.spf-fields').spf_reload_script();
1822
 
1823
+ SP_WPCF.helper.name_nested_replace($modal.find('.spf--repeat-shortcode'), sc_group);
1824
 
1825
+ $remove_btn.on('click', function () {
1826
 
1827
  $new_clone.remove();
1828
 
1829
+ SP_WPCF.helper.name_nested_replace($modal.find('.spf--repeat-shortcode'), sc_group);
1830
 
1831
  });
1832
 
1833
  });
1834
 
1835
+ $modal.on('click', '.spf-modal-close, .spf-modal-overlay', function () {
1836
  $modal.hide();
1837
  });
1838
 
1842
  //
1843
  // Helper Checkbox Checker
1844
  //
1845
+ $.fn.spf_checkbox = function () {
1846
+ return this.each(function () {
1847
 
1848
+ var $this = $(this),
1849
+ $input = $this.find('.spf--input'),
1850
+ $checkbox = $this.find('.spf--checkbox');
1851
 
1852
+ $checkbox.on('click', function () {
1853
+ $input.val(Number($checkbox.prop('checked'))).trigger('change');
1854
  });
1855
 
1856
  });
1859
  //
1860
  // Field: wp_editor
1861
  //
1862
+ $.fn.spf_field_wp_editor = function () {
1863
+ return this.each(function () {
1864
 
1865
+ if (typeof window.wp.editor === 'undefined' || typeof window.tinyMCEPreInit === 'undefined' || typeof window.tinyMCEPreInit.mceInit.spf_wp_editor === 'undefined') {
1866
  return;
1867
  }
1868
 
1869
+ var $this = $(this),
1870
+ $editor = $this.find('.spf-wp-editor'),
1871
+ $textarea = $this.find('textarea');
1872
 
1873
  // If there is wp-editor remove it for avoid dupliated wp-editor conflicts.
1874
  var $has_wp_editor = $this.find('.wp-editor-wrap').length || $this.find('.mce-container').length;
1875
 
1876
+ if ($has_wp_editor) {
1877
  $editor.empty();
1878
  $editor.append($textarea);
1879
  $textarea.css('display', '');
1894
  var field_editor_settings = $editor.data('editor-settings');
1895
 
1896
  // Add on change event handle
1897
+ var editor_on_change = function (editor) {
1898
+ editor.on('change', SP_WPCF.helper.debounce(function () {
1899
  editor.save();
1900
  $textarea.trigger('change');
1901
+ }, 250));
1902
  };
1903
 
1904
  // Extend editor selector and on change event handler
1905
+ default_editor_settings.tinymce = $.extend({}, default_editor_settings.tinymce, { selector: '#' + uid, setup: editor_on_change });
1906
 
1907
  // Override editor tinymce settings
1908
+ if (field_editor_settings.tinymce === false) {
1909
  default_editor_settings.tinymce = false;
1910
  $editor.addClass('spf-no-tinymce');
1911
  }
1912
 
1913
  // Override editor quicktags settings
1914
+ if (field_editor_settings.quicktags === false) {
1915
  default_editor_settings.quicktags = false;
1916
  $editor.addClass('spf-no-quicktags');
1917
  }
1918
 
1919
  // Wait until :visible
1920
  var interval = setInterval(function () {
1921
+ if ($this.is(':visible')) {
1922
  window.wp.editor.initialize(uid, default_editor_settings);
1923
  clearInterval(interval);
1924
  }
1925
  });
1926
 
1927
  // Add Media buttons
1928
+ if (field_editor_settings.media_buttons && window.spf_media_buttons) {
1929
 
1930
  var $editor_buttons = $editor.find('.wp-media-buttons');
1931
 
1932
+ if ($editor_buttons.length) {
1933
 
1934
  $editor_buttons.find('.spf-shortcode-button').data('editor-id', uid);
1935
 
1939
 
1940
  $media_buttons.find('.spf-shortcode-button').data('editor-id', uid);
1941
 
1942
+ $editor.prepend($media_buttons);
1943
 
1944
  }
1945
 
1952
  //
1953
  // Siblings
1954
  //
1955
+ $.fn.spf_siblings = function () {
1956
+ return this.each(function () {
1957
 
1958
+ var $this = $(this),
1959
+ $siblings = $this.find('.spf--sibling'),
1960
+ multiple = $this.data('multiple') || false;
1961
 
1962
+ $siblings.on('click', function () {
1963
 
1964
  var $sibling = $(this);
1965
 
1966
+ if (multiple) {
1967
 
1968
+ if ($sibling.hasClass('spf--active')) {
1969
  $sibling.removeClass('spf--active');
1970
  $sibling.find('input').prop('checked', false).trigger('change');
1971
  } else {
1989
  //
1990
  // WP Color Picker
1991
  //
1992
+ if (typeof Color === 'function') {
1993
 
1994
+ Color.fn.toString = function () {
1995
 
1996
+ if (this._alpha < 1) {
1997
  return this.toCSS('rgba', this._alpha).replace(/\s+/g, '');
1998
  }
1999
 
2000
+ var hex = parseInt(this._color, 10).toString(16);
2001
 
2002
+ if (this.error) { return ''; }
2003
 
2004
+ if (hex.length < 6) {
2005
  for (var i = 6 - hex.length - 1; i >= 0; i--) {
2006
  hex = '0' + hex;
2007
  }
2013
 
2014
  }
2015
 
2016
+ SP_WPCF.funcs.parse_color = function (color) {
2017
 
2018
  var value = color.replace(/\s+/g, ''),
2019
+ trans = (value.indexOf('rgba') !== -1) ? parseFloat(value.replace(/^.*,(.+)\)/, '$1') * 100) : 100,
2020
+ rgba = (trans < 100) ? true : false;
2021
 
2022
  return { value: value, transparent: trans, rgba: rgba };
2023
 
2024
  };
2025
 
2026
+ $.fn.spf_color = function () {
2027
+ return this.each(function () {
2028
 
2029
+ var $input = $(this),
2030
+ picker_color = SP_WPCF.funcs.parse_color($input.val()),
2031
+ palette_color = window.spf_vars.color_palette.length ? window.spf_vars.color_palette : true,
2032
+ $container;
2033
 
2034
  // Destroy and Reinit
2035
+ if ($input.hasClass('wp-color-picker')) {
2036
  $input.closest('.wp-picker-container').after($input).remove();
2037
  }
2038
 
2039
  $input.wpColorPicker({
2040
  palettes: palette_color,
2041
+ change: function (event, ui) {
2042
 
2043
  var ui_color_value = ui.color.toString();
2044
 
2047
  $input.val(ui_color_value).trigger('change');
2048
 
2049
  },
2050
+ create: function () {
2051
 
2052
  $container = $input.closest('.wp-picker-container');
2053
 
2054
  var a8cIris = $input.data('a8cIris'),
2055
+ $transparent_wrap = $('<div class="spf--transparent-wrap">' +
2056
+ '<div class="spf--transparent-slider"></div>' +
2057
+ '<div class="spf--transparent-offset"></div>' +
2058
+ '<div class="spf--transparent-text"></div>' +
2059
+ '<div class="spf--transparent-button button button-small">transparent</div>' +
2060
+ '</div>').appendTo($container.find('.wp-picker-holder')),
2061
+ $transparent_slider = $transparent_wrap.find('.spf--transparent-slider'),
2062
+ $transparent_text = $transparent_wrap.find('.spf--transparent-text'),
2063
+ $transparent_offset = $transparent_wrap.find('.spf--transparent-offset'),
2064
+ $transparent_button = $transparent_wrap.find('.spf--transparent-button');
2065
+
2066
+ if ($input.val() === 'transparent') {
2067
  $container.addClass('spf--transparent-active');
2068
  }
2069
 
2070
+ $transparent_button.on('click', function () {
2071
+ if ($input.val() !== 'transparent') {
2072
  $input.val('transparent').trigger('change').removeClass('iris-error');
2073
  $container.addClass('spf--transparent-active');
2074
  } else {
2075
+ $input.val(a8cIris._color.toString()).trigger('change');
2076
  $container.removeClass('spf--transparent-active');
2077
  }
2078
  });
2082
  step: 1,
2083
  min: 0,
2084
  max: 100,
2085
+ slide: function (event, ui) {
2086
 
2087
+ var slide_value = parseFloat(ui.value / 100);
2088
  a8cIris._color._alpha = slide_value;
2089
+ $input.wpColorPicker('color', a8cIris._color.toString());
2090
+ $transparent_text.text((slide_value === 1 || slide_value === 0 ? '' : slide_value));
2091
 
2092
  },
2093
+ create: function () {
2094
 
2095
+ var slide_value = parseFloat(picker_color.transparent / 100),
2096
+ text_value = slide_value < 1 ? slide_value : '';
2097
 
2098
  $transparent_text.text(text_value);
2099
  $transparent_offset.css('background-color', picker_color.value);
2100
 
2101
+ $container.on('click', '.wp-picker-clear', function () {
2102
 
2103
  a8cIris._color._alpha = 1;
2104
  $transparent_text.text('');
2108
 
2109
  });
2110
 
2111
+ $container.on('click', '.wp-picker-default', function () {
2112
 
2113
+ var default_color = SP_WPCF.funcs.parse_color($input.data('default-color')),
2114
+ default_value = parseFloat(default_color.transparent / 100),
2115
+ default_text = default_value < 1 ? default_value : '';
2116
 
2117
  a8cIris._color._alpha = default_value;
2118
  $transparent_text.text(default_text);
2120
 
2121
  });
2122
 
2123
+ $container.on('click', '.wp-color-result', function () {
2124
  $transparent_wrap.toggle();
2125
  });
2126
 
2127
+ $('body').on('click.wpcolorpicker', function () {
2128
  $transparent_wrap.hide();
2129
  });
2130
 
2139
  //
2140
  // ChosenJS
2141
  //
2142
+ $.fn.spf_chosen = function () {
2143
+ return this.each(function () {
 
 
 
 
 
 
 
 
 
 
2144
 
2145
+ var $this = $(this),
2146
+ $inited = $this.parent().find('.chosen-container'),
2147
+ is_multi = $this.attr('multiple') || false,
2148
+ set_width = is_multi ? '100%' : 'auto',
2149
+ set_options = $.extend({
2150
+ allow_single_deselect: true,
2151
+ disable_search_threshold: 15,
2152
+ width: set_width
2153
+ }, $this.data());
2154
+
2155
+ if ($inited.length) {
2156
  $inited.remove();
2157
  }
2158
 
2164
  //
2165
  // Number (only allow numeric inputs)
2166
  //
2167
+ $.fn.spf_number = function () {
2168
+ return this.each(function () {
2169
 
2170
+ $(this).on('keypress', function (e) {
2171
 
2172
+ if (e.keyCode !== 0 && e.keyCode !== 8 && e.keyCode !== 45 && e.keyCode !== 46 && (e.keyCode < 48 || e.keyCode > 57)) {
2173
  return false;
2174
  }
2175
 
2181
  //
2182
  // Help Tooltip
2183
  //
2184
+ $.fn.spf_help = function () {
2185
+ return this.each(function () {
2186
 
2187
  var $this = $(this),
2188
+ $tooltip,
2189
+ offset_left;
2190
 
2191
  $this.on({
2192
+ mouseenter: function () {
2193
 
2194
+ $tooltip = $('<div class="spf-tooltip"></div>').html($this.find('.spf-help-text').html()).appendTo('body');
2195
+ offset_left = (SP_WPCF.vars.is_rtl) ? ($this.offset().left + 24) : ($this.offset().left - $tooltip.outerWidth());
2196
 
2197
  $tooltip.css({
2198
+ top: $this.offset().top - (($tooltip.outerHeight() / 2) - 14),
2199
  left: offset_left,
2200
  });
2201
 
2202
  },
2203
+ mouseleave: function () {
2204
 
2205
+ if ($tooltip !== undefined) {
2206
  $tooltip.remove();
2207
  }
2208
 
2216
  //
2217
  // Customize Refresh
2218
  //
2219
+ $.fn.spf_customizer_refresh = function () {
2220
+ return this.each(function () {
2221
 
2222
+ var $this = $(this),
2223
+ $complex = $this.closest('.spf-customize-complex');
2224
 
2225
+ if ($complex.length) {
2226
 
2227
+ var $input = $complex.find(':input'),
2228
+ $unique = $complex.data('unique-id'),
2229
+ $option = $complex.data('option-id'),
2230
+ obj = $input.serializeObjectSP_WPCF(),
2231
+ data = (!$.isEmptyObject(obj)) ? obj[$unique][$option] : '',
2232
+ control = wp.customize.control($unique + '[' + $option + ']');
2233
 
2234
  // clear the value to force refresh.
2235
  control.setting._value = null;
2236
 
2237
+ control.setting.set(data);
2238
 
2239
  } else {
2240
 
2250
  //
2251
  // Customize Listen Form Elements
2252
  //
2253
+ $.fn.spf_customizer_listen = function (options) {
2254
 
2255
  var settings = $.extend({
2256
  closest: false,
2257
+ }, options);
2258
 
2259
+ return this.each(function () {
2260
 
2261
+ if (window.wp.customize === undefined) { return; }
2262
 
2263
+ var $this = (settings.closest) ? $(this).closest('.spf-customize-complex') : $(this),
2264
+ $input = $this.find(':input'),
2265
+ unique_id = $this.data('unique-id'),
2266
+ option_id = $this.data('option-id');
2267
 
2268
+ if (unique_id === undefined) { return; }
2269
 
2270
+ $input.on('change keyup', SP_WPCF.helper.debounce(function () {
2271
 
2272
  var obj = $this.find(':input').serializeObjectSP_WPCF();
2273
 
2274
+ if (!$.isEmptyObject(obj) && obj[unique_id]) {
2275
 
2276
+ window.wp.customize.control(unique_id + '[' + option_id + ']').setting.set(obj[unique_id][option_id]);
2277
 
2278
  }
2279
 
2280
+ }, 250));
2281
 
2282
  });
2283
  };
2285
  //
2286
  // Customizer Listener for Reload JS
2287
  //
2288
+ $(document).on('expanded', '.control-section-spf', function () {
2289
 
2290
  var $this = $(this);
2291
 
2292
+ if ($this.hasClass('open') && !$this.data('inited')) {
2293
  $this.spf_dependency();
2294
+ $this.find('.spf-customize-field').spf_reload_script({ dependency: false });
2295
  $this.find('.spf-customize-complex').spf_customizer_listen();
2296
  $this.data('inited', true);
2297
  }
2301
  //
2302
  // Window on resize
2303
  //
2304
+ SP_WPCF.vars.$window.on('resize spf.resize', SP_WPCF.helper.debounce(function (event) {
2305
 
2306
  var window_width = navigator.userAgent.indexOf('AppleWebKit/') > -1 ? SP_WPCF.vars.$window.width() : window.innerWidth;
2307
 
2308
+ if (window_width <= 782 && !SP_WPCF.vars.onloaded) {
2309
  $('.spf-section').spf_reload_script();
2310
+ SP_WPCF.vars.onloaded = true;
2311
  }
2312
 
2313
  }, 200)).trigger('spf.resize');
2315
  //
2316
  // Widgets Framework
2317
  //
2318
+ $.fn.spf_widgets = function () {
2319
+ if (this.length) {
2320
 
2321
+ $(document).on('widget-added widget-updated', function (event, $widget) {
2322
  $widget.find('.spf-fields').spf_reload_script();
2323
  });
2324
 
2325
+ $('.widgets-sortables, .control-section-sidebar').on('sortstop', function (event, ui) {
2326
  ui.item.find('.spf-fields').spf_reload_script_retry();
2327
  });
2328
 
2329
+ $(document).on('click', '.widget-top', function (event) {
2330
  $(this).parent().find('.spf-fields').spf_reload_script();
2331
  });
2332
 
2336
  //
2337
  // Retry Plugins
2338
  //
2339
+ $.fn.spf_reload_script_retry = function () {
2340
+ return this.each(function () {
2341
 
2342
  var $this = $(this);
2343
 
2344
+ if ($this.data('inited')) {
2345
  $this.children('.spf-field-wp_editor').spf_field_wp_editor();
2346
  }
2347
 
2351
  //
2352
  // Reload Plugins
2353
  //
2354
+ $.fn.spf_reload_script = function (options) {
2355
 
2356
  var settings = $.extend({
2357
  dependency: true,
2358
+ }, options);
2359
 
2360
+ return this.each(function () {
2361
 
2362
  var $this = $(this);
2363
 
2364
  // Avoid for conflicts
2365
+ if (!$this.data('inited')) {
2366
 
2367
  // Field plugins
2368
  $this.children('.spf-field-accordion').spf_field_accordion();
2369
+ // $this.children('.spf-field-backup').spf_field_backup();
2370
  // $this.children('.spf-field-background_adv').spf_field_background();
2371
  // $this.children('.spf-field-background').spf_field_background();
2372
  $this.children('.spf-field-code_editor').spf_field_code_editor();
2373
+ // $this.children('.spf-field-date').spf_field_date();
2374
  $this.children('.spf-field-fieldset').spf_field_fieldset();
2375
  $this.children('.spf-field-gallery').spf_field_gallery();
2376
  $this.children('.spf-field-group').spf_field_group();
2377
+ // $this.children('.spf-field-icon').spf_field_icon();
2378
  $this.children('.spf-field-media').spf_field_media();
2379
+ // $this.children('.spf-field-repeater').spf_field_repeater();
2380
+ // $this.children('.spf-field-slider').spf_field_slider();
2381
  // $this.children('.spf-field-sortable').spf_field_sortable();
2382
  // $this.children('.spf-field-sorter').spf_field_sorter();
2383
  $this.children('.spf-field-spinner').spf_field_spinner();
2384
  $this.children('.spf-field-switcher').spf_field_switcher();
2385
+ // $this.children('.spf-field-tabbed').spf_field_tabbed();
2386
  $this.children('.spf-field-typography').spf_field_typography();
2387
  $this.children('.spf-field-upload').spf_field_upload();
2388
  $this.children('.spf-field-wp_editor').spf_field_wp_editor();
2421
  // Help Tooptip
2422
  $this.children('.spf-field').find('.spf-help').spf_help();
2423
 
2424
+ if (settings.dependency) {
2425
  $this.spf_dependency();
2426
  }
2427
 
2437
  //
2438
  // Document ready and run scripts.
2439
  //
2440
+ $(document).ready(function () {
2441
 
2442
  $('.spf-save').spf_save();
2443
  $('.spf-confirm').spf_confirm();
2457
 
2458
 
2459
  // ======================================================
2460
+ // Post
2461
  // ------------------------------------------------------
2462
  // Trigger taxonomy list when post type is selected.
2463
  $('.sp_wpcp_post_type select').change(function (event) {
2477
  event.preventDefault();
2478
  var data = {
2479
  action: 'wpcp_get_terms', // Callback function.
2480
+ wpcf_post_taxonomy: $(this).val(),
2481
  }
2482
  $.post(ajaxurl, data, function (resp) {
2483
  $('.sp_wpcp_taxonomy_terms select').html(resp);
2500
  });
2501
  });
2502
 
2503
+ // $("label:contains((Pro)) input,.spf-pro-only, .spf-pro-only input, .pro_checkbox input").attr('disabled', true).css('opacity', '0.8');
2504
+ })(jQuery, window, document);
admin/views/wpcfree-metabox/assets/js/spf.min.js CHANGED
@@ -1 +1 @@
1
- !function($,window,document,undefined){"use strict";var SP_WPCF=SP_WPCF||{};SP_WPCF.funcs={},SP_WPCF.vars={onloaded:!1,$body:$("body"),$window:$(window),$document:$(document),is_rtl:$("body").hasClass("rtl"),code_themes:[]},SP_WPCF.helper={uid:function(prefix){return(prefix||"")+Math.random().toString(36).substr(2,9)},preg_quote:function(str){return(str+"").replace(/(\[|\-|\])/g,"\\$1")},name_nested_replace:function($selector,field_id){var checks=[],regex=new RegExp("("+SP_WPCF.helper.preg_quote(field_id)+")\\[(\\d+)\\]","g");$selector.find(":radio").each(function(){(this.checked||this.orginal_checked)&&(this.orginal_checked=!0)}),$selector.each(function(index){$(this).find(":input").each(function(){this.name=this.name.replace(regex,field_id+"["+index+"]"),this.orginal_checked&&(this.checked=!0)})})},debounce:function(callback,threshold,immediate){var timeout;return function(){var context=this,args=arguments,later=function(){timeout=null,immediate||callback.apply(context,args)},callNow=immediate&&!timeout;clearTimeout(timeout),timeout=setTimeout(later,threshold),callNow&&callback.apply(context,args)}},get_cookie:function(name){var e,b,cookie=document.cookie,p=name+"=";if(cookie){if(-1===(b=cookie.indexOf("; "+p))){if(0!==(b=cookie.indexOf(p)))return null}else b+=2;return-1===(e=cookie.indexOf(";",b))&&(e=cookie.length),decodeURIComponent(cookie.substring(b+p.length,e))}},set_cookie:function(name,value,expires,path,domain,secure){var d=new Date;"object"==typeof expires&&expires.toGMTString?expires=expires.toGMTString():parseInt(expires,10)?(d.setTime(d.getTime()+1e3*parseInt(expires,10)),expires=d.toGMTString()):expires="",document.cookie=name+"="+encodeURIComponent(value)+(expires?"; expires="+expires:"")+(path?"; path="+path:"")+(domain?"; domain="+domain:"")+(secure?"; secure":"")},remove_cookie:function(name,path,domain,secure){SP_WPCF.helper.set_cookie(name,"",-1e3,path,domain,secure)}},$.fn.spf_clone=function(){for(var base=$.fn.clone.apply(this,arguments),clone=this.find("select").add(this.filter("select")),cloned=base.find("select").add(base.filter("select")),i=0;i<clone.length;++i)for(var j=0;j<clone[i].options.length;++j)!0===clone[i].options[j].selected&&(cloned[i].options[j].selected=!0);return this.find(":radio").each(function(){this.orginal_checked=this.checked}),base},$.fn.spf_expand_all=function(){return this.each(function(){$(this).on("click",function(e){e.preventDefault(),$(".spf-wrapper").toggleClass("spf-show-all"),$(".spf-section").spf_reload_script(),$(this).find(".fa").toggleClass("fa-indent").toggleClass("fa-outdent")})})},$.fn.spf_nav_options=function(){return this.each(function(){var $nav=$(this),$links=$nav.find("a"),$hidden=$nav.closest(".spf").find(".spf-section-id"),$last_section;$(window).on("hashchange",function(){var hash=window.location.hash.match(new RegExp("tab=([^&]*)")),slug=hash?hash[1]:$links.first().attr("href").replace("#tab=",""),$link=$("#spf-tab-link-"+slug);if($link.length>0){$link.closest(".spf-tab-depth-0").addClass("spf-tab-active").siblings().removeClass("spf-tab-active"),$links.removeClass("spf-section-active"),$link.addClass("spf-section-active"),void 0!==$last_section&&$last_section.hide();var $section=$("#spf-section-"+slug);$section.css({display:"block"}),$section.spf_reload_script(),$hidden.val(slug),$last_section=$section}}).trigger("hashchange")})},$.fn.spf_nav_metabox=function(){return this.each(function(){var $nav=$(this),$links=$nav.find("a"),unique_id=$nav.data("unique"),post_id=$("#post_ID").val()||"global",$last_section,$last_link;$links.on("click",function(e){e.preventDefault();var $link=$(this),section_id=$link.data("section");void 0!==$last_link&&$last_link.removeClass("spf-section-active"),void 0!==$last_section&&$last_section.hide(),$link.addClass("spf-section-active");var $section=$("#spf-section-"+section_id);$section.css({display:"block"}),$section.spf_reload_script(),SP_WPCF.helper.set_cookie("spf-last-metabox-tab-"+post_id+"-"+unique_id,section_id),$last_section=$section,$last_link=$link});var get_cookie=SP_WPCF.helper.get_cookie("spf-last-metabox-tab-"+post_id+"-"+unique_id);get_cookie?$nav.find('a[data-section="'+get_cookie+'"]').trigger("click"):$links.first("a").trigger("click")})},$.fn.spf_page_templates=function(){this.length&&$(document).on("change",".editor-page-attributes__template select, #page_template",function(){var maybe_value=$(this).val()||"default";$(".spf-page-templates").removeClass("spf-show").addClass("spf-hide"),$(".spf-page-"+maybe_value.toLowerCase().replace(/[^a-zA-Z0-9]+/g,"-")).removeClass("spf-hide").addClass("spf-show")})},$.fn.spf_post_formats=function(){this.length&&$(document).on("change",'.editor-post-format select, #formatdiv input[name="post_format"]',function(){var maybe_value=$(this).val()||"default";maybe_value="0"===maybe_value?"default":maybe_value,$(".spf-post-formats").removeClass("spf-show").addClass("spf-hide"),$(".spf-post-format-"+maybe_value).removeClass("spf-hide").addClass("spf-show")})},$.fn.spf_search=function(){return this.each(function(){var $this,$input;$(this).find("input").on("change keyup",function(){var value=$(this).val(),$wrapper=$(".spf-wrapper"),$section,$fields=$wrapper.find(".spf-section").find("> .spf-field:not(.hidden)"),$titles=$fields.find("> .spf-title, .spf-search-tags");value.length>3?($fields.addClass("spf-hidden"),$wrapper.addClass("spf-search-all"),$titles.each(function(){var $title=$(this);if($title.text().match(new RegExp(".*?"+value+".*?","i"))){var $field=$title.closest(".spf-field");$field.removeClass("spf-hidden"),$field.parent().spf_reload_script()}})):($fields.removeClass("spf-hidden"),$wrapper.removeClass("spf-search-all"))})})},$.fn.spf_sticky=function(){return this.each(function(){var $this=$(this),$window=$(window),$inner=$this.find(".spf-header-inner"),padding=parseInt($inner.css("padding-left"))+parseInt($inner.css("padding-right")),offset=32,scrollTop=0,lastTop=0,ticking=!1,stickyUpdate=function(){var offsetTop=$this.offset().top,stickyTop=Math.max(32,offsetTop-scrollTop),winWidth=Math.max(document.documentElement.clientWidth,window.innerWidth||0);stickyTop<=32&&winWidth>782?($inner.css({width:$this.outerWidth()-padding}),$this.css({height:$this.outerHeight()}).addClass("spf-sticky")):($inner.removeAttr("style"),$this.removeAttr("style").removeClass("spf-sticky"))},requestTick=function(){ticking||requestAnimationFrame(function(){stickyUpdate(),ticking=!1}),ticking=!0},onSticky=function(){scrollTop=$window.scrollTop(),requestTick()};$window.on("scroll resize",onSticky),onSticky()})},$.fn.spf_dependency=function(){return this.each(function(){var $this=$(this),ruleset=$.spf_deps.createRuleset(),depends=[],is_global=!1;$this.children("[data-controller]").each(function(){var $field=$(this),controllers=$field.data("controller").split("|"),conditions=$field.data("condition").split("|"),values=$field.data("value").toString().split("|"),rules=ruleset;$field.data("depend-global")&&(is_global=!0),$.each(controllers,function(index,depend_id){var value=values[index]||"",condition=conditions[index]||conditions[0];(rules=rules.createRule('[data-depend-id="'+depend_id+'"]',condition,value)).include($field),depends.push(depend_id)})}),depends.length&&(is_global?$.spf_deps.enable(SP_WPCF.vars.$body,ruleset,depends):$.spf_deps.enable($this,ruleset,depends))})},$.fn.spf_field_accordion=function(){return this.each(function(){var $titles;$(this).find(".spf-accordion-title").on("click",function(){var $title=$(this),$icon=$title.find(".spf-accordion-icon"),$content=$title.next();$icon.hasClass("fa-angle-right")?$icon.removeClass("fa-angle-right").addClass("fa-angle-down"):$icon.removeClass("fa-angle-down").addClass("fa-angle-right"),$content.data("opened")||($content.spf_reload_script(),$content.data("opened",!0)),$content.toggleClass("spf-accordion-open")})})},$.fn.spf_field_code_editor=function(){return this.each(function(){if("function"==typeof CodeMirror){var $this=$(this),$textarea=$this.find("textarea"),$inited=$this.find(".CodeMirror"),data_editor=$textarea.data("editor");$inited.length&&$inited.remove();var interval=setInterval(function(){if($this.is(":visible")){var code_editor=CodeMirror.fromTextArea($textarea[0],data_editor);if("default"!==data_editor.theme&&-1===SP_WPCF.vars.code_themes.indexOf(data_editor.theme)){var $cssLink=$("<link>");$("#spf-codemirror-css").after($cssLink),$cssLink.attr({rel:"stylesheet",id:"spf-codemirror-"+data_editor.theme+"-css",href:data_editor.cdnURL+"/theme/"+data_editor.theme+".min.css",type:"text/css",media:"all"}),SP_WPCF.vars.code_themes.push(data_editor.theme)}CodeMirror.modeURL=data_editor.cdnURL+"/mode/%N/%N.min.js",CodeMirror.autoLoadMode(code_editor,data_editor.mode),code_editor.on("change",function(editor,event){$textarea.val(code_editor.getValue()).trigger("change")}),clearInterval(interval)}})}})},$.fn.spf_field_date=function(){return this.each(function(){var $this=$(this),$inputs=$this.find("input"),settings=$this.find(".spf-date-settings").data("settings"),wrapper='<div class="spf-datepicker-wrapper"></div>',$datepicker,defaults={showAnim:"",beforeShow:function(input,inst){$(inst.dpDiv).addClass("spf-datepicker-wrapper")},onClose:function(input,inst){$(inst.dpDiv).removeClass("spf-datepicker-wrapper")}};settings=$.extend({},settings,defaults),2===$inputs.length&&(settings=$.extend({},settings,{onSelect:function(selectedDate){var $this=$(this),$from=$inputs.first(),option=$inputs.first().attr("id")===$(this).attr("id")?"minDate":"maxDate",date=$.datepicker.parseDate(settings.dateFormat,selectedDate);$inputs.not(this).datepicker("option",option,date)}})),$inputs.each(function(){var $input=$(this);$input.hasClass("hasDatepicker")&&$input.removeAttr("id").removeClass("hasDatepicker"),$input.datepicker(settings)})})},$.fn.spf_field_fieldset=function(){return this.each(function(){$(this).find(".spf-fieldset-content").spf_reload_script()})},$.fn.spf_field_gallery=function(){return this.each(function(){var $this=$(this),$edit=$this.find(".spf-edit-gallery"),$clear=$this.find(".spf-clear-gallery"),$list=$this.find("ul.sp-gallery-images"),$input=$this.find("input"),$img=$this.find("img"),wp_media_frame;$this.on("click",".spf-button, .spf-edit-gallery",function(e){var $el=$(this),ids=$input.val(),what=$el.hasClass("spf-edit-gallery")?"edit":"add",state="add"!==what||ids.length?"gallery-edit":"gallery";e.preventDefault(),void 0!==window.wp&&window.wp.media&&window.wp.media.gallery&&("gallery"===state?(wp_media_frame=window.wp.media({library:{type:"image"},frame:"post",state:"gallery",multiple:!0})).open():(wp_media_frame=window.wp.media.gallery.edit('[gallery ids="'+ids+'"]'),"add"===what&&wp_media_frame.setState("gallery-library")),wp_media_frame.on("update",function(selection){$list.empty();var selectedIds=selection.models.map(function(attachment){var item=attachment.toJSON(),thumb=void 0!==item.sizes.thumbnail?item.sizes.thumbnail.url:item.url;return $list.append('<li><img src="'+thumb+'"></li>'),item.id});$input.val(selectedIds.join(",")).trigger("change"),$clear.removeClass("hidden"),$edit.removeClass("hidden")}))}),$clear.on("click",function(e){e.preventDefault(),$list.empty(),$input.val("").trigger("change"),$clear.addClass("hidden"),$edit.addClass("hidden")})})},$.fn.spf_field_group=function(){return this.each(function(){var $this=$(this),$fieldset=$this.children(".spf-fieldset"),$group=$fieldset.length?$fieldset:$this,$wrapper=$group.children(".spf-cloneable-wrapper"),$hidden=$group.children(".spf-cloneable-hidden"),$max=$group.children(".spf-cloneable-max"),$min=$group.children(".spf-cloneable-min"),field_id=$wrapper.data("field-id"),unique_id=$wrapper.data("unique-id"),is_number=Boolean(Number($wrapper.data("title-number"))),max=parseInt($wrapper.data("max")),min=parseInt($wrapper.data("min"));$wrapper.hasClass("ui-accordion")&&$wrapper.find(".ui-accordion-header-icon").remove();var update_title_numbers=function($selector){$selector.find(".spf-cloneable-title-number").each(function(index){$(this).html($(this).closest(".spf-cloneable-item").index()+1+".")})};$wrapper.accordion({header:"> .spf-cloneable-item > .spf-cloneable-title",collapsible:!0,active:!1,animate:!1,heightStyle:"content",icons:{header:"spf-cloneable-header-icon fa fa-angle-right",activeHeader:"spf-cloneable-header-icon fa fa-angle-down"},activate:function(event,ui){var $panel=ui.newPanel,$header=ui.newHeader;if($panel.length&&!$panel.data("opened")){var $fields,$first=$panel.children().first().find(":input").first(),$title=$header.find(".spf-cloneable-value");$first.on("keyup",function(event){$title.text($first.val())}),$panel.spf_reload_script(),$panel.data("opened",!0),$panel.data("retry",!1)}else $panel.data("retry")&&($panel.spf_reload_script_retry(),$panel.data("retry",!1))}}),$wrapper.sortable({axis:"y",handle:".spf-cloneable-title,.spf-cloneable-sort",helper:"original",cursor:"move",placeholder:"widget-placeholder",start:function(event,ui){$wrapper.accordion({active:!1}),$wrapper.sortable("refreshPositions"),ui.item.children(".spf-cloneable-content").data("retry",!0)},update:function(event,ui){SP_WPCF.helper.name_nested_replace($wrapper.children(".spf-cloneable-item"),field_id),$wrapper.spf_customizer_refresh(),is_number&&update_title_numbers($wrapper)}}),$group.children(".spf-cloneable-add").on("click",function(e){e.preventDefault();var count=$wrapper.children(".spf-cloneable-item").length;if($min.hide(),max&&count+1>max)$max.show();else{var new_field_id=unique_id+field_id+"["+count+"]",$cloned_item=$hidden.spf_clone(!0);$cloned_item.removeClass("spf-cloneable-hidden"),$cloned_item.find(":input").each(function(){this.name=new_field_id+this.name.replace(this.name.startsWith("_nonce")?"_nonce":unique_id,"")}),$cloned_item.find(".spf-data-wrapper").each(function(){$(this).attr("data-unique-id",new_field_id)}),$wrapper.append($cloned_item),$wrapper.accordion("refresh"),$wrapper.accordion({active:count}),$wrapper.spf_customizer_refresh(),$wrapper.spf_customizer_listen({closest:!0}),is_number&&update_title_numbers($wrapper)}});var event_clone=function(e){e.preventDefault();var count=$wrapper.children(".spf-cloneable-item").length;if($min.hide(),max&&count+1>max)$max.show();else{var $this,$parent=$(this).parent().parent(),$cloned_helper=$parent.children(".spf-cloneable-helper").spf_clone(!0),$cloned_title=$parent.children(".spf-cloneable-title").spf_clone(),$cloned_content=$parent.children(".spf-cloneable-content").spf_clone(),cloned_regex=new RegExp("("+SP_WPCF.helper.preg_quote(field_id)+")\\[(\\d+)\\]","g");$cloned_content.find(".spf-data-wrapper").each(function(){var $this=$(this);$this.attr("data-unique-id",$this.attr("data-unique-id").replace(cloned_regex,field_id+"["+($parent.index()+1)+"]"))});var $cloned=$('<div class="spf-cloneable-item" />');$cloned.append($cloned_helper),$cloned.append($cloned_title),$cloned.append($cloned_content),$wrapper.children().eq($parent.index()).after($cloned),SP_WPCF.helper.name_nested_replace($wrapper.children(".spf-cloneable-item"),field_id),$wrapper.accordion("refresh"),$wrapper.spf_customizer_refresh(),$wrapper.spf_customizer_listen({closest:!0}),is_number&&update_title_numbers($wrapper)}};$wrapper.children(".spf-cloneable-item").children(".spf-cloneable-helper").on("click",".spf-cloneable-clone",event_clone),$group.children(".spf-cloneable-hidden").children(".spf-cloneable-helper").on("click",".spf-cloneable-clone",event_clone);var event_remove=function(e){e.preventDefault();var count=$wrapper.children(".spf-cloneable-item").length;$max.hide(),$min.hide(),min&&count-1<min?$min.show():($(this).closest(".spf-cloneable-item").remove(),SP_WPCF.helper.name_nested_replace($wrapper.children(".spf-cloneable-item"),field_id),$wrapper.spf_customizer_refresh(),is_number&&update_title_numbers($wrapper))};$wrapper.children(".spf-cloneable-item").children(".spf-cloneable-helper").on("click",".spf-cloneable-remove",event_remove),$group.children(".spf-cloneable-hidden").children(".spf-cloneable-helper").on("click",".spf-cloneable-remove",event_remove)})},$.fn.spf_field_media=function(){return this.each(function(){var $this=$(this),$upload_button=$this.find(".spf--button"),$remove_button=$this.find(".spf--remove"),$library=$upload_button.data("library")&&$upload_button.data("library").split(",")||"",wp_media_frame;$upload_button.on("click",function(e){e.preventDefault(),void 0!==window.wp&&window.wp.media&&window.wp.media.gallery&&(wp_media_frame?wp_media_frame.open():((wp_media_frame=window.wp.media({library:{type:$library}})).on("select",function(){var thumbnail,attributes=wp_media_frame.state().get("selection").first().attributes,preview_size=$upload_button.data("preview-size")||"thumbnail";$this.find(".spf--url").val(attributes.url),$this.find(".spf--id").val(attributes.id),$this.find(".spf--width").val(attributes.width),$this.find(".spf--height").val(attributes.height),$this.find(".spf--alt").val(attributes.alt),$this.find(".spf--title").val(attributes.title),$this.find(".spf--description").val(attributes.description),thumbnail=void 0!==attributes.sizes&&void 0!==attributes.sizes.thumbnail&&"thumbnail"===preview_size?attributes.sizes.thumbnail.url:void 0!==attributes.sizes&&void 0!==attributes.sizes.full?attributes.sizes.full.url:attributes.icon,$remove_button.removeClass("hidden"),$this.find(".spf--preview").removeClass("hidden"),$this.find(".spf--src").attr("src",thumbnail),$this.find(".spf--thumbnail").val(thumbnail).trigger("change")}),wp_media_frame.open()))}),$remove_button.on("click",function(e){e.preventDefault(),$remove_button.addClass("hidden"),$this.find(".spf--preview").addClass("hidden"),$this.find("input").val(""),$this.find(".spf--thumbnail").trigger("change")})})},$.fn.spf_field_spinner=function(){return this.each(function(){var $this=$(this),$input=$this.find("input"),$inited=$this.find(".ui-spinner-button");$inited.length&&$inited.remove(),$input.spinner({max:$input.data("max")||100,min:$input.data("min")||0,step:$input.data("step")||1,spin:function(event,ui){$input.val(ui.value).trigger("change")}})})},$.fn.spf_field_switcher=function(){return this.each(function(){var $switcher=$(this).find(".spf--switcher");$switcher.on("click",function(){var value=0,$input=$switcher.find("input");$switcher.hasClass("spf--active")?$switcher.removeClass("spf--active"):(value=1,$switcher.addClass("spf--active")),$input.val(value).trigger("change")})})},$.fn.spf_field_typography=function(){return this.each(function(){var base=this,$this=$(this),loaded_fonts=[],webfonts=spf_typography_json.webfonts,googlestyles=spf_typography_json.googlestyles,defaultstyles=spf_typography_json.defaultstyles;base.sanitize_subset=function(subset){return subset=(subset=subset.replace("-ext"," Extended")).charAt(0).toUpperCase()+subset.slice(1)},base.sanitize_style=function(style){return googlestyles[style]?googlestyles[style]:style},base.load_google_font=function(font_family,weight,style){font_family&&"object"==typeof WebFont&&(weight=weight?weight.replace("normal",""):"",style=style?style.replace("normal",""):"",(weight||style)&&(font_family=font_family+":"+weight+style),-1===loaded_fonts.indexOf(font_family)&&WebFont.load({google:{families:[font_family]}}),loaded_fonts.push(font_family))},base.append_select_options=function($select,options,condition,type,is_multi){$select.find("option").not(":first").remove();var opts="";$.each(options,function(key,value){var selected,name=value;selected=is_multi?condition&&-1!==condition.indexOf(value)?" selected":"":condition&&condition===value?" selected":"","subset"===type?name=base.sanitize_subset(value):"style"===type&&(name=base.sanitize_style(value)),opts+='<option value="'+value+'"'+selected+">"+name+"</option>"}),$select.append(opts).trigger("spf.change").trigger("chosen:updated")},base.init=function(){var selected_styles=[],$typography=$this.find(".spf--typography"),$type=$this.find(".spf--type"),unit=$typography.data("unit"),exclude_fonts=$typography.data("exclude")?$typography.data("exclude").split(","):[],$chosen_selects;$this.find(".spf--chosen").length&&$this.find("select").each(function(){var $chosen_select=$(this),$chosen_inited=$chosen_select.parent().find(".chosen-container");$chosen_inited.length&&$chosen_inited.remove(),$chosen_select.chosen({allow_single_deselect:!0,disable_search_threshold:15,width:"100%"})});var $font_family_select=$this.find(".spf--font-family"),first_font_family=$font_family_select.val();$font_family_select.find("option").not(":first-child").remove();var opts="";$.each(webfonts,function(type,group){exclude_fonts&&-1!==exclude_fonts.indexOf(type)||(opts+='<optgroup label="'+group.label+'">',$.each(group.fonts,function(key,value){var selected;opts+='<option value="'+(value="object"==typeof value?key:value)+'" data-type="'+type+'"'+(value===first_font_family?" selected":"")+">"+value+"</option>"}),opts+="</optgroup>")}),$font_family_select.append(opts).trigger("chosen:updated");var $font_style_block=$this.find(".spf--block-font-style");if($font_style_block.length){var $font_style_select=$this.find(".spf--font-style-select"),first_style_value=$font_style_select.val()?$font_style_select.val().replace(/normal/g,""):"",$extra_font_style_block=$this.find(".spf--block-extra-styles");if($extra_font_style_block.length)var $extra_font_style_select,first_extra_style_value=$this.find(".spf--extra-styles").val()}var $subset_block=$this.find(".spf--block-subset");if($subset_block.length)var $subset_select=$this.find(".spf--subset"),first_subset_select_value=$subset_select.val(),subset_multi_select=$subset_select.data("multiple")||!1;var $backup_font_family_block=$this.find(".spf--block-backup-font-family");$font_family_select.on("change spf.change",function(event){$subset_block.length&&$subset_block.addClass("hidden"),$extra_font_style_block.length&&$extra_font_style_block.addClass("hidden"),$backup_font_family_block.length&&$backup_font_family_block.addClass("hidden");var $selected=$font_family_select.find(":selected"),value=$selected.val(),type=$selected.data("type");type&&value?"google"!==type&&"custom"!==type||!$backup_font_family_block.length||$backup_font_family_block.removeClass("hidden"):($subset_block.length&&($subset_select.find("option").not(":first-child").remove(),$subset_select.trigger("chosen:updated")),$font_style_block.length&&($font_style_select.find("option").not(":first-child").remove(),$font_style_select.trigger("chosen:updated"))),$type.val(type)}).trigger("spf.change")},base.init()})},$.fn.spf_field_upload=function(){return this.each(function(){var $this=$(this),$input=$this.find("input"),$upload_button=$this.find(".spf--button"),$remove_button=$this.find(".spf--remove"),$library=$upload_button.data("library")&&$upload_button.data("library").split(",")||"",wp_media_frame;$input.on("change",function(e){$input.val()?$remove_button.removeClass("hidden"):$remove_button.addClass("hidden")}),$upload_button.on("click",function(e){e.preventDefault(),void 0!==window.wp&&window.wp.media&&window.wp.media.gallery&&(wp_media_frame?wp_media_frame.open():((wp_media_frame=window.wp.media({library:{type:$library}})).on("select",function(){$input.val(wp_media_frame.state().get("selection").first().attributes.url).trigger("change")}),wp_media_frame.open()))}),$remove_button.on("click",function(e){e.preventDefault(),$input.val("").trigger("change")})})},$.fn.spf_confirm=function(){return this.each(function(){$(this).on("click",function(e){var confirm_text=$(this).data("confirm")||window.spf_vars.i18n.confirm,confirm_answer=confirm(confirm_text);if(SP_WPCF.vars.is_confirm=!0,!confirm_answer)return e.preventDefault(),SP_WPCF.vars.is_confirm=!1,!1})})},$.fn.serializeObject=function(){var obj={};return $.each(this.serializeArray(),function(i,o){var n=o.name,v=o.value;obj[n]=void 0===obj[n]?v:$.isArray(obj[n])?obj[n].concat(v):[obj[n],v]}),obj},$.fn.spf_save=function(){return this.each(function(){var $this=$(this),$buttons=$(".spf-save"),$panel=$(".spf-options"),flooding=!1,timeout;$this.on("click",function(e){if(!flooding){var $text=$this.data("save"),$value=$this.val();$buttons.attr("value",$text),$this.hasClass("spf-save-ajax")&&(e.preventDefault(),$panel.addClass("spf-saving"),$buttons.prop("disabled",!0),window.wp.ajax.post("spf_"+$panel.data("unique")+"_ajax_save",{data:$("#spf-form").serializeJSONSP_WPCF()}).done(function(response){clearTimeout(timeout);var $result_success=$(".spf-form-success");$result_success.empty().append(response.notice).slideDown("fast",function(){timeout=setTimeout(function(){$result_success.slideUp("fast")},2e3)}),$(".spf-error").remove();var $append_errors=$(".spf-form-error");if($append_errors.empty().hide(),Object.keys(response.errors).length){var error_icon='<i class="spf-label-error spf-error">!</i>';$.each(response.errors,function(key,error_message){var $field=$('[data-depend-id="'+key+'"]'),$link=$("#spf-tab-link-"+($field.closest(".spf-section").index()+1)),$tab=$link.closest(".spf-tab-depth-0");$field.closest(".spf-fieldset").append('<p class="spf-text-error spf-error">'+error_message+"</p>"),$link.find(".spf-error").length||$link.append(error_icon),$tab.find(".spf-arrow .spf-error").length||$tab.find(".spf-arrow").append(error_icon),console.log(error_message),$append_errors.append("<div>"+error_icon+" "+error_message+"</div>")}),$append_errors.show()}$panel.removeClass("spf-saving"),$buttons.prop("disabled",!1).attr("value",$value),flooding=!1}).fail(function(response){alert(response.error)}))}flooding=!0})})},$.fn.spf_taxonomy=function(){return this.each(function(){var $this=$(this),$form=$this.parents("form");if("addtag"===$form.attr("id")){var $submit=$form.find("#submit"),$cloned=$this.find(".spf-field").spf_clone();$submit.on("click",function(){$form.find(".form-required").hasClass("form-invalid")||($this.data("inited",!1),$this.empty(),$this.html($cloned),$cloned=$cloned.spf_clone(),$this.spf_reload_script())})}})},$.fn.spf_shortcode=function(){var base=this;return base.shortcode_parse=function(serialize,key){var shortcode="";return $.each(serialize,function(shortcode_key,shortcode_values){shortcode+="["+(key=key||shortcode_key),$.each(shortcode_values,function(shortcode_tag,shortcode_value){"content"===shortcode_tag?(shortcode+="]",shortcode+=shortcode_value,shortcode+="[/"+key):shortcode+=base.shortcode_tags(shortcode_tag,shortcode_value)}),shortcode+="]"}),shortcode},base.shortcode_tags=function(shortcode_tag,shortcode_value){var shortcode="";return""!==shortcode_value&&("object"!=typeof shortcode_value||$.isArray(shortcode_value)?shortcode+=" "+shortcode_tag.replace("-","_")+'="'+shortcode_value.toString()+'"':$.each(shortcode_value,function(sub_shortcode_tag,sub_shortcode_value){switch(sub_shortcode_tag){case"background-image":sub_shortcode_value=sub_shortcode_value.url?sub_shortcode_value.url:""}""!==sub_shortcode_value&&(shortcode+=" "+sub_shortcode_tag.replace("-","_")+'="'+sub_shortcode_value.toString()+'"')})),shortcode},base.insertAtChars=function(_this,currentValue){var obj=void 0!==_this[0].name?_this[0]:_this;return obj.value.length&&void 0!==obj.selectionStart?(obj.focus(),obj.value.substring(0,obj.selectionStart)+currentValue+obj.value.substring(obj.selectionEnd,obj.value.length)):(obj.focus(),currentValue)},base.send_to_editor=function(html,editor_id){var tinymce_editor;if("undefined"!=typeof tinymce&&(tinymce_editor=tinymce.get(editor_id)),tinymce_editor&&!tinymce_editor.isHidden())tinymce_editor.execCommand("mceInsertContent",!1,html);else{var $editor=$("#"+editor_id);$editor.val(base.insertAtChars($editor,html)).trigger("change")}},this.each(function(){var $modal=$(this),$load=$modal.find(".spf-modal-load"),$content=$modal.find(".spf-modal-content"),$insert=$modal.find(".spf-modal-insert"),$loading=$modal.find(".spf-modal-loading"),$select=$modal.find("select"),modal_id=$modal.data("modal-id"),nonce=$modal.data("nonce"),editor_id,target_id,gutenberg_id,sc_key,sc_name,sc_view,sc_group,$cloned,$button;$(document).on("click",'.spf-shortcode-button[data-modal-id="'+modal_id+'"]',function(e){e.preventDefault(),$button=$(this),editor_id=$button.data("editor-id")||!1,target_id=$button.data("target-id")||!1,gutenberg_id=$button.data("gutenberg-id")||!1,$modal.show(),$modal.hasClass("spf-shortcode-single")&&void 0===sc_name&&$select.trigger("change")}),$select.on("change",function(){var $option=$(this),$selected=$option.find(":selected");sc_key=$option.val(),sc_name=$selected.data("shortcode"),sc_view=$selected.data("view")||"normal",sc_group=$selected.data("group")||sc_name,$load.empty(),sc_key?($loading.show(),window.wp.ajax.post("spf-get-shortcode-"+modal_id,{shortcode_key:sc_key,nonce:nonce}).done(function(response){$loading.hide();var $appended=$(response.content).appendTo($load);$insert.parent().removeClass("hidden"),$cloned=$appended.find(".spf--repeat-shortcode").spf_clone(),$appended.spf_reload_script(),$appended.find(".spf-fields").spf_reload_script()})):$insert.parent().addClass("hidden")}),$insert.on("click",function(e){e.preventDefault();var shortcode="",serialize=$modal.find(".spf-field:not(.hidden)").find(":input").serializeObjectSP_WPCF();switch(sc_view){case"contents":var contentsObj=sc_name?serialize[sc_name]:serialize;$.each(contentsObj,function(sc_key,sc_value){var sc_tag=sc_name||sc_key;shortcode+="["+sc_tag+"]"+sc_value+"[/"+sc_tag+"]"});break;case"group":shortcode+="["+sc_name,$.each(serialize[sc_name],function(sc_key,sc_value){shortcode+=base.shortcode_tags(sc_key,sc_value)}),shortcode+="]",shortcode+=base.shortcode_parse(serialize[sc_group],sc_group),shortcode+="[/"+sc_name+"]";break;case"repeater":shortcode+=base.shortcode_parse(serialize[sc_group],sc_group);break;default:shortcode+=base.shortcode_parse(serialize)}if(gutenberg_id){var content=window.spf_gutenberg_props.attributes.hasOwnProperty("shortcode")?window.spf_gutenberg_props.attributes.shortcode:"";window.spf_gutenberg_props.setAttributes({shortcode:content+shortcode})}else if(editor_id)base.send_to_editor(shortcode,editor_id);else{var $textarea=target_id?$(target_id):$button.parent().find("textarea");$textarea.val(base.insertAtChars($textarea,shortcode)).trigger("change")}$modal.hide()}),$modal.on("click",".spf--repeat-button",function(e){e.preventDefault();var $repeatable=$modal.find(".spf--repeatable"),$new_clone=$cloned.spf_clone(),$remove_btn=$new_clone.find(".spf-repeat-remove"),$appended=$new_clone.appendTo($repeatable);$new_clone.find(".spf-fields").spf_reload_script(),SP_WPCF.helper.name_nested_replace($modal.find(".spf--repeat-shortcode"),sc_group),$remove_btn.on("click",function(){$new_clone.remove(),SP_WPCF.helper.name_nested_replace($modal.find(".spf--repeat-shortcode"),sc_group)})}),$modal.on("click",".spf-modal-close, .spf-modal-overlay",function(){$modal.hide()})})},$.fn.spf_checkbox=function(){return this.each(function(){var $this=$(this),$input=$this.find(".spf--input"),$checkbox=$this.find(".spf--checkbox");$checkbox.on("click",function(){$input.val(Number($checkbox.prop("checked"))).trigger("change")})})},$.fn.spf_field_wp_editor=function(){return this.each(function(){if(void 0!==window.wp.editor&&void 0!==window.tinyMCEPreInit&&void 0!==window.tinyMCEPreInit.mceInit.spf_wp_editor){var $this=$(this),$editor=$this.find(".spf-wp-editor"),$textarea=$this.find("textarea"),$has_wp_editor;($this.find(".wp-editor-wrap").length||$this.find(".mce-container").length)&&($editor.empty(),$editor.append($textarea),$textarea.css("display",""));var uid=SP_WPCF.helper.uid("spf-editor-");$textarea.attr("id",uid);var default_editor_settings={tinymce:window.tinyMCEPreInit.mceInit.spf_wp_editor,quicktags:window.tinyMCEPreInit.qtInit.spf_wp_editor},field_editor_settings=$editor.data("editor-settings"),editor_on_change=function(editor){editor.on("change",SP_WPCF.helper.debounce(function(){editor.save(),$textarea.trigger("change")},250))};default_editor_settings.tinymce=$.extend({},default_editor_settings.tinymce,{selector:"#"+uid,setup:editor_on_change}),!1===field_editor_settings.tinymce&&(default_editor_settings.tinymce=!1,$editor.addClass("spf-no-tinymce")),!1===field_editor_settings.quicktags&&(default_editor_settings.quicktags=!1,$editor.addClass("spf-no-quicktags"));var interval=setInterval(function(){$this.is(":visible")&&(window.wp.editor.initialize(uid,default_editor_settings),clearInterval(interval))});if(field_editor_settings.media_buttons&&window.spf_media_buttons){var $editor_buttons=$editor.find(".wp-media-buttons");if($editor_buttons.length)$editor_buttons.find(".spf-shortcode-button").data("editor-id",uid);else{var $media_buttons=$(window.spf_media_buttons);$media_buttons.find(".spf-shortcode-button").data("editor-id",uid),$editor.prepend($media_buttons)}}}})},$.fn.spf_siblings=function(){return this.each(function(){var $this=$(this),$siblings=$this.find(".spf--sibling"),multiple=$this.data("multiple")||!1;$siblings.on("click",function(){var $sibling=$(this);multiple?$sibling.hasClass("spf--active")?($sibling.removeClass("spf--active"),$sibling.find("input").prop("checked",!1).trigger("change")):($sibling.addClass("spf--active"),$sibling.find("input").prop("checked",!0).trigger("change")):($this.find("input").prop("checked",!1),$sibling.find("input").prop("checked",!0).trigger("change"),$sibling.addClass("spf--active").siblings().removeClass("spf--active"))})})},"function"==typeof Color&&(Color.fn.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var hex=parseInt(this._color,10).toString(16);if(this.error)return"";if(hex.length<6)for(var i=6-hex.length-1;i>=0;i--)hex="0"+hex;return"#"+hex}),SP_WPCF.funcs.parse_color=function(color){var value=color.replace(/\s+/g,""),trans=-1!==value.indexOf("rgba")?parseFloat(100*value.replace(/^.*,(.+)\)/,"$1")):100,rgba;return{value:value,transparent:trans,rgba:trans<100}},$.fn.spf_color=function(){return this.each(function(){var $input=$(this),picker_color=SP_WPCF.funcs.parse_color($input.val()),palette_color=!window.spf_vars.color_palette.length||window.spf_vars.color_palette,$container;$input.hasClass("wp-color-picker")&&$input.closest(".wp-picker-container").after($input).remove(),$input.wpColorPicker({palettes:palette_color,change:function(event,ui){var ui_color_value=ui.color.toString();$container.removeClass("spf--transparent-active"),$container.find(".spf--transparent-offset").css("background-color",ui_color_value),$input.val(ui_color_value).trigger("change")},create:function(){$container=$input.closest(".wp-picker-container");var a8cIris=$input.data("a8cIris"),$transparent_wrap=$('<div class="spf--transparent-wrap"><div class="spf--transparent-slider"></div><div class="spf--transparent-offset"></div><div class="spf--transparent-text"></div><div class="spf--transparent-button button button-small">transparent</div></div>').appendTo($container.find(".wp-picker-holder")),$transparent_slider=$transparent_wrap.find(".spf--transparent-slider"),$transparent_text=$transparent_wrap.find(".spf--transparent-text"),$transparent_offset=$transparent_wrap.find(".spf--transparent-offset"),$transparent_button=$transparent_wrap.find(".spf--transparent-button");"transparent"===$input.val()&&$container.addClass("spf--transparent-active"),$transparent_button.on("click",function(){"transparent"!==$input.val()?($input.val("transparent").trigger("change").removeClass("iris-error"),$container.addClass("spf--transparent-active")):($input.val(a8cIris._color.toString()).trigger("change"),$container.removeClass("spf--transparent-active"))}),$transparent_slider.slider({value:picker_color.transparent,step:1,min:0,max:100,slide:function(event,ui){var slide_value=parseFloat(ui.value/100);a8cIris._color._alpha=slide_value,$input.wpColorPicker("color",a8cIris._color.toString()),$transparent_text.text(1===slide_value||0===slide_value?"":slide_value)},create:function(){var slide_value=parseFloat(picker_color.transparent/100),text_value=slide_value<1?slide_value:"";$transparent_text.text(text_value),$transparent_offset.css("background-color",picker_color.value),$container.on("click",".wp-picker-clear",function(){a8cIris._color._alpha=1,$transparent_text.text(""),$transparent_slider.slider("option","value",100),$container.removeClass("spf--transparent-active"),$input.trigger("change")}),$container.on("click",".wp-picker-default",function(){var default_color=SP_WPCF.funcs.parse_color($input.data("default-color")),default_value=parseFloat(default_color.transparent/100),default_text=default_value<1?default_value:"";a8cIris._color._alpha=default_value,$transparent_text.text(default_text),$transparent_slider.slider("option","value",default_color.transparent)}),$container.on("click",".wp-color-result",function(){$transparent_wrap.toggle()}),$("body").on("click.wpcolorpicker",function(){$transparent_wrap.hide()})}})}})})},$.fn.spf_chosen=function(){return this.each(function(){var $this=$(this),$inited=$this.parent().find(".chosen-container"),is_multi,set_width=$this.attr("multiple")||!1?"100%":"auto",set_options=$.extend({allow_single_deselect:!0,disable_search_threshold:15,width:set_width},$this.data());$inited.length&&$inited.remove(),$this.chosen(set_options)})},$.fn.spf_number=function(){return this.each(function(){$(this).on("keypress",function(e){if(0!==e.keyCode&&8!==e.keyCode&&45!==e.keyCode&&46!==e.keyCode&&(e.keyCode<48||e.keyCode>57))return!1})})},$.fn.spf_help=function(){return this.each(function(){var $this=$(this),$tooltip,offset_left;$this.on({mouseenter:function(){$tooltip=$('<div class="spf-tooltip"></div>').html($this.find(".spf-help-text").html()).appendTo("body"),offset_left=SP_WPCF.vars.is_rtl?$this.offset().left+24:$this.offset().left-$tooltip.outerWidth(),$tooltip.css({top:$this.offset().top-($tooltip.outerHeight()/2-14),left:offset_left})},mouseleave:function(){void 0!==$tooltip&&$tooltip.remove()}})})},$.fn.spf_customizer_refresh=function(){return this.each(function(){var $this=$(this),$complex=$this.closest(".spf-customize-complex");if($complex.length){var $input=$complex.find(":input"),$unique=$complex.data("unique-id"),$option=$complex.data("option-id"),obj=$input.serializeObjectSP_WPCF(),data=$.isEmptyObject(obj)?"":obj[$unique][$option],control=wp.customize.control($unique+"["+$option+"]");control.setting._value=null,control.setting.set(data)}else $this.find(":input").first().trigger("change");$(document).trigger("spf-customizer-refresh",$this)})},$.fn.spf_customizer_listen=function(options){var settings=$.extend({closest:!1},options);return this.each(function(){if(void 0!==window.wp.customize){var $this=settings.closest?$(this).closest(".spf-customize-complex"):$(this),$input=$this.find(":input"),unique_id=$this.data("unique-id"),option_id=$this.data("option-id");void 0!==unique_id&&$input.on("change keyup",SP_WPCF.helper.debounce(function(){var obj=$this.find(":input").serializeObjectSP_WPCF();!$.isEmptyObject(obj)&&obj[unique_id]&&window.wp.customize.control(unique_id+"["+option_id+"]").setting.set(obj[unique_id][option_id])},250))}})},$(document).on("expanded",".control-section-spf",function(){var $this=$(this);$this.hasClass("open")&&!$this.data("inited")&&($this.spf_dependency(),$this.find(".spf-customize-field").spf_reload_script({dependency:!1}),$this.find(".spf-customize-complex").spf_customizer_listen(),$this.data("inited",!0))}),SP_WPCF.vars.$window.on("resize spf.resize",SP_WPCF.helper.debounce(function(event){var window_width;(navigator.userAgent.indexOf("AppleWebKit/")>-1?SP_WPCF.vars.$window.width():window.innerWidth)<=782&&!SP_WPCF.vars.onloaded&&($(".spf-section").spf_reload_script(),SP_WPCF.vars.onloaded=!0)},200)).trigger("spf.resize"),$.fn.spf_widgets=function(){this.length&&($(document).on("widget-added widget-updated",function(event,$widget){$widget.find(".spf-fields").spf_reload_script()}),$(".widgets-sortables, .control-section-sidebar").on("sortstop",function(event,ui){ui.item.find(".spf-fields").spf_reload_script_retry()}),$(document).on("click",".widget-top",function(event){$(this).parent().find(".spf-fields").spf_reload_script()}))},$.fn.spf_reload_script_retry=function(){return this.each(function(){var $this=$(this);$this.data("inited")&&$this.children(".spf-field-wp_editor").spf_field_wp_editor()})},$.fn.spf_reload_script=function(options){var settings=$.extend({dependency:!0},options);return this.each(function(){var $this=$(this);$this.data("inited")||($this.children(".spf-field-accordion").spf_field_accordion(),$this.children(".spf-field-code_editor").spf_field_code_editor(),$this.children(".spf-field-fieldset").spf_field_fieldset(),$this.children(".spf-field-gallery").spf_field_gallery(),$this.children(".spf-field-group").spf_field_group(),$this.children(".spf-field-media").spf_field_media(),$this.children(".spf-field-spinner").spf_field_spinner(),$this.children(".spf-field-switcher").spf_field_switcher(),$this.children(".spf-field-typography").spf_field_typography(),$this.children(".spf-field-upload").spf_field_upload(),$this.children(".spf-field-wp_editor").spf_field_wp_editor(),$this.children(".spf-field-border").find(".spf-color").spf_color(),$this.children(".spf-field-dimensions_advanced").find(".spf-color").spf_color(),$this.children(".spf-field-background_adv").find(".spf-color").spf_color(),$this.children(".spf-field-background").find(".spf-color").spf_color(),$this.children(".spf-field-color").find(".spf-color").spf_color(),$this.children(".spf-field-color_group").find(".spf-color").spf_color(),$this.children(".spf-field-link_color").find(".spf-color").spf_color(),$this.children(".spf-field-typography").find(".spf-color").spf_color(),$this.children(".spf-field-dimensions").find(".spf-number").spf_number(),$this.children(".spf-field-slider").find(".spf-number").spf_number(),$this.children(".spf-field-spacing").find(".spf-number").spf_number(),$this.children(".spf-field-column").find(".spf-number").spf_number(),$this.children(".spf-field-dimensions_advanced").find(".spf-number").spf_number(),$this.children(".spf-field-spinner").find(".spf-number").spf_number(),$this.children(".spf-field-typography").find(".spf-number").spf_number(),$this.children(".spf-field-select").find(".spf-chosen").spf_chosen(),$this.children(".spf-field-checkbox").find(".spf-checkbox").spf_checkbox(),$this.children(".spf-field-button_set").find(".spf-siblings").spf_siblings(),$this.children(".spf-field-image_select").find(".spf-siblings").spf_siblings(),$this.children(".spf-field-carousel_type").find(".spf-siblings").spf_siblings(),$this.children(".spf-field-palette").find(".spf-siblings").spf_siblings(),$this.children(".spf-field").find(".spf-help").spf_help(),settings.dependency&&$this.spf_dependency(),$this.data("inited",!0),$(document).trigger("spf-reload-script",$this))})},$(document).ready(function(){$(".spf-save").spf_save(),$(".spf-confirm").spf_confirm(),$(".spf-nav-options").spf_nav_options(),$(".spf-nav-metabox").spf_nav_metabox(),$(".spf-expand-all").spf_expand_all(),$(".spf-search").spf_search(),$(".spf-sticky-header").spf_sticky(),$(".spf-taxonomy").spf_taxonomy(),$(".spf-shortcode").spf_shortcode(),$(".spf-page-templates").spf_page_templates(),$(".spf-post-formats").spf_post_formats(),$(".spf-onload").spf_reload_script(),$(".widget").spf_widgets()}),$(".sp_wpcp_post_type select").change(function(event){event.preventDefault();var data={action:"wpcp_get_taxonomies",wpcf_post_type:$(this).val()};$.post(ajaxurl,data,function(resp){$(".sp_wpcp_post_taxonomy select").html(resp),$(".sp_wpcp_post_taxonomy select").trigger("chosen:updated")})}),$(".sp_wpcp_post_taxonomy select").change(function(event){event.preventDefault();var data={action:"wpcp_get_terms",wpcf_post_taxonomy:$(this).val()};$.post(ajaxurl,data,function(resp){$(".sp_wpcp_taxonomy_terms select").html(resp),$(".sp_wpcp_taxonomy_terms select").trigger("chosen:updated")})}),$(".sp_wpcp_post_type select").change(function(event){event.preventDefault();var data={action:"wpcp_get_posts",wpcf_post_type:$(this).val()};$.post(ajaxurl,data,function(resp){$(".sp_wpcp_specific_posts select").html(resp),$(".sp_wpcp_specific_posts select").trigger("chosen:updated")})})}(jQuery,window,document);
1
+ !function($,window,document,undefined){"use strict";var SP_WPCF=SP_WPCF||{};SP_WPCF.funcs={},SP_WPCF.vars={onloaded:!1,$body:$("body"),$window:$(window),$document:$(document),is_rtl:$("body").hasClass("rtl"),code_themes:[]},SP_WPCF.helper={uid:function(prefix){return(prefix||"")+Math.random().toString(36).substr(2,9)},preg_quote:function(str){return(str+"").replace(/(\[|\-|\])/g,"\\$1")},name_nested_replace:function($selector,field_id){var checks=[],regex=new RegExp("("+SP_WPCF.helper.preg_quote(field_id)+")\\[(\\d+)\\]","g");$selector.find(":radio").each((function(){(this.checked||this.orginal_checked)&&(this.orginal_checked=!0)})),$selector.each((function(index){$(this).find(":input").each((function(){this.name=this.name.replace(regex,field_id+"["+index+"]"),this.orginal_checked&&(this.checked=!0)}))}))},debounce:function(callback,threshold,immediate){var timeout;return function(){var context=this,args=arguments,later=function(){timeout=null,immediate||callback.apply(context,args)},callNow=immediate&&!timeout;clearTimeout(timeout),timeout=setTimeout(later,threshold),callNow&&callback.apply(context,args)}},get_cookie:function(name){var e,b,cookie=document.cookie,p=name+"=";if(cookie){if(-1===(b=cookie.indexOf("; "+p))){if(0!==(b=cookie.indexOf(p)))return null}else b+=2;return-1===(e=cookie.indexOf(";",b))&&(e=cookie.length),decodeURIComponent(cookie.substring(b+p.length,e))}},set_cookie:function(name,value,expires,path,domain,secure){var d=new Date;"object"==typeof expires&&expires.toGMTString?expires=expires.toGMTString():parseInt(expires,10)?(d.setTime(d.getTime()+1e3*parseInt(expires,10)),expires=d.toGMTString()):expires="",document.cookie=name+"="+encodeURIComponent(value)+(expires?"; expires="+expires:"")+(path?"; path="+path:"")+(domain?"; domain="+domain:"")+(secure?"; secure":"")},remove_cookie:function(name,path,domain,secure){SP_WPCF.helper.set_cookie(name,"",-1e3,path,domain,secure)}},$.fn.spf_clone=function(){for(var base=$.fn.clone.apply(this,arguments),clone=this.find("select").add(this.filter("select")),cloned=base.find("select").add(base.filter("select")),i=0;i<clone.length;++i)for(var j=0;j<clone[i].options.length;++j)!0===clone[i].options[j].selected&&(cloned[i].options[j].selected=!0);return this.find(":radio").each((function(){this.orginal_checked=this.checked})),base},$.fn.spf_expand_all=function(){return this.each((function(){$(this).on("click",(function(e){e.preventDefault(),$(".spf-wrapper").toggleClass("spf-show-all"),$(".spf-section").spf_reload_script(),$(this).find(".fa").toggleClass("fa-indent").toggleClass("fa-outdent")}))}))},$.fn.spf_nav_options=function(){return this.each((function(){var $nav=$(this),$links=$nav.find("a"),$hidden=$nav.closest(".spf").find(".spf-section-id"),$last_section;$(window).on("hashchange",(function(){var hash=window.location.hash.match(new RegExp("tab=([^&]*)")),slug=hash?hash[1]:$links.first().attr("href").replace("#tab=",""),$link=$("#spf-tab-link-"+slug);if($link.length>0){$link.closest(".spf-tab-depth-0").addClass("spf-tab-active").siblings().removeClass("spf-tab-active"),$links.removeClass("spf-section-active"),$link.addClass("spf-section-active"),void 0!==$last_section&&$last_section.hide();var $section=$("#spf-section-"+slug);$section.css({display:"block"}),$section.spf_reload_script(),$hidden.val(slug),$last_section=$section}})).trigger("hashchange")}))},$.fn.spf_nav_metabox=function(){return this.each((function(){var $nav=$(this),$links=$nav.find("a"),unique_id=$nav.data("unique"),post_id=$("#post_ID").val()||"global",$last_section,$last_link;$links.on("click",(function(e){e.preventDefault();var $link=$(this),section_id=$link.data("section");void 0!==$last_link&&$last_link.removeClass("spf-section-active"),void 0!==$last_section&&$last_section.hide(),$link.addClass("spf-section-active");var $section=$("#spf-section-"+section_id);$section.css({display:"block"}),$section.spf_reload_script(),SP_WPCF.helper.set_cookie("spf-last-metabox-tab-"+post_id+"-"+unique_id,section_id),$last_section=$section,$last_link=$link}));var get_cookie=SP_WPCF.helper.get_cookie("spf-last-metabox-tab-"+post_id+"-"+unique_id);get_cookie?$nav.find('a[data-section="'+get_cookie+'"]').trigger("click"):$links.first("a").trigger("click")}))},$.fn.spf_page_templates=function(){this.length&&$(document).on("change",".editor-page-attributes__template select, #page_template",(function(){var maybe_value=$(this).val()||"default";$(".spf-page-templates").removeClass("spf-show").addClass("spf-hide"),$(".spf-page-"+maybe_value.toLowerCase().replace(/[^a-zA-Z0-9]+/g,"-")).removeClass("spf-hide").addClass("spf-show")}))},$.fn.spf_post_formats=function(){this.length&&$(document).on("change",'.editor-post-format select, #formatdiv input[name="post_format"]',(function(){var maybe_value=$(this).val()||"default";maybe_value="0"===maybe_value?"default":maybe_value,$(".spf-post-formats").removeClass("spf-show").addClass("spf-hide"),$(".spf-post-format-"+maybe_value).removeClass("spf-hide").addClass("spf-show")}))},$.fn.spf_search=function(){return this.each((function(){var $this,$input;$(this).find("input").on("change keyup",(function(){var value=$(this).val(),$wrapper=$(".spf-wrapper"),$section,$fields=$wrapper.find(".spf-section").find("> .spf-field:not(.hidden)"),$titles=$fields.find("> .spf-title, .spf-search-tags");value.length>3?($fields.addClass("spf-hidden"),$wrapper.addClass("spf-search-all"),$titles.each((function(){var $title=$(this);if($title.text().match(new RegExp(".*?"+value+".*?","i"))){var $field=$title.closest(".spf-field");$field.removeClass("spf-hidden"),$field.parent().spf_reload_script()}}))):($fields.removeClass("spf-hidden"),$wrapper.removeClass("spf-search-all"))}))}))},$.fn.spf_sticky=function(){return this.each((function(){var $this=$(this),$window=$(window),$inner=$this.find(".spf-header-inner"),padding=parseInt($inner.css("padding-left"))+parseInt($inner.css("padding-right")),offset=32,scrollTop=0,lastTop=0,ticking=!1,stickyUpdate=function(){var offsetTop=$this.offset().top,stickyTop=Math.max(32,offsetTop-scrollTop),winWidth=Math.max(document.documentElement.clientWidth,window.innerWidth||0);stickyTop<=32&&winWidth>782?($inner.css({width:$this.outerWidth()-padding}),$this.css({height:$this.outerHeight()}).addClass("spf-sticky")):($inner.removeAttr("style"),$this.removeAttr("style").removeClass("spf-sticky"))},requestTick=function(){ticking||requestAnimationFrame((function(){stickyUpdate(),ticking=!1})),ticking=!0},onSticky=function(){scrollTop=$window.scrollTop(),requestTick()};$window.on("scroll resize",onSticky),onSticky()}))},$.fn.spf_dependency=function(){return this.each((function(){var $this=$(this),ruleset=$.spf_deps.createRuleset(),depends=[],is_global=!1;$this.children("[data-controller]").each((function(){var $field=$(this),controllers=$field.data("controller").split("|"),conditions=$field.data("condition").split("|"),values=$field.data("value").toString().split("|"),rules=ruleset;$field.data("depend-global")&&(is_global=!0),$.each(controllers,(function(index,depend_id){var value=values[index]||"",condition=conditions[index]||conditions[0];(rules=rules.createRule('[data-depend-id="'+depend_id+'"]',condition,value)).include($field),depends.push(depend_id)}))})),depends.length&&(is_global?$.spf_deps.enable(SP_WPCF.vars.$body,ruleset,depends):$.spf_deps.enable($this,ruleset,depends))}))},$.fn.spf_field_accordion=function(){return this.each((function(){var $titles;$(this).find(".spf-accordion-title").on("click",(function(){var $title=$(this),$icon=$title.find(".spf-accordion-icon"),$content=$title.next();$icon.hasClass("fa-angle-right")?$icon.removeClass("fa-angle-right").addClass("fa-angle-down"):$icon.removeClass("fa-angle-down").addClass("fa-angle-right"),$content.data("opened")||($content.spf_reload_script(),$content.data("opened",!0)),$content.toggleClass("spf-accordion-open")}))}))},$.fn.spf_field_code_editor=function(){return this.each((function(){if("function"==typeof CodeMirror){var $this=$(this),$textarea=$this.find("textarea"),$inited=$this.find(".CodeMirror"),data_editor=$textarea.data("editor");$inited.length&&$inited.remove();var interval=setInterval((function(){if($this.is(":visible")){var code_editor=CodeMirror.fromTextArea($textarea[0],data_editor);if("default"!==data_editor.theme&&-1===SP_WPCF.vars.code_themes.indexOf(data_editor.theme)){var $cssLink=$("<link>");$("#spf-codemirror-css").after($cssLink),$cssLink.attr({rel:"stylesheet",id:"spf-codemirror-"+data_editor.theme+"-css",href:data_editor.cdnURL+"/theme/"+data_editor.theme+".min.css",type:"text/css",media:"all"}),SP_WPCF.vars.code_themes.push(data_editor.theme)}CodeMirror.modeURL=data_editor.cdnURL+"/mode/%N/%N.min.js",CodeMirror.autoLoadMode(code_editor,data_editor.mode),code_editor.on("change",(function(editor,event){$textarea.val(code_editor.getValue()).trigger("change")})),clearInterval(interval)}}))}}))},$.fn.spf_field_date=function(){return this.each((function(){var $this=$(this),$inputs=$this.find("input"),settings=$this.find(".spf-date-settings").data("settings"),wrapper='<div class="spf-datepicker-wrapper"></div>',$datepicker,defaults={showAnim:"",beforeShow:function(input,inst){$(inst.dpDiv).addClass("spf-datepicker-wrapper")},onClose:function(input,inst){$(inst.dpDiv).removeClass("spf-datepicker-wrapper")}};settings=$.extend({},settings,defaults),2===$inputs.length&&(settings=$.extend({},settings,{onSelect:function(selectedDate){var $this=$(this),$from=$inputs.first(),option=$inputs.first().attr("id")===$(this).attr("id")?"minDate":"maxDate",date=$.datepicker.parseDate(settings.dateFormat,selectedDate);$inputs.not(this).datepicker("option",option,date)}})),$inputs.each((function(){var $input=$(this);$input.hasClass("hasDatepicker")&&$input.removeAttr("id").removeClass("hasDatepicker"),$input.datepicker(settings)}))}))},$.fn.spf_field_fieldset=function(){return this.each((function(){$(this).find(".spf-fieldset-content").spf_reload_script()}))},$.fn.spf_field_gallery=function(){return this.each((function(){var $this=$(this),$edit=$this.find(".spf-edit-gallery"),$clear=$this.find(".spf-clear-gallery"),$list=$this.find("ul.sp-gallery-images"),$input=$this.find("input"),$img=$this.find("img"),wp_media_frame;$this.on("click",".spf-button, .spf-edit-gallery",(function(e){var $el=$(this),ids=$input.val(),what=$el.hasClass("spf-edit-gallery")?"edit":"add",state="add"!==what||ids.length?"gallery-edit":"gallery";e.preventDefault(),void 0!==window.wp&&window.wp.media&&window.wp.media.gallery&&("gallery"===state?(wp_media_frame=window.wp.media({library:{type:"image"},frame:"post",state:"gallery",multiple:!0})).open():(wp_media_frame=window.wp.media.gallery.edit('[gallery ids="'+ids+'"]'),"add"===what&&wp_media_frame.setState("gallery-library")),wp_media_frame.on("update",(function(selection){$list.empty();var selectedIds=selection.models.map((function(attachment){var item=attachment.toJSON(),thumb=void 0!==item.sizes.thumbnail?item.sizes.thumbnail.url:item.url;return $list.append('<li><img src="'+thumb+'"></li>'),item.id}));$input.val(selectedIds.join(",")).trigger("change"),$clear.removeClass("hidden"),$edit.removeClass("hidden")})))})),$clear.on("click",(function(e){e.preventDefault(),$list.empty(),$input.val("").trigger("change"),$clear.addClass("hidden"),$edit.addClass("hidden")}))}))},$.fn.spf_field_group=function(){return this.each((function(){var $this=$(this),$fieldset=$this.children(".spf-fieldset"),$group=$fieldset.length?$fieldset:$this,$wrapper=$group.children(".spf-cloneable-wrapper"),$hidden=$group.children(".spf-cloneable-hidden"),$max=$group.children(".spf-cloneable-max"),$min=$group.children(".spf-cloneable-min"),field_id=$wrapper.data("field-id"),unique_id=$wrapper.data("unique-id"),is_number=Boolean(Number($wrapper.data("title-number"))),max=parseInt($wrapper.data("max")),min=parseInt($wrapper.data("min"));$wrapper.hasClass("ui-accordion")&&$wrapper.find(".ui-accordion-header-icon").remove();var update_title_numbers=function($selector){$selector.find(".spf-cloneable-title-number").each((function(index){$(this).html($(this).closest(".spf-cloneable-item").index()+1+".")}))};$wrapper.accordion({header:"> .spf-cloneable-item > .spf-cloneable-title",collapsible:!0,active:!1,animate:!1,heightStyle:"content",icons:{header:"spf-cloneable-header-icon fa fa-angle-right",activeHeader:"spf-cloneable-header-icon fa fa-angle-down"},activate:function(event,ui){var $panel=ui.newPanel,$header=ui.newHeader;if($panel.length&&!$panel.data("opened")){var $fields,$first=$panel.children().first().find(":input").first(),$title=$header.find(".spf-cloneable-value");$first.on("keyup",(function(event){$title.text($first.val())})),$panel.spf_reload_script(),$panel.data("opened",!0),$panel.data("retry",!1)}else $panel.data("retry")&&($panel.spf_reload_script_retry(),$panel.data("retry",!1))}}),$wrapper.sortable({axis:"y",handle:".spf-cloneable-title,.spf-cloneable-sort",helper:"original",cursor:"move",placeholder:"widget-placeholder",start:function(event,ui){$wrapper.accordion({active:!1}),$wrapper.sortable("refreshPositions"),ui.item.children(".spf-cloneable-content").data("retry",!0)},update:function(event,ui){SP_WPCF.helper.name_nested_replace($wrapper.children(".spf-cloneable-item"),field_id),$wrapper.spf_customizer_refresh(),is_number&&update_title_numbers($wrapper)}}),$group.children(".spf-cloneable-add").on("click",(function(e){e.preventDefault();var count=$wrapper.children(".spf-cloneable-item").length;if($min.hide(),max&&count+1>max)$max.show();else{var new_field_id=unique_id+field_id+"["+count+"]",$cloned_item=$hidden.spf_clone(!0);$cloned_item.removeClass("spf-cloneable-hidden"),$cloned_item.find(":input").each((function(){this.name=new_field_id+this.name.replace(this.name.startsWith("_nonce")?"_nonce":unique_id,"")})),$cloned_item.find(".spf-data-wrapper").each((function(){$(this).attr("data-unique-id",new_field_id)})),$wrapper.append($cloned_item),$wrapper.accordion("refresh"),$wrapper.accordion({active:count}),$wrapper.spf_customizer_refresh(),$wrapper.spf_customizer_listen({closest:!0}),is_number&&update_title_numbers($wrapper)}}));var event_clone=function(e){e.preventDefault();var count=$wrapper.children(".spf-cloneable-item").length;if($min.hide(),max&&count+1>max)$max.show();else{var $this,$parent=$(this).parent().parent(),$cloned_helper=$parent.children(".spf-cloneable-helper").spf_clone(!0),$cloned_title=$parent.children(".spf-cloneable-title").spf_clone(),$cloned_content=$parent.children(".spf-cloneable-content").spf_clone(),cloned_regex=new RegExp("("+SP_WPCF.helper.preg_quote(field_id)+")\\[(\\d+)\\]","g");$cloned_content.find(".spf-data-wrapper").each((function(){var $this=$(this);$this.attr("data-unique-id",$this.attr("data-unique-id").replace(cloned_regex,field_id+"["+($parent.index()+1)+"]"))}));var $cloned=$('<div class="spf-cloneable-item" />');$cloned.append($cloned_helper),$cloned.append($cloned_title),$cloned.append($cloned_content),$wrapper.children().eq($parent.index()).after($cloned),SP_WPCF.helper.name_nested_replace($wrapper.children(".spf-cloneable-item"),field_id),$wrapper.accordion("refresh"),$wrapper.spf_customizer_refresh(),$wrapper.spf_customizer_listen({closest:!0}),is_number&&update_title_numbers($wrapper)}};$wrapper.children(".spf-cloneable-item").children(".spf-cloneable-helper").on("click",".spf-cloneable-clone",event_clone),$group.children(".spf-cloneable-hidden").children(".spf-cloneable-helper").on("click",".spf-cloneable-clone",event_clone);var event_remove=function(e){e.preventDefault();var count=$wrapper.children(".spf-cloneable-item").length;$max.hide(),$min.hide(),min&&count-1<min?$min.show():($(this).closest(".spf-cloneable-item").remove(),SP_WPCF.helper.name_nested_replace($wrapper.children(".spf-cloneable-item"),field_id),$wrapper.spf_customizer_refresh(),is_number&&update_title_numbers($wrapper))};$wrapper.children(".spf-cloneable-item").children(".spf-cloneable-helper").on("click",".spf-cloneable-remove",event_remove),$group.children(".spf-cloneable-hidden").children(".spf-cloneable-helper").on("click",".spf-cloneable-remove",event_remove)}))},$.fn.spf_field_media=function(){return this.each((function(){var $this=$(this),$upload_button=$this.find(".spf--button"),$remove_button=$this.find(".spf--remove"),$library=$upload_button.data("library")&&$upload_button.data("library").split(",")||"",wp_media_frame;$upload_button.on("click",(function(e){e.preventDefault(),void 0!==window.wp&&window.wp.media&&window.wp.media.gallery&&(wp_media_frame?wp_media_frame.open():((wp_media_frame=window.wp.media({library:{type:$library}})).on("select",(function(){var thumbnail,attributes=wp_media_frame.state().get("selection").first().attributes,preview_size=$upload_button.data("preview-size")||"thumbnail";$this.find(".spf--url").val(attributes.url),$this.find(".spf--id").val(attributes.id),$this.find(".spf--width").val(attributes.width),$this.find(".spf--height").val(attributes.height),$this.find(".spf--alt").val(attributes.alt),$this.find(".spf--title").val(attributes.title),$this.find(".spf--description").val(attributes.description),thumbnail=void 0!==attributes.sizes&&void 0!==attributes.sizes.thumbnail&&"thumbnail"===preview_size?attributes.sizes.thumbnail.url:void 0!==attributes.sizes&&void 0!==attributes.sizes.full?attributes.sizes.full.url:attributes.icon,$remove_button.removeClass("hidden"),$this.find(".spf--preview").removeClass("hidden"),$this.find(".spf--src").attr("src",thumbnail),$this.find(".spf--thumbnail").val(thumbnail).trigger("change")})),wp_media_frame.open()))})),$remove_button.on("click",(function(e){e.preventDefault(),$remove_button.addClass("hidden"),$this.find(".spf--preview").addClass("hidden"),$this.find("input").val(""),$this.find(".spf--thumbnail").trigger("change")}))}))},$.fn.spf_field_spinner=function(){return this.each((function(){var $this=$(this),$input=$this.find("input"),$inited=$this.find(".ui-spinner-button");$inited.length&&$inited.remove(),$input.spinner({max:$input.data("max")||100,min:$input.data("min")||0,step:$input.data("step")||1,spin:function(event,ui){$input.val(ui.value).trigger("change")}})}))},$.fn.spf_field_switcher=function(){return this.each((function(){var $switcher=$(this).find(".spf--switcher");$switcher.on("click",(function(){var value=0,$input=$switcher.find("input");$switcher.hasClass("spf--active")?$switcher.removeClass("spf--active"):(value=1,$switcher.addClass("spf--active")),$input.val(value).trigger("change")}))}))},$.fn.spf_field_typography=function(){return this.each((function(){var base=this,$this=$(this),loaded_fonts=[],webfonts=spf_typography_json.webfonts,googlestyles=spf_typography_json.googlestyles,defaultstyles=spf_typography_json.defaultstyles;base.sanitize_subset=function(subset){return subset=(subset=subset.replace("-ext"," Extended")).charAt(0).toUpperCase()+subset.slice(1)},base.sanitize_style=function(style){return googlestyles[style]?googlestyles[style]:style},base.load_google_font=function(font_family,weight,style){font_family&&"object"==typeof WebFont&&(weight=weight?weight.replace("normal",""):"",style=style?style.replace("normal",""):"",(weight||style)&&(font_family=font_family+":"+weight+style),-1===loaded_fonts.indexOf(font_family)&&WebFont.load({google:{families:[font_family]}}),loaded_fonts.push(font_family))},base.append_select_options=function($select,options,condition,type,is_multi){$select.find("option").not(":first").remove();var opts="";$.each(options,(function(key,value){var selected,name=value;selected=is_multi?condition&&-1!==condition.indexOf(value)?" selected":"":condition&&condition===value?" selected":"","subset"===type?name=base.sanitize_subset(value):"style"===type&&(name=base.sanitize_style(value)),opts+='<option value="'+value+'"'+selected+">"+name+"</option>"})),$select.append(opts).trigger("spf.change").trigger("chosen:updated")},base.init=function(){var selected_styles=[],$typography=$this.find(".spf--typography"),$type=$this.find(".spf--type"),unit=$typography.data("unit"),exclude_fonts=$typography.data("exclude")?$typography.data("exclude").split(","):[],$chosen_selects;$this.find(".spf--chosen").length&&$this.find("select").each((function(){var $chosen_select=$(this),$chosen_inited=$chosen_select.parent().find(".chosen-container");$chosen_inited.length&&$chosen_inited.remove(),$chosen_select.chosen({allow_single_deselect:!0,disable_search_threshold:15,width:"100%"})}));var $font_family_select=$this.find(".spf--font-family"),first_font_family=$font_family_select.val();$font_family_select.find("option").not(":first-child").remove();var opts="";$.each(webfonts,(function(type,group){exclude_fonts&&-1!==exclude_fonts.indexOf(type)||(opts+='<optgroup label="'+group.label+'">',$.each(group.fonts,(function(key,value){var selected;opts+='<option value="'+(value="object"==typeof value?key:value)+'" data-type="'+type+'"'+(value===first_font_family?" selected":"")+">"+value+"</option>"})),opts+="</optgroup>")})),$font_family_select.append(opts).trigger("chosen:updated");var $font_style_block=$this.find(".spf--block-font-style");if($font_style_block.length){var $font_style_select=$this.find(".spf--font-style-select"),first_style_value=$font_style_select.val()?$font_style_select.val().replace(/normal/g,""):"",$extra_font_style_block=$this.find(".spf--block-extra-styles");if($extra_font_style_block.length)var $extra_font_style_select,first_extra_style_value=$this.find(".spf--extra-styles").val()}var $subset_block=$this.find(".spf--block-subset");if($subset_block.length)var $subset_select=$this.find(".spf--subset"),first_subset_select_value=$subset_select.val(),subset_multi_select=$subset_select.data("multiple")||!1;var $backup_font_family_block=$this.find(".spf--block-backup-font-family");$font_family_select.on("change spf.change",(function(event){$subset_block.length&&$subset_block.addClass("hidden"),$extra_font_style_block.length&&$extra_font_style_block.addClass("hidden"),$backup_font_family_block.length&&$backup_font_family_block.addClass("hidden");var $selected=$font_family_select.find(":selected"),value=$selected.val(),type=$selected.data("type");type&&value?"google"!==type&&"custom"!==type||!$backup_font_family_block.length||$backup_font_family_block.removeClass("hidden"):($subset_block.length&&($subset_select.find("option").not(":first-child").remove(),$subset_select.trigger("chosen:updated")),$font_style_block.length&&($font_style_select.find("option").not(":first-child").remove(),$font_style_select.trigger("chosen:updated"))),$type.val(type)})).trigger("spf.change")},base.init()}))},$.fn.spf_field_upload=function(){return this.each((function(){var $this=$(this),$input=$this.find("input"),$upload_button=$this.find(".spf--button"),$remove_button=$this.find(".spf--remove"),$library=$upload_button.data("library")&&$upload_button.data("library").split(",")||"",wp_media_frame;$input.on("change",(function(e){$input.val()?$remove_button.removeClass("hidden"):$remove_button.addClass("hidden")})),$upload_button.on("click",(function(e){e.preventDefault(),void 0!==window.wp&&window.wp.media&&window.wp.media.gallery&&(wp_media_frame?wp_media_frame.open():((wp_media_frame=window.wp.media({library:{type:$library}})).on("select",(function(){$input.val(wp_media_frame.state().get("selection").first().attributes.url).trigger("change")})),wp_media_frame.open()))})),$remove_button.on("click",(function(e){e.preventDefault(),$input.val("").trigger("change")}))}))},$.fn.spf_confirm=function(){return this.each((function(){$(this).on("click",(function(e){var confirm_text=$(this).data("confirm")||window.spf_vars.i18n.confirm,confirm_answer=confirm(confirm_text);if(SP_WPCF.vars.is_confirm=!0,!confirm_answer)return e.preventDefault(),SP_WPCF.vars.is_confirm=!1,!1}))}))},$.fn.serializeObject=function(){var obj={};return $.each(this.serializeArray(),(function(i,o){var n=o.name,v=o.value;obj[n]=void 0===obj[n]?v:$.isArray(obj[n])?obj[n].concat(v):[obj[n],v]})),obj},$.fn.spf_save=function(){return this.each((function(){var $this=$(this),$buttons=$(".spf-save"),$panel=$(".spf-options"),flooding=!1,timeout;$this.on("click",(function(e){if(!flooding){var $text=$this.data("save"),$value=$this.val();$buttons.attr("value",$text),$this.hasClass("spf-save-ajax")&&(e.preventDefault(),$panel.addClass("spf-saving"),$buttons.prop("disabled",!0),window.wp.ajax.post("spf_"+$panel.data("unique")+"_ajax_save",{data:$("#spf-form").serializeJSONSP_WPCF()}).done((function(response){clearTimeout(timeout);var $result_success=$(".spf-form-success");$result_success.empty().append(response.notice).slideDown("fast",(function(){timeout=setTimeout((function(){$result_success.slideUp("fast")}),2e3)})),$(".spf-error").remove();var $append_errors=$(".spf-form-error");if($append_errors.empty().hide(),Object.keys(response.errors).length){var error_icon='<i class="spf-label-error spf-error">!</i>';$.each(response.errors,(function(key,error_message){var $field=$('[data-depend-id="'+key+'"]'),$link=$("#spf-tab-link-"+($field.closest(".spf-section").index()+1)),$tab=$link.closest(".spf-tab-depth-0");$field.closest(".spf-fieldset").append('<p class="spf-text-error spf-error">'+error_message+"</p>"),$link.find(".spf-error").length||$link.append(error_icon),$tab.find(".spf-arrow .spf-error").length||$tab.find(".spf-arrow").append(error_icon),console.log(error_message),$append_errors.append("<div>"+error_icon+" "+error_message+"</div>")})),$append_errors.show()}$panel.removeClass("spf-saving"),$buttons.prop("disabled",!1).attr("value",$value),flooding=!1})).fail((function(response){alert(response.error)})))}flooding=!0}))}))},$.fn.spf_taxonomy=function(){return this.each((function(){var $this=$(this),$form=$this.parents("form");if("addtag"===$form.attr("id")){var $submit=$form.find("#submit"),$cloned=$this.find(".spf-field").spf_clone();$submit.on("click",(function(){$form.find(".form-required").hasClass("form-invalid")||($this.data("inited",!1),$this.empty(),$this.html($cloned),$cloned=$cloned.spf_clone(),$this.spf_reload_script())}))}}))},$.fn.spf_shortcode=function(){var base=this;return base.shortcode_parse=function(serialize,key){var shortcode="";return $.each(serialize,(function(shortcode_key,shortcode_values){shortcode+="["+(key=key||shortcode_key),$.each(shortcode_values,(function(shortcode_tag,shortcode_value){"content"===shortcode_tag?(shortcode+="]",shortcode+=shortcode_value,shortcode+="[/"+key):shortcode+=base.shortcode_tags(shortcode_tag,shortcode_value)})),shortcode+="]"})),shortcode},base.shortcode_tags=function(shortcode_tag,shortcode_value){var shortcode="";return""!==shortcode_value&&("object"!=typeof shortcode_value||$.isArray(shortcode_value)?shortcode+=" "+shortcode_tag.replace("-","_")+'="'+shortcode_value.toString()+'"':$.each(shortcode_value,(function(sub_shortcode_tag,sub_shortcode_value){switch(sub_shortcode_tag){case"background-image":sub_shortcode_value=sub_shortcode_value.url?sub_shortcode_value.url:""}""!==sub_shortcode_value&&(shortcode+=" "+sub_shortcode_tag.replace("-","_")+'="'+sub_shortcode_value.toString()+'"')}))),shortcode},base.insertAtChars=function(_this,currentValue){var obj=void 0!==_this[0].name?_this[0]:_this;return obj.value.length&&void 0!==obj.selectionStart?(obj.focus(),obj.value.substring(0,obj.selectionStart)+currentValue+obj.value.substring(obj.selectionEnd,obj.value.length)):(obj.focus(),currentValue)},base.send_to_editor=function(html,editor_id){var tinymce_editor;if("undefined"!=typeof tinymce&&(tinymce_editor=tinymce.get(editor_id)),tinymce_editor&&!tinymce_editor.isHidden())tinymce_editor.execCommand("mceInsertContent",!1,html);else{var $editor=$("#"+editor_id);$editor.val(base.insertAtChars($editor,html)).trigger("change")}},this.each((function(){var $modal=$(this),$load=$modal.find(".spf-modal-load"),$content=$modal.find(".spf-modal-content"),$insert=$modal.find(".spf-modal-insert"),$loading=$modal.find(".spf-modal-loading"),$select=$modal.find("select"),modal_id=$modal.data("modal-id"),nonce=$modal.data("nonce"),editor_id,target_id,gutenberg_id,sc_key,sc_name,sc_view,sc_group,$cloned,$button;$(document).on("click",'.spf-shortcode-button[data-modal-id="'+modal_id+'"]',(function(e){e.preventDefault(),$button=$(this),editor_id=$button.data("editor-id")||!1,target_id=$button.data("target-id")||!1,gutenberg_id=$button.data("gutenberg-id")||!1,$modal.show(),$modal.hasClass("spf-shortcode-single")&&void 0===sc_name&&$select.trigger("change")})),$select.on("change",(function(){var $option=$(this),$selected=$option.find(":selected");sc_key=$option.val(),sc_name=$selected.data("shortcode"),sc_view=$selected.data("view")||"normal",sc_group=$selected.data("group")||sc_name,$load.empty(),sc_key?($loading.show(),window.wp.ajax.post("spf-get-shortcode-"+modal_id,{shortcode_key:sc_key,nonce:nonce}).done((function(response){$loading.hide();var $appended=$(response.content).appendTo($load);$insert.parent().removeClass("hidden"),$cloned=$appended.find(".spf--repeat-shortcode").spf_clone(),$appended.spf_reload_script(),$appended.find(".spf-fields").spf_reload_script()}))):$insert.parent().addClass("hidden")})),$insert.on("click",(function(e){e.preventDefault();var shortcode="",serialize=$modal.find(".spf-field:not(.hidden)").find(":input").serializeObjectSP_WPCF();switch(sc_view){case"contents":var contentsObj=sc_name?serialize[sc_name]:serialize;$.each(contentsObj,(function(sc_key,sc_value){var sc_tag=sc_name||sc_key;shortcode+="["+sc_tag+"]"+sc_value+"[/"+sc_tag+"]"}));break;case"group":shortcode+="["+sc_name,$.each(serialize[sc_name],(function(sc_key,sc_value){shortcode+=base.shortcode_tags(sc_key,sc_value)})),shortcode+="]",shortcode+=base.shortcode_parse(serialize[sc_group],sc_group),shortcode+="[/"+sc_name+"]";break;case"repeater":shortcode+=base.shortcode_parse(serialize[sc_group],sc_group);break;default:shortcode+=base.shortcode_parse(serialize)}if(gutenberg_id){var content=window.spf_gutenberg_props.attributes.hasOwnProperty("shortcode")?window.spf_gutenberg_props.attributes.shortcode:"";window.spf_gutenberg_props.setAttributes({shortcode:content+shortcode})}else if(editor_id)base.send_to_editor(shortcode,editor_id);else{var $textarea=target_id?$(target_id):$button.parent().find("textarea");$textarea.val(base.insertAtChars($textarea,shortcode)).trigger("change")}$modal.hide()})),$modal.on("click",".spf--repeat-button",(function(e){e.preventDefault();var $repeatable=$modal.find(".spf--repeatable"),$new_clone=$cloned.spf_clone(),$remove_btn=$new_clone.find(".spf-repeat-remove"),$appended=$new_clone.appendTo($repeatable);$new_clone.find(".spf-fields").spf_reload_script(),SP_WPCF.helper.name_nested_replace($modal.find(".spf--repeat-shortcode"),sc_group),$remove_btn.on("click",(function(){$new_clone.remove(),SP_WPCF.helper.name_nested_replace($modal.find(".spf--repeat-shortcode"),sc_group)}))})),$modal.on("click",".spf-modal-close, .spf-modal-overlay",(function(){$modal.hide()}))}))},$.fn.spf_checkbox=function(){return this.each((function(){var $this=$(this),$input=$this.find(".spf--input"),$checkbox=$this.find(".spf--checkbox");$checkbox.on("click",(function(){$input.val(Number($checkbox.prop("checked"))).trigger("change")}))}))},$.fn.spf_field_wp_editor=function(){return this.each((function(){if(void 0!==window.wp.editor&&void 0!==window.tinyMCEPreInit&&void 0!==window.tinyMCEPreInit.mceInit.spf_wp_editor){var $this=$(this),$editor=$this.find(".spf-wp-editor"),$textarea=$this.find("textarea"),$has_wp_editor;($this.find(".wp-editor-wrap").length||$this.find(".mce-container").length)&&($editor.empty(),$editor.append($textarea),$textarea.css("display",""));var uid=SP_WPCF.helper.uid("spf-editor-");$textarea.attr("id",uid);var default_editor_settings={tinymce:window.tinyMCEPreInit.mceInit.spf_wp_editor,quicktags:window.tinyMCEPreInit.qtInit.spf_wp_editor},field_editor_settings=$editor.data("editor-settings"),editor_on_change=function(editor){editor.on("change",SP_WPCF.helper.debounce((function(){editor.save(),$textarea.trigger("change")}),250))};default_editor_settings.tinymce=$.extend({},default_editor_settings.tinymce,{selector:"#"+uid,setup:editor_on_change}),!1===field_editor_settings.tinymce&&(default_editor_settings.tinymce=!1,$editor.addClass("spf-no-tinymce")),!1===field_editor_settings.quicktags&&(default_editor_settings.quicktags=!1,$editor.addClass("spf-no-quicktags"));var interval=setInterval((function(){$this.is(":visible")&&(window.wp.editor.initialize(uid,default_editor_settings),clearInterval(interval))}));if(field_editor_settings.media_buttons&&window.spf_media_buttons){var $editor_buttons=$editor.find(".wp-media-buttons");if($editor_buttons.length)$editor_buttons.find(".spf-shortcode-button").data("editor-id",uid);else{var $media_buttons=$(window.spf_media_buttons);$media_buttons.find(".spf-shortcode-button").data("editor-id",uid),$editor.prepend($media_buttons)}}}}))},$.fn.spf_siblings=function(){return this.each((function(){var $this=$(this),$siblings=$this.find(".spf--sibling"),multiple=$this.data("multiple")||!1;$siblings.on("click",(function(){var $sibling=$(this);multiple?$sibling.hasClass("spf--active")?($sibling.removeClass("spf--active"),$sibling.find("input").prop("checked",!1).trigger("change")):($sibling.addClass("spf--active"),$sibling.find("input").prop("checked",!0).trigger("change")):($this.find("input").prop("checked",!1),$sibling.find("input").prop("checked",!0).trigger("change"),$sibling.addClass("spf--active").siblings().removeClass("spf--active"))}))}))},"function"==typeof Color&&(Color.fn.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var hex=parseInt(this._color,10).toString(16);if(this.error)return"";if(hex.length<6)for(var i=6-hex.length-1;i>=0;i--)hex="0"+hex;return"#"+hex}),SP_WPCF.funcs.parse_color=function(color){var value=color.replace(/\s+/g,""),trans=-1!==value.indexOf("rgba")?parseFloat(100*value.replace(/^.*,(.+)\)/,"$1")):100,rgba;return{value:value,transparent:trans,rgba:trans<100}},$.fn.spf_color=function(){return this.each((function(){var $input=$(this),picker_color=SP_WPCF.funcs.parse_color($input.val()),palette_color=!window.spf_vars.color_palette.length||window.spf_vars.color_palette,$container;$input.hasClass("wp-color-picker")&&$input.closest(".wp-picker-container").after($input).remove(),$input.wpColorPicker({palettes:palette_color,change:function(event,ui){var ui_color_value=ui.color.toString();$container.removeClass("spf--transparent-active"),$container.find(".spf--transparent-offset").css("background-color",ui_color_value),$input.val(ui_color_value).trigger("change")},create:function(){$container=$input.closest(".wp-picker-container");var a8cIris=$input.data("a8cIris"),$transparent_wrap=$('<div class="spf--transparent-wrap"><div class="spf--transparent-slider"></div><div class="spf--transparent-offset"></div><div class="spf--transparent-text"></div><div class="spf--transparent-button button button-small">transparent</div></div>').appendTo($container.find(".wp-picker-holder")),$transparent_slider=$transparent_wrap.find(".spf--transparent-slider"),$transparent_text=$transparent_wrap.find(".spf--transparent-text"),$transparent_offset=$transparent_wrap.find(".spf--transparent-offset"),$transparent_button=$transparent_wrap.find(".spf--transparent-button");"transparent"===$input.val()&&$container.addClass("spf--transparent-active"),$transparent_button.on("click",(function(){"transparent"!==$input.val()?($input.val("transparent").trigger("change").removeClass("iris-error"),$container.addClass("spf--transparent-active")):($input.val(a8cIris._color.toString()).trigger("change"),$container.removeClass("spf--transparent-active"))})),$transparent_slider.slider({value:picker_color.transparent,step:1,min:0,max:100,slide:function(event,ui){var slide_value=parseFloat(ui.value/100);a8cIris._color._alpha=slide_value,$input.wpColorPicker("color",a8cIris._color.toString()),$transparent_text.text(1===slide_value||0===slide_value?"":slide_value)},create:function(){var slide_value=parseFloat(picker_color.transparent/100),text_value=slide_value<1?slide_value:"";$transparent_text.text(text_value),$transparent_offset.css("background-color",picker_color.value),$container.on("click",".wp-picker-clear",(function(){a8cIris._color._alpha=1,$transparent_text.text(""),$transparent_slider.slider("option","value",100),$container.removeClass("spf--transparent-active"),$input.trigger("change")})),$container.on("click",".wp-picker-default",(function(){var default_color=SP_WPCF.funcs.parse_color($input.data("default-color")),default_value=parseFloat(default_color.transparent/100),default_text=default_value<1?default_value:"";a8cIris._color._alpha=default_value,$transparent_text.text(default_text),$transparent_slider.slider("option","value",default_color.transparent)})),$container.on("click",".wp-color-result",(function(){$transparent_wrap.toggle()})),$("body").on("click.wpcolorpicker",(function(){$transparent_wrap.hide()}))}})}})}))},$.fn.spf_chosen=function(){return this.each((function(){var $this=$(this),$inited=$this.parent().find(".chosen-container"),is_multi,set_width=$this.attr("multiple")||!1?"100%":"auto",set_options=$.extend({allow_single_deselect:!0,disable_search_threshold:15,width:set_width},$this.data());$inited.length&&$inited.remove(),$this.chosen(set_options)}))},$.fn.spf_number=function(){return this.each((function(){$(this).on("keypress",(function(e){if(0!==e.keyCode&&8!==e.keyCode&&45!==e.keyCode&&46!==e.keyCode&&(e.keyCode<48||e.keyCode>57))return!1}))}))},$.fn.spf_help=function(){return this.each((function(){var $this=$(this),$tooltip,offset_left;$this.on({mouseenter:function(){$tooltip=$('<div class="spf-tooltip"></div>').html($this.find(".spf-help-text").html()).appendTo("body"),offset_left=SP_WPCF.vars.is_rtl?$this.offset().left+24:$this.offset().left-$tooltip.outerWidth(),$tooltip.css({top:$this.offset().top-($tooltip.outerHeight()/2-14),left:offset_left})},mouseleave:function(){void 0!==$tooltip&&$tooltip.remove()}})}))},$.fn.spf_customizer_refresh=function(){return this.each((function(){var $this=$(this),$complex=$this.closest(".spf-customize-complex");if($complex.length){var $input=$complex.find(":input"),$unique=$complex.data("unique-id"),$option=$complex.data("option-id"),obj=$input.serializeObjectSP_WPCF(),data=$.isEmptyObject(obj)?"":obj[$unique][$option],control=wp.customize.control($unique+"["+$option+"]");control.setting._value=null,control.setting.set(data)}else $this.find(":input").first().trigger("change");$(document).trigger("spf-customizer-refresh",$this)}))},$.fn.spf_customizer_listen=function(options){var settings=$.extend({closest:!1},options);return this.each((function(){if(void 0!==window.wp.customize){var $this=settings.closest?$(this).closest(".spf-customize-complex"):$(this),$input=$this.find(":input"),unique_id=$this.data("unique-id"),option_id=$this.data("option-id");void 0!==unique_id&&$input.on("change keyup",SP_WPCF.helper.debounce((function(){var obj=$this.find(":input").serializeObjectSP_WPCF();!$.isEmptyObject(obj)&&obj[unique_id]&&window.wp.customize.control(unique_id+"["+option_id+"]").setting.set(obj[unique_id][option_id])}),250))}}))},$(document).on("expanded",".control-section-spf",(function(){var $this=$(this);$this.hasClass("open")&&!$this.data("inited")&&($this.spf_dependency(),$this.find(".spf-customize-field").spf_reload_script({dependency:!1}),$this.find(".spf-customize-complex").spf_customizer_listen(),$this.data("inited",!0))})),SP_WPCF.vars.$window.on("resize spf.resize",SP_WPCF.helper.debounce((function(event){var window_width;(navigator.userAgent.indexOf("AppleWebKit/")>-1?SP_WPCF.vars.$window.width():window.innerWidth)<=782&&!SP_WPCF.vars.onloaded&&($(".spf-section").spf_reload_script(),SP_WPCF.vars.onloaded=!0)}),200)).trigger("spf.resize"),$.fn.spf_widgets=function(){this.length&&($(document).on("widget-added widget-updated",(function(event,$widget){$widget.find(".spf-fields").spf_reload_script()})),$(".widgets-sortables, .control-section-sidebar").on("sortstop",(function(event,ui){ui.item.find(".spf-fields").spf_reload_script_retry()})),$(document).on("click",".widget-top",(function(event){$(this).parent().find(".spf-fields").spf_reload_script()})))},$.fn.spf_reload_script_retry=function(){return this.each((function(){var $this=$(this);$this.data("inited")&&$this.children(".spf-field-wp_editor").spf_field_wp_editor()}))},$.fn.spf_reload_script=function(options){var settings=$.extend({dependency:!0},options);return this.each((function(){var $this=$(this);$this.data("inited")||($this.children(".spf-field-accordion").spf_field_accordion(),$this.children(".spf-field-code_editor").spf_field_code_editor(),$this.children(".spf-field-fieldset").spf_field_fieldset(),$this.children(".spf-field-gallery").spf_field_gallery(),$this.children(".spf-field-group").spf_field_group(),$this.children(".spf-field-media").spf_field_media(),$this.children(".spf-field-spinner").spf_field_spinner(),$this.children(".spf-field-switcher").spf_field_switcher(),$this.children(".spf-field-typography").spf_field_typography(),$this.children(".spf-field-upload").spf_field_upload(),$this.children(".spf-field-wp_editor").spf_field_wp_editor(),$this.children(".spf-field-border").find(".spf-color").spf_color(),$this.children(".spf-field-dimensions_advanced").find(".spf-color").spf_color(),$this.children(".spf-field-background_adv").find(".spf-color").spf_color(),$this.children(".spf-field-background").find(".spf-color").spf_color(),$this.children(".spf-field-color").find(".spf-color").spf_color(),$this.children(".spf-field-color_group").find(".spf-color").spf_color(),$this.children(".spf-field-link_color").find(".spf-color").spf_color(),$this.children(".spf-field-typography").find(".spf-color").spf_color(),$this.children(".spf-field-dimensions").find(".spf-number").spf_number(),$this.children(".spf-field-slider").find(".spf-number").spf_number(),$this.children(".spf-field-spacing").find(".spf-number").spf_number(),$this.children(".spf-field-column").find(".spf-number").spf_number(),$this.children(".spf-field-dimensions_advanced").find(".spf-number").spf_number(),$this.children(".spf-field-spinner").find(".spf-number").spf_number(),$this.children(".spf-field-typography").find(".spf-number").spf_number(),$this.children(".spf-field-select").find(".spf-chosen").spf_chosen(),$this.children(".spf-field-checkbox").find(".spf-checkbox").spf_checkbox(),$this.children(".spf-field-button_set").find(".spf-siblings").spf_siblings(),$this.children(".spf-field-image_select").find(".spf-siblings").spf_siblings(),$this.children(".spf-field-carousel_type").find(".spf-siblings").spf_siblings(),$this.children(".spf-field-palette").find(".spf-siblings").spf_siblings(),$this.children(".spf-field").find(".spf-help").spf_help(),settings.dependency&&$this.spf_dependency(),$this.data("inited",!0),$(document).trigger("spf-reload-script",$this))}))},$(document).ready((function(){$(".spf-save").spf_save(),$(".spf-confirm").spf_confirm(),$(".spf-nav-options").spf_nav_options(),$(".spf-nav-metabox").spf_nav_metabox(),$(".spf-expand-all").spf_expand_all(),$(".spf-search").spf_search(),$(".spf-sticky-header").spf_sticky(),$(".spf-taxonomy").spf_taxonomy(),$(".spf-shortcode").spf_shortcode(),$(".spf-page-templates").spf_page_templates(),$(".spf-post-formats").spf_post_formats(),$(".spf-onload").spf_reload_script(),$(".widget").spf_widgets()})),$(".sp_wpcp_post_type select").change((function(event){event.preventDefault();var data={action:"wpcp_get_taxonomies",wpcf_post_type:$(this).val()};$.post(ajaxurl,data,(function(resp){$(".sp_wpcp_post_taxonomy select").html(resp),$(".sp_wpcp_post_taxonomy select").trigger("chosen:updated")}))})),$(".sp_wpcp_post_taxonomy select").change((function(event){event.preventDefault();var data={action:"wpcp_get_terms",wpcf_post_taxonomy:$(this).val()};$.post(ajaxurl,data,(function(resp){$(".sp_wpcp_taxonomy_terms select").html(resp),$(".sp_wpcp_taxonomy_terms select").trigger("chosen:updated")}))})),$(".sp_wpcp_post_type select").change((function(event){event.preventDefault();var data={action:"wpcp_get_posts",wpcf_post_type:$(this).val()};$.post(ajaxurl,data,(function(resp){$(".sp_wpcp_specific_posts select").html(resp),$(".sp_wpcp_specific_posts select").trigger("chosen:updated")}))}))}(jQuery,window,document);
admin/views/wpcfree-metabox/classes/options.class.php CHANGED
@@ -552,7 +552,7 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
552
  echo '<div class="spf-header-inner">';
553
 
554
  echo '<div class="spf-header-left">';
555
- echo '<h1>' . $this->args['framework_title'] . '</h1>';
556
  echo '</div>';
557
 
558
  echo '<div class="spf-header-right">';
552
  echo '<div class="spf-header-inner">';
553
 
554
  echo '<div class="spf-header-left">';
555
+ echo '<h1><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 709.6 557.7" style="enable-background:new 0 0 709.6 557.7;" xml:space="preserve"> <style type="text/css"> .st0{fill:#1DAEB9;}</style><g><g><polygon class="st0" points="514,317.1 437,221.5 483.7,183.9 560.7,279.5"/><polygon class="st0" points="484,375.3 437.3,337.7 514.2,242.1 560.9,279.7"/></g><g><polygon class="st0" points="196.4,317.1 149.7,279.5 226.7,183.9 273.4,221.5"/><polygon class="st0" points="226.4,375.3 149.5,279.7 196.2,242.1 273.1,337.7"/></g><g><path class="st0" d="M699,547.2H11.4V12H699V547.2z M89.1,469.5h532.2V89.7H89.1V469.5z"/></g></g></svg>' . $this->args['framework_title'] . '</h1>';
556
  echo '</div>';
557
 
558
  echo '<div class="spf-header-right">';
admin/views/wpcfree-metabox/fields/button_set/button_set.php CHANGED
@@ -1,57 +1,68 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
 
 
2
  /**
3
  *
4
  * Field: button_set
5
  *
6
  * @since 1.0.0
7
  * @version 1.0.0
8
- *
9
  */
10
- if( ! class_exists( 'SP_WPCF_Field_button_set' ) ) {
11
- class SP_WPCF_Field_button_set extends SP_WPCF_Fields {
 
 
 
12
 
13
- public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
- parent::__construct( $field, $value, $unique, $where, $parent );
15
- }
16
 
17
- public function render() {
18
 
19
- $args = wp_parse_args( $this->field, array(
20
- 'multiple' => false,
21
- 'options' => array(),
22
- ) );
 
 
 
23
 
24
- $value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
25
 
26
- echo $this->field_before();
27
 
28
- if( ! empty( $args['options'] ) ) {
29
 
30
- echo '<div class="spf-siblings spf--button-group" data-multiple="'. $args['multiple'] .'">';
31
 
32
- foreach( $args['options'] as $key => $option ) {
33
 
34
- $type = ( $args['multiple'] ) ? 'checkbox' : 'radio';
35
- $extra = ( $args['multiple'] ) ? '[]' : '';
36
- $active = ( in_array( $key, $value ) ) ? ' spf--active' : '';
37
- $checked = ( in_array( $key, $value ) ) ? ' checked' : '';
 
 
 
 
 
 
 
 
38
 
39
- echo '<div class="spf--sibling spf--button'. $active .'">';
40
- echo '<input type="'. $type .'" name="'. $this->field_name( $extra ) .'" value="'. $key .'"'. $this->field_attributes() . $checked .'/>';
41
- echo $option;
42
- echo '</div>';
43
 
44
- }
45
 
46
- echo '</div>';
47
 
48
- }
49
 
50
- echo '<div class="clear"></div>';
51
 
52
- echo $this->field_after();
53
 
54
- }
55
 
56
- }
57
  }
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die;
3
+ } // Cannot access directly.
4
  /**
5
  *
6
  * Field: button_set
7
  *
8
  * @since 1.0.0
9
  * @version 1.0.0
 
10
  */
11
+ if ( ! class_exists( 'SP_WPCF_Field_button_set' ) ) {
12
+ class SP_WPCF_Field_button_set extends SP_WPCF_Fields {
13
+
14
+
15
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
16
 
17
+ parent::__construct( $field, $value, $unique, $where, $parent );
18
+ }
 
19
 
20
+ public function render() {
21
 
22
+ $args = wp_parse_args(
23
+ $this->field,
24
+ array(
25
+ 'multiple' => false,
26
+ 'options' => array(),
27
+ )
28
+ );
29
 
30
+ $value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
31
 
32
+ echo $this->field_before();
33
 
34
+ if ( ! empty( $args['options'] ) ) {
35
 
36
+ echo '<div class="spf-siblings spf--button-group" data-multiple="' . $args['multiple'] . '">';
37
 
38
+ foreach ( $args['options'] as $key => $option ) {
39
 
40
+ $type = ( $args['multiple'] ) ? 'checkbox' : 'radio';
41
+ $extra = ( $args['multiple'] ) ? '[]' : '';
42
+ $active = ( in_array( $key, $value ) ) ? ' spf--active' : '';
43
+ $checked = ( in_array( $key, $value ) ) ? ' checked' : '';
44
+ $pro_only_class = ( isset( $option['pro_only'] ) && $option['pro_only'] == true ) ? ' spf-pro-only' : '';
45
+ echo '<div class="spf--sibling spf--button' . $active . $pro_only_class . '">';
46
+ echo '<input type="' . $type . '" name="' . $this->field_name( $extra ) . '" value="' . $key . '"' . $this->field_attributes() . $checked . '/>';
47
+ if ( isset( $option['option_name'] ) && ! empty( $option['option_name'] ) ) {
48
+ echo $option['option_name'];
49
+ } else {
50
+ echo $option;
51
+ }
52
 
53
+ echo '</div>';
 
 
 
54
 
55
+ }
56
 
57
+ echo '</div>';
58
 
59
+ }
60
 
61
+ echo '<div class="clear"></div>';
62
 
63
+ echo $this->field_after();
64
 
65
+ }
66
 
67
+ }
68
  }
admin/views/wpcfree-metabox/fields/image_select/image_select.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: image_select
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SP_WPCF_Field_image_select' ) ) {
11
+ class SP_WPCF_Field_image_select extends SP_WPCF_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $args = wp_parse_args(
20
+ $this->field,
21
+ array(
22
+ 'multiple' => false,
23
+ 'options' => array(),
24
+ )
25
+ );
26
+
27
+ $value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
28
+
29
+ echo $this->field_before();
30
+
31
+ if ( ! empty( $args['options'] ) ) {
32
+
33
+ echo '<div class="spf-siblings spf--image-group" data-multiple="' . $args['multiple'] . '">';
34
+
35
+ $num = 1;
36
+
37
+ foreach ( $args['options'] as $key => $option ) {
38
+
39
+ $type = ( $args['multiple'] ) ? 'checkbox' : 'radio';
40
+ $extra = ( $args['multiple'] ) ? '[]' : '';
41
+ $active = ( in_array( $key, $value ) ) ? ' spf--active' : '';
42
+ $checked = ( in_array( $key, $value ) ) ? ' checked' : '';
43
+ $pro_only_class = isset( $option['pro_only'] ) ? ' spf-pro-only' : '';
44
+ echo '<div class="spf--sibling spf--image' . $active . $pro_only_class . '">';
45
+ echo '<img src="' . $option['image'] . '" alt="img-' . $num++ . '" />';
46
+ echo '<input type="' . $type . '" name="' . $this->field_name( $extra ) . '" value="' . $key . '"' . $this->field_attributes() . $checked . '/>';
47
+ echo '<span>' . $option['text'] . '</p>';
48
+ echo '</div>';
49
+
50
+ }
51
+ echo '</div>';
52
+
53
+ }
54
+
55
+ echo '<div class="clear"></div>';
56
+
57
+ echo $this->field_after();
58
+
59
+ }
60
+
61
+ public function output() {
62
+
63
+ $output = '';
64
+ $bg_image = array();
65
+ $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
66
+ $elements = ( is_array( $this->field['output'] ) ) ? join( ',', $this->field['output'] ) : $this->field['output'];
67
+
68
+ if ( ! empty( $elements ) && isset( $this->value ) && $this->value !== '' ) {
69
+ $output = $elements . '{background-image:url(' . $this->value . ')' . $important . ';}';
70
+ }
71
+
72
+ $this->parent->output_css .= $output;
73
+
74
+ return $output;
75
+
76
+ }
77
+
78
+ }
79
+ }
public/class-wp-carousel-free-public.php CHANGED
@@ -68,7 +68,7 @@ class WP_Carousel_Free_Public {
68
  );
69
 
70
  $carousel_ids = $wpc_posts->posts;
71
-
72
  foreach ( $carousel_ids as $post_id ) {
73
  include WPCAROUSELF_PATH . '/public/dynamic-style.php';
74
  }
68
  );
69
 
70
  $carousel_ids = $wpc_posts->posts;
71
+ $the_wpcf_dynamic_css = '';
72
  foreach ( $carousel_ids as $post_id ) {
73
  include WPCAROUSELF_PATH . '/public/dynamic-style.php';
74
  }
public/dynamic-style.php CHANGED
@@ -87,7 +87,7 @@ if ( 'hide' !== $wpcp_dots ) {
87
  /**
88
  * The Dynamic Style CSS.
89
  */
90
- $the_wpcf_dynamic_css = '';
91
  $the_wpcf_dynamic_css .= $wpcp_product_css;
92
  $the_wpcf_dynamic_css .= $section_title_dynamic_css;
93
  $the_wpcf_dynamic_css .= $nav_dynamic_style;
87
  /**
88
  * The Dynamic Style CSS.
89
  */
90
+
91
  $the_wpcf_dynamic_css .= $wpcp_product_css;
92
  $the_wpcf_dynamic_css .= $section_title_dynamic_css;
93
  $the_wpcf_dynamic_css .= $nav_dynamic_style;
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: shapedplugin
3
  Donate link: http://shapedplugin.com/donate
4
  Tags: wordpress carousel, best carousel plugin, image carousel, image slider, post carousel, custom post carousel, custom taxonomy carousel, woocommerce product carousel, content carousel, video carousel, video slider, video lightbox, youtube carousel, video gallery, carousel, slider, responsive slider, responsive carousel, carousel slider, ticker carousel, center mode carousel, slide anything, image gallery, image lightbox, wordpress image gallery, photo gallery, gallery slider, wordpress gallery plugin, gallery, post slider, vimeo slider, self hosted video carousel, content slider, wordpress slider, featured content slider, html slider, horizontal carousel slider, posts content slider, product carousel, woocommerce slider, woocommerce product slider
5
  Requires at least: 4.3
6
- Tested up to: 5.5.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -326,6 +326,11 @@ Thank you!
326
 
327
  == Changelog ==
328
 
 
 
 
 
 
329
  = 2.1.14 – Nov 25, 2020 =
330
  * Tested: WooCommerce 4.7.1 version.
331
 
3
  Donate link: http://shapedplugin.com/donate
4
  Tags: wordpress carousel, best carousel plugin, image carousel, image slider, post carousel, custom post carousel, custom taxonomy carousel, woocommerce product carousel, content carousel, video carousel, video slider, video lightbox, youtube carousel, video gallery, carousel, slider, responsive slider, responsive carousel, carousel slider, ticker carousel, center mode carousel, slide anything, image gallery, image lightbox, wordpress image gallery, photo gallery, gallery slider, wordpress gallery plugin, gallery, post slider, vimeo slider, self hosted video carousel, content slider, wordpress slider, featured content slider, html slider, horizontal carousel slider, posts content slider, product carousel, woocommerce slider, woocommerce product slider
5
  Requires at least: 4.3
6
+ Tested up to: 5.6
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
326
 
327
  == Changelog ==
328
 
329
+ = 2.1.15 – Dec 29, 2020 =
330
+ * Fix: Dynamic CSS issue.
331
+ * Tested: WordPress 5.6 version.
332
+ * Tested: WooCommerce 4.8.0 version.
333
+
334
  = 2.1.14 – Nov 25, 2020 =
335
  * Tested: WooCommerce 4.7.1 version.
336
 
wp-carousel-free.php CHANGED
@@ -9,7 +9,7 @@
9
  * Plugin Name: WordPress Carousel
10
  * Plugin URI: https://shapedplugin.com/plugin/wordpress-carousel-pro/
11
  * Description: The Most Powerful and User-friendly WordPress Carousel Plugin. Create beautiful carousels in minutes using Images, Posts, WooCommerce Products etc.
12
- * Version: 2.1.14
13
  * Author: ShapedPlugin
14
  * Author URI: https://shapedplugin.com/
15
  * License: GPL-2.0+
@@ -17,24 +17,23 @@
17
  * Text Domain: wp-carousel-free
18
  * Domain Path: /languages
19
  * WC requires at least: 3.0
20
- * WC tested up to: 4.7.1
21
  */
22
 
23
  // If this file is called directly, abort.
24
- if (! defined('WPINC') ) {
25
- die;
26
  }
27
 
28
  /**
29
  * The code that runs during plugin activation.
30
  * This action is documented in includes/class-wp-carousel-free-activator.php
31
  */
32
- function activate_wp_carousel_free()
33
- {
34
- include_once WPCAROUSELF_PATH . '/includes/class-wp-carousel-free-activator.php';
35
- WP_Carousel_Free_Activator::activate();
36
  }
37
- register_activation_hook(__FILE__, 'activate_wp_carousel_free');
38
 
39
 
40
  /**
@@ -46,307 +45,290 @@ register_activation_hook(__FILE__, 'activate_wp_carousel_free');
46
  class SP_WP_Carousel_Free {
47
 
48
 
49
- /**
50
- * The loader that's responsible for maintaining and registering all hooks that power
51
- * the plugin.
52
- *
53
- * @since 2.0.0
54
- * @access protected
55
- * @var WP_Carousel_Free_Loader $loader Maintains and registers all hooks for the plugin.
56
- */
57
- public $loader;
58
-
59
- /**
60
- * The unique identifier of this plugin.
61
- *
62
- * @since 2.0.0
63
- * @access protected
64
- * @var string $plugin_name The string used to uniquely identify this plugin.
65
- */
66
- protected $plugin_name;
67
-
68
- /**
69
- * The current version of the plugin.
70
- *
71
- * @since 2.0.0
72
- * @access protected
73
- * @var string $version The current version of the plugin.
74
- */
75
- protected $version;
76
-
77
- /**
78
- * Plugin textdomain.
79
- *
80
- * @since 2.0.0
81
- *
82
- * @var string
83
- */
84
- public $domain = 'wp-carousel-free';
85
-
86
- /**
87
- * Minimum PHP version required
88
- *
89
- * @since 2.0.0
90
- * @var string
91
- */
92
- private $min_php = '5.4.0';
93
-
94
- /**
95
- * Plugin file.
96
- *
97
- * @var string
98
- */
99
- private $file = __FILE__;
100
-
101
- /**
102
- * Holds class object
103
- *
104
- * @var object
105
- * @since 2.0.0
106
- */
107
- private static $instance;
108
-
109
- /**
110
- * Initialize the SP_WP_Carousel_Free() class
111
- *
112
- * @since 2.0.0
113
- * @return object
114
- */
115
- public static function init()
116
- {
117
- if (! isset(self::$instance) && ! ( self::$instance instanceof SP_WP_Carousel_Free ) ) {
118
- self::$instance = new SP_WP_Carousel_Free();
119
- self::$instance->setup();
120
- }
121
- return self::$instance;
122
- }
123
-
124
- /**
125
- * Define the core functionality of the plugin.
126
- *
127
- * Set the plugin name and the plugin version that can be used throughout the plugin.
128
- * Load the dependencies, define the locale, and set the hooks for the admin area and
129
- * the public-facing side of the site.
130
- *
131
- * @since 2.0.0
132
- */
133
- public function setup()
134
- {
135
- $this->plugin_name = 'wp-carousel-free';
136
- $this->version = '2.1.14';
137
- $this->define_constants();
138
- $this->includes();
139
- $this->load_dependencies();
140
- $this->set_locale();
141
- $this->define_common_hooks();
142
- $this->define_admin_hooks();
143
- $this->define_public_hooks();
144
- }
145
-
146
- /**
147
- * Define plugin constants.
148
- *
149
- * @since 2.0.0
150
- * @return void
151
- */
152
- private function define_constants()
153
- {
154
- $this->define('WPCAROUSELF_BASENAME', plugin_basename(__FILE__));
155
- $this->define('WPCAROUSELF_VERSION', $this->version);
156
- $this->define('WPCAROUSELF_PATH', plugin_dir_path(__FILE__));
157
- $this->define('WPCAROUSELF_INCLUDES', WPCAROUSELF_PATH . '/includes');
158
- $this->define('WPCAROUSELF_URL', plugin_dir_url(__FILE__));
159
- }
160
-
161
- /**
162
- * Define constant if not already set.
163
- *
164
- * @param string $name Constant name.
165
- * @param string|bool $value Constant Value.
166
- */
167
- private function define( $name, $value )
168
- {
169
- if (! defined($name) ) {
170
- define($name, $value);
171
- }
172
- }
173
-
174
- /**
175
- * Included required files.
176
- *
177
- * @since 2.0.0
178
- * @return void
179
- */
180
- public function includes()
181
- {
182
-
183
- include_once WPCAROUSELF_INCLUDES . '/class-wp-carosuel-free-updates.php';
184
- include_once WPCAROUSELF_INCLUDES . '/class-wp-carousel-free-loader.php';
185
- include_once WPCAROUSELF_INCLUDES . '/class-wp-carousel-free-post-types.php';
186
- include_once WPCAROUSELF_PATH . '/admin/views/wpcfree-metabox/classes/setup.class.php';
187
- include_once WPCAROUSELF_PATH . '/admin/views/notices/review.php';
188
- include_once WPCAROUSELF_PATH . '/admin/views/notices/class-wp-carousel-free-promotion.php';
189
- include_once WPCAROUSELF_PATH . '/admin/views/metabox-config.php';
190
- include_once WPCAROUSELF_PATH . '/admin/views/option-config.php';
191
- include_once WPCAROUSELF_INCLUDES . '/class-wp-carousel-free-shortcode.php';
192
- include_once WPCAROUSELF_PATH . '/public/shortcode-deprecated.php';
193
- include_once WPCAROUSELF_INCLUDES . '/class-wp-carousel-free-i18n.php';
194
- include_once WPCAROUSELF_PATH . '/public/class-wp-carousel-free-public.php';
195
- // if ( is_admin() ) {
196
- include_once WPCAROUSELF_PATH . '/admin/class-wp-carousel-free-admin.php';
197
- include_once WPCAROUSELF_PATH . '/admin/views/tmce-button.php';
198
- include_once WPCAROUSELF_PATH . '/admin/views/help.php';
199
- include_once WPCAROUSELF_PATH . '/admin/views/premium.php';
200
- // }
201
- }
202
-
203
- /**
204
- * Load the required dependencies for this plugin.
205
- *
206
- * Include the following files that make up the plugin:
207
- *
208
- * - WP_Carousel_Free_Loader. Orchestrates the hooks of the plugin.
209
- * - WP_Carousel_Free_I18n. Defines internationalization functionality.
210
- * - WP_Carousel_Free_Admin. Defines all hooks for the admin area.
211
- * - WP_Carousel_Free_Public. Defines all hooks for the public side of the site.
212
- *
213
- * Create an instance of the loader which will be used to register the hooks
214
- * with WordPress.
215
- *
216
- * @since 2.0.0
217
- * @access private
218
- */
219
- private function load_dependencies()
220
- {
221
- $this->loader = new WP_Carousel_Free_Loader();
222
-
223
- }
224
-
225
- /**
226
- * Define the locale for this plugin for internationalization.
227
- *
228
- * Uses the WP_Carousel_Free_I18n class in order to set the domain and to register the hook
229
- * with WordPress.
230
- *
231
- * @since 2.0.0
232
- * @access private
233
- */
234
- private function set_locale()
235
- {
236
- $plugin_i18n = new WP_Carousel_Free_I18n();
237
- $this->loader->add_action('plugins_loaded', $plugin_i18n, 'load_plugin_textdomain');
238
- }
239
-
240
- /**
241
- * Register common hooks.
242
- *
243
- * @since 2.0.0
244
- * @access private
245
- */
246
- private function define_common_hooks()
247
- {
248
- $plugin_cpt = new WP_Carousel_Free_Post_Type($this->get_plugin_name(), $this->get_version());
249
- $plugin_review_notice = new WP_Carousel_Free_Review($this->get_plugin_name(), $this->get_version());
250
-
251
- $this->loader->add_action('init', $plugin_cpt, 'wp_carousel_post_type', 11);
252
- $this->loader->add_action('admin_notices', $plugin_review_notice, 'display_admin_notice');
253
- $this->loader->add_action('wp_ajax_sp-wpcfree-never-show-review-notice', $plugin_review_notice, 'dismiss_review_notice');
254
- }
255
-
256
- /**
257
- * Register all of the hooks related to the admin area functionality
258
- * of the plugin.
259
- *
260
- * @since 2.0.0
261
- * @access private
262
- */
263
- private function define_admin_hooks()
264
- {
265
-
266
- $plugin_admin = new WP_Carousel_Free_Admin($this->get_plugin_name(), $this->get_version());
267
-
268
- $this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_admin_styles');
269
- $this->loader->add_filter('post_updated_messages', $plugin_admin, 'wpcp_carousel_updated_messages', 10, 2);
270
- $this->loader->add_filter('manage_sp_wp_carousel_posts_columns', $plugin_admin, 'filter_carousel_admin_column');
271
- $this->loader->add_action('manage_sp_wp_carousel_posts_custom_column', $plugin_admin, 'display_carousel_admin_fields', 10, 2);
272
- $this->loader->add_filter('plugin_action_links', $plugin_admin, 'add_plugin_action_links', 10, 2);
273
- $this->loader->add_filter('plugin_row_meta', $plugin_admin, 'plugin_row_meta', 10, 2);
274
- $this->loader->add_filter('admin_footer_text', $plugin_admin, 'sp_wpcp_review_text', 10, 2);
275
- $this->loader->add_action('activated_plugin', $plugin_admin, 'sp_wpcf_redirect_after_activation', 10, 2);
276
-
277
- // Help Page.
278
- $help_page = new WP_Carousel_Free_Help($this->get_plugin_name(), $this->get_version());
279
- $this->loader->add_action('admin_menu', $help_page, 'help_admin_menu', 40);
280
-
281
- // Premium Page.
282
- $upgrade_page = new WP_Carousel_Free_Upgrade($this->get_plugin_name(), $this->get_version());
283
- $this->loader->add_action('admin_menu', $upgrade_page, 'upgrade_admin_menu', 35);
284
-
285
- }
286
-
287
- /**
288
- * Register all of the hooks related to the public-facing functionality
289
- * of the plugin.
290
- *
291
- * @since 2.0.0
292
- * @access private
293
- */
294
- private function define_public_hooks()
295
- {
296
-
297
- $plugin_public = new WP_Carousel_Free_Public($this->get_plugin_name(), $this->get_version());
298
-
299
- $this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_styles');
300
- $this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_scripts');
301
-
302
- $plugin_shortcode = new WP_Carousel_Free_Shortcode($this->get_plugin_name(), $this->get_version());
303
- $this->loader->add_shortcode('sp_wpcarousel', $plugin_shortcode, 'sp_wp_carousel_shortcode');
304
-
305
- }
306
-
307
- /**
308
- * The name of the plugin used to uniquely identify it within the context of
309
- * WordPress and to define internationalization functionality.
310
- *
311
- * @since 2.0.0
312
- * @return string The name of the plugin.
313
- */
314
- public function get_plugin_name()
315
- {
316
- return $this->plugin_name;
317
- }
318
-
319
- /**
320
- * Retrieve the version number of the plugin.
321
- *
322
- * @since 2.0.0
323
- * @return string The version number of the plugin.
324
- */
325
- public function get_version()
326
- {
327
- return $this->version;
328
- }
329
-
330
- /**
331
- * The reference to the class that orchestrates the hooks with the plugin.
332
- *
333
- * @since 2.0.0
334
- * @return WP_Carousel_Free_Loader Orchestrates the hooks of the plugin.
335
- */
336
- public function get_loader()
337
- {
338
- return $this->loader;
339
- }
340
-
341
- /**
342
- * Run the loader to execute all of the hooks with WordPress.
343
- *
344
- * @since 2.0.0
345
- */
346
- public function run()
347
- {
348
- $this->loader->run();
349
- }
350
 
351
  } // SP_WP_Carousel_Free
352
 
@@ -358,10 +340,9 @@ class SP_WP_Carousel_Free {
358
  * @since 2.0.0
359
  * @return void
360
  */
361
- function sp_wpcf()
362
- {
363
- $plugin = SP_WP_Carousel_Free::init();
364
- $plugin->loader->run();
365
  }
366
  // Launch it out .
367
  sp_wpcf();
9
  * Plugin Name: WordPress Carousel
10
  * Plugin URI: https://shapedplugin.com/plugin/wordpress-carousel-pro/
11
  * Description: The Most Powerful and User-friendly WordPress Carousel Plugin. Create beautiful carousels in minutes using Images, Posts, WooCommerce Products etc.
12
+ * Version: 2.1.15
13
  * Author: ShapedPlugin
14
  * Author URI: https://shapedplugin.com/
15
  * License: GPL-2.0+
17
  * Text Domain: wp-carousel-free
18
  * Domain Path: /languages
19
  * WC requires at least: 3.0
20
+ * WC tested up to: 4.8.0
21
  */
22
 
23
  // If this file is called directly, abort.
24
+ if ( ! defined( 'WPINC' ) ) {
25
+ die;
26
  }
27
 
28
  /**
29
  * The code that runs during plugin activation.
30
  * This action is documented in includes/class-wp-carousel-free-activator.php
31
  */
32
+ function activate_wp_carousel_free() {
33
+ include_once WPCAROUSELF_PATH . '/includes/class-wp-carousel-free-activator.php';
34
+ WP_Carousel_Free_Activator::activate();
 
35
  }
36
+ register_activation_hook( __FILE__, 'activate_wp_carousel_free' );
37
 
38
 
39
  /**
45
  class SP_WP_Carousel_Free {
46
 
47
 
48
+ /**
49
+ * The loader that's responsible for maintaining and registering all hooks that power
50
+ * the plugin.
51
+ *
52
+ * @since 2.0.0
53
+ * @access protected
54
+ * @var WP_Carousel_Free_Loader $loader Maintains and registers all hooks for the plugin.
55
+ */
56
+ public $loader;
57
+
58
+ /**
59
+ * The unique identifier of this plugin.
60
+ *
61
+ * @since 2.0.0
62
+ * @access protected
63
+ * @var string $plugin_name The string used to uniquely identify this plugin.
64
+ */
65
+ protected $plugin_name;
66
+
67
+ /**
68
+ * The current version of the plugin.
69
+ *
70
+ * @since 2.0.0
71
+ * @access protected
72
+ * @var string $version The current version of the plugin.
73
+ */
74
+ protected $version;
75
+
76
+ /**
77
+ * Plugin textdomain.
78
+ *
79
+ * @since 2.0.0
80
+ *
81
+ * @var string
82
+ */
83
+ public $domain = 'wp-carousel-free';
84
+
85
+ /**
86
+ * Minimum PHP version required
87
+ *
88
+ * @since 2.0.0
89
+ * @var string
90
+ */
91
+ private $min_php = '5.4.0';
92
+
93
+ /**
94
+ * Plugin file.
95
+ *
96
+ * @var string
97
+ */
98
+ private $file = __FILE__;
99
+
100
+ /**
101
+ * Holds class object
102
+ *
103
+ * @var object
104
+ * @since 2.0.0
105
+ */
106
+ private static $instance;
107
+
108
+ /**
109
+ * Initialize the SP_WP_Carousel_Free() class
110
+ *
111
+ * @since 2.0.0
112
+ * @return object
113
+ */
114
+ public static function init() {
115
+ if ( ! isset( self::$instance ) && ! ( self::$instance instanceof SP_WP_Carousel_Free ) ) {
116
+ self::$instance = new SP_WP_Carousel_Free();
117
+ self::$instance->setup();
118
+ }
119
+ return self::$instance;
120
+ }
121
+
122
+ /**
123
+ * Define the core functionality of the plugin.
124
+ *
125
+ * Set the plugin name and the plugin version that can be used throughout the plugin.
126
+ * Load the dependencies, define the locale, and set the hooks for the admin area and
127
+ * the public-facing side of the site.
128
+ *
129
+ * @since 2.0.0
130
+ */
131
+ public function setup() {
132
+ $this->plugin_name = 'wp-carousel-free';
133
+ $this->version = '2.1.15';
134
+ $this->define_constants();
135
+ $this->includes();
136
+ $this->load_dependencies();
137
+ $this->set_locale();
138
+ $this->define_common_hooks();
139
+ $this->define_admin_hooks();
140
+ $this->define_public_hooks();
141
+ }
142
+
143
+ /**
144
+ * Define plugin constants.
145
+ *
146
+ * @since 2.0.0
147
+ * @return void
148
+ */
149
+ private function define_constants() {
150
+ $this->define( 'WPCAROUSELF_BASENAME', plugin_basename( __FILE__ ) );
151
+ $this->define( 'WPCAROUSELF_VERSION', $this->version );
152
+ $this->define( 'WPCAROUSELF_PATH', plugin_dir_path( __FILE__ ) );
153
+ $this->define( 'WPCAROUSELF_INCLUDES', WPCAROUSELF_PATH . '/includes' );
154
+ $this->define( 'WPCAROUSELF_URL', plugin_dir_url( __FILE__ ) );
155
+ }
156
+
157
+ /**
158
+ * Define constant if not already set.
159
+ *
160
+ * @param string $name Constant name.
161
+ * @param string|bool $value Constant Value.
162
+ */
163
+ private function define( $name, $value ) {
164
+ if ( ! defined( $name ) ) {
165
+ define( $name, $value );
166
+ }
167
+ }
168
+
169
+ /**
170
+ * Included required files.
171
+ *
172
+ * @since 2.0.0
173
+ * @return void
174
+ */
175
+ public function includes() {
176
+ include_once WPCAROUSELF_INCLUDES . '/class-wp-carosuel-free-updates.php';
177
+ include_once WPCAROUSELF_INCLUDES . '/class-wp-carousel-free-loader.php';
178
+ include_once WPCAROUSELF_INCLUDES . '/class-wp-carousel-free-post-types.php';
179
+ include_once WPCAROUSELF_PATH . '/admin/views/wpcfree-metabox/classes/setup.class.php';
180
+ include_once WPCAROUSELF_PATH . '/admin/views/notices/review.php';
181
+ include_once WPCAROUSELF_PATH . '/admin/views/notices/class-wp-carousel-free-promotion.php';
182
+ include_once WPCAROUSELF_PATH . '/admin/views/metabox-config.php';
183
+ include_once WPCAROUSELF_PATH . '/admin/views/option-config.php';
184
+ include_once WPCAROUSELF_INCLUDES . '/class-wp-carousel-free-shortcode.php';
185
+ include_once WPCAROUSELF_PATH . '/public/shortcode-deprecated.php';
186
+ include_once WPCAROUSELF_INCLUDES . '/class-wp-carousel-free-i18n.php';
187
+ include_once WPCAROUSELF_PATH . '/public/class-wp-carousel-free-public.php';
188
+ // if ( is_admin() ) {
189
+ include_once WPCAROUSELF_PATH . '/admin/class-wp-carousel-free-admin.php';
190
+ include_once WPCAROUSELF_PATH . '/admin/views/tmce-button.php';
191
+ include_once WPCAROUSELF_PATH . '/admin/views/help.php';
192
+ include_once WPCAROUSELF_PATH . '/admin/views/premium.php';
193
+ // }
194
+ }
195
+
196
+ /**
197
+ * Load the required dependencies for this plugin.
198
+ *
199
+ * Include the following files that make up the plugin:
200
+ *
201
+ * - WP_Carousel_Free_Loader. Orchestrates the hooks of the plugin.
202
+ * - WP_Carousel_Free_I18n. Defines internationalization functionality.
203
+ * - WP_Carousel_Free_Admin. Defines all hooks for the admin area.
204
+ * - WP_Carousel_Free_Public. Defines all hooks for the public side of the site.
205
+ *
206
+ * Create an instance of the loader which will be used to register the hooks
207
+ * with WordPress.
208
+ *
209
+ * @since 2.0.0
210
+ * @access private
211
+ */
212
+ private function load_dependencies() {
213
+ $this->loader = new WP_Carousel_Free_Loader();
214
+
215
+ }
216
+
217
+ /**
218
+ * Define the locale for this plugin for internationalization.
219
+ *
220
+ * Uses the WP_Carousel_Free_I18n class in order to set the domain and to register the hook
221
+ * with WordPress.
222
+ *
223
+ * @since 2.0.0
224
+ * @access private
225
+ */
226
+ private function set_locale() {
227
+ $plugin_i18n = new WP_Carousel_Free_I18n();
228
+ $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
229
+ }
230
+
231
+ /**
232
+ * Register common hooks.
233
+ *
234
+ * @since 2.0.0
235
+ * @access private
236
+ */
237
+ private function define_common_hooks() {
238
+ $plugin_cpt = new WP_Carousel_Free_Post_Type( $this->get_plugin_name(), $this->get_version() );
239
+ $plugin_review_notice = new WP_Carousel_Free_Review( $this->get_plugin_name(), $this->get_version() );
240
+
241
+ $this->loader->add_action( 'init', $plugin_cpt, 'wp_carousel_post_type', 11 );
242
+ $this->loader->add_action( 'admin_notices', $plugin_review_notice, 'display_admin_notice' );
243
+ $this->loader->add_action( 'wp_ajax_sp-wpcfree-never-show-review-notice', $plugin_review_notice, 'dismiss_review_notice' );
244
+ }
245
+
246
+ /**
247
+ * Register all of the hooks related to the admin area functionality
248
+ * of the plugin.
249
+ *
250
+ * @since 2.0.0
251
+ * @access private
252
+ */
253
+ private function define_admin_hooks() {
254
+ $plugin_admin = new WP_Carousel_Free_Admin( $this->get_plugin_name(), $this->get_version() );
255
+
256
+ $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_admin_styles' );
257
+ $this->loader->add_filter( 'post_updated_messages', $plugin_admin, 'wpcp_carousel_updated_messages', 10, 2 );
258
+ $this->loader->add_filter( 'manage_sp_wp_carousel_posts_columns', $plugin_admin, 'filter_carousel_admin_column' );
259
+ $this->loader->add_action( 'manage_sp_wp_carousel_posts_custom_column', $plugin_admin, 'display_carousel_admin_fields', 10, 2 );
260
+ $this->loader->add_filter( 'plugin_action_links', $plugin_admin, 'add_plugin_action_links', 10, 2 );
261
+ $this->loader->add_filter( 'plugin_row_meta', $plugin_admin, 'plugin_row_meta', 10, 2 );
262
+ $this->loader->add_filter( 'admin_footer_text', $plugin_admin, 'sp_wpcp_review_text', 10, 2 );
263
+ $this->loader->add_action( 'activated_plugin', $plugin_admin, 'sp_wpcf_redirect_after_activation', 10, 2 );
264
+
265
+ // Help Page.
266
+ $help_page = new WP_Carousel_Free_Help( $this->get_plugin_name(), $this->get_version() );
267
+ $this->loader->add_action( 'admin_menu', $help_page, 'help_admin_menu', 40 );
268
+
269
+ // Premium Page.
270
+ $upgrade_page = new WP_Carousel_Free_Upgrade( $this->get_plugin_name(), $this->get_version() );
271
+ $this->loader->add_action( 'admin_menu', $upgrade_page, 'upgrade_admin_menu', 35 );
272
+
273
+ }
274
+
275
+ /**
276
+ * Register all of the hooks related to the public-facing functionality
277
+ * of the plugin.
278
+ *
279
+ * @since 2.0.0
280
+ * @access private
281
+ */
282
+ private function define_public_hooks() {
283
+ $plugin_public = new WP_Carousel_Free_Public( $this->get_plugin_name(), $this->get_version() );
284
+
285
+ $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
286
+ $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
287
+
288
+ $plugin_shortcode = new WP_Carousel_Free_Shortcode( $this->get_plugin_name(), $this->get_version() );
289
+ $this->loader->add_shortcode( 'sp_wpcarousel', $plugin_shortcode, 'sp_wp_carousel_shortcode' );
290
+
291
+ }
292
+
293
+ /**
294
+ * The name of the plugin used to uniquely identify it within the context of
295
+ * WordPress and to define internationalization functionality.
296
+ *
297
+ * @since 2.0.0
298
+ * @return string The name of the plugin.
299
+ */
300
+ public function get_plugin_name() {
301
+ return $this->plugin_name;
302
+ }
303
+
304
+ /**
305
+ * Retrieve the version number of the plugin.
306
+ *
307
+ * @since 2.0.0
308
+ * @return string The version number of the plugin.
309
+ */
310
+ public function get_version() {
311
+ return $this->version;
312
+ }
313
+
314
+ /**
315
+ * The reference to the class that orchestrates the hooks with the plugin.
316
+ *
317
+ * @since 2.0.0
318
+ * @return WP_Carousel_Free_Loader Orchestrates the hooks of the plugin.
319
+ */
320
+ public function get_loader() {
321
+ return $this->loader;
322
+ }
323
+
324
+ /**
325
+ * Run the loader to execute all of the hooks with WordPress.
326
+ *
327
+ * @since 2.0.0
328
+ */
329
+ public function run() {
330
+ $this->loader->run();
331
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
332
 
333
  } // SP_WP_Carousel_Free
334
 
340
  * @since 2.0.0
341
  * @return void
342
  */
343
+ function sp_wpcf() {
344
+ $plugin = SP_WP_Carousel_Free::init();
345
+ $plugin->loader->run();
 
346
  }
347
  // Launch it out .
348
  sp_wpcf();